@viewlift/player-backup 2.0.268-backup → 2.0.269-backup

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/cjs/{autoNextVideo-509e6228.js → autoNextVideo-a0684b2e.js} +1 -1
  2. package/cjs/bundle.css +772 -772
  3. package/cjs/{features-2a457d5b.js → features-5af9462c.js} +1 -1
  4. package/cjs/generic-9ede01a7.js +1 -0
  5. package/cjs/index-3ab4a71e.js +1 -0
  6. package/cjs/{index-9d25f2c1.js → index-daed42a3.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-2e528142.js → multicamv2-36e8ec8a.js} +1 -1
  9. package/cjs/{multicamv2-a20d415c.js → multicamv2-7a48b087.js} +1 -1
  10. package/cjs/{nextEpisodeButton-2b96c8f7.js → nextEpisodeButton-e749739c.js} +1 -1
  11. package/cjs/{playlist-769b630e.js → playlist-d805fa90.js} +1 -1
  12. package/cjs/{series-8bf8c9e0.js → series-354a0322.js} +1 -1
  13. package/cjs/{series-v2-1488458a.js → series-v2-4b0ad742.js} +1 -1
  14. package/cjs/{series-v2-61844655.js → series-v2-4c5d40a8.js} +1 -1
  15. package/cjs/{skin-064df3a0.js → skin-210f2812.js} +1 -1
  16. package/cjs/{skin-89130570.js → skin-25675970.js} +1 -1
  17. package/cjs/{skin-14a3a4f1.js → skin-2fabea5e.js} +1 -1
  18. package/cjs/{skin-3a067c3a.js → skin-7149e823.js} +1 -1
  19. package/cjs/{skin-90812f3f.js → skin-b237d7b1.js} +1 -1
  20. package/cjs/{skin-848294e2.js → skin-baa82c8e.js} +1 -1
  21. package/cjs/{skin-abf69bec.js → skin-c500edc5.js} +1 -1
  22. package/cjs/{skin-013181d1.js → skin-c661670e.js} +1 -1
  23. package/cjs/{skin-b130340a.js → skin-da2bf9bc.js} +1 -1
  24. package/cjs/{util-6c68bfbb.js → util-8ad9d630.js} +1 -1
  25. package/cjs/{videoSelector-0f7ec82d.js → videoSelector-57152f21.js} +1 -1
  26. package/cjs/{videoSelector-dad7e0d5.js → videoSelector-68d8d84e.js} +1 -1
  27. package/esm/apis/index.d.ts +11 -0
  28. package/esm/assets/icons.d.ts +22 -0
  29. package/esm/autoNextVideo-6ab2b97a.js +1 -0
  30. package/esm/bundle.css +772 -772
  31. package/esm/components/advertisement/advertisement.d.ts +1 -0
  32. package/esm/components/auto-next-video/autoNextVideo.d.ts +2 -0
  33. package/esm/components/big-mute-btn/index.d.ts +9 -0
  34. package/esm/components/broadcaster_image/index.d.ts +1 -0
  35. package/esm/components/caption-settings/caption-settings.d.ts +14 -0
  36. package/esm/components/dvr-seekbar/index.d.ts +14 -0
  37. package/esm/components/multicam/multicam.d.ts +18 -0
  38. package/esm/components/multicam-v2/multicamv2.d.ts +13 -0
  39. package/esm/components/multicam-v2_TEMP/multicamv2.d.ts +13 -0
  40. package/esm/components/next-ep-preview/next-ep-preview.d.ts +1 -0
  41. package/esm/components/next-episode/nextEpisodeButton.d.ts +13 -0
  42. package/esm/components/playlist-tray/playlist.d.ts +15 -0
  43. package/esm/components/quality-selector/index.d.ts +1 -0
  44. package/esm/components/resolution/resolution.d.ts +19 -0
  45. package/esm/components/series/series.d.ts +10 -0
  46. package/esm/components/series-v2/helper.d.ts +3 -0
  47. package/esm/components/series-v2/series-v2.d.ts +25 -0
  48. package/esm/components/series-v2_TEMP/helper.d.ts +1 -0
  49. package/esm/components/series-v2_TEMP/series-v2.d.ts +21 -0
  50. package/esm/components/settings-icon/settings-icon.d.ts +17 -0
  51. package/esm/components/timer/index.d.ts +5 -0
  52. package/esm/components/trickplay/helper.d.ts +13 -0
  53. package/esm/components/trickplay/index.d.ts +1 -0
  54. package/esm/components/trickplay/videojs.thumbnails.d.ts +1 -0
  55. package/esm/components/video-selector/videoSelector.d.ts +18 -0
  56. package/esm/components/video-selector_TEMP/videoSelector.d.ts +16 -0
  57. package/esm/components/watch-history/handleWatchHistory.d.ts +2 -0
  58. package/esm/contentHandler/content_types/epg.d.ts +4 -0
  59. package/esm/contentHandler/content_types/external.d.ts +4 -0
  60. package/esm/contentHandler/content_types/index.d.ts +5 -0
  61. package/esm/contentHandler/content_types/series.d.ts +4 -0
  62. package/esm/contentHandler/content_types/vod.d.ts +4 -0
  63. package/esm/contentHandler/firePlayer.d.ts +4 -0
  64. package/esm/core/captions.d.ts +10 -0
  65. package/esm/core/generic.d.ts +48 -0
  66. package/esm/core/player_instance.d.ts +6 -0
  67. package/esm/core/renditions.d.ts +6 -0
  68. package/esm/core/util.d.ts +19 -0
  69. package/esm/core/volume.d.ts +2 -0
  70. package/esm/dash/dashHandler.d.ts +1 -0
  71. package/esm/dash/linear_ssai.d.ts +1 -0
  72. package/esm/dash/sgai.d.ts +10 -0
  73. package/esm/{features-06330d47.js → features-b3526a7a.js} +1 -1
  74. package/esm/features.d.ts +31 -0
  75. package/esm/generic-740ffc07.js +1 -0
  76. package/esm/globalPlayerEvents.d.ts +8 -0
  77. package/esm/helpers/browser.d.ts +2 -0
  78. package/esm/helpers/currentVideoInfo.d.ts +19 -0
  79. package/esm/helpers/errorHandling.d.ts +2 -0
  80. package/esm/helpers/loader.d.ts +2 -0
  81. package/esm/helpers/localisation.d.ts +2 -0
  82. package/esm/helpers/scriptLoader.d.ts +2 -0
  83. package/esm/helpers/secondary-switching.d.ts +1 -0
  84. package/esm/helpers/skin.d.ts +20 -0
  85. package/esm/helpers/sourceRetriever.d.ts +11 -0
  86. package/esm/helpers/ssaiEventHandler.d.ts +27 -0
  87. package/esm/helpers/token.d.ts +10 -0
  88. package/esm/index-26dcbfc3.js +1 -0
  89. package/esm/index-7fc3bd1b.js +1 -0
  90. package/esm/index.d.ts +39 -0
  91. package/esm/index.js +1 -1
  92. package/esm/{multicamv2-d68842ee.js → multicamv2-dd70a6aa.js} +1 -1
  93. package/esm/{multicamv2-acd74932.js → multicamv2-f85dfa0b.js} +1 -1
  94. package/esm/{nextEpisodeButton-338de4e8.js → nextEpisodeButton-4ceda14d.js} +1 -1
  95. package/esm/playlist-b267f666.js +1 -0
  96. package/esm/plugins/chromecast.d.ts +18 -0
  97. package/esm/plugins/comscore_dist/index.d.ts +50 -0
  98. package/esm/plugins/index.d.ts +2 -0
  99. package/esm/plugins/library.d.ts +8 -0
  100. package/esm/plugins/videojs-dash5.es.d.ts +51 -0
  101. package/esm/plugins/videojs_contrib_dash.d.ts +51 -0
  102. package/esm/{series-535d9397.js → series-8fd3310e.js} +1 -1
  103. package/esm/{series-v2-7de596f8.js → series-v2-752ab4ec.js} +1 -1
  104. package/esm/{series-v2-fa13b138.js → series-v2-ac589b22.js} +1 -1
  105. package/esm/skin/carousel/skin.d.ts +1 -0
  106. package/esm/skin/default/events.d.ts +1 -0
  107. package/esm/skin/default/skin.d.ts +1 -0
  108. package/esm/skin/defaultV2/events.d.ts +1 -0
  109. package/esm/skin/defaultV2/skin.d.ts +1 -0
  110. package/esm/skin/index.d.ts +1 -0
  111. package/esm/skin/mini/events.d.ts +1 -0
  112. package/esm/skin/mini/skin.d.ts +1 -0
  113. package/esm/skin/minimalist/skin.d.ts +1 -0
  114. package/esm/skin/multiplayer/events.d.ts +1 -0
  115. package/esm/skin/multiplayer/skin.d.ts +1 -0
  116. package/esm/skin/news/events.d.ts +1 -0
  117. package/esm/skin/news/skin.d.ts +1 -0
  118. package/esm/skin/news_live/events.d.ts +1 -0
  119. package/esm/skin/news_live/skin.d.ts +1 -0
  120. package/esm/skin/vl_one/events.d.ts +1 -0
  121. package/esm/skin/vl_one/skin.d.ts +1 -0
  122. package/esm/{skin-479a40b3.js → skin-2e4d0ad8.js} +1 -1
  123. package/esm/skin-6a775f92.js +1 -0
  124. package/esm/{skin-665917ca.js → skin-765a4c47.js} +1 -1
  125. package/esm/skin-8a65a5d9.js +1 -0
  126. package/esm/skin-a08c5bc3.js +1 -0
  127. package/esm/{skin-f83590a2.js → skin-a625396e.js} +1 -1
  128. package/esm/{skin-fd7cd709.js → skin-bd79d907.js} +1 -1
  129. package/esm/skin-c998863a.js +1 -0
  130. package/esm/skin-cf049658.js +1 -0
  131. package/esm/{util-40db3943.js → util-e0435c60.js} +1 -1
  132. package/esm/utilities/analytics.d.ts +3 -0
  133. package/esm/utilities/beacon.d.ts +3 -0
  134. package/esm/utilities/comscore.d.ts +5 -0
  135. package/esm/utilities/controlsColor.d.ts +1 -0
  136. package/esm/utilities/conviva.d.ts +5 -0
  137. package/esm/utilities/keyboardShortcuts.d.ts +5 -0
  138. package/esm/utilities/replaceMacros.d.ts +1 -0
  139. package/esm/videoSelector-f86775c4.js +1 -0
  140. package/esm/videoSelector-fd411c45.js +1 -0
  141. package/package.json +1 -1
  142. package/cjs/generic-b9f32717.js +0 -1
  143. package/cjs/index-1b56425c.js +0 -1
  144. package/esm/autoNextVideo-281b09dd.js +0 -1
  145. package/esm/generic-355cc8c6.js +0 -1
  146. package/esm/index-1a4369e9.js +0 -1
  147. package/esm/index-66169052.js +0 -1
  148. package/esm/playlist-d3eb7e41.js +0 -1
  149. package/esm/skin-02bec45a.js +0 -1
  150. package/esm/skin-6819b99b.js +0 -1
  151. package/esm/skin-68558a96.js +0 -1
  152. package/esm/skin-9638eb22.js +0 -1
  153. package/esm/skin-f9f02a42.js +0 -1
  154. package/esm/videoSelector-465a0eee.js +0 -1
  155. package/esm/videoSelector-97f0b9a4.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),n=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/regenerator"),o=require("video.js"),r=require("axios"),i=require("./skin-c97f0eea.js"),l=require("./browser-77c57718.js"),a=require("md5"),d=require("js-cookie"),u=require("./captions-80f6eb66.js"),s=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),m=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e,n){p("event",e,n)}var g={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function y(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 h(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?y(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):y(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var w={name:"@viewlift/player-backup",version:"2.0.268-backup",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^1.0.13",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=w.version;var I,E=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":P.get()+"".concat(null==g?void 0:g.getVideoDetails)},T=function(e,n){var t,o,i,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:E(),params:h({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":w.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},b=function(e,n){var t,o,i,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):r({url:P.get()+g.getLinearChannelDetails,params:h(h(h(h(h({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},(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",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},_=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,B();case 2:return o=e.sent,e.abrupt("return",r({url:P.get()+"".concat(null==g?void 0:g.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:h({},n),params:h({},(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)}}(),S=function(e,n){var t,o,i=window.contentType;return r({method:"GET",url:P.get()+"".concat(null==g?void 0:g.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})},O=function(e){var n=e.videoId;return r({method:"GET",url:P.get()+"".concat(null==g?void 0:g.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},P=(I=null==g?void 0:g.apiBaseUrl,{set:function(e){e&&(I=e)},get:function(){return I}}),D=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},A=null;function k(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var L,C,j,F,R,x,V,N=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=k().get(),o=P.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)}}(),W=null,B=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"))||!D(n)){e.next=6;break}return W||(W=N().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&&k().set(i),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){W=null})),e.abrupt("return",W);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),M=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},U=(x=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;x.set(t,(x.get(t)||0)+1)},get:function(e){return x.get(e)},clear:function(){x.clear()}}),H=function(e){C=e},G=function(){return C},q=function(){return L},Y=function(e){j=e},Q=function(e){if(F){var n=F.get(e);Y(n+1)}},z=(V=0,{set:function(e){e>=0&&(V=e)},get:function(){return V}});function K(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function X(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var J=0,$=null,Z=function(){var e,n,t,o,r,i,l,a=G();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(r=a.video)||void 0===r||null===(i=r.gist)||void 0===i?void 0:i.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ee(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ne(){return $||window.sessionStorage.getItem("uid")}function te(){return oe.apply(this,arguments)}function oe(){return(oe=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function re(e){return e?String(e):""}window.initialise=function(e){window.sid=ee(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,o,r,i=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,f(i?"FAILED_TO_START":"DROPPED_STREAM",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(r=o.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:n===i?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,r,i;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),f("PLAY",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(i=r.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",X({"Video ID":Z(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var r,i,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&J<4)J++,f("BUFFERING",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,f("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,o,r,i,l;f("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),f("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Z()},null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(J=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),r=0;r<o.length;r++){var i=o.start(r),l=o.end(r);if(ie(n,i,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var ie=function(e,n,t){return e>=n&&e<=t},le=function(){var e,n=G(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var o,i,l,a,d,u,s,c,v,m,p,f,y,h,w,I,E,T,b,_,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return E=e.sent,T=M(E),b=null==T?void 0:T.site,_=null==T?void 0:T.siteId,e.t0=X,e.t1=X,e.t2=X({aid:b,cid:_,pfm:window.platform},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(l=i.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=ne(),e.t5=Z(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?re(n.adPosition):"",e.next=26,te();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=le())&&void 0!==m?m:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(y=f.beacon)||void 0===y?void 0:y.params,e.t33=(0,e.t0)(e.t31,e.t32),S=[e.t33],r({url:(null===(h=window)||void 0===h||null===(w=h.customData)||void 0===w||null===(I=w.beacon)||void 0===I?void 0:I.url)||P.get()+g.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:S}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ae=function(){var e=z.get();return e>=0?e+1:1},de=function(){var e,n,t,o=q(),r=G(),i=null==r||null===(e=r.video)||void 0===e?void 0:e.id,l=z.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===i});return a>=0?a+1:1};function ue(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 se(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ue(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ue(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var ce=a,ve=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},me=function(e){var n=pe(e,"video.tags",[]),t=pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},pe=function(e,n,t){for(var o=0,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},fe=function(){var e,n,t,o,r,l,a,u,s,c,v,m,p,f,g,y,h,w,I,E,T,b,_,S,O,P=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",D=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return P;var k=(null==A?void 0:A.siteName)||(null==A?void 0:A.site)||"",L=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(t=A[L])||void 0===t?void 0:t.metadata)||(null==A||null===(o=A[L])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.metadata),j=i.getPlayer(D);if(!P.includes("VIEWLIFT_"))return P;var F,R=window.getComputedStyle(document.getElementById(D),null),x=Math.trunc(R.getPropertyValue("height").slice(0,-2)),V=Math.trunc(R.getPropertyValue("width").slice(0,-2)),N="linearchannel"===L?null==A||null===(l=A.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(u=a.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===u||null===(s=u.content)||void 0===s?void 0:s.id:pe(A,"video.gist.id",""),W="linearchannel"===L?null==A||null===(c=A.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===m?void 0:m.title:pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),B=null,M=null;"function"==typeof window.__gpp&&(null===(F=window)||void 0===F||F.__gpp("ping",function(e){B=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var U=d.get("us_privacy")||d.get("usprivacy"),H=void 0!==U?U:"1YNN",G=null!==(p=null===(f=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===f?void 0:f.fwIdentifier)&&void 0!==p?p:null,q=se(se({},ge(C)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:x,VIEWLIFT_SIZE:ve(V,x),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:pe(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==j||null===(y=j.options_)||void 0===y?void 0:y.autoplay)||1,VIEWLIFT_MUTE:(null==j||null===(h=j.options_)||void 0===h?void 0:h.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==k||"usanetwork"==k?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:me(A),VIEWLIFT_MEDIA_ID:N,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:N,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+pe(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:d.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:pe(null===(w=window)||void 0===w||null===(I=w.app_data)||void 0===I||null===(E=I.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"==k||"usanetwork"==k?"":pe(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(_=b.site)||void 0===_?void 0:_.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?ce(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:N,VIEWLIFT_CONTENT_TITLE:W,VIEWLIFT_CONTENT_SERIES_TITLE:pe(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:pe(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:de(),VIEWLIFT_SEASON_NUMBER:ae(),VIEWLIFT_CONTENT_TAGS:me(A),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:B||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(O=S.customData)||void 0===O?void 0:O.macros);for(var Y in q){var Q=new RegExp(Y,"g");P=P.replace(Q,q[Y])}return P},ge=function(e){var n,t,o,r,i,a,d,u,s,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var m=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,p=(null===(r=window)||void 0===r||null===(i=r.customData)||void 0===i||null===(a=i.subscription)||void 0===a?void 0:a.TVE)||!1;return m||p?(l.isMobile()?m?c=se(se({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||""}):p&&(c=se(se({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||""})):m?c=se(se({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||""}):p&&(c=se(se({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||""})),m?c=se(se({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||""}):p&&(c=se(se({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||""})),c=l.isMobile()?se(se({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||""}):se(se({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||""})):(c=se(se({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||""}),c=l.isMobile()?se(se({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||""}):se(se({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||""})),c=se(se({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:pe(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s?void 0:s.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})};function ye(e){return e?(e.__vlTelemetryBridge||(e.__vlTelemetryBridge=(n=new Map,{on:function(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off:function(e,t){var o;null===(o=n.get(e))||void 0===o||o.delete(t)},emit:function(e,t){var o=n.get(e);o&&o.forEach(function(e){try{e(t)}catch(e){}})}})),e.__vlTelemetryBridge):null;var n}function he(e,n,t){var o;null===(o=ye(e))||void 0===o||o.emit(n,t)}function we(e,n){for(var t=0,o=[null==e?void 0:e.statusCode,null==e?void 0:e.status,null==e?void 0:e.code,null==n?void 0:n.statusCode,null==n?void 0:n.status,null==n?void 0:n.code];t<o.length;t++){var r=Number(o[t]);if(Number.isFinite(r)&&r>0)return r}return null}function Ie(e){return null==e||e>=200&&e<400}function Ee(e,n){he(e,"network_request_outcome",n)}function Te(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 be(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Te(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var _e=function(e,n){var t,o,r,i,a,d,u,s,c,v,m,p,f,g=(null==e?void 0:e.contentType)||"video",y=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[g])||void 0===o||null===(r=o.streamingInfo)||void 0===r?void 0:r.videoAssets,w=null==e||null===(i=e[g])||void 0===i||null===(a=i.streamingInfo)||void 0===a?void 0:a.audioAssets,I=(null==e||null===(d=e[g])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return Oe(w);if(y){var T=Pe(h,n);return T.src=fe(T.src,n,e),T}if("Safari"!==l.detectBrowser()&&E)return Se(h);if(I){var b=Oe(h);return b.src=fe(b.src,n,e),b}if(null!=h&&h.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return _.src=fe(_.src,n,e),_}return null},Se=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},Pe=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,u=l.detectBrowser();if(i.getPlayer(n),"Safari"===u){var s=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r=i.getPlayer(e.playerId),l={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(l,function(n,o,i){console.log(n);var l=we(o,n);Ee(r,{kind:"server_certificate",ok:Ie(l)&&!n,httpStatus:l,uri:e.certificateUrl}),n&&t(n),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,l){var a=i.getPlayer(e.playerId),d={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(d,function(n,t,o){console.log(n);var r=we(t,n);Ee(a,{kind:"license",ok:Ie(r)&&!n,httpStatus:r,uri:e.licenseUrl}),n&&l(n),l(null,o)})}}}}}(be(be({},r),{},{playerId:n}));return De(n),s}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(De(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var De=function(e){var n=i.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==l.detectBrowser()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ae=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)}}},ke=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Le=!1,Ce=function(e,n,t){var o=fe(n,e,t),r=i.getPlayer(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==s(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,o,r,l=i.getPlayer(e);if(null!==l.el_){Le=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Le&&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 u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&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 je,Fe=(je=!0,{enable:function(){je=!0},disable:function(){je=!1},get enabled(){return je}}),Re="ssai-breakStart",xe="ssai-adImpression",Ve="ssai-firstQuartile",Ne="ssai-midpoint",We="ssai-thirdQuartile",Be="ssai-complete",Me="ssai-breakEnd",Ue={breakStart:Re,impression:xe,firstQuartile:Ve,midpoint:Ne,thirdQuartile:We,complete:Be,breakEnd:Me};function He(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=Ue[o];r&&t.trigger(r,n)}function Ge(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 qe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ge(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ge(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ye,Qe=(Ye={},{get:function(){return Ye},set:function(e){Ye=e}});function ze(e,n){var t,o,r,l,a,d,u,s,c,v,p,f,g,y,h,w,I,E,T=null==e?void 0:e.playerId,b=i.getPlayer(T);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var _=G(),S=(null==_||null===(o=_.video)||void 0===o?void 0:o.metadata)||[],O=(null==S?void 0:S.length)&&S.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=O)&&void 0!==r&&r.length){var P=O.map(function(e){return e.value});O=null==P?void 0:P.join(",")}m.destroyComscoreTag();var D,A,k,L=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,C=Array.isArray(null==L?void 0:L.category)?null==L||null===(a=L.category)||void 0===a?void 0:a.join(","):(null==L?void 0:L.category)||null,j=qe(qe(qe({},null==_?void 0:_.video),null==_?void 0:_.linearchannel),{},{siteName:(null==_?void 0:_.site)||null,programId:(null==L?void 0:L.videotmsid)||null,programTitle:(null==L?void 0:L.lcProgrammeName)||null,episodeId:(null==L?void 0:L.videotmsid)||null,seasonNumber:(null==_||null===(d=_.video)||void 0===d||null===(u=d.series)||void 0===u?void 0:u.seasonNumber)||(null==L||null===(s=L.seriesDetails)||void 0===s?void 0:s.season)||null,episodeNumber:(null==_||null===(c=_.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.episodeNumber)||(null==L||null===(p=L.seriesDetails)||void 0===p?void 0:p.episode)||null,episodeTitle:(null==L?void 0:L.lcSubTitle)||null,isCompleteEpisode:!!(null!=_&&null!==(f=_.video)&&void 0!==f&&f.series||null!=L&&null!==(g=L.seriesDetails)&&void 0!==g&&g.episode),genre:O||C,comscoreConfig:{implementationId:(null==e||null===(y=e.comscore)||void 0===y?void 0:y.implementationId)||null,projectId:(null==e||null===(h=e.comscore)||void 0===h?void 0:h.projectId)||null}}),F=null==e||null===(w=e.comscore)||void 0===w||null===(I=w.metadata)||void 0===I?void 0:I.contentType;if(null!=j&&null!==(E=j.streamingInfo)&&void 0!==E&&E.isLiveStream?j.contentType="Live":j.contentType=F||"LongFormOnDemand",null==j||!j.network){var R,x=(null==j?void 0:j.metadata)||[],V=null==x||null===(R=x.find(function(e){return"network"===e.name}))||void 0===R?void 0:R.value;j.network=V||null}null!=j&&j.network&&null!=j&&j.genre&&(j.customGenre="".concat(j.network,"_").concat((null==j?void 0:j.programTitle)||(D=j,null!=D&&D.series?null==D||null===(k=D.series)||void 0===k?void 0:k.title:null==D||null===(A=D.gist)||void 0===A?void 0:A.title),"_").concat(j.genre)),null!=L&&L.airDate&&(j.publishDate=L.airDate),null!=j&&j.runtime&&"function"==typeof b.duration&&(j.runtime=1e3*Math.ceil(b.duration()));var N=m.formulateComscorePayload(j,b);console.log("comscoreOptions player data",N),m.createComscoreStreamingTag(qe({playerName:"Video.js"},N)),m.setComscorePlayerInstance(b)}}function Ke(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ke(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Je(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return $e(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)?$e(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 $e(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Ze,en=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),nn=(Ze=null,{set:function(e){Ze=e},get position(){return Ze}});function tn(e,n){return on.apply(this,arguments)}function on(){return(on=n(t.mark(function e(n,o){var r,l,a,d,u,s,c,m,p,f,g,y,h,w,I,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i.getPlayer(n),a=_e(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(r=o[u])||void 0===r||null===(l=r.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=fe(s,n,o),c=ln(s),m=v(c,2),p=m[0],f=m[1],g=rn(f)||{},s=new URL(s.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=v(e,2),t=n[0],o=n[1];s.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(Xe({adsParams:Xe({},p)},g))});case 14:return y=e.sent,e.next=17,y.json();case 17:return h=e.sent,w="https://"+new URL(s).hostname,I=h.trackingUrl,E=h.manifestUrl,T=w+I,b=w+E,en.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function rn(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=v(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function ln(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),r=Je((null==o?void 0:o.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var i=v(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={},u={},s=0,c=Object.entries(n);s<c.length;s++){var m=v(c[s],2),p=m[0],f=m[1];if(p.startsWith("ads."))d[p.replace(/^ads\./,"")]=f;else u[p]=f}return[d,u]}var an,dn,un,sn=new Map;function cn(e,n){return vn.apply(this,arguments)}function vn(){return vn=n(t.mark(function e(o,r){var l,a,d,u,s,v,m,p,f,g,y,h,w,I,E,T,b,_,S,O,P,D,A,k,L;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:L=function(e,n,t,r,l,a){var d,u,s=i.getPlayer(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<A&&D.clear(),A=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[r])||void 0===u?void 0:u.adId)||c;Math.floor(s.currentTime());var m,p=Je(t);try{var f=function(){var t,i,d,u=m.value,c=u.eventType,p=u.beaconUrls,f=u.startTimeInSeconds,g=u.startTime,y=u.durationInSeconds,h=f||0,w=p,I=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(d=i.ads)||void 0===d?void 0:d.adEventHandler)||null,E="".concat(h,"_").concat(c),T=sn.get("pod-".concat(l))||[];if(console.warn(e,h,"map:",c,"condition1:",e>=h,"map:",sn),e>=h&&!T.includes(E)){T.push(E),sn.set("pod-".concat(l),T);try{k(c,n,w,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=nn.position;nn.set(null),setTimeout(function(){null!=b&&(s.currentTime(b),a())},500)}if("function"==typeof I)try{var _,S={eventType:c,startTimeInSeconds:f,startTime:g,durationInSeconds:y,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[r],adIndex:r};I({adsData:S}),He(o,S)}catch(e){console.error("Error when calling ads callback:",e)}var O=Qe.get();if(O&&0!==Object.keys(O).length){var P=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,L=O.finishComscoreAdTracking,C=O.endComscoreAdTracking,j="".concat(h,"_").concat(v,"_").concat(c);if(!D.has(j))if(D.set(j,!0),"impression"===c){var F,R=en.get();A(P(Xe(Xe({},null==n||null===(F=n.ads)||void 0===F?void 0:F[r]),{},{trackingUrl:R})))}else"complete"===c?L():"breakEnd"===c&&C()}}};for(p.s();!(m=p.n()).done;)f()}catch(e){p.e(e)}finally{p.f()}}},k=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},P=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},sn.clear(),nn.set(r),f=en.get(),(g=i.getPlayer(o)).one("loadeddata",function(){f&&O(f)}),y=new Map,h=new Map,w=-1,I=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,E=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,b=(null==g||null===(s=g.el())||void 0===s||null===(v=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,_=(null==g||null===(m=g.el())||void 0===m||null===(p=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,S=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var 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)}),u=(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(!u&&l){var s=null==d?void 0:d.map(function(e){return Xe(Xe({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},O=function(){var e=n(t.mark(function e(n){var l,a,d,u,s,v,m,p,f,g,O,D,A,k,C,j,F,R,x,V,N,W,B,M;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return V=function(e){document.removeEventListener("pointermove",x),document.removeEventListener("pointerup",V),0===e.button&&F()},x=function(e){},R=function(){var e,n=g.currentTime(),t=null,o=Je(f);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(){g.currentTime(t+2.2)},100))},F=function(){var e,n=g.currentTime(),t=null,o=Je(f);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),h.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},s=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,p=m.avails,f=[],g=i.getPlayer(o),O=g.controlBar.progressControl,D=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(s=!0),f.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!s&&r&&(g.currentTime(r),R()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(j=(null===(A=window)||void 0===A||null===(k=A.customData)||void 0===k||null===(C=k.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&j(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=g.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var 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",D.appendChild(i)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=i.throttle(function(){var e=g.currentTime();if(e!==w){w=e;for(var n=!1,t=function(){var t=f[o],r=t.startTimeInSeconds,i=t.durationInSeconds,l=t.ads,a=r+i;if(e>=r-1.2&&e<=a+1.2){var d;e>=r&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&y.set(r,!0),Fe.disable(),I&&I.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var u=e-r,s=0,v=0,m=0;m<l.length;m++){var p,g=null==l||null===(p=l[m])||void 0===p?void 0:p.durationInSeconds;if(u<s+g){v=m;break}s+=g}l[v];var w=Math.max(0,i-u),S=Math.round(w);N.style.display="block",M.textContent="".concat(v+1," of ").concat(l.length," • ").concat(P(S));var D=[];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)});D.push.apply(D,c(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&D.push.apply(D,c(null==t?void 0:t.podSlotImpressionBeacon)),L(e,t,D,v,o,R),"break"}h.delete(r)},o=0;o<f.length;o++){if("break"===t())break}n||(N.style.display="none",O.el().classList.remove("hide-progress-bar"),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),I&&I.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),Fe.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){Fe.enabled&&"ArrowRight"==e.key&&(F(),bn(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",x),document.addEventListener("pointerup",V))}),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(N=document.createElement("div")).className="ssai-ad-container",(W=document.createElement("div")).className="sponsored-adbox",(B=document.createElement("div")).className="sponsored-text",B.textContent="Sponsored Ad",W.append(B),(M=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",N.append(W),N.append(M),g.el().appendChild(N);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=new Map,A=-1;case 21:case"end":return e.stop()}},e)})),vn.apply(this,arguments)}function mn(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 pn(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)?pn(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 pn(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 fn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function gn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):fn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var yn={},hn=(null===(an=window)||void 0===an||null===(dn=an.location)||void 0===dn||null===(un=dn.search)||void 0===un?void 0:un.includes("debug=true"))||!1,wn=null;function In(e){return En.apply(this,arguments)}function En(){return En=n(t.mark(function e(o){var r,l,a,d,u,s,v,m,p,f,g,y,h,w,I,E,T,b,_,S,O,P,D,A,k,L,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,r,l){var a,d,u=i.getPlayer(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[r])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,m=mn(t);try{for(m.s();!(v=m.n()).done;){var p,f,g,y=v.value,h=y.eventType,w=y.beaconUrls,I=y.startTimeInSeconds,E=y.startTime,T=y.durationInSeconds,b=(y.eventId,I||s),_=w,S=(null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(g=f.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(h),P="pod-".concat(s);A.has(P)||A.set(P,new Set);var D=A.get(P);if(hn&&console.warn(e,b,"map:",h,"condition1:",e>=b,"map:",A),e>=b&&e<=b+k&&!D.has(O)){D.add(O);try{L(h,n,_,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,h,n)}if("function"==typeof S)try{var C,j={eventType:h,startTimeInSeconds:I,startTime:E,durationInSeconds:T,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[r],adIndex:r};S({adsData:j}),He(o,j)}catch(e){console.error("Error when calling ads callback:",e)}var F=Qe.get();if(F&&0!==Object.keys(F).length){var R=F.formulateComscoreAdPayload,x=F.startComscoreAdTracking,V=F.finishComscoreAdTracking,N=F.endComscoreAdTracking;if("impression"===h){var W,B=en.get();x(R(gn(gn({},null==n||null===(W=n.ads)||void 0===W?void 0:W[r]),{},{trackingUrl:B})))}else"complete"===h?V():"breakEnd"===h&&N()}}}}catch(e){m.e(e)}finally{m.f()}}},L=function(e,n,t,o){var r,i,l;"breakEnd"===e&&(null===(r=yn)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(i=yn)||void 0===i?void 0:i.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(hn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},g=function(){wn&&clearInterval(wn)},p=en.get(),(f=i.getPlayer(o)).one("loadeddata",function(){g(),wn=setInterval(function(){p&&!f.paused()&&D(p)},2e3)}),f.on("dispose",function(){g()}),y=new Map,h=new Map,w=-1,I=null,E=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,_=(null==f||null===(u=f.el())||void 0===u||null===(s=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===s?void 0:s[0])||null,S=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=!1,P=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var 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)}),u=(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(!u&&l){var s=null==d?void 0:d.map(function(e){return gn(gn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&r.push(null==s?void 0:s[0])}return r},D=function(){var e=n(t.mark(function e(n){var r,l,a,d,u,s,v,m,p,f;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),I&&l.searchParams.append("nextToken",I),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,u=d.avails,s=d.nextToken||null,I=s,v=[],m=i.getPlayer(o),p=m.controlBar.progressControl,f=p.seekBar.el(),null===(r=document)||void 0===r||r.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),u.map(function(e,n){v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:P(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),hn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var 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",f.appendChild(i)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=i.throttle(function(){var e=m.currentTime();if(e!==w){w=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,r=n.durationInSeconds,i=n.ads,l=o+r;if(e>=o-1.2&&e<=l+1.2){var a;O=!!(e>=o&&e<=l&&Array.isArray(i)&&(null==i?void 0:i.length)>0),e>l&&y.set(o,!0),Fe.disable(),E&&E.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,m=0;m<i.length;m++){var f,g=null==i||null===(f=i[m])||void 0===f?void 0:f.durationInSeconds;if(d<u+g){s=m;break}u+=g}setTimeout(function(){yn.totalAds=null==i?void 0:i.length,yn.currentAdIndex=s},1e3);var w=[];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)});w.push.apply(w,c(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&w.push.apply(w,c(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,w,s),"break"}h.delete(o)},t=0;t<v.length;t++){if("break"===n())break}O||(yn={},p.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Fe.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),A=new Map,k=2.5;case 22:case"end":return e.stop()}},e)})),En.apply(this,arguments)}function Tn(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 bn=function(e,n){var t=o(e),r=t.currentTime()+n;t.currentTime(r)},_n=function(e,n){var t=o(e),r=t.currentTime(),i=r<=n?0:r-n;t.currentTime(i)},Sn=function(e){return!!o.getPlayer("".concat(e))},On=function(){var e=n(t.mark(function e(o,r){var l,a,d,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,B();case 3:return a=e.sent,d=i.getPlayer(o),e.abrupt("return",new Promise(function(e,i){b(r,a).then(function(){var i=n(t.mark(function n(i){var a,u,s,c,v,m,p,f;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==i?void 0:i.data,window.sid=ee(),m.contentType="linearchannel",m.channelId=null==r?void 0:r.channelId,p=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,f=_e(m,o),!p){n.next=11;break}return n.next=9,tn(o,m);case 9:f=n.sent,l=!0;case 11:H(m),f&&l?(An(o,f),p&&In(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(Qe.get()&&0!==Object.keys(Qe.get()).length&&ze({playerId:o,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 13:case"end":return n.stop()}},n)}));return function(e){return 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)}}(),Pn=function(){var e=n(t.mark(function e(o,r,l){var a,d,s,c,v,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return c=e.sent,(q()||null)&&Q(r),v=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(s=d.watchHistory)&&void 0!==s&&s.enable&&S(r,c).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)),v=(null==e||null===(i=e.data)||void 0===i?void 0:i.watchedTime)||null,(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,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){T(r,c).then(function(){var r=n(t.mark(function n(r){var a,d,s,c,f,g,y,h,w,I,E,T,b,_,S,O,P,D,A,k,L,C,j,F,R,x,V,N,W,B,M,U,G,q,Y,Q,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==r?void 0:r.data,P=(null==O?void 0:O.contentType)||"video",D=(null==O||null===(a=O[P])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(f=c.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,A=(null==O||null===(g=O.video)||void 0===g||null===(y=g.streamingInfo)||void 0===y?void 0:y.isLiveStream)||!1,H(r.data),(k=(null==O||null===(h=O.ads)||void 0===h||null===(w=h.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(E=I.web)||void 0===E?void 0:E.active)&&(null==O||null===(T=O.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(_=b.adTags)||void 0===_||null===(S=_.web)||void 0===S?void 0:S.url))&&Ce(o,k,O),L=_e(O,o),!D){n.next=12;break}return n.next=11,tn(o,O);case 11:L=n.sent;case 12:L?(U=(null==O||null===(C=O.video)||void 0===C||null===(j=C.gist)||void 0===j?void 0:j.videoImageUrl)||(null==O||null===(F=O.video)||void 0===F||null===(R=F.gist)||void 0===R||null===(x=R.imageGist)||void 0===x?void 0:x.r16x9),(G=i.getPlayer(o)).poster(U),An(o,L),D&&cn(o,p),G.on("loadstart",function(){A&&e({status:!0,msg:"Video Loaded",response:O})}),G.on("loadeddata",function(){ke(),e({status:!0,msg:"Video Loaded",response:O})}),G.one("play",function(){v&&!D&&m<95&&setTimeout(function(){G.currentTime(v)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==O||null===(V=O.video)||void 0===V||null===(N=V.contentDetails)||void 0===N||null===(W=N.closedCaptions)||void 0===W?void 0:W.length)>0||(null==O||null===(B=O.video)||void 0===B||null===(M=B.closedCaptions)||void 0===M?void 0:M.length)>0?(K=(null==O||null===(Y=O.video)||void 0===Y||null===(Q=Y.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),u.addCaptions(o,q)):u.removeCaptions(o)):(Ae(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){kn(e,o,l,r)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),Dn=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()},An=function(e,n){var t=i.getPlayer(e);t&&t.src(n)},kn=function(n,t,o,r){var i,l,a,d,u,s,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);Sn(t)&&Ae(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Tn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Tn(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.authenticateLC=On,exports.baseUrlManager=P,exports.classifyRequestKind=function(e,n){var t=String(n||"").toLowerCase();if(t.includes("license"))return"license";if(t.includes("certificate"))return"server_certificate";if(t.includes("manifest"))return"manifest";if(t.includes("key"))return"key";if(t.includes("segment")||t.includes("media"))return"segment";var o=String(e||"").split("?")[0].toLowerCase();return o.endsWith(".mpd")||o.endsWith(".m3u8")||o.endsWith(".ism/manifest")?"manifest":/\.(m4s|mp4|m4a|m4v|ts|aac|webm|cmf[av]|mp4a)$/.test(o)?"segment":/license|widevine|playready|fairplay|drm/.test(o)?"license":/cert|certificate/.test(o)?"server_certificate":/\.key($|\?)/.test(o)||/\/key\//.test(o)?"key":"other"},exports.clearError=ke,exports.comscoreInstanceManager=Qe,exports.createIdxMapping=function(e){F=new Map,e.map(function(e,n){F.set(e.id,n)})},exports.createSeriesWatchMap=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),R=t}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")},exports.dispose=function(e){var n=i.getPlayer(e),t=(Qe.get()||{}).destroyComscoreTag;if(Dn(),t&&t(),i.clearEventListeners(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.emitNetworkOutcome=Ee,exports.emitSegmentDownloaded=function(e,n){he(e,"segment_downloaded",n)},exports.ensureTelemetryBridge=ye,exports.extractStatusCode=we,exports.getCurrentSeries=q,exports.getCurrentVideo=G,exports.getDecodedToken=M,exports.getEntitlementData=function(e,n,t,o){var i,l;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,adbTempToken:null===(i=window)||void 0===i||null===(l=i.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=de,exports.getLinearChannelDetails=b,exports.getSGAIEnabledSource=tn,exports.getSeasonNumber=ae,exports.getSeriesDetails=function(e,n){var t,o,i=M(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:P.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return R},exports.getSource=_e,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(Re,e)},adImpression:function(e){return t(xe,e)},adFirstQuartile:function(e){return t(Ve,e)},adMidpoint:function(e){return t(Ne,e)},adThirdQuartile:function(e){return t(We,e)},adComplete:function(e){return t(Be,e)},adBreakEnd:function(e){return t(Me,e)}}},exports.getToken=B,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=ne,exports.getVideoDetails=T,exports.getVideoIdx=function(){return j},exports.getVideoInfo=S,exports.handleError=Ae,exports.initialiseAdvertisement=Ce,exports.initialiseComscoreStreamingTracking=ze,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,u,s,c,v,m,p;if(Fe.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==d||d.focus()),f){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||_n(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(i=r.app_data)||void 0===i||null===(u=i.appcmsMain)||void 0===u||null===(s=u.adsConfig)||void 0===s?void 0:s.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||bn(e,10)}}},!0)},exports.initiateErrorHandling=kn,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&($=n.userId);var t=i.getPlayer(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}},exports.isHttpOk=Ie,exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=Sn,exports.isTokenExpired=D,exports.load=Pn,exports.loadVideo=An,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=k,exports.rewind=_n,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=_,exports.seasonIdxManager=z,exports.setCurrentSeries=function(e){L=e},exports.setCurrentVideo=H,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=Y,exports.setVideoIdxById=Q,exports.setupAdvertisementMarkers=cn,exports.setupAdvertisementMarkersForLinear=In,exports.skip=bn,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=sn,exports.videoReplayTracker=U;
@@ -1 +0,0 @@
1
- "use strict";require("./index-9d25f2c1.js");var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/regenerator"),n=require("./skin-c97f0eea.js"),i=require("@babel/runtime/helpers/defineProperty"),u=require("@babel/runtime/helpers/slicedToArray"),a=require("./generic-b9f32717.js");function o(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach(function(t){i(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var s="my-player";function c(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function p(){return(p=e(r.mark(function e(t){var n,i,a,o,l,s,c,p,d,f,b,m,g,v,h,x,y,w,k,j,E,N,T,A;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return i=e.sent,e.next=11,createImageBitmap(i);case 11:for(a=e.sent,o=t.layout.split("x").map(Number),l=u(o,2),s=l[0],c=l[1],p=a.width/c,d=a.height/s,f=[],b=0;b<s;b++)for(m=0;m<c;m++)(g=document.createElement("canvas")).width=p,g.height=d,g.getContext("2d").drawImage(a,m*p,b*d,p,d,0,0,p,d),v=g.toDataURL("image/png"),f.push({uri:v,duration:t.duration}),t._tiles=f;return e.abrupt("return",f);case 20:for(e.prev=20,e.t0=e.catch(2),h=t.layout.split("x").map(Number),x=u(h,2),y=x[0],w=x[1],k=[],j=0;j<y*w;j++)k.push({uri:null===(E=window)||void 0===E||null===(N=E.app_data)||void 0===N||null===(T=N.appcmsMain)||void 0===T||null===(A=T.images)||void 0===A?void 0:A.placeholderCover,duration:t.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function d(e,t){return f.apply(this,arguments)}function f(){return(f=e(r.mark(function e(t,n){var i,u;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=n,e.prev=1,e.next=4,fetch(t);case 4:return i=e.sent,e.next=7,i.text();case 7:return u=e.sent,e.abrupt("return",c(u));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function b(e,t,r){var i=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),u=n.getPlayer(s);if(i&&u){var a=i.getBoundingClientRect(),o=(e.clientX-a.left)/a.width,l=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,u=t.length-1;for(;i<=u;){var a=Math.floor((i+u)/2),o=t[a];if(o===e)return o;o<e?i=a+1:u=a-1}var l=null!==(r=t[i])&&void 0!==r?r:1/0,s=null!==(n=t[u])&&void 0!==n?n:-1/0;return Math.abs(l-e)<Math.abs(s-e)?l:s}(Math.round(o*u.duration()),r),c=t[l];c&&!c.loading&&(c.loading=!0,function(e){return p.apply(this,arguments)}(c).then(function(e){var t=e[c.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),c.loading=!1,c.src=t.uri}))}}function m(e){return g.apply(this,arguments)}function g(){return(g=e(r.mark(function e(t){var a,o,s,c;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),n=u(r,2),o=n[0]*n[1],s=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*s);a[d]=l(l({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},i(p,"left","-60px"),i(p,"border","1px solid transparent"),i(p,"borderRadius","4px"),p)})}}),o=Object.keys(a).map(Number).sort(function(e,t){return e-t}),null==(s=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||s.addEventListener("mousemove",n.throttle(function(e){return b(e,a,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",n.throttle(function(e){return b(e,a,o)},500))}),e.abrupt("return",a);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var v=function(){var t=e(r.mark(function e(t,n){var i,a,o,l,s,c,p,d;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return i=e.sent,e.next=5,i.text();case 5:a=e.sent,o=a.split("\n").map(function(e){return e.trim()}),l=[],s=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}s={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=u(t,2),n=r[0],i=r[1];n&&i&&(s[n.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(s.uri=p.includes("http")?p:t+p,l.push(s),s=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",l);case 28:case"end":return e.stop()}},e)}));return function(e,r){return t.apply(this,arguments)}}();function h(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function x(e,t){return y.apply(this,arguments)}function y(){return(y=e(r.mark(function e(t,i){var o,l,c,p,d,f,b,m,g,v,x,y,j,E,N,T,A,O,S,I,P,M,q,R,$,B,D,L,C,U,X,_,F,W,z,G,V,H,J,K,Q,Y,Z,ee,te,re,ne,ie,ue,ae,oe,le,se,ce,pe,de,fe,be;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=i,o=n.getPlayer(i),l=t.split("/"),c=l.findIndex(function(e){return"dash"===e.toLowerCase()}),p=h(-1!==c?l.slice(0,c+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return m=e.sent,e.next=11,m.text();case 11:g=e.sent,v=new DOMParser,x=v.parseFromString(g,"application/xml"),y=(null==o?void 0:o.duration())||(null===(d=a.getCurrentVideo())||void 0===d||null===(f=d.video)||void 0===f?void 0:f.runtime),j=(null==x||null===(b=x.querySelector("MPD > BaseURL"))||void 0===b?void 0:b.textContent)||p+"/",E=x.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<E.length)){e.next=72;break}if(("image"!==(T=E[N]).getAttribute("contentType")||"image/png"!==T.getAttribute("mimeType"))&&"image/jpeg"!==T.getAttribute("mimeType")){e.next=69;break}if(O=T.getElementsByTagName("SegmentTemplate")[0],S=null===(A=O.getElementsByTagName("SegmentTimeline"))||void 0===A?void 0:A[0],!O||!S){e.next=48;break}if(M=S.getElementsByTagName("S"),q=parseInt(null===(I=M[0])||void 0===I?void 0:I.getAttribute("t")),R=parseInt(null===(P=M[0])||void 0===P?void 0:P.getAttribute("d")),$=T.getElementsByTagName("Representation")[0],B=$.getElementsByTagName("EssentialProperty")[0],D=B.getAttribute("value"),L=null==D?void 0:D.split("x"),C=u(L,2),U=C[0],X=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?R/_:R)/(U*X),W=$.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(U*X)),V=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(H=[],N=0;N<G;N++)K="/"==(J=V)[0]?new URL(p).origin:p+"/",H.push({duration:F,layout:D,uri:K+J.replace("$Time$",q+N*R).replace("$RepresentationID$",W)});return e.abrupt("return",H);case 46:e.next=69;break;case 48:if(Q=T.getElementsByTagName("Representation")[0],Y=Q.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=u(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ue=O.getAttribute("timescale"),ae=(ue?ie/ue:ie)/(re*ne),oe=Q.getAttribute("id"),le=Math.round(y/ae),se=Math.ceil(le/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(se))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],fe=w(ce),N=0;N<se;N++)be=fe?k(fe,N+pe):ce,de.push({duration:ae,layout:Z,uri:j+be.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function w(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function k(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function j(e){var r,n,i,u=(null==e||null===(r=e.currentSource)||void 0===r?void 0:r.call(e))||{},a=(null==u?void 0:u.src)||(null==e||null===(n=e.currentSrc)||void 0===n?void 0:n.call(e))||"";if(!a||!a.includes("blob"))return a;var o=null===(i=window)||void 0===i?void 0:i.player;if("function"==typeof(null==o?void 0:o.getSource)){var l=o.getSource();if("string"==typeof l)return l;if(l&&"object"===t(l))return l.src||l.hls||l.dash||""}return""}function E(){return(E=e(r.mark(function e(t){var i,u,a,o,l,s,c,p,f,b;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(i=n.getPlayer(t),u=j(i)){e.next=4;break}return e.abrupt("return");case 4:if(null==u||!u.includes("m3u8")){e.next=20;break}return e.next=7,d(u,t);case 7:if(!((null==(a=e.sent)?void 0:a.length)>0)){e.next=18;break}return o=(null==a?void 0:a[0])||null,l=o.uri,s=u.substring(0,u.lastIndexOf("/"))+"/",e.next=13,v(s,l);case 13:return c=e.sent,e.next=16,m(c);case 16:p=e.sent,i.thumbnails(p);case 18:e.next=29;break;case 20:if(null==u||!u.includes("mpd")){e.next=29;break}return e.next=23,x(u,t);case 23:if(!((null==(f=e.sent)?void 0:f.length)>0)){e.next=29;break}return e.next=27,m(f);case 27:b=e.sent,i.thumbnails(b);case 29:case"end":return e.stop()}},e)}))).apply(this,arguments)}exports.initiateTrickplay=function(e){return E.apply(this,arguments)};
@@ -1 +0,0 @@
1
- import{Q as n,h as t,a2 as i,a1 as o,a3 as a}from"./generic-355cc8c6.js";import{a as e}from"./util-40db3943.js";import{g as c,h as s}from"./skin-4f84b841.js";var u,r=0,f=0,l=function(l){clearTimeout(r);var d=null==l?void 0:l.content;u=null==l?void 0:l.cb;var v=l.playerId;e(v,function(){var e=c(v);0!==(null==e?void 0:e.currentTime())&&((f=o())>d.length-1||(a(f+1),n(v,d[f].id).then(function(n){s(f,v),t(n.response),f++,h(n)}).catch(function(n){h(n),s(f,v),f++,r=setTimeout(function(){i(v)&&m(f,v,d)},5e3)})))})},m=function t(i,o,e,c){f=i,i>e.length-1||(a(f+1),n(o,e[i].id).then(function(n){s(f,o),f++,h(n)}).catch(function(n){h(n),setTimeout(function(){s(f,o),f++,t(f,o,e)},5e3)}))},h=function(n){u&&u(n)};export{l as a,m as s};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r,t as l,c as a}from"./skin-4f84b841.js";import{i as d,d as u}from"./browser-d4613b36.js";import s from"md5";import c from"js-cookie";import{a as v,r as m}from"./captions-2b4caf69.js";import f from"@babel/runtime/helpers/typeof";import p from"@babel/runtime/helpers/toConsumableArray";import g from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as w,formulateComscorePayload as h,createComscoreStreamingTag as y,setComscorePlayerInstance as I}from"@viewlift/comscore/index.js";function E(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function T(e){window.dataLayer=window.dataLayer||[],E("js",new Date),E("config",e)}function b(e,n){E("event",e,n)}var _={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 O(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function S(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?O(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):O(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var D={name:"@viewlift/player-backup",version:"2.0.268-backup",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^1.0.13",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=D.version;var A,L=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":N.get()+"".concat(null==_?void 0:_.getVideoDetails)},P=function(e,n){var t,o,r,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:L(),params:S({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":D.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},k=function(e,n){var t,o,r,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:N.get()+_.getLinearChannelDetails,params:S(S(S(S(S({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},j=function(e,n){var t,o,r=$(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):i({url:N.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},C=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,X();case 2:return o=e.sent,e.abrupt("return",i({url:N.get()+"".concat(null==_?void 0:_.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:S({},n),params:S({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),F=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:N.get()+"".concat(null==_?void 0:_.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},R=function(e){var n=e.videoId;return i({method:"GET",url:N.get()+"".concat(null==_?void 0:_.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},N=(A=null==_?void 0:_.apiBaseUrl,{set:function(e){e&&(A=e)},get:function(){return A}}),V=function(e,n,t,o){var r,l;return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},W=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},B=null;function U(){return{set:function(e){e&&(B=e)},get:function(){return B}}}var M,x,H,G,Y,Q,z,q=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=U().get(),o=N.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),K=null,X=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!W(n)){e.next=6;break}return K||(K=q().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&U().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){K=null})),e.abrupt("return",K);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),J=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},$=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},Z=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},ee=(Q=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;Q.set(t,(Q.get(t)||0)+1)},get:function(e){return Q.get(e)},clear:function(){Q.clear()}}),ne=function(e){x=e},te=function(){return x},oe=function(e){M=e},ie=function(){return M},re=function(){return H},le=function(e){H=e},ae=function(){return Y},de=function(e){G=new Map,e.map(function(e,n){G.set(e.id,n)})},ue=function(e){if(G){var n=G.get(e);le(n+1)}},se=(z=0,{set:function(e){e>=0&&(z=e)},get:function(){return z}});function ce(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 ve(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):ce(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var me=0,fe=null,pe=function(){var e,n,t,o,i,r,l,a=te();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ge(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function we(){return fe||window.sessionStorage.getItem("uid")}function he(){return ye.apply(this,arguments)}function ye(){return(ye=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,X();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ie(e){return e?String(e):""}window.initialise=function(e){window.sid=ge(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,o,i,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,b(r?"FAILED_TO_START":"DROPPED_STREAM",ve({pfm:window.platform,uid:we(),vid:pe(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,i,r;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),b("PLAY",ve({pfm:window.platform,uid:we(),vid:pe(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",ve({"Video ID":pe(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&me<4)me++,b("BUFFERING",ve({pfm:window.platform,uid:we(),vid:pe(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,b("FIRST_FRAME",ve({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:we(),vid:pe()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,o,i,r,l;b("AD_REQUEST",ve({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:we(),vid:pe(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),b("AD_IMPRESSION",ve({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:we(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:pe()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(me=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(Ee(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var Ee=function(e,n,t){return e>=n&&e<=t},Te=function(){var e,n=te(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};function be(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&(fe=n.userId);var t=r(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,u,s,c,v,m,f,p,g,w,h,y,I,E,T,b,O;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:return I=e.sent,E=$(I),T=null==E?void 0:E.site,b=null==E?void 0:E.siteId,e.t0=ve,e.t1=ve,e.t2=ve({aid:T,cid:b,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=we(),e.t5=pe(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?Ie(n.adPosition):"",e.next=26,he();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=Te())&&void 0!==m?m:null,e.t28=null!=T?T:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),O=[e.t33],i({url:(null===(w=window)||void 0===w||null===(h=w.customData)||void 0===h||null===(y=h.beacon)||void 0===y?void 0:y.url)||N.get()+_.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:O}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var _e=function(e,n){var t=new Map;R({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),Y=t}).catch(function(e){return console.log(e)})},Oe=function(){var e=se.get();return e>=0?e+1:1},Se=function(){var e,n,t,o=ie(),i=te(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=se.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function De(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ae(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?De(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):De(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Le=s,Pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},ke=function(e){var n=je(e,"video.tags",[]),t=je(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},je=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},Ce=function(){var e,n,t,o,i,l,a,d,u,s,v,m,f,p,g,w,h,y,I,E,T,b,_,O,S,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",A=arguments.length>1?arguments[1]:void 0,L=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return D;var P=(null==L?void 0:L.siteName)||(null==L?void 0:L.site)||"",k=(null==L?void 0:L.contentType)||"video",j=(null==L||null===(t=L[k])||void 0===t?void 0:t.metadata)||(null==L||null===(o=L[k])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),C=r(A);if(!D.includes("VIEWLIFT_"))return D;var F,R=window.getComputedStyle(document.getElementById(A),null),N=Math.trunc(R.getPropertyValue("height").slice(0,-2)),V=Math.trunc(R.getPropertyValue("width").slice(0,-2)),W="linearchannel"===k?null==L||null===(l=L.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(d=a.find(function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)}))||void 0===d||null===(u=d.content)||void 0===u?void 0:u.id:je(L,"video.gist.id",""),B="linearchannel"===k?null==L||null===(s=L.linearchannel)||void 0===s||null===(v=s.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==L?void 0:L.channelId)}))||void 0===m?void 0:m.title:je(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),U=null,M=null;"function"==typeof window.__gpp&&(null===(F=window)||void 0===F||F.__gpp("ping",function(e){U=null==e?void 0:e.gppString,M=null==e?void 0:e.sectionList[0]}));var x=c.get("us_privacy")||c.get("usprivacy"),H=void 0!==x?x:"1YNN",G=null!==(f=null===(p=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===p?void 0:p.fwIdentifier)&&void 0!==f?f:null,Y=Ae(Ae({},Fe(j)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:N,VIEWLIFT_SIZE:Pe(V,N),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:je(L,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:je(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:je(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==C||null===(w=C.options_)||void 0===w?void 0:w.autoplay)||1,VIEWLIFT_MUTE:(null==C||null===(h=C.options_)||void 0===h?void 0:h.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==P||"usanetwork"==P?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ke(L),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(je(L,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+je(L,"video.gist.permalink","")),VIEWLIFT_CONSENT:c.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:je(null===(y=window)||void 0===y||null===(I=y.app_data)||void 0===I||null===(E=I.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"==P||"usanetwork"==P?"":je(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(_=b.site)||void 0===_?void 0:_.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?Le(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*je(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:je(L,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:B,VIEWLIFT_CONTENT_SERIES_TITLE:je(L,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:je(L,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Se(),VIEWLIFT_SEASON_NUMBER:Oe(),VIEWLIFT_CONTENT_TAGS:ke(L),VIEWLIFT_GPP_SID:M||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:U||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(O=window)||void 0===O||null===(S=O.customData)||void 0===S?void 0:S.macros);for(var Q in Y){var z=new RegExp(Q,"g");D=D.replace(z,Y[Q])}return D},Fe=function(e){var n,t,o,i,r,l,a,u,s,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var m=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,f=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return m||f?(d()?m?c=Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||""}):f&&(c=Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||""})):m?c=Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||""}):f&&(c=Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||""})),m?c=Ae(Ae({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||""}):f&&(c=Ae(Ae({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||""})),c=d()?Ae(Ae({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||""}):Ae(Ae({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||""})):(c=Ae(Ae({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||""}),c=d()?Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||""}):Ae(Ae({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||""})),c=Ae(Ae({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:je(null===(a=window)||void 0===a||null===(u=a.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s?void 0:s.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})};function Re(e){return e?(e.__vlTelemetryBridge||(e.__vlTelemetryBridge=(n=new Map,{on:function(e,t){n.has(e)||n.set(e,new Set),n.get(e).add(t)},off:function(e,t){var o;null===(o=n.get(e))||void 0===o||o.delete(t)},emit:function(e,t){var o=n.get(e);o&&o.forEach(function(e){try{e(t)}catch(e){}})}})),e.__vlTelemetryBridge):null;var n}function Ne(e,n,t){var o;null===(o=Re(e))||void 0===o||o.emit(n,t)}function Ve(e,n){var t=String(n||"").toLowerCase();if(t.includes("license"))return"license";if(t.includes("certificate"))return"server_certificate";if(t.includes("manifest"))return"manifest";if(t.includes("key"))return"key";if(t.includes("segment")||t.includes("media"))return"segment";var o=String(e||"").split("?")[0].toLowerCase();return o.endsWith(".mpd")||o.endsWith(".m3u8")||o.endsWith(".ism/manifest")?"manifest":/\.(m4s|mp4|m4a|m4v|ts|aac|webm|cmf[av]|mp4a)$/.test(o)?"segment":/license|widevine|playready|fairplay|drm/.test(o)?"license":/cert|certificate/.test(o)?"server_certificate":/\.key($|\?)/.test(o)||/\/key\//.test(o)?"key":"other"}function We(e,n){for(var t=0,o=[null==e?void 0:e.statusCode,null==e?void 0:e.status,null==e?void 0:e.code,null==n?void 0:n.statusCode,null==n?void 0:n.status,null==n?void 0:n.code];t<o.length;t++){var i=Number(o[t]);if(Number.isFinite(i)&&i>0)return i}return null}function Be(e){return null==e||e>=200&&e<400}function Ue(e,n){Ne(e,"network_request_outcome",n)}function Me(e,n){Ne(e,"segment_downloaded",n)}function xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function He(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?xe(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):xe(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ge=function(e,n){var t,o,i,r,l,a,d,s,c,v,m,f,p,g=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,y=null==e||null===(r=e[g])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,I=(null==e||null===(a=e[g])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(s=d.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return Qe(y);if(w){var T=ze(h,n);return T.src=Ce(T.src,n,e),T}if("Safari"!==u()&&E)return Ye(h);if(I){var b=Qe(h);return b.src=Ce(b.src,n,e),b}if(null!=h&&h.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return _.src=Ce(_.src,n,e),_}return null},Ye=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Qe=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ze=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=u();if(r(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 i=r(e.playerId),l={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(l,function(n,o,r){console.log(n);var l=We(o,n);Ue(i,{kind:"server_certificate",ok:Be(l)&&!n,httpStatus:l,uri:e.certificateUrl}),n&&t(n),t(null,new Uint8Array(r))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,l){var a=r(e.playerId),d={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(d,function(n,t,o){console.log(n);var i=We(t,n);Ue(a,{kind:"license",ok:Be(i)&&!n,httpStatus:i,uri:e.licenseUrl}),n&&l(n),l(null,o)})}}}}}(He(He({},i),{},{playerId:n}));return qe(n),s}var c,v={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(qe(n),v.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?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.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"}})),v};var qe=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==u()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Ke=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},Xe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},Je=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var $e=!1,Ze=function(e,n,t){var o=Ce(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==f(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){$e=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),$e&&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 u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};function en(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,u,s,c,v,m,f;if(tn.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){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||Kn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(u=r.appcmsMain)||void 0===u||null===(s=u.adsConfig)||void 0===s?void 0:s.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(f=m.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||qn(e,10)}}},!0)}var nn,tn=(nn=!0,{enable:function(){nn=!0},disable:function(){nn=!1},get enabled(){return nn}}),on="ssai-breakStart",rn="ssai-adImpression",ln="ssai-firstQuartile",an="ssai-midpoint",dn="ssai-thirdQuartile",un="ssai-complete",sn="ssai-breakEnd",cn={breakStart:on,impression:rn,firstQuartile:ln,midpoint:an,thirdQuartile:dn,complete:un,breakEnd:sn};function vn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=cn[o];i&&t.trigger(i,n)}function mn(e){var n=r(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(on,e)},adImpression:function(e){return t(rn,e)},adFirstQuartile:function(e){return t(ln,e)},adMidpoint:function(e){return t(an,e)},adThirdQuartile:function(e){return t(dn,e)},adComplete:function(e){return t(un,e)},adBreakEnd:function(e){return t(sn,e)}}}function fn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function pn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):fn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var gn,wn=(gn={},{get:function(){return gn},set:function(e){gn=e}});function hn(e,n){var t,o,i,l,a,d,u,s,c,v,m,f,p,g,E,T,b,_,O=null==e?void 0:e.playerId,S=r(O);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var D=te(),A=(null==D||null===(o=D.video)||void 0===o?void 0:o.metadata)||[],L=(null==A?void 0:A.length)&&A.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=L)&&void 0!==i&&i.length){var P=L.map(function(e){return e.value});L=null==P?void 0:P.join(",")}w();var k,j,C,F=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,R=Array.isArray(null==F?void 0:F.category)?null==F||null===(a=F.category)||void 0===a?void 0:a.join(","):(null==F?void 0:F.category)||null,N=pn(pn(pn({},null==D?void 0:D.video),null==D?void 0:D.linearchannel),{},{siteName:(null==D?void 0:D.site)||null,programId:(null==F?void 0:F.videotmsid)||null,programTitle:(null==F?void 0:F.lcProgrammeName)||null,episodeId:(null==F?void 0:F.videotmsid)||null,seasonNumber:(null==D||null===(d=D.video)||void 0===d||null===(u=d.series)||void 0===u?void 0:u.seasonNumber)||(null==F||null===(s=F.seriesDetails)||void 0===s?void 0:s.season)||null,episodeNumber:(null==D||null===(c=D.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.episodeNumber)||(null==F||null===(m=F.seriesDetails)||void 0===m?void 0:m.episode)||null,episodeTitle:(null==F?void 0:F.lcSubTitle)||null,isCompleteEpisode:!!(null!=D&&null!==(f=D.video)&&void 0!==f&&f.series||null!=F&&null!==(p=F.seriesDetails)&&void 0!==p&&p.episode),genre:L||R,comscoreConfig:{implementationId:(null==e||null===(g=e.comscore)||void 0===g?void 0:g.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),V=null==e||null===(T=e.comscore)||void 0===T||null===(b=T.metadata)||void 0===b?void 0:b.contentType;if(null!=N&&null!==(_=N.streamingInfo)&&void 0!==_&&_.isLiveStream?N.contentType="Live":N.contentType=V||"LongFormOnDemand",null==N||!N.network){var W,B=(null==N?void 0:N.metadata)||[],U=null==B||null===(W=B.find(function(e){return"network"===e.name}))||void 0===W?void 0:W.value;N.network=U||null}null!=N&&N.network&&null!=N&&N.genre&&(N.customGenre="".concat(N.network,"_").concat((null==N?void 0:N.programTitle)||(k=N,null!=k&&k.series?null==k||null===(C=k.series)||void 0===C?void 0:C.title:null==k||null===(j=k.gist)||void 0===j?void 0:j.title),"_").concat(N.genre)),null!=F&&F.airDate&&(N.publishDate=F.airDate),null!=N&&N.runtime&&"function"==typeof S.duration&&(N.runtime=1e3*Math.ceil(S.duration()));var M=h(N,S);console.log("comscoreOptions player data",M),y(pn({playerName:"Video.js"},M)),I(S)}}function yn(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 In(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?yn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):yn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function En(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 Tn(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)?Tn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Tn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var bn,_n=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),On=(bn=null,{set:function(e){bn=e},get position(){return bn}});function Sn(e,n){return Dn.apply(this,arguments)}function Dn(){return(Dn=n(t.mark(function e(n,o){var i,l,a,d,u,s,c,v,m,f,p,w,h,y,I,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=Ge(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[u])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=Ce(s,n,o),c=Ln(s),v=g(c,2),m=v[0],f=v[1],p=An(f)||{},s=new URL(s.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=g(e,2),t=n[0],o=n[1];s.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(In({adsParams:In({},m)},p))});case 14:return w=e.sent,e.next=17,w.json();case 17:return h=e.sent,y="https://"+new URL(s).hostname,I=h.trackingUrl,E=h.manifestUrl,T=y+I,b=y+E,_n.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function An(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=g(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function Ln(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=En((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=g(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},u={},s=0,c=Object.entries(n);s<c.length;s++){var v=g(c[s],2),m=v[0],f=v[1];if(m.startsWith("ads."))d[m.replace(/^ads\./,"")]=f;else u[m]=f}return[d,u]}var Pn,kn,jn,Cn=new Map;function Fn(e,n){return Rn.apply(this,arguments)}function Rn(){return Rn=n(t.mark(function e(o,i){var a,d,u,s,c,v,m,f,g,w,h,y,I,E,T,b,_,O,S,D,A,L,P,k,j;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:j=function(e,n,t,i,l,a){var d,u,s=r(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<P&&L.clear(),P=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[i])||void 0===u?void 0:u.adId)||c;Math.floor(s.currentTime());var m,f=En(t);try{var p=function(){var t,r,d,u=m.value,c=u.eventType,f=u.beaconUrls,p=u.startTimeInSeconds,g=u.startTime,w=u.durationInSeconds,h=p||0,y=f,I=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(d=r.ads)||void 0===d?void 0:d.adEventHandler)||null,E="".concat(h,"_").concat(c),T=Cn.get("pod-".concat(l))||[];if(console.warn(e,h,"map:",c,"condition1:",e>=h,"map:",Cn),e>=h&&!T.includes(E)){T.push(E),Cn.set("pod-".concat(l),T);try{k(c,n,y,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=On.position;On.set(null),setTimeout(function(){null!=b&&(s.currentTime(b),a())},500)}if("function"==typeof I)try{var _,O={eventType:c,startTimeInSeconds:p,startTime:g,durationInSeconds:w,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[i],adIndex:i};I({adsData:O}),vn(o,O)}catch(e){console.error("Error when calling ads callback:",e)}var S=wn.get();if(S&&0!==Object.keys(S).length){var D=S.formulateComscoreAdPayload,A=S.startComscoreAdTracking,P=S.finishComscoreAdTracking,j=S.endComscoreAdTracking,C="".concat(h,"_").concat(v,"_").concat(c);if(!L.has(C))if(L.set(C,!0),"impression"===c){var F,R=_n.get();A(D(In(In({},null==n||null===(F=n.ads)||void 0===F?void 0:F[i]),{},{trackingUrl:R})))}else"complete"===c?P():"breakEnd"===c&&j()}}};for(f.s();!(m=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}}},k=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)})})},A=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Cn.clear(),On.set(i),g=_n.get(),(w=r(o)).one("loadeddata",function(){g&&D(g)}),h=new Map,y=new Map,I=-1,E=(null===(a=document)||void 0===a||null===(d=a.getElementsByClassName("tvProviderImage"))||void 0===d?void 0:d[0])||null,T=(null==w||null===(u=w.controlBar)||void 0===u?void 0:u.getChild("videoSelector"))||null,b=(null==w||null===(s=w.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,_=(null==w||null===(c=w.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,O=(null==w||null===(m=w.el())||void 0===m||null===(f=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,S=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 p(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(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(!u&&l){var s=null==d?void 0:d.map(function(e){return In(In({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},D=function(){var e=n(t.mark(function e(n){var a,d,u,s,c,v,m,f,g,w,D,L,P,k,C,F,R,N,V,W,B,U,M,x;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&R()},V=function(e){},N=function(){var e,n=w.currentTime(),t=null,o=En(g);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,h.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){w.currentTime(t+2.2)},100))},R=function(){var e,n=w.currentTime(),t=null,o=En(g);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!h.has(r)||n>=r&&n<=d)&&(t=r,h.set(r,!0),y.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){w.currentTime(t+.4)},100))},c=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,f=m.avails,g=[],w=r(o),D=w.controlBar.progressControl,L=D.seekBar.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),f.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(c=!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:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!c&&i&&(w.currentTime(i),N()),null!=g&&g.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",g),window.adsQueueList=g,"function"==typeof(F=(null===(P=window)||void 0===P||null===(k=P.customData)||void 0===k||null===(C=k.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&F(g)),console.log(g,"data"),g.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=w.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",L.appendChild(r)}}),w._timeUpdateHandler&&w.off("timeupdate",w._timeUpdateHandler),w._timeUpdateHandler=l(function(){var e=w.currentTime();if(e!==I){I=e;for(var n=!1,t=function(){var t=g[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&h.set(i,!0),tn.disable(),E&&E.classList.add("vjs-hidden"),_&&(_.style.pointerEvents="none",_.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")),D.el().classList.add("hide-progress-bar");for(var u=e-i,s=0,c=0,v=0;v<l.length;v++){var m,f=null==l||null===(m=l[v])||void 0===m?void 0:m.durationInSeconds;if(u<s+f){c=v;break}s+=f}l[c];var w=Math.max(0,r-u),I=Math.round(w);B.style.display="block",x.textContent="".concat(c+1," of ").concat(l.length," • ").concat(A(I));var S=[];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)});S.push.apply(S,p(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&S.push.apply(S,p(null==t?void 0:t.podSlotImpressionBeacon)),j(e,t,S,c,o,N),"break"}y.delete(i)},o=0;o<g.length;o++){if("break"===t())break}n||(B.style.display="none",D.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),tn.enable())}},1e3),w.on("timeupdate",w._timeUpdateHandler),null===(d=document)||void 0===d||d.addEventListener("keydown",function(e){tn.enabled&&"ArrowRight"==e.key&&(R(),qn(o,10),e.stopPropagation())}),D.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),null===(u=document)||void 0===u||null===(s=u.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(B=document.createElement("div")).className="ssai-ad-container",(U=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",U.append(M),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",B.append(U),B.append(x),w.el().appendChild(B);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,P=-1;case 21:case"end":return e.stop()}},e)})),Rn.apply(this,arguments)}function Nn(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 Vn(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)?Vn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Vn(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 Wn(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 Bn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Wn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Wn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Un={},Mn=(null===(Pn=window)||void 0===Pn||null===(kn=Pn.location)||void 0===kn||null===(jn=kn.search)||void 0===jn?void 0:jn.includes("debug=true"))||!1,xn=null;function Hn(e){return Gn.apply(this,arguments)}function Gn(){return Gn=n(t.mark(function e(o){var i,a,d,u,s,c,v,m,f,g,w,h,y,I,E,T,b,_,O,S,D,A,L,P,k,j,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,i,l){var a,d,u=r(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,m=Nn(t);try{for(m.s();!(v=m.n()).done;){var f,p,g,w=v.value,h=w.eventType,y=w.beaconUrls,I=w.startTimeInSeconds,E=w.startTime,T=w.durationInSeconds,b=(w.eventId,I||s),_=y,O=(null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.adEventHandler)||null,S="".concat(c,"_").concat(h),D="pod-".concat(s);P.has(D)||P.set(D,new Set);var A=P.get(D);if(Mn&&console.warn(e,b,"map:",h,"condition1:",e>=b,"map:",P),e>=b&&e<=b+k&&!A.has(S)){A.add(S);try{j(h,n,_,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,h,n)}if("function"==typeof O)try{var L,C={eventType:h,startTimeInSeconds:I,startTime:E,durationInSeconds:T,ad:null==n||null===(L=n.ads)||void 0===L?void 0:L[i],adIndex:i};O({adsData:C}),vn(o,C)}catch(e){console.error("Error when calling ads callback:",e)}var F=wn.get();if(F&&0!==Object.keys(F).length){var R=F.formulateComscoreAdPayload,N=F.startComscoreAdTracking,V=F.finishComscoreAdTracking,W=F.endComscoreAdTracking;if("impression"===h){var B,U=_n.get();N(R(Bn(Bn({},null==n||null===(B=n.ads)||void 0===B?void 0:B[i]),{},{trackingUrl:U})))}else"complete"===h?V():"breakEnd"===h&&W()}}}}catch(e){m.e(e)}finally{m.f()}}},j=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=Un)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=Un)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(Mn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},w=function(){xn&&clearInterval(xn)},f=_n.get(),(g=r(o)).one("loadeddata",function(){w(),xn=setInterval(function(){f&&!g.paused()&&L(f)},2e3)}),g.on("dispose",function(){w()}),h=new Map,y=new Map,I=-1,E=null,T=(null===(i=document)||void 0===i||null===(a=i.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,b=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,_=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,O=(null==g||null===(s=g.el())||void 0===s||null===(c=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,S=(null==g||null===(v=g.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,D=!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 p(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(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(!u&&l){var s=null==d?void 0:d.map(function(e){return Bn(Bn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},L=function(){var e=n(t.mark(function e(n){var i,a,d,u,s,c,v,m,f,g;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=new URL(n),E&&a.searchParams.append("nextToken",E),e.next=4,fetch(a.toString(),{method:"GET"});case 4:return d=e.sent,e.next=7,d.json();case 7:u=e.sent,s=u.avails,c=u.nextToken||null,E=c,v=[],m=r(o),f=m.controlBar.progressControl,g=f.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.map(function(e,n){v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:A(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Mn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",g.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=l(function(){var e=m.currentTime();if(e!==I){I=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;D=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&h.set(o,!0),tn.disable(),T&&T.classList.add("vjs-hidden"),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),f.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,c=0;c<r.length;c++){var m,g=null==r||null===(m=r[c])||void 0===m?void 0:m.durationInSeconds;if(d<u+g){s=c;break}u+=g}setTimeout(function(){Un.totalAds=null==r?void 0:r.length,Un.currentAdIndex=s},1e3);var w=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});w.push.apply(w,p(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&w.push.apply(w,p(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,w,s),"break"}y.delete(o)},t=0;t<v.length;t++){if("break"===n())break}D||(Un={},f.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),tn.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,k=2.5;case 22:case"end":return e.stop()}},e)})),Gn.apply(this,arguments)}function Yn(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 Qn=function(e){o(e).play()},zn=function(e){o(e).pause()},qn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Kn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},Xn=function(e){return!!o.getPlayer("".concat(e))},Jn=function(e){return o(e).paused()},$n=function(){var e=n(t.mark(function e(o,i){var l,a,d,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,X();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise(function(e,r){k(i,a).then(function(){var r=n(t.mark(function n(r){var a,u,s,c,v,m,f,p;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=ge(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,f=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,p=Ge(m,o),!f){n.next=11;break}return n.next=9,Sn(o,m);case 9:p=n.sent,l=!0;case 11:ne(m),p&&l?(ot(o,p),f&&Hn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(wn.get()&&0!==Object.keys(wn.get()).length&&hn({playerId:o,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){r({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Zn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,s,c,f,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:return s=e.sent,(ie()||null)&&ue(i),c=0,f=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&F(i,s).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(f=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){P(i,s).then(function(){var i=n(t.mark(function n(i){var a,d,u,s,g,w,h,y,I,E,T,b,_,O,S,D,A,L,P,k,j,C,F,R,N,V,W,B,U,M,x,H,G,Y,Q,z,q,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(D=null==i?void 0:i.data,A=(null==D?void 0:D.contentType)||"video",L=(null==D||null===(a=D[A])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s||null===(g=s.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,P=(null==D||null===(w=D.video)||void 0===w||null===(h=w.streamingInfo)||void 0===h?void 0:h.isLiveStream)||!1,ne(i.data),(k=(null==D||null===(y=D.ads)||void 0===y||null===(I=y.preRoll)||void 0===I||null===(E=I.adTags)||void 0===E||null===(T=E.web)||void 0===T?void 0:T.active)&&(null==D||null===(b=D.ads)||void 0===b||null===(_=b.preRoll)||void 0===_||null===(O=_.adTags)||void 0===O||null===(S=O.web)||void 0===S?void 0:S.url))&&Ze(o,k,D),j=Ge(D,o),!L){n.next=12;break}return n.next=11,Sn(o,D);case 11:j=n.sent;case 12:j?(H=(null==D||null===(C=D.video)||void 0===C||null===(F=C.gist)||void 0===F?void 0:F.videoImageUrl)||(null==D||null===(R=D.video)||void 0===R||null===(N=R.gist)||void 0===N||null===(V=N.imageGist)||void 0===V?void 0:V.r16x9),(G=r(o)).poster(H),ot(o,j),L&&Fn(o,p),G.on("loadstart",function(){P&&e({status:!0,msg:"Video Loaded",response:D})}),G.on("loadeddata",function(){Je(),e({status:!0,msg:"Video Loaded",response:D})}),G.one("play",function(){c&&!L&&f<95&&setTimeout(function(){G.currentTime(c)},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==D||null===(W=D.video)||void 0===W||null===(B=W.contentDetails)||void 0===B||null===(U=B.closedCaptions)||void 0===U?void 0:U.length)>0||(null==D||null===(M=D.video)||void 0===M||null===(x=M.closedCaptions)||void 0===x?void 0:x.length)>0?(K=(null==D||null===(Q=D.video)||void 0===Q||null===(z=Q.contentDetails)||void 0===z?void 0:z.closedCaptions)||(null==D||null===(q=D.video)||void 0===q?void 0:q.closedCaptions),Y=K.filter(function(e){return"VTT"===e.format}),v(o,Y)):m(o)):(Xe(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){it(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),et=function(e,n,t){var o=r(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},nt=function(e){var n=r(e),t=(wn.get()||{}).destroyComscoreTag;if(tt(),t&&t(),a(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},tt=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()},ot=function(e,n){var t=r(e);t&&t.src(n)},it=function(n,t,o,i){var r,l,a,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Xn(t)&&Xe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Yn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Yn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))},rt=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")};export{Cn as $,$ as A,P as B,F as C,it as D,X as E,k as F,j as G,_e as H,se as I,oe as J,et as K,qn as L,Qn as M,zn as N,Kn as O,Xn as P,Zn as Q,$n as R,nt as S,V as T,mn as U,Z as V,N as W,J as X,U as Y,W as Z,T as _,Se as a,en as a0,re as a1,Jn as a2,le as a3,Hn as a4,Fn as a5,R as a6,de as a7,ue as a8,ie as b,wn as c,Oe as d,te as e,Ge as f,we as g,ne as h,hn as i,Je as j,Xe as k,ot as l,ae as m,rt as n,be as o,Ze as p,Ke as q,Sn as r,C as s,Re as t,Ve as u,ee as v,We as w,Ue as x,Me as y,Be as z};
@@ -1 +0,0 @@
1
- import"./index-66169052.js";import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/typeof";import r from"@babel/runtime/regenerator";import{t as n,g as i}from"./skin-4f84b841.js";import a from"@babel/runtime/helpers/defineProperty";import u from"@babel/runtime/helpers/slicedToArray";import{e as o}from"./generic-355cc8c6.js";function s(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 l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var c="my-player";function p(e){var t=e.split("\n"),r=[];return t.forEach(function(e){if((e=e.trim()).startsWith("#EXT-X-IMAGE-STREAM-INF")){var t=e.split(","),n={resolution:null,uri:null};t.forEach(function(e){e.includes("RESOLUTION")&&(n.resolution=e.split("=")[1]),e.includes("URI")&&(n.uri=e.split("=")[1].replace(/"/g,""))}),r.push(n)}}),r}function d(){return(d=e(r.mark(function e(t){var n,i,a,o,s,l,c,p,d,f,m,b,v,g,h,x,y,w,k,j,E,N,A,T;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t._tiles){e.next=2;break}return e.abrupt("return",t._tiles);case 2:return e.prev=2,e.next=5,fetch(t.uri,{mode:"cors"});case 5:return n=e.sent,e.next=8,n.blob();case 8:return i=e.sent,e.next=11,createImageBitmap(i);case 11:for(a=e.sent,o=t.layout.split("x").map(Number),s=u(o,2),l=s[0],c=s[1],p=a.width/c,d=a.height/l,f=[],m=0;m<l;m++)for(b=0;b<c;b++)(v=document.createElement("canvas")).width=p,v.height=d,v.getContext("2d").drawImage(a,b*p,m*d,p,d,0,0,p,d),g=v.toDataURL("image/png"),f.push({uri:g,duration:t.duration}),t._tiles=f;return e.abrupt("return",f);case 20:for(e.prev=20,e.t0=e.catch(2),h=t.layout.split("x").map(Number),x=u(h,2),y=x[0],w=x[1],k=[],j=0;j<y*w;j++)k.push({uri:null===(E=window)||void 0===E||null===(N=E.app_data)||void 0===N||null===(A=N.appcmsMain)||void 0===A||null===(T=A.images)||void 0===T?void 0:T.placeholderCover,duration:t.duration});return e.abrupt("return",k);case 26:case"end":return e.stop()}},e,null,[[2,20]])}))).apply(this,arguments)}function f(e,t){return m.apply(this,arguments)}function m(){return(m=e(r.mark(function e(t,n){var i,a;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=n,e.prev=1,e.next=4,fetch(t);case 4:return i=e.sent,e.next=7,i.text();case 7:return a=e.sent,e.abrupt("return",p(a));case 11:e.prev=11,e.t0=e.catch(1),console.error("Error fetching the M3U8 manifest:",e.t0);case 14:case"end":return e.stop()}},e,null,[[1,11]])}))).apply(this,arguments)}function b(e,t,r){var n=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"),a=i(c);if(n&&a){var u=n.getBoundingClientRect(),o=(e.clientX-u.left)/u.width,s=function(e,t){var r,n;if(!t||0===t.length)return null;var i=0,a=t.length-1;for(;i<=a;){var u=Math.floor((i+a)/2),o=t[u];if(o===e)return o;o<e?i=u+1:a=u-1}var s=null!==(r=t[i])&&void 0!==r?r:1/0,l=null!==(n=t[a])&&void 0!==n?n:-1/0;return Math.abs(s-e)<Math.abs(l-e)?s:l}(Math.round(o*a.duration()),r),l=t[s];l&&!l.loading&&(l.loading=!0,function(e){return d.apply(this,arguments)}(l).then(function(e){var t=e[l.tileIndex],r=document.querySelector(".vjs-thumbnail-holder img");r&&t.uri&&(r.src=t.uri),l.loading=!1,l.src=t.uri}))}}function v(e){return g.apply(this,arguments)}function g(){return(g=e(r.mark(function e(t){var i,o,s,c;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i={},t.forEach(function(e,t){for(var r=e.layout.split("x").map(Number),n=u(r,2),o=n[0]*n[1],s=e.duration,c=0;c<o;c++){var p,d=Math.round((t*o+c)*s);i[d]=l(l({},e),{},{duration:e.duration,tileIndex:c,loading:!1,style:(p={left:"-60px",height:"85px",width:"130px"},a(p,"left","-60px"),a(p,"border","1px solid transparent"),a(p,"borderRadius","4px"),p)})}}),o=Object.keys(i).map(Number).sort(function(e,t){return e-t}),null==(s=document.querySelector(".vjs-progress-holder.vjs-slider.vjs-slider-horizontal"))||s.addEventListener("mousemove",n(function(e){return b(e,i,o)},500)),null==(c=document.querySelector(".vjs-progress-control.vjs-control"))||c.addEventListener("pointerdown",function(e){document.addEventListener("pointermove",n(function(e){return b(e,i,o)},500))}),e.abrupt("return",i);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}var h=function(){var t=e(r.mark(function e(t,n){var i,a,o,s,l,c,p,d;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t+n);case 2:return i=e.sent,e.next=5,i.text();case 5:a=e.sent,o=a.split("\n").map(function(e){return e.trim()}),s=[],l=null,c=0;case 10:if(!(c<(null==o?void 0:o.length))){e.next=27;break}if(!(p=o[c]).startsWith("#EXT-X-TILES")){e.next=19;break}l={resolution:null,duration:null,uri:null,layout:null},d=p.split(":")[1]||"",d.split(",").forEach(function(e){var t=e.split("="),r=u(t,2),n=r[0],i=r[1];n&&i&&(l[n.trim().toLowerCase()]=i.trim())}),e.next=24;break;case 19:if(!p.startsWith("#EXTINF")){e.next=23;break}return e.abrupt("continue",24);case 23:(p.includes("jpg")||p.includes("png")||p.includes("jpeg"))&&(l.uri=p.includes("http")?p:t+p,s.push(l),l=null);case 24:c++,e.next=10;break;case 27:return e.abrupt("return",s);case 28:case"end":return e.stop()}},e)}));return function(e,r){return t.apply(this,arguments)}}();function x(e){return e.replace(/AdSegmentFilter\/markers=\(.+?\)\//,"")}function y(e,t){return w.apply(this,arguments)}function w(){return(w=e(r.mark(function e(t,n){var a,s,l,p,d,f,m,b,v,g,h,y,w,E,N,A,T,O,S,I,M,P,R,$,B,D,L,U,C,X,q,_,F,W,z,G,H,J,K,Q,V,Y,Z,ee,te,re,ne,ie,ae,ue,oe,se,le,ce,pe,de,fe,me;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return c=n,a=i(n),s=t.split("/"),l=s.findIndex(function(e){return"dash"===e.toLowerCase()}),p=x(-1!==l?s.slice(0,l+1).join("/"):new URL(t).origin),e.prev=5,e.next=8,fetch(t);case 8:return b=e.sent,e.next=11,b.text();case 11:v=e.sent,g=new DOMParser,h=g.parseFromString(v,"application/xml"),y=(null==a?void 0:a.duration())||(null===(d=o())||void 0===d||null===(f=d.video)||void 0===f?void 0:f.runtime),w=(null==h||null===(m=h.querySelector("MPD > BaseURL"))||void 0===m?void 0:m.textContent)||p+"/",E=h.getElementsByTagName("AdaptationSet"),N=0;case 18:if(!(N<E.length)){e.next=72;break}if(("image"!==(A=E[N]).getAttribute("contentType")||"image/png"!==A.getAttribute("mimeType"))&&"image/jpeg"!==A.getAttribute("mimeType")){e.next=69;break}if(O=A.getElementsByTagName("SegmentTemplate")[0],S=null===(T=O.getElementsByTagName("SegmentTimeline"))||void 0===T?void 0:T[0],!O||!S){e.next=48;break}if(P=S.getElementsByTagName("S"),R=parseInt(null===(I=P[0])||void 0===I?void 0:I.getAttribute("t")),$=parseInt(null===(M=P[0])||void 0===M?void 0:M.getAttribute("d")),B=A.getElementsByTagName("Representation")[0],D=B.getElementsByTagName("EssentialProperty")[0],L=D.getAttribute("value"),U=null==L?void 0:L.split("x"),C=u(U,2),X=C[0],q=C[1],!O){e.next=46;break}if(O.getAttribute("media"),_=O.getAttribute("timescale"),F=(_?$/_:$)/(X*q),W=B.getAttribute("id"),z=Math.round(y/F),G=Math.ceil(z/(X*q)),H=O.getAttribute("media"),parseInt(O.getAttribute("startNumber")),!isNaN(parseInt(G))){e.next=43;break}return e.abrupt("return");case 43:for(J=[],N=0;N<G;N++)Q="/"==(K=H)[0]?new URL(p).origin:p+"/",J.push({duration:F,layout:L,uri:Q+K.replace("$Time$",R+N*$).replace("$RepresentationID$",W)});return e.abrupt("return",J);case 46:e.next=69;break;case 48:if(V=A.getElementsByTagName("Representation")[0],Y=V.getElementsByTagName("EssentialProperty")[0],Z=Y.getAttribute("value"),ee=null==Z?void 0:Z.split("x"),te=u(ee,2),re=te[0],ne=te[1],!O){e.next=69;break}if(O.getAttribute("media"),ie=O.getAttribute("duration"),ae=O.getAttribute("timescale"),ue=(ae?ie/ae:ie)/(re*ne),oe=V.getAttribute("id"),se=Math.round(y/ue),le=Math.ceil(se/(re*ne)),ce=O.getAttribute("media"),pe=parseInt(O.getAttribute("startNumber"))||0,!isNaN(parseInt(le))){e.next=65;break}return e.abrupt("return");case 65:for(de=[],fe=k(ce),N=0;N<le;N++)me=fe?j(fe,N+pe):ce,de.push({duration:ue,layout:Z,uri:w+me.replace("$Number$",N+pe).replace("$RepresentationID$",oe)});return e.abrupt("return",de);case 69:N++,e.next=18;break;case 72:return console.log("No trickplay segment found."),e.abrupt("return",null);case 76:e.prev=76,e.t0=e.catch(5),console.error("Error fetching or parsing MPD:",e.t0);case 79:case"end":return e.stop()}},e,null,[[5,76]])}))).apply(this,arguments)}function k(e){var t=e.match(/Thumbnail_\$Number%0\d+d\$\.\w+/);return t?t[0]:null}function j(e,t){var r=e.match(/%0(\d+)d/);if(!r)return e;var n=parseInt(r[1],10),i=String(t).padStart(n,"0");return e.replace(/\$Number%0\d+d\$/,i)}function E(e){var r,n,i,a=(null==e||null===(r=e.currentSource)||void 0===r?void 0:r.call(e))||{},u=(null==a?void 0:a.src)||(null==e||null===(n=e.currentSrc)||void 0===n?void 0:n.call(e))||"";if(!u||!u.includes("blob"))return u;var o=null===(i=window)||void 0===i?void 0:i.player;if("function"==typeof(null==o?void 0:o.getSource)){var s=o.getSource();if("string"==typeof s)return s;if(s&&"object"===t(s))return s.src||s.hls||s.dash||""}return""}function N(e){return A.apply(this,arguments)}function A(){return(A=e(r.mark(function e(t){var n,a,u,o,s,l,c,p,d,m;return r.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=i(t),a=E(n)){e.next=4;break}return e.abrupt("return");case 4:if(null==a||!a.includes("m3u8")){e.next=20;break}return e.next=7,f(a,t);case 7:if(!((null==(u=e.sent)?void 0:u.length)>0)){e.next=18;break}return o=(null==u?void 0:u[0])||null,s=o.uri,l=a.substring(0,a.lastIndexOf("/"))+"/",e.next=13,h(l,s);case 13:return c=e.sent,e.next=16,v(c);case 16:p=e.sent,n.thumbnails(p);case 18:e.next=29;break;case 20:if(null==a||!a.includes("mpd")){e.next=29;break}return e.next=23,y(a,t);case 23:if(!((null==(d=e.sent)?void 0:d.length)>0)){e.next=29;break}return e.next=27,v(d);case 27:m=e.sent,n.thumbnails(m);case 29:case"end":return e.stop()}},e)}))).apply(this,arguments)}export{N as i};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n,d as o}from"./skin-4f84b841.js";import{a1 as i,b as l}from"./generic-355cc8c6.js";import{s as a}from"./autoNextVideo-281b09dd.js";import{e as r}from"./icons-699e8cf0.js";import s from"@babel/runtime/helpers/typeof";import d from"video.js";var c,u,m,v,p=[],f=!1,g=function(a,s){var d;if(f=!1,null!=s&&null!==(d=s.series)&&void 0!==d&&d.enable){var c;p=[];var u=l();null==u||u.map(function(t){var n;return(n=p).push.apply(n,e(t.episodes))}),null==s||null===(c=s.series)||void 0===c||c.cb}else{var m,v;p=(null==s||null===(m=s.relatedVideos)||void 0===m?void 0:m.content)||[],null==s||null===(v=s.relatedVideos)||void 0===v||v.cb}var g=t(a);g.on("timeupdate",function(){var e,t;if(!f){var n=Math.floor(g.currentTime()),o=g.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&i()<=(null===(t=p)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}});var y,A=p.filter(function(e,t){return t==i()});if((null==A?void 0:A.length)>0)if(null!==(y=document.getElementsByClassName("next-ep-preview"))&&void 0!==y&&y[0]){var x,w,E,b,C,N,B,L,j,k,P,O;(null===(x=document.getElementsByClassName("next-ep-preview"))||void 0===x?void 0:x[0]).style.visibility="hidden";var I=null===(w=document.getElementsByClassName("next-ep-title"))||void 0===w?void 0:w[0],M=null===(E=document.getElementsByClassName("next-ep-img"))||void 0===E?void 0:E[0],T=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],F=null===(C=A[0])||void 0===C?void 0:C.title;(null===(N=F)||void 0===N?void 0:N.length)>60&&(F=F.substr(0,60)+"..."),I.textContent="".concat(F),M.src=(null===(B=A[0])||void 0===B||null===(L=B.gist)||void 0===L||null===(j=L.imageGist)||void 0===j?void 0:j.r16x9)||(null==A||null===(k=A[0])||void 0===k?void 0:k.img)||(null===(P=window)||void 0===P||null===(O=P.customData)||void 0===O?void 0:O.fallbackImage),T.onclick=function(){return h(a)}}else{var X,R,D,G,S,V,H,Q,U=document.createElement("div");U.className="next-ep-preview",U.style.visibility="hidden",document.getElementById(a).append(U);var W=document.createElement("div");W.className="next-heading-wrapper";var Y=document.createElement("div");Y.className="next-ep-header",Y.textContent="Next up";var _=document.createElement("div");_.className="next-ep-close",_.onclick=function(){U.style.visibility="hidden",f=!0},_.appendChild(n(r())),W.append(Y),W.append(_);var q=null===(X=A[0])||void 0===X?void 0:X.title,z=document.createElement("img");z.className="next-ep-img",z.src=(null===(R=A[0])||void 0===R||null===(D=R.gist)||void 0===D||null===(G=D.imageGist)||void 0===G?void 0:G.r16x9)||(null==A||null===(S=A[0])||void 0===S?void 0:S.img)||(null===(V=window)||void 0===V||null===(H=V.customData)||void 0===H?void 0:H.fallbackImage);var J=document.createElement("div");J.className="next-ep-title",(null===(Q=q)||void 0===Q?void 0:Q.length)>60&&(q=q.substr(0,60)+"..."),J.textContent="".concat(q);var K=document.createElement("div");K.className="next-ep-content",K.append(z),K.append(J),K.onclick=o(function(){null==U||U.remove(),f=!0,h(a)},400),U.append(W),U.append(K)}},h=function(e,n){var o=t(e),l=Math.floor(o.currentTime());if(Math.floor(o.duration())!=l){o.pause(e);var r=i();a(r,e,p)}};function y(e,n){var o=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",l.append(a),o.el().appendChild(l),o.on("useractive",function(){l.classList.remove("vjs-fade")}),o.on("userinactive",function(){o.paused()||l.classList.add("vjs-fade")}),o.on("fullscreenchange",function(){o.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}c={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},m=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===m(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",function(e){var t,n,o,i,l,a,r,s;function d(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",d),s()}n=u({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),t.appendChild(o),o.src=n[0].src,o.className="vjs-thumbnail",u(o.style,n[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,s,d,c,p,f,g,h,y;for(r in s=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=v(l.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),d=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d-=v(l.el()).getBoundingClientRect().left+h,i=Math.floor((d-l.el().offsetLeft)/l.width()*a),n)i>r&&(s=Math.max(s,r));(c=n[s]).src&&o.src!=c.src&&(o.src=c.src),c.style&&o.style!=c.style&&u(o.style,c.style),d+(g=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=m(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,c.width||n[0].width)/2)>f?d-=d+g-f:d<g&&(d=g),t.style.left=d+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",d)}),s=function(e){t.style.left="-1000px"},l.on("mouseout",s),l.on("touchcancel",s),l.on("touchend",s),i.on("userinactive",s)});export{g as a,y as b};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-699e8cf0.js";import{Q as c,a3 as d}from"./generic-355cc8c6.js";import{a as p}from"./autoNextVideo-281b09dd.js";import{j as m,g as u}from"./skin-4f84b841.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./util-40db3943.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var y=a.getComponent("Component"),h=function(){n(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=i(h);if(f){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return l(this,e)});function g(e){var o,n,l,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(i=b.call(this,e,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=null==a||null===(o=a.playlist)||void 0===o?void 0:o.content,i.cb=(null==a||null===(n=a.playlist)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==a||null===(l=a.playlist)||void 0===l?void 0:l.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&p({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return o(g,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(m(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),o.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var o=this,n=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var n,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(n=o.videos[t])||void 0===n?void 0:n.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(o.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=o.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(o.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(o.playerId,o.videos[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})},s.onclick=function(t){var o,n,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(o=s.classList)&&void 0!==o&&o.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(n=s.classList)||void 0===n||n.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(o.playerId);if(e){var n=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px")}})}}]),g}();export{h as default};
@@ -1 +0,0 @@
1
- import{a as e,b as t,c as o,d as s,e as i}from"./features-06330d47.js";import{e as n,a0 as r}from"./generic-355cc8c6.js";import{S as l,M as a,a as m,N as d,b as u,R as p}from"./icons-699e8cf0.js";import{g as c,b}from"./skin-4f84b841.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./renditions-19f0b3a9.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";function v(v,f){c(v).addClass("skin_default"),r(v,f),import("./skin-71be210e.js").then(function(e){var t=document.createElement("style");t.id="def_skin",t.append("".concat(e.default)),document.head.appendChild(t)}),function(e,t){0==t.liveVideo&&0==t.liveui&&s(e,"default",u());(0==t.liveVideo&&0==t.liveui||1==t.liveui)&&i(e,"default",p())}(v,f),function(s,i){var r=c(s),a=(null==i?void 0:i.sres)||null;r.on("loadeddata",function(){e(s,"default",l()),a&&import("./nextEpisodeButton-338de4e8.js").then(function(e){e.initaliseFunctionality(i.sres.seasons,n())})}),r.one("loadedmetadata",function(){var e;a&&(t(s,null==i||null===(e=i.sres)||void 0===e?void 0:e.seasons,i),o(i.sres,i.res,s))})}(v,f),function(e,t){var o,s,i,n,r=c(e),l=document.getElementsByClassName("vjs-current-time")[0],u=document.getElementsByClassName("vjs-duration")[0],p=document.getElementsByClassName("vjs-time-divider")[0];t.liveVideo&&(l&&(l.style.display="none"),u&&(u.style.display="none"),p&&(p.style.display="none"));null===(o=r.controlBar.getChild("FullscreenToggle"))||void 0===o||null===(s=o.el())||void 0===s||s.appendChild(b(a(window.controlsColor))),null===(i=r.controlBar.getChild("FullscreenToggle"))||void 0===i||null===(n=i.el())||void 0===n||n.appendChild(b(m(window.controlsColor)));var v=r.controlBar.getChild("SubsCapsButton").el();document.getElementById(e).getElementsByClassName("vjs-subs-caps-button")[1].appendChild(b(d()));var f=document.createElement("div");f.classList.add("caption-header"),v.querySelector(".vjs-menu-content").insertBefore(f,v.querySelector(".vjs-menu-item"))}(v,f)}export{v as initialiseSkin};
@@ -1 +0,0 @@
1
- import{h as l,d as o,e as i,o as e,p as n,q as r}from"./features-06330d47.js";import{g as a}from"./skin-4f84b841.js";import{a as t,b as d}from"./index-66169052.js";import{i as u}from"./index-1a4369e9.js";import{i as s}from"./browser-d4613b36.js";import"videojs-contrib-quality-menu";import v from"video.js";import{f as p,a0 as m,a4 as c,e as b,a5 as y,m as f}from"./generic-355cc8c6.js";import{c as g,d as h}from"./icons-699e8cf0.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-19f0b3a9.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-281b09dd.js";import"./util-40db3943.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@viewlift/comscore/index.js";function w(o,i){var e,n=a(o),r=(null==i||null===(e=i.res)||void 0===e?void 0:e.siteId)||"";n&&(n.on("loadeddata",function(){var l,e,n,d,v;!function(l){var o=a(l);o&&(null==o||o.qualityMenu,o.qualityMenu({useResolutionLabels:!0}))}(o),!(null!=i&&null!==(l=i.series)&&void 0!==l&&l.enable||null!==(e=window)&&void 0!==e&&null!==(n=e.app_data)&&void 0!==n&&null!==(d=n.appcmsMain)&&void 0!==d&&null!==(v=d.features)&&void 0!==v&&v.auto_play)||null!=i&&i.liveVideo||t(o,i),null!=i&&i.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===r||u(o)}),n.one("play",function(){var i,e,n,r;null!==(i=window)&&void 0!==i&&null!==(e=i.customData)&&void 0!==e&&e.iframeOverlayUrl&&l(o,null===(n=window)||void 0===n||null===(r=n.customData)||void 0===r?void 0:r.iframeOverlayUrl)}))}function j(l,t){a(l).addClass("skin_vlone"),w(l,t),function(l,t){var u,s,v,w,j,k,C,B,T=a(l),V=(null==t?void 0:t.liveVideo)||!1,_=(null==t||null===(u=t.res)||void 0===u?void 0:u.contentType)||"video",A=(null==t||null===(s=t.res)||void 0===s||null===(v=s[_])||void 0===v?void 0:v.isSSAIEnabled)||!1,E=p(null==t?void 0:t.res,l)||{};E.src;var L=(null==t?void 0:t.skin_settings)||{},x=(null==t||null===(w=t.customData)||void 0===w?void 0:w.ads)||{};if(V&&(null==t||!t.liveui)){var D,M,O=(null==T||null===(D=T.controlBar)||void 0===D||null===(M=D.getChild("LiveDisplay"))||void 0===M?void 0:M.el())||null;O&&(O.onclick=function(){try{var l;null==T||null===(l=T.liveTracker)||void 0===l||l.seekToLiveEdge()}catch(l){console.log(l,"Cannot seek to LE")}})}null!=L&&L.skipBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)&&o(l,"VL_ONE",g());(null!=L&&L.rewindBtn&&0==(null==t?void 0:t.liveVideo)&&0==(null==t?void 0:t.liveui)||1==(null==t?void 0:t.liveui))&&i(l,"VL_ONE",h());(null==t||null===(j=t.relatedVideos)||void 0===j||null===(k=j.content)||void 0===k?void 0:k.length)>0&&e(l,null==t?void 0:t.relatedVideos);null!=t&&null!==(C=t.series)&&void 0!==C&&C.enable&&n(l,t);(null==t||null===(B=t.streams)||void 0===B?void 0:B.length)>1&&r(l,null==t?void 0:t.streams);if(d(l,t),m(l,t),"MEDIA_TAILOR"==(null==x?void 0:x.vodAdSticherProvider)&&null!=x&&x.vodAdClientSideTracking&&A)if(V)c(l);else{var R,q=null;if(null!=t&&null!==(R=t.series)&&void 0!==R&&R.enable){var P,I,S,H,N,U=null===(P=b())||void 0===P||null===(I=P.video)||void 0===I||null===(S=I.gist)||void 0===S?void 0:S.id,$=f(),F=(null==$?void 0:$.get(U))||{t:0,p:0},G=F.t,z=F.p;"function"==typeof(null===(H=window)||void 0===H||null===(N=H.watchHistory)||void 0===N?void 0:N.cb)&&window.watchHistory.cb({watchedTime:G}),z<95&&(q=G)}else{var J=t.watchHistoryResumeTime;t.watchedPercentage<95&&(q=J)}y(l,q)}}(l,t),k(l,t)}var k=function(l,o){var i,e,n,r,t,d,u,s,p,m,c,b,y=a(l),f=(null==o?void 0:o.theme)||{},g=v.dom.$(".vjs-play-progress"),h=v.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");h&&(h.style.color="".concat(null===(i=window)||void 0===i||null===(e=i.app_data)||void 0===e||null===(n=e.appcmsMain)||void 0===n||null===(r=n.brand)||void 0===r||null===(t=r.cta)||void 0===t||null===(d=t.primary)||void 0===d?void 0:d.backgroundColor)),g&&(g.style.background="".concat(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(p=s.appcmsMain)||void 0===p||null===(m=p.brand)||void 0===m||null===(c=m.cta)||void 0===c||null===(b=c.primary)||void 0===b?void 0:b.backgroundColor));var w=y.getChild("BigPlayButton")||null;(null==f?void 0:f.progressBarColor)&&g&&(g.style.background=f.progressBarColor),(null==f?void 0:f.playButtonBackgroundColor)&&w&&(w.el().style.background=f.playButtonBackgroundColor),(null==f?void 0:f.playButtonColor)&&h&&(h.style.color=f.playButtonColor),(null==f?void 0:f.playButtonType)&&("square"==(null==f?void 0:f.playButtonType)?w.el().style.borderRadius=".3em":w.el().style.borderRadius="1.3em")};export{j as initialiseSkin};
@@ -1 +0,0 @@
1
- import{f as l,r as i,d as e,e as n,j as o,k as t,l as s,m as r}from"./features-06330d47.js";import{f as a}from"./icons-699e8cf0.js";import{g as d,p as u,e as v}from"./skin-4f84b841.js";import{g as C}from"./renditions-19f0b3a9.js";import{a as c,b as p}from"./index-66169052.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/helpers/typeof";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{a4 as h,e as m,a5 as f,m as y}from"./generic-355cc8c6.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-281b09dd.js";import"./util-40db3943.js";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@viewlift/comscore/index.js";function b(b,L){d(b).addClass("skin_news"),function(i,e){var n=d(i);n&&n.on("loadeddata",function(){var n,o,t,s,r,a,d;(null===(n=C(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e),!(null!=e&&null!==(t=e.series)&&void 0!==t&&t.enable||null!==(s=window)&&void 0!==s&&null!==(r=s.app_data)&&void 0!==r&&null!==(a=r.appcmsMain)&&void 0!==a&&null!==(d=a.features)&&void 0!==d&&d.auto_play)||null!=e&&e.liveVideo||c(i,e)})}(b,L),function(l,i){var e,n,o,t,s,r,a,C,c,p,h,m,f,y,b,L,g,B,w=d(l);if(null!=i&&i.liveVideo){var j,E,V,x,M,k,S=null===(j=w.controlBar)||void 0===j||null===(E=j.getChild("TimeDivider"))||void 0===E?void 0:E.el(),Z=null===(V=w.controlBar)||void 0===V||null===(x=V.getChild("CurrentTimeDisplay"))||void 0===x?void 0:x.el(),T=null===(M=w.controlBar)||void 0===M||null===(k=M.getChild("DurationDisplay"))||void 0===k?void 0:k.el();S&&(S.style.display="none"),Z&&(Z.style.display="none"),T&&(T.style.display="none")}var A=null===(e=w.controlBar)||void 0===e?void 0:e.getChild("ProgressControl"),H=null===(n=w.controlBar)||void 0===n||null===(o=n.getChild("SeekToLive"))||void 0===o?void 0:o.el();H&&(H.onclick=function(){if(w.paused())try{w.play()}catch(l){console.log(l)}});var _=document.createElement("div");_.className="custom-spaced-progress-bar",A&&_.append(A.el());null===(t=w.controlBar)||void 0===t||null===(s=t.el())||void 0===s||s.append(_);var N='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';w.el().insertBefore(u(N),null!==(r=w.el().firstChild)&&void 0!==r?r:null);var P=(null==w||null===(a=w.controlBar)||void 0===a||null===(C=a.getChild("PlayToggle"))||void 0===C||null===(c=C.el())||void 0===c?void 0:c.firstChild)||null;if(P){P.style.height="18px",P.style.width="18px";var D=v(P,w.paused()?"#vjs-icon-play":"#vjs-icon-pause");w.on("pause",function(){return D.setAttributeNS(null,"href","#vjs-icon-play")}),w.on("play",function(){return D.setAttributeNS(null,"href","#vjs-icon-pause")})}var q=(null==w||null===(p=w.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(q){q.style.height="24px",q.style.width="24px";var I=v(q,"#vjs-icon-fullscreen");w.on("fullscreenchange",function(){var l=w.isFullscreen_;null==I||I.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var O=(null==w||null===(f=w.controlBar)||void 0===f||null===(y=f.getChild("VolumePanel"))||void 0===y?void 0:y.el())||null;if(O){var F=O.querySelector(".vjs-mute-control .vjs-icon-placeholder");F.classList.add("vjs-svg-icon"),F.style.height="24px",F.style.width="24px";var R=v(F,w.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");w.on("volumechange",function(l){var i=w.volume();console.log(i,w.muted()),0==i||w.muted()?R.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?R.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?R.setAttributeNS(null,"href","#vjs-icon-volume2"):R.setAttributeNS(null,"href","#vjs-icon-volume3")})}var G=(null==w||null===(b=w.controlBar)||void 0===b||null===(L=b.getChild("PictureInPictureToggle"))||void 0===L?void 0:L.el())||null;if(G){var z=null==G?void 0:G.querySelector(".vjs-icon-placeholder");z.style.height="25px",z.style.width="25px";var J=v(z,"#vjs-icon-pip");w.on("enterpictureinpicture",function(){J.setAttributeNS(null,"href","#vjs-icon-pip")})}var K=(null==w||null===(g=w.controlBar)||void 0===g||null===(B=g.getChild("SubsCapsButton"))||void 0===B?void 0:B.el())||null;if(K){var Q=K.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");Q.classList.add("vjs-svg-icon"),Q.style.height="29px",Q.style.width="29px";var U=v(Q,"#vjs-icon-caps");U.setAttributeNS(null,"href","#vjs-icon-captions-off"),w.textTracks().on("change",function(l){for(var i=w.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?U.setAttributeNS(null,"href","#vjs-icon-captions"):U.setAttributeNS(null,"href","#vjs-icon-captions-off")})}w&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(w.liveTracker.on("liveedgechange",function(){Y(w)}),w.on("timeupdate",function(){Y(w)}));function W(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function X(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function Y(l){var i,e,n=l.liveTracker.atLiveEdge(),o=X(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var s=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",s&&(s.innerText=W(o)))}}}(b,L),function(l,d){var u,v,C,c,p,b,L,g,B,w,j=(null==d?void 0:d.liveVideo)||!1,E=(null==d||null===(u=d.res)||void 0===u?void 0:u.contentType)||"video",V=(null==d||null===(v=d.res)||void 0===v||null===(C=v[E])||void 0===C?void 0:C.isSSAIEnabled)||!1,x=(null==d?void 0:d.skin_settings)||{};null==x||x.slowMoBtn;var M=(null==d||null===(c=d.customData)||void 0===c?void 0:c.ads)||{};i(l),null!=x&&x.skipBtn&&0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=x&&x.rewindBtn&&(0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)||1==(null==d?void 0:d.liveui))&&n(l,"VL_ONE",a());(null==d||null===(p=d.relatedVideos)||void 0===p||null===(b=p.content)||void 0===b?void 0:b.length)>0&&o(l,null==d?void 0:d.relatedVideos);(null==d||null===(L=d.streams)||void 0===L?void 0:L.length)>1&&t(l,null==d?void 0:d.streams);(null==d||null===(g=d.playlist)||void 0===g||null===(B=g.content)||void 0===B?void 0:B.length)>0&&s(l,null==d?void 0:d.playlist);null!=d&&null!==(w=d.series)&&void 0!==w&&w.enable&&r(l,d);if("MEDIA_TAILOR"==(null==M?void 0:M.vodAdSticherProvider)&&null!=M&&M.vodAdClientSideTracking&&V)if(j)h(l);else{var k,S=null;if(null!=d&&null!==(k=d.series)&&void 0!==k&&k.enable){var Z,T,A,H,_,N=null===(Z=m())||void 0===Z||null===(T=Z.video)||void 0===T||null===(A=T.gist)||void 0===A?void 0:A.id,P=y(),D=(null==P?void 0:P.get(N))||{t:0,p:0},q=D.t,I=D.p;"function"==typeof(null===(H=window)||void 0===H||null===(_=H.watchHistory)||void 0===_?void 0:_.cb)&&window.watchHistory.cb({watchedTime:q}),I<95&&(S=q)}else{var O=d.watchHistoryResumeTime;d.watchedPercentage<95&&(S=O)}f(l,S)}}(b,L),p(b,L)}export{b as initialiseSkin};