@viewlift/player-backup 0.0.19 → 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-ed9cca11.js → autoNextVideo-874379bc.js} +1 -1
- package/cjs/bundle.css +3 -3
- package/cjs/{caption-settings-b277b008.js → caption-settings-97497b38.js} +1 -1
- package/cjs/{icons-dbd82489.js → icons-7e68432a.js} +1 -1
- package/cjs/index-38c09c75.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-2db1b7b8.js → keyboardShortcuts-037ec70c.js} +1 -1
- package/cjs/{multicam-7c0ab544.js → multicam-a77c332c.js} +1 -1
- package/cjs/{multicamv2-d8135312.js → multicamv2-e00fb160.js} +1 -1
- package/cjs/{mwebPotraitTray-ed78b0bd.js → mwebPotraitTray-3eda04ff.js} +1 -1
- package/cjs/{nextEpisodeButton-8d693576.js → nextEpisodeButton-7f55d339.js} +1 -1
- package/cjs/playlist-560a9e0e.js +1 -0
- package/cjs/{series-f8f4ee39.js → series-cf906525.js} +1 -1
- package/cjs/{skin-0e18d48f.js → skin-1acd8e9b.js} +1 -1
- package/cjs/{skin-7c0ef668.js → skin-3eccd99d.js} +1 -1
- package/cjs/{skin-5af7ca91.js → skin-5596677f.js} +1 -1
- package/cjs/{skin-d429a1c8.js → skin-ce446e57.js} +1 -1
- package/cjs/videoSelector-0152c9e2.js +1 -0
- package/esm/autoNextVideo-1a77f0af.js +1 -0
- package/esm/bundle.css +3 -3
- package/esm/{caption-settings-34dcc021.js → caption-settings-a05b1267.js} +1 -1
- package/esm/{icons-dfb99cd1.js → icons-07212489.js} +1 -1
- package/esm/index-891fb6d6.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-4d7e8828.js → keyboardShortcuts-a85dff24.js} +1 -1
- package/esm/{multicam-202b712d.js → multicam-50200de0.js} +1 -1
- package/esm/{multicamv2-a196aa46.js → multicamv2-48beaaeb.js} +1 -1
- package/esm/{mwebPotraitTray-2bfe5beb.js → mwebPotraitTray-ed284075.js} +1 -1
- package/esm/{nextEpisodeButton-ec2147e7.js → nextEpisodeButton-7bc0fce1.js} +1 -1
- package/esm/playlist-2ac9b3d2.js +1 -0
- package/esm/{series-b3754020.js → series-273a8984.js} +1 -1
- package/esm/skin-33fca289.js +1 -0
- package/esm/{skin-78ff53d6.js → skin-6ba058c3.js} +1 -1
- package/esm/{skin-abb8a1be.js → skin-84a35d49.js} +1 -1
- package/esm/{skin-9715f799.js → skin-b42b45b4.js} +1 -1
- package/esm/videoSelector-6784f5b8.js +1 -0
- package/package.json +1 -1
- package/cjs/index-f3bdd454.js +0 -1
- package/cjs/playlist-92c0fd5b.js +0 -1
- package/cjs/videoSelector-60c4b9cf.js +0 -1
- package/esm/autoNextVideo-57d95a29.js +0 -1
- package/esm/index-8577b57e.js +0 -1
- package/esm/playlist-a8bfbb1d.js +0 -1
- package/esm/skin-4925944b.js +0 -1
- package/esm/videoSelector-ba8c5ad4.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,M as t,b as n,c as s,d as o,S as r,e as l,N as a}from"./icons-
|
|
1
|
+
import{a as e,M as t,b as n,c as s,d as o,S as r,e as l,N as a}from"./icons-07212489.js";import{g as i,d as c,c as u}from"./index-891fb6d6.js";import d from"@babel/runtime/helpers/defineProperty";import{i as m}from"./keyboardShortcuts-a85dff24.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"video.js/dist/video-js.min.css";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,s)}return n}function v(l,a){var m=i(l);m.one("play",(function(){null!=a&&a.streams&&e(l,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){d(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},a)),null!=a&&a.airplay&&"Safari"==c()&&m.addChild("airPlayButton"),null!=a&&a.chromecastReceiverId&&m.addChild("chromecastButton"),m.addChild("FullscreenToggle"),m.getChild("FullscreenToggle").el().appendChild(u(t(window.controlsColor))),m.getChild("FullscreenToggle").el().appendChild(u(n(window.controlsColor))),f(l)})),m.on("loadedmetadata",(function(){window.endFirstFrame(m),"Safari"!==c()&&s(l,"live",r())})),m.one("loadedmetadata",(function(){var e;null!=a&&a.streams&&(null==a||null===(e=a.streams)||void 0===e?void 0:e.length)>=2&&o(l,a)}))}function b(e,t){var n;m(e,t),(null==(n=t)||!n.liveui)&&(null==n||!n.liveVideo)||null!=n&&n.liveui&&null!=n&&n.liveVideo?import("./dvr_skin-9cc1b144.js").then((function(e){var t=document.createElement("style");t.id="dvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})):import("./nondvr_skin-64be70e5.js").then((function(e){var t=document.createElement("style");t.id="nondvr_skin",t.append("".concat(e.default)),document.head.appendChild(t)})),function(e,t){l(e)}(e),function(e,t){var n=i(e),s=n.controlBar.getChild("SubsCapsButton").el();document.getElementsByClassName("vjs-subs-caps-button")[1].appendChild(u(a()));var o=document.createElement("div");o.classList.add("caption-header"),s.querySelector(".vjs-menu-content").insertBefore(o,s.querySelector(".vjs-menu-item"));var r=document.createElement("div");if(r.innerText="Captions",r.className="fs14",document.getElementsByClassName("vjs-subs-caps-button")[0].appendChild(r),"Safari"==c()){document.getElementsByClassName("vjs-subs-caps-button")[0].style.left="9.5rem"}null!=t&&t.liveui||null==t||!t.liveVideo||(document.getElementsByClassName("vjs-progress-control")[0].style.display="none")}(e,t),v(e,t)}var h;function f(e){var t=i(e);g(),t.on("pause",(function(){clearTimeout(h),y()})),t.on("play",(function(){g()}));var n=document.getElementById("".concat(e));n.addEventListener("mouseenter",(function(){y(),t.paused()||g()})),n.addEventListener("touchstart",(function(){y(),g()})),n.addEventListener("mousemove",(function(){y(),t.paused()||g()}))}function y(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-airplay-button")[0],n=document.getElementsByClassName("vjs-fullscreen-control")[0];null!=e&&e.classList.contains("hideoutsidecontrols")&&(null==e||e.classList.remove("hideoutsidecontrols")),n.classList.contains("hideoutsidecontrols")&&n.classList.remove("hideoutsidecontrols"),null!=t&&t.classList.contains("hideoutsidecontrols")&&t.classList.remove("hideoutsidecontrols")}function g(){var e=document.getElementsByClassName("vjs-chromecast-button")[0],t=document.getElementsByClassName("vjs-fullscreen-control")[0],n=document.getElementsByClassName("vjs-airplay-button")[0];clearTimeout(h),h=setTimeout((function(){null==e||e.classList.add("hideoutsidecontrols"),null==t||t.classList.add("hideoutsidecontrols"),null==n||n.classList.add("hideoutsidecontrols")}),2200)}export{f as hideControls,b as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,p as t,e as r}from"./index-
|
|
1
|
+
import{g as e,p as t,e as r}from"./index-891fb6d6.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";function i(i){import("./skin-2c638dc1.js").then((function(e){var t=document.createElement("style");t.id="carousel_homepage",t.append("".concat(e.default)),document.head.appendChild(t)})),n(),function(i){var n=document.getElementById("".concat(i)),o=e(i);n&&n.addEventListener("touchstart",(function(){o.paused()?t(i):r(i)}))}(i)}var n=function(){document.getElementsByClassName("vjs-control-bar")[0].style.visibility="hidden"};export{i as initaliseSkin};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{E as a,r as l}from"./icons-07212489.js";import{g as c,j as s,l as d,k as m}from"./index-891fb6d6.js";import{a as u}from"./autoNextVideo-1a77f0af.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,r=i(e);if(t){var a=i(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return n(this,o)}}var v=r.getComponent("Component"),h=function(n){o(h,v);var i=p(h);function h(t){var o,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=i.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,r.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&u({playerId:r.playerId,content:r.videos,cb:r.cb}),r}return t(h,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-7f66813a.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.el(),t=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(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 o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=r.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),u=r.dom.createEl("div",{className:"video-selector-content"}),p=r.dom.createEl("div",{className:"video-container"}),v=function(e){var o,n=r.dom.createEl("div",{className:"video -".concat(e)}),i=r.dom.createEl("div",{className:"recommended -".concat(e)});i.setAttribute("video-idx",e),i.onclick=function(){m(e+1);for(var o=r.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";s(e),d(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var a=document.createElement("img");a.className="related-thumbnail-image",a.src="".concat(t.videos[e].img),a.alt="No Thumbnail Available",i.append(a);var l=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(o=t.videos[e])||void 0===o?void 0:o.title)||"")});r.dom.appendContent(n,i),r.dom.appendContent(n,l),r.dom.appendContent(p,n),r.dom.appendContent(u,p)},h=0;h<this.videos.length;h++)v(h);r.dom.appendContent(n,i),r.dom.appendContent(n,a),r.dom.appendContent(e,n),r.dom.appendContent(e,u),c(this.playerId).on("fullscreenchange",(function(){var o=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(o,"px")}))}}]),h}();export{h as default};
|
package/package.json
CHANGED
package/cjs/index-f3bdd454.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";require("video.js/dist/video-js.min.css");var e=require("@babel/runtime/helpers/defineProperty"),t=require("axios"),n=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),i=require("video.js"),r=require("@babel/runtime/helpers/toConsumableArray"),a=require("@babel/runtime/helpers/classCallCheck"),l=require("@babel/runtime/helpers/createClass"),d=require("@babel/runtime/helpers/assertThisInitialized"),s=require("@babel/runtime/helpers/inherits"),u=require("@babel/runtime/helpers/possibleConstructorReturn"),c=require("@babel/runtime/helpers/getPrototypeOf"),v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status","beacon-msn-dev":"https://analytics-api.develop.monumentalsportsnetwork.com/player-beacon","beacon-msn-qa":"https://analytics-api.qa.monumentalsportsnetwork.com/player-beacon","beacon-msn-uat":"https://analytics-api.uat.monumentalsportsnetwork.com/player-beacon","beacon-msn-prod":"https://analytics-api.monumentalsportsnetwork.com/player-beacon","beacon-prod":"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series"};function m(){window.dataLayer.push(arguments)}function p(e,t){m("event",e,t)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?f(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var w=3e4;function g(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function y(){var e=window.sessionStorage.getItem("uid");return e||(e=g(),window.sessionStorage.setItem("uid",e),e)}function b(e){return e?String(e):""}window.initialise=function(e){var t,n,o;window.sid=g();var i=function(e){switch(e){case"prod":default:return v["beacon-prod"];case"msndev":return v["beacon-msn-dev"];case"msnqa":return v["beacon-msn-qa"];case"msnuat":return v["beacon-msn-uat"];case"msnprod":return v["beacon-msn-prod"]}}((null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.url)||"prod");window.beaconUrl=i,window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,o,i,r=Math.floor(e.currentTime());p(r?"FAILED_TO_START":"DROPPED_STREAM",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),w),p("PLAY",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),w))})))},window.handleBufferTimer=function(e,t){if(t.el_){var n,o,i,r=e+30;if(Math.round(r,2)%5==0)p("BUFFERING",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return r}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",h({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,o,i,r,a;p("AD_REQUEST",h({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1}),p("AD_IMPRESSION",h({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),a=o.end(i);if(T(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var T=function(e,t,n){return e>=t&&e<=n};function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?O(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):O(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window.fireEvent=function(e){var n,o,i,r=[h(h({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params),{},{uid:y(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:b(e.videoPosition),environment:window.environment,dp1:e.dp1||"",dp2:e.dp2||"",dp3:e.dp3||"",dp4:e.dp4||"",dp5:e.dp5||"",apos:!0===e.isAdEvent?b(e.videoPosition):"",apod:!0===e.isAdEvent?b(e.adPosition):"",profid:"",player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:"",ttfirstframe:b(e.ttFirstFrame),bitrate:b(e.bitrate),connectionspeed:"",resolutionheight:b(e.resHeight),resolutionwidth:b(e.resWidth),bufferhealth:b(e.bufferHealth)})];t({url:window.beaconUrl,method:"post",contentType:"application/x-www-form-urlencoded",dataType:"text",data:r}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var I=function(e,n){var o,i;return t({url:A(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})},k=function(e,n){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return t({method:"GET",url:C(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return t({method:"GET",url:D(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},P=function(e){return H()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(e)},S=function(){return H()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV1)},C=function(e){return H()+"".concat(null==v?void 0:v.getVideoInfoV1,"/").concat(e)},D=function(e,t){return H()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(t,"/").concat(e)},x=function(){return H()+"".concat(null==v?void 0:v.saveWatchHistoryV1)},j=function(){return H()+"".concat(null==v?void 0:v.saveWatchHistoryV2)},A=function(){return H()+"".concat(null==v?void 0:v.getVideoDetails)},R=function(e,t){return H()+"".concat(null==v?void 0:v.getSeriesDetails)},H=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==v?void 0:v.apiBaseUrl)},B=function(e,t){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},_=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var F=function(){return navigator.userAgent.indexOf("Edg")>-1?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function N(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function M(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?N(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):N(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var V,L,q=function(e,t){var n,o,i,r,a,l,d,s,u=null==e||null===(n=e.video)||void 0===n?void 0:n.drmEnabled,c=null==e||null===(o=e.video)||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,v=(null==e||null===(r=e.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(l=a.videoAssets)||void 0===l?void 0:l.hls)||!1,m=(null==e||null===(d=e.video)||void 0===d||null===(s=d.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;if(u){var p=W(c,t);return m&&(p=M(M({},p),{},{src:U(M(M({},e.video),{},{src:"".concat(p.src)}))})),p}if(v){var f=z(c);return m&&(f=M(M({},f),{},{src:U(M(M({},e.video),{},{src:"".concat(f.src)}))})),f}if(null!=c&&c.mpeg){var h=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(c);return h}return null},U=function(e){var t=e.src;if(e.liveDetails.startOverTime){var n=e.liveDetails.startOverTime,o=e.gist.scheduleStartDate,i=e.gist.scheduleEndDate,r=new Date,a=0,l=r.getTime();a=l-o<1e3*n?l-o:1e3*n;var d=null;i<=l&&null!=i&&(d=new Date(i)),r.setMilliseconds(r.getMilliseconds()-a),t=t.includes("?")?i?"".concat(e.src,"&start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"&start=").concat(r.toISOString()):i?"".concat(e.src,"?start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"?start=").concat(r.toISOString())}return t},z=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},W=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=F(),l=oe(t);if("Safari"===a){var d=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,o){console.log(e),e&&n(e),n(null,new Uint8Array(o))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);try{l.eme()}catch(e){}return d}if("Chrome"===a||"Firefox"===a){var s={src:o.url,type:"application/dash+xml",keySystemOptions:[]};return s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken}}}),s}if("IE"===a){var u={src:r.url,type:"application/dash+xml",keySystemOptions:[]};return u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken}}}),u}};var K=function(e){V=e},G=function(){return V},J=function(e,t){for(var n=oe(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id==t&&(i.mode="showing")}},$=function(e,t){for(var n=oe(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id===t&&(i.mode="hidden")}},Q=function(e){var t,n=oe(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind})))||[]},X=function(e,t){var n=oe(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},Y=function(e){i(e).play()},Z=function(e){i(e).pause()},ee=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},te=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},ne=function(e){return!!i.getPlayer("".concat(e))},oe=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},ie=function(e,t,n){var o,i,r,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&k(t,n).then((function(e){var t,n,o,i,r;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){I(t,n).then((function(t){var n,r,l=null==t?void 0:t.data,d=(null==l||null===(n=l.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;K(t.data);var s=q(l,e);if(s){var u,c,v,m,p,f,h,w,g,y,b,T=null==l||null===(u=l.video)||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl,O=oe(e);if(O.pause(e),O.poster(T),de(e,s),O.on("loadstart",(function(){d&&o({status:!0,msg:"Video Loaded",response:l})})),O.on("loadeddata",(function(){_(),o({status:!0,msg:"Video Loaded",response:l})})),O.one("play",(function(){a&&O.currentTime(a)})),O.one("error",(function(){var e;i({status:!1,msg:(null==O||null===(e=O.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==l||null===(v=l.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(p=m.closedCaptions)||void 0===p?void 0:p.length)>0||(null==l||null===(f=l.video)||void 0===f||null===(h=f.closedCaptions)||void 0===h?void 0:h.length)>0)w=((null==l||null===(g=l.video)||void 0===g||null===(y=g.contentDetails)||void 0===y?void 0:y.closedCaptions)||(null==l||null===(b=l.video)||void 0===b?void 0:b.closedCaptions)).filter((function(e){return"VTT"===e.format})),X(e,w);else!function(e){var t=oe(e);t.remoteTextTracks().tracks_.map((function(e){null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else B(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){se(t,e,i)}))}))},re=function(e,t){var n=oe(e);return n.src(t),new Promise((function(e,t){n.on("loadedmetadata",(function(){e({status:!0,msg:"video loaded"})}))}))},ae=function(e){var t=oe(e);if(le(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},le=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove()},de=function(e,t){oe(e).src(t)},se=function(e,t,n){var o,r,a,l,d,s,u=null==e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,c=(null==e||null===(a=e.response)||void 0===a||null===(l=a.data)||void 0===l?void 0:l.errorMessage)||(null==e?void 0:e.message);ne(t)||i(t,{fluid:!0}),B(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[u])||"".concat(c)),n&&n({status:!1,response:e,msg:"".concat(c)})},ue=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden");var t=document.getElementsByClassName("vjs-big-play-button")[0];t&&(t.style.display="none");var n=document.getElementsByClassName("vjs-fullscreen-control")[0];n&&(n.style.display="none")};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function ve(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ce(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ce(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var me=function(e,t){var n=oe(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,o,r,a,l,d=this.el(),s=i.dom.getPointerPosition(d,t).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(a=r.CastContext)||void 0===a||null===(l=a.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*s,v.seek()}}))},pe=function(e){return new Promise((function(t,n){if(fe(e))n("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!1,o.src=e,document.head.appendChild(o),t()}}))},fe=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0};var he,we,ge=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=Object.freeze({__proto__:null,importChromecast:function(){pe("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"),import("@silvermine/videojs-chromecast").then((function(e){e.default(i)}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),pe("https://imasdk.googleapis.com/js/sdkloader/ima3.js")},loadDashLibrary:ge,loadEMELibrary:ye}),Te=[],Oe=0;function Ee(e,n,o){var i;Te=[],Oe=0,he=o;var r=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=oe(e);a&&a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());Te.includes(Oe)||(e==Oe?(Te.push(e),function(e,n,o){var i,r,a;we=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var l=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,d=Math.floor(e.currentTime()),s=Math.floor(e.duration()),u=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,c={};"v1"==we?c={videoId:he,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:u}:"v2"==we&&(c={videoId:he,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),doneWatching:d>=s-5,profileId:l});(function(e,n,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return t({url:x(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r={doneWatching:!1,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime,profileId:null==e?void 0:e.profileId};return t({url:j(),method:"POST",headers:{Authorization:n},data:r})}})(c,n.token,we).then((function(e){})).catch((function(e){})),Oe=d+o}(a,n,r)):e>Oe&&(Oe=e+r))}))}var Ie=function(e,t,n){var o=oe(e);if(o)if(t>=0&&t<=100){var i=parseFloat(t)/100;o.volume(i),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ke=function(e){var t=oe(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function Pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var Se=function(t,n,o,i){var r,a,l=i.res,d=i.sres,s=oe(t),u=(null==l||null===(r=l.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;K(l),s.on("loadstart",(function(){u&&o.resolve({status:!0,msg:"Video Loaded",response:l})})),s.on("loadeddata",(function(){var i;Ie(t,sessionStorage.getItem("volume")||"100");var r,a,s=G();(_(),o.resolve(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Pe(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Pe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:l}:{response:l})),null!=n&&n.watchHistory&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.enable&&!n.isAnonymousUser)&&Ee(t,n,null==s||null===(r=s.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),s.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];s.trigger("subtitlechanged",t)})),s.on("subtitlechanged",(function(e,t){var n,o,i,r,a,l,d,s,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S,p=null===(l=window)||void 0===l||null===(d=l.cast)||void 0===d||null===(s=d.framework)||void 0===s||null===(u=s.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,h=p.getMediaSession(),w=h.media.tracks.filter((function(e){return"TEXT"==e.type}));f=t?new chrome.cast.media.EditTracksInfoRequest([w[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(f)}})),s.on("loadedmetadata",(function(){window.endFirstFrame(s)})),s.one("error",(function(){var e,n;B(t,(null==s||null===(e=s.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==s||null===(n=s.error())||void 0===n?void 0:n.message)||"Some error occured"})})),s.one("play",(function(){null!=n&&n.watchHistoryResumeTime&&s.currentTime(null==n?void 0:n.watchHistoryResumeTime)})),s.on("volumechange",(function(){var e=100*s.volume().toFixed(2);s.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},Ce=function(e,t){var n=null==t?void 0:t.skin;"live"==n?Promise.resolve().then((function(){return require("./skin-7c0ef668.js")})).then((function(n){n.initialiseSkin(e,t)})):"default"==n?Promise.resolve().then((function(){return require("./skin-5af7ca91.js")})).then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?Promise.resolve().then((function(){return require("./skin-d429a1c8.js")})).then((function(t){t.initaliseSkin(e)})):"defaultV2"==n&&Promise.resolve().then((function(){return require("./skin-0e18d48f.js")})).then((function(n){n.initialiseSkin(e,t)}))},De=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)},xe=function(e,t,n){var o=oe(e);o?t>=0&&t<=o.duration()?(n({status:!0,msg:"Successfully seeked to timestamp : ".concat(t)}),o.currentTime(t)):n({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):n("Cannot find player with id: '".concat(e,"'"))},je=function(e,t){var n=oe(e);if(!n)return"Cannot find player with id: '".concat(e,"'");try{return n.playbackRate(t),"Playback speed set to ".concat(t,"x")}catch(e){return"Error: ".concat(e)}},Ae=function(e,t){var n=oe(e);n?n.on("timeupdate",(function(){return t(n.currentTime())})):t("Cannot find player with id: '".concat(e,"'"))},Re=function(e,t){var n=oe(e);n?n.on("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(e,"'"))},He=function(e){var t=oe(e);return t?t.duration():"Cannot find player with id: '".concat(e,"'")};function Be(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}var _e,Fe=i.getComponent("Component"),Ne=function(t){s(o,Fe);var n=Be(o);function o(t){var l,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,o),l=n.call(this,t,s),e(d(l),"masterRenditions",[]),e(d(l),"addCustomFont",(function(e){var t=i.dom.createEl("div",{className:"font hideCustomFonts"}),n=i.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});i.dom.appendContent(t,n);var o=i.dom.createEl("div",{className:"font-options"});o.style.fontSize="12px",l.fontSizeOptions.map((function(e,t){var n=i.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;l.changeFontSize(t)})),i.dom.appendContent(o,n)})),i.dom.appendContent(t,o),i.dom.appendContent(e,t)})),e(d(l),"resetRenditions",(function(){r(document.getElementsByClassName("rendition")).map((function(e){i.dom.removeClass(e,"selected")}))})),l.playerId=null==s?void 0:s.playerId,l.skin=null==s?void 0:s.skin,l.icon=null==s?void 0:s.icon,l.masterRenditions=[],l.fontSizeOptions=[10,12,14],l.createRenditions(s.renditions),window.height=null,l}return l(o,[{key:"toggleContentOnHover",value:function(e,t){var n=i.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=i.dom.$(".renditions",this.contentEl()),n=i.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el();i.dom.$(".setting-icon",this.el()).innerHTML="".concat(this.icon," ").concat("live"===this.skin?"  Settings":""," ");var o=i.dom.createEl("div",{className:"content hidden"}),r=i.dom.createEl("div",{innerHTML:"Quality",className:"title"}),a=i.dom.createEl("div",{className:"resolution"});i.dom.appendContent(a,r),this.toggleContentOnHover(n,o);var l=i.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var o,r,a=i.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(r=e.playlist)||void 0===r?void 0:r.attributes.BANDWIDTH))/1048576).toFixed(1),s="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");s="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var u=i.dom.createEl("p",{innerHTML:s,className:"rendition",res:e.height,bandwidth:e.bandwidth});i.dom.appendContent(a,u),i.dom.appendContent(l,a),u.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,Me(t.playerId,e.target),i.dom.addClass(u,"selected"))}))})),this.addAutoRendition("nondrm",l),"Safari"!=F()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var o=i.dom.createEl("div",{className:"relative"}),r=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(r,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=i.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});i.dom.appendContent(o,d),i.dom.appendContent(l,o),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,Me(t.playerId,e.target),i.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",l)),i.dom.appendContent(a,l),i.dom.appendContent(o,a),i.dom.appendContent(n,o)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var o=null;e&&e.on("cuechange",(function(){var t,n,i=e.activeCues[0];if(console.log((null==i||null===(t=i.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),i&&document.querySelector(".auto.selected")){var r,a,l,d,s,u,c,v;if(null!=i&&null!==(r=i.value)&&void 0!==r&&null!==(a=r.resolution)&&void 0!==a&&a.height&&o!==(null==i||null===(l=i.value)||void 0===l||null===(d=l.resolution)||void 0===d?void 0:d.height))document.querySelector(".auto.selected").innerHTML="Auto ".concat(null==i||null===(c=i.value)||void 0===c||null===(v=c.resolution)||void 0===v?void 0:v.height,"p");o=null==i||null===(s=i.value)||void 0===s||null===(u=s.resolution)||void 0===u?void 0:u.height}}))}},{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"container"}),t=i.dom.createEl("div",{className:"setting-icon"});return i.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var o,r,a,l,d=null===(o=this.player_)||void 0===o||null===(r=o.tech_)||void 0===r?void 0:r.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(l=a.tech_)||void 0===l?void 0:l.vhs.selectPlaylist().attributes.BANDWIDTH,u=i.dom.createEl("div",{className:"relative"}),c=i.dom.createEl("p",{innerHTML:"Auto ".concat(d,"p"),className:"rendition auto selected",bandwidth:s,res:d});c.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),i.dom.addClass(c,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,Me(n.playerId,null,!0))})),i.dom.appendContent(u,c),i.dom.appendContent(t,u)}else{var v=i.dom.createEl("div",{className:"relative"}),m=i.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),i.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,Me(n.playerId,null,!0)})),i.dom.appendContent(v,m),i.dom.appendContent(t,v)}}}]),o}(),Me=function(e,t,n){var o,r=oe(e),a=null==t?void 0:t.bandwidth;if((null==r||null===(o=r.tech_)||void 0===o?void 0:o.vhs)||!1){r.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),r.handleTechPlaying_();var l=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(l),r.play()}),100);var d=i.dom.$(".content");d&&i.dom.addClass(d,"hidden")}else{var s=null==t?void 0:t.qualityIndex;if(n){var u,c;null==r||null===(u=r.dash)||void 0===u||null===(c=u.mediaPlayer)||void 0===c||c.resetSettings()}else{var v,m,p,f;null==r||null===(v=r.dash)||void 0===v||null===(m=v.mediaPlayer)||void 0===m||m.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==r||null===(p=r.dash)||void 0===p||null===(f=p.mediaPlayer)||void 0===f||f.setQualityFor("video",s,!0);var h=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(h),r.play()}),100);var w=i.dom.$(".content");w&&i.dom.addClass(w,"hidden")}}},Ve=Object.freeze({__proto__:null,playSelectedResolution:Me,default:Ne}),Le=function(e){var t,n=oe(e),o=[];if((null==n||null===(t=n.tech_)||void 0===t?void 0:t.vhs)||!1){var i,r,a=null==n||null===(i=n.tech_)||void 0===i||null===(r=i.vhs)||void 0===r?void 0:r.representations();(null==a?void 0:a.length)>0&&(o=null==a?void 0:a.sort((function(e,t){return(null==e?void 0:e.height)==(null==t?void 0:t.height)?(null==t?void 0:t.bandwidth)-(null==e?void 0:e.bandwidth):(null==t?void 0:t.height)-(null==e?void 0:e.height)})))}else{var l,d,s=null==n||null===(l=n.dash)||void 0===l||null===(d=l.mediaPlayer)||void 0===d?void 0:d.getBitrateInfoListFor("video");(null==s?void 0:s.length)>0&&(o=null==s?void 0:s.sort((function(e,t){return t.height-e.height})))}return o};function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ue(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?qe(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):qe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var ze=function(t,r,a,l){var d,s,u,c,v,m,p,f,h,w,g,y,b,T,O=r.res,E=void 0===O?null:O,I=r.sres,k=void 0===I?null:I,P=(null===(d=window)||void 0===d||null===(s=d.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(v=c.getInstance())||void 0===v?void 0:v.S)||void 0,S=null!=a&&a.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==P&&"NOT_CONNECTED"!==P?["html5","chromecast"]:["chromecast","html5"]:["html5"],C=null==E||null===(m=E.video)||void 0===m||null===(p=m.gist)||void 0===p?void 0:p.videoImageUrl,D=(null==E||null===(f=E.video)||void 0===f||null===(h=f.liveDetails)||void 0===h?void 0:h.isDvrEnabled)||!1,x=function(e){var t={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&(t={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-6,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==F()&&(t=ve(ve({},t),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-1}})),t}(a),j=(null==E||null===(w=E.video)||void 0===w||null===(g=w.streamingInfo)||void 0===g?void 0:g.isLiveStream)||!1,A=Ue(Ue({controls:!0,playsinline:!0,fluid:!0},"carousel"==a.skin&&{muted:!0}),{},(T={autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,pictureInPictureToggle:(a.skin,!1)},liveui:D},e(T,"autoplay",null==a?void 0:a.autoplay),e(T,"html5",Ue(Ue(Ue({vhs:{limitRenditionByPlayerDimensions:!1}},0==(null==a||null===(y=a.customData)||void 0===y?void 0:y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(b=a.customData)||void 0===b?void 0:b.nativeVideoTracks)&&{nativeVideoTracks:!1}),{},{nativeTextTracks:!1})),e(T,"poster",C),e(T,"techOrder",S),e(T,"chromecast",{requestCustomDataFn:function(e){var n=oe(t);console.log(n.textTracksJson_);var o=n.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,n){var o,i,r,a,l,d,s,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=f}var h=(null==e||null===(o=e.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=h;var w=null==e||null===(r=e.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.runtime;m.duration=w;var g=null==e||null===(l=e.video)||void 0===l||null===(d=l.gist)||void 0===d?void 0:d.title;m.mediaTitle=g;var y=null==e||null===(s=e.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(E,e,o)}}),e(T,"plugins",x),T)),R=i(t,A,function(){var e=n(o.mark((function e(){var n,r,d,s,u,c,v,m,p,f,h,w,g,y,b,T,O,I,P,S,C,x,H,_,N;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(j&&l.resolve(Ue({status:!0,msg:"Player Initialised"},k?{seriesResponse:k,response:E}:{response:E})),window.initialise(R),window.firstFrame(R),"white"!==window.controlsColor&&De(window.controlsColor,R),/Android|iPhone/i.test(navigator.userAgent)&&(i.options.hls.overrideNative=!0),O=null==E||null===(n=E.video)||void 0===n?void 0:n.drmEnabled,I=(null==E||null===(r=E.ads)||void 0===r||null===(d=r.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(u=s.web)||void 0===u?void 0:u.active)&&(null==E||null===(c=E.ads)||void 0===c||null===(v=c.preRoll)||void 0===v||null===(m=v.adTags)||void 0===m||null===(p=m.web)||void 0===p?void 0:p.url),P=null==E||null===(f=E.video)||void 0===f||null===(h=f.liveDetails)||void 0===h?void 0:h.startOverTime,!O){e.next=16;break}if("Safari"!==F()){e.next=14;break}return e.next=12,ye();case 12:e.next=16;break;case 14:return e.next=16,Promise.all([ye(),ge()]);case 16:D&&me(t,P),I&&initialiseAdvertisement(t,I),(S=q(E,t))?de(t,S):(l.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:E}),B(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==E||null===(w=E.video)||void 0===w||null===(g=w.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null==E||null===(b=E.video)||void 0===b||null===(T=b.closedCaptions)||void 0===T?void 0:T.length)>0)&&(N=(null==E||null===(x=E.video)||void 0===x||null===(H=x.contentDetails)||void 0===H?void 0:H.closedCaptions)||(null==E||null===(_=E.video)||void 0===_?void 0:_.closedCaptions),C=N.filter((function(e){return"VTT"===e.format})),X(t,C)),null!=a&&a.disableControls?ue():Ce(t,Ue(Ue(Ue({},a),A),{},{liveVideo:j,isDvrEnabled:D,res:E,sres:k})),Se(t,Ue(Ue(Ue({},a),A),{},{liveVideo:j}),l,{res:E,sres:k});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};exports.VLPlayerCore=function(){return{loadVideoInstantly:re,onTimeUpdate:Ae,getVideoDuration:He,onVideoEnded:Re,init:function(e){return new Promise((function(n,o){var i,r,a,l,d;if(!ne(null==e?void 0:e.playerId)){var s=null==e?void 0:e.videoId,u=(null==e?void 0:e.series)||!1;window.videoId=s;var c=null==e?void 0:e.token;_e=JSON.parse(atob(c.split(".")[1])),e.isAnonymousUser=!(null===(i=_e)||void 0===i||!i.anonymousId),e.siteOwner=(null===(r=_e)||void 0===r?void 0:r.site)||null,e.userId=(null===(a=_e)||void 0===a?void 0:a.userId)||null,window.sessionStorage.setItem("uid",null===(l=_e)||void 0===l?void 0:l.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",c);var v,p=null==e?void 0:e.playerId,f=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,h=null==e?void 0:e.airplay,w=null==e?void 0:e.apiBaseUrl,g=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,y=null==e?void 0:e.errors;y&&(window.customErrors=y),window.customData=null==e?void 0:e.customData,w&&(window.playerEntitlementUrl=w),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&("live"===(v=e.skin)||"carousel"===v||"V2"===v||"defaultV2"===v)||(e.skin="default"),null!=e&&e.enableAdvertisements&&Promise.resolve().then((function(){return be})).then((function(e){e.importIMA()})),!f||null!=e&&e.series||Promise.resolve().then((function(){return be})).then((function(e){e.importChromecast()})),h&&Promise.resolve().then((function(){return be})).then((function(e){e.importAirplay()})),g&&pe("https://www.googletagmanager.com/gtag/js?id=".concat(g)).then((function(){return e=g,window.dataLayer=window.dataLayer||[],m("js",new Date),void m("config",e);var e})).catch((function(e){})),u?function(e,n){var o,i,r=JSON.parse(atob(n.split(".")[1])),a=r&&r.countryCode;return t({url:R(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web",countryCode:a,episodeData:!0},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})}(s,c).then((function(t){var i=t.data.series,r=t.data.series.seasons[0].episodes[0].id;I(r,c).then((function(t){var r,a,l;window.contentType=null==t||null===(r=t.data)||void 0===r||null===(a=r.video)||void 0===a||null===(l=a.gist)||void 0===l?void 0:l.contentType,K(t.data),ze(p,{res:null==t?void 0:t.data,sres:i},e,{resolve:n,reject:o})})).catch((function(e){se(e,p,o)}))})).catch((function(e){se(e,p,o)})):I(s,c).then((function(t){var i,r,a,l;window.contentType=null==t||null===(i=t.data)||void 0===i||null===(r=i.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.contentType,K(null==t?void 0:t.data);var d=null==t?void 0:t.data;null!=e&&e.watchHistory&&null!=e&&null!==(l=e.watchHistory)&&void 0!==l&&l.enable?k(s,c).then((function(t){var i,r,a,l,s;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(null==t?void 0:t.data)),e.watchHistoryResumeTime=(null==t||null===(s=t.data)||void 0===s?void 0:s.watchedTime)||null,ze(p,{res:d},e,{resolve:n,reject:o})})).catch((function(t){var i,r,a,l;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(t)),ze(p,{res:d},e,{resolve:n,reject:o})})):ze(p,{res:d},e,{resolve:n,reject:o})})).catch((function(e){se(e,p,o)}))}}))},getRenditions:Le,skip:ee,getPlayer:oe,play:Y,pause:Z,detectBrowser:F,rewind:te,loadVideo:de,seekToTimeStamp:xe,isPlayerInitialised:ne,load:ie,dispose:ae,enableCaptions:J,disableCaptions:$,getCaptions:Q,playSelectedResolution:Me,getSource:q,setVolume:Ie,getVolume:ke,disableControls:ue,setPlaybackSpeed:je}},exports.createIconMarkup=function(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]},exports.detectBrowser=F,exports.disableCaptions=$,exports.enableCaptions=J,exports.getCaptions=Q,exports.getCurrentVideo=G,exports.getPlayer=oe,exports.getRenditions=Le,exports.getSeriesWatchHistory=function(e){var n,o;if("v1"==((null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return t({method:"GET",url:S(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return t({method:"GET",url:P(i),headers:{Authorization:e.token}})},exports.getVideoIdx=function(){return L},exports.highlightVideo=function(e){r(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},exports.load=ie,exports.onVideoEnded=Re,exports.pause=Z,exports.play=Y,exports.resolution=Ve,exports.rewind=te,exports.setCurrentVideo=K,exports.setVideoIdx=function(e){L=e},exports.skip=ee;
|
package/cjs/playlist-92c0fd5b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"),o=require("@babel/runtime/helpers/getPrototypeOf"),a=require("video.js"),s=require("./icons-dbd82489.js"),r=require("./index-f3bdd454.js"),d=require("./autoNextVideo-ed9cca11.js");function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,l=o(e);if(t){var a=o(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return i(this,n)}}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/assertThisInitialized");var u=a.getComponent("Component"),p=function(i){l(p,u);var o=c(p);function p(e){var n,l,i,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,p),(a=o.call(this,e,s)).playerId=s.playerId,a.seriesData=s.sres,a.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,a.cb=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==s||null===(i=s.playlist)||void 0===i?void 0:i.autoNext)||!1,a.currentVideoData=s.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&d.autoPlayNext({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(p,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s.EpisodesSvg())});return a.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="video-selecton",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(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=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),i=a.dom.createEl("div",{className:"playlist-selector-head"}),o=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(s.crossIconSvg())});o.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var d=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),c=a.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,i,o=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),d=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),u=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,d),a.dom.appendContent(s,u),a.dom.appendContent(o,s),a.dom.appendContent(c,o);var p=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),m=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(i=n.videos[t])||void 0===i?void 0:i.description)||"")}),v=a.dom.createEl("div",{className:"playlist-image"});v.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(p,v),a.dom.appendContent(p,m),a.dom.appendContent(o,p),a.dom.appendContent(c,o),p.onclick=function(e){e.stopPropagation(),r.setVideoIdx(t+1),r.load(n.playerId,n.videos[t].id,sessionStorage.getItem("token")).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,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(o.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"),o.style.backgroundColor="unset")}},p=0;p<this.videos.length;p++)u(p);a.dom.appendContent(i,o),a.dom.appendContent(i,d),a.dom.appendContent(t,i),a.dom.appendContent(t,c),r.getPlayer(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(n.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}))}}]),p}();exports.default=p;
|
|
@@ -1 +0,0 @@
|
|
|
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"),r=require("video.js"),a=require("./icons-dbd82489.js"),l=require("./index-f3bdd454.js"),c=require("./autoNextVideo-ed9cca11.js");function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return o(this,n)}}require("video.js/dist/video-js.min.css"),require("@babel/runtime/helpers/defineProperty"),require("axios"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("@babel/runtime/helpers/toConsumableArray"),require("@babel/runtime/helpers/assertThisInitialized");var d=r.getComponent("Component"),u=function(o){n(u,d);var i=s(u);function u(t){var n,o,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,u),(r=i.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(n=a.related)||void 0===n?void 0:n.cb)||null,r.autoNext=(null==a||null===(o=a.related)||void 0===o?void 0:o.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&c.autoPlayNext({playerId:r.playerId,content:r.videos,cb:r.cb}),r}return t(u,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a.EpisodesSvg())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){Promise.resolve().then((function(){return require("./videoSelector-462a4bfa.js")})).then((function(e){var t=document.createElement("style");t.id="video-selecton",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(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=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,n=this.el(),o=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(a.crossIconSvg())});i.onclick=function(){e.classList.add("hidden"),n.classList.remove("open"),e.style.right="-350px"};for(var c=r.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),s=r.dom.createEl("div",{className:"video-selector-content"}),d=r.dom.createEl("div",{className:"video-container"}),u=function(e){var n,o=r.dom.createEl("div",{className:"video -".concat(e)}),i=r.dom.createEl("div",{className:"recommended -".concat(e)});i.setAttribute("video-idx",e),i.onclick=function(){l.setVideoIdx(e+1);for(var n=r.dom.$$(".recommended"),o=0;o<n.length;o++)n[o].style.border="none";l.highlightVideo(e),l.load(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var a=document.createElement("img");a.className="related-thumbnail-image",a.src="".concat(t.videos[e].img),a.alt="No Thumbnail Available",i.append(a);var c=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(n=t.videos[e])||void 0===n?void 0:n.title)||"")});r.dom.appendContent(o,i),r.dom.appendContent(o,c),r.dom.appendContent(d,o),r.dom.appendContent(s,d)},m=0;m<this.videos.length;m++)u(m);r.dom.appendContent(o,i),r.dom.appendContent(o,c),r.dom.appendContent(e,o),r.dom.appendContent(e,s),l.getPlayer(this.playerId).on("fullscreenchange",(function(){var n=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(n,"px")}))}}]),u}();exports.default=u;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as n,l as t,i as o,f as e,k as i,j as c}from"./index-8577b57e.js";var a,s=0,u=0,f=function(f){c(0),clearTimeout(s);var d=null==f?void 0:f.content;a=null==f?void 0:f.cb;var h=f.playerId,m=sessionStorage.getItem("token");n(h,(function(){(u=i())>d.length-1||t(h,d[u].id,m).then((function(n){o(u),e(n.response),u++,c(u),l(n)})).catch((function(n){l(n),o(u),u++,c(u),s=setTimeout((function(){r(u,h,d,m)}),3e3)}))}))},r=function n(e,i,a,s,f){e>a.length-1||t(i,a[e].id,s).then((function(n){o(u),u++,c(u),l(n)})).catch((function(t){l(t),setTimeout((function(){o(u),u++,c(u),n(u,i,a,s)}),3e3)}))},l=function(n){a&&a(n)};export{f as a};
|
package/esm/index-8577b57e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"video.js/dist/video-js.min.css";import e from"@babel/runtime/helpers/defineProperty";import t from"axios";import n from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";import i from"video.js";import r from"@babel/runtime/helpers/toConsumableArray";import a from"@babel/runtime/helpers/classCallCheck";import l from"@babel/runtime/helpers/createClass";import d from"@babel/runtime/helpers/assertThisInitialized";import s from"@babel/runtime/helpers/inherits";import u from"@babel/runtime/helpers/possibleConstructorReturn";import c from"@babel/runtime/helpers/getPrototypeOf";var v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status","beacon-msn-dev":"https://analytics-api.develop.monumentalsportsnetwork.com/player-beacon","beacon-msn-qa":"https://analytics-api.qa.monumentalsportsnetwork.com/player-beacon","beacon-msn-uat":"https://analytics-api.uat.monumentalsportsnetwork.com/player-beacon","beacon-msn-prod":"https://analytics-api.monumentalsportsnetwork.com/player-beacon","beacon-prod":"https://1a7ahu122g.execute-api.us-east-1.amazonaws.com/production_beacon/firehouse-proxy",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series"};function m(){window.dataLayer.push(arguments)}function p(e,t){m("event",e,t)}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function h(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?f(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var w=3e4;function g(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function y(){var e=window.sessionStorage.getItem("uid");return e||(e=g(),window.sessionStorage.setItem("uid",e),e)}function b(e){return e?String(e):""}window.initialise=function(e){var t,n,o;window.sid=g();var i=function(e){switch(e){case"prod":default:return v["beacon-prod"];case"msndev":return v["beacon-msn-dev"];case"msnqa":return v["beacon-msn-qa"];case"msnuat":return v["beacon-msn-uat"];case"msnprod":return v["beacon-msn-prod"]}}((null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.url)||"prod");window.beaconUrl=i,window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",(function(){var n,o,i,r=Math.floor(e.currentTime());p(r?"FAILED_TO_START":"DROPPED_STREAM",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}))},window.firstFrame=function(e){e.one("play",tryCatch((function(){var t,n,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval((function(){window.ttFirstFrame=window.handleBufferTimer(window.ttFirstFrame,e)}),w),p("PLAY",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})))},window.buffering=function(e){e.on("waiting",tryCatch((function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval((function(){e.el_.className.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)}),w))})))},window.handleBufferTimer=function(e,t){if(t.el_){var n,o,i,r=e+30;if(Math.round(r,2)%5==0)p("BUFFERING",h({pfm:window.platform,uid:y(),vid:window.videoId,videoPosition:t.el_&&Math.floor(t.currentTime())},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return r}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",(function(){var t,n,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",h({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})}))},window.ads=function(e){e.on("adsready",(function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,(function(){var t,n,o,i,r,a;p("AD_REQUEST",h({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1}),p("AD_IMPRESSION",h({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:y(),vid:window.videoId},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,adPosition:1})})),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,(function(){window.ttFirstFrame=0})),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,(function(){window.ttFirstFrame=0}))}))},window.ping=function(e){var t=[];e.on("timeupdate",(function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))}))},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch((function(){for(var t=e.currentTime(),n=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),a=o.end(i);if(T(t,r,a)){var l=Math.round(n-a);if(isFinite(l))return l}}}))()};var T=function(e,t,n){return e>=t&&e<=n};function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function E(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?O(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):O(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window.fireEvent=function(e){var n,o,i,r=[h(h({aid:window.siteName,cid:window.siteId,pfm:window.platform},null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params),{},{uid:y(),vid:window.videoId,url:e.url||document.location.href,ref:e.ref||document.referrer,pa:e.eventName,vpos:b(e.videoPosition),environment:window.environment,dp1:e.dp1||"",dp2:e.dp2||"",dp3:e.dp3||"",dp4:e.dp4||"",dp5:e.dp5||"",apos:!0===e.isAdEvent?b(e.videoPosition):"",apod:!0===e.isAdEvent?b(e.adPosition):"",profid:"",player:e.playerType||"native",media_type:e.mediaType||"VIDEO",stream_id:window.sid,embedurl:"",ttfirstframe:b(e.ttFirstFrame),bitrate:b(e.bitrate),connectionspeed:"",resolutionheight:b(e.resHeight),resolutionwidth:b(e.resWidth),bufferhealth:b(e.bufferHealth)})];t({url:window.beaconUrl,method:"post",contentType:"application/x-www-form-urlencoded",dataType:"text",data:r}).catch((function(e){console.error(e)}))},window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var I=function(e,n){var o,i;return t({url:x(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})},k=function(e,n){var o,i,r=(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";if("v1"==r){var a,l,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return t({method:"GET",url:D(e),params:{site:s},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return t({method:"GET",url:j(e,v),headers:{Authorization:n,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey}})}},S=function(e){var n,o;if("v1"==((null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1"))return t({method:"GET",url:C(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var i=e.videoId;return t({method:"GET",url:P(i),headers:{Authorization:e.token}})},P=function(e){return B()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(e)},C=function(){return B()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV1)},D=function(e){return B()+"".concat(null==v?void 0:v.getVideoInfoV1,"/").concat(e)},j=function(e,t){return B()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(t,"/").concat(e)},A=function(){return B()+"".concat(null==v?void 0:v.saveWatchHistoryV1)},R=function(){return B()+"".concat(null==v?void 0:v.saveWatchHistoryV2)},x=function(){return B()+"".concat(null==v?void 0:v.getVideoDetails)},H=function(e,t){return B()+"".concat(null==v?void 0:v.getSeriesDetails)},B=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==v?void 0:v.apiBaseUrl)},_=function(e,t){if(import("./error-2395864b.js").then((function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)})),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),i.appendChild(r),o.append(i)}},F=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var N=function(){return navigator.userAgent.indexOf("Edg")>-1?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function V(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?M(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):M(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var L,U,q=function(e,t){var n,o,i,r,a,l,d,s,u=null==e||null===(n=e.video)||void 0===n?void 0:n.drmEnabled,c=null==e||null===(o=e.video)||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,v=(null==e||null===(r=e.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a||null===(l=a.videoAssets)||void 0===l?void 0:l.hls)||!1,m=(null==e||null===(d=e.video)||void 0===d||null===(s=d.liveDetails)||void 0===s?void 0:s.isDvrEnabled)||!1;if(u){var p=K(c,t);return m&&(p=V(V({},p),{},{src:z(V(V({},e.video),{},{src:"".concat(p.src)}))})),p}if(v){var f=W(c);return m&&(f=V(V({},f),{},{src:z(V(V({},e.video),{},{src:"".concat(f.src)}))})),f}if(null!=c&&c.mpeg){var h=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(c);return h}return null},z=function(e){var t=e.src;if(e.liveDetails.startOverTime){var n=e.liveDetails.startOverTime,o=e.gist.scheduleStartDate,i=e.gist.scheduleEndDate,r=new Date,a=0,l=r.getTime();a=l-o<1e3*n?l-o:1e3*n;var d=null;i<=l&&null!=i&&(d=new Date(i)),r.setMilliseconds(r.getMilliseconds()-a),t=t.includes("?")?i?"".concat(e.src,"&start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"&start=").concat(r.toISOString()):i?"".concat(e.src,"?start=").concat(r.toISOString(),"&end=").concat(d.toISOString()):"".concat(e.src,"?start=").concat(r.toISOString())}return t},W=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},K=function(e,t){var n=e.fairPlay,o=e.widevine,r=e.playReady,a=N(),l=ae(t);if("Safari"===a){var d=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,(function(e,t,o){console.log(e),e&&n(e),n(null,new Uint8Array(o))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(t,n,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);try{l.eme()}catch(e){}return d}if("Chrome"===a||"Firefox"===a){var s={src:o.url,type:"application/dash+xml",keySystemOptions:[]};return s.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken}}}),s}if("IE"===a){var u={src:r.url,type:"application/dash+xml",keySystemOptions:[]};return u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken}}}),u}};var G=function(e){L=e},J=function(){return L},$=function(){return U},Q=function(e){U=e},X=function(e,t){for(var n=ae(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id==t&&(i.mode="showing")}},Y=function(e,t){for(var n=ae(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"===i.kind&&i.id===t&&(i.mode="hidden")}},Z=function(e){var t,n=ae(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind})))||[]},ee=function(e,t){var n=ae(e);n.remoteTextTracks().tracks_.map((function(e){n.removeRemoteTextTrack(e)})),t.map((function(e){n.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},te=function(e){i(e).play()},ne=function(e){i(e).pause()},oe=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},ie=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},re=function(e){return!!i.getPlayer("".concat(e))},ae=function(e){return!!i.getPlayer("".concat(e))&&i.getPlayer("".concat(e))},le=function(e,t,n){var o,i,r,a=0;return null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.enable&&k(t,n).then((function(e){var t,n,o,i,r;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null})).catch((function(e){var t,n,o,i;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),new Promise((function(o,i){I(t,n).then((function(t){var n,r,l=null==t?void 0:t.data,d=(null==l||null===(n=l.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;G(t.data);var s=q(l,e);if(s){var u,c,v,m,p,f,h,w,g,y,b,T=null==l||null===(u=l.video)||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl,O=ae(e);if(O.pause(e),O.poster(T),ce(e,s),O.on("loadstart",(function(){d&&o({status:!0,msg:"Video Loaded",response:l})})),O.on("loadeddata",(function(){F(),o({status:!0,msg:"Video Loaded",response:l})})),O.one("play",(function(){a&&O.currentTime(a)})),O.one("error",(function(){var e;i({status:!1,msg:(null==O||null===(e=O.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==l||null===(v=l.video)||void 0===v||null===(m=v.contentDetails)||void 0===m||null===(p=m.closedCaptions)||void 0===p?void 0:p.length)>0||(null==l||null===(f=l.video)||void 0===f||null===(h=f.closedCaptions)||void 0===h?void 0:h.length)>0)w=((null==l||null===(g=l.video)||void 0===g||null===(y=g.contentDetails)||void 0===y?void 0:y.closedCaptions)||(null==l||null===(b=l.video)||void 0===b?void 0:b.closedCaptions)).filter((function(e){return"VTT"===e.format})),ee(e,w);else!function(e){var t=ae(e);t.remoteTextTracks().tracks_.map((function(e){null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else _(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){ve(t,e,i)}))}))},de=function(e,t){var n=ae(e);return n.src(t),new Promise((function(e,t){n.on("loadedmetadata",(function(){e({status:!0,msg:"video loaded"})}))}))},se=function(e){var t=ae(e);if(ue(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},ue=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove()},ce=function(e,t){ae(e).src(t)},ve=function(e,t,n){var o,r,a,l,d,s,u=null==e||null===(o=e.response)||void 0===o||null===(r=o.data)||void 0===r?void 0:r.errorCode,c=(null==e||null===(a=e.response)||void 0===a||null===(l=a.data)||void 0===l?void 0:l.errorMessage)||(null==e?void 0:e.message);re(t)||i(t,{fluid:!0}),_(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[u])||"".concat(c)),n&&n({status:!1,response:e,msg:"".concat(c)})},me=function(){var e=document.getElementsByClassName("vjs-control-bar")[0];e&&(e.style.visibility="hidden");var t=document.getElementsByClassName("vjs-big-play-button")[0];t&&(t.style.display="none");var n=document.getElementsByClassName("vjs-fullscreen-control")[0];n&&(n.style.display="none")};function pe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function fe(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?pe(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):pe(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var he=function(e,t){var n=ae(e);n&&t&&n.controlBar&&n.controlBar.progressControl.seekBar.on("click",(function(t){var n,o,r,a,l,d=this.el(),s=i.dom.getPointerPosition(d,t).x;i.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(a=r.CastContext)||void 0===a||null===(l=a.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var v=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),m=v.h.media[0].liveSeekableRange.end;v.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=m*s,v.seek()}}))},we=function(e){return new Promise((function(t,n){if(ge(e))n("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!1,o.src=e,document.head.appendChild(o),t()}}))},ge=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0};var ye,be,Te=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-dash");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=n(o.mark((function e(){return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("videojs-contrib-eme");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ee=Object.freeze({__proto__:null,importChromecast:function(){we("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"),import("@silvermine/videojs-chromecast").then((function(e){e.default(i)}))},importAirplay:function(){import("@silvermine/videojs-airplay").then((function(e){e.default(i)}))},importIMA:function(){import("videojs-contrib-ads"),import("videojs-ima"),we("https://imasdk.googleapis.com/js/sdkloader/ima3.js")},loadDashLibrary:Te,loadEMELibrary:Oe}),Ie=[],ke=0;function Se(e,n,o){var i;Ie=[],ke=0,ye=o;var r=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=ae(e);a&&a.on("timeupdate",(function(){var e=Math.floor(a.currentTime());Ie.includes(ke)||(e==ke?(Ie.push(e),function(e,n,o){var i,r,a;be=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.apiVersion)||"v1";var l=null==n||null===(r=n.watchHistory)||void 0===r?void 0:r.profileId,d=Math.floor(e.currentTime()),s=Math.floor(e.duration()),u=null==n||null===(a=n.watchHistory)||void 0===a?void 0:a.xapiKey,c={};"v1"==be?c={videoId:ye,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),siteOwner:n.siteOwner,userId:n.userId,xApiKey:u}:"v2"==be&&(c={videoId:ye,watchedTime:Math.floor(e.currentTime()),watchedPercentage:Math.floor(d/s*100),doneWatching:d>=s-5,profileId:l});(function(e,n,o){if("v1"==o){var i={siteOwner:null==e?void 0:e.siteOwner,userId:null==e?void 0:e.userId,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime};return t({url:A(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(i),withCredentials:!0})}if("v2"==o){var r={doneWatching:!1,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime,profileId:null==e?void 0:e.profileId};return t({url:R(),method:"POST",headers:{Authorization:n},data:r})}})(c,n.token,be).then((function(e){})).catch((function(e){})),ke=d+o}(a,n,r)):e>ke&&(ke=e+r))}))}var Pe=function(e,t,n){var o=ae(e);if(o)if(t>=0&&t<=100){var i=parseFloat(t)/100;o.volume(i),n&&n({status:!0,msg:"Volume set to ".concat(t,"%")})}else n&&n({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else n({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Ce=function(e){var t=ae(e);return t?parseInt(100*t.volume())+"%":"Cannot find player with id: '".concat(e,"'")};function De(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}var je=function(t,n,o,i){var r,a,l=i.res,d=i.sres,s=ae(t),u=(null==l||null===(r=l.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;G(l),s.on("loadstart",(function(){u&&o.resolve({status:!0,msg:"Video Loaded",response:l})})),s.on("loadeddata",(function(){var i;Pe(t,sessionStorage.getItem("volume")||"100");var r,a,s=J();(F(),o.resolve(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?De(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!0,msg:"Player Initialised"},d?{seriesResponse:d,response:l}:{response:l})),null!=n&&n.watchHistory&&null!=n&&null!==(i=n.watchHistory)&&void 0!==i&&i.enable&&!n.isAnonymousUser)&&Se(t,n,null==s||null===(r=s.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.id)})),s.textTracks().on("change",(function(e){var t=this.tracks_.filter((function(e){if("subtitles"===e.kind&&"showing"===e.mode)return!0}))[0];s.trigger("subtitlechanged",t)})),s.on("subtitlechanged",(function(e,t){var n,o,i,r,a,l,d,s,u,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,m=null===(n=window)||void 0===n||null===(o=n.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(r=i.CastContext)||void 0===r||null===(a=r.getInstance())||void 0===a?void 0:a.S,p=null===(l=window)||void 0===l||null===(d=l.cast)||void 0===d||null===(s=d.framework)||void 0===s||null===(u=s.CastContext)||void 0===u||null===(c=u.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===m){var f,h=p.getMediaSession(),w=h.media.tracks.filter((function(e){return"TEXT"==e.type}));f=t?new chrome.cast.media.EditTracksInfoRequest([w[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),h.editTracksInfo(f)}})),s.on("loadedmetadata",(function(){window.endFirstFrame(s)})),s.one("error",(function(){var e,n;_(t,(null==s||null===(e=s.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==s||null===(n=s.error())||void 0===n?void 0:n.message)||"Some error occured"})})),s.one("play",(function(){null!=n&&n.watchHistoryResumeTime&&s.currentTime(null==n?void 0:n.watchHistoryResumeTime)})),s.on("volumechange",(function(){var e=100*s.volume().toFixed(2);s.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}))},Ae=function(e,t){var n=null==t?void 0:t.skin;"live"==n?import("./skin-abb8a1be.js").then((function(n){n.initialiseSkin(e,t)})):"default"==n?import("./skin-78ff53d6.js").then((function(n){n.initialiseSkin(e,t)})):"carousel"==n?import("./skin-9715f799.js").then((function(t){t.initaliseSkin(e)})):"defaultV2"==n&&import("./skin-4925944b.js").then((function(n){n.initialiseSkin(e,t)}))},Re=function(e,t){t.controlBar.el_.style.color=e,t.controlBar.el_.querySelector(".vjs-play-progress")&&(t.controlBar.el_.querySelector(".vjs-play-progress").style.backgroundColor=e),t.controlBar.el_.querySelector(".vjs-volume-level")&&(t.controlBar.el_.querySelector(".vjs-volume-level").style.backgroundColor=e)},xe=function(e,t,n){var o=ae(e);o?t>=0&&t<=o.duration()?(n({status:!0,msg:"Successfully seeked to timestamp : ".concat(t)}),o.currentTime(t)):n({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):n("Cannot find player with id: '".concat(e,"'"))},He=function(e,t){var n=ae(e);if(!n)return"Cannot find player with id: '".concat(e,"'");try{return n.playbackRate(t),"Playback speed set to ".concat(t,"x")}catch(e){return"Error: ".concat(e)}},Be=function(e,t){var n=ae(e);n?n.on("timeupdate",(function(){return t(n.currentTime())})):t("Cannot find player with id: '".concat(e,"'"))},_e=function(e,t){var n=ae(e);n?n.on("ended",(function(){return t(!0)})):t("Cannot find player with id: '".concat(e,"'"))},Fe=function(e){var t=ae(e);return t?t.duration():"Cannot find player with id: '".concat(e,"'")};function Ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=c(e);if(t){var i=c(this).constructor;n=Reflect.construct(o,arguments,i)}else n=o.apply(this,arguments);return u(this,n)}}var Me,Ve=i.getComponent("Component"),Le=function(t){s(o,Ve);var n=Ne(o);function o(t){var l,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a(this,o),l=n.call(this,t,s),e(d(l),"masterRenditions",[]),e(d(l),"addCustomFont",(function(e){var t=i.dom.createEl("div",{className:"font hideCustomFonts"}),n=i.dom.createEl("p",{className:"customFontHeading",innerHTML:"Font Size"});i.dom.appendContent(t,n);var o=i.dom.createEl("div",{className:"font-options"});o.style.fontSize="12px",l.fontSizeOptions.map((function(e,t){var n=i.dom.createEl("div",{className:"options",innerHTML:'<div class="radio-item" >\n <input class=opt'.concat(t,' type="radio" id=').concat(e,' name="item" />\n <label class="radio-btn-lable" for=').concat(e,">").concat(e,"pt</label>\n </div>")});n.addEventListener("click",(function(e){var t=e.target.id;l.changeFontSize(t)})),i.dom.appendContent(o,n)})),i.dom.appendContent(t,o),i.dom.appendContent(e,t)})),e(d(l),"resetRenditions",(function(){r(document.getElementsByClassName("rendition")).map((function(e){i.dom.removeClass(e,"selected")}))})),l.playerId=null==s?void 0:s.playerId,l.skin=null==s?void 0:s.skin,l.icon=null==s?void 0:s.icon,l.masterRenditions=[],l.fontSizeOptions=[10,12,14],l.createRenditions(s.renditions),window.height=null,l}return l(o,[{key:"toggleContentOnHover",value:function(e,t){var n=i.dom.$(".setting-icon",e);n.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),t.addEventListener("mouseover",(function(){i.dom.removeClass(t,"hidden")})),n.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")})),t.addEventListener("mouseout",(function(){i.dom.addClass(t,"hidden")}))}},{key:"changeFontSize",value:function(e){var t=i.dom.$(".renditions",this.contentEl()),n=i.dom.$(".font-options",this.contentEl());t.style.fontSize="".concat(e,"px"),n.style.fontSize="".concat(e,"px")}},{key:"createRenditions",value:function(e){var t=this,n=this.el();i.dom.$(".setting-icon",this.el()).innerHTML="".concat(this.icon," ").concat("live"===this.skin?"  Settings":""," ");var o=i.dom.createEl("div",{className:"content hidden"}),r=i.dom.createEl("div",{innerHTML:"Quality",className:"title"}),a=i.dom.createEl("div",{className:"resolution"});i.dom.appendContent(a,r),this.toggleContentOnHover(n,o);var l=i.dom.createEl("div",{className:"renditions"});this.player_.tech_.vhs?(e.map((function(e,n){var o,r,a=i.dom.createEl("div",{className:"relative"}),d=(((null==e||null===(o=e.playlist)||void 0===o?void 0:o.attributes["AVERAGE-BANDWIDTH"])||(null==e||null===(r=e.playlist)||void 0===r?void 0:r.attributes.BANDWIDTH))/1048576).toFixed(1),s="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");s="".concat(e.height,"p @ ").concat(d,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");var u=i.dom.createEl("p",{innerHTML:s,className:"rendition",res:e.height,bandwidth:e.bandwidth});i.dom.appendContent(a,u),i.dom.appendContent(l,a),u.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,Ue(t.playerId,e.target),i.dom.addClass(u,"selected"))}))})),this.addAutoRendition("nondrm",l),"Safari"!=N()&&this.addDynamicSwitchIfAuto()):(e.map((function(e,n){var o=i.dom.createEl("div",{className:"relative"}),r=(e.bitrate/1e6).toFixed(1),a="".concat(e.height,"p ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":"");window.enableResolutionsBitrate&&(a="".concat(e.height,"p @ ").concat(r,"mbps ").concat(e.height>719&&e.height<1081?"<span>HD</span>":e.height>1081&&e.height<1500?"<span>2K (HD)</span>":e.height>1501?"<span>4K (HD)</span>":""));var d=i.dom.createEl("p",{innerHTML:a,className:"rendition",res:e.height,qualityIndex:e.qualityIndex});i.dom.appendContent(o,d),i.dom.appendContent(l,o),d.addEventListener("click",(function(e){window.height===e.target.res&&e.target.bandwidth==window.bandwidth||(t.resetRenditions(),window.height=e.target.res,window.selectedVideo=e.target.video,window.qualityIndex=e.target.qualityIndex,Ue(t.playerId,e.target),i.dom.addClass(d,"selected"))}))})),this.addAutoRendition("drm",l)),i.dom.appendContent(a,l),i.dom.appendContent(o,a),i.dom.appendContent(n,o)}},{key:"addDynamicSwitchIfAuto",value:function(){for(var e,t=this.player_.textTracks(),n=0;n<t.length;n++)"segment-metadata"===t[n].label&&(e=t[n]);var o=null;e&&e.on("cuechange",(function(){var t,n,i=e.activeCues[0];if(console.log((null==i||null===(t=i.value)||void 0===t||null===(n=t.resolution)||void 0===n?void 0:n.height)+"p"),i&&document.querySelector(".auto.selected")){var r,a,l,d,s,u,c,v;if(null!=i&&null!==(r=i.value)&&void 0!==r&&null!==(a=r.resolution)&&void 0!==a&&a.height&&o!==(null==i||null===(l=i.value)||void 0===l||null===(d=l.resolution)||void 0===d?void 0:d.height))document.querySelector(".auto.selected").innerHTML="Auto ".concat(null==i||null===(c=i.value)||void 0===c||null===(v=c.resolution)||void 0===v?void 0:v.height,"p");o=null==i||null===(s=i.value)||void 0===s||null===(u=s.resolution)||void 0===u?void 0:u.height}}))}},{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"container"}),t=i.dom.createEl("div",{className:"setting-icon"});return i.dom.appendContent(e,t),e}},{key:"addAutoRendition",value:function(e,t){var n=this;if("nondrm"==e){var o,r,a,l,d=null===(o=this.player_)||void 0===o||null===(r=o.tech_)||void 0===r?void 0:r.vhs.selectPlaylist().attributes.RESOLUTION.height,s=null===(a=this.player_)||void 0===a||null===(l=a.tech_)||void 0===l?void 0:l.vhs.selectPlaylist().attributes.BANDWIDTH,u=i.dom.createEl("div",{className:"relative"}),c=i.dom.createEl("p",{innerHTML:"Auto ".concat(d,"p"),className:"rendition auto selected",bandwidth:s,res:d});c.addEventListener("click",(function(e){window.height!==e.target.res&&(n.resetRenditions(),i.dom.addClass(c,"selected"),window.height=e.target.res,window.bandwidth=parseInt(e.target.bandwidth),window.selectedVideo=e.target.video,Ue(n.playerId,null,!0))})),i.dom.appendContent(u,c),i.dom.appendContent(t,u)}else{var v=i.dom.createEl("div",{className:"relative"}),m=i.dom.createEl("p",{innerHTML:"Auto",className:"rendition selected",qualityIndex:"auto"});m.addEventListener("click",(function(e){n.resetRenditions(),i.dom.addClass(m,"selected"),window.qualityIndex=e.target.qualityIndex,window.selectedVideo=e.target.video,Ue(n.playerId,null,!0)})),i.dom.appendContent(v,m),i.dom.appendContent(t,v)}}}]),o}(),Ue=function(e,t,n){var o,r=ae(e),a=null==t?void 0:t.bandwidth;if((null==r||null===(o=r.tech_)||void 0===o?void 0:o.vhs)||!1){r.tech_.vhs.representations().forEach((function(e){n||e.bandwidth===a?e.enabled(!0):e.enabled(!1)})),r.handleTechPlaying_();var l=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(l),r.play()}),100);var d=i.dom.$(".content");d&&i.dom.addClass(d,"hidden")}else{var s=null==t?void 0:t.qualityIndex;if(n){var u,c;null==r||null===(u=r.dash)||void 0===u||null===(c=u.mediaPlayer)||void 0===c||c.resetSettings()}else{var v,m,p,f;null==r||null===(v=r.dash)||void 0===v||null===(m=v.mediaPlayer)||void 0===m||m.updateSettings({streaming:{abr:{autoSwitchBitrate:!1}}}),null==r||null===(p=r.dash)||void 0===p||null===(f=p.mediaPlayer)||void 0===f||f.setQualityFor("video",s,!0);var h=r.currentTime();r.currentTime(0),setTimeout((function(){r.currentTime(h),r.play()}),100);var w=i.dom.$(".content");w&&i.dom.addClass(w,"hidden")}}},qe=Object.freeze({__proto__:null,playSelectedResolution:Ue,default:Le}),ze=function(e){var t,n=ae(e),o=[];if((null==n||null===(t=n.tech_)||void 0===t?void 0:t.vhs)||!1){var i,r,a=null==n||null===(i=n.tech_)||void 0===i||null===(r=i.vhs)||void 0===r?void 0:r.representations();(null==a?void 0:a.length)>0&&(o=null==a?void 0:a.sort((function(e,t){return(null==e?void 0:e.height)==(null==t?void 0:t.height)?(null==t?void 0:t.bandwidth)-(null==e?void 0:e.bandwidth):(null==t?void 0:t.height)-(null==e?void 0:e.height)})))}else{var l,d,s=null==n||null===(l=n.dash)||void 0===l||null===(d=l.mediaPlayer)||void 0===d?void 0:d.getBitrateInfoListFor("video");(null==s?void 0:s.length)>0&&(o=null==s?void 0:s.sort((function(e,t){return t.height-e.height})))}return o},We=function(e){var t=document.createElement("div");return t.innerHTML=e,t.children[0]},Ke=function(e){r(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))};function Ge(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Je(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?Ge(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):Ge(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var $e=function(t,r,a,l){var d,s,u,c,v,m,p,f,h,w,g,y,b,T,O=r.res,E=void 0===O?null:O,I=r.sres,k=void 0===I?null:I,S=(null===(d=window)||void 0===d||null===(s=d.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(v=c.getInstance())||void 0===v?void 0:v.S)||void 0,P=null!=a&&a.chromecastReceiverId?"NO_DEVICES_AVAILABLE"!==S&&"NOT_CONNECTED"!==S?["html5","chromecast"]:["chromecast","html5"]:["html5"],C=null==E||null===(m=E.video)||void 0===m||null===(p=m.gist)||void 0===p?void 0:p.videoImageUrl,D=(null==E||null===(f=E.video)||void 0===f||null===(h=f.liveDetails)||void 0===h?void 0:h.isDvrEnabled)||!1,j=function(e){var t={};return null!=e&&e.series||null!=e&&e.chromecastReceiverId&&(t={chromecast:{receiverAppID:null==e?void 0:e.chromecastReceiverId,addButtonToControlBar:"default"==e.skin||"defaultV2"==e.skin,buttonPositionIndex:-6,addCastLabelToButton:!0}}),null!=e&&e.airplay&&"Safari"==N()&&(t=fe(fe({},t),{},{airPlay:{addButtonToControlBar:"default"==e.skin,buttonPositionIndex:-1}})),t}(a),A=(null==E||null===(w=E.video)||void 0===w||null===(g=w.streamingInfo)||void 0===g?void 0:g.isLiveStream)||!1,R=Je(Je({controls:!0,playsinline:!0,fluid:!0},"carousel"==a.skin&&{muted:!0}),{},(T={autoplay:(null==a?void 0:a.autoplay)||!1,controlBar:{volumePanel:("default"==a.skin||"defaultV2"==a.skin||"live"==(null==a?void 0:a.skin))&&{inline:!1},fullscreenToggle:"default"==a.skin||"defaultV2"==a.skin,pictureInPictureToggle:(a.skin,!1)},liveui:D},e(T,"autoplay",null==a?void 0:a.autoplay),e(T,"html5",Je(Je(Je({vhs:{limitRenditionByPlayerDimensions:!1}},0==(null==a||null===(y=a.customData)||void 0===y?void 0:y.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==a||null===(b=a.customData)||void 0===b?void 0:b.nativeVideoTracks)&&{nativeVideoTracks:!1}),{},{nativeTextTracks:!1})),e(T,"poster",C),e(T,"techOrder",P),e(T,"chromecast",{requestCustomDataFn:function(e){var n=ae(t);console.log(n.textTracksJson_);var o=n.textTracksJson_.filter((function(e){return"subtitles"==e.kind}));return function(e,t,n){var o,i,r,a,l,d,s,u,c,v,m={};if(e&&e.video&&e.video.drmEnabled){m.isDrmEnabled=!0;var p=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.serverURL;m.licenseUrl=p;var f=t.keySystemOptions&&t.keySystemOptions[0]&&t.keySystemOptions[0].options&&t.keySystemOptions[0].options.httpRequestHeaders["X-AxDRM-Message"];m.licenseToken=f}var h=(null==e||null===(o=e.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";m.contentType=h;var w=null==e||null===(r=e.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.runtime;m.duration=w;var g=null==e||null===(l=e.video)||void 0===l||null===(d=l.gist)||void 0===d?void 0:d.title;m.mediaTitle=g;var y=null==e||null===(s=e.video)||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl;return m.mediaImage=y,m.subTitles=n,m.DVR=(null==e||null===(c=e.video)||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(m),m}(E,e,o)}}),e(T,"plugins",j),T)),x=i(t,R,function(){var e=n(o.mark((function e(){var n,r,d,s,u,c,v,m,p,f,h,w,g,y,b,T,O,I,S,P,C,j,H,B,F;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(A&&l.resolve(Je({status:!0,msg:"Player Initialised"},k?{seriesResponse:k,response:E}:{response:E})),window.initialise(x),window.firstFrame(x),"white"!==window.controlsColor&&Re(window.controlsColor,x),/Android|iPhone/i.test(navigator.userAgent)&&(i.options.hls.overrideNative=!0),O=null==E||null===(n=E.video)||void 0===n?void 0:n.drmEnabled,I=(null==E||null===(r=E.ads)||void 0===r||null===(d=r.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(u=s.web)||void 0===u?void 0:u.active)&&(null==E||null===(c=E.ads)||void 0===c||null===(v=c.preRoll)||void 0===v||null===(m=v.adTags)||void 0===m||null===(p=m.web)||void 0===p?void 0:p.url),S=null==E||null===(f=E.video)||void 0===f||null===(h=f.liveDetails)||void 0===h?void 0:h.startOverTime,!O){e.next=16;break}if("Safari"!==N()){e.next=14;break}return e.next=12,Oe();case 12:e.next=16;break;case 14:return e.next=16,Promise.all([Oe(),Te()]);case 16:D&&he(t,S),I&&initialiseAdvertisement(t,I),(P=q(E,t))?ce(t,P):(l.reject({status:!1,msg:"Incompatible Source, only hls,mp4,drm content is allowed",response:E}),_(t,"Incompatible Source, only hls,mp4,drm content is allowed")),((null==E||null===(w=E.video)||void 0===w||null===(g=w.contentDetails)||void 0===g||null===(y=g.closedCaptions)||void 0===y?void 0:y.length)>0||(null==E||null===(b=E.video)||void 0===b||null===(T=b.closedCaptions)||void 0===T?void 0:T.length)>0)&&(F=(null==E||null===(j=E.video)||void 0===j||null===(H=j.contentDetails)||void 0===H?void 0:H.closedCaptions)||(null==E||null===(B=E.video)||void 0===B?void 0:B.closedCaptions),C=F.filter((function(e){return"VTT"===e.format})),ee(t,C)),null!=a&&a.disableControls?me():Ae(t,Je(Je(Je({},a),R),{},{liveVideo:A,isDvrEnabled:D,res:E,sres:k})),je(t,Je(Je(Je({},a),R),{},{liveVideo:A}),l,{res:E,sres:k});case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}())};function Qe(){return{loadVideoInstantly:de,onTimeUpdate:Be,getVideoDuration:Fe,onVideoEnded:_e,init:function(e){return new Promise((function(n,o){var i,r,a,l,d;if(!re(null==e?void 0:e.playerId)){var s=null==e?void 0:e.videoId,u=(null==e?void 0:e.series)||!1;window.videoId=s;var c=null==e?void 0:e.token;Me=JSON.parse(atob(c.split(".")[1])),e.isAnonymousUser=!(null===(i=Me)||void 0===i||!i.anonymousId),e.siteOwner=(null===(r=Me)||void 0===r?void 0:r.site)||null,e.userId=(null===(a=Me)||void 0===a?void 0:a.userId)||null,window.sessionStorage.setItem("uid",null===(l=Me)||void 0===l?void 0:l.userId),window.watchHistory=e.watchHistory||null,sessionStorage.setItem("token",c);var v,p=null==e?void 0:e.playerId,f=e.chromecastReceiverId=null!=e&&e.series?null:null==e?void 0:e.chromecastReceiverId,h=null==e?void 0:e.airplay,w=null==e?void 0:e.apiBaseUrl,g=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,y=null==e?void 0:e.errors;y&&(window.customErrors=y),window.customData=null==e?void 0:e.customData,w&&(window.playerEntitlementUrl=w),window.controlsColor=(null==e?void 0:e.controlsColor)||"white",null!=e&&e.skin&&("live"===(v=e.skin)||"carousel"===v||"V2"===v||"defaultV2"===v)||(e.skin="default"),null!=e&&e.enableAdvertisements&&Promise.resolve().then((function(){return Ee})).then((function(e){e.importIMA()})),!f||null!=e&&e.series||Promise.resolve().then((function(){return Ee})).then((function(e){e.importChromecast()})),h&&Promise.resolve().then((function(){return Ee})).then((function(e){e.importAirplay()})),g&&we("https://www.googletagmanager.com/gtag/js?id=".concat(g)).then((function(){return e=g,window.dataLayer=window.dataLayer||[],m("js",new Date),void m("config",e);var e})).catch((function(e){})),u?function(e,n){var o,i,r=JSON.parse(atob(n.split(".")[1])),a=r&&r.countryCode;return t({url:H(),params:E({id:e,deviceType:"web_browser",contentConsumption:"web",countryCode:a,episodeData:!0},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i?void 0:i.entitlement),method:"GET",headers:{Authorization:n},withCredentials:!0})}(s,c).then((function(t){var i=t.data.series,r=t.data.series.seasons[0].episodes[0].id;I(r,c).then((function(t){var r,a,l;window.contentType=null==t||null===(r=t.data)||void 0===r||null===(a=r.video)||void 0===a||null===(l=a.gist)||void 0===l?void 0:l.contentType,G(t.data),$e(p,{res:null==t?void 0:t.data,sres:i},e,{resolve:n,reject:o})})).catch((function(e){ve(e,p,o)}))})).catch((function(e){ve(e,p,o)})):I(s,c).then((function(t){var i,r,a,l;window.contentType=null==t||null===(i=t.data)||void 0===i||null===(r=i.video)||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.contentType,G(null==t?void 0:t.data);var d=null==t?void 0:t.data;null!=e&&e.watchHistory&&null!=e&&null!==(l=e.watchHistory)&&void 0!==l&&l.enable?k(s,c).then((function(t){var i,r,a,l,s;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(null==t?void 0:t.data)),e.watchHistoryResumeTime=(null==t||null===(s=t.data)||void 0===s?void 0:s.watchedTime)||null,$e(p,{res:d},e,{resolve:n,reject:o})})).catch((function(t){var i,r,a,l;null!==(i=window)&&void 0!==i&&null!==(r=i.watchHistory)&&void 0!==r&&r.cb&&(null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l||l.cb(t)),$e(p,{res:d},e,{resolve:n,reject:o})})):$e(p,{res:d},e,{resolve:n,reject:o})})).catch((function(e){ve(e,p,o)}))}}))},getRenditions:ze,skip:oe,getPlayer:ae,play:te,pause:ne,detectBrowser:N,rewind:ie,loadVideo:ce,seekToTimeStamp:xe,isPlayerInitialised:re,load:le,dispose:se,enableCaptions:X,disableCaptions:Y,getCaptions:Z,playSelectedResolution:Ue,getSource:q,setVolume:Pe,getVolume:Ce,disableControls:me,setPlaybackSpeed:He}}export{Qe as V,ze as a,J as b,We as c,N as d,ne as e,G as f,ae as g,S as h,Ke as i,Q as j,$ as k,le as l,Z as m,Y as n,_e as o,te as p,X as q,ie as r,oe as s,qe as t};
|
package/esm/playlist-a8bfbb1d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import l from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,r}from"./icons-dfb99cd1.js";import{g as d,l as c,j as p}from"./index-8577b57e.js";import{a as m}from"./autoNextVideo-57d95a29.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/assertThisInitialized";function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,l=i(e);if(t){var a=i(this).constructor;n=Reflect.construct(l,arguments,a)}else n=l.apply(this,arguments);return o(this,n)}}var v=a.getComponent("Component"),y=function(o){l(y,v);var i=u(y);function y(e){var n,l,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,y),(a=i.call(this,e,s)).playerId=s.playerId,a.seriesData=s.sres,a.videos=null==s||null===(n=s.playlist)||void 0===n?void 0:n.content,a.cb=(null==s||null===(l=s.playlist)||void 0===l?void 0:l.cb)||null,a.autoNext=(null==s||null===(o=s.playlist)||void 0===o?void 0:o.autoNext)||!1,a.currentVideoData=s.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&m({playerId:a.playerId,content:a.videos,cb:a.cb}),a}return n(y,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then((function(e){var t=document.createElement("style");t.id="video-selecton",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var n;null!==(n=t.classList)&&void 0!==n&&n.contains("hidden")?(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=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"addFunctionality",value:function(t){var n=this,l=this.el(),o=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),l.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),m=a.dom.createEl("div",{className:"playlist-selector-content"}),u=function(t){var l,o,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(l=n.videos[t])||void 0===l?void 0:l.title)||"")}),d=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(n.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,d),a.dom.appendContent(i,s),a.dom.appendContent(m,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(o=n.videos[t])||void 0===o?void 0:o.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(n.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(m,i),u.onclick=function(e){e.stopPropagation(),p(t+1),c(n.playerId,n.videos[t].id,sessionStorage.getItem("token")).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,o,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(n=s.classList)&&void 0!==n&&n.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(l=s.classList)||void 0===l||l.remove("hidden")):(null==s||null===(o=s.classList)||void 0===o||o.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)u(v);a.dom.appendContent(o,i),a.dom.appendContent(o,s),a.dom.appendContent(t,o),a.dom.appendContent(t,m),d(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(n.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}))}}]),y}();export{y as default};
|
package/esm/skin-4925944b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,k as l,h as i,i as t,e as o,l as n,m as r,n as a,o as s,M as d,b as u,p as m,q as p}from"./icons-dfb99cd1.js";import{g as c,c as v}from"./index-8577b57e.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function b(b,h){import("./skin-e516f7e7.js").then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)})),function(i){c(i).one("loadedmetadata",(function(){e(i,"defaultV2",l())}))}(b),function(e,l){var i=c(e);i.controlBar.getChild("FullscreenToggle").el().appendChild(v(d(window.controlsColor))),i.controlBar.getChild("FullscreenToggle").el().appendChild(v(u(window.controlsColor)));var t=document.getElementsByClassName("vjs-time-control");l.liveVideo&&(t[0].style.display="none")}(b,h),function(e,l){var d,u,c,v;0==l.liveVideo&&0==l.liveui&&i(e,"defaultV2",m());(0==l.liveVideo&&0==l.liveui||1==l.liveui)&&t(e,"defaultV2",p());l.liveVideo||o(e);(null==l||null===(d=l.relatedVideos)||void 0===d?void 0:d.content.length)>0&&n(e,null==l?void 0:l.relatedVideos);(null==l||null===(u=l.streams)||void 0===u?void 0:u.length)>1&&r(e,null==l?void 0:l.streams);(null==l||null===(c=l.playlist)||void 0===c||null===(v=c.content)||void 0===v?void 0:v.length)>0&&a(e,null==l?void 0:l.playlist);s(e,l)}(b,h)}export{b as initialiseSkin};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"video.js";import{E as a,r as l}from"./icons-dfb99cd1.js";import{g as c,i as s,l as d,j as m}from"./index-8577b57e.js";import{a as u}from"./autoNextVideo-57d95a29.js";import"video.js/dist/video-js.min.css";import"@babel/runtime/helpers/defineProperty";import"axios";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,r=i(e);if(t){var a=i(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return n(this,o)}}var v=r.getComponent("Component"),h=function(n){o(h,v);var i=p(h);function h(t){var o,n,r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,h),(r=i.call(this,t,a)).playerId=a.playerId,r.seriesData=a.sres,r.videos=a.related.content,r.cb=(null==a||null===(o=a.related)||void 0===o?void 0:o.cb)||null,r.autoNext=(null==a||null===(n=a.related)||void 0===n?void 0:n.autoNext)||!1,r.currentVideoData=a.res,r.initialiseStructure(),r.loadCSS(),r.autoNext&&u({playerId:r.playerId,content:r.videos,cb:r.cb}),r}return t(h,[{key:"createEl",value:function(){var e=r.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=r.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(a())});return r.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-7f66813a.js").then((function(e){var t=document.createElement("style");t.id="video-selecton",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this.el(),t=r.dom.createEl("div",{className:"video-selection-container hidden"});r.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(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 o=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(o,"px"),r.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=r.dom.createEl("div",{className:"video-selector-head"}),i=r.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(l())});i.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var a=r.dom.createEl("div",{className:"video-selector-title",innerHTML:"Recommended"}),u=r.dom.createEl("div",{className:"video-selector-content"}),p=r.dom.createEl("div",{className:"video-container"}),v=function(e){var o,n=r.dom.createEl("div",{className:"video -".concat(e)}),i=r.dom.createEl("div",{className:"recommended -".concat(e)});i.setAttribute("video-idx",e),i.onclick=function(){m(e+1);for(var o=r.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";s(e),d(t.playerId,t.videos[e].id,sessionStorage.getItem("token")).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var a=document.createElement("img");a.className="related-thumbnail-image",a.src="".concat(t.videos[e].img),a.alt="No Thumbnail Available",i.append(a);var l=r.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(o=t.videos[e])||void 0===o?void 0:o.title)||"")});r.dom.appendContent(n,i),r.dom.appendContent(n,l),r.dom.appendContent(p,n),r.dom.appendContent(u,p)},h=0;h<this.videos.length;h++)v(h);r.dom.appendContent(n,i),r.dom.appendContent(n,a),r.dom.appendContent(e,n),r.dom.appendContent(e,u),c(this.playerId).on("fullscreenchange",(function(){var o=window.getComputedStyle(document.getElementById(t.playerId),null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(o,"px")}))}}]),h}();export{h as default};
|