@viewlift/player-backup 2.0.270-backup → 2.0.272-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 (213) hide show
  1. package/cjs/{autoNextVideo-aab04ca2.js → autoNextVideo-d1bc37e9.js} +1 -1
  2. package/cjs/bundle.css +745 -745
  3. package/cjs/{features-06672d0e.js → features-ac06de4d.js} +1 -1
  4. package/cjs/generic-853f89bd.js +1 -0
  5. package/cjs/{index-06461546.js → index-3ab7e3cb.js} +1 -1
  6. package/cjs/{index-a5284d8c.js → index-cbd8333d.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-775af5cd.js → multicamv2-7a5e0da3.js} +1 -1
  9. package/cjs/{multicamv2-cd64c23d.js → multicamv2-ff275d29.js} +1 -1
  10. package/cjs/{nextEpisodeButton-55c9ca47.js → nextEpisodeButton-43dfe981.js} +1 -1
  11. package/cjs/{playlist-0817f929.js → playlist-356ff361.js} +1 -1
  12. package/cjs/{series-ad8bdcab.js → series-fdd93923.js} +1 -1
  13. package/cjs/{series-v2-49a73d41.js → series-v2-13fa8a68.js} +1 -1
  14. package/cjs/{series-v2-b8010f7c.js → series-v2-d47e2c65.js} +1 -1
  15. package/cjs/skin-25eba125.js +1 -0
  16. package/cjs/{skin-6e633748.js → skin-4b695a83.js} +1 -1
  17. package/cjs/{skin-053c4b0e.js → skin-5af20e5f.js} +1 -1
  18. package/cjs/{skin-88072589.js → skin-859c65bd.js} +1 -1
  19. package/cjs/skin-8919623f.js +1 -0
  20. package/cjs/{skin-9a207c46.js → skin-93eaf0b9.js} +1 -1
  21. package/cjs/{skin-c66c28cb.js → skin-a56fc816.js} +1 -1
  22. package/cjs/{skin-1fc9778c.js → skin-dd1150d3.js} +1 -1
  23. package/cjs/{skin-43859976.js → skin-e6c74bca.js} +1 -1
  24. package/cjs/{util-0108a17b.js → util-0552a53e.js} +1 -1
  25. package/cjs/{videoSelector-161e6e18.js → videoSelector-ab53b5ca.js} +1 -1
  26. package/cjs/{videoSelector-b2ed6c41.js → videoSelector-f0356447.js} +1 -1
  27. package/esm/{autoNextVideo-245106dc.js → autoNextVideo-e8df1a63.js} +1 -1
  28. package/esm/bundle.css +745 -745
  29. package/esm/components/transmit/constants.d.ts +42 -0
  30. package/esm/components/transmit/index.d.ts +9 -0
  31. package/esm/components/transmit/session.d.ts +4 -0
  32. package/esm/components/transmit/transmitAd.d.ts +26 -0
  33. package/esm/components/transmit/transmitAdManager.d.ts +66 -0
  34. package/esm/components/transmit/utils.d.ts +2 -0
  35. package/esm/{features-3d00bfaf.js → features-cb3674ee.js} +1 -1
  36. package/esm/generic-6bd18e7c.js +1 -0
  37. package/esm/{index-18e71208.js → index-0c364075.js} +1 -1
  38. package/esm/{index-1ac2df49.js → index-5bab022d.js} +1 -1
  39. package/esm/index.js +1 -1
  40. package/esm/{multicamv2-328e923e.js → multicamv2-7f7a8900.js} +1 -1
  41. package/esm/{multicamv2-9088f871.js → multicamv2-e1099dc7.js} +1 -1
  42. package/esm/{nextEpisodeButton-02ec2fbd.js → nextEpisodeButton-2ce1e3df.js} +1 -1
  43. package/esm/{playlist-0ee754f2.js → playlist-74219367.js} +1 -1
  44. package/esm/{series-1ac34519.js → series-715a9f84.js} +1 -1
  45. package/esm/{series-v2-4118214b.js → series-v2-1cb33a14.js} +1 -1
  46. package/esm/{series-v2-177d5849.js → series-v2-d3355275.js} +1 -1
  47. package/esm/skin-0f0b158c.js +1 -0
  48. package/esm/{skin-7d31f534.js → skin-4770cb4a.js} +1 -1
  49. package/esm/skin-adec58f3.js +1 -0
  50. package/esm/skin-b4b45ad3.js +1 -0
  51. package/esm/{skin-5d70dccd.js → skin-d32b190c.js} +1 -1
  52. package/esm/skin-d6db5c40.js +1 -0
  53. package/esm/skin-e659efe9.js +1 -0
  54. package/esm/skin-ea3284a6.js +1 -0
  55. package/esm/{skin-406a83e0.js → skin-eb3c788b.js} +1 -1
  56. package/esm/{util-468a93fd.js → util-a0ce1bd0.js} +1 -1
  57. package/esm/{videoSelector-bf4a9044.js → videoSelector-42263fa9.js} +1 -1
  58. package/esm/{videoSelector-1b345e70.js → videoSelector-560bf4de.js} +1 -1
  59. package/package.json +2 -5
  60. package/cjs/autoNextVideo-c18c5a9d.js +0 -1
  61. package/cjs/autoNextVideo-d02d40bb.js +0 -1
  62. package/cjs/autoNextVideo-fc3a66ed.js +0 -1
  63. package/cjs/features-3cb595a6.js +0 -1
  64. package/cjs/features-7254ff24.js +0 -1
  65. package/cjs/features-e04a1906.js +0 -1
  66. package/cjs/generic-302fcb0f.js +0 -1
  67. package/cjs/generic-73c41ab8.js +0 -1
  68. package/cjs/generic-92ede746.js +0 -1
  69. package/cjs/generic-ece54fe4.js +0 -1
  70. package/cjs/index-156ebc96.js +0 -1
  71. package/cjs/index-3ea3d917.js +0 -1
  72. package/cjs/index-5f4c22e0.js +0 -1
  73. package/cjs/index-8fb992e3.js +0 -1
  74. package/cjs/index-c3c5304e.js +0 -1
  75. package/cjs/index-e1fa72cb.js +0 -1
  76. package/cjs/multicamv2-7b610283.js +0 -1
  77. package/cjs/multicamv2-7c115911.js +0 -1
  78. package/cjs/multicamv2-84760599.js +0 -1
  79. package/cjs/multicamv2-a1ad5eb0.js +0 -1
  80. package/cjs/multicamv2-d8678089.js +0 -1
  81. package/cjs/multicamv2-dd2b304c.js +0 -1
  82. package/cjs/nextEpisodeButton-8a285b57.js +0 -1
  83. package/cjs/nextEpisodeButton-943003ed.js +0 -1
  84. package/cjs/nextEpisodeButton-c0bf8d12.js +0 -1
  85. package/cjs/playlist-92c9c514.js +0 -1
  86. package/cjs/playlist-ae50e704.js +0 -1
  87. package/cjs/playlist-b02614d9.js +0 -1
  88. package/cjs/series-b1d6b31a.js +0 -1
  89. package/cjs/series-c80c4a36.js +0 -1
  90. package/cjs/series-fa79e1a1.js +0 -1
  91. package/cjs/series-v2-61a08a5d.js +0 -1
  92. package/cjs/series-v2-79428f58.js +0 -1
  93. package/cjs/series-v2-979acedf.js +0 -1
  94. package/cjs/series-v2-9f2fa133.js +0 -1
  95. package/cjs/series-v2-b920c6e8.js +0 -1
  96. package/cjs/series-v2-bef8dcf9.js +0 -1
  97. package/cjs/skin-1dbf6726.js +0 -1
  98. package/cjs/skin-2b06a950.js +0 -1
  99. package/cjs/skin-35f8cc7b.js +0 -1
  100. package/cjs/skin-3d0ecf5f.js +0 -1
  101. package/cjs/skin-4a955d7a.js +0 -1
  102. package/cjs/skin-58e9b426.js +0 -1
  103. package/cjs/skin-5bf91421.js +0 -1
  104. package/cjs/skin-5cf349ab.js +0 -1
  105. package/cjs/skin-65ada70c.js +0 -1
  106. package/cjs/skin-67fa7113.js +0 -1
  107. package/cjs/skin-6dc08f62.js +0 -1
  108. package/cjs/skin-70374d63.js +0 -1
  109. package/cjs/skin-72444813.js +0 -1
  110. package/cjs/skin-78182ddc.js +0 -1
  111. package/cjs/skin-85e89904.js +0 -1
  112. package/cjs/skin-988acd01.js +0 -1
  113. package/cjs/skin-a100c6a0.js +0 -1
  114. package/cjs/skin-a20b263d.js +0 -1
  115. package/cjs/skin-b02f6a39.js +0 -1
  116. package/cjs/skin-d4a940d6.js +0 -1
  117. package/cjs/skin-d898389f.js +0 -1
  118. package/cjs/skin-d98e4f7a.js +0 -1
  119. package/cjs/skin-e8806c6e.js +0 -1
  120. package/cjs/skin-e8f2fbd4.js +0 -1
  121. package/cjs/skin-ec03e8e0.js +0 -1
  122. package/cjs/skin-ed5cb06a.js +0 -1
  123. package/cjs/skin-f7dd877b.js +0 -1
  124. package/cjs/skin-fb5aad71.js +0 -1
  125. package/cjs/skin-ff2aa150.js +0 -1
  126. package/cjs/util-4e928cc2.js +0 -1
  127. package/cjs/util-ac0da02b.js +0 -1
  128. package/cjs/util-fceffc9c.js +0 -1
  129. package/cjs/videoSelector-68a44bf2.js +0 -1
  130. package/cjs/videoSelector-788aefeb.js +0 -1
  131. package/cjs/videoSelector-98767cca.js +0 -1
  132. package/cjs/videoSelector-b960b6cb.js +0 -1
  133. package/cjs/videoSelector-cd0a328a.js +0 -1
  134. package/cjs/videoSelector-e0666d3f.js +0 -1
  135. package/esm/autoNextVideo-4cdb3520.js +0 -1
  136. package/esm/autoNextVideo-7dd4dfc3.js +0 -1
  137. package/esm/autoNextVideo-9cfdd391.js +0 -1
  138. package/esm/features-51f77be4.js +0 -1
  139. package/esm/features-e8652545.js +0 -1
  140. package/esm/features-ee32a6b1.js +0 -1
  141. package/esm/generic-053ecf26.js +0 -1
  142. package/esm/generic-718c2043.js +0 -1
  143. package/esm/generic-f7b6857e.js +0 -1
  144. package/esm/generic-fa853318.js +0 -1
  145. package/esm/index-1844243e.js +0 -1
  146. package/esm/index-1eb08652.js +0 -1
  147. package/esm/index-37c4969a.js +0 -1
  148. package/esm/index-9367e9fe.js +0 -1
  149. package/esm/index-ac0740b3.js +0 -1
  150. package/esm/index-f529337e.js +0 -1
  151. package/esm/multicamv2-4740ed50.js +0 -1
  152. package/esm/multicamv2-4db4411c.js +0 -1
  153. package/esm/multicamv2-56795ac0.js +0 -1
  154. package/esm/multicamv2-af5aaae2.js +0 -1
  155. package/esm/multicamv2-cb120e9c.js +0 -1
  156. package/esm/multicamv2-d2e17a37.js +0 -1
  157. package/esm/nextEpisodeButton-07b2ad4f.js +0 -1
  158. package/esm/nextEpisodeButton-2169fc07.js +0 -1
  159. package/esm/nextEpisodeButton-980827db.js +0 -1
  160. package/esm/playlist-35e41884.js +0 -1
  161. package/esm/playlist-5e7c09c3.js +0 -1
  162. package/esm/playlist-9803964f.js +0 -1
  163. package/esm/series-8ee62012.js +0 -1
  164. package/esm/series-a4bbc31c.js +0 -1
  165. package/esm/series-d272f64a.js +0 -1
  166. package/esm/series-v2-1acb7131.js +0 -1
  167. package/esm/series-v2-2598cf78.js +0 -1
  168. package/esm/series-v2-3299026d.js +0 -1
  169. package/esm/series-v2-49a0edc1.js +0 -1
  170. package/esm/series-v2-7cc868a6.js +0 -1
  171. package/esm/series-v2-db4ffd44.js +0 -1
  172. package/esm/skin-0028b4f9.js +0 -1
  173. package/esm/skin-0cd2c5af.js +0 -1
  174. package/esm/skin-101047cd.js +0 -1
  175. package/esm/skin-1919cffd.js +0 -1
  176. package/esm/skin-2b945cd5.js +0 -1
  177. package/esm/skin-31a5bbbf.js +0 -1
  178. package/esm/skin-376f7235.js +0 -1
  179. package/esm/skin-3f6533f9.js +0 -1
  180. package/esm/skin-664339e7.js +0 -1
  181. package/esm/skin-66d8c4ba.js +0 -1
  182. package/esm/skin-678faffc.js +0 -1
  183. package/esm/skin-6df698eb.js +0 -1
  184. package/esm/skin-81d9aa36.js +0 -1
  185. package/esm/skin-89fcf481.js +0 -1
  186. package/esm/skin-96861a7b.js +0 -1
  187. package/esm/skin-97da3473.js +0 -1
  188. package/esm/skin-a8094978.js +0 -1
  189. package/esm/skin-b605bb54.js +0 -1
  190. package/esm/skin-be8f7529.js +0 -1
  191. package/esm/skin-c034f74d.js +0 -1
  192. package/esm/skin-ce94c821.js +0 -1
  193. package/esm/skin-cf0ff17f.js +0 -1
  194. package/esm/skin-d06474ec.js +0 -1
  195. package/esm/skin-d55ddaba.js +0 -1
  196. package/esm/skin-dc6a0bb2.js +0 -1
  197. package/esm/skin-e29aa22f.js +0 -1
  198. package/esm/skin-e59d91cf.js +0 -1
  199. package/esm/skin-e63be5f3.js +0 -1
  200. package/esm/skin-e9f5f527.js +0 -1
  201. package/esm/skin-edf70506.js +0 -1
  202. package/esm/skin-fa6fe4b3.js +0 -1
  203. package/esm/skin-fdab5e91.js +0 -1
  204. package/esm/skin-fe802a00.js +0 -1
  205. package/esm/util-9d3b1d34.js +0 -1
  206. package/esm/util-eb5f314c.js +0 -1
  207. package/esm/util-fac978d2.js +0 -1
  208. package/esm/videoSelector-3e58e8ce.js +0 -1
  209. package/esm/videoSelector-5fa20b2e.js +0 -1
  210. package/esm/videoSelector-842af462.js +0 -1
  211. package/esm/videoSelector-b9a2cbe5.js +0 -1
  212. package/esm/videoSelector-cbb097f3.js +0 -1
  213. package/esm/videoSelector-eda5c3b6.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"),i=require("axios"),r=require("./skin-c97f0eea.js"),l=require("./browser-77c57718.js"),a=require("md5"),d=require("js-cookie"),s=require("./captions-80f6eb66.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),m=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e,n){p("event",e,n)}var g={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function I(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?w(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):w(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var y={name:"@viewlift/player",version:"2.1.38",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^1.0.15",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=y.version;var h,E=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":D.get()+"".concat(null==g?void 0:g.getVideoDetails)},T=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:E(),params:I({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":y.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},b=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:D.get()+g.getLinearChannelDetails,params:I(I(I(I(I({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},S=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return o=e.sent,e.abrupt("return",i({url:D.get()+"".concat(null==g?void 0:g.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:I({},n),params:I({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),_=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},O=function(e){var n=e.videoId;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},D=(h=null==g?void 0:g.apiBaseUrl,{set:function(e){e&&(h=e)},get:function(){return h}}),P=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var F,C,k,R,j,V,W,x=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),o=D.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),N=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!P(n)){e.next=6;break}return N||(N=x().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&L().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){N=null})),e.abrupt("return",N);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),U=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},B=(V=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;V.set(t,(V.get(t)||0)+1)},get:function(e){return V.get(e)},clear:function(){V.clear()}}),H=function(e){C=e},G=function(){return C},q=function(){return F},Y=function(e){k=e},Q=function(e){if(R){var n=R.get(e);Y(n+1)}},z=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}});function K(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function X(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var J=0,$=null,Z=function(){var e,n,t,o,i,r,l,a=G();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ee(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ne(){return $||window.sessionStorage.getItem("uid")}function te(){return oe.apply(this,arguments)}function oe(){return(oe=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ie(e){return e?String(e):""}window.initialise=function(e){window.sid=ee(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,streamFailures(e),buffering(e),ads(e),ping(e)},window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearInterval(window.ttFirstFrameTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var n,t,o,i=r.getPlayer(),l=null!=i&&i.el_?Math.floor(i.currentTime()):0;window.cleanupTimers(),f(e,X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:l},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:e,videoPosition:l,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,i,r;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),f("PLAY",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",X({"Video ID":Z(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&J<4)J++,f("BUFFERING",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0,window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,f("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,o,i,r,l;f("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),f("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Z()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(J=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(re(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var re=function(e,n,t){return e>=n&&e<=t},le=function(){var e,n=G(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,s,u,c,v,m,p,f,w,I,y,h,E,T,b,S,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return E=e.sent,T=U(E),b=null==T?void 0:T.site,S=null==T?void 0:T.siteId,e.t0=X,e.t1=X,e.t2=X({aid:b,cid:S,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=ne(),e.t5=Z(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?ie(n.adPosition):"",e.next=26,te();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t24=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=le())&&void 0!==m?m:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(w=f.beacon)||void 0===w?void 0:w.params,e.t33=(0,e.t0)(e.t31,e.t32),_=[e.t33],i({url:(null===(I=window)||void 0===I||null===(y=I.customData)||void 0===y||null===(h=y.beacon)||void 0===h?void 0:h.url)||D.get()+g.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ae=function(){var e=z.get();return e>=0?e+1:1},de=function(){var e,n,t,o=q(),i=G(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=z.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?se(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):se(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var ce=a,ve=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},me=function(e){var n=pe(e,"video.tags",[]),t=pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},pe=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var e,n,t,o,i,l,a,s,u,c,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return D;var L=(null==A?void 0:A.siteName)||(null==A?void 0:A.site)||"",F=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(t=A[F])||void 0===t?void 0:t.metadata)||(null==A||null===(o=A[F])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),k=r.getPlayer(P);if(!D.includes("VIEWLIFT_"))return D;var R,j=window.getComputedStyle(document.getElementById(P),null),V=Math.trunc(j.getPropertyValue("height").slice(0,-2)),W=Math.trunc(j.getPropertyValue("width").slice(0,-2)),x="linearchannel"===F?null==A||null===(l=A.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(s=a.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===s||null===(u=s.content)||void 0===u?void 0:u.id:pe(A,"video.gist.id",""),N="linearchannel"===F?null==A||null===(c=A.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===m?void 0:m.title:pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,U=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){M=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]}));var B=d.get("us_privacy")||d.get("usprivacy"),H=void 0!==B?B:"1YNN",G=null!==(p=null===(f=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===f?void 0:f.fwIdentifier)&&void 0!==p?p:null,q=ue(ue({},ge(C)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ve(W,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:pe(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(w=k.options_)||void 0===w?void 0:w.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:me(A),VIEWLIFT_MEDIA_ID:x,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:x,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+pe(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:d.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:pe(null===(y=window)||void 0===y||null===(h=y.app_data)||void 0===h||null===(E=h.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":pe(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(S=b.site)||void 0===S?void 0:S.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?ce(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:x,VIEWLIFT_CONTENT_TITLE:N,VIEWLIFT_CONTENT_SERIES_TITLE:pe(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:pe(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:de(),VIEWLIFT_SEASON_NUMBER:ae(),VIEWLIFT_CONTENT_TAGS:me(A),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(_=window)||void 0===_||null===(O=_.customData)||void 0===O?void 0:O.macros);for(var Y in q){var Q=new RegExp(Y,"g");D=D.replace(Q,q[Y])}return D},ge=function(e){var n,t,o,i,r,a,d,s,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var m=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,p=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return m||p?(l.isMobile()?m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),m?c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=ue(ue({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:pe(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},we=function(e,n){var t,o,i,r,a,d,s,u,c,v,m,p,f,g=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,y=null==e||null===(r=e[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return ye(y);if(w){var T=he(I,n);return T.src=fe(T.src,n,e),T}if("Safari"!==l.detectBrowser()&&E)return Ie(I);if(h){var b=ye(I);return b.src=fe(b.src,n,e),b}if(null!=I&&I.mpeg){var S=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return S.src=fe(S.src,n,e),S}return null},Ie=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},he=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,s=l.detectBrowser();if(r.getPlayer(n),"Safari"===s){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return Ee(n),u}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ee(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ee=function(e){var n=r.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==l.detectBrowser()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Te=function(e,n){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},be=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,_e=function(e,n,t){var o=fe(n,e,t),i=r.getPlayer(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==u(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r.getPlayer(e);if(null!==l.el_){Se=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var Oe,De=(Oe=!0,{enable:function(){Oe=!0},disable:function(){Oe=!1},get enabled(){return Oe}}),Pe="ssai-breakStart",Ae="ssai-adImpression",Le="ssai-firstQuartile",Fe="ssai-midpoint",Ce="ssai-thirdQuartile",ke="ssai-complete",Re="ssai-breakEnd",je={breakStart:Pe,impression:Ae,firstQuartile:Le,midpoint:Fe,thirdQuartile:Ce,complete:ke,breakEnd:Re};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=je[o];i&&t.trigger(i,n)}function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?We(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):We(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ne,Me=(Ne={},{get:function(){return Ne},set:function(e){Ne=e}});function Ue(e,n){var t,o,i,l,a,d,s,u,c,v,p,f,g,w,I,y,h,E,T,b,S,_=null==e?void 0:e.playerId,O=r.getPlayer(_);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var D=G(),P=(null==D||null===(o=D.video)||void 0===o?void 0:o.metadata)||[],A=(null==P?void 0:P.length)&&P.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=A)&&void 0!==i&&i.length){var L=A.map(function(e){return e.value});A=null==L?void 0:L.join(",")}m.destroyComscoreTag();var F,C,k,R=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,j=Array.isArray(null==R?void 0:R.category)?null==R||null===(a=R.category)||void 0===a?void 0:a.join(","):(null==R?void 0:R.category)||null,V=xe(xe(xe({},null==D?void 0:D.video),null==D?void 0:D.linearchannel),{},{siteName:(null==e||null===(d=e.comscore)||void 0===d?void 0:d.applicationName)||(null==e||null===(s=e.comscore)||void 0===s||null===(u=s.metadata)||void 0===u?void 0:u.siteName)||(null==D?void 0:D.site)||null,programId:(null==R?void 0:R.videotmsid)||null,programTitle:(null==R?void 0:R.lcProgrammeName)||null,episodeId:(null==R?void 0:R.videotmsid)||null,seasonNumber:(null==D||null===(c=D.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==R||null===(p=R.seriesDetails)||void 0===p?void 0:p.season)||null,episodeNumber:(null==D||null===(f=D.video)||void 0===f||null===(g=f.series)||void 0===g?void 0:g.episodeNumber)||(null==R||null===(w=R.seriesDetails)||void 0===w?void 0:w.episode)||null,episodeTitle:(null==R?void 0:R.lcSubTitle)||null,isCompleteEpisode:!!(null!=D&&null!==(I=D.video)&&void 0!==I&&I.series||null!=R&&null!==(y=R.seriesDetails)&&void 0!==y&&y.episode),genre:A||j,comscoreConfig:{implementationId:(null==e||null===(h=e.comscore)||void 0===h?void 0:h.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),W=null==e||null===(T=e.comscore)||void 0===T||null===(b=T.metadata)||void 0===b?void 0:b.contentType;if(null!=V&&null!==(S=V.streamingInfo)&&void 0!==S&&S.isLiveStream?V.contentType="Live":V.contentType=W||"LongFormOnDemand",null==V||!V.network){var x,N=(null==V?void 0:V.metadata)||[],M=null==N||null===(x=N.find(function(e){return"network"===e.name}))||void 0===x?void 0:x.value;V.network=M||null}null!=V&&V.network&&null!=V&&V.genre&&(V.customGenre="".concat(V.network,"_").concat((null==V?void 0:V.programTitle)||(F=V,null!=F&&F.series?null==F||null===(k=F.series)||void 0===k?void 0:k.title:null==F||null===(C=F.gist)||void 0===C?void 0:C.title),"_").concat(V.genre)),null!=R&&R.airDate&&(V.publishDate=R.airDate),null!=V&&V.runtime&&"function"==typeof O.duration&&(V.runtime=1e3*Math.ceil(O.duration()));var U=m.formulateComscorePayload(V,O);console.log("comscoreOptions player data",U),m.createComscoreStreamingTag(xe({playerName:"Video.js"},U)),m.setComscorePlayerInstance(O)}}function Be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function He(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Be(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Ge(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return qe(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qe(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function qe(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Ye,Qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),ze=(Ye=null,{set:function(e){Ye=e},get position(){return Ye}});function Ke(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=n(t.mark(function e(n,o){var i,l,a,d,s,u,c,m,p,f,g,w,I,y,h,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.getPlayer(n),a=we(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=$e(u),m=v(c,2),p=m[0],f=m[1],g=Je(f)||{},u=new URL(u.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=v(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(He({adsParams:He({},p)},g))});case 14:return w=e.sent,e.next=17,w.json();case 17:return I=e.sent,y="https://"+new URL(u).hostname,h=I.trackingUrl,E=I.manifestUrl,T=y+h,b=y+E,Qe.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Je(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=v(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function $e(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Ge((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=v(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var m=v(c[u],2),p=m[0],f=m[1];if(p.startsWith("ads."))d[p.replace(/^ads\./,"")]=f;else s[p]=f}return[d,s]}var Ze,en,nn,tn=new Map;function on(e,n){return rn.apply(this,arguments)}function rn(){return rn=n(t.mark(function e(o,i){var l,a,d,s,u,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,i,l,a){var d,s,u=r.getPlayer(o);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<A&&P.clear(),A=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(s=d[i])||void 0===s?void 0:s.adId)||c;Math.floor(u.currentTime());var m,p=Ge(t);try{var f=function(){var t,r,d,s=m.value,c=s.eventType,p=s.beaconUrls,f=s.startTimeInSeconds,g=s.startTime,w=s.durationInSeconds,I=f||0,y=p,h=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(d=r.ads)||void 0===d?void 0:d.adEventHandler)||null,E="".concat(I,"_").concat(c),T=tn.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",c,"condition1:",e>=I,"map:",tn),e>=I&&!T.includes(E)){T.push(E),tn.set("pod-".concat(l),T);try{L(c,n,y,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=ze.position;ze.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),a())},500)}if("function"==typeof h)try{var S,_={eventType:c,startTimeInSeconds:f,startTime:g,durationInSeconds:w,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[i],adIndex:i};h({adsData:_}),Ve(o,_)}catch(e){console.error("Error when calling ads callback:",e)}var O=Me.get();if(O&&0!==Object.keys(O).length){var D=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,F=O.finishComscoreAdTracking,C=O.endComscoreAdTracking,k="".concat(I,"_").concat(v,"_").concat(c);if(!P.has(k))if(P.set(k,!0),"impression"===c){var R,j=Qe.get();A(D(He(He({},null==n||null===(R=n.ads)||void 0===R?void 0:R[i]),{},{trackingUrl:j})))}else"complete"===c?F():"breakEnd"===c&&C()}}};for(p.s();!(m=p.n()).done;)f()}catch(e){p.e(e)}finally{p.f()}}},L=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},D=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},tn.clear(),ze.set(i),f=Qe.get(),(g=r.getPlayer(o)).one("loadeddata",function(){f&&O(f)}),w=new Map,I=new Map,y=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,E=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==g||null===(u=g.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(m=g.el())||void 0===m||null===(p=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,_=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return He(He({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},O=function(){var e=n(t.mark(function e(n){var l,a,d,s,u,v,m,p,f,g,O,P,A,L,C,k,R,j,V,W,x,N,M,U;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&R()},V=function(e){},j=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,w.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!w.has(r)||n>=r&&n<=d)&&(t=r,w.set(r,!0),I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},u=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,p=m.avails,f=[],g=r.getPlayer(o),O=g.controlBar.progressControl,P=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),f.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:_(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!u&&i&&(g.currentTime(i),j()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(k=(null===(A=window)||void 0===A||null===(L=A.customData)||void 0===L||null===(C=L.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&k(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=g.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",P.appendChild(r)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=r.throttle(function(){var e=g.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=f[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&w.set(i,!0),De.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var s=e-i,u=0,v=0,m=0;m<l.length;m++){var p,g=null==l||null===(p=l[m])||void 0===p?void 0:p.durationInSeconds;if(s<u+g){v=m;break}u+=g}l[v];var y=Math.max(0,r-s),_=Math.round(y);x.style.display="block",U.textContent="".concat(v+1," of ").concat(l.length," • ").concat(D(_));var P=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});P.push.apply(P,c(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&P.push.apply(P,c(null==t?void 0:t.podSlotImpressionBeacon)),F(e,t,P,v,o,j),"break"}I.delete(i)},o=0;o<f.length;o++){if("break"===t())break}n||(x.style.display="none",O.el().classList.remove("hide-progress-bar"),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),De.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){De.enabled&&"ArrowRight"==e.key&&(R(),gn(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(x=document.createElement("div")).className="ssai-ad-container",(N=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",N.append(M),(U=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",x.append(N),x.append(U),g.el().appendChild(x);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,A=-1;case 21:case"end":return e.stop()}},e)})),rn.apply(this,arguments)}function ln(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return an(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?an(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function an(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function dn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function sn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?dn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):dn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var un={},cn=(null===(Ze=window)||void 0===Ze||null===(en=Ze.location)||void 0===en||null===(nn=en.search)||void 0===nn?void 0:nn.includes("debug=true"))||!1,vn=null;function mn(e){return pn.apply(this,arguments)}function pn(){return pn=n(t.mark(function e(o){var i,l,a,d,s,u,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,i,l){var a,d,s=r.getPlayer(o);if(!s.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||u;Math.floor(s.currentTime());var v,m=ln(t);try{for(m.s();!(v=m.n()).done;){var p,f,g,w=v.value,I=w.eventType,y=w.beaconUrls,h=w.startTimeInSeconds,E=w.startTime,T=w.durationInSeconds,b=(w.eventId,h||u),S=y,_=(null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(g=f.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(I),D="pod-".concat(u);A.has(D)||A.set(D,new Set);var P=A.get(D);if(cn&&console.warn(e,b,"map:",I,"condition1:",e>=b,"map:",A),e>=b&&e<=b+L&&!P.has(O)){P.add(O);try{F(I,n,S,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,I,n)}if("function"==typeof _)try{var C,k={eventType:I,startTimeInSeconds:h,startTime:E,durationInSeconds:T,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[i],adIndex:i};_({adsData:k}),Ve(o,k)}catch(e){console.error("Error when calling ads callback:",e)}var R=Me.get();if(R&&0!==Object.keys(R).length){var j=R.formulateComscoreAdPayload,V=R.startComscoreAdTracking,W=R.finishComscoreAdTracking,x=R.endComscoreAdTracking;if("impression"===I){var N,M=Qe.get();V(j(sn(sn({},null==n||null===(N=n.ads)||void 0===N?void 0:N[i]),{},{trackingUrl:M})))}else"complete"===I?W():"breakEnd"===I&&x()}}}}catch(e){m.e(e)}finally{m.f()}}},F=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=un)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=un)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(cn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},g=function(){vn&&clearInterval(vn)},p=Qe.get(),(f=r.getPlayer(o)).one("loadeddata",function(){g(),vn=setInterval(function(){p&&!f.paused()&&P(p)},2e3)}),f.on("dispose",function(){g()}),w=new Map,I=new Map,y=-1,h=null,E=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==f||null===(s=f.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,_=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=!1,D=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return sn(sn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},P=function(){var e=n(t.mark(function e(n){var i,l,a,d,s,u,v,m,p,f;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,v=[],m=r.getPlayer(o),p=m.controlBar.progressControl,f=p.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.map(function(e,n){v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:D(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),cn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",f.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=r.throttle(function(){var e=m.currentTime();if(e!==y){y=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;O=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&w.set(o,!0),De.disable(),E&&E.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,m=0;m<r.length;m++){var f,g=null==r||null===(f=r[m])||void 0===f?void 0:f.durationInSeconds;if(d<s+g){u=m;break}s+=g}setTimeout(function(){un.totalAds=null==r?void 0:r.length,un.currentAdIndex=u},1e3);var y=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});y.push.apply(y,c(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&y.push.apply(y,c(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,y,u),"break"}I.delete(o)},t=0;t<v.length;t++){if("break"===n())break}O||(un={},p.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),De.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),A=new Map,L=2.5;case 22:case"end":return e.stop()}},e)})),pn.apply(this,arguments)}function fn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var gn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},wn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},In=function(e){return!!o.getPlayer("".concat(e))},yn=function(){var e=n(t.mark(function e(o,i){var l,a,d,s=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,M();case 3:return a=e.sent,d=r.getPlayer(o),e.abrupt("return",new Promise(function(e,r){b(i,a).then(function(){var r=n(t.mark(function n(r){var a,s,u,c,v,m,p,f;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=ee(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,p=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,f=we(m,o),!p){n.next=11;break}return n.next=9,Ke(o,m);case 9:f=n.sent,l=!0;case 11:H(m),f&&l?(Tn(o,f),p&&mn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(Me.get()&&0!==Object.keys(Me.get()).length&&Ue({playerId:o,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){r({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),hn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,c,v,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return c=e.sent,(q()||null)&&Q(i),v=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&_(i,c).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),v=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){T(i,c).then(function(){var i=n(t.mark(function n(i){var a,d,u,c,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F,C,k,R,j,V,W,x,N,M,U,B,G,q,Y,Q,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==i?void 0:i.data,D=(null==O?void 0:O.contentType)||"video",P=(null==O||null===(a=O[D])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(f=c.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,A=(null==O||null===(g=O.video)||void 0===g||null===(w=g.streamingInfo)||void 0===w?void 0:w.isLiveStream)||!1,H(i.data),(L=(null==O||null===(I=O.ads)||void 0===I||null===(y=I.preRoll)||void 0===y||null===(h=y.adTags)||void 0===h||null===(E=h.web)||void 0===E?void 0:E.active)&&(null==O||null===(T=O.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(S=b.adTags)||void 0===S||null===(_=S.web)||void 0===_?void 0:_.url))&&_e(o,L,O),F=we(O,o),!P){n.next=12;break}return n.next=11,Ke(o,O);case 11:F=n.sent;case 12:F?(B=(null==O||null===(C=O.video)||void 0===C||null===(k=C.gist)||void 0===k?void 0:k.videoImageUrl)||(null==O||null===(R=O.video)||void 0===R||null===(j=R.gist)||void 0===j||null===(V=j.imageGist)||void 0===V?void 0:V.r16x9),(G=r.getPlayer(o)).poster(B),Tn(o,F),P&&on(o,p),G.on("loadstart",function(){A&&e({status:!0,msg:"Video Loaded",response:O})}),G.on("loadeddata",function(){be(),e({status:!0,msg:"Video Loaded",response:O})}),G.one("play",function(){v&&!P&&m<95&&setTimeout(function(){G.currentTime(v)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==O||null===(W=O.video)||void 0===W||null===(x=W.contentDetails)||void 0===x||null===(N=x.closedCaptions)||void 0===N?void 0:N.length)>0||(null==O||null===(M=O.video)||void 0===M||null===(U=M.closedCaptions)||void 0===U?void 0:U.length)>0?(K=(null==O||null===(Y=O.video)||void 0===Y||null===(Q=Y.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),s.addCaptions(o,q)):s.removeCaptions(o)):(Te(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){bn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),En=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Tn=function(e,n){var t=r.getPlayer(e);t&&t.src(n)},bn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);In(t)&&Te(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):fn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))};exports.authenticateLC=yn,exports.baseUrlManager=D,exports.clearError=be,exports.comscoreInstanceManager=Me,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,n){R.set(e.id,n)})},exports.createSeriesWatchMap=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),j=t}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var n=r.getPlayer(e),t=(Me.get()||{}).destroyComscoreTag;if(En(),t&&t(),r.clearEventListeners(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getCurrentSeries=q,exports.getCurrentVideo=G,exports.getDecodedToken=U,exports.getEntitlementData=function(e,n,t,o){var r,l;return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=de,exports.getLinearChannelDetails=b,exports.getSGAIEnabledSource=Ke,exports.getSeasonNumber=ae,exports.getSeriesDetails=function(e,n){var t,o,r=U(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):i({url:D.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return j},exports.getSource=we,exports.getSsaiEvents=function(e){var n=r.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Pe,e)},adImpression:function(e){return t(Ae,e)},adFirstQuartile:function(e){return t(Le,e)},adMidpoint:function(e){return t(Fe,e)},adThirdQuartile:function(e){return t(Ce,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(Re,e)}}},exports.getToken=M,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},exports.getUserId=ne,exports.getVideoDetails=T,exports.getVideoIdx=function(){return k},exports.getVideoInfo=_,exports.handleError=Te,exports.initialiseAdvertisement=_e,exports.initialiseComscoreStreamingTracking=Ue,exports.initialiseKeyboardEvents=function(e,n){var t,o,i,l=r.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,s,u,c,v,m,p;if(De.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==d||d.focus()),f){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||wn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||gn(e,10)}}},!0)},exports.initiateErrorHandling=bn,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&($=n.userId);var t=r.getPlayer(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=In,exports.isTokenExpired=P,exports.load=hn,exports.loadVideo=Tn,exports.loadVideoInstantly=function(e,n,t){var o=r.getPlayer(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=L,exports.rewind=wn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=S,exports.seasonIdxManager=z,exports.setCurrentSeries=function(e){F=e},exports.setCurrentVideo=H,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=Y,exports.setVideoIdxById=Q,exports.setupAdvertisementMarkers=on,exports.setupAdvertisementMarkersForLinear=mn,exports.skip=gn,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=tn,exports.videoReplayTracker=B;
@@ -1 +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"),i=require("axios"),r=require("./skin-c97f0eea.js"),l=require("./browser-77c57718.js"),a=require("md5"),d=require("js-cookie"),s=require("./captions-80f6eb66.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),m=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e,n){p("event",e,n)}var g={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function I(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 w(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?I(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):I(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var h={name:"@viewlift/player",version:"2.1.36",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=h.version;var y,E=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":D.get()+"".concat(null==g?void 0:g.getVideoDetails)},T=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:E(),params:w({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":h.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},b=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:D.get()+g.getLinearChannelDetails,params:w(w(w(w(w({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},_=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return o=e.sent,e.abrupt("return",i({url:D.get()+"".concat(null==g?void 0:g.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:w({},n),params:w({},(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,r=window.contentType;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},O=function(e){var n=e.videoId;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},D=(y=null==g?void 0:g.apiBaseUrl,{set:function(e){e&&(y=e)},get:function(){return y}}),P=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var C,k,F,R,j,V,W,x=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),o=D.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),N=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!P(n)){e.next=6;break}return N||(N=x().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&L().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){N=null})),e.abrupt("return",N);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),B=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},U=(V=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;V.set(t,(V.get(t)||0)+1)},get:function(e){return V.get(e)},clear:function(){V.clear()}}),H=function(e){k=e},G=function(){return k},q=function(){return C},Y=function(e){F=e},Q=function(e){if(R){var n=R.get(e);Y(n+1)}},z=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}});function K(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function X(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var J=0,$=null,Z=function(){var e,n,t,o,i,r,l,a=G();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ee(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ne(){return $||window.sessionStorage.getItem("uid")}function te(){return oe.apply(this,arguments)}function oe(){return(oe=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ie(e){return e?String(e):""}window.initialise=function(e){window.sid=ee(),window.environment="production",window.platform="WEBSITE",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,f(r?"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===(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),f("PLAY",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",X({"Video ID":Z(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},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")&&J<4)J++,f("BUFFERING",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,f("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,o,i,r,l;f("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),f("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Z()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(J=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(re(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var re=function(e,n,t){return e>=n&&e<=t},le=function(){var e,n=G(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,s,u,c,v,m,p,f,I,w,h,y,E,T,b,_,S;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return E=e.sent,T=B(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===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=ne(),e.t5=Z(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?ie(n.adPosition):"",e.next=26,te();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t24=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=le())&&void 0!==m?m:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(I=f.beacon)||void 0===I?void 0:I.params,e.t33=(0,e.t0)(e.t31,e.t32),S=[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)||D.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(),i=G(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=z.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?se(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):se(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var ce=a,ve=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},me=function(e){var n=pe(e,"video.tags",[]),t=pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},pe=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var e,n,t,o,i,l,a,s,u,c,v,m,p,f,g,I,w,h,y,E,T,b,_,S,O,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return D;var L=(null==A?void 0:A.siteName)||(null==A?void 0:A.site)||"",C=(null==A?void 0:A.contentType)||"video",k=(null==A||null===(t=A[C])||void 0===t?void 0:t.metadata)||(null==A||null===(o=A[C])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),F=r.getPlayer(P);if(!D.includes("VIEWLIFT_"))return D;var R,j=window.getComputedStyle(document.getElementById(P),null),V=Math.trunc(j.getPropertyValue("height").slice(0,-2)),W=Math.trunc(j.getPropertyValue("width").slice(0,-2)),x="linearchannel"===C?null==A||null===(l=A.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(s=a.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===s||null===(u=s.content)||void 0===u?void 0:u.id:pe(A,"video.gist.id",""),N="linearchannel"===C?null==A||null===(c=A.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===m?void 0:m.title:pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,B=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){M=null==e?void 0:e.gppString,B=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=ue(ue({},ge(k)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ve(W,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:pe(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==F||null===(I=F.options_)||void 0===I?void 0:I.autoplay)||1,VIEWLIFT_MUTE:(null==F||null===(w=F.options_)||void 0===w?void 0:w.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:me(A),VIEWLIFT_MEDIA_ID:x,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:x,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+pe(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:d.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:pe(null===(h=window)||void 0===h||null===(y=h.app_data)||void 0===y||null===(E=y.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":pe(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(_=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:x,VIEWLIFT_CONTENT_TITLE:N,VIEWLIFT_CONTENT_SERIES_TITLE:pe(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:pe(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:de(),VIEWLIFT_SEASON_NUMBER:ae(),VIEWLIFT_CONTENT_TAGS:me(A),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"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");D=D.replace(Q,q[Y])}return D},ge=function(e){var n,t,o,i,r,a,d,s,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var m=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,p=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return m||p?(l.isMobile()?m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),m?c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=ue(ue({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:pe(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},Ie=function(e,n){var t,o,i,r,a,d,s,u,c,v,m,p,f,g=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,w=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,h=null==e||null===(r=e[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,y=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=h&&h.hls)return he(h);if(I){var T=ye(w,n);return T.src=fe(T.src,n,e),T}if("Safari"!==l.detectBrowser()&&E)return we(w);if(y){var b=he(w);return b.src=fe(b.src,n,e),b}if(null!=w&&w.mpeg){var _=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(w);return _.src=fe(_.src,n,e),_}return null},we=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},he=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},ye=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,s=l.detectBrowser();if(r.getPlayer(n),"Safari"===s){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return Ee(n),u}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ee(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ee=function(e){var n=r.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==l.detectBrowser()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Te=function(e,n){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},be=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var _e=!1,Se=function(e,n,t){var o=fe(n,e,t),i=r.getPlayer(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==u(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r.getPlayer(e);if(null!==l.el_){_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 s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var Oe,De=(Oe=!0,{enable:function(){Oe=!0},disable:function(){Oe=!1},get enabled(){return Oe}}),Pe="ssai-breakStart",Ae="ssai-adImpression",Le="ssai-firstQuartile",Ce="ssai-midpoint",ke="ssai-thirdQuartile",Fe="ssai-complete",Re="ssai-breakEnd",je={breakStart:Pe,impression:Ae,firstQuartile:Le,midpoint:Ce,thirdQuartile:ke,complete:Fe,breakEnd:Re};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=je[o];i&&t.trigger(i,n)}function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?We(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):We(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ne,Me=(Ne={},{get:function(){return Ne},set:function(e){Ne=e}});function Be(e,n){var t,o,i,l,a,d,s,u,c,v,p,f,g,I,w,h,y,E,T=null==e?void 0:e.playerId,b=r.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!==(i=O)&&void 0!==i&&i.length){var D=O.map(function(e){return e.value});O=null==D?void 0:D.join(",")}m.destroyComscoreTag();var P,A,L,C=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,k=Array.isArray(null==C?void 0:C.category)?null==C||null===(a=C.category)||void 0===a?void 0:a.join(","):(null==C?void 0:C.category)||null,F=xe(xe(xe({},null==_?void 0:_.video),null==_?void 0:_.linearchannel),{},{siteName:(null==_?void 0:_.site)||null,programId:(null==C?void 0:C.videotmsid)||null,programTitle:(null==C?void 0:C.lcProgrammeName)||null,episodeId:(null==C?void 0:C.videotmsid)||null,seasonNumber:(null==_||null===(d=_.video)||void 0===d||null===(s=d.series)||void 0===s?void 0:s.seasonNumber)||(null==C||null===(u=C.seriesDetails)||void 0===u?void 0:u.season)||null,episodeNumber:(null==_||null===(c=_.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.episodeNumber)||(null==C||null===(p=C.seriesDetails)||void 0===p?void 0:p.episode)||null,episodeTitle:(null==C?void 0:C.lcSubTitle)||null,isCompleteEpisode:!!(null!=_&&null!==(f=_.video)&&void 0!==f&&f.series||null!=C&&null!==(g=C.seriesDetails)&&void 0!==g&&g.episode),genre:O||k,comscoreConfig:{implementationId:(null==e||null===(I=e.comscore)||void 0===I?void 0:I.implementationId)||null,projectId:(null==e||null===(w=e.comscore)||void 0===w?void 0:w.projectId)||null}}),R=null==e||null===(h=e.comscore)||void 0===h||null===(y=h.metadata)||void 0===y?void 0:y.contentType;if(null!=F&&null!==(E=F.streamingInfo)&&void 0!==E&&E.isLiveStream?F.contentType="Live":F.contentType=R||"LongFormOnDemand",null==F||!F.network){var j,V=(null==F?void 0:F.metadata)||[],W=null==V||null===(j=V.find(function(e){return"network"===e.name}))||void 0===j?void 0:j.value;F.network=W||null}null!=F&&F.network&&null!=F&&F.genre&&(F.customGenre="".concat(F.network,"_").concat((null==F?void 0:F.programTitle)||(P=F,null!=P&&P.series?null==P||null===(L=P.series)||void 0===L?void 0:L.title:null==P||null===(A=P.gist)||void 0===A?void 0:A.title),"_").concat(F.genre)),null!=C&&C.airDate&&(F.publishDate=C.airDate),null!=F&&F.runtime&&"function"==typeof b.duration&&(F.runtime=1e3*Math.ceil(b.duration()));var x=m.formulateComscorePayload(F,b);console.log("comscoreOptions player data",x),m.createComscoreStreamingTag(xe({playerName:"Video.js"},x)),m.setComscorePlayerInstance(b)}}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 He(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}function Ge(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return qe(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qe(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function qe(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Ye,Qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),ze=(Ye=null,{set:function(e){Ye=e},get position(){return Ye}});function Ke(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=n(t.mark(function e(n,o){var i,l,a,d,s,u,c,m,p,f,g,I,w,h,y,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.getPlayer(n),a=Ie(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=$e(u),m=v(c,2),p=m[0],f=m[1],g=Je(f)||{},u=new URL(u.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=v(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(He({adsParams:He({},p)},g))});case 14:return I=e.sent,e.next=17,I.json();case 17:return w=e.sent,h="https://"+new URL(u).hostname,y=w.trackingUrl,E=w.manifestUrl,T=h+y,b=h+E,Qe.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Je(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=v(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function $e(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Ge((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=v(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var m=v(c[u],2),p=m[0],f=m[1];if(p.startsWith("ads."))d[p.replace(/^ads\./,"")]=f;else s[p]=f}return[d,s]}var Ze,en,nn,tn=new Map;function on(e,n){return rn.apply(this,arguments)}function rn(){return rn=n(t.mark(function e(o,i){var l,a,d,s,u,v,m,p,f,g,I,w,h,y,E,T,b,_,S,O,D,P,A,L,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,i,l,a){var d,s,u=r.getPlayer(o);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<A&&P.clear(),A=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(s=d[i])||void 0===s?void 0:s.adId)||c;Math.floor(u.currentTime());var m,p=Ge(t);try{var f=function(){var t,r,d,s=m.value,c=s.eventType,p=s.beaconUrls,f=s.startTimeInSeconds,g=s.startTime,I=s.durationInSeconds,w=f||0,h=p,y=(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(w,"_").concat(c),T=tn.get("pod-".concat(l))||[];if(console.warn(e,w,"map:",c,"condition1:",e>=w,"map:",tn),e>=w&&!T.includes(E)){T.push(E),tn.set("pod-".concat(l),T);try{L(c,n,h,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=ze.position;ze.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),a())},500)}if("function"==typeof y)try{var _,S={eventType:c,startTimeInSeconds:f,startTime:g,durationInSeconds:I,ad:null==n||null===(_=n.ads)||void 0===_?void 0:_[i],adIndex:i};y({adsData:S}),Ve(o,S)}catch(e){console.error("Error when calling ads callback:",e)}var O=Me.get();if(O&&0!==Object.keys(O).length){var D=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,C=O.finishComscoreAdTracking,k=O.endComscoreAdTracking,F="".concat(w,"_").concat(v,"_").concat(c);if(!P.has(F))if(P.set(F,!0),"impression"===c){var R,j=Qe.get();A(D(He(He({},null==n||null===(R=n.ads)||void 0===R?void 0:R[i]),{},{trackingUrl:j})))}else"complete"===c?C():"breakEnd"===c&&k()}}};for(p.s();!(m=p.n()).done;)f()}catch(e){p.e(e)}finally{p.f()}}},L=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},D=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},tn.clear(),ze.set(i),f=Qe.get(),(g=r.getPlayer(o)).one("loadeddata",function(){f&&O(f)}),I=new Map,w=new Map,h=-1,y=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,E=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==g||null===(u=g.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,_=(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 i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return He(He({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},O=function(){var e=n(t.mark(function e(n){var l,a,d,s,u,v,m,p,f,g,O,P,A,L,k,F,R,j,V,W,x,N,M,B;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&R()},V=function(e){},j=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!I.has(r)||n>=r&&n<=d)&&(t=r,I.set(r,!0),w.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},u=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,p=m.avails,f=[],g=r.getPlayer(o),O=g.controlBar.progressControl,P=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),f.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:S(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!u&&i&&(g.currentTime(i),j()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(F=(null===(A=window)||void 0===A||null===(L=A.customData)||void 0===L||null===(k=L.ads)||void 0===k?void 0:k.onAdBreaksLoaded)||null)&&F(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=g.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",P.appendChild(r)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=r.throttle(function(){var e=g.currentTime();if(e!==h){h=e;for(var n=!1,t=function(){var t=f[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&I.set(i,!0),De.disable(),y&&y.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 s=e-i,u=0,v=0,m=0;m<l.length;m++){var p,g=null==l||null===(p=l[m])||void 0===p?void 0:p.durationInSeconds;if(s<u+g){v=m;break}u+=g}l[v];var h=Math.max(0,r-s),S=Math.round(h);x.style.display="block",B.textContent="".concat(v+1," of ").concat(l.length," • ").concat(D(S));var P=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});P.push.apply(P,c(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&P.push.apply(P,c(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,P,v,o,j),"break"}w.delete(i)},o=0;o<f.length;o++){if("break"===t())break}n||(x.style.display="none",O.el().classList.remove("hide-progress-bar"),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),y&&y.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),De.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){De.enabled&&"ArrowRight"==e.key&&(R(),gn(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(x=document.createElement("div")).className="ssai-ad-container",(N=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",N.append(M),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",x.append(N),x.append(B),g.el().appendChild(x);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,A=-1;case 21:case"end":return e.stop()}},e)})),rn.apply(this,arguments)}function ln(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return an(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?an(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function an(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function dn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function sn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?dn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):dn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var un={},cn=(null===(Ze=window)||void 0===Ze||null===(en=Ze.location)||void 0===en||null===(nn=en.search)||void 0===nn?void 0:nn.includes("debug=true"))||!1,vn=null;function mn(e){return pn.apply(this,arguments)}function pn(){return pn=n(t.mark(function e(o){var i,l,a,d,s,u,v,m,p,f,g,I,w,h,y,E,T,b,_,S,O,D,P,A,L,C,k;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:k=function(e,n,t,i,l){var a,d,s=r.getPlayer(o);if(!s.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||u;Math.floor(s.currentTime());var v,m=ln(t);try{for(m.s();!(v=m.n()).done;){var p,f,g,I=v.value,w=I.eventType,h=I.beaconUrls,y=I.startTimeInSeconds,E=I.startTime,T=I.durationInSeconds,b=(I.eventId,y||u),_=h,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(w),D="pod-".concat(u);A.has(D)||A.set(D,new Set);var P=A.get(D);if(cn&&console.warn(e,b,"map:",w,"condition1:",e>=b,"map:",A),e>=b&&e<=b+L&&!P.has(O)){P.add(O);try{C(w,n,_,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,w,n)}if("function"==typeof S)try{var k,F={eventType:w,startTimeInSeconds:y,startTime:E,durationInSeconds:T,ad:null==n||null===(k=n.ads)||void 0===k?void 0:k[i],adIndex:i};S({adsData:F}),Ve(o,F)}catch(e){console.error("Error when calling ads callback:",e)}var R=Me.get();if(R&&0!==Object.keys(R).length){var j=R.formulateComscoreAdPayload,V=R.startComscoreAdTracking,W=R.finishComscoreAdTracking,x=R.endComscoreAdTracking;if("impression"===w){var N,M=Qe.get();V(j(sn(sn({},null==n||null===(N=n.ads)||void 0===N?void 0:N[i]),{},{trackingUrl:M})))}else"complete"===w?W():"breakEnd"===w&&x()}}}}catch(e){m.e(e)}finally{m.f()}}},C=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=un)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=un)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(cn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},g=function(){vn&&clearInterval(vn)},p=Qe.get(),(f=r.getPlayer(o)).one("loadeddata",function(){g(),vn=setInterval(function(){p&&!f.paused()&&P(p)},2e3)}),f.on("dispose",function(){g()}),I=new Map,w=new Map,h=-1,y=null,E=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,_=(null==f||null===(s=f.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,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,D=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return sn(sn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},P=function(){var e=n(t.mark(function e(n){var i,l,a,d,s,u,v,m,p,f;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),y&&l.searchParams.append("nextToken",y),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,y=u,v=[],m=r.getPlayer(o),p=m.controlBar.progressControl,f=p.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.map(function(e,n){v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:D(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),cn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",f.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=r.throttle(function(){var e=m.currentTime();if(e!==h){h=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;O=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&I.set(o,!0),De.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,s=0,u=0,m=0;m<r.length;m++){var f,g=null==r||null===(f=r[m])||void 0===f?void 0:f.durationInSeconds;if(d<s+g){u=m;break}s+=g}setTimeout(function(){un.totalAds=null==r?void 0:r.length,un.currentAdIndex=u},1e3);var h=[];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)});h.push.apply(h,c(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&h.push.apply(h,c(null==n?void 0:n.podSlotImpressionBeacon)),k(e,n,h,u),"break"}w.delete(o)},t=0;t<v.length;t++){if("break"===n())break}O||(un={},p.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),De.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),A=new Map,L=2.5;case 22:case"end":return e.stop()}},e)})),pn.apply(this,arguments)}function fn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var gn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},In=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},wn=function(e){return!!o.getPlayer("".concat(e))},hn=function(){var e=n(t.mark(function e(o,i){var l,a,d,s=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,M();case 3:return a=e.sent,d=r.getPlayer(o),e.abrupt("return",new Promise(function(e,r){b(i,a).then(function(){var r=n(t.mark(function n(r){var a,s,u,c,v,m,p,f;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=ee(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,p=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,f=Ie(m,o),!p){n.next=11;break}return n.next=9,Ke(o,m);case 9:f=n.sent,l=!0;case 11:H(m),f&&l?(Tn(o,f),p&&mn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(Me.get()&&0!==Object.keys(Me.get()).length&&Be({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)}}(),yn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,c,v,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return c=e.sent,(q()||null)&&Q(i),v=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&S(i,c).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),v=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){T(i,c).then(function(){var i=n(t.mark(function n(i){var a,d,u,c,f,g,I,w,h,y,E,T,b,_,S,O,D,P,A,L,C,k,F,R,j,V,W,x,N,M,B,U,G,q,Y,Q,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==i?void 0:i.data,D=(null==O?void 0:O.contentType)||"video",P=(null==O||null===(a=O[D])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(f=c.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,A=(null==O||null===(g=O.video)||void 0===g||null===(I=g.streamingInfo)||void 0===I?void 0:I.isLiveStream)||!1,H(i.data),(L=(null==O||null===(w=O.ads)||void 0===w||null===(h=w.preRoll)||void 0===h||null===(y=h.adTags)||void 0===y||null===(E=y.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))&&Se(o,L,O),C=Ie(O,o),!P){n.next=12;break}return n.next=11,Ke(o,O);case 11:C=n.sent;case 12:C?(U=(null==O||null===(k=O.video)||void 0===k||null===(F=k.gist)||void 0===F?void 0:F.videoImageUrl)||(null==O||null===(R=O.video)||void 0===R||null===(j=R.gist)||void 0===j||null===(V=j.imageGist)||void 0===V?void 0:V.r16x9),(G=r.getPlayer(o)).poster(U),Tn(o,C),P&&on(o,p),G.on("loadstart",function(){A&&e({status:!0,msg:"Video Loaded",response:O})}),G.on("loadeddata",function(){be(),e({status:!0,msg:"Video Loaded",response:O})}),G.one("play",function(){v&&!P&&m<95&&setTimeout(function(){G.currentTime(v)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==O||null===(W=O.video)||void 0===W||null===(x=W.contentDetails)||void 0===x||null===(N=x.closedCaptions)||void 0===N?void 0:N.length)>0||(null==O||null===(M=O.video)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0?(K=(null==O||null===(Y=O.video)||void 0===Y||null===(Q=Y.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),s.addCaptions(o,q)):s.removeCaptions(o)):(Te(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){bn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),En=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Tn=function(e,n){var t=r.getPlayer(e);t&&t.src(n)},bn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);wn(t)&&Te(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):fn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))};exports.authenticateLC=hn,exports.baseUrlManager=D,exports.clearError=be,exports.comscoreInstanceManager=Me,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,n){R.set(e.id,n)})},exports.createSeriesWatchMap=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),j=t}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var n=r.getPlayer(e),t=(Me.get()||{}).destroyComscoreTag;if(En(),t&&t(),r.clearEventListeners(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getCurrentSeries=q,exports.getCurrentVideo=G,exports.getDecodedToken=B,exports.getEntitlementData=function(e,n,t,o){var r,l;return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=de,exports.getLinearChannelDetails=b,exports.getSGAIEnabledSource=Ke,exports.getSeasonNumber=ae,exports.getSeriesDetails=function(e,n){var t,o,r=B(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):i({url:D.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return j},exports.getSource=Ie,exports.getSsaiEvents=function(e){var n=r.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Pe,e)},adImpression:function(e){return t(Ae,e)},adFirstQuartile:function(e){return t(Le,e)},adMidpoint:function(e){return t(Ce,e)},adThirdQuartile:function(e){return t(ke,e)},adComplete:function(e){return t(Fe,e)},adBreakEnd:function(e){return t(Re,e)}}},exports.getToken=M,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},exports.getUserId=ne,exports.getVideoDetails=T,exports.getVideoIdx=function(){return F},exports.getVideoInfo=S,exports.handleError=Te,exports.initialiseAdvertisement=Se,exports.initialiseComscoreStreamingTracking=Be,exports.initialiseKeyboardEvents=function(e,n){var t,o,i,l=r.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,s,u,c,v,m,p;if(De.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==d||d.focus()),f){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||In(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||gn(e,10)}}},!0)},exports.initiateErrorHandling=bn,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&($=n.userId);var t=r.getPlayer(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=wn,exports.isTokenExpired=P,exports.load=yn,exports.loadVideo=Tn,exports.loadVideoInstantly=function(e,n,t){var o=r.getPlayer(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=L,exports.rewind=In,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=_,exports.seasonIdxManager=z,exports.setCurrentSeries=function(e){C=e},exports.setCurrentVideo=H,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=Y,exports.setVideoIdxById=Q,exports.setupAdvertisementMarkers=on,exports.setupAdvertisementMarkersForLinear=mn,exports.skip=gn,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=tn,exports.videoReplayTracker=U;
@@ -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"),i=require("axios"),r=require("./skin-c97f0eea.js"),l=require("./browser-77c57718.js"),a=require("md5"),d=require("js-cookie"),s=require("./captions-80f6eb66.js"),u=require("@babel/runtime/helpers/typeof"),c=require("@babel/runtime/helpers/toConsumableArray"),v=require("@babel/runtime/helpers/slicedToArray"),m=require("@viewlift/comscore/index.js");function p(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e,n){p("event",e,n)}var g={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function w(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function I(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?w(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):w(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var y={name:"@viewlift/player",version:"2.1.38",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/comscore":"^1.0.14",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5",md5:"^2.3.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-contrib-quality-menu":"^1.0.3","videojs-mux":"^4.21.7"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=y.version;var h,E=function(){var e,n,t,o;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementBaseUrl)+"/video/status":D.get()+"".concat(null==g?void 0:g.getVideoDetails)},T=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:E(),params:I({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":y.version,"x-player-name":"videojs",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken},withCredentials:!0})},b=function(e,n){var t,o,r,l,a,d,s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:D.get()+g.getLinearChannelDetails,params:I(I(I(I(I({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:s},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},S=function(){var e=n(t.mark(function e(n){var o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return o=e.sent,e.abrupt("return",i({url:D.get()+"".concat(null==g?void 0:g.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:I({},n),params:I({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),_=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(o=t.watchHistory)||void 0===o?void 0:o.xApiKey},timeout:15e3})},O=function(e){var n=e.videoId;return i({method:"GET",url:D.get()+"".concat(null==g?void 0:g.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},D=(h=null==g?void 0:g.apiBaseUrl,{set:function(e){e&&(h=e)},get:function(){return h}}),P=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},A=null;function L(){return{set:function(e){e&&(A=e)},get:function(){return A}}}var F,C,k,R,j,V,W,x=function(){var e=n(t.mark(function e(){var n,o,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),o=D.get(),e.prev=2,e.next=5,i({method:"GET",url:"".concat(o,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),N=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!P(n)){e.next=6;break}return N||(N=x().then(function(e){var t,o,i=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(o=e.data)||void 0===o?void 0:o.refreshToken;return i&&sessionStorage.setItem("vlp_token",i),r&&L().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){N=null})),e.abrupt("return",N);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),U=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},B=(V=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;V.set(t,(V.get(t)||0)+1)},get:function(e){return V.get(e)},clear:function(){V.clear()}}),H=function(e){C=e},G=function(){return C},q=function(){return F},Y=function(e){k=e},Q=function(e){if(R){var n=R.get(e);Y(n+1)}},z=(W=0,{set:function(e){e>=0&&(W=e)},get:function(){return W}});function K(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function X(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?K(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):K(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var J=0,$=null,Z=function(){var e,n,t,o,i,r,l,a=G();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===t||null===(o=t.content)||void 0===o?void 0:o.id:(null==a||null===(i=a.video)||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function ee(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function ne(){return $||window.sessionStorage.getItem("uid")}function te(){return oe.apply(this,arguments)}function oe(){return(oe=n(t.mark(function e(){var n,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(o=JSON.parse(atob(n.split(".")[1])))||!o.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==o?void 0:o.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ie(e){return e?String(e):""}window.initialise=function(e){window.sid=ee(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,streamFailures(e),buffering(e),ads(e),ping(e)},window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearInterval(window.ttFirstFrameTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var n,t,o,i=r.getPlayer(),l=null!=i&&i.el_?Math.floor(i.currentTime()):0;window.cleanupTimers(),f(e,X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:l},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:e,videoPosition:l,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var o,i,r;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),f("PLAY",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:Math.floor(e.currentTime())},null===(o=window)||void 0===o||null===(i=o.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",X({"Video ID":Z(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,n){var t,o;if(n.el_){var i,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(o=t.className)&&void 0!==o&&o.includes("vjs-waiting")&&J<4)J++,f("BUFFERING",X({pfm:window.platform,uid:ne(),vid:Z(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,o;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0,window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,f("FIRST_FRAME",X({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,o,i,r,l;f("AD_REQUEST",X({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),vid:Z(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),f("AD_IMPRESSION",X({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Z()},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(J=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),o=e.buffered(),i=0;i<o.length;i++){var r=o.start(i),l=o.end(i);if(re(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var re=function(e,n,t){return e>=n&&e<=t},le=function(){var e,n=G(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,s,u,c,v,m,p,f,w,I,y,h,E,T,b,S,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return E=e.sent,T=U(E),b=null==T?void 0:T.site,S=null==T?void 0:T.siteId,e.t0=X,e.t1=X,e.t2=X({aid:b,cid:S,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=ne(),e.t5=Z(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?ie(n.adPosition):"",e.next=26,te();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(s=n.bitrate)&&void 0!==s?s:null,e.t24=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=le())&&void 0!==m?m:null,e.t28=null!=b?b:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(w=f.beacon)||void 0===w?void 0:w.params,e.t33=(0,e.t0)(e.t31,e.t32),_=[e.t33],i({url:(null===(I=window)||void 0===I||null===(y=I.customData)||void 0===y||null===(h=y.beacon)||void 0===h?void 0:h.url)||D.get()+g.getBeaconUrl,method:"post",headers:{Authorization:E},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var ae=function(){var e=z.get();return e>=0?e+1:1},de=function(){var e,n,t,o=q(),i=G(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=z.get(),a=null==o||null===(n=o[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function se(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function ue(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?se(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):se(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var ce=a,ve=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},me=function(e){var n=pe(e,"video.tags",[]),t=pe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},pe=function(e,n,t){for(var o=0,i=(n=n.split(".")).length;o<i;o++){var r;e=null===(r=e)||void 0===r?void 0:r[n[o]]}return e||t},fe=function(){var e,n,t,o,i,l,a,s,u,c,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",P=arguments.length>1?arguments[1]:void 0,A=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return D;var L=(null==A?void 0:A.siteName)||(null==A?void 0:A.site)||"",F=(null==A?void 0:A.contentType)||"video",C=(null==A||null===(t=A[F])||void 0===t?void 0:t.metadata)||(null==A||null===(o=A[F])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.metadata),k=r.getPlayer(P);if(!D.includes("VIEWLIFT_"))return D;var R,j=window.getComputedStyle(document.getElementById(P),null),V=Math.trunc(j.getPropertyValue("height").slice(0,-2)),W=Math.trunc(j.getPropertyValue("width").slice(0,-2)),x="linearchannel"===F?null==A||null===(l=A.linearchannel)||void 0===l||null===(a=l.channels)||void 0===a||null===(s=a.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===s||null===(u=s.content)||void 0===u?void 0:u.id:pe(A,"video.gist.id",""),N="linearchannel"===F?null==A||null===(c=A.linearchannel)||void 0===c||null===(v=c.channels)||void 0===v||null===(m=v.find(function(e){return(null==e?void 0:e.id)===(null==A?void 0:A.channelId)}))||void 0===m?void 0:m.title:pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,U=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){M=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]}));var B=d.get("us_privacy")||d.get("usprivacy"),H=void 0!==B?B:"1YNN",G=null!==(p=null===(f=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===f?void 0:f.fwIdentifier)&&void 0!==p?p:null,q=ue(ue({},ge(C)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ve(W,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(g=window)||void 0===g?void 0:g.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:pe(A,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==k||null===(w=k.options_)||void 0===w?void 0:w.autoplay)||1,VIEWLIFT_MUTE:(null==k||null===(I=k.options_)||void 0===I?void 0:I.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:me(A),VIEWLIFT_MEDIA_ID:x,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(pe(A,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:x,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+pe(A,"video.gist.permalink","")),VIEWLIFT_CONSENT:d.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:pe(null===(y=window)||void 0===y||null===(h=y.app_data)||void 0===h||null===(E=h.site)||void 0===E?void 0:E.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":pe(null===(T=window)||void 0===T||null===(b=T.app_data)||void 0===b||null===(S=b.site)||void 0===S?void 0:S.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?ce(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:pe(A,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:x,VIEWLIFT_CONTENT_TITLE:N,VIEWLIFT_CONTENT_SERIES_TITLE:pe(A,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:pe(A,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:de(),VIEWLIFT_SEASON_NUMBER:ae(),VIEWLIFT_CONTENT_TAGS:me(A),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(_=window)||void 0===_||null===(O=_.customData)||void 0===O?void 0:O.macros);for(var Y in q){var Q=new RegExp(Y,"g");D=D.replace(Q,q[Y])}return D},ge=function(e){var n,t,o,i,r,a,d,s,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var m=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,p=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return m||p?(l.isMobile()?m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):m?c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),m?c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):p&&(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=ue(ue({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(l.isMobile()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=l.isMobile()?ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):ue(ue({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=ue(ue({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:pe(null===(d=window)||void 0===d||null===(s=d.app_data)||void 0===s||null===(u=s.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},we=function(e,n){var t,o,i,r,a,d,s,u,c,v,m,p,f,g=(null==e?void 0:e.contentType)||"video",w=null==e||null===(t=e[g])||void 0===t?void 0:t.drmEnabled,I=null==e||null===(o=e[g])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,y=null==e||null===(r=e[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,h=(null==e||null===(d=e[g])||void 0===d||null===(s=d.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[g])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var E=(null==e||null===(m=e[g])||void 0===m||null===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=y&&y.hls)return ye(y);if(w){var T=he(I,n);return T.src=fe(T.src,n,e),T}if("Safari"!==l.detectBrowser()&&E)return Ie(I);if(h){var b=ye(I);return b.src=fe(b.src,n,e),b}if(null!=I&&I.mpeg){var S=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(I);return S.src=fe(S.src,n,e),S}return null},Ie=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ye=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},he=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,a=e.widevine,d=e.playReady,s=l.detectBrowser();if(r.getPlayer(n),"Safari"===s){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var i={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};o.xhr(i,function(e,n,o){console.log(e),e&&t(e),t(null,new Uint8Array(o))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,i,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:i,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};o.xhr(l,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(i);return Ee(n),u}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Ee(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==d?void 0:d.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==d?void 0:d.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==d?void 0:d.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Ee=function(e){var n=r.getPlayer(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==l.detectBrowser()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Te=function(e,n){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},be=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,_e=function(e,n,t){var o=fe(n,e,t),i=r.getPlayer(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==u(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r.getPlayer(e);if(null!==l.el_){Se=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var s="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,s="touchend"),l.one(s,function(){u&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};var Oe,De=(Oe=!0,{enable:function(){Oe=!0},disable:function(){Oe=!1},get enabled(){return Oe}}),Pe="ssai-breakStart",Ae="ssai-adImpression",Le="ssai-firstQuartile",Fe="ssai-midpoint",Ce="ssai-thirdQuartile",ke="ssai-complete",Re="ssai-breakEnd",je={breakStart:Pe,impression:Ae,firstQuartile:Le,midpoint:Fe,thirdQuartile:Ce,complete:ke,breakEnd:Re};function Ve(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.getPlayer(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=je[o];i&&t.trigger(i,n)}function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function xe(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?We(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):We(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Ne,Me=(Ne={},{get:function(){return Ne},set:function(e){Ne=e}});function Ue(e,n){var t,o,i,l,a,d,s,u,c,v,p,f,g,w,I,y,h,E,T,b,S,_=null==e?void 0:e.playerId,O=r.getPlayer(_);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var D=G(),P=(null==D||null===(o=D.video)||void 0===o?void 0:o.metadata)||[],A=(null==P?void 0:P.length)&&P.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=A)&&void 0!==i&&i.length){var L=A.map(function(e){return e.value});A=null==L?void 0:L.join(",")}m.destroyComscoreTag();var F,C,k,R=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,j=Array.isArray(null==R?void 0:R.category)?null==R||null===(a=R.category)||void 0===a?void 0:a.join(","):(null==R?void 0:R.category)||null,V=xe(xe(xe({},null==D?void 0:D.video),null==D?void 0:D.linearchannel),{},{siteName:(null==e||null===(d=e.comscore)||void 0===d?void 0:d.applicationName)||(null==e||null===(s=e.comscore)||void 0===s||null===(u=s.metadata)||void 0===u?void 0:u.siteName)||(null==D?void 0:D.site)||null,programId:(null==R?void 0:R.videotmsid)||null,programTitle:(null==R?void 0:R.lcProgrammeName)||null,episodeId:(null==R?void 0:R.videotmsid)||null,seasonNumber:(null==D||null===(c=D.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==R||null===(p=R.seriesDetails)||void 0===p?void 0:p.season)||null,episodeNumber:(null==D||null===(f=D.video)||void 0===f||null===(g=f.series)||void 0===g?void 0:g.episodeNumber)||(null==R||null===(w=R.seriesDetails)||void 0===w?void 0:w.episode)||null,episodeTitle:(null==R?void 0:R.lcSubTitle)||null,isCompleteEpisode:!!(null!=D&&null!==(I=D.video)&&void 0!==I&&I.series||null!=R&&null!==(y=R.seriesDetails)&&void 0!==y&&y.episode),genre:A||j,comscoreConfig:{implementationId:(null==e||null===(h=e.comscore)||void 0===h?void 0:h.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),W=null==e||null===(T=e.comscore)||void 0===T||null===(b=T.metadata)||void 0===b?void 0:b.contentType;if(null!=V&&null!==(S=V.streamingInfo)&&void 0!==S&&S.isLiveStream?V.contentType="Live":V.contentType=W||"LongFormOnDemand",null==V||!V.network){var x,N=(null==V?void 0:V.metadata)||[],M=null==N||null===(x=N.find(function(e){return"network"===e.name}))||void 0===x?void 0:x.value;V.network=M||null}null!=V&&V.network&&null!=V&&V.genre&&(V.customGenre="".concat(V.network,"_").concat((null==V?void 0:V.programTitle)||(F=V,null!=F&&F.series?null==F||null===(k=F.series)||void 0===k?void 0:k.title:null==F||null===(C=F.gist)||void 0===C?void 0:C.title),"_").concat(V.genre)),null!=R&&R.airDate&&(V.publishDate=R.airDate),null!=V&&V.runtime&&"function"==typeof O.duration&&(V.runtime=1e3*Math.ceil(O.duration()));var U=m.formulateComscorePayload(V,O);console.log("comscoreOptions player data",U),m.createComscoreStreamingTag(xe({playerName:"Video.js"},U)),m.setComscorePlayerInstance(O)}}function Be(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function He(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Be(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Be(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function Ge(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return qe(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?qe(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function qe(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Ye,Qe=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),ze=(Ye=null,{set:function(e){Ye=e},get position(){return Ye}});function Ke(e,n){return Xe.apply(this,arguments)}function Xe(){return(Xe=n(t.mark(function e(n,o){var i,l,a,d,s,u,c,m,p,f,g,w,I,y,h,E,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r.getPlayer(n),a=we(o,n),d=a.src,s=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[s])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,u=d.replace("/dash/","/session/").replace("/master/","/session/"),u=fe(u,n,o),c=$e(u),m=v(c,2),p=m[0],f=m[1],g=Je(f)||{},u=new URL(u.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=v(e,2),t=n[0],o=n[1];u.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(He({adsParams:He({},p)},g))});case 14:return w=e.sent,e.next=17,w.json();case 17:return I=e.sent,y="https://"+new URL(u).hostname,h=I.trackingUrl,E=I.manifestUrl,T=y+h,b=y+E,Qe.set(T),console.log("%c TRACKING URL","background: #bdf369; color: #000",T),a.src=b,e.abrupt("return",a);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",a);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Je(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=v(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function $e(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=Ge((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=v(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},s={},u=0,c=Object.entries(n);u<c.length;u++){var m=v(c[u],2),p=m[0],f=m[1];if(p.startsWith("ads."))d[p.replace(/^ads\./,"")]=f;else s[p]=f}return[d,s]}var Ze,en,nn,tn=new Map;function on(e,n){return rn.apply(this,arguments)}function rn(){return rn=n(t.mark(function e(o,i){var l,a,d,s,u,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,i,l,a){var d,s,u=r.getPlayer(o);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<A&&P.clear(),A=e;var v=(null==n||null===(d=n.ads)||void 0===d||null===(s=d[i])||void 0===s?void 0:s.adId)||c;Math.floor(u.currentTime());var m,p=Ge(t);try{var f=function(){var t,r,d,s=m.value,c=s.eventType,p=s.beaconUrls,f=s.startTimeInSeconds,g=s.startTime,w=s.durationInSeconds,I=f||0,y=p,h=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(d=r.ads)||void 0===d?void 0:d.adEventHandler)||null,E="".concat(I,"_").concat(c),T=tn.get("pod-".concat(l))||[];if(console.warn(e,I,"map:",c,"condition1:",e>=I,"map:",tn),e>=I&&!T.includes(E)){T.push(E),tn.set("pod-".concat(l),T);try{L(c,n,y,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=ze.position;ze.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),a())},500)}if("function"==typeof h)try{var S,_={eventType:c,startTimeInSeconds:f,startTime:g,durationInSeconds:w,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[i],adIndex:i};h({adsData:_}),Ve(o,_)}catch(e){console.error("Error when calling ads callback:",e)}var O=Me.get();if(O&&0!==Object.keys(O).length){var D=O.formulateComscoreAdPayload,A=O.startComscoreAdTracking,F=O.finishComscoreAdTracking,C=O.endComscoreAdTracking,k="".concat(I,"_").concat(v,"_").concat(c);if(!P.has(k))if(P.set(k,!0),"impression"===c){var R,j=Qe.get();A(D(He(He({},null==n||null===(R=n.ads)||void 0===R?void 0:R[i]),{},{trackingUrl:j})))}else"complete"===c?F():"breakEnd"===c&&C()}}};for(p.s();!(m=p.n()).done;)f()}catch(e){p.e(e)}finally{p.f()}}},L=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},D=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},tn.clear(),ze.set(i),f=Qe.get(),(g=r.getPlayer(o)).one("loadeddata",function(){f&&O(f)}),w=new Map,I=new Map,y=-1,h=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,E=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,T=(null==g||null===(s=g.controlBar)||void 0===s?void 0:s.getChild("seriesV2"))||null,b=(null==g||null===(u=g.el())||void 0===u||null===(v=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(m=g.el())||void 0===m||null===(p=m.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===p?void 0:p[0])||null,_=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return He(He({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},O=function(){var e=n(t.mark(function e(n){var l,a,d,s,u,v,m,p,f,g,O,P,A,L,C,k,R,j,V,W,x,N,M,U;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&R()},V=function(e){},j=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=(i.ads,Math.floor(r+l));n>=r&&n<=a&&(t=a,w.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,o=Ge(f);try{for(o.s();!(e=o.n()).done;){var i=e.value,r=i.startTimeInSeconds,l=i.durationInSeconds,a=i.ads,d=Math.floor(r+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>d||n>r)&&!w.has(r)||n>=r&&n<=d)&&(t=r,w.set(r,!0),I.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},u=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:m=e.sent,p=m.avails,f=[],g=r.getPlayer(o),O=g.controlBar.progressControl,P=O.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),p.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(u=!0),f.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:_(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!u&&i&&(g.currentTime(i),j()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(k=(null===(A=window)||void 0===A||null===(L=A.customData)||void 0===L||null===(C=L.ads)||void 0===C?void 0:C.onAdBreaksLoaded)||null)&&k(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=g.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",P.appendChild(r)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=r.throttle(function(){var e=g.currentTime();if(e!==y){y=e;for(var n=!1,t=function(){var t=f[o],i=t.startTimeInSeconds,r=t.durationInSeconds,l=t.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&w.set(i,!0),De.disable(),h&&h.classList.add("vjs-hidden"),b&&(b.style.pointerEvents="none",b.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),O.el().classList.add("hide-progress-bar");for(var s=e-i,u=0,v=0,m=0;m<l.length;m++){var p,g=null==l||null===(p=l[m])||void 0===p?void 0:p.durationInSeconds;if(s<u+g){v=m;break}u+=g}l[v];var y=Math.max(0,r-s),_=Math.round(y);x.style.display="block",U.textContent="".concat(v+1," of ").concat(l.length," • ").concat(D(_));var P=[];return null==l||l.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});P.push.apply(P,c(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&P.push.apply(P,c(null==t?void 0:t.podSlotImpressionBeacon)),F(e,t,P,v,o,j),"break"}I.delete(i)},o=0;o<f.length;o++){if("break"===t())break}n||(x.style.display="none",O.el().classList.remove("hide-progress-bar"),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),h&&h.classList.remove("vjs-hidden"),b&&(b.style.pointerEvents="auto",b.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),De.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){De.enabled&&"ArrowRight"==e.key&&(R(),gn(o,10),e.stopPropagation())}),O.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(s=d.querySelectorAll(".ssai-ad-container"))||void 0===s||s.forEach(function(e){return null==e?void 0:e.remove()}),(x=document.createElement("div")).className="ssai-ad-container",(N=document.createElement("div")).className="sponsored-adbox",(M=document.createElement("div")).className="sponsored-text",M.textContent="Sponsored Ad",N.append(M),(U=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",x.append(N),x.append(U),g.el().appendChild(x);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=new Map,A=-1;case 21:case"end":return e.stop()}},e)})),rn.apply(this,arguments)}function ln(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return an(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?an(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function an(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function dn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function sn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?dn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):dn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var un={},cn=(null===(Ze=window)||void 0===Ze||null===(en=Ze.location)||void 0===en||null===(nn=en.search)||void 0===nn?void 0:nn.includes("debug=true"))||!1,vn=null;function mn(e){return pn.apply(this,arguments)}function pn(){return pn=n(t.mark(function e(o){var i,l,a,d,s,u,v,m,p,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,i,l){var a,d,s=r.getPlayer(o);if(!s.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||u;Math.floor(s.currentTime());var v,m=ln(t);try{for(m.s();!(v=m.n()).done;){var p,f,g,w=v.value,I=w.eventType,y=w.beaconUrls,h=w.startTimeInSeconds,E=w.startTime,T=w.durationInSeconds,b=(w.eventId,h||u),S=y,_=(null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(g=f.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(I),D="pod-".concat(u);A.has(D)||A.set(D,new Set);var P=A.get(D);if(cn&&console.warn(e,b,"map:",I,"condition1:",e>=b,"map:",A),e>=b&&e<=b+L&&!P.has(O)){P.add(O);try{F(I,n,S,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,I,n)}if("function"==typeof _)try{var C,k={eventType:I,startTimeInSeconds:h,startTime:E,durationInSeconds:T,ad:null==n||null===(C=n.ads)||void 0===C?void 0:C[i],adIndex:i};_({adsData:k}),Ve(o,k)}catch(e){console.error("Error when calling ads callback:",e)}var R=Me.get();if(R&&0!==Object.keys(R).length){var j=R.formulateComscoreAdPayload,V=R.startComscoreAdTracking,W=R.finishComscoreAdTracking,x=R.endComscoreAdTracking;if("impression"===I){var N,M=Qe.get();V(j(sn(sn({},null==n||null===(N=n.ads)||void 0===N?void 0:N[i]),{},{trackingUrl:M})))}else"complete"===I?W():"breakEnd"===I&&x()}}}}catch(e){m.e(e)}finally{m.f()}}},F=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=un)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=un)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(cn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},g=function(){vn&&clearInterval(vn)},p=Qe.get(),(f=r.getPlayer(o)).one("loadeddata",function(){g(),vn=setInterval(function(){p&&!f.paused()&&P(p)},2e3)}),f.on("dispose",function(){g()}),w=new Map,I=new Map,y=-1,h=null,E=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,T=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,b=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==f||null===(s=f.el())||void 0===s||null===(u=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===u?void 0:u[0])||null,_=(null==f||null===(v=f.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=!1,D=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return c(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),s=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!s&&l){var u=null==d?void 0:d.map(function(e){return sn(sn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=u&&u[0]&&i.push(null==u?void 0:u[0])}return i},P=function(){var e=n(t.mark(function e(n){var i,l,a,d,s,u,v,m,p,f;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=new URL(n),h&&l.searchParams.append("nextToken",h),e.next=4,fetch(l.toString(),{method:"GET"});case 4:return a=e.sent,e.next=7,a.json();case 7:d=e.sent,s=d.avails,u=d.nextToken||null,h=u,v=[],m=r.getPlayer(o),p=m.controlBar.progressControl,f=p.seekBar.el(),null===(i=document)||void 0===i||i.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),s.map(function(e,n){v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:D(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),cn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",v),null!=v&&v.length&&(window.adsQueueList=v),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=m.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var i=n/o*100,r=document.createElement("div");r.className="vjs-seekbar-marker",r.style.left="".concat(i,"%"),r.style.position="absolute",r.style.top="0",r.style.bottom="0",r.style.width="2px",r.style.backgroundColor="#fecc09",r.style.left="".concat(i,"%"),r.style.pointerEvents="none",f.appendChild(r)}}),m._timeUpdateHandler&&m.off("timeupdate",m._timeUpdateHandler),m._timeUpdateHandler=r.throttle(function(){var e=m.currentTime();if(e!==y){y=e;for(var n=function(){var n=v[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;O=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&w.set(o,!0),De.disable(),E&&E.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),_&&(_.style.pointerEvents="none",_.classList.add("vjs-hidden")),T&&(T.el().style.pointerEvents="none",T.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var d=e-o,s=0,u=0,m=0;m<r.length;m++){var f,g=null==r||null===(f=r[m])||void 0===f?void 0:f.durationInSeconds;if(d<s+g){u=m;break}s+=g}setTimeout(function(){un.totalAds=null==r?void 0:r.length,un.currentAdIndex=u},1e3);var y=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});y.push.apply(y,c(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&y.push.apply(y,c(null==n?void 0:n.podSlotImpressionBeacon)),C(e,n,y,u),"break"}I.delete(o)},t=0;t<v.length;t++){if("break"===n())break}O||(un={},p.el().classList.remove("hide-progress-bar"),T&&(T.el().style.pointerEvents="auto",T.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&E.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),De.enable())}},1e3),m.on("timeupdate",m._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),A=new Map,L=2.5;case 22:case"end":return e.stop()}},e)})),pn.apply(this,arguments)}function fn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}var gn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},wn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},In=function(e){return!!o.getPlayer("".concat(e))},yn=function(){var e=n(t.mark(function e(o,i){var l,a,d,s=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=s.length>2&&void 0!==s[2]&&s[2],e.next=3,M();case 3:return a=e.sent,d=r.getPlayer(o),e.abrupt("return",new Promise(function(e,r){b(i,a).then(function(){var r=n(t.mark(function n(r){var a,s,u,c,v,m,p,f;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(m=null==r?void 0:r.data,window.sid=ee(),m.contentType="linearchannel",m.channelId=null==i?void 0:i.channelId,p=(null==m||null===(a=m.linearchannel)||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(s=window)||void 0===s||null===(u=s.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(v=c.adsConfig)||void 0===v?void 0:v.vodAdSticherProvider)||!1,f=we(m,o),!p){n.next=11;break}return n.next=9,Ke(o,m);case 9:f=n.sent,l=!0;case 11:H(m),f&&l?(Tn(o,f),p&&mn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:m})})):(Me.get()&&0!==Object.keys(Me.get()).length&&Ue({playerId:o,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:m}));case 13:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){r({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),hn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,c,v,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return c=e.sent,(q()||null)&&Q(i),v=0,m=0,p=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&_(i,c).then(function(e){var n,t,o,i,r,l,a;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),v=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(m=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(p=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedTime)||null)}).catch(function(e){var n,t,o,i;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(i=o.watchHistory)||void 0===i||i.cb(e))}),e.abrupt("return",new Promise(function(e,l){T(i,c).then(function(){var i=n(t.mark(function n(i){var a,d,u,c,f,g,w,I,y,h,E,T,b,S,_,O,D,P,A,L,F,C,k,R,j,V,W,x,N,M,U,B,G,q,Y,Q,z,K;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(O=null==i?void 0:i.data,D=(null==O?void 0:O.contentType)||"video",P=(null==O||null===(a=O[D])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c||null===(f=c.adsConfig)||void 0===f?void 0:f.vodAdSticherProvider)||!1,A=(null==O||null===(g=O.video)||void 0===g||null===(w=g.streamingInfo)||void 0===w?void 0:w.isLiveStream)||!1,H(i.data),(L=(null==O||null===(I=O.ads)||void 0===I||null===(y=I.preRoll)||void 0===y||null===(h=y.adTags)||void 0===h||null===(E=h.web)||void 0===E?void 0:E.active)&&(null==O||null===(T=O.ads)||void 0===T||null===(b=T.preRoll)||void 0===b||null===(S=b.adTags)||void 0===S||null===(_=S.web)||void 0===_?void 0:_.url))&&_e(o,L,O),F=we(O,o),!P){n.next=12;break}return n.next=11,Ke(o,O);case 11:F=n.sent;case 12:F?(B=(null==O||null===(C=O.video)||void 0===C||null===(k=C.gist)||void 0===k?void 0:k.videoImageUrl)||(null==O||null===(R=O.video)||void 0===R||null===(j=R.gist)||void 0===j||null===(V=j.imageGist)||void 0===V?void 0:V.r16x9),(G=r.getPlayer(o)).poster(B),Tn(o,F),P&&on(o,p),G.on("loadstart",function(){A&&e({status:!0,msg:"Video Loaded",response:O})}),G.on("loadeddata",function(){be(),e({status:!0,msg:"Video Loaded",response:O})}),G.one("play",function(){v&&!P&&m<95&&setTimeout(function(){G.currentTime(v)},0)}),G.one("error",function(){var e;l({status:!1,msg:(null==G||null===(e=G.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==O||null===(W=O.video)||void 0===W||null===(x=W.contentDetails)||void 0===x||null===(N=x.closedCaptions)||void 0===N?void 0:N.length)>0||(null==O||null===(M=O.video)||void 0===M||null===(U=M.closedCaptions)||void 0===U?void 0:U.length)>0?(K=(null==O||null===(Y=O.video)||void 0===Y||null===(Q=Y.contentDetails)||void 0===Q?void 0:Q.closedCaptions)||(null==O||null===(z=O.video)||void 0===z?void 0:z.closedCaptions),q=K.filter(function(e){return"VTT"===e.format}),s.addCaptions(o,q)):s.removeCaptions(o)):(Te(o,"Incompatible Source, only hls,mp4,drm content is allowed"),l("Incompatible Source, only hls,mp4,drm content is allowed"));case 13:case"end":return n.stop()}},n)}));return function(e){return i.apply(this,arguments)}}()).catch(function(e){bn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),En=function(){document.getElementById("carousel_homepage")&&document.getElementById("carousel_homepage").remove(),document.getElementById("dvr_skin")&&document.getElementById("dvr_skin").remove(),document.getElementById("nondvr_skin")&&document.getElementById("nondvr_skin").remove(),document.getElementById("multicam")&&document.getElementById("multicam").remove(),document.getElementById("errorblock")&&document.getElementById("errorblock").remove(),document.getElementById("def_skin")&&document.getElementById("def_skin").remove(),document.getElementById("video-selection")&&document.getElementById("video-selection").remove(),document.getElementById("multicam-v2")&&document.getElementById("multicam-v2").remove(),document.getElementById("default_v2")&&document.getElementById("default_v2").remove(),document.getElementById("video-captions")&&document.getElementById("video-captions").remove(),document.getElementById("playlist-selection")&&document.getElementById("playlist-selection").remove(),document.getElementById("multiplayer_css")&&document.getElementById("multiplayer_css").remove(),document.getElementById("chromett")&&document.getElementById("chromett").remove()},Tn=function(e,n){var t=r.getPlayer(e);t&&t.src(n)},bn=function(n,t,o,i){var r,l,a,d,s,u,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);In(t)&&Te(t,(null===(s=window)||void 0===s?void 0:s.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?fn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):fn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}({status:!1,response:n,msg:"".concat(v)},i&&{videoId:i}))};exports.authenticateLC=yn,exports.baseUrlManager=D,exports.clearError=be,exports.comscoreInstanceManager=Me,exports.createIdxMapping=function(e){R=new Map,e.map(function(e,n){R.set(e.id,n)})},exports.createSeriesWatchMap=function(e,n){var t=new Map;O({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),j=t}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var o=n.getElementsByClassName("vjs-big-play-button")[0];o&&(o.style.display="none");var i=n.getElementsByClassName("vjs-fullscreen-control")[0];i&&(i.style.display="none")},exports.dispose=function(e){var n=r.getPlayer(e),t=(Me.get()||{}).destroyComscoreTag;if(En(),t&&t(),r.clearEventListeners(),window.onresize=null,n)n.dispose();else{var o=document.getElementById(e);o&&o.remove()}},exports.getCurrentSeries=q,exports.getCurrentVideo=G,exports.getDecodedToken=U,exports.getEntitlementData=function(e,n,t,o){var r,l;return i({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==o?void 0:o.latitude,longitude:null==o?void 0:o.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.adbTempToken},withCredentials:!0})},exports.getEpisodeNumber=de,exports.getLinearChannelDetails=b,exports.getSGAIEnabledSource=Ke,exports.getSeasonNumber=ae,exports.getSeriesDetails=function(e,n){var t,o,r=U(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.seriesData?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.seriesData})}):i({url:D.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},exports.getSeriesWatchHistory=O,exports.getSeriesWatchMap=function(){return j},exports.getSource=we,exports.getSsaiEvents=function(e){var n=r.getPlayer(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Pe,e)},adImpression:function(e){return t(Ae,e)},adFirstQuartile:function(e){return t(Le,e)},adMidpoint:function(e){return t(Fe,e)},adThirdQuartile:function(e){return t(Ce,e)},adComplete:function(e){return t(ke,e)},adBreakEnd:function(e){return t(Re,e)}}},exports.getToken=M,exports.getUpdatedClusterSource=function(e,n){var t=e.src,o=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:o};n=n.replace(/\/$/,"");var i=t.split(".com")[1]||"";return{src:i?"".concat(n).concat(i):t,type:o}},exports.getUserId=ne,exports.getVideoDetails=T,exports.getVideoIdx=function(){return k},exports.getVideoInfo=_,exports.handleError=Te,exports.initialiseAdvertisement=_e,exports.initialiseComscoreStreamingTracking=Ue,exports.initialiseKeyboardEvents=function(e,n){var t,o,i,l=r.getPlayer(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,s,u,c,v,m,p;if(De.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var f=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(f)&&(t.preventDefault(),null==d||d.focus()),f){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||wn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(s=r.appcmsMain)||void 0===s||null===(u=s.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(p=m.adsConfig)&&void 0!==p&&p.vodAdClientSideTracking)return;g||gn(e,10)}}},!0)},exports.initiateErrorHandling=bn,exports.inititateBeacon=function(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){null!=n&&n.userId&&($=n.userId);var t=r.getPlayer(e);window.initialise(t,null==n?void 0:n.analyticsCb),window.firstFrame(t,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}},exports.isPaused=function(e){return o(e).paused()},exports.isPlayerInitialised=In,exports.isTokenExpired=P,exports.load=hn,exports.loadVideo=Tn,exports.loadVideoInstantly=function(e,n,t){var o=r.getPlayer(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},exports.pause=function(e){o(e).pause()},exports.play=function(e){o(e).play()},exports.refreshTokenManager=L,exports.rewind=wn,exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],p("js",new Date),p("config",e)},exports.saveWatchHistory=S,exports.seasonIdxManager=z,exports.setCurrentSeries=function(e){F=e},exports.setCurrentVideo=H,exports.setUserId=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},exports.setVideoIdx=Y,exports.setVideoIdxById=Q,exports.setupAdvertisementMarkers=on,exports.setupAdvertisementMarkersForLinear=mn,exports.skip=gn,exports.token_authentication_enabled=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,o=null==e?void 0:e.asat;return t&&!o&&(n=!1),n},exports.trackMap=tn,exports.videoReplayTracker=B;