@viewlift/player-backup 2.0.96-smartTv-test1 → 2.0.96-smartTv-test21

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 (59) hide show
  1. package/cjs/{autoNextVideo-630079de.js → autoNextVideo-4e20ba6a.js} +1 -1
  2. package/cjs/bundle.css +37 -37
  3. package/cjs/{features-0814a0a4.js → features-be45d7f9.js} +1 -1
  4. package/cjs/generic-21c8c7ea.js +1 -0
  5. package/cjs/index-7d1a271f.js +1 -0
  6. package/cjs/{index-467f3c17.js → index-d5a9a936.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-d7fd65e9.js → multicamv2-5e8e7904.js} +1 -1
  9. package/cjs/{multicamv2-ec8d5060.js → multicamv2-71621dd0.js} +1 -1
  10. package/cjs/{nextEpisodeButton-aede1150.js → nextEpisodeButton-ebd37232.js} +1 -1
  11. package/cjs/{playlist-837fa123.js → playlist-a3220c16.js} +1 -1
  12. package/cjs/renditions-b94006c7.js +1 -0
  13. package/cjs/{series-af700fb7.js → series-70abfb9f.js} +1 -1
  14. package/cjs/{series-v2-5be92f0f.js → series-v2-02d98216.js} +1 -1
  15. package/cjs/{series-v2-a51ee822.js → series-v2-69a0ba49.js} +1 -1
  16. package/cjs/{settings-icon-dbfe75ab.js → settings-icon-25d10c3e.js} +1 -1
  17. package/cjs/{skin-97501399.js → skin-29ab2b0b.js} +1 -1
  18. package/cjs/{skin-19da0fd5.js → skin-4809e1d4.js} +1 -1
  19. package/cjs/{skin-3ee6a08f.js → skin-8a4af152.js} +1 -1
  20. package/cjs/{skin-e4570995.js → skin-8fd9c5d9.js} +1 -1
  21. package/cjs/{skin-2b041920.js → skin-c21c27b5.js} +1 -1
  22. package/cjs/{skin-eca7096f.js → skin-c9fb46f4.js} +1 -1
  23. package/cjs/{skin-13a2a94d.js → skin-ed1801d1.js} +1 -1
  24. package/cjs/{videoSelector-3293b6ce.js → videoSelector-090fab20.js} +1 -1
  25. package/cjs/{videoSelector-5268ef13.js → videoSelector-5bdeb332.js} +1 -1
  26. package/cjs/{videojs-dash5.es-0c89add5.js → videojs-dash5.es-ced4b564.js} +1 -1
  27. package/esm/{autoNextVideo-25176f20.js → autoNextVideo-6d32ebd3.js} +1 -1
  28. package/esm/bundle.css +37 -37
  29. package/esm/{features-540ec36b.js → features-93819855.js} +1 -1
  30. package/esm/generic-5f77f521.js +1 -0
  31. package/esm/index-87ef96f3.js +1 -0
  32. package/esm/{index-5a7423a2.js → index-f3660e88.js} +1 -1
  33. package/esm/index.js +1 -1
  34. package/esm/{multicamv2-4dce7c00.js → multicamv2-b695d56c.js} +1 -1
  35. package/esm/{multicamv2-3bb84e58.js → multicamv2-bd901048.js} +1 -1
  36. package/esm/{nextEpisodeButton-2574d5c2.js → nextEpisodeButton-c15e5be0.js} +1 -1
  37. package/esm/{playlist-d178a6f0.js → playlist-55cdadf1.js} +1 -1
  38. package/esm/renditions-792c992d.js +1 -0
  39. package/esm/{series-774e5a42.js → series-2c9e7cf3.js} +1 -1
  40. package/esm/{series-v2-11dd925b.js → series-v2-056fd38a.js} +1 -1
  41. package/esm/{series-v2-e141d362.js → series-v2-844454c8.js} +1 -1
  42. package/esm/{settings-icon-e08003bf.js → settings-icon-a905fdb3.js} +1 -1
  43. package/esm/{skin-2c9519de.js → skin-0c653990.js} +1 -1
  44. package/esm/{skin-2073cadc.js → skin-712aeb60.js} +1 -1
  45. package/esm/{skin-0195076b.js → skin-96e717ac.js} +1 -1
  46. package/esm/{skin-c09b1530.js → skin-a4aa403f.js} +1 -1
  47. package/esm/{skin-3986afad.js → skin-a8395b39.js} +1 -1
  48. package/esm/{skin-651a96b2.js → skin-b21a363b.js} +1 -1
  49. package/esm/{skin-5be717a2.js → skin-b7fc5738.js} +1 -1
  50. package/esm/{videoSelector-4c81e19f.js → videoSelector-8f835b46.js} +1 -1
  51. package/esm/{videoSelector-3e0d433e.js → videoSelector-baa4c25d.js} +1 -1
  52. package/esm/{videojs-dash5.es-6c1ba1fe.js → videojs-dash5.es-2dcf13b7.js} +1 -1
  53. package/package.json +5 -2
  54. package/cjs/generic-ac6915a3.js +0 -1
  55. package/cjs/index-173955be.js +0 -1
  56. package/cjs/renditions-7fe52e97.js +0 -1
  57. package/esm/generic-a4cc0314.js +0 -1
  58. package/esm/index-f1f0cece.js +0 -1
  59. package/esm/renditions-05558f5d.js +0 -1
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-0ea2e662.js"),s=require("./generic-ac6915a3.js"),a=require("./skin-f87e1c22.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray");var u=o.getComponent("Component"),c=function(){t(p,u);var s,a,c=(s=p,a=d(),function(){var e,n=i(s);if(a){var t=i(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return r(this,e)});function p(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=c.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./nextEpisodeButton-b6e6586f.js")}).then(function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)})}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),n.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")}),n.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")})}}]),p}(),p=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach(function(e,r){e.gist.id===n&&(t=r)}),t):null},h=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then(function(e){s.setCurrentVideo(e.response)})};var r=o.dom.$(".next-eps-image"),i=a.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var d=o.dom.$(".next-eps-description"),u=a.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=u&&u.firstChild;)null==d||d.appendChild(u.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),r=m(e[t],n.video.gist.id),i=v(e[t],r);h(i.nextEp)};
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),t=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),l=require("./icons-0ea2e662.js"),s=require("./generic-21c8c7ea.js"),a=require("./skin-f87e1c22.js");function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(d=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray");var u=o.getComponent("Component"),c=function(){t(p,u);var s,a,c=(s=p,a=d(),function(){var e,n=i(s);if(a){var t=i(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return r(this,e)});function p(n){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,p),(t=c.call(this,n,r)).playerId=r.playerId,t.seriesData=r.sres,t.currentVideoData=r.res,t.initialiseStructure(),t.loadCSS(),t}return n(p,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"play-next"}),n=o.dom.createEl("div",{className:"play-next-icon",innerHTML:"".concat(l.PlayNextEpisodeSvg(window.controlsColor?window.controlsColor:"white"))});return o.dom.appendContent(e,n),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./nextEpisodeButton-b6e6586f.js")}).then(function(e){var n=document.createElement("style");n.id="multicam",n.append("".concat(e.default)),document.head.appendChild(n)})}},{key:"initialiseStructure",value:function(){var e=this.el(),n=o.dom.createEl("div",{className:"next-eps nextepisode-hidden"}),t=o.dom.createEl("div",{className:"next",innerHTML:"Next Episode"}),r=o.dom.createEl("div",{className:"nextep-meta-details next-margin"}),i=o.dom.createEl("div",{className:"next-eps-image"}),l=o.dom.createEl("div",{className:"next-eps-description"});o.dom.appendContent(r,i),o.dom.appendContent(r,l),o.dom.appendContent(n,t),o.dom.appendContent(n,r),this.toggleContentOnHover(e,n),o.dom.appendContent(e,n)}},{key:"toggleContentOnHover",value:function(e,n){e.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),n.addEventListener("mouseover",function(){o.dom.removeClass(n,"nextepisode-hidden")}),e.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")}),n.addEventListener("mouseout",function(){o.dom.addClass(n,"nextepisode-hidden")})}}]),p}(),p=function(e,n){for(var t=-1,r=0;r<e.length;r++)for(var i=0;i<e[r].episodes.length;i++)if(e[r].episodes[i].id===n){t=r;break}return t},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0;if(!(e&&n>=0))return{prevEp:null,nextEp:null};var t=e.episodes.length,r=n-1>=0?n-1:t-1,i=(n+1)%t,o=t>1?e.episodes[r]:null,l=t>1?e.episodes[i]:null;return r===i&&(0===r?l=null:o=null),{prevEp:o,nextEp:l,prevEpIdx:r,nextEpIdx:i}},m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1?arguments[1]:void 0,t=null;return e?(e.episodes.forEach(function(e,r){e.gist.id===n&&(t=r)}),t):null},h=function(e){var n,t;o.dom.$(".next-eps"),o.dom.$(".play-next").onclick=function(){var n;s.load("my-player",null==e||null===(n=e.gist)||void 0===n?void 0:n.id).then(function(e){s.setCurrentVideo(e.response)})};var r=o.dom.$(".next-eps-image"),i=a.parseHtmlString("<img src=".concat(null==e||null===(n=e.gist)||void 0===n?void 0:n.videoImageUrl," />")),l=null==i?void 0:i.firstChild;null==r||r.append(l);for(var d=o.dom.$(".next-eps-description"),u=a.parseHtmlString("<div class='next-eps-title'>".concat(null==e?void 0:e.title,"</div>\n <div class='next-eps-description-details'>").concat(null==e||null===(t=e.gist)||void 0===t?void 0:t.description,"</div>"));null!=u&&u.firstChild;)null==d||d.appendChild(u.firstChild)};exports.default=c,exports.initaliseFunctionality=function(e,n){var t=p(e,n.video.gist.id),r=m(e[t],n.video.gist.id),i=v(e[t],r);h(i.nextEp)};
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-0ea2e662.js"),r=require("./generic-ac6915a3.js"),c=require("./autoNextVideo-630079de.js"),d=require("./skin-f87e1c22.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("./util-e1bc715c.js");var p=o.getComponent("Component"),m=function(){l(h,p);var m,v,y=(m=h,v=u(),function(){var e,t=a(m);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function h(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=y.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.js")}).then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),p=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),s=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(s,c),o.dom.appendContent(s,d),o.dom.appendContent(a,s),o.dom.appendContent(u,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(u,a),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(n.playerId,n.videos[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})},s.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(i=s.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},m=0;m<this.videos.length;m++)p(m);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,u),d.getPlayer(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}})}}]),h}();exports.default=m;
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),l=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("video.js"),s=require("./icons-0ea2e662.js"),r=require("./generic-21c8c7ea.js"),c=require("./autoNextVideo-4e20ba6a.js"),d=require("./skin-f87e1c22.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("./util-e1bc715c.js");var p=o.getComponent("Component"),m=function(){l(h,p);var m,v,y=(m=h,v=u(),function(){var e,t=a(m);if(v){var n=a(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function h(e){var n,l,i,a,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,h),(a=y.call(this,e,o)).playerId=o.playerId,a.seriesData=o.sres,a.videos=null==o||null===(n=o.playlist)||void 0===n?void 0:n.content,a.cb=(null==o||null===(l=o.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==o||null===(i=o.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=o.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&c.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(h,[{key:"createEl",value:function(){var e=o.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=o.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return o.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./playlist-df87ca90.js")}).then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=o.dom.createEl("div",{className:"selection-container hidden"});o.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(d.closeOpenDrawers(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var n=document.getElementById(this.playerId);if(n){var l=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px"),o.dom.appendContent(e,t),n.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=o.dom.createEl("div",{className:"playlist-selector-head"}),a=o.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});a.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var c=o.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),u=o.dom.createEl("div",{className:"playlist-selector-content"}),p=function(t){var l,i,a=o.dom.createEl("div",{className:"playlist-container"}),s=o.dom.createEl("div",{className:"playlist-section",index:t}),c=o.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=o.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});o.dom.appendContent(s,c),o.dom.appendContent(s,d),o.dom.appendContent(a,s),o.dom.appendContent(u,a);var p=o.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=o.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=o.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),o.dom.appendContent(p,v),o.dom.appendContent(p,m),o.dom.appendContent(a,p),o.dom.appendContent(u,a),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(n.playerId,n.videos[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})},s.onclick=function(t){var n,l,i,o=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(o=e(o))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(a.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(i=s.classList)||void 0===i||i.add("hidden"),a.style.backgroundColor="unset")}},m=0;m<this.videos.length;m++)p(m);o.dom.appendContent(i,a),o.dom.appendContent(i,c),o.dom.appendContent(t,i),o.dom.appendContent(t,u),d.getPlayer(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(n.playerId);if(e){var l=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(l,"px")}})}}]),h}();exports.default=m;
@@ -0,0 +1 @@
1
+ "use strict";var l=require("./skin-f87e1c22.js");exports.getRenditions=function(e){var i,n=l.getPlayer(e),t=[];if((null==n||null===(i=n.tech_)||void 0===i?void 0:i.vhs)||!1){var o,u,v,d=null==n||null===(o=n.tech_)||void 0===o||null===(u=o.vhs)||void 0===u||null===(v=u.representations)||void 0===v?void 0:v.call(u);(null==d?void 0:d.length)>0&&(t=null==d?void 0:d.sort(function(l,e){return(null==l?void 0:l.height)==(null==e?void 0:e.height)?(null==e?void 0:e.bandwidth)-(null==l?void 0:l.bandwidth):(null==e?void 0:e.height)-(null==l?void 0:l.height)}))}else try{var r,h,a,s=null==n||null===(r=n.dash)||void 0===r||null===(h=r.mediaPlayer)||void 0===h||null===(a=h.getRepresentationsByType)||void 0===a?void 0:a.call(h,"video");(null==s?void 0:s.length)>0&&(t=null==s?void 0:s.sort(function(l,e){return e.height-l.height}))}catch(l){var c,g=null==n||null===(c=n.qualityLevels())||void 0===c?void 0:c.levels_;(null==g?void 0:g.length)>0&&(t=null==g?void 0:g.sort(function(l,e){return e.height-l.height}))}return t},exports.getSelectedRendition=function(e){var i,n,t,o,u,v,d=l.getPlayer(e);return null!=d&&d.qualityLevels?null==d||null===(n=d.qualityLevels())||void 0===n?void 0:n.selectedIndex_:null!=d&&null!==(i=d.tech_)&&void 0!==i&&i.vhs?null==d||null===(t=d.tech_)||void 0===t||null===(o=t.vhs)||void 0===o||null===(u=o.selectedRepresentation)||void 0===u||null===(v=u.call(o))||void 0===v?void 0:v.id:0},exports.setMaxMinQualitySelector=function(e,i){var n=l.getPlayer(playerId);try{n.maxQualitySelector({minHeight:e,maxHeight:i})}catch(l){}};
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-ac6915a3.js"),u=require("./icons-0ea2e662.js"),p=require("./skin-f87e1c22.js");require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray");var v=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var f,m=c.getComponent("Component"),g=function(){n(d,m);var e,l,c=(e=d,l=h(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,f=n.playerId,y(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-9c237975.js")}).then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function b(){return(b=e(l.mark(function e(i,t,s,n){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(f),v(f),d.load(f,t).then(function(e){d.setCurrentVideo(e.response),d.play(f)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=p.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=p.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),f=e.id,m=e.episodes;h.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach(function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,u[i],u)}),v[i].addEventListener("click",function(){return function(e,i,t,s){return b.apply(this,arguments)}(i,m[i].id,t,u)}),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)g(y)},exports.seriesModule=g;
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),i=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),n=require("@babel/runtime/helpers/inherits"),r=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),l=require("@babel/runtime/regenerator"),c=require("video.js"),d=require("./generic-21c8c7ea.js"),u=require("./icons-0ea2e662.js"),p=require("./skin-f87e1c22.js");require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray");var v=function(e){document.getElementById("".concat(e)).classList.add("vjs-waiting")};function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}var f,m=c.getComponent("Component"),g=function(){n(d,m);var e,l,c=(e=d,l=h(),function(){var i,t=a(e);if(l){var s=a(this).constructor;i=Reflect.construct(t,arguments,s)}else i=t.apply(this,arguments);return r(this,i)});function d(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,d),t=c.call(this,e,n),o(s(t),"seriesData",[]),t.seriesData=n.seriesData,f=n.playerId,y(t.el(),t.seriesData),t.loadCSS(),t}return t(d,[{key:"createEl",value:function(){var e=document.createElement("div");return e.classList.add("vjs-season-list"),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-9c237975.js")}).then(function(e){var i=document.createElement("style");i.id="series",i.append("".concat(e.default)),document.head.appendChild(i)})}}]),d}();function b(){return(b=e(l.mark(function e(i,t,s,n){return l.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:d.pause(f),v(f),d.load(f,t).then(function(e){d.setCurrentVideo(e.response),d.play(f)});case 3:case"end":return e.stop()}},e)}))).apply(this,arguments)}function y(e,i){for(var t='<div class="hover-div"></div>\n '.concat(u.EpisodesSvg(),'\n <div class="player-season-list-container on-click-toggle">\n <div id="season-list" class="season-list">\n <div class="season-list-head">seasons</div>\n <div class="season-name-container">\n ').concat(function(e){return e.map(function(e,i){return'<div\n class="season-title-sdk"\n key='.concat("title-".concat(e.title),'\n > <div class="season-container">\n ',e.title,"\n </div>\n </div>\n ")}).join("")}(i),'\n </div>\n </div>\n <div id="episode-list" class="episode-list hide-container"><div id="episodes-back-btn" class="episodes-back-btn" >\n <svg class=\'icon icon-backward\' height="22px" width="22px" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.383092 19.5818C-0.0882695 19.0669 -0.124672 18.2566 0.273985 17.6961L0.382714 17.5615L7.30134 9.99714L0.383092 2.43893C-0.0882694 1.92406 -0.124672 1.11374 0.273985 0.553232L0.382714 0.418625C0.853882 -0.0964584 1.59542 -0.136236 2.10835 0.299398L2.23153 0.418213L11 9.99608L2.23191 19.5814C1.72148 20.1394 0.893733 20.1396 0.383092 19.5818Z" fill="white"/>\n </svg>\n <span>Episodes<span></div> <div id="episode-container" class="episode-container"> </div></div>\n </div>');null!=e&&e.firstChild;)e.removeChild(e.firstChild);for(var s=p.parseHtmlString(t);null!=s&&s.firstChild;)e.appendChild(s.firstChild)}exports.customSeasonList=y,exports.handleSeasonChange=function(e,i,t,s){var n=document.getElementById("season-list"),r=document.getElementById("episode-list"),a=document.getElementById("episode-container");e.id;for(var o=e.episodes.map(function(e,i){return'\n <div id="episode-wrapper" class="episode-wrapper">\n <div class="episode-title" id="episode-title">\n <div class="details-wrapper">\n <div id="title-wrapper" class="title-wrapper">'.concat(i+1," ").concat(e.title,' </div>\n <div class="progress-bar-div">\n <div id="progress-div" class="progress-div"></div>\n </div>\n </div>\n <div class="meta-details">\n <div class="episode-image lazy" style="width:124px; height: 70px;">\n <img src=').concat(e.gist.videoImageUrl,' alt="').concat(e.title,'\'s cover"></img>\n </div>\n <div class="description-wrapper">').concat(e.gist.description,"</div>\n </div>\n </div>\n </div>")}).join("");null!=a&&a.firstChild;)a.removeChild(a.firstChild);for(var l=p.parseHtmlString(o);null!=l&&l.firstChild;)a.appendChild(l.firstChild);!function(e){d.getSeriesWatchHistory(e).then(function(e){var i=e.data,t=document.querySelectorAll("#progress-div");t&&i.map(function(e,i){e&&e.watchedPercentage&&t[i]&&(t[i].style.width=e.watchedPercentage+"px")})}).catch(function(e){})}(s),n.classList.toggle("hide-container"),r.classList.toggle("hide-container");var c=document.querySelectorAll(".details-wrapper"),u=document.querySelectorAll("#episode-title"),v=document.querySelectorAll(".meta-details"),h=document.querySelector("#episodes-back-btn"),f=e.id,m=e.episodes;h.addEventListener("click",function(){return function(e,i){e.classList.remove("hide-container"),i.classList.add("hide-container")}(n,r)});for(var g=function(i){c[i].addEventListener("click",function(){return function(e,i,t){var s=i.querySelector(".meta-details");i.classList.toggle("episode-active"),s.classList.toggle("metadetails-active"),t.forEach(function(i,s){s!==e&&(t[s].classList.remove("episode-active"),t[s].querySelector(".meta-details").classList.remove("metadetails-active"))})}(i,u[i],u)}),v[i].addEventListener("click",function(){return function(e,i,t,s){return b.apply(this,arguments)}(i,m[i].id,t,u)}),e.episodes[i].id==f&&u[i].classList.add("highlight-active-eps")},y=0;y<c.length;y++)g(y)},exports.seriesModule=g;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0ea2e662.js"),d=require("./generic-ac6915a3.js"),c=require("./skin-f87e1c22.js"),u=require("./autoNextVideo-630079de.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("./util-e1bc715c.js");var p=l.getComponent("Component"),m=function(){i(f,p);var m,h,g=(m=f,h=v(),function(){var e,t=r(m);if(h){var n=r(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function f(n){var i,o,r,l,a,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,f),(c=g.call(this,n,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(i=v.sres)||void 0===i?void 0:i.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(o=v.series)||void 0===o?void 0:o.cb,c.autoPlayNext=(null==v||null===(r=v.series)||void 0===r?void 0:r.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(l=s(c))&&void 0!==l&&l.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var p,m,h,C,y=null==v||null===(p=v.sres)||void 0===p?void 0:p.seasons,b=[];y.map(function(t){b.push.apply(b,e(t.episodes))}),d.createIdxMapping(b),d.setVideoIdxById(null===(m=c.options_)||void 0===m||null===(h=m.res)||void 0===h||null===(C=h.video)||void 0===C?void 0:C.id),u.autoPlayNext({playerId:c.playerId,content:b,cb:c.cb,series:null==v?void 0:v.sres})}return c}return n(f,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-e037e14e.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,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=c.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),d=this.createSeasonLister();l.dom.appendContent(r,d),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),c.getPlayer(this.playerId).on("fullscreenchange",function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map(function(e){var t,n,i,o,r;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===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}});for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then(function(e){null!=s&&s.cb&&s.cb(e)}).catch(function(e){null!=s&&s.cb&&s.cb(e)})},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=c.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),f}();exports.default=m;
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),s=require("@babel/runtime/helpers/assertThisInitialized"),i=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),r=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0ea2e662.js"),d=require("./generic-21c8c7ea.js"),c=require("./skin-f87e1c22.js"),u=require("./autoNextVideo-4e20ba6a.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("./util-e1bc715c.js");var p=l.getComponent("Component"),m=function(){i(f,p);var m,h,g=(m=f,h=v(),function(){var e,t=r(m);if(h){var n=r(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function f(n){var i,o,r,l,a,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,f),(c=g.call(this,n,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(i=v.sres)||void 0===i?void 0:i.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(o=v.series)||void 0===o?void 0:o.cb,c.autoPlayNext=(null==v||null===(r=v.series)||void 0===r?void 0:r.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(l=s(c))&&void 0!==l&&l.autoPlayNext&&null!=v&&null!==(a=v.series)&&void 0!==a&&a.enable){var p,m,h,C,y=null==v||null===(p=v.sres)||void 0===p?void 0:p.seasons,b=[];y.map(function(t){b.push.apply(b,e(t.episodes))}),d.createIdxMapping(b),d.setVideoIdxById(null===(m=c.options_)||void 0===m||null===(h=m.res)||void 0===h||null===(C=h.video)||void 0===C?void 0:C.id),u.autoPlayNext({playerId:c.playerId,content:b,cb:c.cb,series:null==v?void 0:v.sres})}return c}return n(f,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-e037e14e.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,n=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(c.closeOpenDrawers(),e.classList.remove("hidden"),n.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"series-selection-container hidden"});l.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(n)};var s=document.getElementById(this.playerId);if(s){var i=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);n.style.height="".concat(i,"px"),l.dom.appendContent(t,n),s.style.overflow="hidden",this.addFunctionality(n)}}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),s=l.dom.createEl("div",{className:"series-selector-head"}),i=l.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){if("series-selector-cross-icon"===i.className)e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===i.className){var s=l.dom.$(".series-selector-content",t.el());for(l.dom.$(".series-selector-cross-icon",t.el()),i.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var o=t.createSeasonLister();for(l.dom.appendContent(s,o),l.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=i&&i.firstChild;)i.removeChild(i.firstChild);var r=c.parseSvgString(a.crossIconSvg());i.appendChild(r)}};var o=l.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),r=l.dom.createEl("div",{className:"series-selector-content"}),d=this.createSeasonLister();l.dom.appendContent(r,d),l.dom.appendContent(s,i),l.dom.appendContent(s,o),l.dom.appendContent(e,s),l.dom.appendContent(e,r),c.getPlayer(this.playerId).on("fullscreenchange",function(){var n=document.getElementById(t.playerId);if(n){var s=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),n=l.dom.createEl("div",{className:"season-container"}),s=function(s){var i,o=document.createElement("label");o.className="season-holder",o.setAttribute("for","season-".concat(s));var r=document.createElement("div");r.className="season - ".concat(s),r.textContent=null===(i=t[s])||void 0===i?void 0:i.title;var a=l.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});a.setAttribute("type","radio"),e.selectedSeason==s&&(a.checked=!0),a.onclick=function(t){d.seasonIdxManager.set(s),e.showSeasonDetails(s)},l.dom.appendContent(o,a),l.dom.appendContent(o,r),l.dom.appendContent(n,o)},i=0;i<t.length;i++)s(i);return n}},{key:"getSeasonDetailsContainer",value:function(t,n){var s=this;t=t.map(function(e){var t,n,i,o,r;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===(n=e.gist)||void 0===n||null===(i=n.imageGist)||void 0===i?void 0:i.r16x9,watchedPercentage:(null==s||null===(o=s.watchMap)||void 0===o||null===(r=o.get(null==e?void 0:e.id))||void 0===r?void 0:r.p)||0}});for(var i=function(i){var o,r,a,c,u,v,p,m=l.dom.createEl("div",{className:"series-container"}),h=l.dom.createEl("div",{className:"series-section",index:i}),g=l.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(o=t[i])||void 0===o?void 0:o.title)||"")}),f=l.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[i].watchedPercentage,"%' class='series-progress-bar-value'></div>")});l.dom.appendContent(h,g),l.dom.appendContent(h,f),l.dom.appendContent(m,h),l.dom.appendContent(n,m);var C=l.dom.createEl("div",{className:"series-section-expanded hidden"}),y=(null===(r=t[i])||void 0===r?void 0:r.description)||"";(null===(a=y)||void 0===a?void 0:a.length)>170&&(y=y.substr(0,170)+"...");var b=l.dom.createEl("div",{className:"series-description",innerHTML:"".concat(y||"")}),S=l.dom.createEl("img",{className:"series-image"});S.src="".concat((null===(c=t[i])||void 0===c?void 0:c.img)||(null===(u=window)||void 0===u||null===(v=u.customData)||void 0===v?void 0:v.fallbackImage)),S.alt="".concat(null===(p=t[i])||void 0===p?void 0:p.title),l.dom.appendContent(C,S),l.dom.appendContent(C,b),l.dom.appendContent(m,C),l.dom.appendContent(n,m),C.onclick=function(e){var n;e.stopPropagation(),d.setVideoIdxById(null===(n=t[i])||void 0===n?void 0:n.id),d.load(s.playerId,t[i].id).then(function(e){null!=s&&s.cb&&s.cb(e)}).catch(function(e){null!=s&&s.cb&&s.cb(e)})},h.onclick=function(t){var n,s,i,o=document.getElementsByClassName("series-selector-content")[0].childNodes,r=(o=e(o))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=r&&null!==(n=r.classList)&&void 0!==n&&n.contains("hidden")?(m.style.backgroundColor="#0000007d",null==r||null===(s=r.classList)||void 0===s||s.remove("hidden")):(null==r||null===(i=r.classList)||void 0===i||i.add("hidden"),m.style.backgroundColor="unset")}},o=0;o<t.length;o++)i(o);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=l.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var n=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(n,t);var s=l.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=c.parseSvgString(a.BackIcon());s.appendChild(i),l.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),f}();exports.default=m;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),r=require("./icons-0ea2e662.js"),d=require("./generic-ac6915a3.js"),c=require("./skin-f87e1c22.js"),u=require("./autoNextVideo-630079de.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("./util-e1bc715c.js");var m=a.getComponent("Component"),p=function(){o(g,m);var p,h,y=(p=g,h=v(),function(){var e,t=l(p);if(h){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function g(s){var o,i,l,a,r,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,g),(c=y.call(this,s,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(o=v.sres)||void 0===o?void 0:o.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==v||null===(l=v.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(a=n(c))&&void 0!==a&&a.autoPlayNext&&null!=v&&null!==(r=v.series)&&void 0!==r&&r.enable){var m,p,h,C,b=null==v||null===(m=v.sres)||void 0===m?void 0:m.seasons,f=[];b.map(function(t){f.push.apply(f,e(t.episodes))}),d.createIdxMapping(f),d.setVideoIdxById(null===(p=c.options_)||void 0===p||null===(h=p.res)||void 0===h||null===(C=h.video)||void 0===C?void 0:C.id),u.autoPlayNext({playerId:c.playerId,content:f,cb:c.cb,series:null==v?void 0:v.sres})}return c}return s(g,[{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.PlaylistIcon())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-2105fd89.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")?(c.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),c.setUpdatedElHeight(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 n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),a.dom.appendContent(t,s),n.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 n=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=this.createSeasonLister();for(a.dom.appendContent(n,o),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=c.parseSvgString(r.crossIconSvg());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),o=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(r.crossIconSvg()),tabIndex:-1});o.onclick=function(){t.handleSeriesCloseIcon(o,e,s)},o.onkeydown=function(n){"Enter"===n.key&&t.handleSeriesCloseIcon(o,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}),d=a.dom.createEl("div",{className:"series-selector-content"}),u=this.createSeasonLister();a.dom.appendContent(n,l),a.dom.appendContent(d,u),a.dom.appendContent(n,o),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),c.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),s=a.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i,l,r,c=document.createElement("label");c.className="season-holder",c.ariaLabel=null===(o=t[n])||void 0===o?void 0:o.title,c.role="button",c.type="button",c.setAttribute("aria-LabelledBy",null===(i=t[n])||void 0===i?void 0:i.title),c.setAttribute("for","season-".concat(n));var u=document.createElement("div");u.className="season - ".concat(n),u.textContent=null===(l=t[n])||void 0===l?void 0:l.title,u.id=null===(r=t[n])||void 0===r?void 0:r.title;var v=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});v.setAttribute("type","radio"),e.selectedSeason==n&&(v.checked=!0),v.onclick=function(t){d.seasonIdxManager.set(n),e.showSeasonDetails(n)},c.onkeydown=function(t){"Enter"===t.key&&(d.seasonIdxManager.set(n),e.showSeasonDetails(n))},a.dom.appendContent(c,v),a.dom.appendContent(c,u),a.dom.appendContent(s,c)},o=0;o<t.length;o++)n(o);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,n=this;d.setVideoIdxById(null===(s=e[t])||void 0===s?void 0:s.id),d.load(this.playerId,e[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map(function(e){var t,s,o,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===(o=s.imageGist)||void 0===o?void 0:o.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==n||null===(d=n.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var o=function(o){var i,l,r,d,u,v=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:o,innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[o])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=a.dom.createEl("div",{className:"series-section-image"}),h=(null===(r=t[o])||void 0===r?void 0:r.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var y=a.dom.createEl("img",{className:"series-image"});y.src="".concat(c.impolicy16x9(null===(u=t[o])||void 0===u?void 0:u.img)),y.alt="Episode ".concat(o+1),a.dom.appendContent(p,y),a.dom.appendContent(v,p),a.dom.appendContent(v,m),a.dom.appendContent(s,v),v.onclick=function(e){e.stopPropagation(),n.loadSeriesAssetById(t,o)},v.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),n.loadSeriesAssetById(t,o))},m.onclick=function(t){var s,n,o,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")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(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=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=c.parseSvgString(r.BackIcon());n.appendChild(o),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),g}();exports.default=p;
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),s=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/assertThisInitialized"),o=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),r=require("./icons-0ea2e662.js"),d=require("./generic-21c8c7ea.js"),c=require("./skin-f87e1c22.js"),u=require("./autoNextVideo-4e20ba6a.js");function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("./util-e1bc715c.js");var m=a.getComponent("Component"),p=function(){o(g,m);var p,h,y=(p=g,h=v(),function(){var e,t=l(p);if(h){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function g(s){var o,i,l,a,r,c,v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,g),(c=y.call(this,s,v)).playerId=v.playerId,c.seriesData=v.sres,c.videos=null==v||null===(o=v.sres)||void 0===o?void 0:o.seasons,c.currentVideoData=v.res,c.initialiseStructure(),c.loadCSS(),c.selectedSeason=0,c.cb=null==v||null===(i=v.series)||void 0===i?void 0:i.cb,c.autoPlayNext=(null==v||null===(l=v.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),c.watchMap=d.getSeriesWatchMap(),null!==(a=n(c))&&void 0!==a&&a.autoPlayNext&&null!=v&&null!==(r=v.series)&&void 0!==r&&r.enable){var m,p,h,C,b=null==v||null===(m=v.sres)||void 0===m?void 0:m.seasons,f=[];b.map(function(t){f.push.apply(f,e(t.episodes))}),d.createIdxMapping(f),d.setVideoIdxById(null===(p=c.options_)||void 0===p||null===(h=p.res)||void 0===h||null===(C=h.video)||void 0===C?void 0:C.id),u.autoPlayNext({playerId:c.playerId,content:f,cb:c.cb,series:null==v?void 0:v.sres})}return c}return s(g,[{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.PlaylistIcon())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./series-v2-2105fd89.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")?(c.closeOpenDrawers(),e.classList.remove("hidden"),s.classList.add("open"),c.setUpdatedElHeight(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 n=document.getElementById(this.playerId);if(n){var o=window.getComputedStyle(n,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(o,"px"),a.dom.appendContent(t,s),n.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 n=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=this.createSeasonLister();for(a.dom.appendContent(n,o),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=c.parseSvgString(r.crossIconSvg());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),n=a.dom.createEl("div",{className:"series-selector-head"}),o=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(r.crossIconSvg()),tabIndex:-1});o.onclick=function(){t.handleSeriesCloseIcon(o,e,s)},o.onkeydown=function(n){"Enter"===n.key&&t.handleSeriesCloseIcon(o,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}),d=a.dom.createEl("div",{className:"series-selector-content"}),u=this.createSeasonLister();a.dom.appendContent(n,l),a.dom.appendContent(d,u),a.dom.appendContent(n,o),a.dom.appendContent(n,i),a.dom.appendContent(e,n),a.dom.appendContent(e,d),c.handleDrawerResizing(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;c.getPlayer(this.playerId);for(var t=d.getCurrentSeries(),s=a.dom.createEl("div",{className:"season-container"}),n=function(n){var o,i,l,r,c=document.createElement("label");c.className="season-holder",c.ariaLabel=null===(o=t[n])||void 0===o?void 0:o.title,c.role="button",c.type="button",c.setAttribute("aria-LabelledBy",null===(i=t[n])||void 0===i?void 0:i.title),c.setAttribute("for","season-".concat(n));var u=document.createElement("div");u.className="season - ".concat(n),u.textContent=null===(l=t[n])||void 0===l?void 0:l.title,u.id=null===(r=t[n])||void 0===r?void 0:r.title;var v=a.dom.createEl("input",{className:"radio - ".concat(n),id:"season-".concat(n),name:"season-radio"});v.setAttribute("type","radio"),e.selectedSeason==n&&(v.checked=!0),v.onclick=function(t){d.seasonIdxManager.set(n),e.showSeasonDetails(n)},c.onkeydown=function(t){"Enter"===t.key&&(d.seasonIdxManager.set(n),e.showSeasonDetails(n))},a.dom.appendContent(c,v),a.dom.appendContent(c,u),a.dom.appendContent(s,c)},o=0;o<t.length;o++)n(o);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,n=this;d.setVideoIdxById(null===(s=e[t])||void 0===s?void 0:s.id),d.load(this.playerId,e[t].id).then(function(e){null!=n&&n.cb&&n.cb(e)}).catch(function(e){null!=n&&n.cb&&n.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var n=this;t=t.map(function(e){var t,s,o,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===(o=s.imageGist)||void 0===o?void 0:o.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==n||null===(d=n.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var o=function(o){var i,l,r,d,u,v=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:o,innerHTML:"".concat((null===(i=t[o])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[o])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[o].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var p=a.dom.createEl("div",{className:"series-section-image"}),h=(null===(r=t[o])||void 0===r?void 0:r.description)||"";(null===(d=h)||void 0===d?void 0:d.length)>170&&(h=h.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(h||"")});var y=a.dom.createEl("img",{className:"series-image"});y.src="".concat(c.impolicy16x9(null===(u=t[o])||void 0===u?void 0:u.img)),y.alt="Episode ".concat(o+1),a.dom.appendContent(p,y),a.dom.appendContent(v,p),a.dom.appendContent(v,m),a.dom.appendContent(s,v),v.onclick=function(e){e.stopPropagation(),n.loadSeriesAssetById(t,o)},v.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),n.loadSeriesAssetById(t,o))},m.onclick=function(t){var s,n,o,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")?(v.style.backgroundColor="#0000007d",null==l||null===(n=l.classList)||void 0===n||n.remove("hidden")):(null==l||null===(o=l.classList)||void 0===o||o.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)o(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=d.getCurrentSeries()[e].episodes;this.getSeasonDetailsContainer(s,t);var n=a.dom.$(".series-selector-cross-icon",this.el());for(n.className="series-selector-back-icon";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var o=c.parseSvgString(r.BackIcon());n.appendChild(o),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),g}();exports.default=p;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),r=require("./icons-0ea2e662.js"),d=require("./skin-f87e1c22.js"),s=require("./renditions-7fe52e97.js"),c=require("./resolution-0a6680be.js"),u=require("./localisation-56e0a999.js");function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/defineProperty"),require("./browser-38ff3331.js");var h=l.getComponent("Component"),v=function(){a(y,h);var v,m,g=(v=y,m=p(),function(){var e,t=o(v);if(m){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function y(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(n=g.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n.resolutionBitrateMap,n}return n(y,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach(function(e){var n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(n){var a=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(n,a||1/0))}})}},{key:"isEnhancedBitrate",value:function(e){var t,n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),a=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!n||!a)&&n>a}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(r.SettingsSvgV2())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./settings-icon-8d364c01.js")}).then(function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"selection-container hidden"});l.dom.$(".settings-selector-icon",this.el()).onclick=function(){var a;null!==(a=n.classList)&&void 0!==a&&a.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var a=document.getElementById(this.playerId);if(a){var i=window.getComputedStyle(a,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),a.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=l.dom.createEl("div",{className:"settings-selector-head"}),a=l.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=l.dom.createEl("div",{className:"settings-selector-title",innerHTML:u.getLocalisation("settingsTitle")||"Settings"}),o=l.dom.createEl("div",{className:"settings-selector-content"}),s=l.dom.createEl("div",{className:"settings-container"}),c=this.createVideoQualityContainer();l.dom.appendContent(s,c);var p=this.createAudioQualityContainer();l.dom.appendContent(s,p),l.dom.appendContent(n,a),l.dom.appendContent(n,i),l.dom.appendContent(e,n),l.dom.appendContent(e,o),l.dom.appendContent(o,s),d.handleDrawerResizing(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=d.getPlayer(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=l.dom.createEl("div",{className:"audio-language-container"}),a=l.dom.createEl("div",{className:"audio-language-container-title",innerHTML:u.getLocalisation("audioLanguageText")||"Audio Language"});l.dom.appendContent(n,a);for(var i=function(e){var a,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(a=t[e])||void 0===a?void 0:a.label;var r=l.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});r.setAttribute("type","radio"),1==t[e].enabled&&(r.checked=!0),r.onchange=function(n){t.map(function(e){e.enabled=!1}),t[e].enabled=!0},l.dom.appendContent(i,r),l.dom.appendContent(i,o),l.dom.appendContent(n,i)},o=0;o<t.length;o++)i(o);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=l.dom.createEl("div",{className:"video-quality-container"}),a=l.dom.createEl("div",{className:"video-quality-container-title",innerHTML:u.getLocalisation("videoQualityText")||"Video Quality"});l.dom.appendContent(n,a);var i=[].concat(e(s.getRenditions(this.playerId)),[{height:"Auto"}]).sort(function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)});this.fillResolutionBitrateMap(i),c.playSelectedResolution(this.playerId,"raw",!0);for(var o=function(e){var a,o,s,p=document.createElement("label"),h=document.createElement("div"),v=document.createElement("div");v.className="video-quality-bitrate-label",h.className="video-quality-holder",p.className="video-quality-label-container",p.setAttribute("for","quality".concat(e));var m=document.createElement("div");m.className="video-quality - ".concat(e);var g=(null==i||null===(a=i[e])||void 0===a?void 0:a.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),y=document.createTextNode(g),f="".concat(t.isEnhancedBitrate(i[e])?u.getLocalisation("enhancedBitrateLabel")||"Enhanced Bitrate":""),C=document.createTextNode(f);if(v.appendChild(C),m.appendChild(y),(null==i||null===(s=i[e])||void 0===s?void 0:s.height)>=720)for(var b=d.parseHtmlString("<span class='hd-rendition'> HD </span>");null!=b&&b.firstChild;)m.appendChild(b.firstChild);var E=l.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});E.setAttribute("type","radio"),E.onchange=function(n){var a=i[e];"true"=="".concat("Auto"==i[e].height)?c.playSelectedResolution(t.playerId,a,!0):c.playSelectedResolution(t.playerId,a)};var q=document.createElement("span");q.className=f?"check-mark center":"check-mark";var N=d.parseSvgString(r.TickMarkIcon());q.appendChild(N),h.appendChild(E),h.appendChild(q),h.appendChild(m),l.dom.appendContent(p,h),p.appendChild(v),l.dom.appendContent(n,p)},p=0;p<i.length;p++)o(p);return n}}]),y}();exports.default=v;
1
+ "use strict";var e=require("@babel/runtime/helpers/toConsumableArray"),t=require("@babel/runtime/helpers/classCallCheck"),n=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),r=require("./icons-0ea2e662.js"),d=require("./skin-f87e1c22.js"),s=require("./renditions-b94006c7.js"),c=require("./resolution-0a6680be.js"),u=require("./localisation-56e0a999.js");function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(p=function(){return!!e})()}require("@babel/runtime/helpers/assertThisInitialized"),require("@babel/runtime/helpers/defineProperty"),require("./browser-38ff3331.js");var h=l.getComponent("Component"),v=function(){a(y,h);var v,m,g=(v=y,m=p(),function(){var e,t=o(v);if(m){var n=o(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return i(this,e)});function y(e){var n,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(n=g.call(this,e,a)).playerId=a.playerId,n.seriesData=a.sres,n.currentVideoData=a.res,n.initialiseStructure(),n.loadCSS(),n.resolutionBitrateMap,n}return n(y,[{key:"fillResolutionBitrateMap",value:function(e){var t=this;this.resolutionBitrateMap=new Map,e.forEach(function(e){var n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate);if(n){var a=null==t?void 0:t.resolutionBitrateMap.get(null==e?void 0:e.height);t.resolutionBitrateMap.set(null==e?void 0:e.height,Math.min(n,a||1/0))}})}},{key:"isEnhancedBitrate",value:function(e){var t,n=(null==e?void 0:e.bandwidth)||(null==e?void 0:e.bitrate),a=null==this||null===(t=this.resolutionBitrateMap)||void 0===t?void 0:t.get(null==e?void 0:e.height);return!(!n||!a)&&n>a}},{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"settings-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"settings-selector-icon",innerHTML:"".concat(r.SettingsSvgV2())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./settings-icon-8d364c01.js")}).then(function(e){var t=document.createElement("style");t.id="video-captions",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"selection-container hidden"});l.dom.$(".settings-selector-icon",this.el()).onclick=function(){var a;null!==(a=n.classList)&&void 0!==a&&a.contains("hidden")?(d.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),n.style.right="0px",d.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"),n.style.right="-350px")};var a=document.getElementById(this.playerId);if(a){var i=window.getComputedStyle(a,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),a.style.overflow="hidden",this.addFunctionality(n),d.detectOrientationChange(this.playerId,n)}}},{key:"addFunctionality",value:function(e){var t=this.el(),n=l.dom.createEl("div",{className:"settings-selector-head"}),a=l.dom.createEl("div",{className:"settings-selector-cross-icon",innerHTML:"".concat(r.crossIconSvg())});a.onclick=function(){e.classList.add("hidden"),t.classList.remove("open"),e.style.right="-350px"};var i=l.dom.createEl("div",{className:"settings-selector-title",innerHTML:u.getLocalisation("settingsTitle")||"Settings"}),o=l.dom.createEl("div",{className:"settings-selector-content"}),s=l.dom.createEl("div",{className:"settings-container"}),c=this.createVideoQualityContainer();l.dom.appendContent(s,c);var p=this.createAudioQualityContainer();l.dom.appendContent(s,p),l.dom.appendContent(n,a),l.dom.appendContent(n,i),l.dom.appendContent(e,n),l.dom.appendContent(e,o),l.dom.appendContent(o,s),d.handleDrawerResizing(this.playerId,e)}},{key:"createAudioQualityContainer",value:function(){var e=d.getPlayer(this.playerId),t=null==e?void 0:e.audioTracks().tracks_;if(!((null==t?void 0:t.length)<=1)){var n=l.dom.createEl("div",{className:"audio-language-container"}),a=l.dom.createEl("div",{className:"audio-language-container-title",innerHTML:u.getLocalisation("audioLanguageText")||"Audio Language"});l.dom.appendContent(n,a);for(var i=function(e){var a,i=document.createElement("label");i.className="audio-language-holder",i.setAttribute("for","language-radio-".concat(e));var o=document.createElement("div");o.className="audio - ".concat(e),o.textContent=null==t||null===(a=t[e])||void 0===a?void 0:a.label;var r=l.dom.createEl("input",{className:"radio - ".concat(e),id:"language-radio-".concat(e),name:"audio-language-radio"});r.setAttribute("type","radio"),1==t[e].enabled&&(r.checked=!0),r.onchange=function(n){t.map(function(e){e.enabled=!1}),t[e].enabled=!0},l.dom.appendContent(i,r),l.dom.appendContent(i,o),l.dom.appendContent(n,i)},o=0;o<t.length;o++)i(o);return n}}},{key:"createVideoQualityContainer",value:function(){var t=this,n=l.dom.createEl("div",{className:"video-quality-container"}),a=l.dom.createEl("div",{className:"video-quality-container-title",innerHTML:u.getLocalisation("videoQualityText")||"Video Quality"});l.dom.appendContent(n,a);var i=[].concat(e(s.getRenditions(this.playerId)),[{height:"Auto"}]).sort(function(e,t){return(null==t?void 0:t.qualityIndex)-(null==e?void 0:e.qualityIndex)});this.fillResolutionBitrateMap(i),c.playSelectedResolution(this.playerId,"raw",!0);for(var o=function(e){var a,o,s,p=document.createElement("label"),h=document.createElement("div"),v=document.createElement("div");v.className="video-quality-bitrate-label",h.className="video-quality-holder",p.className="video-quality-label-container",p.setAttribute("for","quality".concat(e));var m=document.createElement("div");m.className="video-quality - ".concat(e);var g=(null==i||null===(a=i[e])||void 0===a?void 0:a.height)+"".concat("Auto"==(null==i||null===(o=i[e])||void 0===o?void 0:o.height)?"":"p"),y=document.createTextNode(g),f="".concat(t.isEnhancedBitrate(i[e])?u.getLocalisation("enhancedBitrateLabel")||"Enhanced Bitrate":""),C=document.createTextNode(f);if(v.appendChild(C),m.appendChild(y),(null==i||null===(s=i[e])||void 0===s?void 0:s.height)>=720)for(var b=d.parseHtmlString("<span class='hd-rendition'> HD </span>");null!=b&&b.firstChild;)m.appendChild(b.firstChild);var E=l.dom.createEl("input",{className:"radio - ".concat(e," radio-btn"),id:"quality".concat(e),name:"quality-radio",rendata:"".concat(i[e]),checked:"".concat(e==i.length-1)});E.setAttribute("type","radio"),E.onchange=function(n){var a=i[e];"true"=="".concat("Auto"==i[e].height)?c.playSelectedResolution(t.playerId,a,!0):c.playSelectedResolution(t.playerId,a)};var q=document.createElement("span");q.className=f?"check-mark center":"check-mark";var N=d.parseSvgString(r.TickMarkIcon());q.appendChild(N),h.appendChild(E),h.appendChild(q),h.appendChild(m),l.dom.appendContent(p,h),p.appendChild(v),l.dom.appendContent(n,p)},p=0;p<i.length;p++)o(p);return n}}]),y}();exports.default=v;
@@ -1 +1 @@
1
- "use strict";var e=require("./features-0814a0a4.js"),r=require("./index-173955be.js"),i=require("./icons-0ea2e662.js"),n=require("./skin-f87e1c22.js"),t=require("./generic-ac6915a3.js");require("@babel/runtime/helpers/defineProperty"),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("video.js"),require("./renditions-7fe52e97.js"),require("./localisation-56e0a999.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("./util-e1bc715c.js"),require("./captions-bc814903.js"),require("./resolution-0a6680be.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./browser-38ff3331.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(s,l){n.getPlayer(s).addClass("skin_default"),r.initialiseKeyboardEvents(s,l),Promise.resolve().then(function(){return require("./skin-ba38afdb.js")}).then(function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)}),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(s,l),function(r,s){var l=n.getPlayer(r),o=(null==s?void 0:s.sres)||null;l.on("loadeddata",function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then(function(){return require("./nextEpisodeButton-aede1150.js")}).then(function(e){e.initaliseFunctionality(s.sres.seasons,t.getCurrentVideo())})}),l.one("loadedmetadata",function(){var i;o&&(e.addSeriesModule(r,null==s||null===(i=s.sres)||void 0===i?void 0:i.seasons,s),e.addNextEpisodeButton(s.sres,s.res,r))})}(s,l),function(e,r){var t,s,l,o,u=n.getPlayer(e),a=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(a&&(a.style.display="none"),d&&(d.style.display="none"),c&&(c.style.display="none"));null===(t=u.controlBar.getChild("FullscreenToggle"))||void 0===t||null===(s=t.el())||void 0===s||s.appendChild(n.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(l=u.controlBar.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var m=u.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(i.NewCaptionsSvg()));var p=document.createElement("div");p.classList.add("caption-header"),m.querySelector(".vjs-menu-content").insertBefore(p,m.querySelector(".vjs-menu-item"))}(s,l)};
1
+ "use strict";var e=require("./features-be45d7f9.js"),r=require("./index-7d1a271f.js"),i=require("./icons-0ea2e662.js"),n=require("./skin-f87e1c22.js"),t=require("./generic-21c8c7ea.js");require("@babel/runtime/helpers/defineProperty"),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("video.js"),require("./renditions-b94006c7.js"),require("./localisation-56e0a999.js"),require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("./util-e1bc715c.js"),require("./captions-bc814903.js"),require("./resolution-0a6680be.js"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized"),require("./browser-38ff3331.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),exports.initialiseSkin=function(s,l){n.getPlayer(s).addClass("skin_default"),r.initialiseKeyboardEvents(s,l),Promise.resolve().then(function(){return require("./skin-ba38afdb.js")}).then(function(e){var r=document.createElement("style");r.id="def_skin",r.append("".concat(e.default)),document.head.appendChild(r)}),function(r,n){0==n.liveVideo&&0==n.liveui&&e.addSkipButton(r,"default",i.SkipSvg());(0==n.liveVideo&&0==n.liveui||1==n.liveui)&&e.addRewindButton(r,"default",i.RewindSvg())}(s,l),function(r,s){var l=n.getPlayer(r),o=(null==s?void 0:s.sres)||null;l.on("loadeddata",function(){e.addResolutionModule(r,"default",i.SettingsSvg()),o&&Promise.resolve().then(function(){return require("./nextEpisodeButton-ebd37232.js")}).then(function(e){e.initaliseFunctionality(s.sres.seasons,t.getCurrentVideo())})}),l.one("loadedmetadata",function(){var i;o&&(e.addSeriesModule(r,null==s||null===(i=s.sres)||void 0===i?void 0:i.seasons,s),e.addNextEpisodeButton(s.sres,s.res,r))})}(s,l),function(e,r){var t,s,l,o,u=n.getPlayer(e),a=document.getElementsByClassName("vjs-current-time")[0],d=document.getElementsByClassName("vjs-duration")[0],c=document.getElementsByClassName("vjs-time-divider")[0];r.liveVideo&&(a&&(a.style.display="none"),d&&(d.style.display="none"),c&&(c.style.display="none"));null===(t=u.controlBar.getChild("FullscreenToggle"))||void 0===t||null===(s=t.el())||void 0===s||s.appendChild(n.createIconMarkup(i.MinimizeSvg(window.controlsColor))),null===(l=u.controlBar.getChild("FullscreenToggle"))||void 0===l||null===(o=l.el())||void 0===o||o.appendChild(n.createIconMarkup(i.MaximizeSvg(window.controlsColor)));var m=u.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(n.createIconMarkup(i.NewCaptionsSvg()));var p=document.createElement("div");p.classList.add("caption-header"),m.querySelector(".vjs-menu-content").insertBefore(p,m.querySelector(".vjs-menu-item"))}(s,l)};
@@ -1 +1 @@
1
- "use strict";var e=require("./generic-ac6915a3.js"),r=require("./skin-f87e1c22.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray");var i=function(i){var n=r.getPlayer(i),t=document.getElementById("".concat(i));t&&t.addEventListener("touchstart",function(){n.paused()?e.play(i):e.pause(i)})},n=function(e){var i=r.getPlayer(e);i.requestFullscreen=function(){},i.controlBar.hide()};exports.initaliseSkin=function(e){n(e),i(e)};
1
+ "use strict";var e=require("./generic-21c8c7ea.js"),r=require("./skin-f87e1c22.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray");var i=function(i){var n=r.getPlayer(i),t=document.getElementById("".concat(i));t&&t.addEventListener("touchstart",function(){n.paused()?e.play(i):e.pause(i)})},n=function(e){var i=r.getPlayer(e);i.requestFullscreen=function(){},i.controlBar.hide()};exports.initaliseSkin=function(e){n(e),i(e)};
@@ -1 +1 @@
1
- "use strict";var e=require("./skin-f87e1c22.js"),r=require("./features-0814a0a4.js"),i=require("./renditions-7fe52e97.js"),n=require("./captions-bc814903.js");require("@babel/runtime/helpers/toConsumableArray"),require("video.js"),require("@babel/runtime/helpers/defineProperty"),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("./generic-ac6915a3.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./localisation-56e0a999.js"),exports.initialiseSkin=function(t,s){Promise.resolve().then(function(){return require("./skin-fc1e7e52.js")}).then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(t,s){e.getPlayer(t).on("loadeddata",function(){var e;(null===(e=i.getRenditions(t))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(t,s),null!=s&&s.disableCaptions&&n.removeCaptions(t)})}(t,s),function(i){var n=e.getPlayer(i);n.controls(!1),r.addDBClickFullScreen(i)}(t)};
1
+ "use strict";var e=require("./skin-f87e1c22.js"),r=require("./features-be45d7f9.js"),i=require("./renditions-b94006c7.js"),n=require("./captions-bc814903.js");require("@babel/runtime/helpers/toConsumableArray"),require("video.js"),require("@babel/runtime/helpers/defineProperty"),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("./generic-21c8c7ea.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./localisation-56e0a999.js"),exports.initialiseSkin=function(t,s){Promise.resolve().then(function(){return require("./skin-fc1e7e52.js")}).then(function(e){var r=document.createElement("style");r.id="multiplayer_css",r.append("".concat(e.default)),document.head.appendChild(r)}),function(t,s){e.getPlayer(t).on("loadeddata",function(){var e;(null===(e=i.getRenditions(t))||void 0===e?void 0:e.length)>0&&r.addSettingsButtonV2(t,s),null!=s&&s.disableCaptions&&n.removeCaptions(t)})}(t,s),function(i){var n=e.getPlayer(i);n.controls(!1),r.addDBClickFullScreen(i)}(t)};
@@ -1 +1 @@
1
- "use strict";var e=require("./features-0814a0a4.js"),t=require("./skin-f87e1c22.js"),i=require("./index-467f3c17.js"),n=require("./browser-38ff3331.js"),o=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),u=require("video.js"),d=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/typeof"),v=require("./generic-ac6915a3.js"),p=require("./index-173955be.js");require("@babel/runtime/helpers/defineProperty"),require("./renditions-7fe52e97.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-630079de.js"),require("./util-e1bc715c.js"),require("./icons-0ea2e662.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("video.js/dist/video-js.min.css"),require("./resolution-0a6680be.js"),require("@babel/runtime/helpers/assertThisInitialized");var h=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},f=function(){function e(t){if(o(this,e),!t||"object"!==c(t))throw new Error("SettingsOptionOneWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.handleClick=t.callback||function(){},this.focused=t.focused||!1,"function"!=typeof this.handleClick)throw new Error("SettingsOptionOneWrapper: callback must be a function");this.handleClick=this.handleClick.bind(this)}return l(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionOneWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");n.textContent=this.title,i.appendChild(n);var o=document.createElement("p");o.textContent="›",o.style.fontSize="24px",i.appendChild(o),this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),i.addEventListener("keydown",function(e){"Enter"!==e.key&&"OK"!==e.key||t.handleClick()}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}]),e}(),m=function(){function e(t){if(o(this,e),!t||"object"!==c(t))throw new Error("SettingsOptionTwoWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.selected=t.selected||!1,this.focused=t.focused||!1,this.id=t.id,"string"!=typeof this.title)throw new Error("SettingsOptionTwoWrapper: title must be a string")}return l(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionTwoWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");if(n.textContent=this.title,i.appendChild(n),this.selected){i.classList.add("selected");var o=document.createElement("span");o.appendChild(h('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),i.appendChild(o)}this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}]),e}(),y=function(){function e(t){if(o(this,e),!t||"object"!==c(t))throw new Error("Sidebar: props must be a valid object");if(this.title=t.title||"Settings",this.items=t.items||[{text:"Video Quality",isSelected:!0,callback:function(){}},{text:"Audio Language",isSelected:!1,callback:function(){}},{text:"Subtitles",isSelected:!1,callback:function(){}}],this.klassname=t.klassname||"default-sidebar",this.currentFocusedOption=null,this.lastFocusedElement=t.lastFocusedElement||null,this.type=t.type||"navigation",this.focused=t.focused||!1,this.callback=t.callback||function(){},this.onselect=t.onselect||function(){},"function"!=typeof this.callback)throw new Error("Sidebar: callback must be a function");if(!["navigation","selection"].includes(this.type))throw new Error('Sidebar: type must be either "navigation" or "selection"')}return l(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("Sidebar: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname;var n=document.createElement("div");n.textContent=this.title,n.className="settingsHeading",i.appendChild(n);var o=document.createElement("div");"navigation"===this.type?this.items.forEach(function(e,i){var n=new f({title:e.text,klassname:"default-option-wrapper",focused:0===i,callback:e.callback});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}):"selection"===this.type&&this.items.forEach(function(e,i){var n=new m({title:e.text,klassname:"default-option-wrapper",focused:0===i,selected:e.isSelected,id:e.id});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}),i.appendChild(o),this.sidebarElement=i,e.appendChild(i),this.addEventListeners(),this.focus()}},{key:"addEventListeners",value:function(){var e=this;if(!this.sidebarElement)throw new Error("Sidebar: sidebarElement is not initialized");this.sidebarElement.addEventListener("keydown",function(t){"ArrowDown"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusNext()):"ArrowUp"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusPrevious()):"Backspace"===t.key||"Escape"===t.key||10009===t.keyCode||461===t.keyCode||196===t.keyCode||8===t.keyCode?(t.preventDefault(),t.stopPropagation(),e.unfocus(),e.unmount()):"Enter"!==t.key&&"OK"!==t.key||(t.preventDefault(),t.stopPropagation(),"selection"===e.type&&e.selectionTypeAction())})}},{key:"selectionTypeAction",value:function(){if(this.currentFocusedOption){this.items.forEach(function(e){if(e.instance){e.instance.optionWrapper.classList.remove("selected"),e.instance.selected=!1;var t=e.instance.optionWrapper.querySelector("span");t&&t.remove();var i=e.instance.optionWrapper.querySelector("svg");i&&i.remove()}}),this.currentFocusedOption.optionWrapper.classList.add("selected"),this.currentFocusedOption.selected=!0;this.currentFocusedOption.optionWrapper.appendChild(h('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),this.onselect(this.currentFocusedOption)}}},{key:"focusNext",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.nextElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focusPrevious",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.previousElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.focus()}},{key:"unfocus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.blur()}},{key:"unmount",value:function(){this.sidebarElement&&(this.sidebarElement.remove(),this.sidebarElement=void 0,this.lastFocusedElement&&(this.callback(),this.lastFocusedElement.focus()),this.currentFocusedOption=null)}}]),e}();function g(e,t){var i,n,o,l,r,a,s,u=[{text:"Video Quality",isSelected:!0,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l,r;if(!e)return;var a=null===(i=t.qualityLevels())||void 0===i?void 0:i.levels_,s=-1==(null===(n=t.qualityLevels())||void 0===n?void 0:n.selectedIndex_)?"auto":null===(o=t.qualityLevels())||void 0===o?void 0:o.levels_[null===(l=t.qualityLevels())||void 0===l?void 0:l.selectedIndex_].height,u=[{text:"Auto",id:"auto",isSelected:"auto"===s,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}].concat(d(a.map(function(t){return{text:"".concat(t.height,"p"),id:t.height,isSelected:s===t.height,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}})));r=new y({title:"Video Quality",items:u,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){if("auto"===e.id)t.el_.player.qualityLevels().selectedIndex_=-1;else{var i=a.findIndex(function(t){return t.height===e.id});-1!==i&&(t.el_.player.qualityLevels().selectedIndex_=i)}},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),r.mount(null==t?void 0:t.el())}(s,e)}}];null!=e&&null!==(i=e.audioTracks())&&void 0!==i&&i.tracks_&&(null==e||null===(n=e.audioTracks())||void 0===n||null===(o=n.tracks_)||void 0===o?void 0:o.length)>1&&u.push({text:"Audio Language",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l;if(!e)return;var r=null==t||null===(i=t.audioTracks())||void 0===i?void 0:i.tracks_,a=(null==r||null===(n=r.find(function(e){return e.enabled}))||void 0===n?void 0:n.label)||(null==r||null===(o=r[0])||void 0===o?void 0:o.label)||"Default",s=r.map(function(t){return{text:t.label,id:t.id,isSelected:a===t.label,callback:function(){e.currentFocusedOption.focus(),l.unmount()}}});l=new y({title:"Audio Language",items:s,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){null==r||r.forEach(function(t){t.enabled=!1,t.enabled=t.id===e.id})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),l.mount(null==t?void 0:t.el())}(s,e)}});var c=null==e||null===(l=e.textTracks())||void 0===l?void 0:l.tracks_;return(c=c.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))&&(null===(r=c)||void 0===r?void 0:r.length)>0&&u.push({text:"Subtitles",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o;if(!e)return;var l=t.textTracks().tracks_;l=l.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var r=(null===(i=l)||void 0===i||null===(n=i.find(function(e){return"showing"===e.mode}))||void 0===n?void 0:n.label)||"Captions Off",a=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===r,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}].concat(d(l.map(function(t){return{text:t.label,id:t.id,kind:t.kind,lang:t.language,mode:t.mode,isSelected:r===t.label,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}})));o=new y({title:"Closed Captions",items:a,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){var t;null===(t=l)||void 0===t||t.forEach(function(t){t.mode=t.id===e.id?"showing":"hidden"})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),o.mount(null==t?void 0:t.el())}(s,e)}}),(s=new y({title:"Settings",items:u,klassname:"default-sidebar",lastFocusedElement:t,type:"navigation",focused:!0,callback:function(){var i;null===(i=e.controlBar)||void 0===i||i.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){t.focus()},100)}})).mount(null==e?void 0:e.el()),null===(a=e.controlBar)||void 0===a||a.addClass("hidePlayerControls"),e.options({inactivityTimeout:0}),s}function k(e){var t=b();return function(){var i,n=s(e);if(t){var o=s(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return a(this,i)}}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var C=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_,a=r.querySelector(".vjs-icon-placeholder");r.querySelector(".vjs-control-text").textContent="CC",r.classList.add("vjs-ClosedCaption-button");return a.append(h('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path d="M92.7268 78.3757H81.5999V88.0906L57.4173 78.3757H9.27274V16.2273H92.7268V78.3757ZM17.6184 69.5027H57.3108L73.7991 74.6169L73.8001 69.5027H84.3821V25.2107H17.6184V69.5027Z" fill="currentColor"/>\n<rect x="20.8628" y="34.7727" width="39.4091" height="6.95455" fill="currentColor"/>\n<rect x="69.5446" y="34.7727" width="11.5909" height="6.95455" fill="currentColor"/>\n<rect x="44.0446" y="51" width="37.0909" height="9.27273" fill="currentColor"/>\n<rect x="20.8628" y="51" width="13.9091" height="9.27273" fill="currentColor"/>\n</svg>')),t}return l(n,[{key:"handleClick",value:function(){!function(e){var t,i,n,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.textTracks().tracks_,a=(null===(t=r=r.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))||void 0===t||null===(i=t.find(function(e){return"showing"===e.mode}))||void 0===i?void 0:i.label)||"Captions Off",s=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===a,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}].concat(d(r.map(function(e){return{text:e.label,id:e.id,kind:e.kind,lang:e.language,mode:e.mode,isSelected:a===e.label,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}})));(o=new y({title:"Closed Captions",items:s,klassname:"default-sidebar",lastFocusedElement:l,type:"selection",focused:!0,onselect:function(t){var i,n;null===(i=r)||void 0===i||i.forEach(function(e){e.mode=e.id===t.id?"showing":"hidden"}),o.unmount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)},callback:function(){var t;o.unmount(null==e?void 0:e.el()),null===(t=e.controlBar)||void 0===t||t.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)}})).mount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.addClass("hidePlayerControls"),e.options({inactivityTimeout:0})}(e,this)}}]),n}(u.getComponent("Button"));return u.registerComponent("CloseCaptionButton",t),new t(e,{})};var w=function(e){if(e)try{var t,i,n,o=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(n=i.entitlement)||void 0===n?void 0:n.deviceType)||"smart_tv_samsung";e&&(!function(e){try{var t;"smart_tv_samsung"==e&&null!==(t=window)&&void 0!==t&&t.tizen&&(window.tizen.tvinputdevice.registerKey("MediaPlayPause"),window.tizen.tvinputdevice.registerKey("MediaRewind"),window.tizen.tvinputdevice.registerKey("MediaFastForward"),window.tizen.tvinputdevice.registerKey("Exit"),window.tizen.tvinputdevice.registerKey("MediaPlay"),window.tizen.tvinputdevice.registerKey("MediaPause"),window.tizen.tvinputdevice.registerKey("MediaStop"))}catch(e){}}(o),e.on("keydown",function(t){10252==t.keyCode||"xfinityX1"==o&&179==t.keyCode?e.paused()?e.play():e.pause():415==t.keyCode?e.play():19==t.keyCode?e.pause():412===t.keyCode||"xfinityX1"==o&&227==t.keyCode?e.currentTime(e.currentTime()-10):(417===t.keyCode||"xfinityX1"==o&&228==t.keyCode)&&e.currentTime(e.currentTime()+10)}))}catch(e){}};exports.initialiseSkin=function(a,s){var d=t.getPlayer(a);d.addClass("skin_smartTV"),function(e,t){var i,n,a,s,d,c,v,p,f,m,y,b,C,L,S,E,x,q,T,O,B,F,_,j,W,D,M,P,V,A,I,z=null==e?void 0:e.el();z&&(z.style.color=(null==t||null===(i=t.theme)||void 0===i?void 0:i.color)||(null===(n=window)||void 0===n||null===(a=n.app_data)||void 0===a||null===(s=a.appcmsMain)||void 0===s||null===(d=s.brand)||void 0===d||null===(c=d.cta)||void 0===c||null===(v=c.primary)||void 0===v?void 0:v.backgroundColor)||"#FFFFFF");null===(p=e.controlBar)||void 0===p||p.removeChild("VolumePanel"),null===(f=e.controlBar)||void 0===f||f.removeChild("AudioTrackButton"),null===(m=e.controlBar)||void 0===m||m.removeChild("FullscreenToggle"),null===(y=e.controlBar)||void 0===y||y.removeChild("PictureInPictureToggle"),null===(b=e.controlBar)||void 0===b||b.removeChild("skipBackward"),null===(C=e.controlBar)||void 0===C||C.removeChild("skipForward"),null===(L=e.controlBar)||void 0===L||L.removeChild("PictureInPictureToggle");var H=document.createElement("div");H.className="custom-smartTV-progress-bar",null===(S=e.controlBar)||void 0===S||null===(E=S.el())||void 0===E||E.append(H);var R=null===(x=e.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");try{H.style.opacity=0,R.el_.style.opacity=0}catch(e){}var G=null===(q=e.controlBar)||void 0===q?void 0:q.getChild("ProgressControl"),K=null===(T=e.controlBar)||void 0===T?void 0:T.getChild("CurrentTimeDisplay"),N=null===(O=e.controlBar)||void 0===O?void 0:O.getChild("SeekToLive");N&&(N.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live");var Z=null===(B=e.controlBar)||void 0===B?void 0:B.getChild("LiveDisplay"),Q=null===(F=e.controlBar)||void 0===F?void 0:F.getChild("RemainingTimeDisplay");G&&K&&N&&H.append(K.el(),G.el(),Q.el(),null==Z?void 0:Z.el());null==R||R.addChild(N);var U=e.getChild("TitleBar");null==R||R.addChild(U);var X=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_;return r.querySelector(".vjs-control-text").textContent="Start From Beginning",r.classList.add("vjs-startFromBeginning-button"),t}return l(n,[{key:"handleClick",value:function(){(null==e?void 0:e.currentTime())>0&&e.currentTime(0)}}]),n}(u.getComponent("Button"));return u.registerComponent("StartFromBeginning",t),new t(e,{})}(e);null==R||R.addChild(X);var J,Y,$,ee=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_,a=r.querySelector(".vjs-icon-placeholder");return r.querySelector(".vjs-control-text").textContent="Settings",r.classList.add("vjs-Settings-button"),a.append(h('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M90.913 45.8867V56.1132L80.0959 58.1496C79.4266 61.1027 78.2623 63.9214 76.6523 66.4864L82.8603 75.597L75.586 82.8192L66.5158 76.664C63.9394 78.2538 61.1222 79.4156 58.1737 80.1041L56.1361 90.913H45.8542L43.8193 80.1041C40.8708 79.4158 38.0535 78.2541 35.4773 76.664L26.4071 82.8192L19.1313 75.597L25.2918 66.4864C23.7008 63.9116 22.5379 61.0962 21.8482 58.1496L11.087 56.1132V45.8867L21.8482 43.8028C22.5428 40.8493 23.7235 38.0315 25.3421 35.4646L19.1327 26.4016L26.4085 19.1807L35.4787 25.3359C38.045 23.7263 40.8656 22.5627 43.8207 21.8945L45.8556 11.0869H56.1375L58.1751 21.8945C61.1301 22.5631 63.9506 23.7267 66.5172 25.3359L75.5874 19.1807L82.8617 26.4016L76.6537 35.5135C78.2633 38.0617 79.4277 40.8647 80.0973 43.8028L90.913 45.8867ZM28.9308 51.0214C28.9434 63.1872 38.8221 73.0394 50.9956 73.0271C56.8418 73.0212 62.4462 70.6944 66.5758 66.5588C70.7054 62.4232 73.0219 56.8174 73.0156 50.9748C73.0025 38.809 63.1234 28.9572 50.9499 28.9701C38.7764 28.983 28.9182 38.8556 28.9308 51.0214Z" fill="currentColor"/>\n</svg>')),t}return l(n,[{key:"handleClick",value:function(){g(e,this)}}]),n}(u.getComponent("Button"));return u.registerComponent("SettingsButton",t),new t(e,{})}(e);if(null==R||R.addChild(ee),!(null!=t&&null!==(_=t.res)&&void 0!==_&&null!==(j=_.video)&&void 0!==j&&null!==(W=j.streamingInfo)&&void 0!==W&&W.isLiveStream)||null!=t&&null!==(D=t.res)&&void 0!==D&&null!==(M=D.video)&&void 0!==M&&null!==(P=M.liveDetails)&&void 0!==P&&P.isDvrEnabled){var te,ie,ne=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_,a=r.querySelector(".vjs-icon-placeholder");return r.querySelector(".vjs-control-text").textContent="Forward",r.classList.add("vjs-forward-button"),a.append(h('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M461.37 551.05a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67t-12.02 3.59zm109.47-75.65a33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85 33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83zm-1.5 66.6q-4.43 8.19-13.15 8.19c-5.91 0-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.83-4.43 22.32z"></path><path d="M687.85 490l-25.1 5a153.7 153.7 0 1 1-301.6.77c15.68-80.78 92.29-134.47 173-122.56L528.5 389l66.74-8-46.45-48.58-5.79 16.24C447 331.88 354.66 395 336 490.9a179.29 179.29 0 0 0 141.77 210.2 182.22 182.22 0 0 0 34.61 3.35A179.4 179.4 0 0 0 687.85 490z"></path></g></svg>')),t}return l(n,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t>=0){var i=t+30;e.currentTime(i)}}}]),n}(u.getComponent("Button"));return u.registerComponent("ForwardButton",t),new t(e,{})}(e);null===(te=e.controlBar)||void 0===te||te.addChild(ne);var oe=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_,a=r.querySelector(".vjs-icon-placeholder");return r.querySelector(".vjs-control-text").textContent="Rewind",r.classList.add("vjs-rewind-button"),a.append(h('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M473.39 547.46q-4.22 3.6-12 3.59a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67zm68.15 16.45a33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83 33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85zm1.57-66.65q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.86-4.43 22.32-7.34 8.19-13.15 8.19-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39z"></path><path d="M688 490.9c-18.66-95.93-111-159-207-142.24l-5.84-16.29L428.74 381l66.74 8-5.64-15.72c80.7-11.91 157.31 41.78 173 122.56a153.67 153.67 0 1 1-301.6-.78l-25.1-5a179.47 179.47 0 0 0 175.47 214.39 182.93 182.93 0 0 0 34.6-3.35A179.29 179.29 0 0 0 688 490.9z"></path></g></svg>')),t}return l(n,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t-30>=0){var i=t-30;e.currentTime(i)}else e.currentTime(0)}}]),n}(u.getComponent("Button"));return u.registerComponent("RewindButton",t),new t(e,{})}(e);null===(ie=e.controlBar)||void 0===ie||ie.addChild(oe)}null!=t&&null!==(V=t.res)&&void 0!==V&&null!==(A=V.video)&&void 0!==A&&null!==(I=A.gist)&&void 0!==I&&I.title&&e.titleBar.update({title:null==t||null===(J=t.res)||void 0===J||null===(Y=J.video)||void 0===Y||null===($=Y.gist)||void 0===$?void 0:$.title});w(e)}(d,s),function(o,l){var r=t.getPlayer(o);r&&(r.on("loadeddata",function(){var e,t,a,s,u;try{var d,c,v,p,h,f;if(null!=l&&null!==(d=l.res)&&void 0!==d&&null!==(c=d.video)&&void 0!==c&&null!==(v=c.streamingInfo)&&void 0!==v&&v.isLiveStream&&null!=l&&null!==(p=l.res)&&void 0!==p&&null!==(h=p.video)&&void 0!==h&&null!==(f=h.liveDetails)&&void 0!==f&&f.isDvrEnabled){var m,y,g=(null===(m=r.seekable())||void 0===m?void 0:m.end(0))-(null===(y=r.seekable())||void 0===y?void 0:y.start(0));window.customData.dvrWindow=g}else window.customData.dvrWindow=null}catch(e){}try{var k,b,w;if(null!=l&&null!==(k=l.res)&&void 0!==k&&null!==(b=k.video)&&void 0!==b&&null!==(w=b.streamingInfo)&&void 0!==w&&w.isLiveStream){var L,S=null===(L=r.controlBar)||void 0===L?void 0:L.getChild("ProgressControl");if(S){var E=S.el().querySelector(".vjs-play-progress");E&&(E.style.width="100%")}}}catch(e){}try{r.qualityLevels().selectedIndex_=-1}catch(e){}try{var x,q,T=r.textTracks().tracks_;T=T.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var O=null===(x=r.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");if(T&&(null===(q=T)||void 0===q?void 0:q.length)>0){var B=C(r);null==O||O.addChild(B)}else try{O.children_[2].el_.style.right="115px"}catch(e){}try{var F,_;O.el_.style.opacity=1,(null===(F=r.controlBar)||void 0===F||null===(_=F.el_)||void 0===_?void 0:_.querySelector(".custom-smartTV-progress-bar")).style.opacity=1}catch(e){}}catch(e){}!(null!=l&&null!==(e=l.series)&&void 0!==e&&e.enable||null!==(t=window)&&void 0!==t&&null!==(a=t.app_data)&&void 0!==a&&null!==(s=a.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=l&&l.liveVideo||i.addNextEpPreview(o,l),null!=l&&l.liveVideo||n.isMobile()||i.initiateTrickplay(o)}),r.one("play",function(){var t,i,n,l;null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(o,null===(n=window)||void 0===n||null===(l=n.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}(a,s),function(e,n){var o,l,r,a,s,u,d,c,h,f,m,y,g,k,b=v.getSource(null==n?void 0:n.res,e)||{},C=b.src;i.addTVProviderImage(e,n),("MEDIA_TAILOR"==(null===(o=window)||void 0===o||null===(l=o.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.adsConfig)||void 0===a?void 0:a.vodAdSticherProvider)&&null!==(s=window)&&void 0!==s&&null!==(u=s.app_data)&&void 0!==u&&null!==(d=u.appcmsMain)&&void 0!==d&&null!==(c=d.adsConfig)&&void 0!==c&&c.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(h=window)||void 0===h||null===(f=h.customData)||void 0===f||null===(m=f.ads)||void 0===m?void 0:m.vodAdSticherProvider)&&null!==(y=window)&&void 0!==y&&null!==(g=y.customData)&&void 0!==g&&null!==(k=g.ads)&&void 0!==k&&k.vodAdClientSideTracking)&&p.setupAdvertisementMarkers(e,C);!function(e,i){var n=t.getPlayer(e);if(n){var o,l,r=!1,a=!1;null===(o=n.controlBar)||void 0===o||o.on("keydown",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!0)}),null===(l=n.controlBar)||void 0===l||l.on("keyup",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!1)}),n.on("seeking",function(){var e,t,i;n.paused()||r||(r=!0,n.pause());var o=n.currentTime();if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.dvrWindow)if(o=n.liveTracker.liveCurrentTime()-o,0==Math.round(o)){var l,a;o=window.customData.dvrWindow;var s=null===(l=n.controlBar)||void 0===l||null===(a=l.customControlSpacer)||void 0===a?void 0:a.getChild("SeekToLive");s&&(s.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=0)}else if(o>window.customData.dvrWindow){var u,d;o=0;var c=null===(u=n.controlBar)||void 0===u||null===(d=u.customControlSpacer)||void 0===d?void 0:d.getChild("SeekToLive");c&&(c.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}else{var v,p;o=window.customData.dvrWindow-o;var h=null===(v=n.controlBar)||void 0===v||null===(p=v.customControlSpacer)||void 0===p?void 0:p.getChild("SeekToLive");h&&(h.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}var f=o/(window.customData.dvrWindow?window.customData.dvrWindow:n.duration())*100,m=null===(i=n.controlBar)||void 0===i?void 0:i.getChild("ProgressControl");if(m){var y=m.el().querySelector(".vjs-play-progress");y&&(y.style.width=f+"%")}}),n.on("seeked",function(){var e,t,o,l,s,u;if(n.paused()&&r&&!a&&(r=!1,n.play()),null!=i&&null!==(e=i.res)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&null!==(o=t.streamingInfo)&&void 0!==o&&o.isLiveStream&&null!=i&&null!==(l=i.res)&&void 0!==l&&null!==(s=l.video)&&void 0!==s&&null!==(u=s.liveDetails)&&void 0!==u&&u.isDvrEnabled){var d,c,v=null===(d=n.controlBar)||void 0===d||null===(c=d.customControlSpacer)||void 0===c?void 0:c.getChild("SeekToLive");n.liveTracker.seekedBehindLive_?v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0):v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=1)}})}}(e,n)}(a,s)};
1
+ "use strict";var e=require("./features-be45d7f9.js"),t=require("./skin-f87e1c22.js"),i=require("./index-d5a9a936.js"),n=require("./browser-38ff3331.js"),o=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),s=require("@babel/runtime/helpers/getPrototypeOf"),u=require("video.js"),d=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/typeof"),v=require("./generic-21c8c7ea.js"),p=require("./index-7d1a271f.js");require("@babel/runtime/helpers/defineProperty"),require("./renditions-b94006c7.js"),require("./localisation-56e0a999.js"),require("./autoNextVideo-4e20ba6a.js"),require("./util-e1bc715c.js"),require("./icons-0ea2e662.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("video.js/dist/video-js.min.css"),require("./resolution-0a6680be.js"),require("@babel/runtime/helpers/assertThisInitialized");var h=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},f=function(){function e(t){if(o(this,e),!t||"object"!==c(t))throw new Error("SettingsOptionOneWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.handleClick=t.callback||function(){},this.focused=t.focused||!1,"function"!=typeof this.handleClick)throw new Error("SettingsOptionOneWrapper: callback must be a function");this.handleClick=this.handleClick.bind(this)}return l(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionOneWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");n.textContent=this.title,i.appendChild(n);var o=document.createElement("p");o.textContent="›",o.style.fontSize="24px",i.appendChild(o),this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),i.addEventListener("keydown",function(e){"Enter"!==e.key&&"OK"!==e.key||t.handleClick()}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}]),e}(),m=function(){function e(t){if(o(this,e),!t||"object"!==c(t))throw new Error("SettingsOptionTwoWrapper: props must be a valid object");if(this.title=t.title||"Option",this.klassname=t.klassname||"default-option-wrapper",this.selected=t.selected||!1,this.focused=t.focused||!1,this.id=t.id,"string"!=typeof this.title)throw new Error("SettingsOptionTwoWrapper: title must be a string")}return l(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("SettingsOptionTwoWrapper: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname,i.tabIndex=0;var n=document.createElement("p");if(n.textContent=this.title,i.appendChild(n),this.selected){i.classList.add("selected");var o=document.createElement("span");o.appendChild(h('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),i.appendChild(o)}this.focused&&i.classList.add("focused"),i.addEventListener("focus",function(){t.focused=!0,i.classList.add("focused")}),i.addEventListener("blur",function(){t.focused=!1,i.classList.remove("focused")}),this.optionWrapper=i,i.instance=this,e.appendChild(i)}},{key:"unmount",value:function(){this.optionWrapper&&(this.optionWrapper.remove(),this.optionWrapper=void 0)}},{key:"focus",value:function(){this.optionWrapper&&(this.optionWrapper.focus(),this.optionWrapper.classList.add("focused"),this.focused=!0)}},{key:"blur",value:function(){this.optionWrapper&&(this.optionWrapper.blur(),this.optionWrapper.classList.remove("focused"),this.focused=!1)}}]),e}(),y=function(){function e(t){if(o(this,e),!t||"object"!==c(t))throw new Error("Sidebar: props must be a valid object");if(this.title=t.title||"Settings",this.items=t.items||[{text:"Video Quality",isSelected:!0,callback:function(){}},{text:"Audio Language",isSelected:!1,callback:function(){}},{text:"Subtitles",isSelected:!1,callback:function(){}}],this.klassname=t.klassname||"default-sidebar",this.currentFocusedOption=null,this.lastFocusedElement=t.lastFocusedElement||null,this.type=t.type||"navigation",this.focused=t.focused||!1,this.callback=t.callback||function(){},this.onselect=t.onselect||function(){},"function"!=typeof this.callback)throw new Error("Sidebar: callback must be a function");if(!["navigation","selection"].includes(this.type))throw new Error('Sidebar: type must be either "navigation" or "selection"')}return l(e,[{key:"mount",value:function(e){var t=this;if(!(e&&e instanceof HTMLElement))throw new Error("Sidebar: mountPoint must be a valid DOM element");var i=document.createElement("div");i.className=this.klassname;var n=document.createElement("div");n.textContent=this.title,n.className="settingsHeading",i.appendChild(n);var o=document.createElement("div");"navigation"===this.type?this.items.forEach(function(e,i){var n=new f({title:e.text,klassname:"default-option-wrapper",focused:0===i,callback:e.callback});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}):"selection"===this.type&&this.items.forEach(function(e,i){var n=new m({title:e.text,klassname:"default-option-wrapper",focused:0===i,selected:e.isSelected,id:e.id});e.instance=n,0===i&&(t.currentFocusedOption=n),n.mount(o)}),i.appendChild(o),this.sidebarElement=i,e.appendChild(i),this.addEventListeners(),this.focus()}},{key:"addEventListeners",value:function(){var e=this;if(!this.sidebarElement)throw new Error("Sidebar: sidebarElement is not initialized");this.sidebarElement.addEventListener("keydown",function(t){"ArrowDown"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusNext()):"ArrowUp"===t.key?(t.preventDefault(),t.stopPropagation(),e.focusPrevious()):"Backspace"===t.key||"Escape"===t.key||10009===t.keyCode||461===t.keyCode||196===t.keyCode||8===t.keyCode?(t.preventDefault(),t.stopPropagation(),e.unfocus(),e.unmount()):"Enter"!==t.key&&"OK"!==t.key||(t.preventDefault(),t.stopPropagation(),"selection"===e.type&&e.selectionTypeAction())})}},{key:"selectionTypeAction",value:function(){if(this.currentFocusedOption){this.items.forEach(function(e){if(e.instance){e.instance.optionWrapper.classList.remove("selected"),e.instance.selected=!1;var t=e.instance.optionWrapper.querySelector("span");t&&t.remove();var i=e.instance.optionWrapper.querySelector("svg");i&&i.remove()}}),this.currentFocusedOption.optionWrapper.classList.add("selected"),this.currentFocusedOption.selected=!0;this.currentFocusedOption.optionWrapper.appendChild(h('<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="currentColor" class="bi bi-check-circle" viewBox="0 0 16 16">\n <path d="m10.97 4.97-.02.022-3.473 4.425-2.093-2.094a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-1.071-1.05"/>\n </svg>')),this.onselect(this.currentFocusedOption)}}},{key:"focusNext",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.nextElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focusPrevious",value:function(){if(this.sidebarElement&&this.currentFocusedOption){var e=this.currentFocusedOption.optionWrapper.previousElementSibling;e&&(this.currentFocusedOption.blur(),this.currentFocusedOption=e.instance,this.currentFocusedOption.focus())}}},{key:"focus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.focus()}},{key:"unfocus",value:function(){this.sidebarElement&&this.currentFocusedOption&&this.currentFocusedOption.blur()}},{key:"unmount",value:function(){this.sidebarElement&&(this.sidebarElement.remove(),this.sidebarElement=void 0,this.lastFocusedElement&&(this.callback(),this.lastFocusedElement.focus()),this.currentFocusedOption=null)}}]),e}();function g(e,t){var i,n,o,l,r,a,s,u=[{text:"Video Quality",isSelected:!0,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l,r;if(!e)return;var a=null===(i=t.qualityLevels())||void 0===i?void 0:i.levels_,s=-1==(null===(n=t.qualityLevels())||void 0===n?void 0:n.selectedIndex_)?"auto":null===(o=t.qualityLevels())||void 0===o?void 0:o.levels_[null===(l=t.qualityLevels())||void 0===l?void 0:l.selectedIndex_].height,u=[{text:"Auto",id:"auto",isSelected:"auto"===s,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}].concat(d(a.map(function(t){return{text:"".concat(t.height,"p"),id:t.height,isSelected:s===t.height,callback:function(){e.currentFocusedOption.focus(),r.unmount()}}})));r=new y({title:"Video Quality",items:u,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){if("auto"===e.id)t.el_.player.qualityLevels().selectedIndex_=-1;else{var i=a.findIndex(function(t){return t.height===e.id});-1!==i&&(t.el_.player.qualityLevels().selectedIndex_=i)}},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),r.mount(null==t?void 0:t.el())}(s,e)}}];null!=e&&null!==(i=e.audioTracks())&&void 0!==i&&i.tracks_&&(null==e||null===(n=e.audioTracks())||void 0===n||null===(o=n.tracks_)||void 0===o?void 0:o.length)>1&&u.push({text:"Audio Language",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o,l;if(!e)return;var r=null==t||null===(i=t.audioTracks())||void 0===i?void 0:i.tracks_,a=(null==r||null===(n=r.find(function(e){return e.enabled}))||void 0===n?void 0:n.label)||(null==r||null===(o=r[0])||void 0===o?void 0:o.label)||"Default",s=r.map(function(t){return{text:t.label,id:t.id,isSelected:a===t.label,callback:function(){e.currentFocusedOption.focus(),l.unmount()}}});l=new y({title:"Audio Language",items:s,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){null==r||r.forEach(function(t){t.enabled=!1,t.enabled=t.id===e.id})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),l.mount(null==t?void 0:t.el())}(s,e)}});var c=null==e||null===(l=e.textTracks())||void 0===l?void 0:l.tracks_;return(c=c.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))&&(null===(r=c)||void 0===r?void 0:r.length)>0&&u.push({text:"Subtitles",isSelected:!1,callback:function(){s.sidebarElement&&(s.sidebarElement.style.visibility="hidden"),function(e,t){var i,n,o;if(!e)return;var l=t.textTracks().tracks_;l=l.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var r=(null===(i=l)||void 0===i||null===(n=i.find(function(e){return"showing"===e.mode}))||void 0===n?void 0:n.label)||"Captions Off",a=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===r,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}].concat(d(l.map(function(t){return{text:t.label,id:t.id,kind:t.kind,lang:t.language,mode:t.mode,isSelected:r===t.label,callback:function(){e.currentFocusedOption.focus(),o.unmount()}}})));o=new y({title:"Closed Captions",items:a,klassname:"default-sidebar",lastFocusedElement:e.currentFocusedOption,type:"selection",focused:!0,onselect:function(e){var t;null===(t=l)||void 0===t||t.forEach(function(t){t.mode=t.id===e.id?"showing":"hidden"})},callback:function(){e.sidebarElement&&(e.sidebarElement.style.visibility="visible")}}),o.mount(null==t?void 0:t.el())}(s,e)}}),(s=new y({title:"Settings",items:u,klassname:"default-sidebar",lastFocusedElement:t,type:"navigation",focused:!0,callback:function(){var i;null===(i=e.controlBar)||void 0===i||i.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){t.focus()},100)}})).mount(null==e?void 0:e.el()),null===(a=e.controlBar)||void 0===a||a.addClass("hidePlayerControls"),e.options({inactivityTimeout:0}),s}function k(e){var t=b();return function(){var i,n=s(e);if(t){var o=s(this).constructor;i=Reflect.construct(n,arguments,o)}else i=n.apply(this,arguments);return a(this,i)}}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(b=function(){return!!e})()}var C=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_,a=r.querySelector(".vjs-icon-placeholder");r.querySelector(".vjs-control-text").textContent="CC",r.classList.add("vjs-ClosedCaption-button");return a.append(h('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path d="M92.7268 78.3757H81.5999V88.0906L57.4173 78.3757H9.27274V16.2273H92.7268V78.3757ZM17.6184 69.5027H57.3108L73.7991 74.6169L73.8001 69.5027H84.3821V25.2107H17.6184V69.5027Z" fill="currentColor"/>\n<rect x="20.8628" y="34.7727" width="39.4091" height="6.95455" fill="currentColor"/>\n<rect x="69.5446" y="34.7727" width="11.5909" height="6.95455" fill="currentColor"/>\n<rect x="44.0446" y="51" width="37.0909" height="9.27273" fill="currentColor"/>\n<rect x="20.8628" y="51" width="13.9091" height="9.27273" fill="currentColor"/>\n</svg>')),t}return l(n,[{key:"handleClick",value:function(){!function(e){var t,i,n,o,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=e.textTracks().tracks_,a=(null===(t=r=r.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind}))||void 0===t||null===(i=t.find(function(e){return"showing"===e.mode}))||void 0===i?void 0:i.label)||"Captions Off",s=[{text:"Captions Off",id:"auto",isSelected:"Captions Off"===a,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}].concat(d(r.map(function(e){return{text:e.label,id:e.id,kind:e.kind,lang:e.language,mode:e.mode,isSelected:a===e.label,callback:function(){o.currentFocusedOption.focus(),sidebar.unmount()}}})));(o=new y({title:"Closed Captions",items:s,klassname:"default-sidebar",lastFocusedElement:l,type:"selection",focused:!0,onselect:function(t){var i,n;null===(i=r)||void 0===i||i.forEach(function(e){e.mode=e.id===t.id?"showing":"hidden"}),o.unmount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)},callback:function(){var t;o.unmount(null==e?void 0:e.el()),null===(t=e.controlBar)||void 0===t||t.removeClass("hidePlayerControls"),e.options({inactivityTimeout:4e3}),setTimeout(function(){l.focus()},100)}})).mount(null==e?void 0:e.el()),null===(n=e.controlBar)||void 0===n||n.addClass("hidePlayerControls"),e.options({inactivityTimeout:0})}(e,this)}}]),n}(u.getComponent("Button"));return u.registerComponent("CloseCaptionButton",t),new t(e,{})};var w=function(e){if(e)try{var t,i,n,o=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(n=i.entitlement)||void 0===n?void 0:n.deviceType)||"smart_tv_samsung";e&&(!function(e){try{var t;"smart_tv_samsung"==e&&null!==(t=window)&&void 0!==t&&t.tizen&&(window.tizen.tvinputdevice.registerKey("MediaPlayPause"),window.tizen.tvinputdevice.registerKey("MediaRewind"),window.tizen.tvinputdevice.registerKey("MediaFastForward"),window.tizen.tvinputdevice.registerKey("Exit"),window.tizen.tvinputdevice.registerKey("MediaPlay"),window.tizen.tvinputdevice.registerKey("MediaPause"),window.tizen.tvinputdevice.registerKey("MediaStop"))}catch(e){}}(o),e.on("keydown",function(t){10252==t.keyCode||"xfinityX1"==o&&179==t.keyCode?e.paused()?e.play():e.pause():415==t.keyCode?e.play():19==t.keyCode?e.pause():412===t.keyCode||"xfinityX1"==o&&227==t.keyCode?e.currentTime(e.currentTime()-10):(417===t.keyCode||"xfinityX1"==o&&228==t.keyCode)&&e.currentTime(e.currentTime()+10)}))}catch(e){}};exports.initialiseSkin=function(a,s){var d=t.getPlayer(a);d.addClass("skin_smartTV"),function(e,t){var i,n,a,s,d,c,v,p,f,m,y,b,C,L,S,E,x,q,T,O,B,F,_,j,W,D,M,P,V,A,I,z=null==e?void 0:e.el();z&&(z.style.color=(null==t||null===(i=t.theme)||void 0===i?void 0:i.color)||(null===(n=window)||void 0===n||null===(a=n.app_data)||void 0===a||null===(s=a.appcmsMain)||void 0===s||null===(d=s.brand)||void 0===d||null===(c=d.cta)||void 0===c||null===(v=c.primary)||void 0===v?void 0:v.backgroundColor)||"#FFFFFF");null===(p=e.controlBar)||void 0===p||p.removeChild("VolumePanel"),null===(f=e.controlBar)||void 0===f||f.removeChild("AudioTrackButton"),null===(m=e.controlBar)||void 0===m||m.removeChild("FullscreenToggle"),null===(y=e.controlBar)||void 0===y||y.removeChild("PictureInPictureToggle"),null===(b=e.controlBar)||void 0===b||b.removeChild("skipBackward"),null===(C=e.controlBar)||void 0===C||C.removeChild("skipForward"),null===(L=e.controlBar)||void 0===L||L.removeChild("PictureInPictureToggle");var H=document.createElement("div");H.className="custom-smartTV-progress-bar",null===(S=e.controlBar)||void 0===S||null===(E=S.el())||void 0===E||E.append(H);var R=null===(x=e.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");try{H.style.opacity=0,R.el_.style.opacity=0}catch(e){}var G=null===(q=e.controlBar)||void 0===q?void 0:q.getChild("ProgressControl"),K=null===(T=e.controlBar)||void 0===T?void 0:T.getChild("CurrentTimeDisplay"),N=null===(O=e.controlBar)||void 0===O?void 0:O.getChild("SeekToLive");N&&(N.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live");var Z=null===(B=e.controlBar)||void 0===B?void 0:B.getChild("LiveDisplay"),Q=null===(F=e.controlBar)||void 0===F?void 0:F.getChild("RemainingTimeDisplay");G&&K&&N&&H.append(K.el(),G.el(),Q.el(),null==Z?void 0:Z.el());null==R||R.addChild(N);var U=e.getChild("TitleBar");null==R||R.addChild(U);var X=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_;return r.querySelector(".vjs-control-text").textContent="Start From Beginning",r.classList.add("vjs-startFromBeginning-button"),t}return l(n,[{key:"handleClick",value:function(){(null==e?void 0:e.currentTime())>0&&e.currentTime(0)}}]),n}(u.getComponent("Button"));return u.registerComponent("StartFromBeginning",t),new t(e,{})}(e);null==R||R.addChild(X);var J,Y,$,ee=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_,a=r.querySelector(".vjs-icon-placeholder");return r.querySelector(".vjs-control-text").textContent="Settings",r.classList.add("vjs-Settings-button"),a.append(h('<svg width="42" height="42" viewBox="0 0 102 102" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path fill-rule="evenodd" clip-rule="evenodd" d="M90.913 45.8867V56.1132L80.0959 58.1496C79.4266 61.1027 78.2623 63.9214 76.6523 66.4864L82.8603 75.597L75.586 82.8192L66.5158 76.664C63.9394 78.2538 61.1222 79.4156 58.1737 80.1041L56.1361 90.913H45.8542L43.8193 80.1041C40.8708 79.4158 38.0535 78.2541 35.4773 76.664L26.4071 82.8192L19.1313 75.597L25.2918 66.4864C23.7008 63.9116 22.5379 61.0962 21.8482 58.1496L11.087 56.1132V45.8867L21.8482 43.8028C22.5428 40.8493 23.7235 38.0315 25.3421 35.4646L19.1327 26.4016L26.4085 19.1807L35.4787 25.3359C38.045 23.7263 40.8656 22.5627 43.8207 21.8945L45.8556 11.0869H56.1375L58.1751 21.8945C61.1301 22.5631 63.9506 23.7267 66.5172 25.3359L75.5874 19.1807L82.8617 26.4016L76.6537 35.5135C78.2633 38.0617 79.4277 40.8647 80.0973 43.8028L90.913 45.8867ZM28.9308 51.0214C28.9434 63.1872 38.8221 73.0394 50.9956 73.0271C56.8418 73.0212 62.4462 70.6944 66.5758 66.5588C70.7054 62.4232 73.0219 56.8174 73.0156 50.9748C73.0025 38.809 63.1234 28.9572 50.9499 28.9701C38.7764 28.983 28.9182 38.8556 28.9308 51.0214Z" fill="currentColor"/>\n</svg>')),t}return l(n,[{key:"handleClick",value:function(){g(e,this)}}]),n}(u.getComponent("Button"));return u.registerComponent("SettingsButton",t),new t(e,{})}(e);if(null==R||R.addChild(ee),!(null!=t&&null!==(_=t.res)&&void 0!==_&&null!==(j=_.video)&&void 0!==j&&null!==(W=j.streamingInfo)&&void 0!==W&&W.isLiveStream)||null!=t&&null!==(D=t.res)&&void 0!==D&&null!==(M=D.video)&&void 0!==M&&null!==(P=M.liveDetails)&&void 0!==P&&P.isDvrEnabled){var te,ie,ne=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_,a=r.querySelector(".vjs-icon-placeholder");return r.querySelector(".vjs-control-text").textContent="Forward",r.classList.add("vjs-forward-button"),a.append(h('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M461.37 551.05a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67t-12.02 3.59zm109.47-75.65a33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85 33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83zm-1.5 66.6q-4.43 8.19-13.15 8.19c-5.91 0-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.83-4.43 22.32z"></path><path d="M687.85 490l-25.1 5a153.7 153.7 0 1 1-301.6.77c15.68-80.78 92.29-134.47 173-122.56L528.5 389l66.74-8-46.45-48.58-5.79 16.24C447 331.88 354.66 395 336 490.9a179.29 179.29 0 0 0 141.77 210.2 182.22 182.22 0 0 0 34.61 3.35A179.4 179.4 0 0 0 687.85 490z"></path></g></svg>')),t}return l(n,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t>=0){var i=t+30;e.currentTime(i)}}}]),n}(u.getComponent("Button"));return u.registerComponent("ForwardButton",t),new t(e,{})}(e);null===(te=e.controlBar)||void 0===te||te.addChild(ne);var oe=function(e){var t=function(t){r(n,t);var i=k(n);function n(e){var t,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};o(this,n);var r=(t=i.call(this,e,l)).el_,a=r.querySelector(".vjs-icon-placeholder");return r.querySelector(".vjs-control-text").textContent="Rewind",r.classList.add("vjs-rewind-button"),a.append(h('<svg fill="currentColor" width="100" height="100" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" stroke="currentColor"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path d="M473.39 547.46q-4.22 3.6-12 3.59a33.17 33.17 0 0 1-12.93-2.62 40.15 40.15 0 0 1-11.73-7.59v18.64a35.88 35.88 0 0 0 11.43 5.85 50.18 50.18 0 0 0 14.87 2 36.62 36.62 0 0 0 12.4-2.1 29 29 0 0 0 10.3-6.17q9.63-8.57 9.62-22.39 0-9.76-5.18-16.53a28 28 0 0 0-14.36-9.61L494.87 474v-.44h-57.4v16.83h31.41l-15.94 30.31v.46q11.15-.31 17.89 3.75a13.05 13.05 0 0 1 6.77 11.88q0 7.07-4.21 10.67zm68.15 16.45a33.44 33.44 0 0 0 29.3 0 33.83 33.83 0 0 0 11.65-9.85 46.82 46.82 0 0 0 7.44-15.17 71.65 71.65 0 0 0 0-38.47 46.93 46.93 0 0 0-7.44-15.19 33.77 33.77 0 0 0-11.65-9.83 33.35 33.35 0 0 0-29.3 0 33.77 33.77 0 0 0-11.65 9.83 46.53 46.53 0 0 0-7.44 15.19 71.65 71.65 0 0 0 0 38.47 46.43 46.43 0 0 0 7.44 15.17 33.83 33.83 0 0 0 11.65 9.85zm1.57-66.65q4.51-8.11 13.08-8.11c5.61 0 9.94 2.74 13 8.26s4.58 12.92 4.58 22.24-1.48 16.86-4.43 22.32-7.34 8.19-13.15 8.19-10.38-2.95-13.37-8.87q-4.23-7.37-4.21-21.64t4.5-22.39z"></path><path d="M688 490.9c-18.66-95.93-111-159-207-142.24l-5.84-16.29L428.74 381l66.74 8-5.64-15.72c80.7-11.91 157.31 41.78 173 122.56a153.67 153.67 0 1 1-301.6-.78l-25.1-5a179.47 179.47 0 0 0 175.47 214.39 182.93 182.93 0 0 0 34.6-3.35A179.29 179.29 0 0 0 688 490.9z"></path></g></svg>')),t}return l(n,[{key:"handleClick",value:function(){var t=null==e?void 0:e.currentTime();if(t-30>=0){var i=t-30;e.currentTime(i)}else e.currentTime(0)}}]),n}(u.getComponent("Button"));return u.registerComponent("RewindButton",t),new t(e,{})}(e);null===(ie=e.controlBar)||void 0===ie||ie.addChild(oe)}null!=t&&null!==(V=t.res)&&void 0!==V&&null!==(A=V.video)&&void 0!==A&&null!==(I=A.gist)&&void 0!==I&&I.title&&e.titleBar.update({title:null==t||null===(J=t.res)||void 0===J||null===(Y=J.video)||void 0===Y||null===($=Y.gist)||void 0===$?void 0:$.title});w(e)}(d,s),function(o,l){var r=t.getPlayer(o);r&&(r.on("loadeddata",function(){var e,t,a,s,u;try{var d,c,v,p,h,f;if(null!=l&&null!==(d=l.res)&&void 0!==d&&null!==(c=d.video)&&void 0!==c&&null!==(v=c.streamingInfo)&&void 0!==v&&v.isLiveStream&&null!=l&&null!==(p=l.res)&&void 0!==p&&null!==(h=p.video)&&void 0!==h&&null!==(f=h.liveDetails)&&void 0!==f&&f.isDvrEnabled){var m,y,g=(null===(m=r.seekable())||void 0===m?void 0:m.end(0))-(null===(y=r.seekable())||void 0===y?void 0:y.start(0));window.customData.dvrWindow=g}else window.customData.dvrWindow=null}catch(e){}try{var k,b,w;if(null!=l&&null!==(k=l.res)&&void 0!==k&&null!==(b=k.video)&&void 0!==b&&null!==(w=b.streamingInfo)&&void 0!==w&&w.isLiveStream){var L,S=null===(L=r.controlBar)||void 0===L?void 0:L.getChild("ProgressControl");if(S){var E=S.el().querySelector(".vjs-play-progress");E&&(E.style.width="100%")}}}catch(e){}try{r.qualityLevels().selectedIndex_=-1}catch(e){}try{var x,q,T=r.textTracks().tracks_;T=T.filter(function(e){return"captions"===e.kind||"subtitles"===e.kind});var O=null===(x=r.controlBar)||void 0===x?void 0:x.getChild("CustomControlSpacer");if(T&&(null===(q=T)||void 0===q?void 0:q.length)>0){var B=C(r);null==O||O.addChild(B)}else try{O.children_[2].el_.style.right="115px"}catch(e){}try{var F,_;O.el_.style.opacity=1,(null===(F=r.controlBar)||void 0===F||null===(_=F.el_)||void 0===_?void 0:_.querySelector(".custom-smartTV-progress-bar")).style.opacity=1}catch(e){}}catch(e){}!(null!=l&&null!==(e=l.series)&&void 0!==e&&e.enable||null!==(t=window)&&void 0!==t&&null!==(a=t.app_data)&&void 0!==a&&null!==(s=a.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=l&&l.liveVideo||i.addNextEpPreview(o,l),null!=l&&l.liveVideo||n.isMobile()||i.initiateTrickplay(o)}),r.one("play",function(){var t,i,n,l;null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(o,null===(n=window)||void 0===n||null===(l=n.customData)||void 0===l?void 0:l.iframeOverlayUrl)}))}(a,s),function(e,n){var o,l,r,a,s,u,d,c,h,f,m,y,g,k,b=v.getSource(null==n?void 0:n.res,e)||{},C=b.src;i.addTVProviderImage(e,n),("MEDIA_TAILOR"==(null===(o=window)||void 0===o||null===(l=o.app_data)||void 0===l||null===(r=l.appcmsMain)||void 0===r||null===(a=r.adsConfig)||void 0===a?void 0:a.vodAdSticherProvider)&&null!==(s=window)&&void 0!==s&&null!==(u=s.app_data)&&void 0!==u&&null!==(d=u.appcmsMain)&&void 0!==d&&null!==(c=d.adsConfig)&&void 0!==c&&c.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(h=window)||void 0===h||null===(f=h.customData)||void 0===f||null===(m=f.ads)||void 0===m?void 0:m.vodAdSticherProvider)&&null!==(y=window)&&void 0!==y&&null!==(g=y.customData)&&void 0!==g&&null!==(k=g.ads)&&void 0!==k&&k.vodAdClientSideTracking)&&p.setupAdvertisementMarkers(e,C);!function(e,i){var n=t.getPlayer(e);if(n){var o,l,r=!1,a=!1;null===(o=n.controlBar)||void 0===o||o.on("keydown",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!0)}),null===(l=n.controlBar)||void 0===l||l.on("keyup",function(e){39!==e.keyCode&&37!==e.keyCode||(a=!1)}),n.on("seeking",function(){var e,t,i;n.paused()||r||(r=!0,n.pause());var o=n.currentTime();if(null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.dvrWindow)if(o=n.liveTracker.liveCurrentTime()-o,0==Math.round(o)){var l,a;o=window.customData.dvrWindow;var s=null===(l=n.controlBar)||void 0===l||null===(a=l.customControlSpacer)||void 0===a?void 0:a.getChild("SeekToLive");s&&(s.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=0)}else if(o>window.customData.dvrWindow){var u,d;o=0;var c=null===(u=n.controlBar)||void 0===u||null===(d=u.customControlSpacer)||void 0===d?void 0:d.getChild("SeekToLive");c&&(c.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}else{var v,p;o=window.customData.dvrWindow-o;var h=null===(v=n.controlBar)||void 0===v||null===(p=v.customControlSpacer)||void 0===p?void 0:p.getChild("SeekToLive");h&&(h.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0)}var f=o/(window.customData.dvrWindow?window.customData.dvrWindow:n.duration())*100,m=null===(i=n.controlBar)||void 0===i?void 0:i.getChild("ProgressControl");if(m){var y=m.el().querySelector(".vjs-play-progress");y&&(y.style.width=f+"%")}}),n.on("seeked",function(){var e,t,o,l,s,u;if(n.paused()&&r&&!a&&(r=!1,n.play()),null!=i&&null!==(e=i.res)&&void 0!==e&&null!==(t=e.video)&&void 0!==t&&null!==(o=t.streamingInfo)&&void 0!==o&&o.isLiveStream&&null!=i&&null!==(l=i.res)&&void 0!==l&&null!==(s=l.video)&&void 0!==s&&null!==(u=s.liveDetails)&&void 0!==u&&u.isDvrEnabled){var d,c,v=null===(d=n.controlBar)||void 0===d||null===(c=d.customControlSpacer)||void 0===c?void 0:c.getChild("SeekToLive");n.liveTracker.seekedBehindLive_?v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Go Live",n.controlBar.liveDisplay.el().style.opacity=0):v&&(v.el_.querySelector("span.vjs-seek-to-live-text").innerHTML="Live",n.controlBar.liveDisplay.el().style.opacity=1)}})}}(e,n)}(a,s)};
@@ -1 +1 @@
1
- "use strict";var e=require("./features-0814a0a4.js"),l=require("./skin-f87e1c22.js"),i=require("./index-467f3c17.js"),r=require("./browser-38ff3331.js");require("videojs-contrib-quality-menu");var o=require("video.js"),n=require("./index-173955be.js"),u=require("./generic-ac6915a3.js"),d=require("./icons-0ea2e662.js");require("@babel/runtime/helpers/defineProperty"),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("./renditions-7fe52e97.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-630079de.js"),require("./util-e1bc715c.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("video.js/dist/video-js.min.css"),require("./captions-bc814903.js"),require("./resolution-0a6680be.js"),require("@babel/runtime/helpers/assertThisInitialized"),require("axios"),require("js-cookie"),require("ua-parser-js");function a(o,n){var u,d=l.getPlayer(o),a=(null==n||null===(u=n.res)||void 0===u?void 0:u.siteId)||"";d&&(d.on("loadeddata",function(){var e,u,d,t,s;!function(e){var i=l.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(o),!(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable||null!==(u=window)&&void 0!==u&&null!==(d=u.app_data)&&void 0!==d&&null!==(t=d.appcmsMain)&&void 0!==t&&null!==(s=t.features)&&void 0!==s&&s.auto_play)||null!=n&&n.liveVideo||i.addNextEpPreview(o,n),null!=n&&n.liveVideo||r.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===a||i.initiateTrickplay(o)}),d.one("play",function(){var l,i,r,n;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(o,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}var t=function(e,i){var r,n,u,d,a,t,s,v,c,p,b,m,y=l.getPlayer(e),g=(null==i?void 0:i.theme)||{},q=o.dom.$(".vjs-play-progress"),h=o.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(r=window)||void 0===r||null===(n=r.app_data)||void 0===n||null===(u=n.appcmsMain)||void 0===u||null===(d=u.brand)||void 0===d||null===(a=d.cta)||void 0===a||null===(t=a.primary)||void 0===t?void 0:t.backgroundColor)),q&&(q.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(b=p.cta)||void 0===b||null===(m=b.primary)||void 0===m?void 0:m.backgroundColor));var w=y.getChild("BigPlayButton")||null;(null==g?void 0:g.progressBarColor)&&q&&(q.style.background=g.progressBarColor),(null==g?void 0:g.playButtonBackgroundColor)&&w&&(w.el().style.background=g.playButtonBackgroundColor),(null==g?void 0:g.playButtonColor)&&h&&(h.style.color=g.playButtonColor),(null==g?void 0:g.playButtonType)&&("square"==(null==g?void 0:g.playButtonType)?w.el().style.borderRadius=".3em":w.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(r,o){l.getPlayer(r).addClass("skin_vlone"),a(r,o),function(l,r){var o,a,t,s,v,c,p,b,m,y,g,q,h,w,j,f,C,k,B=u.getSource(null==r?void 0:r.res,l)||{};B.src;var S=(null==r?void 0:r.skin_settings)||{};null!=S&&S.skipBtn&&0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(l,"VL_ONE",d.SkipSvgV2());(null!=S&&S.rewindBtn&&0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(l,"VL_ONE",d.RewindSvgV2());(null==r||null===(o=r.relatedVideos)||void 0===o||null===(a=o.content)||void 0===a?void 0:a.length)>0&&e.addVideoSelector(l,null==r?void 0:r.relatedVideos);null!=r&&null!==(t=r.series)&&void 0!==t&&t.enable&&e.addSeriesSelectorV2(l,r);(null==r||null===(s=r.streams)||void 0===s?void 0:s.length)>1&&e.addMulticamSelector(l,null==r?void 0:r.streams);if(i.addTVProviderImage(l,r),n.initialiseKeyboardEvents(l,r),"MEDIA_TAILOR"==(null===(v=window)||void 0===v||null===(c=v.app_data)||void 0===c||null===(p=c.appcmsMain)||void 0===p||null===(b=p.adsConfig)||void 0===b?void 0:b.vodAdSticherProvider)&&null!==(m=window)&&void 0!==m&&null!==(y=m.app_data)&&void 0!==y&&null!==(g=y.appcmsMain)&&void 0!==g&&null!==(q=g.adsConfig)&&void 0!==q&&q.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(h=window)||void 0===h||null===(w=h.customData)||void 0===w||null===(j=w.ads)||void 0===j?void 0:j.vodAdSticherProvider)&&null!==(f=window)&&void 0!==f&&null!==(C=f.customData)&&void 0!==C&&null!==(k=C.ads)&&void 0!==k&&k.vodAdClientSideTracking){var V,M=null;if(null!=r&&null!==(V=r.series)&&void 0!==V&&V.enable){var P,T,_,A=null===(P=u.getCurrentVideo())||void 0===P||null===(T=P.video)||void 0===T||null===(_=T.gist)||void 0===_?void 0:_.id,O=u.getSeriesWatchMap(),R=(null==O?void 0:O.get(A))||{t:0,p:0},I=R.t;R.p<95&&(M=I)}else{var x=r.watchHistoryResumeTime;r.watchedPercentage<95&&(M=x)}n.setupAdvertisementMarkers(l,M)}}(r,o),t(r,o)};
1
+ "use strict";var e=require("./features-be45d7f9.js"),l=require("./skin-f87e1c22.js"),i=require("./index-d5a9a936.js"),r=require("./browser-38ff3331.js");require("videojs-contrib-quality-menu");var o=require("video.js"),n=require("./index-7d1a271f.js"),u=require("./generic-21c8c7ea.js"),d=require("./icons-0ea2e662.js");require("@babel/runtime/helpers/defineProperty"),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("./renditions-b94006c7.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-4e20ba6a.js"),require("./util-e1bc715c.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/slicedToArray"),require("video.js/dist/video-js.min.css"),require("./captions-bc814903.js"),require("./resolution-0a6680be.js"),require("@babel/runtime/helpers/assertThisInitialized"),require("axios"),require("js-cookie"),require("ua-parser-js");function a(o,n){var u,d=l.getPlayer(o),a=(null==n||null===(u=n.res)||void 0===u?void 0:u.siteId)||"";d&&(d.on("loadeddata",function(){var e,u,d,t,s;!function(e){var i=l.getPlayer(e);i&&(null==i||i.qualityMenu,i.qualityMenu({useResolutionLabels:!0}))}(o),!(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable||null!==(u=window)&&void 0!==u&&null!==(d=u.app_data)&&void 0!==d&&null!==(t=d.appcmsMain)&&void 0!==t&&null!==(s=t.features)&&void 0!==s&&s.auto_play)||null!=n&&n.liveVideo||i.addNextEpPreview(o,n),null!=n&&n.liveVideo||r.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===a||i.initiateTrickplay(o)}),d.one("play",function(){var l,i,r,n;null!==(l=window)&&void 0!==l&&null!==(i=l.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(o,null===(r=window)||void 0===r||null===(n=r.customData)||void 0===n?void 0:n.iframeOverlayUrl)}))}var t=function(e,i){var r,n,u,d,a,t,s,v,c,p,b,m,y=l.getPlayer(e),g=(null==i?void 0:i.theme)||{},q=o.dom.$(".vjs-play-progress"),h=o.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(r=window)||void 0===r||null===(n=r.app_data)||void 0===n||null===(u=n.appcmsMain)||void 0===u||null===(d=u.brand)||void 0===d||null===(a=d.cta)||void 0===a||null===(t=a.primary)||void 0===t?void 0:t.backgroundColor)),q&&(q.style.background="".concat(null===(s=window)||void 0===s||null===(v=s.app_data)||void 0===v||null===(c=v.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(b=p.cta)||void 0===b||null===(m=b.primary)||void 0===m?void 0:m.backgroundColor));var w=y.getChild("BigPlayButton")||null;(null==g?void 0:g.progressBarColor)&&q&&(q.style.background=g.progressBarColor),(null==g?void 0:g.playButtonBackgroundColor)&&w&&(w.el().style.background=g.playButtonBackgroundColor),(null==g?void 0:g.playButtonColor)&&h&&(h.style.color=g.playButtonColor),(null==g?void 0:g.playButtonType)&&("square"==(null==g?void 0:g.playButtonType)?w.el().style.borderRadius=".3em":w.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(r,o){l.getPlayer(r).addClass("skin_vlone"),a(r,o),function(l,r){var o,a,t,s,v,c,p,b,m,y,g,q,h,w,j,f,C,k,B=u.getSource(null==r?void 0:r.res,l)||{};B.src;var S=(null==r?void 0:r.skin_settings)||{};null!=S&&S.skipBtn&&0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(l,"VL_ONE",d.SkipSvgV2());(null!=S&&S.rewindBtn&&0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(l,"VL_ONE",d.RewindSvgV2());(null==r||null===(o=r.relatedVideos)||void 0===o||null===(a=o.content)||void 0===a?void 0:a.length)>0&&e.addVideoSelector(l,null==r?void 0:r.relatedVideos);null!=r&&null!==(t=r.series)&&void 0!==t&&t.enable&&e.addSeriesSelectorV2(l,r);(null==r||null===(s=r.streams)||void 0===s?void 0:s.length)>1&&e.addMulticamSelector(l,null==r?void 0:r.streams);if(i.addTVProviderImage(l,r),n.initialiseKeyboardEvents(l,r),"MEDIA_TAILOR"==(null===(v=window)||void 0===v||null===(c=v.app_data)||void 0===c||null===(p=c.appcmsMain)||void 0===p||null===(b=p.adsConfig)||void 0===b?void 0:b.vodAdSticherProvider)&&null!==(m=window)&&void 0!==m&&null!==(y=m.app_data)&&void 0!==y&&null!==(g=y.appcmsMain)&&void 0!==g&&null!==(q=g.adsConfig)&&void 0!==q&&q.vodAdClientSideTracking||"MEDIA_TAILOR"==(null===(h=window)||void 0===h||null===(w=h.customData)||void 0===w||null===(j=w.ads)||void 0===j?void 0:j.vodAdSticherProvider)&&null!==(f=window)&&void 0!==f&&null!==(C=f.customData)&&void 0!==C&&null!==(k=C.ads)&&void 0!==k&&k.vodAdClientSideTracking){var V,M=null;if(null!=r&&null!==(V=r.series)&&void 0!==V&&V.enable){var P,T,_,A=null===(P=u.getCurrentVideo())||void 0===P||null===(T=P.video)||void 0===T||null===(_=T.gist)||void 0===_?void 0:_.id,O=u.getSeriesWatchMap(),R=(null==O?void 0:O.get(A))||{t:0,p:0},I=R.t;R.p<95&&(M=I)}else{var x=r.watchHistoryResumeTime;r.watchedPercentage<95&&(M=x)}n.setupAdvertisementMarkers(l,M)}}(r,o),t(r,o)};
@@ -1 +1 @@
1
- "use strict";var e=require("./features-0814a0a4.js"),l=require("./icons-0ea2e662.js"),i=require("./skin-f87e1c22.js"),r=require("./renditions-7fe52e97.js"),n=require("./captions-bc814903.js"),o=require("./index-467f3c17.js"),t=require("./browser-38ff3331.js");function d(l,d){var u=i.getPlayer(l);u&&(u.on("loadeddata",function(){var i,a,s,v,c,p,m;(null===(i=r.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,d),(null===(a=n.getCaptions(l))||void 0===a?void 0:a.length)>0&&e.addCaptionButton(l,d),!(null!=d&&null!==(s=d.series)&&void 0!==s&&s.enable||null!==(v=window)&&void 0!==v&&null!==(c=v.app_data)&&void 0!==c&&null!==(p=c.appcmsMain)&&void 0!==p&&null!==(m=p.features)&&void 0!==m&&m.auto_play)||null!=d&&d.liveVideo||o.addNextEpPreview(l,d),function(e,l){var i,r=Math.floor(e/60),n=null===(i=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===i?void 0:i[0];n&&(n.style.marginRight=r>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],t=document.getElementsByClassName("vjs-time-control");l&&o.classList.value.includes("vjs-hidden")&&(t[0].style.display="block",n&&(n.style.marginRight="56px"))}(u.duration(),(null==d?void 0:d.liveVideo)||!1),null!=d&&d.liveVideo||t.isMobile()||o.initiateTrickplay(l)}),u.one("play",function(){var i,r,n,o;null!==(i=window)&&void 0!==i&&null!==(r=i.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}require("@babel/runtime/helpers/defineProperty"),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("video.js"),require("./generic-ac6915a3.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-630079de.js"),require("./util-e1bc715c.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),exports.initialiseSkin=function(r,n){i.getPlayer(r).addClass("skin_defaultv2"),function(){"Chrome"==t.detectBrowser()&&Promise.resolve().then(function(){return require("./chromett-f925fb6c.js")}).then(function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)});Promise.resolve().then(function(){return require("./skin-87c06e34.js")}).then(function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)})}(),d(r,n),function(e,r){var n,o,t,d,u,a,s=i.getPlayer(e);null==s||null===(n=s.controlBar)||void 0===n||null===(o=n.getChild("FullscreenToggle"))||void 0===o||null===(t=o.el())||void 0===t||t.appendChild(i.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==s||null===(d=s.controlBar)||void 0===d||null===(u=d.getChild("FullscreenToggle"))||void 0===u||null===(a=u.el())||void 0===a||a.appendChild(i.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var v=document.getElementsByClassName("vjs-time-control");r.liveVideo&&v[0]&&(v[0].style.display="none")}(r,n),function(i,r){var n,o,t,d,u,a;0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(i,"defaultV2",l.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(i,"defaultV2",l.RewindSvgV2());r.liveVideo||e.addSlowMotion(i);(null==r||null===(n=r.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.relatedVideos);(null==r||null===(t=r.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.streams);(null==r||null===(d=r.playlist)||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==r?void 0:r.playlist);null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,r)}(r,n),o.addTVProviderImage(r,n)};
1
+ "use strict";var e=require("./features-be45d7f9.js"),l=require("./icons-0ea2e662.js"),i=require("./skin-f87e1c22.js"),r=require("./renditions-b94006c7.js"),n=require("./captions-bc814903.js"),o=require("./index-d5a9a936.js"),t=require("./browser-38ff3331.js");function d(l,d){var u=i.getPlayer(l);u&&(u.on("loadeddata",function(){var i,a,s,v,c,p,m;(null===(i=r.getRenditions(l))||void 0===i?void 0:i.length)>0&&e.addSettingsButtonV2(l,d),(null===(a=n.getCaptions(l))||void 0===a?void 0:a.length)>0&&e.addCaptionButton(l,d),!(null!=d&&null!==(s=d.series)&&void 0!==s&&s.enable||null!==(v=window)&&void 0!==v&&null!==(c=v.app_data)&&void 0!==c&&null!==(p=c.appcmsMain)&&void 0!==p&&null!==(m=p.features)&&void 0!==m&&m.auto_play)||null!=d&&d.liveVideo||o.addNextEpPreview(l,d),function(e,l){var i,r=Math.floor(e/60),n=null===(i=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===i?void 0:i[0];n&&(n.style.marginRight=r>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],t=document.getElementsByClassName("vjs-time-control");l&&o.classList.value.includes("vjs-hidden")&&(t[0].style.display="block",n&&(n.style.marginRight="56px"))}(u.duration(),(null==d?void 0:d.liveVideo)||!1),null!=d&&d.liveVideo||t.isMobile()||o.initiateTrickplay(l)}),u.one("play",function(){var i,r,n,o;null!==(i=window)&&void 0!==i&&null!==(r=i.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}require("@babel/runtime/helpers/defineProperty"),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("video.js"),require("./generic-21c8c7ea.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./autoNextVideo-4e20ba6a.js"),require("./util-e1bc715c.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),exports.initialiseSkin=function(r,n){i.getPlayer(r).addClass("skin_defaultv2"),function(){"Chrome"==t.detectBrowser()&&Promise.resolve().then(function(){return require("./chromett-f925fb6c.js")}).then(function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)});Promise.resolve().then(function(){return require("./skin-87c06e34.js")}).then(function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)})}(),d(r,n),function(e,r){var n,o,t,d,u,a,s=i.getPlayer(e);null==s||null===(n=s.controlBar)||void 0===n||null===(o=n.getChild("FullscreenToggle"))||void 0===o||null===(t=o.el())||void 0===t||t.appendChild(i.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null==s||null===(d=s.controlBar)||void 0===d||null===(u=d.getChild("FullscreenToggle"))||void 0===u||null===(a=u.el())||void 0===a||a.appendChild(i.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var v=document.getElementsByClassName("vjs-time-control");r.liveVideo&&v[0]&&(v[0].style.display="none")}(r,n),function(i,r){var n,o,t,d,u,a;0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e.addSkipButton(i,"defaultV2",l.SkipSvgV2());(0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&e.addRewindButton(i,"defaultV2",l.RewindSvgV2());r.liveVideo||e.addSlowMotion(i);(null==r||null===(n=r.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.relatedVideos);(null==r||null===(t=r.streams)||void 0===t?void 0:t.length)>1&&e.addMulticamSelector_DEFAULTV2_TEMP(i,null==r?void 0:r.streams);(null==r||null===(d=r.playlist)||void 0===d||null===(u=d.content)||void 0===u?void 0:u.length)>0&&e.addPlaylistSelector(i,null==r?void 0:r.playlist);null!=r&&null!==(a=r.series)&&void 0!==a&&a.enable&&e.addSeriesSelectorV2_DEFAULTV2_TEMP(i,r)}(r,n),o.addTVProviderImage(r,n)};
@@ -1 +1 @@
1
- "use strict";var e=require("./generic-ac6915a3.js"),r=require("./skin-f87e1c22.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray");var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};exports.initaliseSkin=function(n){Promise.resolve().then(function(){return require("./skin-225252ff.js")}).then(function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)}),i(),function(i){var n=document.getElementById("".concat(i)),t=r.getPlayer(i);n&&n.addEventListener("touchstart",function(){t.paused()?e.play(i):e.pause(i)})}(n)};
1
+ "use strict";var e=require("./generic-21c8c7ea.js"),r=require("./skin-f87e1c22.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("video.js"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray");var i=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden")};exports.initaliseSkin=function(n){Promise.resolve().then(function(){return require("./skin-225252ff.js")}).then(function(e){var r=document.createElement("style");r.id="carousel_homepage",r.append("".concat(e.default)),document.head.appendChild(r)}),i(),function(i){var n=document.getElementById("".concat(i)),t=r.getPlayer(i);n&&n.addEventListener("touchstart",function(){t.paused()?e.play(i):e.pause(i)})}(n)};
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0ea2e662.js"),d=require("./generic-ac6915a3.js"),r=require("./skin-f87e1c22.js"),s=require("./autoNextVideo-630079de.js"),c=require("./localisation-56e0a999.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-e1bc715c.js");var m=l.getComponent("Component"),v=function(){n(y,m);var v,p,h=(v=y,p=u(),function(){var e,t=i(v);if(p){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(i=h.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(n=l.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==l||null===(o=l.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(d.setVideoIdx(0),s.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(y,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-b6e03076.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(r.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),r.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),r.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";r.highlightVideo(e),d.load(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var d=l.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),s=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),u=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,d,c,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(r.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||r.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(u,p),l.dom.appendContent(s,u)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,d),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,s),r.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=v;
1
+ "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),l=require("video.js"),a=require("./icons-0ea2e662.js"),d=require("./generic-21c8c7ea.js"),r=require("./skin-f87e1c22.js"),s=require("./autoNextVideo-4e20ba6a.js"),c=require("./localisation-56e0a999.js");function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(u=function(){return!!e})()}require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("./browser-38ff3331.js"),require("js-cookie"),require("ua-parser-js"),require("./captions-bc814903.js"),require("@babel/runtime/helpers/toConsumableArray"),require("./util-e1bc715c.js");var m=l.getComponent("Component"),v=function(){n(y,m);var v,p,h=(v=y,p=u(),function(){var e,t=i(v);if(p){var n=i(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return o(this,e)});function y(t){var n,o,i,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,y),(i=h.call(this,t,l)).playerId=l.playerId,i.seriesData=l.sres,i.videos=l.related.content,i.cb=(null==l||null===(n=l.related)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==l||null===(o=l.related)||void 0===o?void 0:o.autoNext)||!1,i.currentVideoData=l.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&(d.setVideoIdx(0),s.autoPlayNext({playerId:i.playerId,content:i.videos,cb:i.cb})),i}return t(y,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("button",{className:"video-selector-icon",title:"video selector",innerHTML:"".concat(a.PlaylistIcon())});return l.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then(function(){return require("./videoSelector-b6e03076.js")}).then(function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),n=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;e.handleTabIndexSelector(),null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")?(r.closeOpenDrawers(),n.classList.remove("hidden"),t.classList.add("open"),r.setUpdatedElHeight(e.playerId,n)):(n.classList.add("hidden"),t.classList.remove("open"))};var o=document.getElementById(this.playerId);if(o){var i=window.getComputedStyle(o,null).getPropertyValue("height");n.style.height="".concat(i),l.dom.appendContent(t,n),o.style.overflow="hidden",this.addFunctionality(n),r.detectOrientationChange(this.playerId,n)}}},{key:"loadVideoAssetById",value:function(e){var t=this;d.setVideoIdx(e+1);for(var n=l.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";r.highlightVideo(e),d.load(this.playerId,this.videos[e].id).then(function(e){t.cb&&t.cb(e)}).catch(function(e){t.cb&&t.cb(e)})}},{key:"handleTabIndexSelector",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=0);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))[0]&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=0)}},{key:"handleCloseTabIndex",value:function(){var e,t,n;null!==(e=document.getElementsByClassName("video-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("video-selector-cross-icon")[0].tabIndex=-1);for(var o=document.getElementsByClassName("video-accessibility"),i=(null==o||null===(t=o[0])||void 0===t||null===(n=t.children)||void 0===n?void 0:n.length)||0,l=0;l<i;l++)document.getElementsByClassName("recommended -".concat(l))&&(document.getElementsByClassName("recommended -".concat(l))[0].tabIndex=-1)}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=l.dom.createEl("div",{className:"video-selector-head"}),i=l.dom.createEl("div",{className:"video-selector-cross-icon",ariaLabel:"close video selector",tabIndex:-1,innerHTML:"".concat(a.crossIconSvg())});i.onkeydown=function(o){"Enter"===o.key&&(e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex())},i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),t.handleCloseTabIndex()};for(var d=l.dom.createEl("div",{className:"video-selector-title",innerHTML:c.getLocalisation("relatedVideoTitle")||"Recommended"}),s=l.dom.createEl("div",{className:"video-selector-content",tabIndex:-1}),u=l.dom.createEl("div",{className:"video-container video-accessibility"}),m=function(e){var n,o,i,a,d,c,m,v,p=l.dom.createEl("div",{className:"video -".concat(e)}),h=l.dom.createEl("div",{className:"recommended -".concat(e),ariaLabel:"".concat(t.videos[e].title),type:"button",tabIndex:-1});h.setAttribute("video-idx",e),h.onkeydown=function(n){"Enter"===n.key&&t.loadVideoAssetById(e)},h.onclick=function(){t.loadVideoAssetById(e)};var y=document.createElement("img");y.className="related-thumbnail-image",y.src="".concat(r.impolicy16x9(null==t||null===(n=t.videos)||void 0===n||null===(o=n[e])||void 0===o?void 0:o.img)||r.impolicy16x9(null===(i=window)||void 0===i||null===(a=i.app_data)||void 0===a||null===(d=a.appcmsMain)||void 0===d||null===(c=d.images)||void 0===c?void 0:c.placeholderCover)),y.alt="".concat((null==t||null===(m=t.videos[e])||void 0===m?void 0:m.title.trim().split(/\s+/).slice(0,2).join(" "))||""),h.append(y);var b=l.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(v=t.videos[e])||void 0===v?void 0:v.title)||"")});l.dom.appendContent(p,h),l.dom.appendContent(p,b),l.dom.appendContent(u,p),l.dom.appendContent(s,u)},v=0;v<this.videos.length;v++)m(v);l.dom.appendContent(o,d),l.dom.appendContent(o,i),l.dom.appendContent(e,o),l.dom.appendContent(e,s),r.handleDrawerResizing(this.playerId,e)}}]),y}();exports.default=v;