@viewlift/player-backup 2.0.154-backup → 2.0.155-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-5d0e55b1.js → autoNextVideo-bfdc3184.js} +1 -1
- package/cjs/bundle.css +2 -2
- package/cjs/{features-458ebda5.js → features-88aa1dbb.js} +1 -1
- package/cjs/generic-9154cde5.js +1 -0
- package/cjs/{index-4c71d167.js → index-2e526bf3.js} +1 -1
- package/cjs/{index-5b474000.js → index-e9313c5b.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-82f7d26b.js → multicamv2-3c9720d0.js} +1 -1
- package/cjs/{multicamv2-9712e761.js → multicamv2-7316467d.js} +1 -1
- package/cjs/{nextEpisodeButton-4e68b783.js → nextEpisodeButton-9ddaaa4b.js} +1 -1
- package/cjs/{playlist-a7868614.js → playlist-89066701.js} +1 -1
- package/cjs/{series-f8858e53.js → series-fcba0c2b.js} +1 -1
- package/cjs/{series-v2-b43b648b.js → series-v2-9ebf323c.js} +1 -1
- package/cjs/{series-v2-ea6c107b.js → series-v2-ac3b37e9.js} +1 -1
- package/cjs/{skin-188a3db3.js → skin-1baff909.js} +1 -1
- package/cjs/{skin-f7d3a1c4.js → skin-290795cd.js} +1 -1
- package/cjs/{skin-88576c78.js → skin-5ccafda3.js} +1 -1
- package/cjs/{skin-18bd3977.js → skin-735ccd9e.js} +1 -1
- package/cjs/{skin-aeb91b16.js → skin-77b6be86.js} +1 -1
- package/cjs/skin-8d484422.js +1 -0
- package/cjs/{skin-b5272f13.js → skin-e0e7401e.js} +1 -1
- package/cjs/{videoSelector-f1e0c3eb.js → videoSelector-8b58c828.js} +1 -1
- package/cjs/{videoSelector-4a371b82.js → videoSelector-b8e59cdb.js} +1 -1
- package/esm/{autoNextVideo-b216988b.js → autoNextVideo-9262123e.js} +1 -1
- package/esm/bundle.css +2 -2
- package/esm/{features-fd69b042.js → features-7f9447f8.js} +1 -1
- package/esm/generic-590e4d79.js +1 -0
- package/esm/{index-711110d3.js → index-17610b77.js} +1 -1
- package/esm/{index-5e87744f.js → index-af2b35f0.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-6f0431cd.js → multicamv2-04f781f8.js} +1 -1
- package/esm/{multicamv2-bb0f9f89.js → multicamv2-a78a647b.js} +1 -1
- package/esm/{nextEpisodeButton-5e5558ad.js → nextEpisodeButton-055e3a85.js} +1 -1
- package/esm/{playlist-79eae2ee.js → playlist-1bd86e54.js} +1 -1
- package/esm/{series-e06315cf.js → series-46b30da5.js} +1 -1
- package/esm/{series-v2-b19edf3e.js → series-v2-83fbf1eb.js} +1 -1
- package/esm/{series-v2-ec76f997.js → series-v2-c00e4a8a.js} +1 -1
- package/esm/{skin-a82311ef.js → skin-5daea78c.js} +1 -1
- package/esm/{skin-e48c05ff.js → skin-8bf2a780.js} +1 -1
- package/esm/skin-8ce6c8c0.js +1 -0
- package/esm/{skin-0d813434.js → skin-adc9bfc9.js} +1 -1
- package/esm/{skin-37776131.js → skin-b92dc282.js} +1 -1
- package/esm/{skin-2ce48287.js → skin-c227680b.js} +1 -1
- package/esm/{skin-8fcd821a.js → skin-d7b6e271.js} +1 -1
- package/esm/{videoSelector-c032a200.js → videoSelector-02c23bb5.js} +1 -1
- package/esm/{videoSelector-2c7b42b1.js → videoSelector-28d69106.js} +1 -1
- package/package.json +1 -1
- package/cjs/generic-6079db75.js +0 -1
- package/cjs/skin-1a4a4e94.js +0 -1
- package/esm/generic-bfb2240d.js +0 -1
- package/esm/skin-eb52313f.js +0 -1
package/cjs/generic-6079db75.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),a=require("js-cookie"),l=require("./currentVideoInfo-5802821b.js"),s=require("./captions-68e263dd.js"),u=require("./skin-71b7d779.js"),d=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/slicedToArray");function v(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function p(e,n){v("event",e,n)}var m={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function 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 g(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}var I={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=I.version;var E,y=function(e,n){var t,o,i,a,l,s,u,d;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:null!==(l=window)&&void 0!==l&&null!==(s=l.customData)&&void 0!==s&&s.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(d=u.customData)||void 0===d?void 0:d.overrideEntitlementBaseUrl)+"/video/status":_.get()+"".concat(null==m?void 0:m.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":I.version,"x-player-name":"videojs"},withCredentials:!0})},h=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:_.get()+m.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},T=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return o=e.sent,e.abrupt("return",r({url:_.get()+"".concat(null==m?void 0:m.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),b=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:_.get()+"".concat(null==m?void 0:m.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},w=function(e){var n=e.videoId;return r({method:"GET",url:_.get()+"".concat(null==m?void 0:m.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},_=(E=null==m?void 0:m.apiBaseUrl,{set:function(e){e&&(E=e)},get:function(){return E}}),S=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},O=null;function P(){return{set:function(e){e&&(O=e)},get:function(){return O}}}var L=function(){var e=n(t.mark(function e(){var n,o,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=P().get(),o=_.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),A=null,D=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"))||!S(n)){e.next=6;break}return A||(A=L().then(function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&P().set(i),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){A=null})),e.abrupt("return",A);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),C=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function R(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 V(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?R(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):R(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var k=function(){var e,n,t,o,r,i,a,s=l.getCurrentVideo();return"linearchannel"===((null==s?void 0:s.contentType)||"video")?null==s||null===(e=s.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==s?void 0:s.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==s||null===(r=s.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==s||null===(a=s.video)||void 0===a?void 0:a.id)||(null==s?void 0:s.id)};function x(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function W(){var e=window.sessionStorage.getItem("uid");return e||(e=x(),window.sessionStorage.setItem("uid",e),e)}function F(){return N.apply(this,arguments)}function N(){return(N=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function j(e){return e?String(e):""}var U=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};var M=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"},B=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},H=function(){var e=l.seasonIdxManager.get();return e>=0?e+1:1},G=function(){var e,n,t,o=l.getCurrentSeries(),r=l.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=l.seasonIdxManager.get(),s=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===i});return s>=0?s+1:1};function q(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?q(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):q(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Q=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},z=function(e){var n=K(e,"video.tags",[]),t=K(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},K=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},X=function(){var n,t,o,r,l,s,u,d,c,v,p,m,f,g,I,E,y,h,T,b,w,_,S,O,P=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",L=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return P;var D=(null==A?void 0:A.siteName)||"",C=(null==A?void 0:A.contentType)||"video",R=(null==A||null===(o=A[C])||void 0===o?void 0:o.metadata)||(null==A||null===(r=A[C])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),V=i.getPlayer(L);if(!P.includes("VIEWLIFT_"))return P;var k,x=window.getComputedStyle(document.getElementById(L),null),W=Math.trunc(x.getPropertyValue("height").slice(0,-2)),F=Math.trunc(x.getPropertyValue("width").slice(0,-2)),N="linearchannel"===C?null==A||null===(s=A.linearchannel)||void 0===s||null===(u=s.channels)||void 0===u||null===(d=u.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===d||null===(c=d.content)||void 0===c?void 0:c.id:K(A,"video.gist.id",""),j="linearchannel"===C?null==A||null===(v=A.linearchannel)||void 0===v||null===(p=v.channels)||void 0===p||null===(m=p.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===m?void 0:m.title:K(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,M=null;"function"==typeof window.__gpp&&(null===(k=window)||void 0===k||k.__gpp("ping",function(e){U=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var B=Y(Y({},J(R)),{},(_={VIEWLIFT_WIDTH:F,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:Q(F,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:K(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:K(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:K(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==V||null===(g=V.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==V||null===(I=V.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:z(A),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(K(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+K(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:K(null===(E=window)||void 0===E||null===(y=E.app_data)||void 0===y||null===(h=y.site)||void 0===h?void 0:h.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":K(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(w=b.site)||void 0===w?void 0:w.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*K(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:K(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:j,VIEWLIFT_CONTENT_SERIES_TITLE:K(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:K(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:G(),VIEWLIFT_SEASON_NUMBER:H(),VIEWLIFT_CONTENT_TAGS:z(A),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(_,"VIEWLIFT_LAT",""),e(_,"VIEWLIFT_APP_BUNDLE",""),e(_,"VIEWLIFT_ATT_CONSENT",""),_),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var q in B){var X=new RegExp(q,"g");P=P.replace(X,B[q])}return P},J=function(e){var n,t,o,r,i,a,l={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){s.set(e.name,e.value)}));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,d=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return u||d?(B()?u?l=Y(Y({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):d&&(l=Y(Y({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):u?l=Y(Y({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):d&&(l=Y(Y({},l),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),u?l=Y(Y({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):d&&(l=Y(Y({},l),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),l=B()?Y(Y({},l),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):Y(Y({},l),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(l=Y(Y({},l),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),l=B()?Y(Y({},l),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):Y(Y({},l),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),l=Y(Y({},l),{},{VIEWLIFT_AFID:s.get("afid")})},$=function(e,n){var t,o,r,i,a,l,s,u,d,c,v,p,m,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,E=null==e||null===(i=e[f])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,y=(null==e||null===(l=e[f])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(d=e[f])||void 0===d||null===(c=d.liveDetails)||void 0===c||c.isDvrEnabled;var h=(null==e||null===(v=e[f])||void 0===v||null===(p=v.streamingInfo)||void 0===p||null===(m=p.videoAssets)||void 0===m?void 0:m.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ee(E);if(g){var T=ne(I,n);return T.src=X(T.src,n,e),T}if("Safari"!==M()&&h)return Z(I);if(y){var b=ee(I);return b.src=X(b.src,n,e),b}if(null!=I&&I.mpeg){var w=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return w.src=X(w.src,n,e),w}return null},Z=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ee=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ne=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=M();if(i.getPlayer(n),"Safari"===s){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,function(e,n,t){console.log(e),e&&i(e),i(null,t)})}}}}}(r);return te(n),u}var d,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(te(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var te=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==M()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},oe=function(e,n){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},re=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var ie=!1,ae=function(e,n,t){var o=X(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i.getPlayer(e);if(null!==a.el_){ie=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),ie&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var u="click",d=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(d=!0,u="touchend"),a.one(u,function(){d&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var le,se=(le=!0,{enable:function(){le=!0},disable:function(){le=!1},get enabled(){return le}}),ue="ssai-breakStart",de="ssai-adImpression",ce="ssai-firstQuartile",ve="ssai-midpoint",pe="ssai-thirdQuartile",me="ssai-complete",fe="ssai-breakEnd",ge={breakStart:ue,impression:de,firstQuartile:ce,midpoint:ve,thirdQuartile:pe,complete:me,breakEnd:fe};function Ie(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=ge[o];r&&t.trigger(r,n)}function Ee(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 ye(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ee(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function he(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Te(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Te(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function Te(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var be,we=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),_e=(be=null,{set:function(e){be=e},get position(){return be}});function Se(e,n){return Oe.apply(this,arguments)}function Oe(){return(Oe=n(t.mark(function e(n,o){var r,a,l,s,u,d,v,p,m,f,g,I,E,y,h,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),l=$(o,n),s=l.src,u=(null==o||null===(r=o.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,d=s.replace("/dash/","/session/").replace("/master/","/session/"),d=X(d,n,o),v=Pe(d),p=c(v,2),m=p[0],f=p[1],d=new URL(d.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=c(e,2),t=n[0],o=n[1];d.searchParams.set(t,o)}),e.prev=9,e.next=12,fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(ye({adsParams:ye({},m)},u&&{availSuppression:{mode:"BEHIND_LIVE_EDGE",value:"00:00:00"}}))});case 12:return g=e.sent,e.next=15,g.json();case 15:return I=e.sent,E="https://"+new URL(d).hostname,y=I.trackingUrl,h=I.manifestUrl,T=E+y,b=E+h,we.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),l.src=b,e.abrupt("return",l);case 27:return e.prev=27,e.t0=e.catch(9),e.abrupt("return",l);case 30:case"end":return e.stop()}},e,null,[[9,27]])}))).apply(this,arguments)}function Pe(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=he((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=c(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},u={},d=0,v=Object.entries(n);d<v.length;d++){var p=c(v[d],2),m=p[0],f=p[1];if(m.startsWith("ads."))s[m.replace(/^ads\./,"")]=f;else u[m]=f}return[s,u]}var Le,Ae=(Le=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Le=Array.isArray(e)?d(e):Le},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Le),d(Le)}});function De(e,n){return Ce.apply(this,arguments)}function Ce(){return Ce=n(t.mark(function e(o,r){var a,l,s,c,v,p,m,f,g,I,E,y,h,T,b,w,_,S,O,P,L,A,D;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:D=function(e,n,t,r,a,l){var s=i.getPlayer(o);if(!s.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(s.currentTime());var u,d=he(t);try{var c=function(){var t,i,d,c=u.value,v=c.eventType,p=c.beaconUrls,m=c.startTimeInSeconds,f=c.startTime,g=c.durationInSeconds,I=m||0,E=p,y=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,h="".concat(I,"_").concat(v),T=L.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",L),e>=I&&!T.includes(h)){T.push(h),L.set("pod-".concat(a),T);try{A(v,n,E,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var b=_e.position;_e.set(null),setTimeout(function(){null!=b&&(s.currentTime(b),l())},500)}if("function"==typeof y)try{var w,_={eventType:v,startTimeInSeconds:m,startTime:f,durationInSeconds:g,ad:null==n||null===(w=n.ads)||void 0===w?void 0:w[r],adIndex:r};y({adsData:_}),Ie(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(u=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},A=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},P=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},_e.set(r),g=we.get(),(I=i.getPlayer(o)).one("loadeddata",function(){g&&O(g)}),E=new Map,y=new Map,h=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==I||null===(s=I.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,w=(null==I||null===(c=I.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,_=(null==I||null===(v=I.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,S=(null==I||null===(m=I.el())||void 0===m||null===(f=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,O=function(){var e=n(t.mark(function e(n){var a,l,s,c,v,p,m,f,g,I,O,L,A,C,R,V,k,x,W,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return V=function(e){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",V),0===e.button&&A()},R=function(e){},C=function(){var e,n=I.currentTime(),t=null,o=he(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,E.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){I.currentTime(t+2.2)},100))},A=function(){var e,n=I.currentTime(),t=null,o=he(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>s||n>i)&&!E.has(i)||n>=i&&n<=s)&&(t=i,E.set(i,!0),y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){I.currentTime(t+.4)},100))},v=!1,e.next=7,fetch(n);case 7:return p=e.sent,e.next=10,p.json();case 10:m=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",m),f=m.avails,g=[],I=i.getPlayer(o),O=I.controlBar.progressControl,L=O.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),f.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(v=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!v&&r&&(I.currentTime(r),C()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g),console.log(g,"data"),g.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=I.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",L.appendChild(i)}}),I._timeUpdateHandler&&I.off("timeupdate",I._timeUpdateHandler),I._timeUpdateHandler=u.throttle(function(){var e=I.currentTime();if(e!==h){h=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&E.set(r,!0),se.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var s=e-r,u=0,c=0,v=0;v<a.length;v++){var p,m=null==a||null===(p=a[v])||void 0===p?void 0:p.durationInSeconds;if(s<u+m){c=v;break}u+=m}a[c];var f=Math.max(0,i-s),I=Math.round(f);k.style.display="block",F.textContent="".concat(c+1," of ").concat(a.length," • ").concat(P(I));var h=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});h.push.apply(h,d(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&h.push(null==t?void 0:t.podSlotImpressionBeacon),D(e,t,h,c,o,C),"break"}y.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(k.style.display="none",O.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),se.enable())}},1e3),I.on("timeupdate",I._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",function(e){se.enabled&&"ArrowRight"==e.key&&(A(),Ve(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",V))}),null===(s=document)||void 0===s||null===(c=s.querySelectorAll(".ssai-ad-container"))||void 0===c||c.forEach(function(e){return null==e?void 0:e.remove()}),(k=document.createElement("div")).className="ssai-ad-container",(x=document.createElement("div")).className="sponsored-adbox",(W=document.createElement("div")).className="sponsored-text",W.textContent="Sponsored Ad",x.append(W),(F=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",k.append(x),k.append(F),I.el().appendChild(k);case 45:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map;case 18:case"end":return e.stop()}},e)})),Ce.apply(this,arguments)}function Re(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,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},ke=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},xe=function(e){return!!o.getPlayer("".concat(e))},We=function(){var e=n(t.mark(function e(n,o){var r,a,s,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],e.next=3,D();case 3:return a=e.sent,s=i.getPlayer(n),e.abrupt("return",new Promise(function(e,t){var i=(null==o?void 0:o.programs)||[];null==o||delete o.programs,h(o,a).then(function(t){var a=null==t?void 0:t.data;window.sid=x(),a.contentType="linearchannel",a.channelId=null==o?void 0:o.channelId;var u=$(a,n);l.setCurrentVideo(a),l.setCurrentEpgPrograms(i),sessionStorage.setItem("program_switched",!0),u&&r?(je(n,u),s.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:a})})):e({status:!0,msg:"Feed authenticated",response:a})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Fe=function(){var e=n(t.mark(function e(o,r,a){var u,d,c,v,p,m,f;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return v=e.sent,(l.getCurrentSeries()||null)&&l.setVideoIdxById(r),p=0,m=0,f=null,null!==(u=window)&&void 0!==u&&u.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(c=d.watchHistory)&&void 0!==c&&c.enable&&b(r,v).then(function(e){var n,t,o,r,i,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),p=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}),e.abrupt("return",new Promise(function(e,a){y(r,v).then(function(){var r=n(t.mark(function n(r){var u,d,c,v,g,I,E,y,h,T,b,w,_,S,O,P,L,A,D,C,R,V,k,x,W,F,N,j,U,M,B,H,G,q,Y,Q,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(P=null==r?void 0:r.data,L=(null==P?void 0:P.contentType)||"video",A=(null==P||null===(u=P[L])||void 0===u?void 0:u.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(c=d.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,D=(null==P||null===(I=P.video)||void 0===I||null===(E=I.streamingInfo)||void 0===E?void 0:E.isLiveStream)||!1,l.setCurrentVideo(r.data),(C=(null==P||null===(y=P.ads)||void 0===y||null===(h=y.preRoll)||void 0===h||null===(T=h.adTags)||void 0===T||null===(b=T.web)||void 0===b?void 0:b.active)&&(null==P||null===(w=P.ads)||void 0===w||null===(_=w.preRoll)||void 0===_||null===(S=_.adTags)||void 0===S||null===(O=S.web)||void 0===O?void 0:O.url))&&ae(o,C,P),R=$(P,o),!A){n.next=12;break}return n.next=11,Se(o,P);case 11:R=n.sent;case 12:R?(H=(null==P||null===(V=P.video)||void 0===V||null===(k=V.gist)||void 0===k?void 0:k.videoImageUrl)||(null==P||null===(x=P.video)||void 0===x||null===(W=x.gist)||void 0===W||null===(F=W.imageGist)||void 0===F?void 0:F.r16x9),(G=i.getPlayer(o)).poster(H),je(o,R),A&&De(o,f),G.on("loadstart",function(){D&&e({status:!0,msg:"Video Loaded",response:P})}),G.on("loadeddata",function(){re(),e({status:!0,msg:"Video Loaded",response:P})}),G.one("play",function(){p&&!A&&m<95&&setTimeout(function(){G.currentTime(p)},0)}),G.one("error",function(){var e;a({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==P||null===(N=P.video)||void 0===N||null===(j=N.contentDetails)||void 0===j||null===(U=j.closedCaptions)||void 0===U?void 0:U.length)>0||(null==P||null===(M=P.video)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==P||null===(Y=P.video)||void 0===Y||null===(Q=Y.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null==P||null===(z=P.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),s.addCaptions(o,q)):s.removeCaptions(o)):(oe(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){Ue(e,o,a,r)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),Ne=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=i.getPlayer(e);t&&t.src(n)},Ue=function(n,t,o,r){var i,a,l,s,u,d,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);xe(t)&&oe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Re(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ae,exports.authenticateLC=We,exports.baseUrlManager=_,exports.clearError=re,exports.createSeriesWatchMap=function(e,n){var t=new Map;w({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),l.setSeriesWatchMap(t)}).catch(function(e){return console.log(e)})},exports.detectBrowser=M,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=i.getPlayer(e);if(Ne(),u.clearEventListeners(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},exports.getDecodedToken=C,exports.getEntitlementData=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},exports.getEpisodeNumber=G,exports.getLinearChannelDetails=h,exports.getSGAIEnabledSource=Se,exports.getSeasonNumber=H,exports.getSeriesDetails=function(e,n){var t,o,i=C(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):r({url:_.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=w,exports.getSource=$,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(ue,e)},adImpression:function(e){return t(de,e)},adFirstQuartile:function(e){return t(ce,e)},adMidpoint:function(e){return t(ve,e)},adThirdQuartile:function(e){return t(pe,e)},adComplete:function(e){return t(me,e)},adBreakEnd:function(e){return t(fe,e)}}},exports.getToken=D,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=W,exports.getVideoDetails=y,exports.getVideoInfo=b,exports.handleError=oe,exports.initialiseAdvertisement=ae,exports.initialiseKeyboardEvents=function(e,n){var t,o,r,a=i.getPlayer(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,i,u,d,c,v,p,m;if(se.enabled&&"input"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==s||s.focus()),f){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||ke(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(u=i.appcmsMain)||void 0===u||null===(d=u.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(p=v.appcmsMain)&&void 0!==p&&null!==(m=p.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;g||Ve(e,10)}}},!0)},exports.initiateErrorHandling=Ue,exports.inititateBeacon=function(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&function(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=x(),s="WEBSITE",u=null,d=0,c=null,v=0,f=0,g=!1,I=[],E=i.getPlayer(e);if(E){var y,h,T,b,w=U(function(){for(var e=E.currentTime(),n=E.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0}),S=function(){var e=n(t.mark(function e(n){var o,i,u,d,c,v,p,f,g,I,E;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return g=e.sent,I=C(g),e.t0=V,e.t1=V,e.t2=null==I?void 0:I.site,e.t3=null==I?void 0:I.siteId,e.t4=s,e.t5=W(),e.t6=k(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11="production",e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?j(n.adPosition):"",e.next=25,F();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(d=n.resHeight)&&void 0!==d?d:null,e.t26=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t27=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(p=a.beacon)||void 0===p?void 0:p.params,e.t32=(0,e.t0)(e.t30,e.t31),E=[e.t32],r({url:(null==a||null===(f=a.beacon)||void 0===f?void 0:f.url)||_.get()+m.getBeaconUrl,method:"post",headers:{Authorization:g},contentType:"application/x-www-form-urlencoded",dataType:"text",data:E}).catch(function(e){return console.error(e)});case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),O=function(e){if(!E.paused()&&E.readyState()>2)return clearInterval(u),clearInterval(c),e;var n,t=e+.1;return+t.toFixed(2)>=5&&f<4&&g?(f++,p("BUFFERING",V({pfm:s,uid:W(),vid:k(),videoPosition:Math.floor(E.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),S({eventName:"BUFFERING",videoPosition:Math.floor(E.currentTime),isAdEvent:!1}),0):t};y=Math.floor(E.currentTime),E.on("error",function(){var e,n=Math.floor(E.currentTime);clearInterval(u);var t=y===n?"FAILED_TO_START":"DROPPED_STREAM";p(t,V({pfm:s,uid:W(),vid:k(),videoPosition:n},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),S({eventName:t,videoPosition:n,isAdEvent:!1})}),h=!1,E.on("waiting",U(function(){g&&(h=!0,clearInterval(u),u=setInterval(function(){h&&!E.paused()?v=O(v):clearInterval(u)},100))})),E.on("playing",U(function(){h=!1,clearInterval(u)})),T=function(e){var n,t,o,r=V({videoPosition:Math.floor(E.currentTime),isAdEvent:!0,bufferHealth:w(),pfm:s,uid:W(),vid:k(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);p(e,V({},r)),S(V({eventName:e,adPosition:1},r))},E.on("adstart",function(){T("AD_REQUEST"),T("AD_IMPRESSION")}),E.on("adskip",function(){d=0}),E.on("adend",function(){d=0}),E.on("timeupdate",function(){var e,n,t,o,r=Math.floor(E.currentTime());if(r>=30&&r%30==0&&!I.includes(r)){var i,a=null===(i=E.el().getElementsByTagName("video"))||void 0===i?void 0:i[0];f=0,I.push(r),S({eventName:"PING",videoPosition:r,isAdEvent:!1,duration:30,resHeight:(null==a?void 0:a.videoHeight)||null,resWidth:(null==a?void 0:a.videoWidth)||null,bufferHealth:w(),bitrate:Math.round((null==E||null===(e=E.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)})}}),b=U(function(){var e;d=0,c=setInterval(function(){d=O(d)},100),p("PLAY",V({pfm:s,uid:W(),vid:k(),videoPosition:Math.floor(E.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),S({eventName:"PLAY",videoPosition:Math.floor(E.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":k(),watchTime:Math.floor(E.currentTime)})}),E.one("play",b),E.on("loadeddata",function(){E.one("timeupdate",function(){var e;clearInterval(c),clearInterval(u),v=d||0,p("FIRST_FRAME",V({pfm:s,uid:W(),vid:k(),videoPosition:Math.floor(E.currentTime),ttFirstFrame:d,bufferHealth:w()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),S({eventName:"FIRST_FRAME",videoPosition:Math.floor(E.currentTime),isAdEvent:!1,ttFirstFrame:d,bufferHealth:w()}),g=!0,d=0})})}else console.error("Videojs: Player instance not found.")}(e,o,a)},exports.isMobile=B,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=xe,exports.isTokenExpired=S,exports.keyboardManager=se,exports.load=Fe,exports.loadVideo=je,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise(function(e,n){var r=0;o.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=P,exports.rewind=ke,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],v("js",new Date),v("config",e)},exports.saveWatchHistory=T,exports.setupAdvertisementMarkers=De,exports.skip=Ve,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackingUrlManager=we,exports.triggerSSAIEvents=Ie;
|
package/cjs/skin-1a4a4e94.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var e=require("./features-458ebda5.js"),n=require("./player_instance-fcf6a8fb.js"),r=require("./index-4c71d167.js"),l=require("./generic-6079db75.js");require("videojs-contrib-quality-menu");var t=require("./index-5b474000.js"),o=require("./helper-dbf2fb22.js"),i=require("./currentVideoInfo-5802821b.js"),a=require("video.js"),d=require("@babel/runtime/helpers/toConsumableArray"),s=require("@babel/runtime/helpers/asyncToGenerator"),u=require("@babel/runtime/regenerator");require("@babel/runtime/helpers/defineProperty"),require("js-cookie");var c=require("./skin-71b7d779.js");require("axios");var v=require("./icons-2609dbe4.js");require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./resolution-9c4872ec.js"),require("@babel/runtime/helpers/assertThisInitialized"),require("./localisation-56e0a999.js"),require("./autoNextVideo-5d0e55b1.js"),require("./util-b0ab4a8f.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("./captions-68e263dd.js"),require("video.js/dist/video-js.min.css");function p(a,d){var s=n.getPlayer(a);s&&(s.on("loadeddata",function(){var e,u,c,v,p,f=o.checkDvrStartOverEnabled(d),m=i.getCurrentEpgPrograms();s.qualityLevels()&&s.qualityLevels().length&&function(e){var r=n.getPlayer(e);r&&(null==r||r.qualityMenu,r.qualityMenu({useResolutionLabels:!0}))}(a),!(null!=d&&null!==(e=d.series)&&void 0!==e&&e.enable||null!==(u=window)&&void 0!==u&&null!==(c=u.app_data)&&void 0!==c&&null!==(v=c.appcmsMain)&&void 0!==v&&null!==(p=v.features)&&void 0!==p&&p.auto_play)||null!=d&&d.liveVideo||r.addNextEpPreview(a,d),null!=d&&d.liveVideo||l.isMobile()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||r.initiateTrickplay(a),f&&m&&m.length?t.initiateMarker(a):t.removeMarkers()}),s.one("play",function(){var n,r,l,t;null!==(n=window)&&void 0!==n&&null!==(r=n.customData)&&void 0!==r&&r.iframeOverlayUrl&&e.addOutputtingOverlay(a,null===(l=window)||void 0===l||null===(t=l.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}function f(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,n){if(e){if("string"==typeof e)return m(e,n);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var l=0,t=function(){};return{s:t,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}function m(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,l=Array(n);r<n;r++)l[r]=e[r];return l}function y(){return y=s(u.mark(function e(r){var t,o,i,a,v,p,m,y,h,b,g,k,S,w,j,q,E,I,B,T,C,A,M,P,L,_;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:_=function(e,t,o,i,a){var d=n.getPlayer(r);if(!d.seeking()){t.startTimeInSeconds,t.durationInSeconds,Math.floor(d.currentTime());var s,u=f(o);try{for(u.s();!(s=u.n()).done;){var c,v,p,m=s.value,y=m.eventType,h=m.beaconUrls,b=m.startTimeInSeconds,g=m.startTime,k=m.durationInSeconds,S=b||0,w=h,j=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(p=v.ads)||void 0===p?void 0:p.adEventHandler)||null,q="".concat(S,"_").concat(y),E=P.get("pod-".concat(a))||[];if(console.warn(e,S,"map:",y,"condition1:",e>=S,"map:",P),e>=S&&!E.includes(q)){E.push(q),P.set("pod-".concat(a),E);try{L(y,t,w,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,t)}if("function"==typeof j)try{var I,B={eventType:y,startTimeInSeconds:b,startTime:g,durationInSeconds:k,ad:null==t||null===(I=t.ads)||void 0===I?void 0:I[i],adIndex:i};j({adsData:B}),l.triggerSSAIEvents(r,B)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},L=function(e,n,r,l){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(l.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(l.currentTime())),"AD_POD:",n),null==r||r.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},k=function(){g&&clearInterval(g)},h=l.trackingUrlManager.get(),b=n.getPlayer(r),g=null,b.one("loadeddata",function(){g=setInterval(function(){h&&!b.paused()&&M(h)},2e3)}),b.on("sourceset",function(e){console.log(e,"sourceset")}),b.on("dispose",function(){k()}),S=new Map,w=new Map,j=-1,q=null,E=(null===(t=document)||void 0===t||null===(o=t.getElementsByClassName("tvProviderImage"))||void 0===o?void 0:o[0])||null,I=(null==b||null===(i=b.controlBar)||void 0===i?void 0:i.getChild("videoSelector"))||null,B=(null==b||null===(a=b.controlBar)||void 0===a?void 0:a.getChild("seriesV2"))||null,T=(null==b||null===(v=b.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,C=(null==b||null===(m=b.el())||void 0===m||null===(y=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===y?void 0:y[0])||null,A=!1,M=function(){var e=s(u.mark(function e(t){var o,i,a,s,v,p,f,m,y,h;return u.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=new URL(t),q&&i.searchParams.append("nextToken",q),e.next=4,fetch(i.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:s=e.sent,v=s.avails,p=s.nextToken||null,q=p,f=[],m=n.getPlayer(r),y=m.controlBar.progressControl,h=y.seekBar.el(),null===(o=document)||void 0===o||o.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,n){var r,l;f.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(r=e.adBreakTrackingEvents)||void 0===r||null===(l=r.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===l?void 0:l[0])||[]})}),console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),null!=f&&f.length&&(window.adsQueueList=f),f.forEach(function(e){var n=e.markerPositionInSeconds,r=e.ads,l=m.duration();if(!(n>l||Array.isArray(r)&&0==(null==r?void 0:r.length))){var t=n/l*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",h.appendChild(o)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=c.throttle(function(){var e=m.currentTime();if(e!==j){j=e;for(var n=function(){var n=f[r],t=n.startTimeInSeconds,o=n.durationInSeconds,i=n.ads,a=t+o;if(e>=t-1.2&&e<=a+1.2){A=!!(e>=t&&e<=a&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>a&&S.set(t,!0),l.keyboardManager.disable(),E&&E.classList.add("vjs-hidden"),T&&(T.style.pointerEvents="none",T.classList.add("vjs-hidden")),C&&(C.style.pointerEvents="none",C.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),B&&(B.el().style.pointerEvents="none",B.el().classList.add("vjs-hidden")),y.el().classList.add("hide-progress-bar");for(var s=e-t,u=0,c=0,v=0;v<i.length;v++){var p,m=null==i||null===(p=i[v])||void 0===p?void 0:p.durationInSeconds;if(s<u+m){c=v;break}u+=m}var h=[];return null==i||i.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});h.push.apply(h,d(n))}),Array.isArray(i)&&0==(null==i?void 0:i.length)&&h.push(null==n?void 0:n.podSlotImpressionBeacon),_(e,n,h,c,r),"break"}w.delete(t)},r=0;r<f.length;r++){if("break"===n())break}A||(y.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),B&&(B.el().style.pointerEvents="auto",B.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),T&&(T.style.pointerEvents="auto",T.classList.remove("vjs-hidden")),C&&(C.style.pointerEvents="auto",C.classList.remove("vjs-hidden")),l.keyboardManager.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map;case 23:case"end":return e.stop()}},e)})),y.apply(this,arguments)}var h=function(e,r){var l,t,o,i,d,s,u,c,v,p,f,m,y=n.getPlayer(e),h=(null==r?void 0:r.theme)||{},b=a.dom.$(".vjs-play-progress"),g=a.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");g&&(g.style.color="".concat(null===(l=window)||void 0===l||null===(t=l.app_data)||void 0===t||null===(o=t.appcmsMain)||void 0===o||null===(i=o.brand)||void 0===i||null===(d=i.cta)||void 0===d||null===(s=d.primary)||void 0===s?void 0:s.backgroundColor)),b&&(b.style.background="".concat(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(p=v.brand)||void 0===p||null===(f=p.cta)||void 0===f||null===(m=f.primary)||void 0===m?void 0:m.backgroundColor));var k=y.getChild("BigPlayButton")||null;(null==h?void 0:h.progressBarColor)&&b&&(b.style.background=h.progressBarColor),(null==h?void 0:h.playButtonBackgroundColor)&&k&&(k.el().style.background=h.playButtonBackgroundColor),(null==h?void 0:h.playButtonColor)&&g&&(g.style.color=h.playButtonColor),(null==h?void 0:h.playButtonType)&&("square"==(null==h?void 0:h.playButtonType)?k.el().style.borderRadius=".3em":k.el().style.borderRadius="1.3em")};exports.initialiseSkin=function(t,a){n.getPlayer(t).addClass("skin_vlone"),p(t,a),function(n,t){var a,d,s,u,c,p,f,m,h,b,g,k,S,w,j,q=(null==t?void 0:t.liveVideo)||!1,E=(null==t||null===(a=t.res)||void 0===a||null===(d=a.video)||void 0===d?void 0:d.isSSAIEnabled)||!1,I=l.getSource(null==t?void 0:t.res,n)||{};I.src;var B=(null==t?void 0:t.skin_settings)||{};o.checkDvrStartOverEnabled(t),null!=B&&B.skipBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&e.addSkipButton(n,"VL_ONE",v.SkipSvgV2());(null!=B&&B.rewindBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&e.addRewindButton(n,"VL_ONE",v.RewindSvgV2());(null==t||null===(s=t.relatedVideos)||void 0===s||null===(u=s.content)||void 0===u?void 0:u.length)>0&&e.addVideoSelector(n,null==t?void 0:t.relatedVideos);null!=t&&null!==(c=t.series)&&void 0!==c&&c.enable&&e.addSeriesSelectorV2(n,t);(null==t||null===(p=t.streams)||void 0===p?void 0:p.length)>1&&e.addMulticamSelector(n,null==t?void 0:t.streams);if(r.addTVProviderImage(n,t),l.initialiseKeyboardEvents(n,t),"MEDIA_TAILOR"==(null===(f=window)||void 0===f||null===(m=f.app_data)||void 0===m||null===(h=m.appcmsMain)||void 0===h||null===(b=h.adsConfig)||void 0===b?void 0:b.vodAdSticherProvider)&&null!==(g=window)&&void 0!==g&&null!==(k=g.app_data)&&void 0!==k&&null!==(S=k.appcmsMain)&&void 0!==S&&null!==(w=S.adsConfig)&&void 0!==w&&w.vodAdClientSideTracking&&E)if(q)!function(e){y.apply(this,arguments)}(n);else{var T,C=null;if(null!=t&&null!==(T=t.series)&&void 0!==T&&T.enable){var A,M,P,L,_,V=null===(A=i.getCurrentVideo())||void 0===A||null===(M=A.video)||void 0===M||null===(P=M.gist)||void 0===P?void 0:P.id,O=i.getSeriesWatchMap(),x=(null==O?void 0:O.get(V))||{t:0,p:0},D=x.t,N=x.p;"function"==typeof(null===(L=window)||void 0===L||null===(_=L.watchHistory)||void 0===_?void 0:_.cb)&&window.watchHistory.cb({watchedTime:D}),N<95&&(C=D)}else{var U=t.watchHistoryResumeTime;t.watchedPercentage<95&&(C=U)}l.setupAdvertisementMarkers(n,C)}null!=t&&t.isDvrEnabled&&null!=t&&null!==(j=t.dvrConfig)&&void 0!==j&&j.enable&&(e.addStartFromBeginningButton(n,t),e.addWatchLiveButton(n,t))}(t,a),h(t,a)};
|
package/esm/generic-bfb2240d.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 r from"axios";import{g as i}from"./player_instance-34118a5b.js";import a from"js-cookie";import{a as l,e as u,g as s,h as d,s as c,i as v,d as m}from"./currentVideoInfo-0b234e55.js";import{a as p,r as f}from"./captions-78bd2908.js";import{t as g,c as I}from"./skin-1d47c799.js";import E from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";function y(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function T(e){window.dataLayer=window.dataLayer||[],y("js",new Date),y("config",e)}function w(e,n){y("event",e,n)}var b={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function _(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function S(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?_(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):_(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var O={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=O.version;var L,A=function(e,n){var t,o,i,a,l,u,s,d;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:null!==(l=window)&&void 0!==l&&null!==(u=l.customData)&&void 0!==u&&u.overrideEntitlementBaseUrl?(null===(s=window)||void 0===s||null===(d=s.customData)||void 0===d?void 0:d.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==b?void 0:b.getVideoDetails),params:S({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":O.version,"x-player-name":"videojs"},withCredentials:!0})},P=function(e,n){var t,o,i,a;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:F.get()+b.getLinearChannelDetails,params:S(S(S(S(S({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(a=i.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},D=function(e,n){var t,o,i=H(n),a=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):r({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},R=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return o=e.sent,e.abrupt("return",r({url:F.get()+"".concat(null==b?void 0:b.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:S({},n),params:S({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),C=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},V=function(e){var n=e.videoId;return r({method:"GET",url:F.get()+"".concat(null==b?void 0:b.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(L=null==b?void 0:b.apiBaseUrl,{set:function(e){e&&(L=e)},get:function(){return L}}),k=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},W=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},j=null;function N(){return{set:function(e){e&&(j=e)},get:function(){return j}}}var U=function(){var e=n(t.mark(function e(){var n,o,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=N().get(),o=F.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),B=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!W(n)){e.next=6;break}return B||(B=U().then(function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&N().set(i),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){B=null})),e.abrupt("return",B);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),x=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},H=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function G(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Y(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?G(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):G(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Q=function(){var e,n,t,o,r,i,a,u=l();return"linearchannel"===((null==u?void 0:u.contentType)||"video")?null==u||null===(e=u.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==u?void 0:u.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==u||null===(r=u.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==u||null===(a=u.video)||void 0===a?void 0:a.id)||(null==u?void 0:u.id)};function z(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function q(){var e=window.sessionStorage.getItem("uid");return e||(e=z(),window.sessionStorage.setItem("uid",e),e)}function K(){return X.apply(this,arguments)}function X(){return(X=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function J(e){return e?String(e):""}var $=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function Z(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&function(e,o){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=z(),u="WEBSITE",s=null,d=0,c=null,v=0,m=0,p=!1,f=[],g=i(e);if(g){var I,E,h,y,T=$(function(){for(var e=g.currentTime(),n=g.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0}),_=function(){var e=n(t.mark(function e(n){var o,i,s,d,c,v,m,p,f,g,I;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return f=e.sent,g=H(f),e.t0=Y,e.t1=Y,e.t2=null==g?void 0:g.site,e.t3=null==g?void 0:g.siteId,e.t4=u,e.t5=q(),e.t6=Q(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11="production",e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?J(n.adPosition):"",e.next=25,K();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=l,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t25=null!==(d=n.resHeight)&&void 0!==d?d:null,e.t26=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t27=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==a||null===(m=a.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),I=[e.t32],r({url:(null==a||null===(p=a.beacon)||void 0===p?void 0:p.url)||F.get()+b.getBeaconUrl,method:"post",headers:{Authorization:f},contentType:"application/x-www-form-urlencoded",dataType:"text",data:I}).catch(function(e){return console.error(e)});case 41:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),S=function(e){if(!g.paused()&&g.readyState()>2)return clearInterval(s),clearInterval(c),e;var n,t=e+.1;return+t.toFixed(2)>=5&&m<4&&p?(m++,w("BUFFERING",Y({pfm:u,uid:q(),vid:Q(),videoPosition:Math.floor(g.currentTime)},null==a||null===(n=a.beacon)||void 0===n?void 0:n.params)),_({eventName:"BUFFERING",videoPosition:Math.floor(g.currentTime),isAdEvent:!1}),0):t};I=Math.floor(g.currentTime),g.on("error",function(){var e,n=Math.floor(g.currentTime);clearInterval(s);var t=I===n?"FAILED_TO_START":"DROPPED_STREAM";w(t,Y({pfm:u,uid:q(),vid:Q(),videoPosition:n},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),_({eventName:t,videoPosition:n,isAdEvent:!1})}),E=!1,g.on("waiting",$(function(){p&&(E=!0,clearInterval(s),s=setInterval(function(){E&&!g.paused()?v=S(v):clearInterval(s)},100))})),g.on("playing",$(function(){E=!1,clearInterval(s)})),h=function(e){var n,t,o,r=Y({videoPosition:Math.floor(g.currentTime),isAdEvent:!0,bufferHealth:T(),pfm:u,uid:q(),vid:Q(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==a||null===(o=a.beacon)||void 0===o?void 0:o.params);w(e,Y({},r)),_(Y({eventName:e,adPosition:1},r))},g.on("adstart",function(){h("AD_REQUEST"),h("AD_IMPRESSION")}),g.on("adskip",function(){d=0}),g.on("adend",function(){d=0}),g.on("timeupdate",function(){var e,n,t,o,r=Math.floor(g.currentTime());if(r>=30&&r%30==0&&!f.includes(r)){var i,a=null===(i=g.el().getElementsByTagName("video"))||void 0===i?void 0:i[0];m=0,f.push(r),_({eventName:"PING",videoPosition:r,isAdEvent:!1,duration:30,resHeight:(null==a?void 0:a.videoHeight)||null,resWidth:(null==a?void 0:a.videoWidth)||null,bufferHealth:T(),bitrate:Math.round((null==g||null===(e=g.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)})}}),y=$(function(){var e;d=0,c=setInterval(function(){d=S(d)},100),w("PLAY",Y({pfm:u,uid:q(),vid:Q(),videoPosition:Math.floor(g.currentTime)},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),_({eventName:"PLAY",videoPosition:Math.floor(g.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":Q(),watchTime:Math.floor(g.currentTime)})}),g.one("play",y),g.on("loadeddata",function(){g.one("timeupdate",function(){var e;clearInterval(c),clearInterval(s),v=d||0,w("FIRST_FRAME",Y({pfm:u,uid:q(),vid:Q(),videoPosition:Math.floor(g.currentTime),ttFirstFrame:d,bufferHealth:T()},null==a||null===(e=a.beacon)||void 0===e?void 0:e.params)),_({eventName:"FIRST_FRAME",videoPosition:Math.floor(g.currentTime),isAdEvent:!1,ttFirstFrame:d,bufferHealth:T()}),p=!0,d=0})})}else console.error("Videojs: Player instance not found.")}(e,o,a)}var ee=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},ne=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},te=function(e,n){var t=new Map;V({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),d(t)}).catch(function(e){return console.log(e)})},oe=function(){var e=u.get();return e>=0?e+1:1},re=function(){var e,n,t,o=s(),r=l(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=u.get(),d=null==o||null===(n=o[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===i});return d>=0?d+1:1};function ie(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ae(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ie(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var le=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ue=function(e){var n=se(e,"video.tags",[]),t=se(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},se=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},de=function(){var n,t,o,r,l,u,s,d,c,v,m,p,f,g,I,E,h,y,T,w,b,_,S,O,L=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",A=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return L;var D=(null==P?void 0:P.siteName)||"",R=(null==P?void 0:P.contentType)||"video",C=(null==P||null===(o=P[R])||void 0===o?void 0:o.metadata)||(null==P||null===(r=P[R])||void 0===r||null===(l=r.gist)||void 0===l?void 0:l.metadata),V=i(A);if(!L.includes("VIEWLIFT_"))return L;var F,k=window.getComputedStyle(document.getElementById(A),null),W=Math.trunc(k.getPropertyValue("height").slice(0,-2)),j=Math.trunc(k.getPropertyValue("width").slice(0,-2)),N="linearchannel"===R?null==P||null===(u=P.linearchannel)||void 0===u||null===(s=u.channels)||void 0===s||null===(d=s.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===d||null===(c=d.content)||void 0===c?void 0:c.id:se(P,"video.gist.id",""),U="linearchannel"===R?null==P||null===(v=P.linearchannel)||void 0===v||null===(m=v.channels)||void 0===m||null===(p=m.find(function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)}))||void 0===p?void 0:p.title:se(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),B=null,M=null;"function"==typeof window.__gpp&&(null===(F=window)||void 0===F||F.__gpp("ping",function(e){B=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var x=ae(ae({},ce(C)),{},(_={VIEWLIFT_WIDTH:j,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:le(j,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(f=window)||void 0===f?void 0:f.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:se(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:se(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:se(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==V||null===(g=V.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==V||null===(I=V.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D||"usanetwork"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ue(P),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(se(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+se(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:se(null===(E=window)||void 0===E||null===(h=E.app_data)||void 0===h||null===(y=h.site)||void 0===y?void 0:y.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_GDPR:"spinco"==D||"usanetwork"==D?"":se(null===(T=window)||void 0===T||null===(w=T.app_data)||void 0===w||null===(b=w.site)||void 0===b?void 0:b.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*se(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:se(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:U,VIEWLIFT_CONTENT_SERIES_TITLE:se(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:se(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:re(),VIEWLIFT_SEASON_NUMBER:oe(),VIEWLIFT_CONTENT_TAGS:ue(P),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:B||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(_,"VIEWLIFT_LAT",""),e(_,"VIEWLIFT_APP_BUNDLE",""),e(_,"VIEWLIFT_ATT_CONSENT",""),_),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in x){var G=new RegExp(H,"g");L=L.replace(G,x[H])}return L},ce=function(e){var n,t,o,r,i,a,l={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.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,d=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return s||d?(ne()?s?l=ae(ae({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):d&&(l=ae(ae({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?l=ae(ae({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):d&&(l=ae(ae({},l),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?l=ae(ae({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):d&&(l=ae(ae({},l),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),l=ne()?ae(ae({},l),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):ae(ae({},l),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(l=ae(ae({},l),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),l=ne()?ae(ae({},l),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):ae(ae({},l),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),l=ae(ae({},l),{},{VIEWLIFT_AFID:u.get("afid")})},ve=function(e,n){var t,o,r,i,a,l,u,s,d,c,v,m,p,f=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[f])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[f])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,E=null==e||null===(i=e[f])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(l=e[f])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(d=e[f])||void 0===d||null===(c=d.liveDetails)||void 0===c||c.isDvrEnabled;var y=(null==e||null===(v=e[f])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(p=m.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return pe(E);if(g){var T=fe(I,n);return T.src=de(T.src,n,e),T}if("Safari"!==ee()&&y)return me(I);if(h){var w=pe(I);return w.src=de(w.src,n,e),w}if(null!=I&&I.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return b.src=de(b.src,n,e),b}return null},me=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},pe=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},fe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,u=ee();if(i(n),"Safari"===u){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(a,function(e,n,t){console.log(e),e&&i(e),i(null,t)})}}}}}(r);return ge(n),s}var d,c={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(d=window)||void 0===d?void 0:d.siteName)?(ge(n),c.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ge=function(e){var n=i(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==ee()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ie=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},Ee=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},he=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var ye=!1,Te=function(e,n,t){var o=de(n,e,t),r=i(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,a=i(e);if(null!==a.el_){ye=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),ye&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var u=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&u.hasAttribute("controls")&&u.removeAttribute("controls");var s="click",d=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(d=!0,s="touchend"),a.one(s,function(){d&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};function we(e,n){var t,o,r,a=i(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,u=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o,r,i,s,d,c,v,m,p;if(_e.enabled&&"input"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==u||u.focus()),f){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Ze(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(s=i.appcmsMain)||void 0===s||null===(d=s.adsConfig)||void 0===d?void 0:d.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||$e(e,10)}}},!0)}var be,_e=(be=!0,{enable:function(){be=!0},disable:function(){be=!1},get enabled(){return be}}),Se="ssai-breakStart",Oe="ssai-adImpression",Le="ssai-firstQuartile",Ae="ssai-midpoint",Pe="ssai-thirdQuartile",De="ssai-complete",Re="ssai-breakEnd",Ce={breakStart:Se,impression:Oe,firstQuartile:Le,midpoint:Ae,thirdQuartile:Pe,complete:De,breakEnd:Re};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=Ce[o];r&&t.trigger(r,n)}function Fe(e){var n=i(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Se,e)},adImpression:function(e){return t(Oe,e)},adFirstQuartile:function(e){return t(Le,e)},adMidpoint:function(e){return t(Ae,e)},adThirdQuartile:function(e){return t(Pe,e)},adComplete:function(e){return t(De,e)},adBreakEnd:function(e){return t(Re,e)}}}function ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function We(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ke(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ke(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function je(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Ne(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ne(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw i}}}}function Ne(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Ue,Be=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Me=(Ue=null,{set:function(e){Ue=e},get position(){return Ue}});function xe(e,n){return He.apply(this,arguments)}function He(){return(He=n(t.mark(function e(n,o){var r,a,l,u,s,d,c,v,m,p,f,g,I,E,y,T,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i(n),l=ve(o,n),u=l.src,s=(null==o||null===(r=o.video)||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,d=u.replace("/dash/","/session/").replace("/master/","/session/"),d=de(d,n,o),c=Ge(d),v=h(c,2),m=v[0],p=v[1],d=new URL(d.split("?")[0]),Object.keys(p).length>0&&Object.entries(p).forEach(function(e){var n=h(e,2),t=n[0],o=n[1];d.searchParams.set(t,o)}),e.prev=9,e.next=12,fetch(d,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(We({adsParams:We({},m)},s&&{availSuppression:{mode:"BEHIND_LIVE_EDGE",value:"00:00:00"}}))});case 12:return f=e.sent,e.next=15,f.json();case 15:return g=e.sent,I="https://"+new URL(d).hostname,E=g.trackingUrl,y=g.manifestUrl,T=I+E,w=I+y,Be.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),l.src=w,e.abrupt("return",l);case 27:return e.prev=27,e.t0=e.catch(9),e.abrupt("return",l);case 30:case"end":return e.stop()}},e,null,[[9,27]])}))).apply(this,arguments)}function Ge(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=je((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=h(t.value,2),a=i[0],l=i[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},s={},d=0,c=Object.entries(n);d<c.length;d++){var v=h(c[d],2),m=v[0],p=v[1];if(m.startsWith("ads."))u[m.replace(/^ads\./,"")]=p;else s[m]=p}return[u,s]}var Ye,Qe=(Ye=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Ye=Array.isArray(e)?E(e):Ye},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Ye),E(Ye)}});function ze(e,n){return qe.apply(this,arguments)}function qe(){return qe=n(t.mark(function e(o,r){var a,l,u,s,d,c,v,m,p,f,I,h,y,T,w,b,_,S,O,L,A,P,D;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:D=function(e,n,t,r,a,l){var u=i(o);if(!u.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(u.currentTime());var s,d=je(t);try{var c=function(){var t,i,d,c=s.value,v=c.eventType,m=c.beaconUrls,p=c.startTimeInSeconds,f=c.startTime,g=c.durationInSeconds,I=p||0,E=m,h=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,y="".concat(I,"_").concat(v),T=A.get("pod-".concat(a))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",A),e>=I&&!T.includes(y)){T.push(y),A.set("pod-".concat(a),T);try{P(v,n,E,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var w=Me.position;Me.set(null),setTimeout(function(){null!=w&&(u.currentTime(w),l())},500)}if("function"==typeof h)try{var b,_={eventType:v,startTimeInSeconds:p,startTime:f,durationInSeconds:g,ad:null==n||null===(b=n.ads)||void 0===b?void 0:b[r],adIndex:r};h({adsData:_}),Ve(o,_)}catch(e){console.error("Error when calling ads callback:",e)}}};for(d.s();!(s=d.n()).done;)c()}catch(e){d.e(e)}finally{d.f()}}},P=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},L=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Me.set(r),p=Be.get(),(f=i(o)).one("loadeddata",function(){p&&O(p)}),I=new Map,h=new Map,y=-1,T=(null===(a=document)||void 0===a||null===(l=a.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,w=(null==f||null===(u=f.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,b=(null==f||null===(s=f.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==f||null===(d=f.el())||void 0===d||null===(c=d.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,S=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark(function e(n){var a,l,u,s,d,c,v,m,p,f,O,A,P,R,C,V,F,k,W,j;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return V=function(e){document.removeEventListener("pointermove",C),document.removeEventListener("pointerup",V),0===e.button&&P()},C=function(e){},R=function(){var e,n=f.currentTime(),t=null,o=je(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(i+a));n>=i&&n<=l&&(t=l,I.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){f.currentTime(t+2.2)},100))},P=function(){var e,n=f.currentTime(),t=null,o=je(p);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,u=Math.floor(i+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>u||n>i)&&!I.has(i)||n>=i&&n<=u)&&(t=i,I.set(i,!0),h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){f.currentTime(t+.4)},100))},d=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),m=v.avails,p=[],f=i(o),O=f.controlBar.progressControl,A=O.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),m.map(function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(d=!0),p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===r?void 0:r[0])||[]})}),!d&&r&&(f.currentTime(r),R()),null!=p&&p.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),window.adsQueueList=p),console.log(p,"data"),p.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",A.appendChild(i)}}),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=g(function(){var e=f.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=p[o],r=t.startTimeInSeconds,i=t.durationInSeconds,a=t.ads,l=r+i;if(e>=r-1.2&&e<=l+1.2){e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&I.set(r,!0),_e.disable(),T&&T.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),w&&(w.el().style.pointerEvents="none",w.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,d=0,c=0;c<a.length;c++){var v,m=null==a||null===(v=a[c])||void 0===v?void 0:v.durationInSeconds;if(u<s+m){d=c;break}s+=m}a[d];var f=Math.max(0,i-u),g=Math.round(f);F.style.display="block",j.textContent="".concat(d+1," of ").concat(a.length," • ").concat(L(g));var y=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});y.push.apply(y,E(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&y.push(null==t?void 0:t.podSlotImpressionBeacon),D(e,t,y,d,o,R),"break"}h.delete(r)},o=0;o<p.length;o++){if("break"===t())break}n||(F.style.display="none",O.el().classList.remove("hide-progress-bar"),w&&(w.el().style.pointerEvents="auto",w.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_e.enable())}},1e3),f.on("timeupdate",f._timeUpdateHandler),null===(l=document)||void 0===l||l.addEventListener("keydown",function(e){_e.enabled&&"ArrowRight"==e.key&&(P(),$e(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",C),document.addEventListener("pointerup",V))}),null===(u=document)||void 0===u||null===(s=u.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(F=document.createElement("div")).className="ssai-ad-container",(k=document.createElement("div")).className="sponsored-adbox",(W=document.createElement("div")).className="sponsored-text",W.textContent="Sponsored Ad",k.append(W),(j=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",F.append(k),F.append(j),f.el().appendChild(F);case 45:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),A=new Map;case 18:case"end":return e.stop()}},e)})),qe.apply(this,arguments)}function Ke(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 Xe=function(e){o(e).play()},Je=function(e){o(e).pause()},$e=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},Ze=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},en=function(e){return!!o.getPlayer("".concat(e))},nn=function(e){return o(e).paused()},tn=function(){var e=n(t.mark(function e(n,o){var r,a,l,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=u.length>2&&void 0!==u[2]&&u[2],e.next=3,M();case 3:return a=e.sent,l=i(n),e.abrupt("return",new Promise(function(e,t){var i=(null==o?void 0:o.programs)||[];null==o||delete o.programs,P(o,a).then(function(t){var a=null==t?void 0:t.data;window.sid=z(),a.contentType="linearchannel",a.channelId=null==o?void 0:o.channelId;var u=ve(a,n);c(a),m(i),sessionStorage.setItem("program_switched",!0),u&&r?(un(n,u),l.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:a})})):e({status:!0,msg:"Feed authenticated",response:a})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),on=function(){var e=n(t.mark(function e(o,r,a){var l,u,d,m,g,I,E;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return m=e.sent,(s()||null)&&v(r),g=0,I=0,E=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(d=u.watchHistory)&&void 0!==d&&d.enable&&C(r,m).then(function(e){var n,t,o,r,i,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),g=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(I=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(E=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}),e.abrupt("return",new Promise(function(e,a){A(r,m).then(function(){var r=n(t.mark(function n(r){var l,u,s,d,v,m,h,y,T,w,b,_,S,O,L,A,P,D,R,C,V,F,k,W,j,N,U,B,M,x,H,G,Y,Q,z,q,K,X;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(A=null==r?void 0:r.data,P=(null==A?void 0:A.contentType)||"video",D=(null==A||null===(l=A[P])||void 0===l?void 0:l.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(d=s.appcmsMain)||void 0===d||null===(v=d.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,R=(null==A||null===(m=A.video)||void 0===m||null===(h=m.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,c(r.data),(C=(null==A||null===(y=A.ads)||void 0===y||null===(T=y.preRoll)||void 0===T||null===(w=T.adTags)||void 0===w||null===(b=w.web)||void 0===b?void 0:b.active)&&(null==A||null===(_=A.ads)||void 0===_||null===(S=_.preRoll)||void 0===S||null===(O=S.adTags)||void 0===O||null===(L=O.web)||void 0===L?void 0:L.url))&&Te(o,C,A),V=ve(A,o),!D){n.next=12;break}return n.next=11,xe(o,A);case 11:V=n.sent;case 12:V?(G=(null==A||null===(F=A.video)||void 0===F||null===(k=F.gist)||void 0===k?void 0:k.videoImageUrl)||(null==A||null===(W=A.video)||void 0===W||null===(j=W.gist)||void 0===j||null===(N=j.imageGist)||void 0===N?void 0:N.r16x9),(Y=i(o)).poster(G),un(o,V),D&&ze(o,E),Y.on("loadstart",function(){R&&e({status:!0,msg:"Video Loaded",response:A})}),Y.on("loadeddata",function(){he(),e({status:!0,msg:"Video Loaded",response:A})}),Y.one("play",function(){g&&!D&&I<95&&setTimeout(function(){Y.currentTime(g)},0)}),Y.one("error",function(){var e;a({status:!1,msg:(null==Y||null===(e=Y.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==A||null===(U=A.video)||void 0===U||null===(B=U.contentDetails)||void 0===B||null===(M=B.closedCaptions)||void 0===M?void 0:M.length)>0||(null==A||null===(x=A.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(X=(null==A||null===(z=A.video)||void 0===z||null===(q=z.contentDetails)||void 0===q?void 0:q.closedCaptions)||(null==A||null===(K=A.video)||void 0===K?void 0:K.closedCaptions),Q=X.filter(function(e){return"VTT"===e.format}),p(o,Q)):f(o)):(Ee(o,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){sn(e,o,a,r)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),rn=function(e,n,t){var o=i(e);return o.src(n),new Promise(function(e,n){var r=0;o.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},an=function(e){var n=i(e);if(ln(),I(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ln=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},un=function(e,n){var t=i(e);t&&t.src(n)},sn=function(n,t,o,r){var i,a,l,u,s,d,c=null==n||null===(i=n.response)||void 0===i||null===(a=i.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(u=l.data)||void 0===u?void 0:u.errorMessage)||(null==n?void 0:n.message);en(t)&&Ee(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(d=window)||void 0===d?void 0:d.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ke(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},dn=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{Ze as A,en as B,on as C,tn as D,an as E,k as F,Qe as G,Fe as H,F as I,x as J,N as K,W as L,T as M,we as N,ne as O,nn as P,_e as Q,Be as R,Ve as S,ze as T,V as U,re as a,oe as b,ve as c,ee as d,he as e,dn as f,q as g,Ee as h,Z as i,Te as j,Ie as k,un as l,xe as m,H as n,A as o,C as p,sn as q,M as r,R as s,P as t,D as u,te as v,rn as w,$e as x,Xe as y,Je as z};
|
package/esm/skin-eb52313f.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,d as n,e as o,o as l,p as t,q as r,r as i,s as a}from"./features-fd69b042.js";import{g as s}from"./player_instance-34118a5b.js";import{a as d,i as u,b as c}from"./index-5e87744f.js";import{O as v,Q as p,R as m,S as f,c as y,N as h,T as b}from"./generic-bfb2240d.js";import"videojs-contrib-quality-menu";import{i as g,r as w}from"./index-711110d3.js";import{c as j}from"./helper-d52dff3c.js";import{c as k,a as S,b as I}from"./currentVideoInfo-0b234e55.js";import E from"video.js";import T from"@babel/runtime/helpers/toConsumableArray";import C from"@babel/runtime/helpers/asyncToGenerator";import A from"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"js-cookie";import{t as B}from"./skin-1d47c799.js";import"axios";import{c as L,d as _}from"./icons-37daa6b3.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-62be852a.js";import"@babel/runtime/helpers/assertThisInitialized";import"./localisation-0bf399a1.js";import"./autoNextVideo-b216988b.js";import"./util-45804492.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"./captions-78bd2908.js";import"video.js/dist/video-js.min.css";function M(n,o){var l=s(n);l&&(l.on("loadeddata",function(){var e,t,r,i,a,c=j(o),p=k();l.qualityLevels()&&l.qualityLevels().length&&function(e){var n=s(e);n&&(null==n||n.qualityMenu,n.qualityMenu({useResolutionLabels:!0}))}(n),!(null!=o&&null!==(e=o.series)&&void 0!==e&&e.enable||null!==(t=window)&&void 0!==t&&null!==(r=t.app_data)&&void 0!==r&&null!==(i=r.appcmsMain)&&void 0!==i&&null!==(a=i.features)&&void 0!==a&&a.auto_play)||null!=o&&o.liveVideo||d(n,o),null!=o&&o.liveVideo||v()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||u(n),c&&p&&p.length?g(n):w()}),l.one("play",function(){var o,l,t,r;null!==(o=window)&&void 0!==o&&null!==(l=o.customData)&&void 0!==l&&l.iframeOverlayUrl&&e(n,null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r?void 0:r.iframeOverlayUrl)}))}function x(e,n){var o="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!o){if(Array.isArray(e)||(o=function(e,n){if(e){if("string"==typeof e)return O(e,n);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?O(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){o&&(e=o);var l=0,t=function(){};return{s:t,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i=!0,a=!1;return{s:function(){o=o.call(e)},n:function(){var e=o.next();return i=e.done,e},e:function(e){a=!0,r=e},f:function(){try{i||null==o.return||o.return()}finally{if(a)throw r}}}}function O(e,n){(null==n||n>e.length)&&(n=e.length);for(var o=0,l=Array(n);o<n;o++)l[o]=e[o];return l}function D(){return D=C(A.mark(function e(n){var o,l,t,r,i,a,d,u,c,v,y,h,b,g,w,j,k,S,I,E,L,_,M,O,D,P;return A.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:P=function(e,o,l,t,r){var i=s(n);if(!i.seeking()){o.startTimeInSeconds,o.durationInSeconds,Math.floor(i.currentTime());var a,d=x(l);try{for(d.s();!(a=d.n()).done;){var u,c,v,p=a.value,m=p.eventType,y=p.beaconUrls,h=p.startTimeInSeconds,b=p.startTime,g=p.durationInSeconds,w=h||0,j=y,k=(null===(u=window)||void 0===u||null===(c=u.customData)||void 0===c||null===(v=c.ads)||void 0===v?void 0:v.adEventHandler)||null,S="".concat(w,"_").concat(m),I=O.get("pod-".concat(r))||[];if(console.warn(e,w,"map:",m,"condition1:",e>=w,"map:",O),e>=w&&!I.includes(S)){I.push(S),O.set("pod-".concat(r),I);try{D(m,o,j,i)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,o)}if("function"==typeof k)try{var E,T={eventType:m,startTimeInSeconds:h,startTime:b,durationInSeconds:g,ad:null==o||null===(E=o.ads)||void 0===E?void 0:E[t],adIndex:t};k({adsData:T}),f(n,T)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){d.e(e)}finally{d.f()}}},D=function(e,n,o,l){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(l.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(l.currentTime())),"AD_POD:",n),null==o||o.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},h=function(){y&&clearInterval(y)},c=m.get(),v=s(n),y=null,v.one("loadeddata",function(){y=setInterval(function(){c&&!v.paused()&&M(c)},2e3)}),v.on("sourceset",function(e){console.log(e,"sourceset")}),v.on("dispose",function(){h()}),b=new Map,g=new Map,w=-1,j=null,k=(null===(o=document)||void 0===o||null===(l=o.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,S=(null==v||null===(t=v.controlBar)||void 0===t?void 0:t.getChild("videoSelector"))||null,I=(null==v||null===(r=v.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,E=(null==v||null===(i=v.el())||void 0===i||null===(a=i.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===a?void 0:a[0])||null,L=(null==v||null===(d=v.el())||void 0===d||null===(u=d.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===u?void 0:u[0])||null,_=!1,M=function(){var e=C(A.mark(function e(o){var l,t,r,i,a,d,u,c,v,m;return A.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=new URL(o),j&&t.searchParams.append("nextToken",j),e.next=4,fetch(t.toString(),{method:"GET"});case 4:return r=e.sent,e.next=7,r.json();case 7:i=e.sent,a=i.avails,d=i.nextToken||null,j=d,u=[],c=s(n),v=c.controlBar.progressControl,m=v.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),a.map(function(e,n){var o,l;u.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(l=o.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===l?void 0:l[0])||[]})}),console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",u),null!=u&&u.length&&(window.adsQueueList=u),u.forEach(function(e){var n=e.markerPositionInSeconds,o=e.ads,l=c.duration();if(!(n>l||Array.isArray(o)&&0==(null==o?void 0:o.length))){var t=n/l*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(t,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(t,"%"),r.style.pointerEvents="none",m.appendChild(r)}}),c._timeUpdateHandler&&c.off("timeupdate",c._timeUpdateHandler),c._timeUpdateHandler=B(function(){var e=c.currentTime();if(e!==w){w=e;for(var n=function(){var n=u[o],l=n.startTimeInSeconds,t=n.durationInSeconds,r=n.ads,i=l+t;if(e>=l-1.2&&e<=i+1.2){_=!!(e>=l&&e<=i&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>i&&b.set(l,!0),p.disable(),k&&k.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),L&&(L.style.pointerEvents="none",L.classList.add("vjs-hidden")),S&&(S.el().style.pointerEvents="none",S.el().classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),v.el().classList.add("hide-progress-bar");for(var a=e-l,s=0,d=0,c=0;c<r.length;c++){var m,f=null==r||null===(m=r[c])||void 0===m?void 0:m.durationInSeconds;if(a<s+f){d=c;break}s+=f}var y=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});y.push.apply(y,T(n))}),Array.isArray(r)&&0==(null==r?void 0:r.length)&&y.push(null==n?void 0:n.podSlotImpressionBeacon),P(e,n,y,d,o),"break"}g.delete(l)},o=0;o<u.length;o++){if("break"===n())break}_||(v.el().classList.remove("hide-progress-bar"),S&&(S.el().style.pointerEvents="auto",S.el().classList.remove("vjs-hidden")),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),k&&k.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),L&&(L.style.pointerEvents="auto",L.classList.remove("vjs-hidden")),p.enable())}},1e3),c.on("timeupdate",c._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),O=new Map;case 23:case"end":return e.stop()}},e)})),D.apply(this,arguments)}function P(e,d){s(e).addClass("skin_vlone"),M(e,d),function(e,s){var d,u,v,p,m,f,g,w,k,E,T,C,A,B,M,x=(null==s?void 0:s.liveVideo)||!1,O=(null==s||null===(d=s.res)||void 0===d||null===(u=d.video)||void 0===u?void 0:u.isSSAIEnabled)||!1,P=y(null==s?void 0:s.res,e)||{};P.src;var V=(null==s?void 0:s.skin_settings)||{};j(s),null!=V&&V.skipBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)&&n(e,"VL_ONE",L());(null!=V&&V.rewindBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)||1==(null==s?void 0:s.liveui))&&o(e,"VL_ONE",_());(null==s||null===(v=s.relatedVideos)||void 0===v||null===(p=v.content)||void 0===p?void 0:p.length)>0&&l(e,null==s?void 0:s.relatedVideos);null!=s&&null!==(m=s.series)&&void 0!==m&&m.enable&&t(e,s);(null==s||null===(f=s.streams)||void 0===f?void 0:f.length)>1&&r(e,null==s?void 0:s.streams);if(c(e,s),h(e,s),"MEDIA_TAILOR"==(null===(g=window)||void 0===g||null===(w=g.app_data)||void 0===w||null===(k=w.appcmsMain)||void 0===k||null===(E=k.adsConfig)||void 0===E?void 0:E.vodAdSticherProvider)&&null!==(T=window)&&void 0!==T&&null!==(C=T.app_data)&&void 0!==C&&null!==(A=C.appcmsMain)&&void 0!==A&&null!==(B=A.adsConfig)&&void 0!==B&&B.vodAdClientSideTracking&&O)if(x)!function(e){D.apply(this,arguments)}(e);else{var N,U=null;if(null!=s&&null!==(N=s.series)&&void 0!==N&&N.enable){var q,H,R,Q,F,G=null===(q=S())||void 0===q||null===(H=q.video)||void 0===H||null===(R=H.gist)||void 0===R?void 0:R.id,$=I(),z=(null==$?void 0:$.get(G))||{t:0,p:0},J=z.t,K=z.p;"function"==typeof(null===(Q=window)||void 0===Q||null===(F=Q.watchHistory)||void 0===F?void 0:F.cb)&&window.watchHistory.cb({watchedTime:J}),K<95&&(U=J)}else{var W=s.watchHistoryResumeTime;s.watchedPercentage<95&&(U=W)}b(e,U)}null!=s&&s.isDvrEnabled&&null!=s&&null!==(M=s.dvrConfig)&&void 0!==M&&M.enable&&(i(e,s),a(e,s))}(e,d),V(e,d)}var V=function(e,n){var o,l,t,r,i,a,d,u,c,v,p,m,f=s(e),y=(null==n?void 0:n.theme)||{},h=E.dom.$(".vjs-play-progress"),b=E.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");b&&(b.style.color="".concat(null===(o=window)||void 0===o||null===(l=o.app_data)||void 0===l||null===(t=l.appcmsMain)||void 0===t||null===(r=t.brand)||void 0===r||null===(i=r.cta)||void 0===i||null===(a=i.primary)||void 0===a?void 0:a.backgroundColor)),h&&(h.style.background="".concat(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.brand)||void 0===v||null===(p=v.cta)||void 0===p||null===(m=p.primary)||void 0===m?void 0:m.backgroundColor));var g=f.getChild("BigPlayButton")||null;(null==y?void 0:y.progressBarColor)&&h&&(h.style.background=y.progressBarColor),(null==y?void 0:y.playButtonBackgroundColor)&&g&&(g.el().style.background=y.playButtonBackgroundColor),(null==y?void 0:y.playButtonColor)&&b&&(b.style.color=y.playButtonColor),(null==y?void 0:y.playButtonType)&&("square"==(null==y?void 0:y.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{P as initialiseSkin};
|