@viewlift/player-backup 2.0.183-backup → 2.0.185-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-487479ca.js → autoNextVideo-673c1382.js} +1 -1
- package/cjs/bundle.css +4 -4
- package/cjs/{features-ab3cd88f.js → features-7f469c69.js} +1 -1
- package/cjs/{generic-9303c33a.js → generic-54695799.js} +1 -1
- package/cjs/index-3c9224bf.js +1 -0
- package/cjs/{index-92587584.js → index-c035c73b.js} +1 -1
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-08b130ee.js → multicamv2-487604ad.js} +1 -1
- package/cjs/{multicamv2-ce51b66c.js → multicamv2-f138b353.js} +1 -1
- package/cjs/{nextEpisodeButton-7dd19b2c.js → nextEpisodeButton-e786d302.js} +1 -1
- package/cjs/{playlist-f366e4b7.js → playlist-e6759d53.js} +1 -1
- package/cjs/{series-295b9f0e.js → series-ec74e2e2.js} +1 -1
- package/cjs/{series-v2-1afd67d0.js → series-v2-09923887.js} +1 -1
- package/cjs/{series-v2-8b15cd07.js → series-v2-69e14ba7.js} +1 -1
- package/cjs/{skin-cbc2a587.js → skin-292be09b.js} +1 -1
- package/cjs/{skin-a72dd5cf.js → skin-6fc657c2.js} +1 -1
- package/cjs/{skin-7c64caf6.js → skin-7920c51a.js} +1 -1
- package/cjs/{skin-c004c7ce.js → skin-9e2ed110.js} +1 -1
- package/cjs/{skin-46f8ec9d.js → skin-ca14df5e.js} +1 -1
- package/cjs/{skin-e4178c7b.js → skin-e436cded.js} +1 -1
- package/cjs/{skin-dfc38b33.js → skin-f5264f38.js} +1 -1
- package/cjs/{util-7f840bbf.js → util-846f8431.js} +1 -1
- package/cjs/{videoSelector-cf5d07b2.js → videoSelector-1c7e0271.js} +1 -1
- package/cjs/{videoSelector-a0178d21.js → videoSelector-7db1d2c2.js} +1 -1
- package/esm/{autoNextVideo-03522087.js → autoNextVideo-f45464b6.js} +1 -1
- package/esm/bundle.css +4 -4
- package/esm/{features-a617dba5.js → features-d847e381.js} +1 -1
- package/esm/{generic-029c4b28.js → generic-3d4ce4c7.js} +1 -1
- package/esm/{index-b42bad0f.js → index-55f4f2aa.js} +1 -1
- package/esm/index-bb6c2618.js +1 -0
- package/esm/index.js +1 -1
- package/esm/{multicamv2-82be891d.js → multicamv2-62ff700f.js} +1 -1
- package/esm/{multicamv2-b11d04d1.js → multicamv2-f14a670c.js} +1 -1
- package/esm/{nextEpisodeButton-a843f90b.js → nextEpisodeButton-4a7eea47.js} +1 -1
- package/esm/{playlist-67a17a29.js → playlist-068a7e2a.js} +1 -1
- package/esm/plugins/comscore_dist/index.d.ts +1 -1
- package/esm/plugins/comscore_dist/index.min.d.ts +1 -1
- package/esm/{series-01d3b330.js → series-3c8d0ca4.js} +1 -1
- package/esm/{series-v2-9baac96a.js → series-v2-bbd4d425.js} +1 -1
- package/esm/{series-v2-e27d6b84.js → series-v2-bc6f792d.js} +1 -1
- package/esm/{skin-26e5f9a2.js → skin-024f3e27.js} +1 -1
- package/esm/{skin-3a49c350.js → skin-0623d1d1.js} +1 -1
- package/esm/{skin-7d2d625b.js → skin-072763e8.js} +1 -1
- package/esm/{skin-83e1df22.js → skin-29321864.js} +1 -1
- package/esm/{skin-75fef00b.js → skin-4fa2a867.js} +1 -1
- package/esm/{skin-51af65f9.js → skin-559d51a0.js} +1 -1
- package/esm/{skin-88ed9ed3.js → skin-7ab436df.js} +1 -1
- package/esm/{util-20b9bb62.js → util-f4aa7ada.js} +1 -1
- package/esm/{videoSelector-1b7f0566.js → videoSelector-2567f5af.js} +1 -1
- package/esm/{videoSelector-baf28366.js → videoSelector-b5a30052.js} +1 -1
- package/package.json +1 -1
- package/cjs/index-53dd5252.js +0 -1
- package/esm/index-686d3708.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,i=require("./currentVideoInfo-31d70bec.js"),t=require("./generic-
|
|
1
|
+
"use strict";var e,i=require("./currentVideoInfo-31d70bec.js"),t=require("./generic-54695799.js"),n=require("./util-846f8431.js"),o=require("./skin-516012d7.js"),r=require("./player_instance-fcf6a8fb.js"),u=0,d=0,c=function e(n,r,u,c){d=n,n>u.length-1||(i.setVideoIdx(d+1),t.load(r,u[n].id).then((function(e){o.highlightVideo(d,r),d++,s(e)})).catch((function(i){s(i),setTimeout((function(){o.highlightVideo(d,r),d++,e(d,r,u)}),5e3)})))},s=function(i){e&&e(i)};exports.autoPlayNext=function(l){clearTimeout(u);var h=null==l?void 0:l.content;e=null==l?void 0:l.cb;var a=l.playerId;n.onVideoEnded(a,(function(){var e=r.getPlayer(a);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>h.length-1||(i.setVideoIdx(d+1),t.load(a,h[d].id).then((function(e){o.highlightVideo(d,a),i.setCurrentVideo(e.response),d++,s(e)})).catch((function(e){s(e),o.highlightVideo(d,a),d++,u=setTimeout((function(){t.isPaused(a)&&c(d,a,h)}),5e3)}))))}))},exports.switchToNext=c;
|
package/cjs/bundle.css
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
3
|
.video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
|
|
7
4
|
height: 0.7em;
|
|
8
5
|
position: absolute;
|
|
@@ -224,6 +221,9 @@
|
|
|
224
221
|
|
|
225
222
|
|
|
226
223
|
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
|
|
227
227
|
/* CSS for videojs-dvr-seekbar */
|
|
228
228
|
|
|
229
229
|
.video-js.vjs-dvr-seekbar {
|
|
@@ -398,7 +398,6 @@
|
|
|
398
398
|
|
|
399
399
|
|
|
400
400
|
|
|
401
|
-
|
|
402
401
|
.video-js .multicamera-parent.default{
|
|
403
402
|
height: 345px;
|
|
404
403
|
position: absolute;
|
|
@@ -480,6 +479,7 @@
|
|
|
480
479
|
|
|
481
480
|
|
|
482
481
|
|
|
482
|
+
|
|
483
483
|
/* nextep */
|
|
484
484
|
.next-ep-preview{
|
|
485
485
|
position: absolute;
|
|
@@ -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-54695799.js"),s=require("./resolution-f9dcc1b4.js"),d=require("./skin-516012d7.js"),c=require("./localisation-56e0a999.js"),u=require("./player_instance-fcf6a8fb.js");function h(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 g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(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.addCaptionButton=function(e,t){Promise.resolve().then((function(){return require("./caption-settings-4ca6c759.js")})).then((function(r){var n,o,l,a,s=r.default,d=u.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(),d&&d.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},d.controlBar.children().length-3)}))},exports.addDBClickFullScreen=function(e){var t=u.getPlayer(e).el(),r=0,n=u.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-f138b353.js")})).then((function(r){var n=r.default,o=u.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-487604ad.js")})).then((function(r){var n=r.default,o=u.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-e786d302.js")})).then((function(n){var o=n.default,l=u.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=u.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-e6759d53.js")})).then((function(r){var n=r.default,o=u.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-v2-e42e0101.js")})).then((function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=u.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-ec74e2e2.js")})).then((function(n){var o=n.seriesModule,l=u.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)}))},d=0;d<a.length;d++)s(d)}))},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then((function(){return require("./series-v2-09923887.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then((function(){return require("./series-v2-69e14ba7.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)}))},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then((function(){return require("./settings-icon-a8ec6794.js")})).then((function(r){var n,o,l,a,s=r.default,d=u.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(),d&&d.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},d.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=c.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.addStartFromBeginningButton=function(e,t){Promise.resolve().then((function(){return require("./start-begin-btn-5739a6c0.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_})));o.startFromBeginningButton=l}))},exports.addVideoSelector=function(e,t){Promise.resolve().then((function(){return require("./videoSelector-7db1d2c2.js")})).then((function(r){var n=r.default,o=u.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-1c7e0271.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)}))},exports.addWatchLiveButton=function(e,t){Promise.resolve().then((function(){return require("./watch-live-btn-822534d1.js")})).then((function(r){var n=r.default,o=u.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex((function(e){return"PlayToggle"===e.name_}))+1);o.watchLiveButton=l}))};
|
|
@@ -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"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),l=require("js-cookie"),a=require("./currentVideoInfo-31d70bec.js"),d=require("./captions-dbc83a75.js"),s=require("./skin-516012d7.js"),u=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/slicedToArray");function v(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function p(e,n){v("event",e,n)}var f={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 m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var y={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=y.version;var I,w=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":S.get()+"".concat(null==f?void 0:f.getVideoDetails)},E=function(e,n){var t,o,i,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:w(),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":y.version,"x-player-name":"videojs"},withCredentials:!0})},h=function(e,n){var t,o,i,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:S.get()+f.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return o=e.sent,e.abrupt("return",r({url:S.get()+"".concat(null==f?void 0:f.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:S.get()+"".concat(null==f?void 0:f.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},b=function(e){var n=e.videoId;return r({method:"GET",url:S.get()+"".concat(null==f?void 0:f.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},S=(I=null==f?void 0:f.apiBaseUrl,{set:function(e){e&&(I=e)},get:function(){return I}}),O=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},C=null;function A(){return{set:function(e){e&&(C=e)},get:function(){return C}}}var P=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A().get(),o=S.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),L=null,D=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=6;break}return L||(L=P().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&A().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){L=null}))),e.abrupt("return",L);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};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 M(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 V=100,j=function(){var e,n,t,o,r,i,l,d=a.getCurrentVideo();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.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==d?void 0:d.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(r=d.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function F(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function N(){var e=window.sessionStorage.getItem("uid");return e||(e=F(),window.sessionStorage.setItem("uid",e),e)}function x(){return W.apply(this,arguments)}function W(){return(W=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){return e?String(e):""}var B=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function H(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=F(),d="production",s="WEBSITE",u=null,c=0,v=null,m=0,g=0,y=!1,I=[],w=i.getPlayer(e);if(w){var E=function(){var e,n,t,o;return Math.round((null==w||null===(e=w.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},h=B((function(){for(var e=w.currentTime(),n=w.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0})),_=function(){var e=n(t.mark((function e(n){var o,i,u,c,v,p,m,g,y,I,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return y=e.sent,I=R(y),e.t0=M,e.t1=M,e.t2=null==I?void 0:I.site,e.t3=null==I?void 0:I.siteId,e.t4=s,e.t5=N(),e.t6=j(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=d,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?U(n.adPosition):"",e.next=25,x();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(p=n.bufferHealth)&&void 0!==p?p:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),w=[e.t32],r({url:(null==l||null===(g=l.beacon)||void 0===g?void 0:g.url)||S.get()+f.getBeaconUrl,method:"post",headers:{Authorization:y},contentType:"application/x-www-form-urlencoded",dataType:"text",data:w}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e){if(!w.paused()&&w.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&g<4&&y?(g++,p("BUFFERING",M({pfm:s,uid:N(),vid:j(),videoPosition:Math.floor(w.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),_({eventName:"BUFFERING",videoPosition:Math.floor(w.currentTime),isAdEvent:!1}),0):t},b=function(){var e=Math.floor(w.currentTime);w.on("error",(function(){var n,t=Math.floor(w.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";p(o,M({pfm:s,uid:N(),vid:j(),videoPosition:t},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),_({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=B((function(){var e;c=0,v=setInterval((function(){c=T(c)}),V),p("PLAY",M({pfm:s,uid:N(),vid:j(),videoPosition:Math.floor(w.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),_({eventName:"PLAY",videoPosition:Math.floor(w.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":j(),watchTime:Math.floor(w.currentTime)})}));w.one("play",e)},C=function(){w.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),m=c||0,p("FIRST_FRAME",M({pfm:s,uid:N(),vid:j(),videoPosition:Math.floor(w.currentTime),ttFirstFrame:c,bufferHealth:h()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),_({eventName:"FIRST_FRAME",videoPosition:Math.floor(w.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:h()}),y=!0,c=0}))},A=function(){var e=!1;w.on("waiting",B((function(){y&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!w.paused()?m=T(m):clearInterval(u)}),V))}))),w.on("playing",B((function(){e=!1,clearInterval(u)})))},P=function(){var e=function(e){var n,t,o,r=M({videoPosition:Math.floor(w.currentTime),isAdEvent:!0,bufferHealth:h(),pfm:s,uid:N(),vid:j(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==l||null===(o=l.beacon)||void 0===o?void 0:o.params);p(e,M({},r)),_(M({eventName:e,adPosition:1},r))};w.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),w.on("adskip",(function(){c=0})),w.on("adend",(function(){c=0}))},L=function(){w.on("timeupdate",(function(){var e=Math.floor(w.currentTime());if(e>=30&&e%30==0&&!I.includes(e)){var n,t=null===(n=w.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];g=0,I.push(e),_({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:h(),bitrate:E()})}}))};b(),A(),P(),L(),O(),w.on("loadeddata",C)}else console.error("Videojs: Player instance not found.")}var G=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},q=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},Q=function(){var e=a.seasonIdxManager.get();return e>=0?e+1:1},Y=function(){var e,n,t,o=a.getCurrentSeries(),r=a.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,l=a.seasonIdxManager.get(),d=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)===i}));return d>=0?d+1:1};function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function K(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?z(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):z(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var X=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},J=function(e){var n=$(e,"video.tags",[]),t=$(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},$=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},Z=function(){var n,t,o,r,a,d,s,u,c,v,p,f,m,g,y,I,w,E,h,_,T,b,S,O,C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",A=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return C;var L=(null==P?void 0:P.siteName)||"",D=(null==P?void 0:P.contentType)||"video",R=(null==P||null===(o=P[D])||void 0===o?void 0:o.metadata)||(null==P||null===(r=P[D])||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.metadata),k=i.getPlayer(A);if(!C.includes("VIEWLIFT_"))return C;var M,V=window.getComputedStyle(document.getElementById(A),null),j=Math.trunc(V.getPropertyValue("height").slice(0,-2)),F=Math.trunc(V.getPropertyValue("width").slice(0,-2)),N="linearchannel"===D?null==P||null===(d=P.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(u=s.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:$(P,"video.gist.id",""),x="linearchannel"===D?null==P||null===(v=P.linearchannel)||void 0===v||null===(p=v.channels)||void 0===p||null===(f=p.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===f?void 0:f.title:$(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),W=null,U=null;"function"==typeof window.__gpp&&(null===(M=window)||void 0===M||M.__gpp("ping",(function(e){W=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]})));var B=K(K({},ee(R)),{},(b={VIEWLIFT_WIDTH:F,VIEWLIFT_HEIGHT:j,VIEWLIFT_SIZE:X(F,j),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===(m=window)||void 0===m?void 0:m.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:$(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:$(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:$(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(y=k.options_)||void 0===y?void 0:y.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:J(P),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI($(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+$(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:$(null===(I=window)||void 0===I||null===(w=I.app_data)||void 0===w||null===(E=w.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?"":$(null===(h=window)||void 0===h||null===(_=h.app_data)||void 0===_||null===(T=_.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*$(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:$(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:x,VIEWLIFT_CONTENT_SERIES_TITLE:$(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:$(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Y(),VIEWLIFT_SEASON_NUMBER:Q(),VIEWLIFT_CONTENT_TAGS:J(P),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:W||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(b,"VIEWLIFT_LAT",""),e(b,"VIEWLIFT_APP_BUNDLE",""),e(b,"VIEWLIFT_ATT_CONSENT",""),b),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in B){var G=new RegExp(H,"g");C=C.replace(G,B[H])}return C},ee=function(e){var n,t,o,r,i,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(q()?s?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=q()?K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=q()?K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=K(K({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},ne=function(e,n){var t,o,r,i,l,a,d,s,u,c,v,p,f,m=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[m])||void 0===t?void 0:t.drmEnabled,y=null==e||null===(o=e[m])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,I=null==e||null===(i=e[m])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[m])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[m])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[m])||void 0===v||null===(p=v.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!=I&&I.hls)return oe(I);if(g){var h=re(y,n);return h.src=Z(h.src,n,e),h}if("Safari"!==G()&&E)return te(y);if(w){var _=oe(y);return _.src=Z(_.src,n,e),_}if(null!=y&&y.mpeg){var T=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(y);return T.src=Z(T.src,n,e),T}return null},te=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},oe=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},re=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=G();if(i.getPlayer(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return ie(n),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(ie(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ie=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==G()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},le=function(e,n){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},ae=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var de=!1,se=function(e,n,t){var o=Z(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,l=i.getPlayer(e);if(null!==l.el_){de=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),de&&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===(r=o.ads)||void 0===r?void 0:r.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 ue,ce=(ue=!0,{enable:function(){ue=!0},disable:function(){ue=!1},get enabled(){return ue}}),ve="ssai-breakStart",pe="ssai-adImpression",fe="ssai-firstQuartile",me="ssai-midpoint",ge="ssai-thirdQuartile",ye="ssai-complete",Ie="ssai-breakEnd",we={breakStart:ve,impression:pe,firstQuartile:fe,midpoint:me,thirdQuartile:ge,complete:ye,breakEnd:Ie};function Ee(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=we[o];r&&t.trigger(r,n)}function he(e){var n,t,o,r,i=e.isLive,l=e.startTimeInSeconds;return i?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==l?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:l===("function"==typeof(null===(t=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===t?void 0:t.getDuration)&&(null===(r=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance)||void 0===r?void 0:r.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function _e(){var e,n,t,o,r,i,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(he({isLive:null===(r=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentOptions)||void 0===r?void 0:r.isLive,startTimeInSeconds:null==l?void 0:l.startTimeInSeconds})),s.setUniqueId(l.id||"ad-001"),s.setLength(1e3*parseInt(l.durationMs,10)||0),s.setTitle(l.title||"Advertisement"),s.setServerCampaignId(l.campaignId),s.setRelatedContentMetadata(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(l.placementId);var u={cs_ad_tu:null==l?void 0:l.trackingUrl,ns_st_ami:null==l?void 0:l.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",l)}function Te(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))}function be(){var e,n,t,o,r;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var i=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;i.notifyPause(),i.notifyEnd(),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="content"),(null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentMetadata)&&(i.setMetadata(null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.contentMetadata),i.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}}function Se(e){return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:null==e?void 0:e.campaignId,placementId:null==e?void 0:e.placementId,trackingUrl:null==e?void 0:e.trackingUrl}}function Oe(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 Ce(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Oe(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Ae(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 Pe(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)?Pe(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,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,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Pe(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}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,playerInstance:null,mode:"content",cleanupFns:[],contentOptions:null}),o.registerPlugin("comscore",(function(e){console.log(this),console.log("hello form comscore plugin",e);var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(t,o){var r=document.createElement("script");r.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",r.async=!0,document.head.appendChild(r),r.onload=function(){!function(e){var n=e.publisherId,t=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var o=window.ns_.analytics;o.PlatformApi.setPlatformAPI(o.PlatformApi.PlatformApis.WebBrowser);var r=new o.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==t?void 0:t.userConsent)||"",cs_fpid:(null==t?void 0:t.userId)||""}});o.configuration.addClient(r),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},r.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var Le,De=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Re=(Le=null,{set:function(e){Le=e},get position(){return Le}});function ke(e,n){return Me.apply(this,arguments)}function Me(){return(Me=n(t.mark((function e(n,o){var r,l,a,d,s,u,v,p,f,m,g,y,I,w,E,h,_,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),a=ne(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(r=o[s])||void 0===r||null===(l=r.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=Z(u,n,o),v=je(u),p=c(v,2),f=p[0],m=p[1],g=Ve(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach((function(e){var n=c(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(Ce({adsParams:Ce({},f)},g))});case 14:return y=e.sent,e.next=17,y.json();case 17:return I=e.sent,w="https://"+new URL(u).hostname,E=I.trackingUrl,h=I.manifestUrl,_=w+E,T=w+h,De.set(_),console.log("%c TRACKING URL","background: #bdf369; color: #000",_),a.src=T,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 Ve(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=c(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})))||{}}function je(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Ae((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=c(t.value,2),l=i[0],a=i[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){r.e(e)}finally{r.f()}for(var d={},s={},u=0,v=Object.entries(n);u<v.length;u++){var p=c(v[u],2),f=p[0],m=p[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=m;else s[f]=m}return[d,s]}var Fe,Ne,xe,We,Ue=(Fe=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Fe=Array.isArray(e)?u(e):Fe},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Fe),u(Fe)}}),Be=new Map;function He(e,n){return Ge.apply(this,arguments)}function Ge(){return Ge=n(t.mark((function e(o,r){var l,a,d,c,v,p,f,m,g,y,I,w,E,h,_,T,b,S,O,C,A,P;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:P=function(e,n,t,r,l,a){var d=i.getPlayer(o);if(!d.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(d.currentTime());var s,u=Ae(t);try{var c=function(){var t,i,u,c=s.value,v=c.eventType,p=c.beaconUrls,f=c.startTimeInSeconds,m=c.startTime,g=c.durationInSeconds,y=f||0,I=p,w=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(u=i.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(y,"_").concat(v),h=Be.get("pod-".concat(l))||[];if(console.warn(e,y,"map:",v,"condition1:",e>=y,"map:",Be),e>=y&&!h.includes(E)){h.push(E),Be.set("pod-".concat(l),h);try{A(v,n,I,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var _=Re.position;Re.set(null),setTimeout((function(){null!=_&&(d.currentTime(_),a())}),500)}if("function"==typeof w)try{var T,b={eventType:v,startTimeInSeconds:f,startTime:m,durationInSeconds:g,ad:null==n||null===(T=n.ads)||void 0===T?void 0:T[r],adIndex:r};w({adsData:b}),Ee(o,b)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var S,O=De.get();_e(Se(Ce(Ce({},null==n||null===(S=n.ads)||void 0===S?void 0:S[r]),{},{trackingUrl:O})))}else"complete"===v?Te():"breakEnd"===v&&be()}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},A=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},C=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Be.clear(),Re.set(r),g=De.get(),(y=i.getPlayer(o)).one("loadeddata",(function(){g&&O(g)})),I=new Map,w=new Map,E=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,_=(null==y||null===(d=y.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==y||null===(c=y.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,b=(null==y||null===(v=y.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,S=(null==y||null===(f=y.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark((function e(n){var l,a,d,c,v,p,f,m,g,y,O,A,L,D,R,k,M,V,j,F;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",k),0===e.button&&L()},R=function(e){},D=function(){var e,n=y.currentTime(),t=null,o=Ae(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,I.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){y.currentTime(t+2.2)}),100))},L=function(){var e,n=y.currentTime(),t=null,o=Ae(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,d=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>i)&&!I.has(i)||n>=i&&n<=d)&&(t=i,I.set(i,!0),w.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){y.currentTime(t+.4)}),100))},v=!1,e.next=7,fetch(n);case 7:return p=e.sent,e.next=10,p.json();case 10:f=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",f),m=f.avails,g=[],y=i.getPlayer(o),O=y.controlBar.progressControl,A=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),m.map((function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(v=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===r?void 0:r[0])||[]})})),!v&&r&&(y.currentTime(r),D()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g),console.log(g,"data"),g.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=y.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",A.appendChild(i)}})),y._timeUpdateHandler&&y.off("timeupdate",y._timeUpdateHandler),y._timeUpdateHandler=s.throttle((function(){var e=y.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&I.set(r,!0),ce.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")),_&&(_.el().style.pointerEvents="none",_.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 d=e-r,s=0,c=0,v=0;v<l.length;v++){var p,f=null==l||null===(p=l[v])||void 0===p?void 0:p.durationInSeconds;if(d<s+f){c=v;break}s+=f}l[c];var m=Math.max(0,i-d),y=Math.round(m);M.style.display="block",F.textContent="".concat(c+1," of ").concat(l.length," • ").concat(C(y));var E=[];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)}));E.push.apply(E,u(n))})),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),P(e,t,E,c,o,D),"break"}w.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(M.style.display="none",O.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.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")),ce.enable())}}),1e3),y.on("timeupdate",y._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){ce.enabled&&"ArrowRight"==e.key&&(L(),nn(o,10),e.stopPropagation())})),O.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",k))})),null===(d=document)||void 0===d||null===(c=d.querySelectorAll(".ssai-ad-container"))||void 0===c||c.forEach((function(e){return null==e?void 0:e.remove()})),(M=document.createElement("div")).className="ssai-ad-container",(V=document.createElement("div")).className="sponsored-adbox",(j=document.createElement("div")).className="sponsored-text",j.textContent="Sponsored Ad",V.append(j),(F=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",M.append(V),M.append(F),y.el().appendChild(M);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),Ge.apply(this,arguments)}function qe(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,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,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,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}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}function Ye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function ze(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ye(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Ke={},Xe=(null===(Ne=window)||void 0===Ne||null===(xe=Ne.location)||void 0===xe||null===(We=xe.search)||void 0===We?void 0:We.includes("debug=true"))||!1,Je=null;function $e(e){return Ze.apply(this,arguments)}function Ze(){return Ze=n(t.mark((function e(o){var r,l,a,d,c,v,p,f,m,g,y,I,w,E,h,_,T,b,S,O,C,A,P,L,D,R,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,r,l){var a=i.getPlayer(o);if(!a.seeking()){var d=n.startTimeInSeconds;n.durationInSeconds,Math.floor(a.currentTime());var s,u=qe(t);try{for(u.s();!(s=u.n()).done;){var c,v,p,f=s.value,m=f.eventType,g=f.beaconUrls,y=f.startTimeInSeconds,I=f.startTime,w=f.durationInSeconds,E=y||0,h=g,_=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(p=v.ads)||void 0===p?void 0:p.adEventHandler)||null,T="".concat(E,"_").concat(m),b="pod-".concat(d);L.has(b)||L.set(b,new Set);var S=L.get(b);if(Xe&&console.warn(e,E,"map:",m,"condition1:",e>=E,"map:",L),e>=E&&e<=E+D&&!S.has(T)){S.add(T);try{R(m,n,h,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,n)}if("function"==typeof _)try{var O,C={eventType:m,startTimeInSeconds:y,startTime:I,durationInSeconds:w,ad:null==n||null===(O=n.ads)||void 0===O?void 0:O[r],adIndex:r};_({adsData:C}),Ee(o,C)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},R=function(e,n,t,o){var r,i;"breakEnd"===e&&(null===(r=Ke)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(i=Ke)||void 0===i?void 0:i.totalAds)||(Xe&&(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)}))})))},y=function(){Je&&clearInterval(Je)},m=De.get(),(g=i.getPlayer(o)).one("loadeddata",(function(){y(),Je=setInterval((function(){m&&!g.paused()&&P(m)}),2e3)})),g.on("dispose",(function(){y()})),I=new Map,w=new Map,E=-1,h=null,_=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==g||null===(a=g.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,O=(null==g||null===(p=g.el())||void 0===p||null===(f=p.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,C=!1,A=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 u(o);var r=[],i=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==i||null===(e=i.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 c=null==d?void 0:d.map((function(e){return ze(ze({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=c&&c[0]&&r.push(null==c?void 0:c[0])}return r},P=function(){var e=n(t.mark((function e(n){var r,l,a,d,c,v,p,f,m,g;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,c=d.avails,v=d.nextToken||null,h=v,p=[],f=i.getPlayer(o),m=f.controlBar.progressControl,g=m.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),c.map((function(e,n){p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),Xe&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",g.appendChild(i)}})),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=s.throttle((function(){var e=f.currentTime();if(e!==E){E=e;for(var n=function(){var n=p[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,l=o+r;if(e>=o-1.2&&e<=l+1.2){var a;C=!!(e>=o&&e<=l&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>l&&I.set(o,!0),ce.disable(),_&&_.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.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")),m.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,c=0,v=0;v<i.length;v++){var f,g=null==i||null===(f=i[v])||void 0===f?void 0:f.durationInSeconds;if(d<s+g){c=v;break}s+=g}setTimeout((function(){Ke.totalAds=null==i?void 0:i.length,Ke.currentAdIndex=c}),1e3);var y=[];return null==i||i.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));y.push.apply(y,u(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&y.push.apply(y,u(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,y,c),"break"}w.delete(o)},t=0;t<p.length;t++){if("break"===n())break}C||(Ke={},m.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")),_&&_.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),ce.enable())}}),1e3),f.on("timeupdate",f._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),L=new Map,D=2.5;case 22:case"end":return e.stop()}}),e)}))),Ze.apply(this,arguments)}function en(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 nn=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},tn=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},on=function(e){return!!o.getPlayer("".concat(e))},rn=function(){var e=n(t.mark((function e(o,r){var l,d,s,u=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,D();case 3:return d=e.sent,s=i.getPlayer(o),e.abrupt("return",new Promise((function(e,i){var u=(null==r?void 0:r.programs)||[];null==r||delete r.programs,h(r,d).then(function(){var i=n(t.mark((function n(i){var d,c,v,p,f,m,g,y;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==i?void 0:i.data,window.sid=F(),m.contentType="linearchannel",m.channelId=null==r?void 0:r.channelId,g=(null==m||null===(d=m.linearchannel)||void 0===d?void 0:d.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(f=p.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,y=ne(m,o),!g){n.next=11;break}return n.next=9,ke(o,m);case 9:y=n.sent,l=!0;case 11:a.setCurrentVideo(m),a.setCurrentEpgPrograms(u),sessionStorage.setItem("program_switched",!0),y&&l?(dn(o,y),g&&$e(o),s.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})}))):e({status:!0,msg:"Feed authenticated",response:m});case 15:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){i({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)}}(),ln=function(){var e=n(t.mark((function e(o,r,l){var s,u,c,v,p,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return v=e.sent,(a.getCurrentSeries()||null)&&a.setVideoIdxById(r),p=0,f=0,m=null,null!==(s=window)&&void 0!==s&&s.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(c=u.watchHistory)&&void 0!==c&&c.enable&&T(r,v).then((function(e){var n,t,o,r,i,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),p=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)})).catch((function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))})),e.abrupt("return",new Promise((function(e,l){E(r,v).then(function(){var r=n(t.mark((function n(r){var s,u,c,v,g,y,I,w,E,h,_,T,b,S,O,C,A,P,L,D,R,k,M,V,j,F,N,x,W,U,B,H,G,q,Q,Y,z,K;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(C=null==r?void 0:r.data,A=(null==C?void 0:C.contentType)||"video",P=(null==C||null===(s=C[A])||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,L=(null==C||null===(y=C.video)||void 0===y||null===(I=y.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,a.setCurrentVideo(r.data),(D=(null==C||null===(w=C.ads)||void 0===w||null===(E=w.preRoll)||void 0===E||null===(h=E.adTags)||void 0===h||null===(_=h.web)||void 0===_?void 0:_.active)&&(null==C||null===(T=C.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(S=b.adTags)||void 0===S||null===(O=S.web)||void 0===O?void 0:O.url))&&se(o,D,C),R=ne(C,o),!P){n.next=12;break}return n.next=11,ke(o,C);case 11:R=n.sent;case 12:R?(H=(null==C||null===(k=C.video)||void 0===k||null===(M=k.gist)||void 0===M?void 0:M.videoImageUrl)||(null==C||null===(V=C.video)||void 0===V||null===(j=V.gist)||void 0===j||null===(F=j.imageGist)||void 0===F?void 0:F.r16x9),(G=i.getPlayer(o)).poster(H),dn(o,R),P&&He(o,m),G.on("loadstart",(function(){L&&e({status:!0,msg:"Video Loaded",response:C})})),G.on("loadeddata",(function(){ae(),e({status:!0,msg:"Video Loaded",response:C})})),G.one("play",(function(){p&&!P&&f<95&&setTimeout((function(){G.currentTime(p)}),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==C||null===(N=C.video)||void 0===N||null===(x=N.contentDetails)||void 0===x||null===(W=x.closedCaptions)||void 0===W?void 0:W.length)>0||(null==C||null===(U=C.video)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==C||null===(Q=C.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==C||null===(z=C.video)||void 0===z?void 0:z.closedCaptions),q=K.filter((function(e){return"VTT"===e.format})),d.addCaptions(o,q)):d.removeCaptions(o)):(le(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 r.apply(this,arguments)}}()).catch((function(e){sn(e,o,l,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),an=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()},dn=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},sn=function(n,t,o,r){var i,l,a,d,s,u,c=null==n||null===(i=n.response)||void 0===i||null===(l=i.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);on(t)&&le(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?en(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):en(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ue,exports.authenticateLC=rn,exports.baseUrlManager=S,exports.clearError=ae,exports.createSeriesWatchMap=function(e,n){var t=new Map;b({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),a.setSeriesWatchMap(t)})).catch((function(e){return console.log(e)}))},exports.detectBrowser=G,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=i.getPlayer(e);if(an(),function(){var e,n,t,o,r,i,l,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.comscoreCleanupFns=[]),console.log("comscoreTag",null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef),null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.tagRef){try{null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i||i.tagRef.notifyEnd()}catch(e){}null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||(l.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}(),s.clearEventListeners(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},exports.getDecodedToken=R,exports.getEntitlementData=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},exports.getEpisodeNumber=Y,exports.getLinearChannelDetails=h,exports.getSGAIEnabledSource=ke,exports.getSeasonNumber=Q,exports.getSeriesDetails=function(e,n){var t,o,i=R(n),l=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:S.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=b,exports.getSource=ne,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(ve,e)},adImpression:function(e){return t(pe,e)},adFirstQuartile:function(e){return t(fe,e)},adMidpoint:function(e){return t(me,e)},adThirdQuartile:function(e){return t(ge,e)},adComplete:function(e){return t(ye,e)},adBreakEnd:function(e){return t(Ie,e)}}},exports.getToken=D,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=N,exports.getVideoDetails=E,exports.getVideoInfo=T,exports.handleError=le,exports.initialiseAdvertisement=se,exports.initialiseKeyboardEvents=function(e,n){var t,o,r,l=i.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===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,s,u,c,v,p,f;if(ce.enabled&&"input"!=t.target.localName){var m=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(t.preventDefault(),null==d||d.focus()),m){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||tn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(s=i.appcmsMain)||void 0===s||null===(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!==(p=v.appcmsMain)&&void 0!==p&&null!==(f=p.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||nn(e,10)}}}),!0)},exports.initiateErrorHandling=sn,exports.inititateBeacon=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&H(e,n,t)},exports.isMobile=q,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=on,exports.isTokenExpired=O,exports.load=ln,exports.loadVideo=dn,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=A,exports.rewind=tn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],v("js",new Date),v("config",e)},exports.saveWatchHistory=_,exports.setupAdvertisementMarkers=He,exports.setupAdvertisementMarkersForLinear=$e,exports.skip=nn,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=Be;
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./player_instance-fcf6a8fb.js"),l=require("js-cookie"),a=require("./currentVideoInfo-31d70bec.js"),d=require("./captions-dbc83a75.js"),s=require("./skin-516012d7.js"),u=require("@babel/runtime/helpers/toConsumableArray"),c=require("@babel/runtime/helpers/slicedToArray");function v(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function p(e,n){v("event",e,n)}var f={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 m(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function g(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var I={name:"@viewlift/player",version:"2.0.61",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=I.version;var y,w=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":S.get()+"".concat(null==f?void 0:f.getVideoDetails)},E=function(e,n){var t,o,i,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:w(),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":I.version,"x-player-name":"videojs"},withCredentials:!0})},h=function(e,n){var t,o,i,l;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})})):r({url:S.get()+f.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(){var e=n(t.mark((function e(n){var o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return o=e.sent,e.abrupt("return",r({url:S.get()+"".concat(null==f?void 0:f.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:S.get()+"".concat(null==f?void 0:f.getVideoInfoV2,"/").concat(i,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},b=function(e){var n=e.videoId;return r({method:"GET",url:S.get()+"".concat(null==f?void 0:f.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},S=(y=null==f?void 0:f.apiBaseUrl,{set:function(e){e&&(y=e)},get:function(){return y}}),O=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},C=null;function A(){return{set:function(e){e&&(C=e)},get:function(){return C}}}var P=function(){var e=n(t.mark((function e(){var n,o,i;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=A().get(),o=S.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return i=e.sent,e.abrupt("return",i);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(){return e.apply(this,arguments)}}(),L=null,D=function(){var e=n(t.mark((function e(){var n;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!O(n)){e.next=6;break}return L||(L=P().then((function(e){var t,o,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,i=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),i&&A().set(i),r||n})).catch((function(e){return console.error("Error fetching refresh token",e),n})).finally((function(){L=null}))),e.abrupt("return",L);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};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 M(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 V=100,j=function(){var e,n,t,o,r,i,l,d=a.getCurrentVideo();return"linearchannel"===((null==d?void 0:d.contentType)||"video")?null==d||null===(e=d.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==d?void 0:d.channelId)})))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==d||null===(r=d.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==d||null===(l=d.video)||void 0===l?void 0:l.id)||(null==d?void 0:d.id)};function F(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function N(){var e=window.sessionStorage.getItem("uid");return e||(e=F(),window.sessionStorage.setItem("uid",e),e)}function x(){return W.apply(this,arguments)}function W(){return(W=n(t.mark((function e(){var n,o;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e){return e?String(e):""}var B=function(e){return function(){try{return e.apply(void 0,arguments)}catch(e){return console.error(e),null}}};function H(e,o){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=F(),d="production",s="WEBSITE",u=null,c=0,v=null,m=0,g=0,I=!1,y=[],w=i.getPlayer(e);if(w){var E=function(){var e,n,t,o;return Math.round((null==w||null===(e=w.tech_)||void 0===e||null===(n=e.vhs)||void 0===n||null===(t=n.selectPlaylist())||void 0===t||null===(o=t.attributes)||void 0===o?void 0:o.BANDWIDTH)/1e3)},h=B((function(){for(var e=w.currentTime(),n=w.buffered(),t=0;t<n.length;t++){var o=n.start(t),r=n.end(t);if(e>=o&&e<=r)return Math.round(r-e)}return 0})),_=function(){var e=n(t.mark((function e(n){var o,i,u,c,v,p,m,g,I,y,w;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return I=e.sent,y=R(I),e.t0=M,e.t1=M,e.t2=null==y?void 0:y.site,e.t3=null==y?void 0:y.siteId,e.t4=s,e.t5=N(),e.t6=j(),e.t7=n.url||document.location.href,e.t8=n.ref||document.referrer,e.t9=n.eventName,e.t10=null!==(o=n.videoPosition)&&void 0!==o?o:null,e.t11=d,e.t12=n.dp1||"",e.t13=n.dp2||"",e.t14=n.dp3||"",e.t15=n.dp4||"",e.t16=n.dp5||"",e.t17=n.isAdEvent?n.videoPosition:null,e.t18=n.isAdEvent?U(n.adPosition):"",e.next=25,x();case 25:e.t19=e.sent,e.t20=n.playerType||"videojs",e.t21=n.mediaType||"VIDEO",e.t22=a,e.t23=null!==(i=n.ttFirstFrame)&&void 0!==i?i:null,e.t24=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t25=null!==(c=n.resHeight)&&void 0!==c?c:null,e.t26=null!==(v=n.resWidth)&&void 0!==v?v:null,e.t27=null!==(p=n.bufferHealth)&&void 0!==p?p:null,e.t28={aid:e.t2,cid:e.t3,pfm:e.t4,uid:e.t5,vid:e.t6,url:e.t7,ref:e.t8,pa:e.t9,vpos:e.t10,environment:e.t11,dp1:e.t12,dp2:e.t13,dp3:e.t14,dp4:e.t15,dp5:e.t16,apos:e.t17,apod:e.t18,profid:e.t19,player:e.t20,media_type:e.t21,stream_id:e.t22,embedurl:"",ttfirstframe:e.t23,bitrate:e.t24,connectionspeed:null,resolutionheight:e.t25,resolutionwidth:e.t26,bufferhealth:e.t27},e.t29=(null==n?void 0:n.duration)&&{duration:n.duration},e.t30=(0,e.t1)(e.t28,e.t29),e.t31=null==l||null===(m=l.beacon)||void 0===m?void 0:m.params,e.t32=(0,e.t0)(e.t30,e.t31),w=[e.t32],r({url:(null==l||null===(g=l.beacon)||void 0===g?void 0:g.url)||S.get()+f.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:w}).catch((function(e){return console.error(e)}));case 41:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(e){if(!w.paused()&&w.readyState()>2)return clearInterval(u),clearInterval(v),e;var n,t=e+.1;return+t.toFixed(2)>=5&&g<4&&I?(g++,p("BUFFERING",M({pfm:s,uid:N(),vid:j(),videoPosition:Math.floor(w.currentTime)},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),_({eventName:"BUFFERING",videoPosition:Math.floor(w.currentTime),isAdEvent:!1}),0):t},b=function(){var e=Math.floor(w.currentTime);w.on("error",(function(){var n,t=Math.floor(w.currentTime);clearInterval(u);var o=e===t?"FAILED_TO_START":"DROPPED_STREAM";p(o,M({pfm:s,uid:N(),vid:j(),videoPosition:t},null==l||null===(n=l.beacon)||void 0===n?void 0:n.params)),_({eventName:o,videoPosition:t,isAdEvent:!1})}))},O=function(){var e=B((function(){var e;c=0,v=setInterval((function(){c=T(c)}),V),p("PLAY",M({pfm:s,uid:N(),vid:j(),videoPosition:Math.floor(w.currentTime)},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),_({eventName:"PLAY",videoPosition:Math.floor(w.currentTime),isAdEvent:!1}),o&&o("started_video_playback",{"Video ID":j(),watchTime:Math.floor(w.currentTime)})}));w.one("play",e)},C=function(){w.one("timeupdate",(function(){var e;clearInterval(v),clearInterval(u),m=c||0,p("FIRST_FRAME",M({pfm:s,uid:N(),vid:j(),videoPosition:Math.floor(w.currentTime),ttFirstFrame:c,bufferHealth:h()},null==l||null===(e=l.beacon)||void 0===e?void 0:e.params)),_({eventName:"FIRST_FRAME",videoPosition:Math.floor(w.currentTime),isAdEvent:!1,ttFirstFrame:c,bufferHealth:h()}),I=!0,c=0}))},A=function(){var e=!1;w.on("waiting",B((function(){I&&(e=!0,clearInterval(u),u=setInterval((function(){e&&!w.paused()?m=T(m):clearInterval(u)}),V))}))),w.on("playing",B((function(){e=!1,clearInterval(u)})))},P=function(){var e=function(e){var n,t,o,r=M({videoPosition:Math.floor(w.currentTime),isAdEvent:!0,bufferHealth:h(),pfm:s,uid:N(),vid:j(),resHeight:(null===(n=videoElement)||void 0===n?void 0:n.videoHeight)||null,resWidth:(null===(t=videoElement)||void 0===t?void 0:t.videoWidth)||null},null==l||null===(o=l.beacon)||void 0===o?void 0:o.params);p(e,M({},r)),_(M({eventName:e,adPosition:1},r))};w.on("adstart",(function(){e("AD_REQUEST"),e("AD_IMPRESSION")})),w.on("adskip",(function(){c=0})),w.on("adend",(function(){c=0}))},L=function(){w.on("timeupdate",(function(){var e=Math.floor(w.currentTime());if(e>=30&&e%30==0&&!y.includes(e)){var n,t=null===(n=w.el().getElementsByTagName("video"))||void 0===n?void 0:n[0];g=0,y.push(e),_({eventName:"PING",videoPosition:e,isAdEvent:!1,duration:30,resHeight:(null==t?void 0:t.videoHeight)||null,resWidth:(null==t?void 0:t.videoWidth)||null,bufferHealth:h(),bitrate:E()})}}))};b(),A(),P(),L(),O(),w.on("loadeddata",C)}else console.error("Videojs: Player instance not found.")}var G=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},q=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},Q=function(){var e=a.seasonIdxManager.get();return e>=0?e+1:1},Y=function(){var e,n,t,o=a.getCurrentSeries(),r=a.getCurrentVideo(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,l=a.seasonIdxManager.get(),d=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)===i}));return d>=0?d+1:1};function z(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function K(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?z(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):z(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var X=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},J=function(e){var n=$(e,"video.tags",[]),t=$(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map((function(e){return e.title})).join(","):t},$=function(e,n,t){for(var o=0,r=(n=n.split(".")).length;o<r;o++){var i;e=null===(i=e)||void 0===i?void 0:i[n[o]]}return e||t},Z=function(){var n,t,o,r,a,d,s,u,c,v,p,f,m,g,I,y,w,E,h,_,T,b,S,O,C=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",A=arguments.length>1?arguments[1]:void 0,P=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return C;var L=(null==P?void 0:P.siteName)||"",D=(null==P?void 0:P.contentType)||"video",R=(null==P||null===(o=P[D])||void 0===o?void 0:o.metadata)||(null==P||null===(r=P[D])||void 0===r||null===(a=r.gist)||void 0===a?void 0:a.metadata),k=i.getPlayer(A);if(!C.includes("VIEWLIFT_"))return C;var M,V=window.getComputedStyle(document.getElementById(A),null),j=Math.trunc(V.getPropertyValue("height").slice(0,-2)),F=Math.trunc(V.getPropertyValue("width").slice(0,-2)),N="linearchannel"===D?null==P||null===(d=P.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(u=s.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===u||null===(c=u.content)||void 0===c?void 0:c.id:$(P,"video.gist.id",""),x="linearchannel"===D?null==P||null===(v=P.linearchannel)||void 0===v||null===(p=v.channels)||void 0===p||null===(f=p.find((function(e){return(null==e?void 0:e.id)===(null==P?void 0:P.channelId)})))||void 0===f?void 0:f.title:$(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),W=null,U=null;"function"==typeof window.__gpp&&(null===(M=window)||void 0===M||M.__gpp("ping",(function(e){W=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]})));var B=K(K({},ee(R)),{},(b={VIEWLIFT_WIDTH:F,VIEWLIFT_HEIGHT:j,VIEWLIFT_SIZE:X(F,j),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===(m=window)||void 0===m?void 0:m.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:$(P,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:$(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:$(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(g=k.options_)||void 0===g?void 0:g.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:J(P),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI($(P,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+$(P,"video.gist.permalink","")),VIEWLIFT_CONSENT:l.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:$(null===(y=window)||void 0===y||null===(w=y.app_data)||void 0===w||null===(E=w.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?"":$(null===(h=window)||void 0===h||null===(_=h.app_data)||void 0===_||null===(T=_.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*$(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:$(P,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:x,VIEWLIFT_CONTENT_SERIES_TITLE:$(P,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:$(P,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Y(),VIEWLIFT_SEASON_NUMBER:Q(),VIEWLIFT_CONTENT_TAGS:J(P),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:W||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(b,"VIEWLIFT_LAT",""),e(b,"VIEWLIFT_APP_BUNDLE",""),e(b,"VIEWLIFT_ATT_CONSENT",""),b),null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var H in B){var G=new RegExp(H,"g");C=C.replace(G,B[H])}return C},ee=function(e){var n,t,o,r,i,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map((function(e){d.set(e.name,e.value)})));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,u=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.subscription)||void 0===l?void 0:l.TVE)||!1;return s||u?(q()?s?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):s?a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),s?a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):u&&(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=q()?K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=K(K({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=q()?K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):K(K({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=K(K({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"VIEWLIFT_NIELSEN_APP_ID",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"VIEWLIFT_CHANNEL",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"VIEWLIFT_GRACE_NOTE_ID"})},ne=function(e,n){var t,o,r,i,l,a,d,s,u,c,v,p,f,m=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[m])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[m])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,y=null==e||null===(i=e[m])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.audioAssets,w=(null==e||null===(a=e[m])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(u=e[m])||void 0===u||null===(c=u.liveDetails)||void 0===c||c.isDvrEnabled;var E=(null==e||null===(v=e[m])||void 0===v||null===(p=v.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 oe(y);if(g){var h=re(I,n);return h.src=Z(h.src,n,e),h}if("Safari"!==G()&&E)return te(I);if(w){var _=oe(I);return _.src=Z(_.src,n,e),_}if(null!=I&&I.mpeg){var T=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return T.src=Z(T.src,n,e),T}return null},te=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},oe=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},re=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=G();if(i.getPlayer(n),"Safari"===d){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(r,(function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))}))},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,i){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,(function(e,n,t){console.log(e),e&&i(e),i(null,t)}))}}}}}(r);return ie(n),s}var u,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(u=window)||void 0===u?void 0:u.siteName)?(ie(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ie=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==G()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},le=function(e,n){if(Promise.resolve().then((function(){return require("./error-26d5a3c3.js")})).then((function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)})),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var r=document.createElement("div");r.className="error-container";var i=document.createElement("div");i.className="error-message",i.innerHTML="".concat(n),r.appendChild(i),o.append(r)}}},ae=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var de=!1,se=function(e,n,t){var o=Z(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima)return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,l=i.getPlayer(e);if(null!==l.el_){de=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),de&&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===(r=o.ads)||void 0===r?void 0:r.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 ue,ce=(ue=!0,{enable:function(){ue=!0},disable:function(){ue=!1},get enabled(){return ue}}),ve="ssai-breakStart",pe="ssai-adImpression",fe="ssai-firstQuartile",me="ssai-midpoint",ge="ssai-thirdQuartile",Ie="ssai-complete",ye="ssai-breakEnd",we={breakStart:ve,impression:pe,firstQuartile:fe,midpoint:me,thirdQuartile:ge,complete:Ie,breakEnd:ye};function Ee(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=i.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,r=we[o];r&&t.trigger(r,n)}function he(e){var n,t,o,r,i=e.isLive,l=e.startTimeInSeconds;return i?analytics.StreamingAnalytics.AdvertisementMetadata.LIVE:0==l?analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_POST_ROLL:l===("function"==typeof(null===(t=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.comscorePlayerInstance)||void 0===t?void 0:t.getDuration)&&(null===(r=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.comscorePlayerInstance)||void 0===r?void 0:r.getDuration()))?ns_.analytics.StreamingAnalytics.AdvertisementMetadata.AdvertisementType.ON_DEMAND_POST_ROLL:analytics.StreamingAnalytics.AdvertisementMetadata.ON_DEMAND_MID_ROLL}function _e(){var e,n,t,o,r,i,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&!window.analytics)return console.log("is StreamingAnalytics started Initialised?",function(){var e;return!!(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)||(console.warn("[Comscore] Tag not initialized."),!1)}()),void console.warn("[Comscore] Tag not initialized or analytics missing.");var a=window.analytics,d=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="ad"),d.notifyPause();var s=new a.StreamingAnalytics.AdvertisementMetadata;s.setMediaType(he({isLive:null===(r=null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentOptions)||void 0===r?void 0:r.isLive,startTimeInSeconds:null==l?void 0:l.startTimeInSeconds})),s.setUniqueId(l.id||"ad-001"),s.setLength(1e3*parseInt(l.durationMs,10)||0),s.setTitle(l.title||"Advertisement"),s.setServerCampaignId(l.campaignId),s.setRelatedContentMetadata(null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i?void 0:i.contentMetadata),s.setDeliveryType(a.StreamingAnalytics.AdvertisementMetadata.AdvertisementDeliveryType.NATIONAL),s.setPlacementId(l.placementId);var u={cs_ad_tu:null==l?void 0:l.trackingUrl,ns_st_ami:null==l?void 0:l.creativeId};s.addCustomLabels(u),d.setMetadata(s),d.notifyPlay(),console.log("[Comscore] Ad started:",l)}function Te(){var e,n;(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef)&&((null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef).notifyPause(),console.log("[Comscore] Ad Finished. Resumed content playback."))}function be(){var e,n,t,o,r;if(null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.tagRef){var i=null===(n=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===n?void 0:n.tagRef;i.notifyPause(),i.notifyEnd(),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.mode="content"),(null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.contentMetadata)&&(i.setMetadata(null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.contentMetadata),i.notifyPlay()),console.log("[Comscore] Ad ended. Resumed content playback.")}}function Se(e){return{id:null==e?void 0:e.adId,adTitle:null==e?void 0:e.adTitle,adDuration:(null==e?void 0:e.durationInSeconds)||0,startTimeInSeconds:(null==e?void 0:e.startTimeInSeconds)||0,campaignId:null==e?void 0:e.campaignId,placementId:null==e?void 0:e.placementId,trackingUrl:null==e?void 0:e.trackingUrl}}function Oe(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 Ce(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Oe(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Oe(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}function Ae(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 Pe(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)?Pe(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,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,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function Pe(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}window.__COMSCORE__||(window.__COMSCORE__={tagRef:null,contentMetadata:null,playerInstance:null,mode:"content",cleanupFns:[],contentOptions:null}),o.registerPlugin("comscore",(function(e){console.log(this),console.log("hello form comscore plugin",e);var n=e||{};!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;new Promise((function(t,o){var r=document.createElement("script");r.src=n||"https://appcms.staging.asset.viewlift.com/comscore.js",r.async=!0,document.head.appendChild(r),r.onload=function(){!function(e){var n=e.publisherId,t=e.persistentLabels;if(!window.ns_||!window.ns_.analytics)throw new Error("Comscore library not loaded or analytics reference missing");var o=window.ns_.analytics;o.PlatformApi.setPlatformAPI(o.PlatformApi.PlatformApis.WebBrowser);var r=new o.configuration.PublisherConfiguration({publisherId:String(n),persistentLabels:{cs_ucfr:(null==t?void 0:t.userConsent)||"",cs_fpid:(null==t?void 0:t.userId)||""}});o.configuration.addClient(r),o.configuration.enableFirstPartyCookie(),o.configuration.enableImplementationValidationMode(),o.start(),console.log("[Comscore] Library initialized for publisher:",n),window.analytics=o}({publisherId:e||"40813950"})},r.onerror=function(e){o("Error while loading script ".concat(src," : ").concat(e))}}))}(n.publisherId,n.endpoint)}));var Le,De=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),Re=(Le=null,{set:function(e){Le=e},get position(){return Le}});function ke(e,n){return Me.apply(this,arguments)}function Me(){return(Me=n(t.mark((function e(n,o){var r,l,a,d,s,u,v,p,f,m,g,I,y,w,E,h,_,T;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),a=ne(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(r=o[s])||void 0===r||null===(l=r.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=Z(u,n,o),v=je(u),p=c(v,2),f=p[0],m=p[1],g=Ve(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach((function(e){var n=c(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(Ce({adsParams:Ce({},f)},g))});case 14:return I=e.sent,e.next=17,I.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,E=y.trackingUrl,h=y.manifestUrl,_=w+E,T=w+h,De.set(_),console.log("%c TRACKING URL","background: #bdf369; color: #000",_),a.src=T,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 Ve(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map((function(e){var n=c(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]})))||{}}function je(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Ae((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=c(t.value,2),l=i[0],a=i[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){r.e(e)}finally{r.f()}for(var d={},s={},u=0,v=Object.entries(n);u<v.length;u++){var p=c(v[u],2),f=p[0],m=p[1];if(f.startsWith("ads."))d[f.replace(/^ads\./,"")]=m;else s[f]=m}return[d,s]}var Fe,Ne,xe,We,Ue=(Fe=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),Fe=Array.isArray(e)?u(e):Fe},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",Fe),u(Fe)}}),Be=new Map;function He(e,n){return Ge.apply(this,arguments)}function Ge(){return Ge=n(t.mark((function e(o,r){var l,a,d,c,v,p,f,m,g,I,y,w,E,h,_,T,b,S,O,C,A,P;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:P=function(e,n,t,r,l,a){var d=i.getPlayer(o);if(!d.seeking()){n.startTimeInSeconds,n.durationInSeconds,Math.floor(d.currentTime());var s,u=Ae(t);try{var c=function(){var t,i,u,c=s.value,v=c.eventType,p=c.beaconUrls,f=c.startTimeInSeconds,m=c.startTime,g=c.durationInSeconds,I=f||0,y=p,w=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(u=i.ads)||void 0===u?void 0:u.adEventHandler)||null,E="".concat(I,"_").concat(v),h=Be.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",v,"condition1:",e>=I,"map:",Be),e>=I&&!h.includes(E)){h.push(E),Be.set("pod-".concat(l),h);try{A(v,n,y,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,v,n)}if("breakEnd"==v){var _=Re.position;Re.set(null),setTimeout((function(){null!=_&&(d.currentTime(_),a())}),500)}if("function"==typeof w)try{var T,b={eventType:v,startTimeInSeconds:f,startTime:m,durationInSeconds:g,ad:null==n||null===(T=n.ads)||void 0===T?void 0:T[r],adIndex:r};w({adsData:b}),Ee(o,b)}catch(e){console.error("Error when calling ads callback:",e)}if("impression"===v){var S,O=De.get();_e(Se(Ce(Ce({},null==n||null===(S=n.ads)||void 0===S?void 0:S[r]),{},{trackingUrl:O})))}else"complete"===v?Te():"breakEnd"===v&&be()}};for(u.s();!(s=u.n()).done;)c()}catch(e){u.e(e)}finally{u.f()}}},A=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach((function(e){fetch(e,{mode:"no-cors"}).catch((function(n){console.warn("Beacon failed:",e,n)}))}))},C=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Be.clear(),Re.set(r),g=De.get(),(I=i.getPlayer(o)).one("loadeddata",(function(){g&&O(g)})),y=new Map,w=new Map,E=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,_=(null==I||null===(d=I.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==I||null===(c=I.controlBar)||void 0===c?void 0:c.getChild("seriesV2"))||null,b=(null==I||null===(v=I.el())||void 0===v||null===(p=v.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===p?void 0:p[0])||null,S=(null==I||null===(f=I.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e=n(t.mark((function e(n){var l,a,d,c,v,p,f,m,g,I,O,A,L,D,R,k,M,V,j,F;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return k=function(e){document.removeEventListener("pointermove",R),document.removeEventListener("pointerup",k),0===e.button&&L()},R=function(e){},D=function(){var e,n=I.currentTime(),t=null,o=Ae(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=(r.ads,Math.floor(i+l));n>=i&&n<=a&&(t=a,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout((function(){I.currentTime(t+2.2)}),100))},L=function(){var e,n=I.currentTime(),t=null,o=Ae(g);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,d=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>i)&&!y.has(i)||n>=i&&n<=d)&&(t=i,y.set(i,!0),w.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout((function(){I.currentTime(t+.4)}),100))},v=!1,e.next=7,fetch(n);case 7:return p=e.sent,e.next=10,p.json();case 10:f=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",f),m=f.avails,g=[],I=i.getPlayer(o),O=I.controlBar.progressControl,A=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),m.map((function(e,n){var t,o,r;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(v=!0),g.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(o=e.adBreakTrackingEvents)||void 0===o||null===(r=o.filter((function(e){return"breakStart"==(null==e?void 0:e.eventType)})))||void 0===r?void 0:r[0])||[]})})),!v&&r&&(I.currentTime(r),D()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g),console.log(g,"data"),g.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=I.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",A.appendChild(i)}})),I._timeUpdateHandler&&I.off("timeupdate",I._timeUpdateHandler),I._timeUpdateHandler=s.throttle((function(){var e=I.currentTime();if(e!==E){E=e;for(var n=!1,t=function(){var t=g[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&y.set(r,!0),ce.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")),_&&(_.el().style.pointerEvents="none",_.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 d=e-r,s=0,c=0,v=0;v<l.length;v++){var p,f=null==l||null===(p=l[v])||void 0===p?void 0:p.durationInSeconds;if(d<s+f){c=v;break}s+=f}l[c];var m=Math.max(0,i-d),I=Math.round(m);M.style.display="block",F.textContent="".concat(c+1," of ").concat(l.length," • ").concat(C(I));var E=[];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)}));E.push.apply(E,u(n))})),Array.isArray(l)&&0==(null==l?void 0:l.length)&&E.push(null==t?void 0:t.podSlotImpressionBeacon),P(e,t,E,c,o,D),"break"}w.delete(r)},o=0;o<g.length;o++){if("break"===t())break}n||(M.style.display="none",O.el().classList.remove("hide-progress-bar"),_&&(_.el().style.pointerEvents="auto",_.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")),ce.enable())}}),1e3),I.on("timeupdate",I._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",(function(e){ce.enabled&&"ArrowRight"==e.key&&(L(),nn(o,10),e.stopPropagation())})),O.el().addEventListener("pointerdown",(function(e){0===e.button&&(document.addEventListener("pointermove",R),document.addEventListener("pointerup",k))})),null===(d=document)||void 0===d||null===(c=d.querySelectorAll(".ssai-ad-container"))||void 0===c||c.forEach((function(e){return null==e?void 0:e.remove()})),(M=document.createElement("div")).className="ssai-ad-container",(V=document.createElement("div")).className="sponsored-adbox",(j=document.createElement("div")).className="sponsored-text",j.textContent="Sponsored Ad",V.append(j),(F=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",M.append(V),M.append(F),I.el().appendChild(M);case 45:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();case 18:case"end":return e.stop()}}),e)}))),Ge.apply(this,arguments)}function qe(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,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,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,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}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}function Ye(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function ze(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ye(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}var Ke={},Xe=(null===(Ne=window)||void 0===Ne||null===(xe=Ne.location)||void 0===xe||null===(We=xe.search)||void 0===We?void 0:We.includes("debug=true"))||!1,Je=null;function $e(e){return Ze.apply(this,arguments)}function Ze(){return Ze=n(t.mark((function e(o){var r,l,a,d,c,v,p,f,m,g,I,y,w,E,h,_,T,b,S,O,C,A,P,L,D,R,k;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,r,l){var a=i.getPlayer(o);if(!a.seeking()){var d=n.startTimeInSeconds;n.durationInSeconds,Math.floor(a.currentTime());var s,u=qe(t);try{for(u.s();!(s=u.n()).done;){var c,v,p,f=s.value,m=f.eventType,g=f.beaconUrls,I=f.startTimeInSeconds,y=f.startTime,w=f.durationInSeconds,E=f.eventId,h=I||0,_=g,T=(null===(c=window)||void 0===c||null===(v=c.customData)||void 0===v||null===(p=v.ads)||void 0===p?void 0:p.adEventHandler)||null,b="".concat(E,"_").concat(m),S="pod-".concat(d);L.has(S)||L.set(S,new Set);var O=L.get(S);if(Xe&&console.warn(e,h,"map:",m,"condition1:",e>=h,"map:",L),e>=h&&e<=h+D&&!O.has(b)){O.add(b);try{R(m,n,_,a)}catch(e){console.error("Error when calling triggerAdBeacon:",e,m,n)}if("function"==typeof T)try{var C,A={eventType:m,startTimeInSeconds:I,startTime:y,durationInSeconds:w,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[r],adIndex:r};T({adsData:A}),Ee(o,A)}catch(e){console.error("Error when calling ads callback:",e)}}}}catch(e){u.e(e)}finally{u.f()}}},R=function(e,n,t,o){var r,i;"breakEnd"===e&&(null===(r=Ke)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(i=Ke)||void 0===i?void 0:i.totalAds)||(Xe&&(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)}))})))},I=function(){Je&&clearInterval(Je)},m=De.get(),(g=i.getPlayer(o)).one("loadeddata",(function(){I(),Je=setInterval((function(){m&&!g.paused()&&P(m)}),2e3)})),g.on("dispose",(function(){I()})),y=new Map,w=new Map,E=-1,h=null,_=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==g||null===(a=g.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,O=(null==g||null===(p=g.el())||void 0===p||null===(f=p.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,C=!1,A=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 u(o);var r=[],i=null==o?void 0:o.find((function(e){return"breakEnd"===(null==e?void 0:e.eventType)})),l=(null==i||null===(e=i.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 c=null==d?void 0:d.map((function(e){return ze(ze({},e),{},{eventType:"videoView",beaconUrls:[l]})}));null!=c&&c[0]&&r.push(null==c?void 0:c[0])}return r},P=function(){var e=n(t.mark((function e(n){var r,l,a,d,c,v,p,f,m,g;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,c=d.avails,v=d.nextToken||null,h=v,p=[],f=i.getPlayer(o),m=f.controlBar.progressControl,g=m.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach((function(e){return null==e?void 0:e.remove()})),c.map((function(e,n){p.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})})),Xe&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",p),null!=p&&p.length&&(window.adsQueueList=p),p.forEach((function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",g.appendChild(i)}})),f._timeUpdateHandler&&f.off("timeupdate",f._timeUpdateHandler),f._timeUpdateHandler=s.throttle((function(){var e=f.currentTime();if(e!==E){E=e;for(var n=function(){var n=p[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,l=o+r;if(e>=o-1.2&&e<=l+1.2){var a;C=!!(e>=o&&e<=l&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>l&&y.set(o,!0),ce.disable(),_&&_.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.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")),m.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,c=0,v=0;v<i.length;v++){var f,g=null==i||null===(f=i[v])||void 0===f?void 0:f.durationInSeconds;if(d<s+g){c=v;break}s+=g}setTimeout((function(){Ke.totalAds=null==i?void 0:i.length,Ke.currentAdIndex=c}),1e3);var I=[];return null==i||i.forEach((function(e){var n=e.trackingEvents.filter((function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)}));I.push.apply(I,u(n))})),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&I.push.apply(I,u(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,I,c),"break"}w.delete(o)},t=0;t<p.length;t++){if("break"===n())break}C||(Ke={},m.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")),_&&_.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),ce.enable())}}),1e3),f.on("timeupdate",f._timeUpdateHandler);case 23:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),L=new Map,D=2.5;case 22:case"end":return e.stop()}}),e)}))),Ze.apply(this,arguments)}function en(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 nn=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},tn=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},on=function(e){return!!o.getPlayer("".concat(e))},rn=function(){var e=n(t.mark((function e(o,r){var l,d,s,u=arguments;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,D();case 3:return d=e.sent,s=i.getPlayer(o),e.abrupt("return",new Promise((function(e,i){var u=(null==r?void 0:r.programs)||[];null==r||delete r.programs,h(r,d).then(function(){var i=n(t.mark((function n(i){var d,c,v,p,f,m,g,I;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==i?void 0:i.data,window.sid=F(),m.contentType="linearchannel",m.channelId=null==r?void 0:r.channelId,g=(null==m||null===(d=m.linearchannel)||void 0===d?void 0:d.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(v=c.app_data)||void 0===v||null===(p=v.appcmsMain)||void 0===p||null===(f=p.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,I=ne(m,o),!g){n.next=11;break}return n.next=9,ke(o,m);case 9:I=n.sent,l=!0;case 11:a.setCurrentVideo(m),a.setCurrentEpgPrograms(u),sessionStorage.setItem("program_switched",!0),I&&l?(dn(o,I),g&&$e(o),s.on("loadstart",(function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})}))):e({status:!0,msg:"Feed authenticated",response:m});case 15:case"end":return n.stop()}}),n)})));return function(e){return i.apply(this,arguments)}}()).catch((function(e){i({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)}}(),ln=function(){var e=n(t.mark((function e(o,r,l){var s,u,c,v,p,f,m;return t.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:return v=e.sent,(a.getCurrentSeries()||null)&&a.setVideoIdxById(r),p=0,f=0,m=null,null!==(s=window)&&void 0!==s&&s.watchHistory&&null!==(u=window)&&void 0!==u&&null!==(c=u.watchHistory)&&void 0!==c&&c.enable&&T(r,v).then((function(e){var n,t,o,r,i,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),p=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)})).catch((function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))})),e.abrupt("return",new Promise((function(e,l){E(r,v).then(function(){var r=n(t.mark((function n(r){var s,u,c,v,g,I,y,w,E,h,_,T,b,S,O,C,A,P,L,D,R,k,M,V,j,F,N,x,W,U,B,H,G,q,Q,Y,z,K;return t.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(C=null==r?void 0:r.data,A=(null==C?void 0:C.contentType)||"video",P=(null==C||null===(s=C[A])||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(c=u.app_data)||void 0===c||null===(v=c.appcmsMain)||void 0===v||null===(g=v.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,L=(null==C||null===(I=C.video)||void 0===I||null===(y=I.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,a.setCurrentVideo(r.data),(D=(null==C||null===(w=C.ads)||void 0===w||null===(E=w.preRoll)||void 0===E||null===(h=E.adTags)||void 0===h||null===(_=h.web)||void 0===_?void 0:_.active)&&(null==C||null===(T=C.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(S=b.adTags)||void 0===S||null===(O=S.web)||void 0===O?void 0:O.url))&&se(o,D,C),R=ne(C,o),!P){n.next=12;break}return n.next=11,ke(o,C);case 11:R=n.sent;case 12:R?(H=(null==C||null===(k=C.video)||void 0===k||null===(M=k.gist)||void 0===M?void 0:M.videoImageUrl)||(null==C||null===(V=C.video)||void 0===V||null===(j=V.gist)||void 0===j||null===(F=j.imageGist)||void 0===F?void 0:F.r16x9),(G=i.getPlayer(o)).poster(H),dn(o,R),P&&He(o,m),G.on("loadstart",(function(){L&&e({status:!0,msg:"Video Loaded",response:C})})),G.on("loadeddata",(function(){ae(),e({status:!0,msg:"Video Loaded",response:C})})),G.one("play",(function(){p&&!P&&f<95&&setTimeout((function(){G.currentTime(p)}),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==C||null===(N=C.video)||void 0===N||null===(x=N.contentDetails)||void 0===x||null===(W=x.closedCaptions)||void 0===W?void 0:W.length)>0||(null==C||null===(U=C.video)||void 0===U||null===(B=U.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==C||null===(Q=C.video)||void 0===Q||null===(Y=Q.contentDetails)||void 0===Y?void 0:Y.closedCaptions)||(null==C||null===(z=C.video)||void 0===z?void 0:z.closedCaptions),q=K.filter((function(e){return"VTT"===e.format})),d.addCaptions(o,q)):d.removeCaptions(o)):(le(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 r.apply(this,arguments)}}()).catch((function(e){sn(e,o,l,r)}))})));case 10:case"end":return e.stop()}}),e)})));return function(n,t,o){return e.apply(this,arguments)}}(),an=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()},dn=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},sn=function(n,t,o,r){var i,l,a,d,s,u,c=null==n||null===(i=n.response)||void 0===i||null===(l=i.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);on(t)&&le(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?en(Object(o),!0).forEach((function(t){e(n,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):en(Object(o)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}))}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))};exports.adsQueuePointManager=Ue,exports.authenticateLC=rn,exports.baseUrlManager=S,exports.clearError=ae,exports.createSeriesWatchMap=function(e,n){var t=new Map;b({videoId:e,token:n}).then((function(e){e.data.map((function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})})),a.setSeriesWatchMap(t)})).catch((function(e){return console.log(e)}))},exports.detectBrowser=G,exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=i.getPlayer(e);if(an(),function(){var e,n,t,o,r,i,l,a,d,s;if(null===(n=null===(e=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===e?void 0:e.comscoreCleanupFns)||void 0===n||n.forEach((function(e){return e()})),null===(t=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===t||(t.comscoreCleanupFns=[]),console.log("comscoreTag",null===(o=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===o?void 0:o.tagRef),null===(r=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===r?void 0:r.tagRef){try{null===(i=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===i||i.tagRef.notifyEnd()}catch(e){}null===(l=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===l||(l.tagRef=null),null===(a=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===a||(a.comscorePlayerInstance=null),null===(d=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===d||(d.contentMetadata=null),null===(s=null===window||void 0===window?void 0:window.__COMSCORE__)||void 0===s||(s.mode="content"),console.log("[Comscore] Streaming Tag destroyed.")}}(),s.clearEventListeners(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},exports.getDecodedToken=R,exports.getEntitlementData=function(e,n,t,o){return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},exports.getEpisodeNumber=Y,exports.getLinearChannelDetails=h,exports.getSGAIEnabledSource=ke,exports.getSeasonNumber=Q,exports.getSeriesDetails=function(e,n){var t,o,i=R(n),l=(null==i?void 0:i.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise((function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})})):r({url:S.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=b,exports.getSource=ne,exports.getSsaiEvents=function(e){var n=i.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(ve,e)},adImpression:function(e){return t(pe,e)},adFirstQuartile:function(e){return t(fe,e)},adMidpoint:function(e){return t(me,e)},adThirdQuartile:function(e){return t(ge,e)},adComplete:function(e){return t(Ie,e)},adBreakEnd:function(e){return t(ye,e)}}},exports.getToken=D,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:o}},exports.getUserId=N,exports.getVideoDetails=E,exports.getVideoInfo=T,exports.handleError=le,exports.initialiseAdvertisement=se,exports.initialiseKeyboardEvents=function(e,n){var t,o,r,l=i.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===(r=document)||void 0===r||r.addEventListener("keydown",(function(t){var o,r,i,s,u,c,v,p,f;if(ce.enabled&&"input"!=t.target.localName){var m=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(m)&&(t.preventDefault(),null==d||d.focus()),m){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||tn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(s=i.appcmsMain)||void 0===s||null===(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!==(p=v.appcmsMain)&&void 0!==p&&null!==(f=p.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||nn(e,10)}}}),!0)},exports.initiateErrorHandling=sn,exports.inititateBeacon=function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"localhost"!==location.hostname&&"127.0.0.1"!==location.hostname&&H(e,n,t)},exports.isMobile=q,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=on,exports.isTokenExpired=O,exports.load=ln,exports.loadVideo=dn,exports.loadVideoInstantly=function(e,n,t){var o=i.getPlayer(e);return o.src(n),new Promise((function(e,n){var r=0;o.one("loadedmetadata",(function(){clearTimeout(r),e({status:!0,msg:"video loaded"})})),o.one("loadstart",(function(e){r=setTimeout((function(){n("FAILED: Took too long to load")}),t)}))}))},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=A,exports.rewind=tn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],v("js",new Date),v("config",e)},exports.saveWatchHistory=_,exports.setupAdvertisementMarkers=He,exports.setupAdvertisementMarkersForLinear=$e,exports.skip=nn,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=Be;
|