@viewlift/player-backup 1.0.37-backup → 1.0.38-backup

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/cjs/{autoNextVideo-85a23f80.js → autoNextVideo-b7c87b4c.js} +1 -1
  2. package/cjs/{caption-settings-f6a4a87a.js → caption-settings-6fb10596.js} +1 -1
  3. package/cjs/{features-1d7762e7.js → features-ce52c687.js} +1 -1
  4. package/cjs/generic-34b93767.js +1 -0
  5. package/cjs/index.js +1 -1
  6. package/cjs/{keyboardShortcuts-a046f83c.js → keyboardShortcuts-e2294e8c.js} +1 -1
  7. package/cjs/{multicam-215e5166.js → multicam-da7b3a0f.js} +1 -1
  8. package/cjs/{multicamv2-906a05ec.js → multicamv2-f5caa9b8.js} +1 -1
  9. package/cjs/{mwebPotraitTray-31e2e0eb.js → mwebPotraitTray-49514a7f.js} +1 -1
  10. package/cjs/{nextEpisodeButton-3d85e750.js → nextEpisodeButton-00482f4a.js} +1 -1
  11. package/cjs/{playlist-29848c0c.js → playlist-c42fc8f7.js} +1 -1
  12. package/cjs/{renditions-e32a815a.js → renditions-fdf1dbe0.js} +1 -1
  13. package/cjs/{resolution-cc25544e.js → resolution-46bd5b25.js} +1 -1
  14. package/cjs/{series-a3018dd4.js → series-9d55a1b1.js} +1 -1
  15. package/cjs/{series-v2-289865bb.js → series-v2-5248c1aa.js} +1 -1
  16. package/cjs/{settings-icon-174dafa3.js → settings-icon-dc047322.js} +1 -1
  17. package/cjs/{skin-1d4dd948.js → skin-0483e494.js} +1 -1
  18. package/cjs/{skin-1feb1a36.js → skin-201232fe.js} +1 -1
  19. package/cjs/{skin-5a8b5056.js → skin-69a1d035.js} +1 -1
  20. package/cjs/{skin-a402875a.js → skin-a59253b4.js} +1 -1
  21. package/cjs/{skin-096d9286.js → skin-efe17260.js} +1 -1
  22. package/cjs/{util-1eba9ba8.js → util-af14daa4.js} +1 -1
  23. package/cjs/{videoSelector-e0ee720f.js → videoSelector-e914e610.js} +1 -1
  24. package/esm/{autoNextVideo-d452aecb.js → autoNextVideo-2381bc10.js} +1 -1
  25. package/esm/{caption-settings-e1f9fd4f.js → caption-settings-26981aa4.js} +1 -1
  26. package/esm/{features-ca46e2b2.js → features-943c7a36.js} +1 -1
  27. package/esm/generic-b8e2ad04.js +1 -0
  28. package/esm/index.js +1 -1
  29. package/esm/{keyboardShortcuts-f5a0f66c.js → keyboardShortcuts-473cff21.js} +1 -1
  30. package/esm/{multicam-cf9b409f.js → multicam-b48d3050.js} +1 -1
  31. package/esm/{multicamv2-d4909286.js → multicamv2-fbd1d91a.js} +1 -1
  32. package/esm/{mwebPotraitTray-9cdf3962.js → mwebPotraitTray-a42d909d.js} +1 -1
  33. package/esm/{nextEpisodeButton-1bfc1a3b.js → nextEpisodeButton-af7bd985.js} +1 -1
  34. package/esm/{playlist-9e5d456f.js → playlist-9d9240ea.js} +1 -1
  35. package/esm/{renditions-67b59ff4.js → renditions-f4e243dc.js} +1 -1
  36. package/esm/{resolution-7f1bdcfe.js → resolution-086a6b69.js} +1 -1
  37. package/esm/{series-a1e805bf.js → series-fd6389e6.js} +1 -1
  38. package/esm/{series-v2-54f0f169.js → series-v2-d4980980.js} +1 -1
  39. package/esm/{settings-icon-fa4a2428.js → settings-icon-0d205b61.js} +1 -1
  40. package/esm/{skin-7ac46fa1.js → skin-5304f04f.js} +1 -1
  41. package/esm/{skin-dd3d6b5d.js → skin-5660a166.js} +1 -1
  42. package/esm/{skin-a8d4111c.js → skin-667a97cb.js} +1 -1
  43. package/esm/{skin-b3d1fa69.js → skin-8c305261.js} +1 -1
  44. package/esm/{skin-2337b3dc.js → skin-aa37ff43.js} +1 -1
  45. package/esm/{util-e55de7ed.js → util-d1cbd099.js} +1 -1
  46. package/esm/{videoSelector-27ab7312.js → videoSelector-2432d483.js} +1 -1
  47. package/package.json +1 -1
  48. package/cjs/generic-6b4b55bc.js +0 -1
  49. package/esm/generic-da59df34.js +0 -1
@@ -1 +1 @@
1
- import{i as e,j as t,k as l,g as n,h as i,d as o,l as a,m as r,n as s,o as d}from"./features-ca46e2b2.js";import{M as u,a as v,c as m,d as c}from"./icons-c2efba97.js";import{N as p,a as f,O as g,g as h,w as y,M as b,d as C}from"./generic-da59df34.js";import{g as x}from"./renditions-67b59ff4.js";import j from"@babel/runtime/helpers/asyncToGenerator";import E from"@babel/runtime/helpers/toConsumableArray";import w from"@babel/runtime/regenerator";import{s as N}from"./autoNextVideo-d452aecb.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"axios";import"js-cookie";import"ua-parser-js";import"./util-e55de7ed.js";var B,k=p(),V=[];null==k||k.map((function(e){return V.push.apply(V,E(e.episodes))}));var M=function(e,t){var l;B=(null==t||null===(l=t.series)||void 0===l?void 0:l.cb)||null;var n=f(e);n.on("timeupdate",(function(){var e,t=Math.floor(n.currentTime()),l=n.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];l-t<=10&&g()<=(null==V?void 0:V.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var i,o=V.filter((function(e,t){return t==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 I(e,o)}}else{var E,w,N,k,M,P,T,D=document.createElement("div");D.className="next-ep-preview",D.style.visibility="hidden",document.getElementById(e).append(D);var L=document.createElement("div");L.className="next-ep-header",L.textContent="Next up";var O=null===(E=o[0])||void 0===E?void 0:E.title,F=document.createElement("img");F.className="next-ep-img",F.src=(null===(w=o[0])||void 0===w||null===(N=w.gist)||void 0===N||null===(k=N.imageGist)||void 0===k?void 0:k.r16x9)||(null===(M=window)||void 0===M||null===(P=M.customData)||void 0===P?void 0:P.fallbackImage);var G=document.createElement("div");G.className="next-ep-title",(null===(T=O)||void 0===T?void 0:T.length)>60&&(O=O.substr(0,60)+"..."),G.textContent="".concat(O);var R=document.createElement("div");R.className="next-ep-content",R.append(F),R.append(G),R.onclick=function(){return I(e,o)},D.append(L),D.append(R)}},I=function(){var e=j(w.mark((function e(t,l){var n,i,o,a;return w.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h();case 2:if(n=e.sent,i=f(t),o=Math.floor(i.currentTime()),Math.floor(i.duration())!=o){e.next=8;break}return e.abrupt("return");case 8:i.pause(t),a=g(),N(a,t,V,n,B);case 11:case"end":return e.stop()}}),e)})));return function(t,l){return e.apply(this,arguments)}}();function P(n,i){var o=f(n);o.on("loadeddata",(function(){var l,a,r;(null===(l=x(n))||void 0===l?void 0:l.length)>0&&e(n,i),(null===(a=y(n))||void 0===a?void 0:a.length)>0&&t(n,i),null!=i&&null!==(r=i.series)&&void 0!==r&&r.enable&&M(n,i),function(e,t){var l,n=Math.floor(e/60),i=null===(l=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===l?void 0:l[0];i&&(i.style.marginRight=n>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");t&&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,t,i,o;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&l(n,null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}function T(e,t){!function(){"Chrome"==C()&&import("./chromett-a3cbb2e1.js").then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));import("./skin-3470b8fa.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),P(e,t),function(e,t){var l=f(e);l.controlBar.getChild("FullscreenToggle").el().appendChild(b(u(window.controlsColor))),l.controlBar.getChild("FullscreenToggle").el().appendChild(b(v(window.controlsColor)));var n=document.getElementsByClassName("vjs-time-control");t.liveVideo&&(n[0].style.display="none")}(e,t),function(e,t){var l,u,v,p,f,g;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&n(e,"defaultV2",m());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&i(e,"defaultV2",c());t.liveVideo||o(e);(null==t||null===(l=t.relatedVideos)||void 0===l||null===(u=l.content)||void 0===u?void 0:u.length)>0&&a(e,null==t?void 0:t.relatedVideos);(null==t||null===(v=t.streams)||void 0===v?void 0:v.length)>1&&r(e,null==t?void 0:t.streams);(null==t||null===(p=t.playlist)||void 0===p||null===(f=p.content)||void 0===f?void 0:f.length)>0&&s(e,null==t?void 0:t.playlist);null!=t&&null!==(g=t.series)&&void 0!==g&&g.enable&&d(e,t)}(e,t),function(e,t){var l=f(e),n=null==t?void 0:t.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),l.el().appendChild(i),l.on("useractive",(function(){i.classList.remove("vjs-fade")})),l.on("userinactive",(function(){l.paused()||i.classList.add("vjs-fade")})),l.on("fullscreenchange",(function(){l.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}(e,t)}export{T as initialiseSkin};
1
+ import{i as e,j as t,k as l,g as n,h as i,d as o,l as a,m as r,n as s,o as d}from"./features-943c7a36.js";import{M as u,a as v,c as m,d as c}from"./icons-c2efba97.js";import{N as p,a as f,O as g,g as h,w as y,M as b,d as C}from"./generic-b8e2ad04.js";import{g as x}from"./renditions-f4e243dc.js";import j from"@babel/runtime/helpers/asyncToGenerator";import E from"@babel/runtime/helpers/toConsumableArray";import w from"@babel/runtime/regenerator";import{s as N}from"./autoNextVideo-2381bc10.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"axios";import"js-cookie";import"ua-parser-js";import"./util-d1cbd099.js";var B,k=p(),V=[];null==k||k.map((function(e){return V.push.apply(V,E(e.episodes))}));var M=function(e,t){var l;B=(null==t||null===(l=t.series)||void 0===l?void 0:l.cb)||null;var n=f(e);n.on("timeupdate",(function(){var e,t=Math.floor(n.currentTime()),l=n.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];l-t<=10&&g()<=(null==V?void 0:V.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}));var i,o=V.filter((function(e,t){return t==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 I(e,o)}}else{var E,w,N,k,M,P,T,D=document.createElement("div");D.className="next-ep-preview",D.style.visibility="hidden",document.getElementById(e).append(D);var L=document.createElement("div");L.className="next-ep-header",L.textContent="Next up";var O=null===(E=o[0])||void 0===E?void 0:E.title,F=document.createElement("img");F.className="next-ep-img",F.src=(null===(w=o[0])||void 0===w||null===(N=w.gist)||void 0===N||null===(k=N.imageGist)||void 0===k?void 0:k.r16x9)||(null===(M=window)||void 0===M||null===(P=M.customData)||void 0===P?void 0:P.fallbackImage);var G=document.createElement("div");G.className="next-ep-title",(null===(T=O)||void 0===T?void 0:T.length)>60&&(O=O.substr(0,60)+"..."),G.textContent="".concat(O);var R=document.createElement("div");R.className="next-ep-content",R.append(F),R.append(G),R.onclick=function(){return I(e,o)},D.append(L),D.append(R)}},I=function(){var e=j(w.mark((function e(t,l){var n,i,o,a;return w.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h();case 2:if(n=e.sent,i=f(t),o=Math.floor(i.currentTime()),Math.floor(i.duration())!=o){e.next=8;break}return e.abrupt("return");case 8:i.pause(t),a=g(),N(a,t,V,n,B);case 11:case"end":return e.stop()}}),e)})));return function(t,l){return e.apply(this,arguments)}}();function P(n,i){var o=f(n);o.on("loadeddata",(function(){var l,a,r;(null===(l=x(n))||void 0===l?void 0:l.length)>0&&e(n,i),(null===(a=y(n))||void 0===a?void 0:a.length)>0&&t(n,i),null!=i&&null!==(r=i.series)&&void 0!==r&&r.enable&&M(n,i),function(e,t){var l,n=Math.floor(e/60),i=null===(l=document.getElementsByClassName("vjs-progress-holder vjs-slider vjs-slider-horizontal"))||void 0===l?void 0:l[0];i&&(i.style.marginRight=n>60?"56px":"41px");var o=document.getElementsByClassName("vjs-live-control")[0],a=document.getElementsByClassName("vjs-time-control");t&&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,t,i,o;null!==(e=window)&&void 0!==e&&null!==(t=e.customData)&&void 0!==t&&t.iframeOverlayUrl&&l(n,null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o?void 0:o.iframeOverlayUrl)}))}function T(e,t){!function(){"Chrome"==C()&&import("./chromett-a3cbb2e1.js").then((function(e){var t=document.createElement("style");t.id="chromett",t.append("".concat(e.default)),document.head.appendChild(t)}));import("./skin-3470b8fa.js").then((function(e){var t=document.createElement("style");t.id="default_v2",t.append("".concat(e.default)),document.head.appendChild(t)}))}(),P(e,t),function(e,t){var l=f(e);l.controlBar.getChild("FullscreenToggle").el().appendChild(b(u(window.controlsColor))),l.controlBar.getChild("FullscreenToggle").el().appendChild(b(v(window.controlsColor)));var n=document.getElementsByClassName("vjs-time-control");t.liveVideo&&(n[0].style.display="none")}(e,t),function(e,t){var l,u,v,p,f,g;0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&n(e,"defaultV2",m());(0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&i(e,"defaultV2",c());t.liveVideo||o(e);(null==t||null===(l=t.relatedVideos)||void 0===l||null===(u=l.content)||void 0===u?void 0:u.length)>0&&a(e,null==t?void 0:t.relatedVideos);(null==t||null===(v=t.streams)||void 0===v?void 0:v.length)>1&&r(e,null==t?void 0:t.streams);(null==t||null===(p=t.playlist)||void 0===p||null===(f=p.content)||void 0===f?void 0:f.length)>0&&s(e,null==t?void 0:t.playlist);null!=t&&null!==(g=t.series)&&void 0!==g&&g.enable&&d(e,t)}(e,t),function(e,t){var l=f(e),n=null==t?void 0:t.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),l.el().appendChild(i),l.on("useractive",(function(){i.classList.remove("vjs-fade")})),l.on("userinactive",(function(){l.paused()||i.classList.add("vjs-fade")})),l.on("fullscreenchange",(function(){l.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"}))}(e,t)}export{T as initialiseSkin};
@@ -1 +1 @@
1
- import{a as t}from"./generic-da59df34.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
+ import{a as t}from"./generic-b8e2ad04.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/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/regenerator";import l from"video.js";import{E as s,e as c}from"./icons-c2efba97.js";import{T as d,U as m,a as u,P as p,q as v,g as h,R as f}from"./generic-da59df34.js";import{a as y}from"./autoNextVideo-d452aecb.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-e55de7ed.js";function g(e){var t=C();return function(){var o,n=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return a(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=l.getComponent("Component"),N=function(){n(C,E);var a,i=g(C);function C(e){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,C),(a=i.call(this,e,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(f(0),y({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return o(C,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(s())});return l.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.el(),t=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(d(),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");t.style.height="".concat(o),l.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t),m(this.playerId,t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:(a=e(r.mark((function e(t){var o,n,a,i,s,d,m,y,g,C=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h();case 2:o=e.sent,n=this.el(),a=l.dom.createEl("div",{className:"video-selector-head"}),(i=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(c())})).onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"},s=l.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content"}),m=l.dom.createEl("div",{className:"video-container"}),y=r.mark((function e(t){var n,a,i,s,c,u,h,y,b;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=l.dom.createEl("div",{className:"video -".concat(t)}),(h=l.dom.createEl("div",{className:"recommended -".concat(t)})).setAttribute("video-idx",t),h.onclick=function(){f(t+1);for(var e=l.dom.$$(".recommended"),n=0;n<e.length;n++)e[n].style.border="none";p(t),v(C.playerId,C.videos[t].id,o).then((function(e){C.cb&&C.cb(e)})).catch((function(e){C.cb&&C.cb(e)}))},(y=document.createElement("img")).className="related-thumbnail-image",y.src="".concat((null==C||null===(n=C.videos)||void 0===n||null===(a=n[t])||void 0===a?void 0:a.img)||(null===(i=window)||void 0===i||null===(s=i.customData)||void 0===s?void 0:s.fallbackImage)),y.alt="No Thumbnail Available",h.append(y),b=l.dom.createEl("div",{className:"info -".concat(t),innerHTML:"".concat((null==C||null===(c=C.videos[t])||void 0===c?void 0:c.title)||"")}),l.dom.appendContent(u,h),l.dom.appendContent(u,b),l.dom.appendContent(m,u),l.dom.appendContent(d,m);case 14:case"end":return e.stop()}}),e)})),g=0;case 12:if(!(g<this.videos.length)){e.next=17;break}return e.delegateYield(y(g),"t0",14);case 14:g++,e.next=12;break;case 17:l.dom.appendContent(a,i),l.dom.appendContent(a,s),l.dom.appendContent(t,a),l.dom.appendContent(t,d),u(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(C.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}]),C}();export{N as default};
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import a from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import r from"@babel/runtime/regenerator";import l from"video.js";import{E as s,e as c}from"./icons-c2efba97.js";import{T as d,U as m,a as u,P as p,q as v,g as h,R as f}from"./generic-b8e2ad04.js";import{a as y}from"./autoNextVideo-2381bc10.js";import{g as b}from"./localisation-0bf399a1.js";import"@babel/runtime/helpers/defineProperty";import"axios";import"js-cookie";import"ua-parser-js";import"@babel/runtime/helpers/toConsumableArray";import"./util-d1cbd099.js";function g(e){var t=C();return function(){var o,n=i(e);if(t){var r=i(this).constructor;o=Reflect.construct(n,arguments,r)}else o=n.apply(this,arguments);return a(this,o)}}function C(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(C=function(){return!!e})()}var E=l.getComponent("Component"),N=function(){n(C,E);var a,i=g(C);function C(e){var o,n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,C),(a=i.call(this,e,r)).playerId=r.playerId,a.seriesData=r.sres,a.videos=r.related.content,a.cb=(null==r||null===(o=r.related)||void 0===o?void 0:o.cb)||null,a.autoNext=(null==r||null===(n=r.related)||void 0===n?void 0:n.autoNext)||!1,a.currentVideoData=r.res,a.initialiseStructure(),a.loadCSS(),a.autoNext&&(f(0),y({playerId:a.playerId,content:a.videos,cb:a.cb})),a}return o(C,[{key:"createEl",value:function(){var e=l.dom.createEl("div",{className:"video-selection vjs-control vjs-button"});e.style.position="unset";var t=l.dom.createEl("div",{className:"video-selector-icon",innerHTML:"".concat(s())});return l.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.el(),t=l.dom.createEl("div",{className:"video-selection-container hidden"});l.dom.$(".video-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(d(),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");t.style.height="".concat(o),l.dom.appendContent(e,t),document.getElementById(this.playerId).style.overflow="hidden",this.addFunctionality(t),m(this.playerId,t)}},{key:"toggleOpenClose",value:function(){}},{key:"addFunctionality",value:(a=e(r.mark((function e(t){var o,n,a,i,s,d,m,y,g,C=this;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h();case 2:o=e.sent,n=this.el(),a=l.dom.createEl("div",{className:"video-selector-head"}),(i=l.dom.createEl("div",{className:"video-selector-cross-icon",innerHTML:"".concat(c())})).onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"},s=l.dom.createEl("div",{className:"video-selector-title",innerHTML:b("relatedVideoTitle")||"Recommended"}),d=l.dom.createEl("div",{className:"video-selector-content"}),m=l.dom.createEl("div",{className:"video-container"}),y=r.mark((function e(t){var n,a,i,s,c,u,h,y,b;return r.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u=l.dom.createEl("div",{className:"video -".concat(t)}),(h=l.dom.createEl("div",{className:"recommended -".concat(t)})).setAttribute("video-idx",t),h.onclick=function(){f(t+1);for(var e=l.dom.$$(".recommended"),n=0;n<e.length;n++)e[n].style.border="none";p(t),v(C.playerId,C.videos[t].id,o).then((function(e){C.cb&&C.cb(e)})).catch((function(e){C.cb&&C.cb(e)}))},(y=document.createElement("img")).className="related-thumbnail-image",y.src="".concat((null==C||null===(n=C.videos)||void 0===n||null===(a=n[t])||void 0===a?void 0:a.img)||(null===(i=window)||void 0===i||null===(s=i.customData)||void 0===s?void 0:s.fallbackImage)),y.alt="No Thumbnail Available",h.append(y),b=l.dom.createEl("div",{className:"info -".concat(t),innerHTML:"".concat((null==C||null===(c=C.videos[t])||void 0===c?void 0:c.title)||"")}),l.dom.appendContent(u,h),l.dom.appendContent(u,b),l.dom.appendContent(m,u),l.dom.appendContent(d,m);case 14:case"end":return e.stop()}}),e)})),g=0;case 12:if(!(g<this.videos.length)){e.next=17;break}return e.delegateYield(y(g),"t0",14);case 14:g++,e.next=12;break;case 17:l.dom.appendContent(a,i),l.dom.appendContent(a,s),l.dom.appendContent(t,a),l.dom.appendContent(t,d),u(this.playerId).on("fullscreenchange",(function(){var e=window.getComputedStyle(document.getElementById(C.playerId),null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(e,"px")}));case 23:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}]),C}();export{N as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "1.0.37-backup",
3
+ "version": "1.0.38-backup",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "amdName": "_playerCore",
6
6
  "dependencies": {
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("video.js"),n=require("@babel/runtime/helpers/asyncToGenerator"),o=require("@babel/runtime/regenerator"),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 d(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 s(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?d(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}var u={name:"@viewlift/player-backup",version:"1.0.37-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:w(),params:s({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,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,d=JSON.parse(atob(t.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:g(e),params:{site:s},headers:{Authorization:t,"x-api-key":null===(l=window)||void 0===l||null===(a=l.watchHistory)||void 0===a?void 0:a.xApiKey}})}if("v2"==r){var u,c;JSON.parse(atob(t.split(".")[1]));var v=window.contentType;return i({method:"GET",url:I(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}})}},m=function(e){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV2,"/").concat(e)},p=function(){return T()+"".concat(null==a?void 0:a.getSeriesWatchHistoryV1)},g=function(e){return T()+"".concat(null==a?void 0:a.getVideoInfoV1,"/").concat(e)},I=function(e,t){return T()+"".concat(null==a?void 0:a.getVideoInfoV2,"/").concat(t,"/").concat(e)},f=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV1)},E=function(){return T()+"".concat(null==a?void 0:a.saveWatchHistoryV2)},w=function(){return T()+"".concat(null==a?void 0:a.getVideoDetails)},T=function(){var e;return(null===(e=window)||void 0===e?void 0:e.playerEntitlementUrl)||(null==a?void 0:a.apiBaseUrl)},y=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},h=null;function _(){return{set:function(e){e&&(h=e)},get:function(){return h}}}var b=function(){var e=n(o.mark((function e(){var t;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!y(t)){e.next=5;break}return e.abrupt("return",O().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&&_().set(r),i||t})).catch((function(e){return console.log("Error fetching refresh token",e),t})));case 5:return e.abrupt("return",t);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=_().get(),t=T();return i({method:"GET",url:t+"/identity/refresh/".concat(e)})},D=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)}},V=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var S=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 x(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 C(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?x(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):x(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}window._deviceInfo=r(navigator.userAgent);var L,W,A,P,F,k=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},R=function(e){var t=N(e,"video.tags",[]),n=N(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map((function(e){return e.title})).join(","):n},N=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},j=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},B=function(){var e,t,n,o,i,r,l,a,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,g=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,I=ne(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),w=Math.trunc(f.getPropertyValue("width").slice(0,-2)),T=N(p,"video.gist.id",""),y=C(C({},U(g)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:k(w,E),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===(t=window)||void 0===t?void 0:t.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:N(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==I||null===(n=I.options_)||void 0===n?void 0:n.autoplay)||1,VIEWLIFT_MUTE:(null==I||null===(o=I.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:R(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(N(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+N(p,"video.gist.permalink","")),VIEWLIFT_COPPA:N(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(l=r.site)||void 0===l?void 0:l.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:N(null===(a=window)||void 0===a||null===(d=a.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:N(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:N(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:N(p,"video.series[0].gist.title",N(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:N(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:N(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:N(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},U=function(e){var t,n,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(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 s||u?(j()?s?a=C(C({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=C(C({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=C(C({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=C(C({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=C(C({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(a=C(C({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),a=j()?C(C({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):C(C({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=C(C({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),a=j()?C(C({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):C(C({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a},H=function(e,t){var n,o,i,r,l,a,d,s,u,c,v,m,p,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(n=e[g])||void 0===n?void 0:n.drmEnabled,f=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[g])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[g])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[g])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[g])||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.audioAssetSource&&null!=E&&E.hls)return z(E);if(I){var y=G(f,t);return y.src=B(y.src,t,e),y}if("Safari"!==S()&&T)return M(f);if(w){var h=z(f);return h.src=B(h.src,t,e),h}if(null!=f&&f.mpeg){var _=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(f);return _.src=B(_.src,t,e),_}return null},M=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},G=function(e,n){var o=e.fairPlay,i=e.widevine,r=e.playReady,l=S(),a=ne(n);if("Safari"===l){var d=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};t.xhr(i,(function(e,t,n){console.log(e),e&&o(e),o(null,new Uint8Array(n))}))},getContentId:function(e,t){if(t)return new TextDecoder("utf-16").decode(t.slice(16))},getLicense:function(n,o,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}};t.xhr(l,(function(e,t,n){console.log(e),e&&r(e),r(null,n)}))}}}}}(o);try{a.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(a.eme(),u.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}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var q=function(e){W=e},Y=function(e){A=e},X=function(e){if(P){var t=P.get(e);Y(t+1)}},J=function(e,t){var n=ne(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})}))},K=!1,Z=function(e,t,n){var o=B(t,e,n),i=ne(e);t&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,t){var n,o,i,r=ne(e);if(null!==r.el_){K=!0;var l={id:e,adTagUrl:"".concat(t,"&vid=").concat(window.videoId,"&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(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),K&&null!==r.el_&&("function"==typeof r.ima?r.ima(l):setTimeout((function(){r.ima.setContentWithAdTag(null,t,!0),r.ima.requestAds()}),1e3));var a=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&a.hasAttribute("controls")&&a.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},Q=function(e){var t=(new DOMParser).parseFromString(e,"image/svg+xml");return null==t?void 0:t.querySelector("svg")},$="";function ee(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 te=function(e){return!!t.getPlayer("".concat(e))},ne=function(e){return!!t.getPlayer("".concat(e))&&t.getPlayer("".concat(e))},oe=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()},ie=function(e,t){ne(e).src(t)},re=function(t,n,o,i){var r,l,a,d,s,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===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);te(n)&&D(n,(null===(s=window)||void 0===s?void 0:s.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?ee(Object(o),!0).forEach((function(n){e(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):ee(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=J,exports.clearError=V,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 Q(e)},exports.createIdxMapping=function(e){P=new Map,e.map((function(e,t){P.set(e.id,t)}))},exports.detectBrowser=S,exports.detectOrientationChange=function(e,t){var n,o=function(){return function(e,t){var n=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if($!==n){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");t&&(t.style.height="".concat(o)),$=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=ne(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=ne(e);if(oe(),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){for(var n=ne(e).textTracks(),o=0;o<n.length;o++){var i=n[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=t||(i.mode="showing")}},exports.getCaptions=function(e){var t,n=ne(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 L},exports.getCurrentVideo=function(){return W},exports.getLinearChannelDetails=function(e,t){var n,o;return i({url:T()+a.getLinearChannelDetails,params:s(s(s(s(s({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(n=window)||void 0===n||null===(o=n.customData)||void 0===o?void 0:o.entitlement),method:"GET",headers:{Authorization:t}})},exports.getPlayer=ne,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:p(),params:{site:null==e?void 0:e.siteOwner,version:"v2",seriesId:e.videoId},headers:{Authorization:e.token}});var o=e.videoId;return i({method:"GET",url:m(o),headers:{Authorization:e.token}})},exports.getSeriesWatchMap=function(){return F},exports.getSource=H,exports.getToken=b,exports.getVideoDetails=c,exports.getVideoIdx=function(){return A},exports.getVideoInfo=v,exports.handleError=D,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=Z,exports.initiateErrorHandling=re,exports.isNotAValidSkin=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},exports.isPaused=function(e){return t(e).paused()},exports.isPlayerInitialised=te,exports.isTokenExpired=y,exports.load=function(e,t,n){var o,i,r;X(t);var l=0,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&&v(t,n).then((function(e){var t,n,o,i,r,d;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)),l=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,a=(null==e||null===(d=e.data)||void 0===d?void 0:d.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))})),new Promise((function(o,i){c(t,n).then((function(t){var n,r,d,s,u,c,v,m,p,g,I=null==t?void 0:t.data,f=(null==I||null===(n=I.video)||void 0===n||null===(r=n.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;q(t.data);var E=(null==I||null===(d=I.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.adTags)||void 0===u||null===(c=u.web)||void 0===c?void 0:c.active)&&(null==I||null===(v=I.ads)||void 0===v||null===(m=v.preRoll)||void 0===m||null===(p=m.adTags)||void 0===p||null===(g=p.web)||void 0===g?void 0:g.url);E&&Z(e,E,I);var w=H(I,e);if(w){var T,y,h,_,b,O,S,x,C,L,W,A,P,F,k=(null==I||null===(T=I.video)||void 0===T||null===(y=T.gist)||void 0===y?void 0:y.videoImageUrl)||(null==I||null===(h=I.video)||void 0===h||null===(_=h.gist)||void 0===_||null===(b=_.imageGist)||void 0===b?void 0:b.r16x9),R=ne(e);if(R.poster(k),ie(e,w),R.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:I})})),R.on("loadeddata",(function(){V(),o({status:!0,msg:"Video Loaded",response:I})})),R.one("play",(function(){l&&a<95&&setTimeout((function(){R.currentTime(l)}),0)})),R.one("error",(function(){var e;i({status:!1,msg:(null==R||null===(e=R.error())||void 0===e?void 0:e.message)||"Some error occured"})})),(null==I||null===(O=I.video)||void 0===O||null===(S=O.contentDetails)||void 0===S||null===(x=S.closedCaptions)||void 0===x?void 0:x.length)>0||(null==I||null===(C=I.video)||void 0===C||null===(L=C.closedCaptions)||void 0===L?void 0:L.length)>0)W=((null==I||null===(A=I.video)||void 0===A||null===(P=A.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null==I||null===(F=I.video)||void 0===F?void 0:F.closedCaptions)).filter((function(e){return"VTT"===e.format})),J(e,W);else!function(e){var t=ne(e);t.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,t.removeRemoteTextTrack(e)}))}(e)}else D(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(n){re(n,e,i,t)}))}))},exports.loadVideo=ie,exports.loadVideoInstantly=function(e,t,n){var o=ne(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=Q,exports.pause=function(e){t(e).pause()},exports.play=function(e){t(e).play()},exports.refreshTokenManager=_,exports.rewind=function(e,n){var o=t(e),i=o.currentTime(),r=i<=n?0:i-n;o.currentTime(r)},exports.saveWatchHistory=function(e,t,n){if("v1"==n){var o={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 i({url:f(),method:"POST",headers:{Authorization:t,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(o),withCredentials:!0})}if("v2"==n){var r=s({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return i({url:E(),method:"POST",headers:{Authorization:t},data:r,params:s({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},exports.setCurrentSeries=function(e){L=e},exports.setCurrentVideo=q,exports.setSeriesWatchMap=function(e){F=e},exports.setVideoIdx=Y,exports.setVideoIdxById=X,exports.skip=function(e,n){var o=t(e),i=o.currentTime()+n;o.currentTime(i)};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"video.js";import t from"@babel/runtime/helpers/asyncToGenerator";import o from"@babel/runtime/regenerator";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 d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function s(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?d(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var u={name:"@viewlift/player-backup",version:"1.0.37-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:s({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":u.version},withCredentials:!0})},v=function(e,n){var t,o;return i({url:b()+l.getLinearChannelDetails,params:s(s(s(s(s({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(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(e,n,t){if("v1"==t){var o={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 i({url:y(),method:"POST",headers:{Authorization:n,"x-api-key":e.xApiKey},params:{version:"v2"},data:JSON.stringify(o),withCredentials:!0})}if("v2"==t){var r=s({doneWatching:null==e?void 0:e.doneWatching,videoId:null==e?void 0:e.videoId,watchedPercentage:null==e?void 0:e.watchedPercentage,watchedTime:null==e?void 0:e.watchedTime},(null==e?void 0:e.seriesId)&&{seriesId:e.seriesId});return i({url:h(),method:"POST",headers:{Authorization:n},data:r,params:s({},(null==e?void 0:e.profileId)&&{profileId:null==e?void 0:e.profileId})})}},I=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,d=JSON.parse(atob(n.split(".")[1])),s=(null==d?void 0:d.site)||null;return i({method:"GET",url:w(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 i({method:"GET",url:T(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}})}},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}});var o=e.videoId;return i({method:"GET",url:f(o),headers:{Authorization:e.token}})},f=function(e){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV2,"/").concat(e)},E=function(){return b()+"".concat(null==l?void 0:l.getSeriesWatchHistoryV1)},w=function(e){return b()+"".concat(null==l?void 0:l.getVideoInfoV1,"/").concat(e)},T=function(e,n){return b()+"".concat(null==l?void 0:l.getVideoInfoV2,"/").concat(n,"/").concat(e)},y=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV1)},h=function(){return b()+"".concat(null==l?void 0:l.saveWatchHistoryV2)},_=function(){return b()+"".concat(null==l?void 0:l.getVideoDetails)},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 L=function(){var e=t(o.mark((function e(){var n;return o.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=5;break}return e.abrupt("return",S().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.log("Error fetching refresh token",e),n})));case 5:return e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),S=function(){var e=V().get(),n=b();return i({method:"GET",url:n+"/identity/refresh/".concat(e)})},C=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)}},W=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var A=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 F(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 R(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?F(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):F(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}window._deviceInfo=r(navigator.userAgent);var P,N,k,j,x,B=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},U=function(e){var n=H(e,"video.tags",[]),t=H(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},H=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},M=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},z=function(){var e,n,t,o,i,r,a,l,d,s,u,c,v=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",m=arguments.length>1?arguments[1]:void 0,p=arguments.length>2?arguments[2]:void 0,I=null==p||null===(e=p.video)||void 0===e?void 0:e.metadata,g=Le(m);if(!v.includes("VIEWLIFT_"))return v;var f=window.getComputedStyle(document.getElementById(m),null),E=Math.trunc(f.getPropertyValue("height").slice(0,-2)),w=Math.trunc(f.getPropertyValue("width").slice(0,-2)),T=H(p,"video.gist.id",""),y=R(R({},G(I)),{},{VIEWLIFT_WIDTH:w,VIEWLIFT_HEIGHT:E,VIEWLIFT_SIZE:B(w,E),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===(n=window)||void 0===n?void 0:n.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:navigator.userAgent,VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:H(p,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==g||null===(t=g.options_)||void 0===t?void 0:t.autoplay)||1,VIEWLIFT_MUTE:(null==g||null===(o=g.options_)||void 0===o?void 0:o.autoplay)||0,VIEWLIFT_DEVICE_ID:localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_KEYWORDS:U(p),VIEWLIFT_MEDIA_ID:T,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(H(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:T,VIEWLIFT_VIDEO_URL:encodeURI(window.location.host+H(p,"video.gist.permalink","")),VIEWLIFT_COPPA:H(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(a=r.site)||void 0===a?void 0:a.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:H(null===(l=window)||void 0===l||null===(d=l.app_data)||void 0===d||null===(s=d.site)||void 0===s?void 0:s.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:H(p,"video.gist.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:T,VIEWLIFT_CONTENT_TITLE:H(p,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),VIEWLIFT_CONTENT_SERIES_TITLE:H(p,"video.series[0].gist.title",H(p,"seriesInfo.title","VIEWLIFT_CONTENT_SERIES_TITLE")),VIEWLIFT_CONTENT_EPISODE:H(p,"video.currentEpisode","VIEWLIFT_CONTENT_EPISODE"),VIEWLIFT_CONTENT_SEASON:H(p,"video.currentSeason","VIEWLIFT_CONTENT_SEASON"),VIEWLIFT_CONTENT_GENRE:H(p,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER"},null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c?void 0:c.macros);for(var h in y){var _=new RegExp("\\b("+h+")\\b","g");v=v.replace(_,y[h])}return v},G=function(e){var n,t,o,i,r,a,l={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(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,u=(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 s||u?(M()?s?l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}):u&&(l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.tve")||""})),l=M()?R(R({},l),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):R(R({},l),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(l=R(R({},l),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||""}),l=M()?R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):R(R({},l),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),l},q=function(e,n){var t,o,i,r,a,l,d,s,u,c,v,m,p,I=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[I])||void 0===t?void 0:t.drmEnabled,f=null==e||null===(o=e[I])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,E=null==e||null===(r=e[I])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,w=(null==e||null===(l=e[I])||void 0===l||null===(d=l.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[I])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var T=(null==e||null===(v=e[I])||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.audioAssetSource&&null!=E&&E.hls)return J(E);if(g){var y=X(f,n);return y.src=z(y.src,n,e),y}if("Safari"!==A()&&T)return Y(f);if(w){var h=J(f);return h.src=z(h.src,n,e),h}if(null!=f&&f.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(f);return _.src=z(_.src,n,e),_}return null},Y=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},J=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},X=function(e,t){var o=e.fairPlay,i=e.widevine,r=e.playReady,a=A(),l=Le(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,o){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};n.xhr(i,(function(e,n,t){console.log(e),e&&o(e),o(null,new Uint8Array(t))}))},getContentId:function(e,n){if(n)return new TextDecoder("utf-16").decode(n.slice(16))},getLicense:function(t,o,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}};n.xhr(a,(function(e,n,t){console.log(e),e&&r(e),r(null,t)}))}}}}}(o);try{l.eme()}catch(e){console.log("EME ERROR :",e)}return d}var s,u={src:i.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(l.eme(),u.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}}}):(u.keySystemOptions=[],u.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:i.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":i.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),u.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:r.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":r.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),u};var K=function(e){N=e},Q=function(){return N},Z=function(e){P=e},$=function(){return P},ee=function(){return k},ne=function(e){k=e},te=function(e){x=e},oe=function(){return x},ie=function(e){j=new Map,e.map((function(e,n){j.set(e.id,n)}))},re=function(e){if(j){var n=j.get(e);ne(n+1)}},ae=function(e,n){for(var t=Le(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!=n||(i.mode="showing")}},le=function(e,n){for(var t=Le(e).textTracks(),o=0;o<t.length;o++){var i=t[o];"subtitles"!==i.kind&&"captions"!==i.kind||i.id!==n||(i.mode="hidden")}},de=function(e){var n,t=Le(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})))||[]},se=function(e,n){var t=Le(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})}))},ue=!1,ce=function(e,n,t){var o=z(n,e,t),i=Le(e);n&&window.google&&(i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,r=Le(e);if(null!==r.el_){ue=!0;var a={id:e,adTagUrl:"".concat(n,"&vid=").concat(window.videoId,"&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(window.videoId),adLabel:"Your video will resume after this sponsor message"};r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),ue&&null!==r.el_&&("function"==typeof r.ima?r.ima(a):setTimeout((function(){r.ima.setContentWithAdTag(null,n,!0),r.ima.requestAds()}),1e3));var l=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&l.hasAttribute("controls")&&l.removeAttribute("controls");var d="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,d="touchend"),r.one(d,(function(){s&&r.ima.initializeAdDisplayContainer()}));var u=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;r.one("ads-ad-started",(function(){u&&u({status:"STARTED",msg:"Advertisement Started"})})),r.one("ads-manager",(function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,(function(){u&&u({status:"ENDED",msg:"Advertisement Ended"})}))})),r.on("adserror",(function(e){u&&u({status:"ERROR",msg:"Advertisement Error"})}))}}(e,o))},ve=function(e){return"live"!==e&&"carousel"!==e&&"V2"!==e&&"defaultV2"!==e&&"multiplayer"!==e},me=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},pe=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},Ie=function(e){return pe(e)},ge=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"}))},fe=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()}))},Ee=function(e){return e?e+"?impolicy=resize&w=1920&h=1080":null},we="",Te=function(e,n){var t,o=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape";if(we!==t){var o=window.getComputedStyle(document.getElementById(e),null).getPropertyValue("height");n&&(n.style.height="".concat(o)),we=t}}(e,n)};window._orientationChangeHandler=o;window.addEventListener("resize",(function(){clearTimeout(t),t=setTimeout((function(){o()}),100)}))};function ye(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 he=function(e){n(e).play()},_e=function(e){n(e).pause()},be=function(e,t){var o=n(e),i=o.currentTime()+t;o.currentTime(i)},Oe=function(e,t){var o=n(e),i=o.currentTime(),r=i<=t?0:i-t;o.currentTime(r)},De=function(e){return!!n.getPlayer("".concat(e))},Ve=function(e){return n(e).paused()},Le=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},Se=function(e,n,t){var o,i,r;re(n);var a=0,l=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&&I(n,t).then((function(e){var n,t,o,i,r,d;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)),a=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,l=(null==e||null===(d=e.data)||void 0===d?void 0:d.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))})),new Promise((function(o,i){c(n,t).then((function(n){var t,r,d,s,u,c,v,m,p,I,g=null==n?void 0:n.data,f=(null==g||null===(t=g.video)||void 0===t||null===(r=t.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;K(n.data);var E=(null==g||null===(d=g.ads)||void 0===d||null===(s=d.preRoll)||void 0===s||null===(u=s.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===(I=p.web)||void 0===I?void 0:I.url);E&&ce(e,E,g);var w=q(g,e);if(w){var T,y,h,_,b,O,D,V,L,S,A,F,R,P,N=(null==g||null===(T=g.video)||void 0===T||null===(y=T.gist)||void 0===y?void 0:y.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),k=Le(e);if(k.poster(N),Fe(e,w),k.on("loadstart",(function(){f&&o({status:!0,msg:"Video Loaded",response:g})})),k.on("loadeddata",(function(){W(),o({status:!0,msg:"Video Loaded",response:g})})),k.one("play",(function(){a&&l<95&&setTimeout((function(){k.currentTime(a)}),0)})),k.one("error",(function(){var e;i({status:!1,msg:(null==k||null===(e=k.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===(L=g.video)||void 0===L||null===(S=L.closedCaptions)||void 0===S?void 0:S.length)>0)A=((null==g||null===(F=g.video)||void 0===F||null===(R=F.contentDetails)||void 0===R?void 0:R.closedCaptions)||(null==g||null===(P=g.video)||void 0===P?void 0:P.closedCaptions)).filter((function(e){return"VTT"===e.format})),se(e,A);else!function(e){var n=Le(e);n.remoteTextTracks().tracks_.map((function(e){"subtitles"==(null==e?void 0:e.kind)||null==e||e.kind,n.removeRemoteTextTrack(e)}))}(e)}else C(e,"Incompatible Source, only hls,mp4,drm content is allowed"),i("Incompatible Source, only hls,mp4,drm content is allowed")})).catch((function(t){Re(t,e,i,n)}))}))},Ce=function(e,n,t){var o=Le(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)}))}))},We=function(e){var n=Le(e);if(Ae(),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()}},Ae=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()},Fe=function(e,n){Le(e).src(n)},Re=function(n,t,o,i){var r,a,l,d,s,u,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===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);De(t)&&C(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.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?ye(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ye(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}))},Pe=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{O as A,ve as B,m as C,c as D,Re as E,v as F,I as G,Ee as H,ce as I,se as J,Z as K,pe as L,Ie as M,$ as N,ee as O,ge as P,Ve as Q,ne as R,me as S,fe as T,Te as U,ie as V,re as W,Le as a,Q as b,W as c,A as d,K as e,oe as f,L as g,C as h,g as i,te as j,be as k,Ce as l,_e as m,Fe as n,De as o,he as p,Se as q,Oe as r,p as s,We as t,ae as u,le as v,de as w,q as x,Pe as y,V as z};