@viewlift/player-backup 2.0.271-backup → 2.0.273-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-f6948193.js → autoNextVideo-0de0c99f.js} +1 -1
- package/cjs/bundle.css +580 -580
- package/cjs/{features-96f82a11.js → features-37a04894.js} +1 -1
- package/cjs/{generic-b88d9902.js → generic-ae574c9a.js} +1 -1
- package/cjs/{index-f84db362.js → index-1a998ebc.js} +1 -1
- package/cjs/{index-9334bcfb.js → index-752fb705.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-a91630a3.js → multicamv2-ae7ad18b.js} +1 -1
- package/cjs/{multicamv2-567c42aa.js → multicamv2-b929ee52.js} +1 -1
- package/cjs/{nextEpisodeButton-f8dbf122.js → nextEpisodeButton-9c276bae.js} +1 -1
- package/cjs/{playlist-859e992e.js → playlist-cbca04c1.js} +1 -1
- package/cjs/{series-e4c15432.js → series-ff8ba498.js} +1 -1
- package/cjs/{series-v2-3a4b4de8.js → series-v2-67043b16.js} +1 -1
- package/cjs/{series-v2-30127cc1.js → series-v2-d10e780c.js} +1 -1
- package/cjs/{skin-bebf8ab8.js → skin-34188947.js} +1 -1
- package/cjs/{skin-d53f493c.js → skin-479b7ff2.js} +1 -1
- package/cjs/{skin-b4033ee3.js → skin-67a053be.js} +1 -1
- package/cjs/{skin-45fa1017.js → skin-743ea67a.js} +1 -1
- package/cjs/{skin-01e8b937.js → skin-a57ec2d4.js} +1 -1
- package/cjs/{skin-eb76b6c2.js → skin-dbd0eb85.js} +1 -1
- package/cjs/{skin-5bfadcc7.js → skin-ee093670.js} +1 -1
- package/cjs/{skin-663efe23.js → skin-f0acf681.js} +1 -1
- package/cjs/{skin-d449945c.js → skin-f8d0355f.js} +1 -1
- package/cjs/{util-8494ff95.js → util-bdbdb756.js} +1 -1
- package/cjs/{videoSelector-a2fb671d.js → videoSelector-69edac48.js} +1 -1
- package/cjs/{videoSelector-6b5a8b9d.js → videoSelector-f5ed50a7.js} +1 -1
- package/esm/{autoNextVideo-5edbb399.js → autoNextVideo-b5a0e7f2.js} +1 -1
- package/esm/bundle.css +580 -580
- package/esm/{features-c86717cb.js → features-6789d00a.js} +1 -1
- package/esm/{generic-7018a35f.js → generic-33a5f6db.js} +1 -1
- package/esm/{index-12f33a04.js → index-21baa8fb.js} +1 -1
- package/esm/{index-1a2804e4.js → index-367f32c7.js} +1 -1
- package/esm/index.js +1 -1
- package/esm/{multicamv2-107925a8.js → multicamv2-38526af8.js} +1 -1
- package/esm/{multicamv2-8b3b63f8.js → multicamv2-63c414c7.js} +1 -1
- package/esm/{nextEpisodeButton-9340ef4c.js → nextEpisodeButton-6f748f3c.js} +1 -1
- package/esm/{playlist-aa0ab582.js → playlist-0354b5d9.js} +1 -1
- package/esm/{series-7e9b8ad9.js → series-9ae8159d.js} +1 -1
- package/esm/{series-v2-2a5e43be.js → series-v2-0cc8f758.js} +1 -1
- package/esm/{series-v2-534909ec.js → series-v2-70023e34.js} +1 -1
- package/esm/{skin-22491664.js → skin-272c9ee0.js} +1 -1
- package/esm/{skin-5d9d338d.js → skin-30aad0cd.js} +1 -1
- package/esm/{skin-fc386a0b.js → skin-584ab22b.js} +1 -1
- package/esm/{skin-d5be7e2e.js → skin-5dcf4810.js} +1 -1
- package/esm/{skin-35cb85a4.js → skin-8d8c5654.js} +1 -1
- package/esm/{skin-3563964e.js → skin-a29e48d8.js} +1 -1
- package/esm/{skin-d7b5d047.js → skin-b3b3b287.js} +1 -1
- package/esm/{skin-063713b5.js → skin-b67cc4f1.js} +1 -1
- package/esm/{skin-b2696d32.js → skin-fa83e953.js} +1 -1
- package/esm/{util-5b0950d3.js → util-66a380dd.js} +1 -1
- package/esm/{videoSelector-1aeef366.js → videoSelector-26401bd6.js} +1 -1
- package/esm/{videoSelector-06052b84.js → videoSelector-df3d0d5d.js} +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-ae574c9a.js"),s=require("./renditions-d28715a3.js"),d=require("./skin-c97f0eea.js"),u=require("./localisation-56e0a999.js");function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?c(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addBigMuteButton=function(e,t){Promise.resolve().then(function(){return require("./index-0cb8083b.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("MuteButton",n),o.addChild("MuteButton",h({playerId:e},t))})},exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-544fd444.js")}).then(function(r){var n,o,l,a,s=r.default,u=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-ae7ad18b.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-b929ee52.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-9c276bae.js")}).then(function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-cbca04c1.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-948774b8.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-ff8ba498.js")}).then(function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},u=0;u<a.length;u++)s(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-67043b16.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-d10e780c.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-7a7e7810.js")}).then(function(r){var n,o,l,a,s=r.default,u=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=u.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-69edac48.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-f5ed50a7.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
|
|
@@ -1 +1 @@
|
|
|
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"),i=require("axios"),r=require("./skin-c97f0eea.js"),l=require("./browser-77c57718.js"),a=require("md5"),d=require("js-cookie"),s=require("./captions-80f6eb66.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),m=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e,n){p("event",e,n)}var g={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 w(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 I(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?w(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):w(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var y={name:"@viewlift/player",version:"2.1.38",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^1.0.16",axios:"^1.2.3",md5:"^2.3.0",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"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=y.version;var h,E=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":D.get()+"".concat(null==g?void 0:g.getVideoDetails)},T=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:E(),params:I({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":y.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},b=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:D.get()+g.getLinearChannelDetails,params:I(I(I(I(I({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},(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===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},S=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",i({url:D.get()+"".concat(null==g?void 0:g.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:I({},n),params:I({},(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)}}(),_=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getVideoInfoV2,"/").concat(r,"/").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})},O=function(e){var n=e.videoId;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},D=(h=null==g?void 0:g.apiBaseUrl,{set:function(e){e&&(h=e)},get:function(){return h}}),P=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},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var F,C,k,R,j,V,W,x=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),o=D.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),N=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"))||!P(n)){e.next=6;break}return N||(N=x().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&L().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){N=null})),e.abrupt("return",N);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),U=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},B=(V=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;V.set(t,(V.get(t)||0)+1)},get:function(e){return V.get(e)},clear:function(){V.clear()}}),H=function(e){C=e},G=function(){return C},q=function(){return F},Y=function(e){k=e},Q=function(e){if(R){var n=R.get(e);Y(n+1)}},z=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}});function K(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 X(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var J=0,$=null,Z=function(){var e,n,t,o,i,r,l,a=G();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.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==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ee(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ne(){return $||window.sessionStorage.getItem("uid")}function te(){return oe.apply(this,arguments)}function oe(){return(oe=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=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ie(e){return e?String(e):""}window.initialise=function(e){window.sid=ee(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,streamFailures(e),buffering(e),ads(e),ping(e)},window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearInterval(window.ttFirstFrameTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var n,t,o,i=r.getPlayer(),l=null!=i&&i.el_?Math.floor(i.currentTime()):0;window.cleanupTimers(),f(e,X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:l},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:e,videoPosition:l,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,i,r;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),f("PLAY",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",X({"Video ID":Z(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&J<4)J++,f("BUFFERING",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0,window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,f("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,o,i,r,l;f("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),f("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Z()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(J=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(re(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var re=function(e,n,t){return e>=n&&e<=t},le=function(){var e,n=G(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,s,u,c,v,m,p,f,w,I,y,h,E,T,b,S,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return E=e.sent,T=U(E),b=null==T?void 0:T.site,S=null==T?void 0:T.siteId,e.t0=X,e.t1=X,e.t2=X({aid:b,cid:S,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=ne(),e.t5=Z(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?ie(n.adPosition):"",e.next=26,te();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t24=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=le())&&void 0!==m?m:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(w=f.beacon)||void 0===w?void 0:w.params,e.t33=(0,e.t0)(e.t31,e.t32),_=[e.t33],i({url:(null===(I=window)||void 0===I||null===(y=I.customData)||void 0===y||null===(h=y.beacon)||void 0===h?void 0:h.url)||D.get()+g.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ae=function(){var e=z.get();return e>=0?e+1:1},de=function(){var e,n,t,o=q(),i=G(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=z.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function se(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 ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?se(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):se(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var ce=a,ve=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},me=function(e){var n=pe(e,"video.tags",[]),t=pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},pe=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var e,n,t,o,i,l,a,s,u,c,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return D;var L=(null==A?void 0:A.siteName)||(null==A?void 0:A.site)||"",F=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(t=A[F])||void 0===t?void 0:t.metadata)||(null==A||null===(o=A[F])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),k=r.getPlayer(P);if(!D.includes("VIEWLIFT_"))return D;var R,j=window.getComputedStyle(document.getElementById(P),null),V=Math.trunc(j.getPropertyValue("height").slice(0,-2)),W=Math.trunc(j.getPropertyValue("width").slice(0,-2)),x="linearchannel"===F?null==A||null===(l=A.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(s=a.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===s||null===(u=s.content)||void 0===u?void 0:u.id:pe(A,"video.gist.id",""),N="linearchannel"===F?null==A||null===(c=A.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===m?void 0:m.title:pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,U=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){M=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]}));var B=d.get("us_privacy")||d.get("usprivacy"),H=void 0!==B?B:"1YNN",G=null!==(p=null===(f=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===f?void 0:f.fwIdentifier)&&void 0!==p?p:null,q=ue(ue({},ge(C)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ve(W,V),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===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:pe(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(w=k.options_)||void 0===w?void 0:w.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:me(A),VIEWLIFT_MEDIA_ID:x,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:x,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+pe(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:d.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:pe(null===(y=window)||void 0===y||null===(h=y.app_data)||void 0===h||null===(E=h.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":pe(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(S=b.site)||void 0===S?void 0:S.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?ce(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:x,VIEWLIFT_CONTENT_TITLE:N,VIEWLIFT_CONTENT_SERIES_TITLE:pe(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:pe(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:de(),VIEWLIFT_SEASON_NUMBER:ae(),VIEWLIFT_CONTENT_TAGS:me(A),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(_=window)||void 0===_||null===(O=_.customData)||void 0===O?void 0:O.macros);for(var Y in q){var Q=new RegExp(Y,"g");D=D.replace(Q,q[Y])}return D},ge=function(e){var n,t,o,i,r,a,d,s,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var m=(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,p=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return m||p?(l.isMobile()?m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),m?c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=ue(ue({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:pe(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},we=function(e,n){var t,o,i,r,a,d,s,u,c,v,m,p,f,g=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,y=null==e||null===(r=e[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return ye(y);if(w){var T=he(I,n);return T.src=fe(T.src,n,e),T}if("Safari"!==l.detectBrowser()&&E)return Ie(I);if(h){var b=ye(I);return b.src=fe(b.src,n,e),b}if(null!=I&&I.mpeg){var S=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return S.src=fe(S.src,n,e),S}return null},Ie=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},he=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,s=l.detectBrowser();if(r.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 i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return Ee(n),u}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ee(n),v.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==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ee=function(e){var n=r.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==l.detectBrowser()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Te=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 i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},be=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,_e=function(e,n,t){var o=fe(n,e,t),i=r.getPlayer(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==u(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r.getPlayer(e);if(null!==l.el_){Se=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.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})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var Oe,De=(Oe=!0,{enable:function(){Oe=!0},disable:function(){Oe=!1},get enabled(){return Oe}}),Pe="ssai-breakStart",Ae="ssai-adImpression",Le="ssai-firstQuartile",Fe="ssai-midpoint",Ce="ssai-thirdQuartile",ke="ssai-complete",Re="ssai-breakEnd",je={breakStart:Pe,impression:Ae,firstQuartile:Le,midpoint:Fe,thirdQuartile:Ce,complete:ke,breakEnd:Re};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=je[o];i&&t.trigger(i,n)}function We(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 xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?We(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):We(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ne,Me=(Ne={},{get:function(){return Ne},set:function(e){Ne=e}});function Ue(e,n){var t,o,i,l,a,d,s,u,c,v,p,f,g,w,I,y,h,E,T,b,S,_=null==e?void 0:e.playerId,O=r.getPlayer(_);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var D=G(),P=(null==D||null===(o=D.video)||void 0===o?void 0:o.metadata)||[],A=(null==P?void 0:P.length)&&P.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=A)&&void 0!==i&&i.length){var L=A.map(function(e){return e.value});A=null==L?void 0:L.join(",")}m.destroyComscoreTag();var F,C,k,R=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,j=Array.isArray(null==R?void 0:R.category)?null==R||null===(a=R.category)||void 0===a?void 0:a.join(","):(null==R?void 0:R.category)||null,V=xe(xe(xe({},null==D?void 0:D.video),null==D?void 0:D.linearchannel),{},{siteName:(null==e||null===(d=e.comscore)||void 0===d?void 0:d.applicationName)||(null==e||null===(s=e.comscore)||void 0===s||null===(u=s.metadata)||void 0===u?void 0:u.siteName)||(null==D?void 0:D.site)||null,programId:(null==R?void 0:R.videotmsid)||null,programTitle:(null==R?void 0:R.lcProgrammeName)||null,episodeId:(null==R?void 0:R.videotmsid)||null,seasonNumber:(null==D||null===(c=D.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==R||null===(p=R.seriesDetails)||void 0===p?void 0:p.season)||null,episodeNumber:(null==D||null===(f=D.video)||void 0===f||null===(g=f.series)||void 0===g?void 0:g.episodeNumber)||(null==R||null===(w=R.seriesDetails)||void 0===w?void 0:w.episode)||null,episodeTitle:(null==R?void 0:R.lcSubTitle)||null,isCompleteEpisode:!!(null!=D&&null!==(I=D.video)&&void 0!==I&&I.series||null!=R&&null!==(y=R.seriesDetails)&&void 0!==y&&y.episode),genre:A||j,comscoreConfig:{implementationId:(null==e||null===(h=e.comscore)||void 0===h?void 0:h.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),W=null==e||null===(T=e.comscore)||void 0===T||null===(b=T.metadata)||void 0===b?void 0:b.contentType;if(null!=V&&null!==(S=V.streamingInfo)&&void 0!==S&&S.isLiveStream?V.contentType="Live":V.contentType=W||"LongFormOnDemand",null==V||!V.network){var x,N=(null==V?void 0:V.metadata)||[],M=null==N||null===(x=N.find(function(e){return"network"===e.name}))||void 0===x?void 0:x.value;V.network=M||null}null!=V&&V.network&&null!=V&&V.genre&&(V.customGenre="".concat(V.network,"_").concat((null==V?void 0:V.programTitle)||(F=V,null!=F&&F.series?null==F||null===(k=F.series)||void 0===k?void 0:k.title:null==F||null===(C=F.gist)||void 0===C?void 0:C.title),"_").concat(V.genre)),null!=R&&R.airDate&&(V.publishDate=R.airDate),null!=V&&V.runtime&&"function"==typeof O.duration&&(V.runtime=1e3*Math.ceil(O.duration()));var U=m.formulateComscorePayload(V,O);console.log("comscoreOptions player data",U),m.createComscoreStreamingTag(xe({playerName:"Video.js"},U)),m.setComscorePlayerInstance(O)}}function Be(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 He(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Be(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Ge(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 qe(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)?qe(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function qe(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 Ye,Qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),ze=(Ye=null,{set:function(e){Ye=e},get position(){return Ye}});function Ke(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=n(t.mark(function e(n,o){var i,l,a,d,s,u,c,m,p,f,g,w,I,y,h,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.getPlayer(n),a=we(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=$e(u),m=v(c,2),p=m[0],f=m[1],g=Je(f)||{},u=new URL(u.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=v(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(He({adsParams:He({},p)},g))});case 14:return w=e.sent,e.next=17,w.json();case 17:return I=e.sent,y="https://"+new URL(u).hostname,h=I.trackingUrl,E=I.manifestUrl,T=y+h,b=y+E,Qe.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Je(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=v(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function $e(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Ge((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=v(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var m=v(c[u],2),p=m[0],f=m[1];if(p.startsWith("ads."))d[p.replace(/^ads\./,"")]=f;else s[p]=f}return[d,s]}var Ze,en,nn,tn=new Map;function on(e,n){return rn.apply(this,arguments)}function rn(){return rn=n(t.mark(function e(o,i){var l,a,d,s,u,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,i,l,a){var d,s,u=r.getPlayer(o);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<A&&P.clear(),A=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(s=d[i])||void 0===s?void 0:s.adId)||c;Math.floor(u.currentTime());var m,p=Ge(t);try{var f=function(){var t,r,d,s=m.value,c=s.eventType,p=s.beaconUrls,f=s.startTimeInSeconds,g=s.startTime,w=s.durationInSeconds,I=f||0,y=p,h=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(d=r.ads)||void 0===d?void 0:d.adEventHandler)||null,E="".concat(I,"_").concat(c),T=tn.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",c,"condition1:",e>=I,"map:",tn),e>=I&&!T.includes(E)){T.push(E),tn.set("pod-".concat(l),T);try{L(c,n,y,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=ze.position;ze.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),a())},500)}if("function"==typeof h)try{var S,_={eventType:c,startTimeInSeconds:f,startTime:g,durationInSeconds:w,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[i],adIndex:i};h({adsData:_}),Ve(o,_)}catch(e){console.error("Error when calling ads callback:",e)}var O=Me.get();if(O&&0!==Object.keys(O).length){var D=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,F=O.finishComscoreAdTracking,C=O.endComscoreAdTracking,k="".concat(I,"_").concat(v,"_").concat(c);if(!P.has(k))if(P.set(k,!0),"impression"===c){var R,j=Qe.get();A(D(He(He({},null==n||null===(R=n.ads)||void 0===R?void 0:R[i]),{},{trackingUrl:j})))}else"complete"===c?F():"breakEnd"===c&&C()}}};for(p.s();!(m=p.n()).done;)f()}catch(e){p.e(e)}finally{p.f()}}},L=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)})})},D=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},tn.clear(),ze.set(i),f=Qe.get(),(g=r.getPlayer(o)).one("loadeddata",function(){f&&O(f)}),w=new Map,I=new Map,y=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,E=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==g||null===(u=g.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(m=g.el())||void 0===m||null===(p=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,_=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return He(He({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},O=function(){var e=n(t.mark(function e(n){var l,a,d,s,u,v,m,p,f,g,O,P,A,L,C,k,R,j,V,W,x,N,M,U;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&R()},V=function(e){},j=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,w.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!w.has(r)||n>=r&&n<=d)&&(t=r,w.set(r,!0),I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},u=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,p=m.avails,f=[],g=r.getPlayer(o),O=g.controlBar.progressControl,P=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),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?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!u&&i&&(g.currentTime(i),j()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(k=(null===(A=window)||void 0===A||null===(L=A.customData)||void 0===L||null===(C=L.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&k(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=g.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",P.appendChild(r)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=r.throttle(function(){var e=g.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=f[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&w.set(i,!0),De.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var s=e-i,u=0,v=0,m=0;m<l.length;m++){var p,g=null==l||null===(p=l[m])||void 0===p?void 0:p.durationInSeconds;if(s<u+g){v=m;break}u+=g}l[v];var y=Math.max(0,r-s),_=Math.round(y);x.style.display="block",U.textContent="".concat(v+1," of ").concat(l.length," • ").concat(D(_));var P=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});P.push.apply(P,c(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&P.push.apply(P,c(null==t?void 0:t.podSlotImpressionBeacon)),F(e,t,P,v,o,j),"break"}I.delete(i)},o=0;o<f.length;o++){if("break"===t())break}n||(x.style.display="none",O.el().classList.remove("hide-progress-bar"),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),De.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){De.enabled&&"ArrowRight"==e.key&&(R(),gn(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(x=document.createElement("div")).className="ssai-ad-container",(N=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",N.append(M),(U=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",x.append(N),x.append(U),g.el().appendChild(x);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,A=-1;case 21:case"end":return e.stop()}},e)})),rn.apply(this,arguments)}function ln(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 an(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)?an(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function an(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}function dn(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 sn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?dn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):dn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var un={},cn=(null===(Ze=window)||void 0===Ze||null===(en=Ze.location)||void 0===en||null===(nn=en.search)||void 0===nn?void 0:nn.includes("debug=true"))||!1,vn=null;function mn(e){return pn.apply(this,arguments)}function pn(){return pn=n(t.mark(function e(o){var i,l,a,d,s,u,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,i,l){var a,d,s=r.getPlayer(o);if(!s.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||u;Math.floor(s.currentTime());var v,m=ln(t);try{for(m.s();!(v=m.n()).done;){var p,f,g,w=v.value,I=w.eventType,y=w.beaconUrls,h=w.startTimeInSeconds,E=w.startTime,T=w.durationInSeconds,b=(w.eventId,h||u),S=y,_=(null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(g=f.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(I),D="pod-".concat(u);A.has(D)||A.set(D,new Set);var P=A.get(D);if(cn&&console.warn(e,b,"map:",I,"condition1:",e>=b,"map:",A),e>=b&&e<=b+L&&!P.has(O)){P.add(O);try{F(I,n,S,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,I,n)}if("function"==typeof _)try{var C,k={eventType:I,startTimeInSeconds:h,startTime:E,durationInSeconds:T,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[i],adIndex:i};_({adsData:k}),Ve(o,k)}catch(e){console.error("Error when calling ads callback:",e)}var R=Me.get();if(R&&0!==Object.keys(R).length){var j=R.formulateComscoreAdPayload,V=R.startComscoreAdTracking,W=R.finishComscoreAdTracking,x=R.endComscoreAdTracking;if("impression"===I){var N,M=Qe.get();V(j(sn(sn({},null==n||null===(N=n.ads)||void 0===N?void 0:N[i]),{},{trackingUrl:M})))}else"complete"===I?W():"breakEnd"===I&&x()}}}}catch(e){m.e(e)}finally{m.f()}}},F=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=un)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=un)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(cn&&console.warn("%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)})}))},g=function(){vn&&clearInterval(vn)},p=Qe.get(),(f=r.getPlayer(o)).one("loadeddata",function(){g(),vn=setInterval(function(){p&&!f.paused()&&P(p)},2e3)}),f.on("dispose",function(){g()}),w=new Map,I=new Map,y=-1,h=null,E=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==f||null===(s=f.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,_=(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=!1,D=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return sn(sn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},P=function(){var e=n(t.mark(function e(n){var i,l,a,d,s,u,v,m,p,f;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,v=[],m=r.getPlayer(o),p=m.controlBar.progressControl,f=p.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.map(function(e,n){v.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:D(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),cn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",f.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=r.throttle(function(){var e=m.currentTime();if(e!==y){y=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;O=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&w.set(o,!0),De.disable(),E&&E.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,m=0;m<r.length;m++){var f,g=null==r||null===(f=r[m])||void 0===f?void 0:f.durationInSeconds;if(d<s+g){u=m;break}s+=g}setTimeout(function(){un.totalAds=null==r?void 0:r.length,un.currentAdIndex=u},1e3);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,c(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&y.push.apply(y,c(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,y,u),"break"}I.delete(o)},t=0;t<v.length;t++){if("break"===n())break}O||(un={},p.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),De.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),A=new Map,L=2.5;case 22:case"end":return e.stop()}},e)})),pn.apply(this,arguments)}function fn(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 gn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},wn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},In=function(e){return!!o.getPlayer("".concat(e))},yn=function(){var e=n(t.mark(function e(o,i){var l,a,d,s=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,M();case 3:return a=e.sent,d=r.getPlayer(o),e.abrupt("return",new Promise(function(e,r){b(i,a).then(function(){var r=n(t.mark(function n(r){var a,s,u,c,v,m,p,f;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=ee(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,p=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,f=we(m,o),!p){n.next=11;break}return n.next=9,Ke(o,m);case 9:f=n.sent,l=!0;case 11:H(m),f&&l?(Tn(o,f),p&&mn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(Me.get()&&0!==Object.keys(Me.get()).length&&Ue({playerId:o,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){r({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)}}(),hn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,c,v,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return c=e.sent,(q()||null)&&Q(i),v=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&_(i,c).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),v=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){T(i,c).then(function(){var i=n(t.mark(function n(i){var a,d,u,c,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F,C,k,R,j,V,W,x,N,M,U,B,G,q,Y,Q,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==i?void 0:i.data,D=(null==O?void 0:O.contentType)||"video",P=(null==O||null===(a=O[D])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(f=c.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,A=(null==O||null===(g=O.video)||void 0===g||null===(w=g.streamingInfo)||void 0===w?void 0:w.isLiveStream)||!1,H(i.data),(L=(null==O||null===(I=O.ads)||void 0===I||null===(y=I.preRoll)||void 0===y||null===(h=y.adTags)||void 0===h||null===(E=h.web)||void 0===E?void 0:E.active)&&(null==O||null===(T=O.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(S=b.adTags)||void 0===S||null===(_=S.web)||void 0===_?void 0:_.url))&&_e(o,L,O),F=we(O,o),!P){n.next=12;break}return n.next=11,Ke(o,O);case 11:F=n.sent;case 12:F?(B=(null==O||null===(C=O.video)||void 0===C||null===(k=C.gist)||void 0===k?void 0:k.videoImageUrl)||(null==O||null===(R=O.video)||void 0===R||null===(j=R.gist)||void 0===j||null===(V=j.imageGist)||void 0===V?void 0:V.r16x9),(G=r.getPlayer(o)).poster(B),Tn(o,F),P&&on(o,p),G.on("loadstart",function(){A&&e({status:!0,msg:"Video Loaded",response:O})}),G.on("loadeddata",function(){be(),e({status:!0,msg:"Video Loaded",response:O})}),G.one("play",function(){v&&!P&&m<95&&setTimeout(function(){G.currentTime(v)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==O||null===(W=O.video)||void 0===W||null===(x=W.contentDetails)||void 0===x||null===(N=x.closedCaptions)||void 0===N?void 0:N.length)>0||(null==O||null===(M=O.video)||void 0===M||null===(U=M.closedCaptions)||void 0===U?void 0:U.length)>0?(K=(null==O||null===(Y=O.video)||void 0===Y||null===(Q=Y.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),s.addCaptions(o,q)):s.removeCaptions(o)):(Te(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){bn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),En=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()},Tn=function(e,n){var t=r.getPlayer(e);t&&t.src(n)},bn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);In(t)&&Te(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):fn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))};exports.authenticateLC=yn,exports.baseUrlManager=D,exports.clearError=be,exports.comscoreInstanceManager=Me,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,n){R.set(e.id,n)})},exports.createSeriesWatchMap=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),j=t}).catch(function(e){return console.log(e)})},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 i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var n=r.getPlayer(e),t=(Me.get()||{}).destroyComscoreTag;if(En(),t&&t(),r.clearEventListeners(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getCurrentSeries=q,exports.getCurrentVideo=G,exports.getDecodedToken=U,exports.getEntitlementData=function(e,n,t,o){var r,l;return i({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,adbTempToken:null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=de,exports.getLinearChannelDetails=b,exports.getSGAIEnabledSource=Ke,exports.getSeasonNumber=ae,exports.getSeriesDetails=function(e,n){var t,o,r=U(n),l=(null==r?void 0:r.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})}):i({url:D.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return j},exports.getSource=we,exports.getSsaiEvents=function(e){var n=r.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(Pe,e)},adImpression:function(e){return t(Ae,e)},adFirstQuartile:function(e){return t(Le,e)},adMidpoint:function(e){return t(Fe,e)},adThirdQuartile:function(e){return t(Ce,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(Re,e)}}},exports.getToken=M,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 i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},exports.getUserId=ne,exports.getVideoDetails=T,exports.getVideoIdx=function(){return k},exports.getVideoInfo=_,exports.handleError=Te,exports.initialiseAdvertisement=_e,exports.initialiseComscoreStreamingTracking=Ue,exports.initialiseKeyboardEvents=function(e,n){var t,o,i,l=r.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,s,u,c,v,m,p;if(De.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=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==d||d.focus()),f){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.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||wn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.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||gn(e,10)}}},!0)},exports.initiateErrorHandling=bn,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&($=n.userId);var t=r.getPlayer(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=In,exports.isTokenExpired=P,exports.load=hn,exports.loadVideo=Tn,exports.loadVideoInstantly=function(e,n,t){var o=r.getPlayer(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=L,exports.rewind=wn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=S,exports.seasonIdxManager=z,exports.setCurrentSeries=function(e){F=e},exports.setCurrentVideo=H,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=Y,exports.setVideoIdxById=Q,exports.setupAdvertisementMarkers=on,exports.setupAdvertisementMarkersForLinear=mn,exports.skip=gn,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.trackMap=tn,exports.videoReplayTracker=B;
|
|
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"),i=require("axios"),r=require("./skin-c97f0eea.js"),l=require("./browser-77c57718.js"),a=require("md5"),d=require("js-cookie"),s=require("./captions-80f6eb66.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),m=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e,n){p("event",e,n)}var g={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 w(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 I(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?w(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):w(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var y={name:"@viewlift/player",version:"2.1.38",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^1.0.13",axios:"^1.2.3",md5:"^2.3.0",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"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=y.version;var h,E=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":D.get()+"".concat(null==g?void 0:g.getVideoDetails)},T=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:E(),params:I({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":y.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},b=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:D.get()+g.getLinearChannelDetails,params:I(I(I(I(I({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},(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===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},S=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",i({url:D.get()+"".concat(null==g?void 0:g.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:I({},n),params:I({},(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)}}(),_=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getVideoInfoV2,"/").concat(r,"/").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})},O=function(e){var n=e.videoId;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},D=(h=null==g?void 0:g.apiBaseUrl,{set:function(e){e&&(h=e)},get:function(){return h}}),P=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},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var F,C,k,R,j,V,W,x=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),o=D.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),N=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"))||!P(n)){e.next=6;break}return N||(N=x().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&L().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){N=null})),e.abrupt("return",N);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),U=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},B=(V=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;V.set(t,(V.get(t)||0)+1)},get:function(e){return V.get(e)},clear:function(){V.clear()}}),H=function(e){C=e},G=function(){return C},q=function(){return F},Y=function(e){k=e},Q=function(e){if(R){var n=R.get(e);Y(n+1)}},z=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}});function K(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 X(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var J=0,$=null,Z=function(){var e,n,t,o,i,r,l,a=G();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.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==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ee(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ne(){return $||window.sessionStorage.getItem("uid")}function te(){return oe.apply(this,arguments)}function oe(){return(oe=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=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ie(e){return e?String(e):""}window.initialise=function(e){window.sid=ee(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,streamFailures(e),buffering(e),ads(e),ping(e)},window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearInterval(window.ttFirstFrameTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var n,t,o,i=r.getPlayer(),l=null!=i&&i.el_?Math.floor(i.currentTime()):0;window.cleanupTimers(),f(e,X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:l},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:e,videoPosition:l,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,i,r;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),f("PLAY",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",X({"Video ID":Z(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&J<4)J++,f("BUFFERING",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0,window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,f("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,o,i,r,l;f("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),f("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Z()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(J=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(re(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var re=function(e,n,t){return e>=n&&e<=t},le=function(){var e,n=G(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,s,u,c,v,m,p,f,w,I,y,h,E,T,b,S,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return E=e.sent,T=U(E),b=null==T?void 0:T.site,S=null==T?void 0:T.siteId,e.t0=X,e.t1=X,e.t2=X({aid:b,cid:S,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=ne(),e.t5=Z(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?ie(n.adPosition):"",e.next=26,te();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t24=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=le())&&void 0!==m?m:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(w=f.beacon)||void 0===w?void 0:w.params,e.t33=(0,e.t0)(e.t31,e.t32),_=[e.t33],i({url:(null===(I=window)||void 0===I||null===(y=I.customData)||void 0===y||null===(h=y.beacon)||void 0===h?void 0:h.url)||D.get()+g.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ae=function(){var e=z.get();return e>=0?e+1:1},de=function(){var e,n,t,o=q(),i=G(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=z.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function se(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 ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?se(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):se(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var ce=a,ve=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},me=function(e){var n=pe(e,"video.tags",[]),t=pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},pe=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var e,n,t,o,i,l,a,s,u,c,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return D;var L=(null==A?void 0:A.siteName)||(null==A?void 0:A.site)||"",F=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(t=A[F])||void 0===t?void 0:t.metadata)||(null==A||null===(o=A[F])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),k=r.getPlayer(P);if(!D.includes("VIEWLIFT_"))return D;var R,j=window.getComputedStyle(document.getElementById(P),null),V=Math.trunc(j.getPropertyValue("height").slice(0,-2)),W=Math.trunc(j.getPropertyValue("width").slice(0,-2)),x="linearchannel"===F?null==A||null===(l=A.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(s=a.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===s||null===(u=s.content)||void 0===u?void 0:u.id:pe(A,"video.gist.id",""),N="linearchannel"===F?null==A||null===(c=A.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===m?void 0:m.title:pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,U=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){M=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]}));var B=d.get("us_privacy")||d.get("usprivacy"),H=void 0!==B?B:"1YNN",G=null!==(p=null===(f=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===f?void 0:f.fwIdentifier)&&void 0!==p?p:null,q=ue(ue({},ge(C)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ve(W,V),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===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:pe(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(w=k.options_)||void 0===w?void 0:w.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:me(A),VIEWLIFT_MEDIA_ID:x,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:x,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+pe(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:d.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:pe(null===(y=window)||void 0===y||null===(h=y.app_data)||void 0===h||null===(E=h.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":pe(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(S=b.site)||void 0===S?void 0:S.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?ce(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:x,VIEWLIFT_CONTENT_TITLE:N,VIEWLIFT_CONTENT_SERIES_TITLE:pe(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:pe(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:de(),VIEWLIFT_SEASON_NUMBER:ae(),VIEWLIFT_CONTENT_TAGS:me(A),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(_=window)||void 0===_||null===(O=_.customData)||void 0===O?void 0:O.macros);for(var Y in q){var Q=new RegExp(Y,"g");D=D.replace(Q,q[Y])}return D},ge=function(e){var n,t,o,i,r,a,d,s,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var m=(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,p=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return m||p?(l.isMobile()?m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),m?c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=ue(ue({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:pe(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},we=function(e,n){var t,o,i,r,a,d,s,u,c,v,m,p,f,g=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,y=null==e||null===(r=e[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return ye(y);if(w){var T=he(I,n);return T.src=fe(T.src,n,e),T}if("Safari"!==l.detectBrowser()&&E)return Ie(I);if(h){var b=ye(I);return b.src=fe(b.src,n,e),b}if(null!=I&&I.mpeg){var S=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return S.src=fe(S.src,n,e),S}return null},Ie=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},he=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,s=l.detectBrowser();if(r.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 i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return Ee(n),u}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ee(n),v.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==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ee=function(e){var n=r.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==l.detectBrowser()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Te=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 i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},be=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,_e=function(e,n,t){var o=fe(n,e,t),i=r.getPlayer(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==u(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r.getPlayer(e);if(null!==l.el_){Se=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.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})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var Oe,De=(Oe=!0,{enable:function(){Oe=!0},disable:function(){Oe=!1},get enabled(){return Oe}}),Pe="ssai-breakStart",Ae="ssai-adImpression",Le="ssai-firstQuartile",Fe="ssai-midpoint",Ce="ssai-thirdQuartile",ke="ssai-complete",Re="ssai-breakEnd",je={breakStart:Pe,impression:Ae,firstQuartile:Le,midpoint:Fe,thirdQuartile:Ce,complete:ke,breakEnd:Re};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=je[o];i&&t.trigger(i,n)}function We(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 xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?We(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):We(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ne,Me=(Ne={},{get:function(){return Ne},set:function(e){Ne=e}});function Ue(e,n){var t,o,i,l,a,d,s,u,c,v,p,f,g,w,I,y,h,E,T,b,S,_=null==e?void 0:e.playerId,O=r.getPlayer(_);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var D=G(),P=(null==D||null===(o=D.video)||void 0===o?void 0:o.metadata)||[],A=(null==P?void 0:P.length)&&P.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=A)&&void 0!==i&&i.length){var L=A.map(function(e){return e.value});A=null==L?void 0:L.join(",")}m.destroyComscoreTag();var F,C,k,R=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,j=Array.isArray(null==R?void 0:R.category)?null==R||null===(a=R.category)||void 0===a?void 0:a.join(","):(null==R?void 0:R.category)||null,V=xe(xe(xe({},null==D?void 0:D.video),null==D?void 0:D.linearchannel),{},{siteName:(null==e||null===(d=e.comscore)||void 0===d?void 0:d.applicationName)||(null==e||null===(s=e.comscore)||void 0===s||null===(u=s.metadata)||void 0===u?void 0:u.siteName)||(null==D?void 0:D.site)||null,programId:(null==R?void 0:R.videotmsid)||null,programTitle:(null==R?void 0:R.lcProgrammeName)||null,episodeId:(null==R?void 0:R.videotmsid)||null,seasonNumber:(null==D||null===(c=D.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==R||null===(p=R.seriesDetails)||void 0===p?void 0:p.season)||null,episodeNumber:(null==D||null===(f=D.video)||void 0===f||null===(g=f.series)||void 0===g?void 0:g.episodeNumber)||(null==R||null===(w=R.seriesDetails)||void 0===w?void 0:w.episode)||null,episodeTitle:(null==R?void 0:R.lcSubTitle)||null,isCompleteEpisode:!!(null!=D&&null!==(I=D.video)&&void 0!==I&&I.series||null!=R&&null!==(y=R.seriesDetails)&&void 0!==y&&y.episode),genre:A||j,comscoreConfig:{implementationId:(null==e||null===(h=e.comscore)||void 0===h?void 0:h.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),W=null==e||null===(T=e.comscore)||void 0===T||null===(b=T.metadata)||void 0===b?void 0:b.contentType;if(null!=V&&null!==(S=V.streamingInfo)&&void 0!==S&&S.isLiveStream?V.contentType="Live":V.contentType=W||"LongFormOnDemand",null==V||!V.network){var x,N=(null==V?void 0:V.metadata)||[],M=null==N||null===(x=N.find(function(e){return"network"===e.name}))||void 0===x?void 0:x.value;V.network=M||null}null!=V&&V.network&&null!=V&&V.genre&&(V.customGenre="".concat(V.network,"_").concat((null==V?void 0:V.programTitle)||(F=V,null!=F&&F.series?null==F||null===(k=F.series)||void 0===k?void 0:k.title:null==F||null===(C=F.gist)||void 0===C?void 0:C.title),"_").concat(V.genre)),null!=R&&R.airDate&&(V.publishDate=R.airDate),null!=V&&V.runtime&&"function"==typeof O.duration&&(V.runtime=1e3*Math.ceil(O.duration()));var U=m.formulateComscorePayload(V,O);console.log("comscoreOptions player data",U),m.createComscoreStreamingTag(xe({playerName:"Video.js"},U)),m.setComscorePlayerInstance(O)}}function Be(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 He(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Be(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Ge(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 qe(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)?qe(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function qe(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 Ye,Qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),ze=(Ye=null,{set:function(e){Ye=e},get position(){return Ye}});function Ke(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=n(t.mark(function e(n,o){var i,l,a,d,s,u,c,m,p,f,g,w,I,y,h,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.getPlayer(n),a=we(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=$e(u),m=v(c,2),p=m[0],f=m[1],g=Je(f)||{},u=new URL(u.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=v(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(He({adsParams:He({},p)},g))});case 14:return w=e.sent,e.next=17,w.json();case 17:return I=e.sent,y="https://"+new URL(u).hostname,h=I.trackingUrl,E=I.manifestUrl,T=y+h,b=y+E,Qe.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Je(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=v(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function $e(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Ge((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=v(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var m=v(c[u],2),p=m[0],f=m[1];if(p.startsWith("ads."))d[p.replace(/^ads\./,"")]=f;else s[p]=f}return[d,s]}var Ze,en,nn,tn=new Map;function on(e,n){return rn.apply(this,arguments)}function rn(){return rn=n(t.mark(function e(o,i){var l,a,d,s,u,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,i,l,a){var d,s,u=r.getPlayer(o);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<A&&P.clear(),A=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(s=d[i])||void 0===s?void 0:s.adId)||c;Math.floor(u.currentTime());var m,p=Ge(t);try{var f=function(){var t,r,d,s=m.value,c=s.eventType,p=s.beaconUrls,f=s.startTimeInSeconds,g=s.startTime,w=s.durationInSeconds,I=f||0,y=p,h=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(d=r.ads)||void 0===d?void 0:d.adEventHandler)||null,E="".concat(I,"_").concat(c),T=tn.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",c,"condition1:",e>=I,"map:",tn),e>=I&&!T.includes(E)){T.push(E),tn.set("pod-".concat(l),T);try{L(c,n,y,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=ze.position;ze.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),a())},500)}if("function"==typeof h)try{var S,_={eventType:c,startTimeInSeconds:f,startTime:g,durationInSeconds:w,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[i],adIndex:i};h({adsData:_}),Ve(o,_)}catch(e){console.error("Error when calling ads callback:",e)}var O=Me.get();if(O&&0!==Object.keys(O).length){var D=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,F=O.finishComscoreAdTracking,C=O.endComscoreAdTracking,k="".concat(I,"_").concat(v,"_").concat(c);if(!P.has(k))if(P.set(k,!0),"impression"===c){var R,j=Qe.get();A(D(He(He({},null==n||null===(R=n.ads)||void 0===R?void 0:R[i]),{},{trackingUrl:j})))}else"complete"===c?F():"breakEnd"===c&&C()}}};for(p.s();!(m=p.n()).done;)f()}catch(e){p.e(e)}finally{p.f()}}},L=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)})})},D=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},tn.clear(),ze.set(i),f=Qe.get(),(g=r.getPlayer(o)).one("loadeddata",function(){f&&O(f)}),w=new Map,I=new Map,y=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,E=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==g||null===(u=g.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(m=g.el())||void 0===m||null===(p=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,_=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return He(He({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},O=function(){var e=n(t.mark(function e(n){var l,a,d,s,u,v,m,p,f,g,O,P,A,L,C,k,R,j,V,W,x,N,M,U;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&R()},V=function(e){},j=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,w.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!w.has(r)||n>=r&&n<=d)&&(t=r,w.set(r,!0),I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},u=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,p=m.avails,f=[],g=r.getPlayer(o),O=g.controlBar.progressControl,P=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),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?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!u&&i&&(g.currentTime(i),j()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(k=(null===(A=window)||void 0===A||null===(L=A.customData)||void 0===L||null===(C=L.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&k(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=g.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",P.appendChild(r)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=r.throttle(function(){var e=g.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=f[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&w.set(i,!0),De.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var s=e-i,u=0,v=0,m=0;m<l.length;m++){var p,g=null==l||null===(p=l[m])||void 0===p?void 0:p.durationInSeconds;if(s<u+g){v=m;break}u+=g}l[v];var y=Math.max(0,r-s),_=Math.round(y);x.style.display="block",U.textContent="".concat(v+1," of ").concat(l.length," • ").concat(D(_));var P=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});P.push.apply(P,c(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&P.push.apply(P,c(null==t?void 0:t.podSlotImpressionBeacon)),F(e,t,P,v,o,j),"break"}I.delete(i)},o=0;o<f.length;o++){if("break"===t())break}n||(x.style.display="none",O.el().classList.remove("hide-progress-bar"),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),De.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){De.enabled&&"ArrowRight"==e.key&&(R(),gn(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(x=document.createElement("div")).className="ssai-ad-container",(N=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",N.append(M),(U=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",x.append(N),x.append(U),g.el().appendChild(x);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,A=-1;case 21:case"end":return e.stop()}},e)})),rn.apply(this,arguments)}function ln(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 an(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)?an(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}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,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function an(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}function dn(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 sn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?dn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):dn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var un={},cn=(null===(Ze=window)||void 0===Ze||null===(en=Ze.location)||void 0===en||null===(nn=en.search)||void 0===nn?void 0:nn.includes("debug=true"))||!1,vn=null;function mn(e){return pn.apply(this,arguments)}function pn(){return pn=n(t.mark(function e(o){var i,l,a,d,s,u,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,i,l){var a,d,s=r.getPlayer(o);if(!s.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||u;Math.floor(s.currentTime());var v,m=ln(t);try{for(m.s();!(v=m.n()).done;){var p,f,g,w=v.value,I=w.eventType,y=w.beaconUrls,h=w.startTimeInSeconds,E=w.startTime,T=w.durationInSeconds,b=(w.eventId,h||u),S=y,_=(null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(g=f.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(I),D="pod-".concat(u);A.has(D)||A.set(D,new Set);var P=A.get(D);if(cn&&console.warn(e,b,"map:",I,"condition1:",e>=b,"map:",A),e>=b&&e<=b+L&&!P.has(O)){P.add(O);try{F(I,n,S,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,I,n)}if("function"==typeof _)try{var C,k={eventType:I,startTimeInSeconds:h,startTime:E,durationInSeconds:T,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[i],adIndex:i};_({adsData:k}),Ve(o,k)}catch(e){console.error("Error when calling ads callback:",e)}var R=Me.get();if(R&&0!==Object.keys(R).length){var j=R.formulateComscoreAdPayload,V=R.startComscoreAdTracking,W=R.finishComscoreAdTracking,x=R.endComscoreAdTracking;if("impression"===I){var N,M=Qe.get();V(j(sn(sn({},null==n||null===(N=n.ads)||void 0===N?void 0:N[i]),{},{trackingUrl:M})))}else"complete"===I?W():"breakEnd"===I&&x()}}}}catch(e){m.e(e)}finally{m.f()}}},F=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=un)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=un)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(cn&&console.warn("%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)})}))},g=function(){vn&&clearInterval(vn)},p=Qe.get(),(f=r.getPlayer(o)).one("loadeddata",function(){g(),vn=setInterval(function(){p&&!f.paused()&&P(p)},2e3)}),f.on("dispose",function(){g()}),w=new Map,I=new Map,y=-1,h=null,E=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==f||null===(s=f.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,_=(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=!1,D=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return sn(sn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},P=function(){var e=n(t.mark(function e(n){var i,l,a,d,s,u,v,m,p,f;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,v=[],m=r.getPlayer(o),p=m.controlBar.progressControl,f=p.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.map(function(e,n){v.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:D(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),cn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",f.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=r.throttle(function(){var e=m.currentTime();if(e!==y){y=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;O=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&w.set(o,!0),De.disable(),E&&E.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,m=0;m<r.length;m++){var f,g=null==r||null===(f=r[m])||void 0===f?void 0:f.durationInSeconds;if(d<s+g){u=m;break}s+=g}setTimeout(function(){un.totalAds=null==r?void 0:r.length,un.currentAdIndex=u},1e3);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,c(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&y.push.apply(y,c(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,y,u),"break"}I.delete(o)},t=0;t<v.length;t++){if("break"===n())break}O||(un={},p.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),De.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),A=new Map,L=2.5;case 22:case"end":return e.stop()}},e)})),pn.apply(this,arguments)}function fn(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 gn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},wn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},In=function(e){return!!o.getPlayer("".concat(e))},yn=function(){var e=n(t.mark(function e(o,i){var l,a,d,s=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,M();case 3:return a=e.sent,d=r.getPlayer(o),e.abrupt("return",new Promise(function(e,r){b(i,a).then(function(){var r=n(t.mark(function n(r){var a,s,u,c,v,m,p,f;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=ee(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,p=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,f=we(m,o),!p){n.next=11;break}return n.next=9,Ke(o,m);case 9:f=n.sent,l=!0;case 11:H(m),f&&l?(Tn(o,f),p&&mn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(Me.get()&&0!==Object.keys(Me.get()).length&&Ue({playerId:o,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){r({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)}}(),hn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,c,v,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return c=e.sent,(q()||null)&&Q(i),v=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&_(i,c).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),v=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){T(i,c).then(function(){var i=n(t.mark(function n(i){var a,d,u,c,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F,C,k,R,j,V,W,x,N,M,U,B,G,q,Y,Q,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==i?void 0:i.data,D=(null==O?void 0:O.contentType)||"video",P=(null==O||null===(a=O[D])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(f=c.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,A=(null==O||null===(g=O.video)||void 0===g||null===(w=g.streamingInfo)||void 0===w?void 0:w.isLiveStream)||!1,H(i.data),(L=(null==O||null===(I=O.ads)||void 0===I||null===(y=I.preRoll)||void 0===y||null===(h=y.adTags)||void 0===h||null===(E=h.web)||void 0===E?void 0:E.active)&&(null==O||null===(T=O.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(S=b.adTags)||void 0===S||null===(_=S.web)||void 0===_?void 0:_.url))&&_e(o,L,O),F=we(O,o),!P){n.next=12;break}return n.next=11,Ke(o,O);case 11:F=n.sent;case 12:F?(B=(null==O||null===(C=O.video)||void 0===C||null===(k=C.gist)||void 0===k?void 0:k.videoImageUrl)||(null==O||null===(R=O.video)||void 0===R||null===(j=R.gist)||void 0===j||null===(V=j.imageGist)||void 0===V?void 0:V.r16x9),(G=r.getPlayer(o)).poster(B),Tn(o,F),P&&on(o,p),G.on("loadstart",function(){A&&e({status:!0,msg:"Video Loaded",response:O})}),G.on("loadeddata",function(){be(),e({status:!0,msg:"Video Loaded",response:O})}),G.one("play",function(){v&&!P&&m<95&&setTimeout(function(){G.currentTime(v)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==O||null===(W=O.video)||void 0===W||null===(x=W.contentDetails)||void 0===x||null===(N=x.closedCaptions)||void 0===N?void 0:N.length)>0||(null==O||null===(M=O.video)||void 0===M||null===(U=M.closedCaptions)||void 0===U?void 0:U.length)>0?(K=(null==O||null===(Y=O.video)||void 0===Y||null===(Q=Y.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),s.addCaptions(o,q)):s.removeCaptions(o)):(Te(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){bn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),En=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()},Tn=function(e,n){var t=r.getPlayer(e);t&&t.src(n)},bn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);In(t)&&Te(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):fn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))};exports.authenticateLC=yn,exports.baseUrlManager=D,exports.clearError=be,exports.comscoreInstanceManager=Me,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,n){R.set(e.id,n)})},exports.createSeriesWatchMap=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),j=t}).catch(function(e){return console.log(e)})},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 i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var n=r.getPlayer(e),t=(Me.get()||{}).destroyComscoreTag;if(En(),t&&t(),r.clearEventListeners(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getCurrentSeries=q,exports.getCurrentVideo=G,exports.getDecodedToken=U,exports.getEntitlementData=function(e,n,t,o){var r,l;return i({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,adbTempToken:null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=de,exports.getLinearChannelDetails=b,exports.getSGAIEnabledSource=Ke,exports.getSeasonNumber=ae,exports.getSeriesDetails=function(e,n){var t,o,r=U(n),l=(null==r?void 0:r.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})}):i({url:D.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return j},exports.getSource=we,exports.getSsaiEvents=function(e){var n=r.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(Pe,e)},adImpression:function(e){return t(Ae,e)},adFirstQuartile:function(e){return t(Le,e)},adMidpoint:function(e){return t(Fe,e)},adThirdQuartile:function(e){return t(Ce,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(Re,e)}}},exports.getToken=M,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 i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},exports.getUserId=ne,exports.getVideoDetails=T,exports.getVideoIdx=function(){return k},exports.getVideoInfo=_,exports.handleError=Te,exports.initialiseAdvertisement=_e,exports.initialiseComscoreStreamingTracking=Ue,exports.initialiseKeyboardEvents=function(e,n){var t,o,i,l=r.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,s,u,c,v,m,p;if(De.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=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==d||d.focus()),f){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.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||wn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.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||gn(e,10)}}},!0)},exports.initiateErrorHandling=bn,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&($=n.userId);var t=r.getPlayer(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=In,exports.isTokenExpired=P,exports.load=hn,exports.loadVideo=Tn,exports.loadVideoInstantly=function(e,n,t){var o=r.getPlayer(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=L,exports.rewind=wn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=S,exports.seasonIdxManager=z,exports.setCurrentSeries=function(e){F=e},exports.setCurrentVideo=H,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=Y,exports.setVideoIdxById=Q,exports.setupAdvertisementMarkers=on,exports.setupAdvertisementMarkersForLinear=mn,exports.skip=gn,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.trackMap=tn,exports.videoReplayTracker=B;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,t,n,o,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-c97f0eea.js"),a=require("./generic-
|
|
1
|
+
"use strict";var e,t,n,o,i=require("@babel/runtime/helpers/toConsumableArray"),l=require("./skin-c97f0eea.js"),a=require("./generic-ae574c9a.js"),r=require("./autoNextVideo-0de0c99f.js"),d=require("./icons-eb807ef0.js"),s=require("@babel/runtime/helpers/typeof"),u=require("video.js"),c=[],v=!1,m=function(e,t){var n=l.getPlayer(e),o=Math.floor(n.currentTime());if(Math.floor(n.duration())!=o){n.pause(e);var i=a.getVideoIdx();r.switchToNext(i,e,c)}};e={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},t=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},n=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},o=function e(t){return"HTML"!==t.nodeName&&"static"===n(t)("position")?e(t.offsetParent):t},u.registerPlugin("thumbnails",function(i){var l,a,r,d,s,u,c,v;function m(){document.removeEventListener("pointermove",c),document.removeEventListener("pointerup",m),v()}a=t({},e,i),d=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=d.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(l=document.createElement("div")).className="vjs-thumbnail-holder",r=document.createElement("img"),l.appendChild(r),r.src=a[0].src,r.className="vjs-thumbnail",t(r.style,a[0].style),r.style.left||r.style.right||(r.onload=function(){r.style.left=-r.naturalWidth/2+"px"}),u=d.duration(),d.on("durationchange",function(e){u=d.duration()}),d.on("loadedmetadata",function(e){u=d.duration()}),(s=d.controlBar.progressControl).el().appendChild(l),c=function(e){var i,d,c,v,m,p,f,g,h,y;for(d in c=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=o(s.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),v=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,v-=o(s.el()).getBoundingClientRect().left+h,i=Math.floor((v-s.el().offsetLeft)/s.width()*u),a)i>d&&(c=Math.max(c,d));(m=a[c]).src&&r.src!=m.src&&(r.src=m.src),m.style&&r.style!=m.style&&t(r.style,m.style),v+(g=function(e,t){var o;return t?parseFloat(t):"auto"!==(o=n(e)("clip"))&&"inherit"!==o&&4===(o=o.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(o[1])-parseFloat(o[3]):0}(r,m.width||a[0].width)/2)>f?v-=v+g-f:v<g&&(v=g),l.style.left=v+"px"},s.on("mousemove",c),s.on("touchmove",c),s.on("pointerdown",function(e){document.addEventListener("pointermove",c),document.addEventListener("pointerup",m)}),v=function(e){l.style.left="-1000px"},s.on("mouseout",v),s.on("touchcancel",v),s.on("touchend",v),d.on("userinactive",v)}),exports.addNextEpPreview=function(e,t){var n;if(v=!1,null!=t&&null!==(n=t.series)&&void 0!==n&&n.enable){var o;c=[];var r=a.getCurrentSeries();null==r||r.map(function(e){var t;return(t=c).push.apply(t,i(e.episodes))}),null==t||null===(o=t.series)||void 0===o||o.cb}else{var s,u;c=(null==t||null===(s=t.relatedVideos)||void 0===s?void 0:s.content)||[],null==t||null===(u=t.relatedVideos)||void 0===u||u.cb}var p=l.getPlayer(e);p.on("timeupdate",function(){var e,t;if(!v){var n=Math.floor(p.currentTime()),o=p.duration(),i=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&a.getVideoIdx()<=(null===(t=c)||void 0===t?void 0:t.length)-1?i&&(i.style.visibility="visible"):i&&(i.style.visibility="hidden")}});var f,g=c.filter(function(e,t){return t==a.getVideoIdx()});if((null==g?void 0:g.length)>0)if(null!==(f=document.getElementsByClassName("next-ep-preview"))&&void 0!==f&&f[0]){var h,y,x,A,w,E,C,b,N,B,L,P;(null===(h=document.getElementsByClassName("next-ep-preview"))||void 0===h?void 0:h[0]).style.visibility="hidden";var I=null===(y=document.getElementsByClassName("next-ep-title"))||void 0===y?void 0:y[0],j=null===(x=document.getElementsByClassName("next-ep-img"))||void 0===x?void 0:x[0],k=null===(A=document.getElementsByClassName("next-ep-content"))||void 0===A?void 0:A[0],T=null===(w=g[0])||void 0===w?void 0:w.title;(null===(E=T)||void 0===E?void 0:E.length)>60&&(T=T.substr(0,60)+"..."),I.textContent="".concat(T),j.src=(null===(C=g[0])||void 0===C||null===(b=C.gist)||void 0===b||null===(N=b.imageGist)||void 0===N?void 0:N.r16x9)||(null==g||null===(B=g[0])||void 0===B?void 0:B.img)||(null===(L=window)||void 0===L||null===(P=L.customData)||void 0===P?void 0:P.fallbackImage),k.onclick=function(){return m(e)}}else{var q,O,S,V,M,F,X,R,D=document.createElement("div");D.className="next-ep-preview",D.style.visibility="hidden",document.getElementById(e).append(D);var G=document.createElement("div");G.className="next-heading-wrapper";var H=document.createElement("div");H.className="next-ep-header",H.textContent="Next up";var Q=document.createElement("div");Q.className="next-ep-close",Q.onclick=function(){D.style.visibility="hidden",v=!0},Q.appendChild(l.parseSvgString(d.crossIconSvg())),G.append(H),G.append(Q);var U=null===(q=g[0])||void 0===q?void 0:q.title,W=document.createElement("img");W.className="next-ep-img",W.src=(null===(O=g[0])||void 0===O||null===(S=O.gist)||void 0===S||null===(V=S.imageGist)||void 0===V?void 0:V.r16x9)||(null==g||null===(M=g[0])||void 0===M?void 0:M.img)||(null===(F=window)||void 0===F||null===(X=F.customData)||void 0===X?void 0:X.fallbackImage);var Y=document.createElement("div");Y.className="next-ep-title",(null===(R=U)||void 0===R?void 0:R.length)>60&&(U=U.substr(0,60)+"..."),Y.textContent="".concat(U);var _=document.createElement("div");_.className="next-ep-content",_.append(W),_.append(Y),_.onclick=l.debounce(function(){null==D||D.remove(),v=!0,m(e)},400),D.append(G),D.append(_)}},exports.addTVProviderImage=function(e,t){var n=l.getPlayer(e),o=null==t?void 0:t.tvProviderLogoUrl;if(o){var i=document.createElement("div");i.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(o),a.alt="Provider Image",i.append(a),n.el().appendChild(i),n.on("useractive",function(){i.classList.remove("vjs-fade")}),n.on("userinactive",function(){n.paused()||i.classList.add("vjs-fade")}),n.on("fullscreenchange",function(){n.isFullscreen_?i.style.top="3.2rem":i.style.top="1rem"})}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("./index-
|
|
1
|
+
"use strict";require("./index-1a998ebc.js");var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),r=require("./skin-c97f0eea.js"),n=require("@babel/runtime/helpers/defineProperty"),i=require("@babel/runtime/helpers/slicedToArray"),a=require("./generic-ae574c9a.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?u(Object(r),!0).forEach(function(t){n(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var s="my-player";function l(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function c(){return(c=e(t.mark(function e(r){var n,a,u,o,s,l,c,p,d,f,m,b,g,h,v,x,y,k,w,E,j,N,T,A;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r._tiles){e.next=2;break}return e.abrupt("return",r._tiles);case 2:return e.prev=2,e.next=5,fetch(r.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return a=e.sent,e.next=11,createImageBitmap(a);case 11:for(u=e.sent,o=r.layout.split("x").map(Number),s=i(o,2),l=s[0],c=s[1],p=u.width/c,d=u.height/l,f=[],m=0;m<l;m++)for(b=0;b<c;b++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(u,b*p,m*d,p,d,0,0,p,d),h=g.toDataURL("image/png"),f.push({uri:h,duration:r.duration}),r._tiles=f;return e.abrupt("return",f);case 20:for(e.prev=20,e.t0=e.catch(2),v=r.layout.split("x").map(Number),x=i(v,2),y=x[0],k=x[1],w=[],E=0;E<y*k;E++)w.push({uri:null===(j=window)||void 0===j||null===(N=j.app_data)||void 0===N||null===(T=N.appcmsMain)||void 0===T||null===(A=T.images)||void 0===A?void 0:A.placeholderCover,duration:r.duration});return e.abrupt("return",w);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function p(e,t){return d.apply(this,arguments)}function d(){return(d=e(t.mark(function e(r,n){var i,a;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=n,e.prev=1,e.next=4,fetch(r);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",l(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function f(e,t,n){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=r.getPlayer(s);if(i&&a){var u=i.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,l=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),n),p=t[l];p&&!p.loading&&(p.loading=!0,function(e){return c.apply(this,arguments)}(p).then(function(e){var t=e[p.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),p.loading=!1,p.src=t.uri}))}}function m(e){return b.apply(this,arguments)}function b(){return(b=e(t.mark(function e(a){var u,s,l,c;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u={},a.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),a=i(r,2),s=a[0]*a[1],l=e.duration,c=0;c<s;c++){var p,d=Math.round((t*s+c)*l);u[d]=o(o({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},n(p,"left","-60px"),n(p,"border","1px solid transparent"),n(p,"borderRadius","4px"),p)})}}),s=Object.keys(u).map(Number).sort(function(e,t){return e-t}),null==(l=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||l.addEventListener("mousemove",r.throttle(function(e){return f(e,u,s)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",r.throttle(function(e){return f(e,u,s)},500))}),e.abrupt("return",u);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var g=function(){var r=e(t.mark(function e(r,n){var a,u,o,s,l,c,p,d;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(r+n);case 2:return a=e.sent,e.next=5,a.text();case 5:u=e.sent,o=u.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=i(t,2),n=r[0],a=r[1];n&&a&&(l[n.trim().toLowerCase()]=a.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:r+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,t){return r.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function v(e,t){return x.apply(this,arguments)}function x(){return(x=e(t.mark(function e(n,u){var o,l,c,p,d,f,m,b,g,v,x,w,E,j,N,T,A,O,I,S,P,M,R,q,$,B,D,L,C,U,X,_,F,W,z,G,V,H,J,K,Q,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,fe,me;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=u,o=r.getPlayer(u),l=n.split("/"),c=l.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?l.slice(0,c+1).join("/"):new URL(n).origin),e.prev=5,e.next=8,fetch(n);case 8:return b=e.sent,e.next=11,b.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),w=(null==o?void 0:o.duration())||(null===(d=a.getCurrentVideo())||void 0===d||null===(f=d.video)||void 0===f?void 0:f.runtime),E=(null==x||null===(m=x.querySelector("MPD > BaseURL"))||void 0===m?void 0:m.textContent)||p+"/",j=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<j.length)){e.next=72;break}if(("image"!==(T=j[N]).getAttribute("contentType")||"image/png"!==T.getAttribute("mimeType"))&&"image/jpeg"!==T.getAttribute("mimeType")){e.next=69;break}if(O=T.getElementsByTagName("SegmentTemplate")[0],I=null===(A=O.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!O||!I){e.next=48;break}if(M=I.getElementsByTagName("S"),R=parseInt(null===(S=M[0])||void 0===S?void 0:S.getAttribute("t")),q=parseInt(null===(P=M[0])||void 0===P?void 0:P.getAttribute("d")),$=T.getElementsByTagName("Representation")[0],B=$.getElementsByTagName("EssentialProperty")[0],D=B.getAttribute("value"),L=null==D?void 0:D.split("x"),C=i(L,2),U=C[0],X=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?q/_:q)/(U*X),W=$.getAttribute("id"),z=Math.round(w/F),G=Math.ceil(z/(U*X)),V=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],N=0;N<G;N++)K="/"==(J=V)[0]?new URL(p).origin:p+"/",H.push({duration:F,layout:D,uri:K+J.replace("$Time$",R+N*q).replace("$RepresentationID$",W)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=T.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=i(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=Q.getAttribute("id"),se=Math.round(w/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],fe=y(ce),N=0;N<le;N++)me=fe?k(fe,N+pe):ce,de.push({duration:ue,layout:Z,uri:E+me.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function y(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function w(){return(w=e(t.mark(function e(n){var i,a,u,o,s,l,c,d,f,b,h,x,y,k,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=r.getPlayer(n),l=s.currentSource(),c=l.src,c=null!==(i=c)&&void 0!==i&&i.includes("blob")?null==s||null===(a=s.getSource)||void 0===a?void 0:a.call(s):c,null===(u=c)||void 0===u||!u.includes("m3u8")){e.next=19;break}return e.next=6,p(c,n);case 6:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=17;break}return f=(null==d?void 0:d[0])||null,b=f.uri,h=c.substring(0,c.lastIndexOf("/"))+"/",e.next=12,g(h,b);case 12:return x=e.sent,e.next=15,m(x);case 15:y=e.sent,s.thumbnails(y);case 17:e.next=28;break;case 19:if(null===(o=c)||void 0===o||!o.includes("mpd")){e.next=28;break}return e.next=22,v(c,n);case 22:if(!((null==(k=e.sent)?void 0:k.length)>0)){e.next=28;break}return e.next=26,m(k);case 26:w=e.sent,s.thumbnails(w);case 28:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.initiateTrickplay=function(e){return w.apply(this,arguments)};
|