@viewlift/player-backup 1.0.92-backup → 1.0.94-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/{autoNextVideo-be6322d8.js → autoNextVideo-f3282d9c.js} +1 -1
- package/cjs/{caption-settings-6fccf317.js → caption-settings-316f1d80.js} +1 -1
- package/cjs/{features-bcd33731.js → features-34a617c6.js} +1 -1
- package/cjs/generic-e862b5fc.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{keyboardShortcuts-7313759d.js → keyboardShortcuts-3c4e57c2.js} +1 -1
- package/cjs/{multicam-9226223f.js → multicam-29a2824e.js} +1 -1
- package/cjs/{multicamv2-6459bf30.js → multicamv2-a85bf1e7.js} +1 -1
- package/cjs/{mwebPotraitTray-6ac54354.js → mwebPotraitTray-c951ec9d.js} +1 -1
- package/cjs/{nextEpisodeButton-90506468.js → nextEpisodeButton-3d9de45a.js} +1 -1
- package/cjs/{playlist-d614645e.js → playlist-d64d67ab.js} +1 -1
- package/cjs/{renditions-c99c7c87.js → renditions-9551e4ca.js} +1 -1
- package/cjs/{resolution-5f4ea27f.js → resolution-71c197d9.js} +1 -1
- package/cjs/{series-ac8fbb89.js → series-650216e8.js} +1 -1
- package/cjs/{series-v2-c2028839.js → series-v2-4a409689.js} +1 -1
- package/cjs/{settings-icon-e9303433.js → settings-icon-f99a0ef1.js} +1 -1
- package/cjs/{skin-cf2957a2.js → skin-4648435c.js} +1 -1
- package/cjs/skin-52d7fce8.js +1 -0
- package/cjs/{skin-0e7783d7.js → skin-8a3967f2.js} +1 -1
- package/cjs/{skin-789e6c13.js → skin-a141a3f8.js} +1 -1
- package/cjs/{skin-c909d60d.js → skin-dd1717bc.js} +1 -1
- package/cjs/{util-a1461a90.js → util-63f47407.js} +1 -1
- package/cjs/{videoSelector-dfa15eb1.js → videoSelector-113a137d.js} +1 -1
- package/esm/{autoNextVideo-ab0dff65.js → autoNextVideo-8ef9133e.js} +1 -1
- package/esm/{caption-settings-af040446.js → caption-settings-85c59325.js} +1 -1
- package/esm/{features-fe79ecce.js → features-03b3f045.js} +1 -1
- package/esm/generic-1fcc26a6.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{keyboardShortcuts-6f8a1caa.js → keyboardShortcuts-47b0be46.js} +1 -1
- package/esm/{multicam-531c7210.js → multicam-16ce271f.js} +1 -1
- package/esm/{multicamv2-8ef76c9d.js → multicamv2-edea306a.js} +1 -1
- package/esm/{mwebPotraitTray-2b69391c.js → mwebPotraitTray-1191206a.js} +1 -1
- package/esm/{nextEpisodeButton-c1f1b0bb.js → nextEpisodeButton-e67accf3.js} +1 -1
- package/esm/{playlist-ce00ced2.js → playlist-d2edb333.js} +1 -1
- package/esm/{renditions-9f750ba8.js → renditions-f853853a.js} +1 -1
- package/esm/{resolution-07b51368.js → resolution-ed1ed3c5.js} +1 -1
- package/esm/{series-caaec1fd.js → series-e659e012.js} +1 -1
- package/esm/{series-v2-3cf730ae.js → series-v2-1ab77520.js} +1 -1
- package/esm/{settings-icon-b1d4b9c8.js → settings-icon-6c796bcb.js} +1 -1
- package/esm/{skin-afd05f61.js → skin-32f13091.js} +1 -1
- package/esm/{skin-34a1c92d.js → skin-6655ac30.js} +1 -1
- package/esm/{skin-1c596de1.js → skin-75e7ff30.js} +1 -1
- package/esm/{skin-316cd7f4.js → skin-7670a061.js} +1 -1
- package/esm/skin-b8cfd650.js +1 -0
- package/esm/{util-32cf020e.js → util-9bf9c721.js} +1 -1
- package/esm/{videoSelector-23c18c1e.js → videoSelector-0b678e73.js} +1 -1
- package/package.json +1 -1
- package/cjs/generic-6ababa2d.js +0 -1
- package/cjs/skin-3bdb636e.js +0 -1
- package/esm/generic-a4ebd71c.js +0 -1
- package/esm/skin-b4f4124b.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as e,j as l,k as t,g as n,h as i,d as o,l as a,m as r,n as s,o as d}from"./features-03b3f045.js";import{M as u,a as v,c as m,d as c}from"./icons-3e9a1686.js";import{P as p,b as f,Q as g,y as h,O as y,d as b}from"./generic-1fcc26a6.js";import{g as C}from"./renditions-f853853a.js";import x from"@babel/runtime/helpers/toConsumableArray";import{s as j}from"./autoNextVideo-8ef9133e.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./util-9bf9c721.js";var E=p(),N=[];null==E||E.map((function(e){return N.push.apply(N,x(e.episodes))}));var w=function(e,l){var t=f(e),n=Math.floor(t.currentTime());if(Math.floor(t.duration())!=n){t.pause(e);var i=g();j(i,e,N)}};function B(n,i){var o=f(n);o&&(o.on("loadeddata",(function(){var t,a,r;(null===(t=C(n))||void 0===t?void 0:t.length)>0&&e(n,i),(null===(a=h(n))||void 0===a?void 0:a.length)>0&&l(n,i),null!=i&&null!==(r=i.series)&&void 0!==r&&r.enable&&function(e,l){var t;null==l||null===(t=l.series)||void 0===t||t.cb;var n=f(e);n.on("timeupdate",(function(){var e,l=Math.floor(n.currentTime()),t=n.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];t-l<=10&&g()<=(null==N?void 0:N.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var i,o=N.filter((function(e,l){return l==g()}));if((null==o?void 0:o.length)>0)if(null!==(i=document.getElementsByClassName("next-ep-preview"))&&void 0!==i&&i[0]){var a,r,s,d,u,v,m,c,p,h,y;(null===(a=document.getElementsByClassName("next-ep-preview"))||void 0===a?void 0:a[0]).style.visibility="hidden";var b=null===(r=document.getElementsByClassName("next-ep-title"))||void 0===r?void 0:r[0],C=null===(s=document.getElementsByClassName("next-ep-img"))||void 0===s?void 0:s[0],x=null===(d=document.getElementsByClassName("next-ep-content"))||void 0===d?void 0:d[0],j=null===(u=o[0])||void 0===u?void 0:u.title;(null===(v=j)||void 0===v?void 0:v.length)>60&&(j=j.substr(0,60)+"..."),b.textContent="".concat(j),C.src=(null===(m=o[0])||void 0===m||null===(c=m.gist)||void 0===c||null===(p=c.imageGist)||void 0===p?void 0:p.r16x9)||(null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.fallbackImage),x.onclick=function(){return w(e)}}else{var E,B,V,k,P,I,M,T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden",document.getElementById(e).append(T);var D=document.createElement("div");D.className="next-ep-header",D.textContent="Next up";var L=null===(E=o[0])||void 0===E?void 0:E.title,O=document.createElement("img");O.className="next-ep-img",O.src=(null===(B=o[0])||void 0===B||null===(V=B.gist)||void 0===V||null===(k=V.imageGist)||void 0===k?void 0:k.r16x9)||(null===(P=window)||void 0===P||null===(I=P.customData)||void 0===I?void 0:I.fallbackImage);var F=document.createElement("div");F.className="next-ep-title",(null===(M=L)||void 0===M?void 0:M.length)>60&&(L=L.substr(0,60)+"..."),F.textContent="".concat(L);var G=document.createElement("div");G.className="next-ep-content",G.append(O),G.append(F),G.onclick=function(){return w(e)},T.append(D),T.append(G)}}(n,i),function(e,l){var t,n=Math.floor(e/60),i=null===(t=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===t?void 0:t[0];i&&(i.style.marginRight=n>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");l&&o.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",i&&(i.style.marginRight="56px"))}(o.duration(),(null==i?void 0:i.liveVideo)||!1)})),o.one("play",(function(){var e,l,i,o;null!==(e=window)&&void 0!==e&&null!==(l=e.customData)&&void 0!==l&&l.iframeOverlayUrl&&t(n,null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o?void 0:o.iframeOverlayUrl)})))}function V(e,l){!function(){"Chrome"==b()&&import("./chromett-a3cbb2e1.js").then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));import("./skin-3470b8fa.js").then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),B(e,l),function(e,l){var t,n,i,o,a,r,s=f(e);null==s||null===(t=s.controlBar)||void 0===t||null===(n=t.getChild("FullscreenToggle"))||void 0===n||null===(i=n.el())||void 0===i||i.appendChild(y(u(window.controlsColor))),null==s||null===(o=s.controlBar)||void 0===o||null===(a=o.getChild("FullscreenToggle"))||void 0===a||null===(r=a.el())||void 0===r||r.appendChild(y(v(window.controlsColor)));var d=document.getElementsByClassName("vjs-time-control");l.liveVideo&&d[0]&&(d[0].style.display="none")}(e,l),function(e,l){var t,u,v,p,f,g;0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)&&n(e,"defaultV2",m());(0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)||1==(null==l?void 0:l.liveui))&&i(e,"defaultV2",c());l.liveVideo||o(e);(null==l||null===(t=l.relatedVideos)||void 0===t||null===(u=t.content)||void 0===u?void 0:u.length)>0&&a(e,null==l?void 0:l.relatedVideos);(null==l||null===(v=l.streams)||void 0===v?void 0:v.length)>1&&r(e,null==l?void 0:l.streams);(null==l||null===(p=l.playlist)||void 0===p||null===(f=p.content)||void 0===f?void 0:f.length)>0&&s(e,null==l?void 0:l.playlist);null!=l&&null!==(g=l.series)&&void 0!==g&&g.enable&&d(e,l)}(e,l),function(e,l){var t=f(e),n=null==l?void 0:l.tvProviderLogoUrl;if(!n)return;var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(n),o.alt="Provider Image",i.append(o),t.el().appendChild(i),t.on("useractive",(function(){i.classList.remove("vjs-fade")})),t.on("userinactive",(function(){t.paused()||i.classList.add("vjs-fade")})),t.on("fullscreenchange",(function(){t.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}(e,l)}export{V as initialiseSkin};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as t}from"./generic-
|
|
1
|
+
import{b as t}from"./generic-1fcc26a6.js";var n=function(n,a,r){var e=t(n);e?a>=0&&a<=e.duration()?(r({status:!0,msg:"Successfully seeked to timestamp : ".concat(a)}),e.currentTime(a)):r({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):r("Cannot find player with id: '".concat(n,"'"))},a=function(n,a){var r=t(n);if(!r)return"Cannot find player with id: '".concat(n,"'");try{return r.playbackRate(a),"Playback speed set to ".concat(a,"x")}catch(t){return"Error: ".concat(t)}},r=function(n,a){var r=t(n);r?r.on("timeupdate",(function(){return a(r.currentTime())})):a("Cannot find player with id: '".concat(n,"'"))},e=function(n,a){var r=t(n);r?r.on("ended",(function(){return a(!0)})):a("Cannot find player with id: '".concat(n,"'"))},i=function(n){var a=t(n);return a?a.duration():"Cannot find player with id: '".concat(n,"'")};export{e as a,a as b,i as g,r as o,n as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{E as l,e as r}from"./icons-3e9a1686.js";import{
|
|
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 a from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{E as l,e as r}from"./icons-3e9a1686.js";import{V as d,W as s,X as c,Y as m,R as u,t as p,T as v}from"./generic-1fcc26a6.js";import{a as h}from"./autoNextVideo-8ef9133e.js";import{g as f}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-9bf9c721.js";function y(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(y=function(){return!!e})()}var b=i.getComponent("Component"),g=function(){o(N,b);var g,C,E=(g=N,C=y(),function(){var e,t=a(g);if(C){var o=a(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return n(this,e)});function N(t){var o,n,a,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e(this,N),(a=E.call(this,t,i)).playerId=i.playerId,a.seriesData=i.sres,a.videos=i.related.content,a.cb=(null==i||null===(o=i.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==i||null===(n=i.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=i.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(v(0),h({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return t(N,[{key:"createEl",value:function(){var e=i.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=i.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(l())});return i.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./videoSelector-8e258d45.js").then((function(e){var t=document.createElement("style");t.id="video-selection",t.append("".concat(e.default)),document.head.appendChild(t)}))}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=i.dom.createEl("div",{className:"video-selection-container hidden"});i.dom.$(".video-selector-icon",this.el()).onclick=function(){var n;null!==(n=o.classList)&&void 0!==n&&n.contains("hidden")?(d(),o.classList.remove("hidden"),t.classList.add("open"),o.style.right="0px",s(e.playerId,o)):(o.classList.add("hidden"),t.classList.remove("open"),o.style.right="-350px")};var n=window.getComputedStyle(document.getElementById(this.playerId),null).getPropertyValue("height");o.style.height="".concat(n),i.dom.appendContent(t,o),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(o),c(this.playerId,o)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),n=i.dom.createEl("div",{className:"video-selector-head"}),a=i.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(r())});a.onclick=function(){e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px"};for(var l=i.dom.createEl("div",{className:"video-selector-title",innerHTML:f("relatedVideoTitle")||"Recommended"}),d=i.dom.createEl("div",{className:"video-selector-content"}),s=i.dom.createEl("div",{className:"video-container"}),c=function(e){var o,n,a,l,r,c=i.dom.createEl("div",{className:"video -".concat(e)}),m=i.dom.createEl("div",{className:"recommended -".concat(e)});m.setAttribute("video-idx",e),m.onclick=function(){v(e+1);for(var o=i.dom.$$(".recommended"),n=0;n<o.length;n++)o[n].style.border="none";u(e),p(t.playerId,t.videos[e].id).then((function(e){t.cb&&t.cb(e)})).catch((function(e){t.cb&&t.cb(e)}))};var h=document.createElement("img");h.className="related-thumbnail-image",h.src="".concat((null==t||null===(o=t.videos)||void 0===o||null===(n=o[e])||void 0===n?void 0:n.img)||(null===(a=window)||void 0===a||null===(l=a.customData)||void 0===l?void 0:l.fallbackImage)),h.alt="No Thumbnail Available",m.append(h);var f=i.dom.createEl("div",{className:"info -".concat(e),innerHTML:"".concat((null==t||null===(r=t.videos[e])||void 0===r?void 0:r.title)||"")});i.dom.appendContent(c,m),i.dom.appendContent(c,f),i.dom.appendContent(s,c),i.dom.appendContent(d,s)},h=0;h<this.videos.length;h++)c(h);i.dom.appendContent(n,a),i.dom.appendContent(n,l),i.dom.appendContent(e,n),i.dom.appendContent(e,d),m(this.playerId,e)}}]),N}();export{g as default};
|
package/package.json
CHANGED
package/cjs/generic-6ababa2d.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),o=require("video.js"),i=require("axios");require("js-cookie");var r=require("ua-parser-js"),l=require("@babel/runtime/helpers/toConsumableArray"),a={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function s(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 d(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?s(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var u={name:"@viewlift/player-backup",version:"1.0.92-backup",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,t){var n,o,r,l;return null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:h(),params:d({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":u.version},withCredentials:!0})},v=function(e,t){var n,o;return i({url:T()+a.getLinearChannelDetails,params:d(d(d(d(d({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:t}})},m=function(){var e=t(n.mark((function e(t,o){var r,l;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return l={siteOwner:null==t?void 0:t.siteOwner,userId:null==t?void 0:t.userId,videoId:null==t?void 0:t.videoId,watchedPercentage:null==t?void 0:t.watchedPercentage,watchedTime:null==t?void 0:t.watchedTime},e.abrupt("return",i({url:y(),method:"POST",headers:{Authorization:r,"x-api-key":t.xApiKey},params:{version:"v2"},data:JSON.stringify(l),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:w(),method:"POST",headers:{Authorization:r},data:d({},t),params:d({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),p=function(e,t){var n,o,r=(null===(n=window)||void 0===n||null===(o=n.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var l,a,s=JSON.parse(atob(t.split(".")[1])),d=(null==s?void 0:s.site)||null;return i({method:"GET",url:I(e),params:{site:d},headers:{Authorization:t,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey},timeout:15e3})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return i({method:"GET",url:E(e,v),headers:{Authorization:t,"x-api-key":null===(u=window)||void 0===u||null===(c=u.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},f=function(e){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV2,"/").concat(e)},g=function(){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV1)},I=function(e){return T()+"".concat(null==a?void 0:a.getVideoInfoV1,"/").concat(e)},E=function(e,t){return T()+"".concat(null==a?void 0:a.getVideoInfoV2,"/").concat(t,"/").concat(e)},y=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV1)},w=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV2)},h=function(){var e,t,n,o,i=T()+"".concat(null==a?void 0:a.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.overrideEntitlementBaseUrl?(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":i},T=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==a?void 0:a.apiBaseUrl)},_=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},b=null;function O(){return{set:function(e){e&&(b=e)},get:function(){return b}}}var D,x,V,S,L,C=function(){var e=t(n.mark((function e(){var t,o,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=O().get(),o=T(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),k=null,W=function(){var e=t(n.mark((function e(){var t;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!_(t)){e.next=6;break}return k||(k=C().then((function(e){var n,o,i=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&O().set(r),i||t})).catch((function(e){return console.error("Error fetching refresh token",e),t})).finally((function(){k=null}))),e.abrupt("return",k);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(e){x=e},P=function(){return x},F=function(e){V=e},R=function(e){if(S){var t=S.get(e);F(t+1)}},N=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)}},j=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var B=function(){var e,t;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(t=e.userAgentData)||void 0===t?void 0:t.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function U(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?U(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):U(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=r(navigator.userAgent);var H=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("monetizationModels"==t){var n=G(e,"video.monetizationModels",[]);if(n.length>0)return n.map((function(e){return e.type})).join(",")}else if("plans"==t){var o=G(e,"video.plans",[]);if(o.length>0)return o.map((function(e){return e.planIds})).join(",")}else{var i=G(e,"video.tags",[]);if(i.length>0)return i.map((function(e){return e.title})).join(",")}return G(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE")},G=function(e,t,n){for(var o=0,i=(t=t.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[t[o]]}return e||n},q=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},Y=function(){var e,t,n,o,i,r,l,a,s,d,u,c,v,m,p,f,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,y=(null==E?void 0:E.contentType)||"video",w=null==E||null===(e=E[y])||void 0===e?void 0:e.metadata,h=de(I);if(!g.includes("VIEWLIFT_"))return g;var T=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(T.getPropertyValue("height").slice(0,-2)),b=Math.trunc(T.getPropertyValue("width").slice(0,-2)),O="linearchannel"===y?null==E||null===(t=E.linearchannel)||void 0===t||null===(n=t.channels)||void 0===n||null===(o=n.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.channelId)})))||void 0===o||null===(i=o.content)||void 0===i?void 0:i.id:G(E,"video.gist.id",""),D=M(M({},X(w)),{},{VIEWLIFT_WIDTH:b,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:H(b,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(r=window)||void 0===r?void 0:r.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:G(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:G(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:G(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==h||null===(l=h.options_)||void 0===l?void 0:l.autoplay)||1,VIEWLIFT_MUTE:(null==h||null===(a=h.options_)||void 0===a?void 0:a.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:z(E),VIEWLIFT_MEDIA_ID:O,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(G(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:O,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+G(E,"video.gist.permalink","")),VIEWLIFT_COPPA:G(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.site)||void 0===u?void 0:u.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:G(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(m=v.site)||void 0===m?void 0:m.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*G(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:G(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:O,VIEWLIFT_CONTENT_TITLE:G(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:G(E,"video.series[0].gist.title",G(E,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:G(E,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:G(E,"video.currentEpisode","VIEWLIFT_EPISODE_NUMBER"),VIEWLIFT_SEASON_NUMBER:G(E,"video.currentSeason","VIEWLIFT_SEASON_NUMBER"),VIEWLIFT_CONTENT_TAGS:z(E,"tags")},null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f?void 0:f.macros);for(var x in D){var V=new RegExp("\\b("+x+")\\b","g");g=g.replace(V,D[x])}return g},X=function(e){var t,n,o,i,r,l,a={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){s.set(e.name,e.value)})));var d=(null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(o=n.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return d||u?(q()?d?a=M(M({},a),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):u&&(a=M(M({},a),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):d?a=M(M({},a),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):u&&(a=M(M({},a),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),d?a=M(M({},a),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||""}):u&&(a=M(M({},a),{},{VIEWLIFT_SFID:s.get("sfid.tve")||""})),a=q()?M(M({},a),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):M(M({},a),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(a=M(M({},a),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||""}),a=q()?M(M({},a),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):M(M({},a),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),a},J=function(e,t){var n,o,i,r,l,a,s,d,u,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[f])||void 0===n?void 0:n.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[f])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,y=(null==e||null===(a=e[f])||void 0===a||null===(s=a.streamingInfo)||void 0===s||null===(d=s.videoAssets)||void 0===d?void 0:d.hls)||!1;null==e||null===(u=e[f])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var w=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.videoSourceUrl)return null==e?void 0:e.videoSourceUrl;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return Z(E);if(g){var h=Q(I,t);return h.src=Y(h.src,t,e),h}if("Safari"!==B()&&w)return K(I);if(y){var T=Z(I);return T.src=Y(T.src,t,e),T}if(null!=I&&I.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return _.src=Y(_.src,t,e),_}return null},K=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},Z=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},Q=function(e,t){var n=e.fairPlay,i=e.widevine,r=e.playReady,l=B();if(de(t),"Safari"===l){var a=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(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,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(n);return $(t),a}var s,d={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?($(t),d.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(d.keySystemOptions=[],d.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),d.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),d};var $=function(e){var t=de(e);if("function"==typeof t.eme)try{t.eme()}catch(e){console.log("EME ERROR :",e)}},ee=function(e){var t=de(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))},te=function(e,t){var n=de(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})}))},ne=!1,oe=function(e,t,n){var o=Y(t,e,n),i=de(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r,l,a,s,d=de(e);if(null!==d.el_){ne=!0;var u=(null===(n=P())||void 0===n||null===(o=n.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id)||(null===(r=P())||void 0===r?void 0:r.id),c={id:e,adTagUrl:"".concat(t,"&vid=").concat(u,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(u),adLabel:"Your video will resume after this sponsor message"};d.ima.initializeAdDisplayContainer&&d.ima.initializeAdDisplayContainer(),ne&&null!==d.el_&&("function"==typeof d.ima?d.ima(c):setTimeout((function(){d.ima.setContentWithAdTag(null,t,!0),d.ima.requestAds()}),1e3));var v=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&v.hasAttribute("controls")&&v.removeAttribute("controls");var m="click",p=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(p=!0,m="touchend"),d.one(m,(function(){p&&d.ima.initializeAdDisplayContainer()}));var f=(null===(l=window)||void 0===l||null===(a=l.customData)||void 0===a||null===(s=a.ads)||void 0===s?void 0:s.adEventHandler)||null;d.one("ads-ad-started",(function(){f&&f({status:"STARTED",msg:"Advertisement Started"})})),d.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){f&&f({status:"ENDED",msg:"Advertisement Ended"})}))})),d.on("adserror",(function(e){f&&f({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},ie=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},re="",le=function(e,t){var n;if(t){var o=document.getElementById(e),i=null===(n=window.getComputedStyle(o,null))||void 0===n?void 0:n.height;t.style.height!==i&&(t.style.height="".concat(i))}};function ae(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(e){return!!o.getPlayer("".concat(e))},de=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},ue=function(){var e=t(n.mark((function e(t,o){var i,r;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return i=e.sent,r=de(t),e.abrupt("return",new Promise((function(e,n){v(o,i).then((function(n){var i=null==n?void 0:n.data;i.contentType="linearchannel",i.channelId=null==o?void 0:o.channelId;var l=J(i,t);l&&me(t,l),r.on("loadstart",(function(){e({status:!0,msg:"Feed loaded",response:i})}))})).catch((function(e){n({status:!1,msg:"Cannot load feed",response:e})}))})));case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),ce=function(){var e=t(n.mark((function e(t,o,i){var r,l,a,s,d,u;return n.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,W();case 2:return s=e.sent,R(o),d=0,u=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&p(o,s).then((function(e){var t,n,o,i,r,l;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)),d=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,u=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||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))})),e.abrupt("return",new Promise((function(e,n){c(o,s).then((function(o){var i,r,l,a,s,c,v,m,p,f,g=null==o?void 0:o.data,I=(null==g||null===(i=g.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;A(o.data);var E=(null==g||null===(l=g.ads)||void 0===l||null===(a=l.preRoll)||void 0===a||null===(s=a.adTags)||void 0===s||null===(c=s.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);E&&oe(t,E,g);var y=J(g,t);if(y){var w,h,T,_,b,O,D,x,V,S,L,C,k,W,P=(null==g||null===(w=g.video)||void 0===w||null===(h=w.gist)||void 0===h?void 0:h.videoImageUrl)||(null==g||null===(T=g.video)||void 0===T||null===(_=T.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),F=de(t);if(F.poster(P),me(t,y),F.on("loadstart",(function(){I&&e({status:!0,msg:"Video Loaded",response:g})})),F.on("loadeddata",(function(){j(),e({status:!0,msg:"Video Loaded",response:g})})),F.one("play",(function(){d&&u<95&&setTimeout((function(){F.currentTime(d)}),0)})),F.one("error",(function(){var e;n({status:!1,msg:(null==F||null===(e=F.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(O=g.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(x=D.closedCaptions)||void 0===x?void 0:x.length)>0||(null==g||null===(V=g.video)||void 0===V||null===(S=V.closedCaptions)||void 0===S?void 0:S.length)>0)L=((null==g||null===(C=g.video)||void 0===C||null===(k=C.contentDetails)||void 0===k?void 0:k.closedCaptions)||(null==g||null===(W=g.video)||void 0===W?void 0:W.closedCaptions)).filter((function(e){return"VTT"===e.format})),te(t,L);else ee(t)}else N(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){pe(e,t,n,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(t,n,o){return e.apply(this,arguments)}}(),ve=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},me=function(e,t){var n=de(e);n&&n.src(t)},pe=function(t,n,o,i){var r,l,a,s,d,u,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(s=a.data)||void 0===s?void 0:s.errorMessage)||(null==t?void 0:t.message);se(n)&&N(n,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?ae(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ae(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({status:!1,response:t,msg:"".concat(v)},i&&{videoId:i}))};exports.addCaptions=te,exports.clearError=j,exports.closeOpenDrawers=function(){var e=l(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var t,n;null==e||null===(t=e.childNodes)||void 0===t||null===(n=t[0])||void 0===n||n.click()}))},exports.createIconMarkup=function(e){return ie(e)},exports.createIdxMapping=function(e){S=new Map,e.map((function(e,t){S.set(e.id,t)}))},exports.detectBrowser=B,exports.detectOrientationChange=function(e,t){var n,o=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(re!==n){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");t&&(t.style.height="".concat(o)),re=n}}(e,t)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(n),n=setTimeout((function(){o()}),100)}))},exports.disableCaptions=function(e,t){for(var n=de(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==t||(i.mode="hidden")}},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var o=t.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=t.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var t=de(e);if(ve(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.enableCaptions=function(e,t){var n,o,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(n=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===n||null===(o=n[0])||void 0===o||null===(i=o.style)||void 0===i||i.setProperty("display","flex"));for(var r=de(e).textTracks(),l=0;l<r.length;l++){var a=r[l];"subtitles"!==a.kind&&"captions"!==a.kind||a.id!=t||(a.mode="showing")}},exports.getCaptions=function(e){var t,n=de(e);return(null==n||null===(t=n.textTracks())||void 0===t?void 0:t.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},exports.getCurrentSeries=function(){return D},exports.getCurrentVideo=P,exports.getLinearChannelDetails=v,exports.getPlayer=de,exports.getSeriesDetails=function(e,t){var n,o,r=JSON.parse(atob(t.split(".")[1])),l=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(n=window)&&void 0!==n&&null!==(o=n.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,t){var n,o;return e({data:null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.seriesData})})):i({url:T()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=function(e){var t,n;if("v1"==((null===(t=window)||void 0===t||null===(n=t.watchHistory)||void 0===n?void 0:n.apiVersion)||"v1"))return i({method:"GET",url:g(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var o=e.videoId;return i({method:"GET",url:f(o),headers:{Authorization:e.token},timeout:15e3})},exports.getSeriesWatchMap=function(){return L},exports.getSource=J,exports.getToken=W,exports.getVideoDetails=c,exports.getVideoIdx=function(){return V},exports.getVideoInfo=p,exports.handleDrawerResizing=function(e,t){var n,o=de(e),i=de(e).el(),r=new ResizeObserver((function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")||(n&&clearTimeout(n),n=setTimeout((function(){le(e,t)}),200))}));r.observe(i),o.on("dispose",(function(){r.disconnect()})),o.on("fullscreenchange",(function(){setTimeout((function(){le(e,t)}),50)}))},exports.handleError=N,exports.highlightVideo=function(e){l(document.querySelectorAll("[video-idx]")).map((function(t){var n=t.getAttribute("video-idx");t.style.border=n==e?"2px solid white":"none"}))},exports.impolicy16x9=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},exports.initialiseAdvertisement=oe,exports.initiateErrorHandling=pe,exports.isNotAValidSkin=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=se,exports.isTokenExpired=_,exports.load=ce,exports.loadLC=ue,exports.loadVideo=me,exports.loadVideoInstantly=function(e,t,n){var o=de(e);return o.src(t),new Promise((function(e,t){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){t("FAILED: Took too long to load")}),n)}))}))},exports.parseHtmlString=function(e){var t=(new DOMParser).parseFromString(e,"text/html");return null==t?void 0:t.querySelector("body")},exports.parseSvgString=ie,exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=O,exports.rewind=function(e,t){var n=o(e),i=n.currentTime(),r=i<=t?0:i-t;n.currentTime(r)},exports.saveWatchHistory=m,exports.setCurrentSeries=function(e){D=e},exports.setCurrentVideo=A,exports.setSeriesWatchMap=function(e){L=e},exports.setUpdatedElHeight=le,exports.setVideoIdx=F,exports.setVideoIdxById=R,exports.skip=function(e,t){var n=o(e),i=n.currentTime()+t;n.currentTime(i)};
|
package/cjs/skin-3bdb636e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-bcd33731.js"),l=require("./icons-515b2da0.js"),t=require("./generic-6ababa2d.js"),i=require("./renditions-c99c7c87.js"),n=require("@babel/runtime/helpers/toConsumableArray"),o=require("./autoNextVideo-be6322d8.js");require("@babel/runtime/helpers/defineProperty"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("video.js"),require("./localisation-56e0a999.js"),require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("axios"),require("js-cookie"),require("ua-parser-js"),require("./util-a1461a90.js");var r=t.getCurrentSeries(),a=[];null==r||r.map((function(e){return a.push.apply(a,n(e.episodes))}));var d=function(e,l){var i=t.getPlayer(e),n=Math.floor(i.currentTime());if(Math.floor(i.duration())!=n){i.pause(e);var r=t.getVideoIdx();o.switchToNext(r,e,a)}};function u(l,n){var o=t.getPlayer(l);o.on("loadeddata",(function(){var r,u,s;(null===(r=i.getRenditions(l))||void 0===r?void 0:r.length)>0&&e.addSettingsButtonV2(l,n),(null===(u=t.getCaptions(l))||void 0===u?void 0:u.length)>0&&e.addCaptionButton(l,n),null!=n&&null!==(s=n.series)&&void 0!==s&&s.enable&&function(e,l){var i;null==l||null===(i=l.series)||void 0===i||i.cb;var n=t.getPlayer(e);n.on("timeupdate",(function(){var e,l=Math.floor(n.currentTime()),i=n.duration(),o=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];i-l<=10&&t.getVideoIdx()<=(null==a?void 0:a.length)-1?o&&(o.style.visibility="visible"):o&&(o.style.visibility="hidden")}));var o,r=a.filter((function(e,l){return l==t.getVideoIdx()}));if((null==r?void 0:r.length)>0)if(null!==(o=document.getElementsByClassName("next-ep-preview"))&&void 0!==o&&o[0]){var u,s,v,c,m,p,g,h,f,y,b;(null===(u=document.getElementsByClassName("next-ep-preview"))||void 0===u?void 0:u[0]).style.visibility="hidden";var C=null===(s=document.getElementsByClassName("next-ep-title"))||void 0===s?void 0:s[0],x=null===(v=document.getElementsByClassName("next-ep-img"))||void 0===v?void 0:v[0],q=null===(c=document.getElementsByClassName("next-ep-content"))||void 0===c?void 0:c[0],j=null===(m=r[0])||void 0===m?void 0:m.title;(null===(p=j)||void 0===p?void 0:p.length)>60&&(j=j.substr(0,60)+"..."),C.textContent="".concat(j),x.src=(null===(g=r[0])||void 0===g||null===(h=g.gist)||void 0===h||null===(f=h.imageGist)||void 0===f?void 0:f.r16x9)||(null===(y=window)||void 0===y||null===(b=y.customData)||void 0===b?void 0:b.fallbackImage),q.onclick=function(){return d(e)}}else{var w,E,N,B,V,S,k,P=document.createElement("div");P.className="next-ep-preview",P.style.visibility="hidden",document.getElementById(e).append(P);var I=document.createElement("div");I.className="next-ep-header",I.textContent="Next up";var M=null===(w=r[0])||void 0===w?void 0:w.title,R=document.createElement("img");R.className="next-ep-img",R.src=(null===(E=r[0])||void 0===E||null===(N=E.gist)||void 0===N||null===(B=N.imageGist)||void 0===B?void 0:B.r16x9)||(null===(V=window)||void 0===V||null===(S=V.customData)||void 0===S?void 0:S.fallbackImage);var T=document.createElement("div");T.className="next-ep-title",(null===(k=M)||void 0===k?void 0:k.length)>60&&(M=M.substr(0,60)+"..."),T.textContent="".concat(M);var O=document.createElement("div");O.className="next-ep-content",O.append(R),O.append(T),O.onclick=function(){return d(e)},P.append(I),P.append(O)}}(l,n),function(e,l){var t,i=Math.floor(e/60),n=null===(t=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===t?void 0:t[0];n&&(n.style.marginRight=i>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],r=document.getElementsByClassName("vjs-time-control");l&&o.classList.value.includes("vjs-hidden")&&(r[0].style.display="block",n&&(n.style.marginRight="56px"))}(o.duration(),(null==n?void 0:n.liveVideo)||!1)})),o.one("play",(function(){var t,i,n,o;null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.iframeOverlayUrl&&e.addOutputtingOverlay(l,null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}exports.initialiseSkin=function(i,n){!function(){"Chrome"==t.detectBrowser()&&Promise.resolve().then((function(){return require("./chromett-f925fb6c.js")})).then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));Promise.resolve().then((function(){return require("./skin-921d35a8.js")})).then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),u(i,n),function(e,i){var n,o,r,a,d=t.getPlayer(e);null===(n=d.controlBar.getChild("FullscreenToggle"))||void 0===n||null===(o=n.el())||void 0===o||o.appendChild(t.createIconMarkup(l.MinimizeSvg(window.controlsColor))),null===(r=d.controlBar.getChild("FullscreenToggle"))||void 0===r||null===(a=r.el())||void 0===a||a.appendChild(t.createIconMarkup(l.MaximizeSvg(window.controlsColor)));var u=document.getElementsByClassName("vjs-time-control");i.liveVideo&&u[0]&&(u[0].style.display="none")}(i,n),function(t,i){var n,o,r,a,d,u;0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)&&e.addSkipButton(t,"defaultV2",l.SkipSvgV2());(0==(null==i?void 0:i.liveVideo)&&0==(null==i?void 0:i.liveui)||1==(null==i?void 0:i.liveui))&&e.addRewindButton(t,"defaultV2",l.RewindSvgV2());i.liveVideo||e.addSlowMotion(t);(null==i||null===(n=i.relatedVideos)||void 0===n||null===(o=n.content)||void 0===o?void 0:o.length)>0&&e.addVideoSelector(t,null==i?void 0:i.relatedVideos);(null==i||null===(r=i.streams)||void 0===r?void 0:r.length)>1&&e.addMulticamSelector(t,null==i?void 0:i.streams);(null==i||null===(a=i.playlist)||void 0===a||null===(d=a.content)||void 0===d?void 0:d.length)>0&&e.addPlaylistSelector(t,null==i?void 0:i.playlist);null!=i&&null!==(u=i.series)&&void 0!==u&&u.enable&&e.addSeriesSelectorV2(t,i)}(i,n),function(e,l){var i=t.getPlayer(e),n=null==l?void 0:l.tvProviderLogoUrl;if(!n)return;var o=document.createElement("div");o.className="tvProviderImage";var r=document.createElement("img");r.src="".concat(n),r.alt="Provider Image",o.append(r),i.el().appendChild(o),i.on("useractive",(function(){o.classList.remove("vjs-fade")})),i.on("userinactive",(function(){i.paused()||o.classList.add("vjs-fade")})),i.on("fullscreenchange",(function(){i.isFullscreen_?o.style.top="3.2rem":o.style.top="1rem"}))}(i,n)};
|
package/esm/generic-a4ebd71c.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import"js-cookie";import r from"ua-parser-js";import a from"@babel/runtime/helpers/toConsumableArray";var l={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel"};function u(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function d(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var s={name:"@viewlift/player-backup",version:"1.0.92-backup",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.2.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3","js-cookie":"^3.0.5","video.js":"^7.20.3","videojs-contrib-ads":"^6.9.0","videojs-contrib-dash":"^5.1.1","videojs-contrib-eme":"^3.11.1","videojs-ima":"^2.1.0"}},c=function(e,n){var t,o,r,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):i({url:_(),params:d({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":s.version},withCredentials:!0})},v=function(e,n){var t,o;return i({url:b()+l.getLinearChannelDetails,params:d(d(d(d(d({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:n}})},m=function(e,n){var t,o,r=JSON.parse(atob(n.split(".")[1])),a=(null==r?void 0:r.site)||null;return r&&r.countryCode,null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):i({url:b()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},p=function(){var e=n(t.mark((function e(n,o){var r,a;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:if(r=e.sent,"v1"!=o){e.next=8;break}return a={siteOwner:null==n?void 0:n.siteOwner,userId:null==n?void 0:n.userId,videoId:null==n?void 0:n.videoId,watchedPercentage:null==n?void 0:n.watchedPercentage,watchedTime:null==n?void 0:n.watchedTime},e.abrupt("return",i({url:T(),method:"POST",headers:{Authorization:r,"x-api-key":n.xApiKey},params:{version:"v2"},data:JSON.stringify(a),withCredentials:!0}));case 8:if("v2"!=o){e.next=10;break}return e.abrupt("return",i({url:h(),method:"POST",headers:{Authorization:r},data:d({},n),params:d({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 10:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),f=function(e,n){var t,o,r=(null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.apiVersion)||"v1";if("v1"==r){var a,l,u=JSON.parse(atob(n.split(".")[1])),d=(null==u?void 0:u.site)||null;return i({method:"GET",url:y(e),params:{site:d},headers:{Authorization:n,"x-api-key":null===(a=window)||void 0===a||null===(l=a.watchHistory)||void 0===l?void 0:l.xApiKey},timeout:15e3})}if("v2"==r){var s,c;JSON.parse(atob(n.split(".")[1]));var v=window.contentType;return i({method:"GET",url:w(e,v),headers:{Authorization:n,"x-api-key":null===(s=window)||void 0===s||null===(c=s.watchHistory)||void 0===c?void 0:c.xApiKey},timeout:15e3})}},g=function(e){var n,t;if("v1"==((null===(n=window)||void 0===n||null===(t=n.watchHistory)||void 0===t?void 0:t.apiVersion)||"v1"))return i({method:"GET",url:E(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token},timeout:15e3});var o=e.videoId;return i({method:"GET",url:I(o),headers:{Authorization:e.token},timeout:15e3})},I=function(e){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV1)},y=function(e){return b()+"".concat(null==l?void 0:l.getVideoInfoV1,"/").concat(e)},w=function(e,n){return b()+"".concat(null==l?void 0:l.getVideoInfoV2,"/").concat(n,"/").concat(e)},T=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV1)},h=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV2)},_=function(){var e,n,t,o,i=b()+"".concat(null==l?void 0:l.getVideoDetails);return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":i},b=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==l?void 0:l.apiBaseUrl)},O=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},D=null;function V(){return{set:function(e){e&&(D=e)},get:function(){return D}}}var S,L,C,A,W,k=function(){var e=n(t.mark((function e(){var n,o,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=V().get(),o=b(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),F=null,R=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=6;break}return F||(F=k().then((function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&V().set(r),i||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){F=null}))),e.abrupt("return",F);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(e){L=e},N=function(){return L},x=function(e){S=e},j=function(){return S},B=function(){return C},U=function(e){C=e},M=function(e){W=e},H=function(){return W},z=function(e){A=new Map,e.map((function(e,n){A.set(e.id,n)}))},G=function(e){if(A){var n=A.get(e);U(n+1)}},Y=function(e,n){if(import("./error-2395864b.js").then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e),i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}},q=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var X=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"};function J(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function K(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?J(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):J(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=r(navigator.userAgent);var Z=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},Q=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if("monetizationModels"==n){var t=$(e,"video.monetizationModels",[]);if(t.length>0)return t.map((function(e){return e.type})).join(",")}else if("plans"==n){var o=$(e,"video.plans",[]);if(o.length>0)return o.map((function(e){return e.planIds})).join(",")}else{var i=$(e,"video.tags",[]);if(i.length>0)return i.map((function(e){return e.title})).join(",")}return $(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE")},$=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},ee=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},ne=function(){var e,n,t,o,i,r,a,l,u,d,s,c,v,m,p,f,g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",I=arguments.length>1?arguments[1]:void 0,E=arguments.length>2?arguments[2]:void 0,y=(null==E?void 0:E.contentType)||"video",w=null==E||null===(e=E[y])||void 0===e?void 0:e.metadata,T=ke(I);if(!g.includes("VIEWLIFT_"))return g;var h=window.getComputedStyle(document.getElementById(I),null),_=Math.trunc(h.getPropertyValue("height").slice(0,-2)),b=Math.trunc(h.getPropertyValue("width").slice(0,-2)),O="linearchannel"===y?null==E||null===(n=E.linearchannel)||void 0===n||null===(t=n.channels)||void 0===t||null===(o=t.find((function(e){return(null==e?void 0:e.id)===(null==E?void 0:E.channelId)})))||void 0===o||null===(i=o.content)||void 0===i?void 0:i.id:$(E,"video.gist.id",""),D=K(K({},te(w)),{},{VIEWLIFT_WIDTH:b,VIEWLIFT_HEIGHT:_,VIEWLIFT_SIZE:Z(b,_),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(r=window)||void 0===r?void 0:r.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:$(E,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==T||null===(a=T.options_)||void 0===a?void 0:a.autoplay)||1,VIEWLIFT_MUTE:(null==T||null===(l=T.options_)||void 0===l?void 0:l.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:Q(E),VIEWLIFT_MEDIA_ID:O,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI($(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:O,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+$(E,"video.gist.permalink","")),VIEWLIFT_COPPA:$(null===(u=window)||void 0===u||null===(d=u.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:$(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(m=v.site)||void 0===m?void 0:m.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:$(E,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:O,VIEWLIFT_CONTENT_TITLE:$(E,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:$(E,"video.series[0].gist.title",$(E,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:$(E,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:$(E,"video.currentEpisode","VIEWLIFT_EPISODE_NUMBER"),VIEWLIFT_SEASON_NUMBER:$(E,"video.currentSeason","VIEWLIFT_SEASON_NUMBER"),VIEWLIFT_CONTENT_TAGS:Q(E,"tags")},null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f?void 0:f.macros);for(var V in D){var S=new RegExp("\\b("+V+")\\b","g");g=g.replace(S,D[V])}return g},te=function(e){var n,t,o,i,r,a,l={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){u.set(e.name,e.value)})));var d=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return d||s?(ee()?d?l=K(K({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):s&&(l=K(K({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):d?l=K(K({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):s&&(l=K(K({},l),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),d?l=K(K({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}):s&&(l=K(K({},l),{},{VIEWLIFT_SFID:u.get("sfid.tve")||""})),l=ee()?K(K({},l),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):K(K({},l),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(l=K(K({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||""}),l=ee()?K(K({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):K(K({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),l},oe=function(e,n){var t,o,i,r,a,l,u,d,s,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[f])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,y=(null==e||null===(l=e[f])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(d=u.videoAssets)||void 0===d?void 0:d.hls)||!1;null==e||null===(s=e[f])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var w=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.videoSourceUrl)return null==e?void 0:e.videoSourceUrl;if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return re(E);if(g){var T=ae(I,n);return T.src=ne(T.src,n,e),T}if("Safari"!==X()&&w)return ie(I);if(y){var h=re(I);return h.src=ne(h.src,n,e),h}if(null!=I&&I.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return _.src=ne(_.src,n,e),_}return null},ie=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},re=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ae=function(e,n){var t=e.fairPlay,i=e.widevine,r=e.playReady,a=X();if(ke(n),"Safari"===a){var l=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(n,t,i,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(t);return le(n),l}var u,d={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(le(n),d.keySystems={"com.widevine.alpha":{url:i.licenseUrl,licenseHeaders:{"X-AxDRM-Message":i.licenseToken}},"com.microsoft.playready":{url:r.licenseUrl,licenseHeaders:{"X-AxDRM-Message":r.licenseToken}}}):(d.keySystemOptions=[],d.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),d.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),d};var le=function(e){var n=ke(e);if("function"==typeof n.eme)try{n.eme()}catch(e){console.log("EME ERROR :",e)}},ue=function(e,n){var t,o,i;document.getElementsByClassName("vjs-text-track-display-ttml")&&(null===(t=document.getElementsByClassName("vjs-text-track-display-ttml"))||void 0===t||null===(o=t[0])||void 0===o||null===(i=o.style)||void 0===i||i.setProperty("display","flex"));for(var r=ke(e).textTracks(),a=0;a<r.length;a++){var l=r[a];"subtitles"!==l.kind&&"captions"!==l.kind||l.id!=n||(l.mode="showing")}},de=function(e,n){for(var t=ke(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},se=function(e){var n,t=ke(e);return(null==t||null===(n=t.textTracks())||void 0===n?void 0:n.tracks_.filter((function(e){return"subtitles"==e.kind||"captions"===e.kind})))||[]},ce=function(e){var n=ke(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))},ve=function(e,n){var t=ke(e);t.remoteTextTracks().tracks_.map((function(e){t.removeRemoteTextTrack(e)})),n.map((function(e){t.addRemoteTextTrack({src:e.url,srcLang:e.language,label:e.language})}))},me=!1,pe=function(e,n,t){var o=ne(n,e,t),i=ke(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r,a,l,u,d=ke(e);if(null!==d.el_){me=!0;var s=(null===(t=N())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id)||(null===(r=N())||void 0===r?void 0:r.id),c={id:e,adTagUrl:"".concat(n,"&vid=").concat(s,"&url=").concat(window.location.href,"&correlator=").concat((new Date).getTime(),"&cust_params=sd%3D60000%26site%3D").concat(window.location.origin,"%26autostart%3D%26mute%3D%26user_agent%3D%26keyword%3D%26category%3D").concat(window.category,"%26vid%3D").concat(s),adLabel:"Your video will resume after this sponsor message"};d.ima.initializeAdDisplayContainer&&d.ima.initializeAdDisplayContainer(),me&&null!==d.el_&&("function"==typeof d.ima?d.ima(c):setTimeout((function(){d.ima.setContentWithAdTag(null,n,!0),d.ima.requestAds()}),1e3));var v=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&v.hasAttribute("controls")&&v.removeAttribute("controls");var m="click",p=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(p=!0,m="touchend"),d.one(m,(function(){p&&d.ima.initializeAdDisplayContainer()}));var f=(null===(a=window)||void 0===a||null===(l=a.customData)||void 0===l||null===(u=l.ads)||void 0===u?void 0:u.adEventHandler)||null;d.one("ads-ad-started",(function(){f&&f({status:"STARTED",msg:"Advertisement Started"})})),d.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){f&&f({status:"ENDED",msg:"Advertisement Ended"})}))})),d.on("adserror",(function(e){f&&f({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},fe=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},ge=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},Ie=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Ee=function(e){return Ie(e)},ye=function(e){a(document.querySelectorAll("[video-idx]")).map((function(n){var t=n.getAttribute("video-idx");n.style.border=t==e?"2px solid white":"none"}))},we=function(){var e=a(document.getElementsByClassName("vjs-control vjs-button open"));null==e||e.map((function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()}))},Te=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},he="",_e=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(he!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),he=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))},be=function(e,n){var t,o=ke(e),i=ke(e).el(),r=new ResizeObserver((function(){var o;null!==(o=n.classList)&&void 0!==o&&o.contains("hidden")||(t&&clearTimeout(t),t=setTimeout((function(){Oe(e,n)}),200))}));r.observe(i),o.on("dispose",(function(){r.disconnect()})),o.on("fullscreenchange",(function(){setTimeout((function(){Oe(e,n)}),50)}))},Oe=function(e,n){var t;if(n){var o=document.getElementById(e),i=null===(t=window.getComputedStyle(o,null))||void 0===t?void 0:t.height;n.style.height!==i&&(n.style.height="".concat(i))}};function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}var Ve=function(e){o(e).play()},Se=function(e){o(e).pause()},Le=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Ce=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Ae=function(e){return!!o.getPlayer("".concat(e))},We=function(e){return o(e).paused()},ke=function(e){return!!o.getPlayer("".concat(e))&&o.getPlayer("".concat(e))},Fe=function(){var e=n(t.mark((function e(n,o){var i,r;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:return i=e.sent,r=ke(n),e.abrupt("return",new Promise((function(e,t){v(o,i).then((function(t){var i=null==t?void 0:t.data;i.contentType="linearchannel",i.channelId=null==o?void 0:o.channelId;var a=oe(i,n);a&&je(n,a),r.on("loadstart",(function(){e({status:!0,msg:"Feed loaded",response:i})}))})).catch((function(e){t({status:!1,msg:"Cannot load feed",response:e})}))})));case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Re=function(){var e=n(t.mark((function e(n,o,i){var r,a,l,u,d,s;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,R();case 2:return u=e.sent,G(o),d=0,s=0,null!==(r=window)&&void 0!==r&&r.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(l=a.watchHistory)&&void 0!==l&&l.enable&&f(o,u).then((function(e){var n,t,o,i,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),d=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null})).catch((function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))})),e.abrupt("return",new Promise((function(e,t){c(o,u).then((function(o){var i,r,a,l,u,c,v,m,p,f,g=null==o?void 0:o.data,I=(null==g||null===(i=g.video)||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;P(o.data);var E=(null==g||null===(a=g.ads)||void 0===a||null===(l=a.preRoll)||void 0===l||null===(u=l.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==g||null===(v=g.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(f=p.web)||void 0===f?void 0:f.url);E&&pe(n,E,g);var y=oe(g,n);if(y){var w,T,h,_,b,O,D,V,S,L,C,A,W,k,F=(null==g||null===(w=g.video)||void 0===w||null===(T=w.gist)||void 0===T?void 0:T.videoImageUrl)||(null==g||null===(h=g.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),R=ke(n);if(R.poster(F),je(n,y),R.on("loadstart",(function(){I&&e({status:!0,msg:"Video Loaded",response:g})})),R.on("loadeddata",(function(){q(),e({status:!0,msg:"Video Loaded",response:g})})),R.one("play",(function(){d&&s<95&&setTimeout((function(){R.currentTime(d)}),0)})),R.one("error",(function(){var e;t({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==g||null===(O=g.video)||void 0===O||null===(D=O.contentDetails)||void 0===D||null===(V=D.closedCaptions)||void 0===V?void 0:V.length)>0||(null==g||null===(S=g.video)||void 0===S||null===(L=S.closedCaptions)||void 0===L?void 0:L.length)>0)C=((null==g||null===(A=g.video)||void 0===A||null===(W=A.contentDetails)||void 0===W?void 0:W.closedCaptions)||(null==g||null===(k=g.video)||void 0===k?void 0:k.closedCaptions)).filter((function(e){return"VTT"===e.format})),ve(n,C);else ce(n)}else Y(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(e){Be(e,n,t,o)}))})));case 8:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),Pe=function(e,n,t){var o=ke(e);return o.src(n),new Promise((function(e,n){var i=0;o.one("loadedmetadata",(function(){clearTimeout(i),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){i=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},Ne=function(e){var n=ke(e);if(xe(),window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},xe=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},je=function(e,n){var t=ke(e);t&&t.src(n)},Be=function(n,t,o,i){var r,a,l,u,d,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(u=l.data)||void 0===u?void 0:u.errorMessage)||(null==n?void 0:n.message);Ae(t)&&Y(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?De(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},Ue=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{V as A,O as B,fe as C,m as D,c as E,Be as F,v as G,f as H,Te as I,pe as J,ve as K,x as L,Ie as M,Ee as N,j as O,B as P,ye as Q,We as R,U as S,ge as T,we as U,Oe as V,_e as W,be as X,z as Y,G as Z,N as a,ke as b,oe as c,X as d,P as e,q as f,R as g,Y as h,H as i,g as j,M as k,je as l,Pe as m,Le as n,Se as o,Ve as p,Ae as q,Ce as r,p as s,Re as t,Fe as u,Ne as v,ue as w,de as x,se as y,Ue as z};
|
package/esm/skin-b4f4124b.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,j as l,k as t,g as n,h as i,d as o,l as a,m as r,n as s,o as d}from"./features-fe79ecce.js";import{M as u,a as v,c as m,d as c}from"./icons-3e9a1686.js";import{O as p,b as f,P as g,y as h,N as y,d as b}from"./generic-a4ebd71c.js";import{g as C}from"./renditions-9f750ba8.js";import x from"@babel/runtime/helpers/toConsumableArray";import{s as j}from"./autoNextVideo-ab0dff65.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"js-cookie";import"ua-parser-js";import"./util-32cf020e.js";var E=p(),N=[];null==E||E.map((function(e){return N.push.apply(N,x(e.episodes))}));var w=function(e,l){var t=f(e),n=Math.floor(t.currentTime());if(Math.floor(t.duration())!=n){t.pause(e);var i=g();j(i,e,N)}};function B(n,i){var o=f(n);o.on("loadeddata",(function(){var t,a,r;(null===(t=C(n))||void 0===t?void 0:t.length)>0&&e(n,i),(null===(a=h(n))||void 0===a?void 0:a.length)>0&&l(n,i),null!=i&&null!==(r=i.series)&&void 0!==r&&r.enable&&function(e,l){var t;null==l||null===(t=l.series)||void 0===t||t.cb;var n=f(e);n.on("timeupdate",(function(){var e,l=Math.floor(n.currentTime()),t=n.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];t-l<=10&&g()<=(null==N?void 0:N.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var i,o=N.filter((function(e,l){return l==g()}));if((null==o?void 0:o.length)>0)if(null!==(i=document.getElementsByClassName("next-ep-preview"))&&void 0!==i&&i[0]){var a,r,s,d,u,v,m,c,p,h,y;(null===(a=document.getElementsByClassName("next-ep-preview"))||void 0===a?void 0:a[0]).style.visibility="hidden";var b=null===(r=document.getElementsByClassName("next-ep-title"))||void 0===r?void 0:r[0],C=null===(s=document.getElementsByClassName("next-ep-img"))||void 0===s?void 0:s[0],x=null===(d=document.getElementsByClassName("next-ep-content"))||void 0===d?void 0:d[0],j=null===(u=o[0])||void 0===u?void 0:u.title;(null===(v=j)||void 0===v?void 0:v.length)>60&&(j=j.substr(0,60)+"..."),b.textContent="".concat(j),C.src=(null===(m=o[0])||void 0===m||null===(c=m.gist)||void 0===c||null===(p=c.imageGist)||void 0===p?void 0:p.r16x9)||(null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.fallbackImage),x.onclick=function(){return w(e)}}else{var E,B,V,k,P,I,M,T=document.createElement("div");T.className="next-ep-preview",T.style.visibility="hidden",document.getElementById(e).append(T);var D=document.createElement("div");D.className="next-ep-header",D.textContent="Next up";var L=null===(E=o[0])||void 0===E?void 0:E.title,O=document.createElement("img");O.className="next-ep-img",O.src=(null===(B=o[0])||void 0===B||null===(V=B.gist)||void 0===V||null===(k=V.imageGist)||void 0===k?void 0:k.r16x9)||(null===(P=window)||void 0===P||null===(I=P.customData)||void 0===I?void 0:I.fallbackImage);var F=document.createElement("div");F.className="next-ep-title",(null===(M=L)||void 0===M?void 0:M.length)>60&&(L=L.substr(0,60)+"..."),F.textContent="".concat(L);var G=document.createElement("div");G.className="next-ep-content",G.append(O),G.append(F),G.onclick=function(){return w(e)},T.append(D),T.append(G)}}(n,i),function(e,l){var t,n=Math.floor(e/60),i=null===(t=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===t?void 0:t[0];i&&(i.style.marginRight=n>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");l&&o.classList.value.includes("vjs-hidden")&&(a[0].style.display="block",i&&(i.style.marginRight="56px"))}(o.duration(),(null==i?void 0:i.liveVideo)||!1)})),o.one("play",(function(){var e,l,i,o;null!==(e=window)&&void 0!==e&&null!==(l=e.customData)&&void 0!==l&&l.iframeOverlayUrl&&t(n,null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}function V(e,l){!function(){"Chrome"==b()&&import("./chromett-a3cbb2e1.js").then((function(e){var l=document.createElement("style");l.id="chromett",l.append("".concat(e.default)),document.head.appendChild(l)}));import("./skin-3470b8fa.js").then((function(e){var l=document.createElement("style");l.id="default_v2",l.append("".concat(e.default)),document.head.appendChild(l)}))}(),B(e,l),function(e,l){var t,n,i,o,a=f(e);null===(t=a.controlBar.getChild("FullscreenToggle"))||void 0===t||null===(n=t.el())||void 0===n||n.appendChild(y(u(window.controlsColor))),null===(i=a.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(o=i.el())||void 0===o||o.appendChild(y(v(window.controlsColor)));var r=document.getElementsByClassName("vjs-time-control");l.liveVideo&&r[0]&&(r[0].style.display="none")}(e,l),function(e,l){var t,u,v,p,f,g;0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)&&n(e,"defaultV2",m());(0==(null==l?void 0:l.liveVideo)&&0==(null==l?void 0:l.liveui)||1==(null==l?void 0:l.liveui))&&i(e,"defaultV2",c());l.liveVideo||o(e);(null==l||null===(t=l.relatedVideos)||void 0===t||null===(u=t.content)||void 0===u?void 0:u.length)>0&&a(e,null==l?void 0:l.relatedVideos);(null==l||null===(v=l.streams)||void 0===v?void 0:v.length)>1&&r(e,null==l?void 0:l.streams);(null==l||null===(p=l.playlist)||void 0===p||null===(f=p.content)||void 0===f?void 0:f.length)>0&&s(e,null==l?void 0:l.playlist);null!=l&&null!==(g=l.series)&&void 0!==g&&g.enable&&d(e,l)}(e,l),function(e,l){var t=f(e),n=null==l?void 0:l.tvProviderLogoUrl;if(!n)return;var i=document.createElement("div");i.className="tvProviderImage";var o=document.createElement("img");o.src="".concat(n),o.alt="Provider Image",i.append(o),t.el().appendChild(i),t.on("useractive",(function(){i.classList.remove("vjs-fade")})),t.on("userinactive",(function(){t.paused()||i.classList.add("vjs-fade")})),t.on("fullscreenchange",(function(){t.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}(e,l)}export{V as initialiseSkin};
|