@viewlift/player-backup 2.0.259-backup → 2.0.261-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 (295) hide show
  1. package/cjs/bundle.css +1 -1
  2. package/cjs/index-eafb9077.js +1 -0
  3. package/cjs/index.js +1 -1
  4. package/cjs/{skin-ed83fbaa.js → skin-066dceed.js} +1 -1
  5. package/esm/bundle.css +1 -1
  6. package/esm/index-3860a02a.js +1 -0
  7. package/esm/index.js +1 -1
  8. package/esm/{skin-482bc56f.js → skin-5a424471.js} +1 -1
  9. package/package.json +1 -1
  10. package/cjs/autoNextVideo-1c6abafe.js +0 -1
  11. package/cjs/autoNextVideo-7423bae2.js +0 -1
  12. package/cjs/autoNextVideo-7c491841.js +0 -1
  13. package/cjs/autoNextVideo-cb31894f.js +0 -1
  14. package/cjs/autoNextVideo-ff0d1de3.js +0 -1
  15. package/cjs/browser-77c57718.js +0 -1
  16. package/cjs/caption-settings-be714e97.js +0 -1
  17. package/cjs/captions-07bd3069.js +0 -1
  18. package/cjs/features-16937305.js +0 -1
  19. package/cjs/features-258a9a64.js +0 -1
  20. package/cjs/features-25da73a6.js +0 -1
  21. package/cjs/features-93cd6de4.js +0 -1
  22. package/cjs/features-b6127bee.js +0 -1
  23. package/cjs/generic-29417780.js +0 -1
  24. package/cjs/generic-29d5b2ec.js +0 -1
  25. package/cjs/generic-743174bb.js +0 -1
  26. package/cjs/generic-939a3e97.js +0 -1
  27. package/cjs/generic-f723dacd.js +0 -1
  28. package/cjs/icons-1a3febef.js +0 -1
  29. package/cjs/index-04b27b15.js +0 -1
  30. package/cjs/index-10d97ab9.js +0 -1
  31. package/cjs/index-20de6bc7.js +0 -1
  32. package/cjs/index-2b05c277.js +0 -1
  33. package/cjs/index-4e9d8827.js +0 -1
  34. package/cjs/index-5b18b394.js +0 -1
  35. package/cjs/index-5c93e8c6.js +0 -1
  36. package/cjs/index-64db4d74.js +0 -1
  37. package/cjs/index-6593cb6f.js +0 -1
  38. package/cjs/index-67289ebc.js +0 -1
  39. package/cjs/index-67e8cb8e.js +0 -1
  40. package/cjs/index-6bc2d039.js +0 -1
  41. package/cjs/index-73a1b75f.js +0 -1
  42. package/cjs/index-8047cfe4.js +0 -1
  43. package/cjs/index-99c100ab.js +0 -1
  44. package/cjs/index-afff893e.js +0 -1
  45. package/cjs/index-c51fccda.js +0 -1
  46. package/cjs/index-e4393a77.js +0 -1
  47. package/cjs/index-e5d7c072.js +0 -1
  48. package/cjs/index-ff85bd1e.js +0 -1
  49. package/cjs/multicamv2-138af789.js +0 -1
  50. package/cjs/multicamv2-25acee8c.js +0 -1
  51. package/cjs/multicamv2-3f9ffd46.js +0 -1
  52. package/cjs/multicamv2-49af2bae.js +0 -1
  53. package/cjs/multicamv2-4a67a1c7.js +0 -1
  54. package/cjs/multicamv2-574b49ad.js +0 -1
  55. package/cjs/multicamv2-6006b5a5.js +0 -1
  56. package/cjs/multicamv2-92e2b919.js +0 -1
  57. package/cjs/multicamv2-ec232dbd.js +0 -1
  58. package/cjs/multicamv2-ee975960.js +0 -1
  59. package/cjs/nextEpisodeButton-05a96016.js +0 -1
  60. package/cjs/nextEpisodeButton-10a8c935.js +0 -1
  61. package/cjs/nextEpisodeButton-2ba4aa6f.js +0 -1
  62. package/cjs/nextEpisodeButton-6aebdc8a.js +0 -1
  63. package/cjs/nextEpisodeButton-ee1f4e87.js +0 -1
  64. package/cjs/playlist-2889487d.js +0 -1
  65. package/cjs/playlist-8b12d044.js +0 -1
  66. package/cjs/playlist-9710ef70.js +0 -1
  67. package/cjs/playlist-a6c55be5.js +0 -1
  68. package/cjs/playlist-d6f8e3b6.js +0 -1
  69. package/cjs/renditions-fed22c12.js +0 -1
  70. package/cjs/resolution-e46c9615.js +0 -1
  71. package/cjs/series-4b9888dd.js +0 -1
  72. package/cjs/series-602d1f2c.js +0 -1
  73. package/cjs/series-8bd07d22.js +0 -1
  74. package/cjs/series-ab2fb794.js +0 -1
  75. package/cjs/series-c3138dfb.js +0 -1
  76. package/cjs/series-v2-04bb2f24.js +0 -1
  77. package/cjs/series-v2-0fe2e1c3.js +0 -1
  78. package/cjs/series-v2-3578532c.js +0 -1
  79. package/cjs/series-v2-68886cd2.js +0 -1
  80. package/cjs/series-v2-693bc5cc.js +0 -1
  81. package/cjs/series-v2-719c957a.js +0 -1
  82. package/cjs/series-v2-7d183e67.js +0 -1
  83. package/cjs/series-v2-8694c212.js +0 -1
  84. package/cjs/series-v2-a532b003.js +0 -1
  85. package/cjs/series-v2-b7f70c84.js +0 -1
  86. package/cjs/series-v2-f67606dc.js +0 -1
  87. package/cjs/settings-icon-70f8857a.js +0 -1
  88. package/cjs/skin-02df14d4.js +0 -1
  89. package/cjs/skin-08a270c1.js +0 -1
  90. package/cjs/skin-14f83052.js +0 -1
  91. package/cjs/skin-25191a17.js +0 -1
  92. package/cjs/skin-29a5361a.js +0 -1
  93. package/cjs/skin-31d84d3e.js +0 -1
  94. package/cjs/skin-334830ee.js +0 -1
  95. package/cjs/skin-3481c5cb.js +0 -1
  96. package/cjs/skin-3544db58.js +0 -1
  97. package/cjs/skin-3d6f28e9.js +0 -1
  98. package/cjs/skin-42117529.js +0 -1
  99. package/cjs/skin-46d92899.js +0 -1
  100. package/cjs/skin-5493ce5f.js +0 -1
  101. package/cjs/skin-56e72a1b.js +0 -1
  102. package/cjs/skin-572a65a9.js +0 -1
  103. package/cjs/skin-585353b3.js +0 -1
  104. package/cjs/skin-5e4b3ad1.js +0 -1
  105. package/cjs/skin-6e922e32.js +0 -1
  106. package/cjs/skin-7afabe4c.js +0 -1
  107. package/cjs/skin-7afce973.js +0 -1
  108. package/cjs/skin-7e40bdaa.js +0 -1
  109. package/cjs/skin-7f58ba4c.js +0 -1
  110. package/cjs/skin-84cac674.js +0 -1
  111. package/cjs/skin-861125f0.js +0 -1
  112. package/cjs/skin-87c06e34.js +0 -1
  113. package/cjs/skin-91814213.js +0 -1
  114. package/cjs/skin-98b66c5d.js +0 -1
  115. package/cjs/skin-999521e6.js +0 -1
  116. package/cjs/skin-9bfe9316.js +0 -1
  117. package/cjs/skin-9d420b99.js +0 -1
  118. package/cjs/skin-ab226d57.js +0 -1
  119. package/cjs/skin-ae3ca001.js +0 -1
  120. package/cjs/skin-ae526505.js +0 -1
  121. package/cjs/skin-af838b06.js +0 -1
  122. package/cjs/skin-b671419f.js +0 -1
  123. package/cjs/skin-bac14ade.js +0 -1
  124. package/cjs/skin-bf73e43b.js +0 -1
  125. package/cjs/skin-c1400489.js +0 -1
  126. package/cjs/skin-c2d7c6d3.js +0 -1
  127. package/cjs/skin-cea29f97.js +0 -1
  128. package/cjs/skin-cf53c6f8.js +0 -1
  129. package/cjs/skin-cfa023f1.js +0 -1
  130. package/cjs/skin-d5a8b61b.js +0 -1
  131. package/cjs/skin-dbeec98f.js +0 -1
  132. package/cjs/skin-df2070f9.js +0 -1
  133. package/cjs/skin-eac05283.js +0 -1
  134. package/cjs/skin-f0486679.js +0 -1
  135. package/cjs/skin-f55aefe8.js +0 -1
  136. package/cjs/util-233dec09.js +0 -1
  137. package/cjs/util-4769ed5b.js +0 -1
  138. package/cjs/util-ef2cd61e.js +0 -1
  139. package/cjs/util-fbe3d806.js +0 -1
  140. package/cjs/videoSelector-239532a4.js +0 -1
  141. package/cjs/videoSelector-29fbaa66.js +0 -1
  142. package/cjs/videoSelector-2d51c4d2.js +0 -1
  143. package/cjs/videoSelector-642f00ed.js +0 -1
  144. package/cjs/videoSelector-9b5a4625.js +0 -1
  145. package/cjs/videoSelector-9d841083.js +0 -1
  146. package/cjs/videoSelector-a122278c.js +0 -1
  147. package/cjs/videoSelector-dcbb1d54.js +0 -1
  148. package/cjs/videoSelector-eddf015c.js +0 -1
  149. package/cjs/videoSelector-f17b0749.js +0 -1
  150. package/cjs/videojs-dash5.es-8bc4e9b4.js +0 -1
  151. package/cjs/videojs-dash5.es-f9629f7f.js +0 -1
  152. package/cjs/videojs_contrib_dash-018c8bde.js +0 -1
  153. package/esm/autoNextVideo-15f76d85.js +0 -1
  154. package/esm/autoNextVideo-281e802c.js +0 -1
  155. package/esm/autoNextVideo-3d6570ee.js +0 -1
  156. package/esm/autoNextVideo-d682e36c.js +0 -1
  157. package/esm/autoNextVideo-f6a502c9.js +0 -1
  158. package/esm/browser-d4613b36.js +0 -1
  159. package/esm/caption-settings-370d8b1e.js +0 -1
  160. package/esm/captions-b7fd8308.js +0 -1
  161. package/esm/features-20d7893f.js +0 -1
  162. package/esm/features-3fc61a30.js +0 -1
  163. package/esm/features-ab6f492e.js +0 -1
  164. package/esm/features-c3e53ffd.js +0 -1
  165. package/esm/features-d7440f39.js +0 -1
  166. package/esm/generic-1697c09f.js +0 -1
  167. package/esm/generic-205dfe5c.js +0 -1
  168. package/esm/generic-2f9efcf1.js +0 -1
  169. package/esm/generic-715a7738.js +0 -1
  170. package/esm/generic-79a719c8.js +0 -1
  171. package/esm/icons-3bd3bd8f.js +0 -1
  172. package/esm/index-02ed8ded.js +0 -1
  173. package/esm/index-0ce0e085.js +0 -1
  174. package/esm/index-0ffc31e8.js +0 -1
  175. package/esm/index-13b7c455.js +0 -1
  176. package/esm/index-1d1f438d.js +0 -1
  177. package/esm/index-403dd12e.js +0 -1
  178. package/esm/index-433697e2.js +0 -1
  179. package/esm/index-4a04166e.js +0 -1
  180. package/esm/index-62e1ef44.js +0 -1
  181. package/esm/index-7304e60f.js +0 -1
  182. package/esm/index-a3bbcba7.js +0 -1
  183. package/esm/index-a7fcd7f8.js +0 -1
  184. package/esm/index-b507b376.js +0 -1
  185. package/esm/index-c880c052.js +0 -1
  186. package/esm/index-cf927b34.js +0 -1
  187. package/esm/index-d42cceca.js +0 -1
  188. package/esm/index-e1345c4e.js +0 -1
  189. package/esm/index-e796a94f.js +0 -1
  190. package/esm/index-ebda7269.js +0 -1
  191. package/esm/index-f2d0aa7c.js +0 -1
  192. package/esm/multicamv2-051519e5.js +0 -1
  193. package/esm/multicamv2-1297de0f.js +0 -1
  194. package/esm/multicamv2-2f2829fb.js +0 -1
  195. package/esm/multicamv2-9166cf23.js +0 -1
  196. package/esm/multicamv2-a8db4d7f.js +0 -1
  197. package/esm/multicamv2-bed3a0bc.js +0 -1
  198. package/esm/multicamv2-c6e6cb68.js +0 -1
  199. package/esm/multicamv2-e247f9b6.js +0 -1
  200. package/esm/multicamv2-e85ff8d3.js +0 -1
  201. package/esm/multicamv2-f8c068cb.js +0 -1
  202. package/esm/nextEpisodeButton-2a75ce5c.js +0 -1
  203. package/esm/nextEpisodeButton-38661562.js +0 -1
  204. package/esm/nextEpisodeButton-a6ef9e2a.js +0 -1
  205. package/esm/nextEpisodeButton-b348d4b4.js +0 -1
  206. package/esm/nextEpisodeButton-e79ba9ea.js +0 -1
  207. package/esm/playlist-0c95a577.js +0 -1
  208. package/esm/playlist-3b568899.js +0 -1
  209. package/esm/playlist-78ea48cc.js +0 -1
  210. package/esm/playlist-b9595b14.js +0 -1
  211. package/esm/playlist-c13c7244.js +0 -1
  212. package/esm/renditions-4c09c626.js +0 -1
  213. package/esm/resolution-920515d1.js +0 -1
  214. package/esm/series-090e7c85.js +0 -1
  215. package/esm/series-97434a7c.js +0 -1
  216. package/esm/series-9dcc32b9.js +0 -1
  217. package/esm/series-c0b5c787.js +0 -1
  218. package/esm/series-c73c97f1.js +0 -1
  219. package/esm/series-v2-04e9add7.js +0 -1
  220. package/esm/series-v2-10742435.js +0 -1
  221. package/esm/series-v2-1263db01.js +0 -1
  222. package/esm/series-v2-52212b58.js +0 -1
  223. package/esm/series-v2-647dcbf9.js +0 -1
  224. package/esm/series-v2-81f04cd5.js +0 -1
  225. package/esm/series-v2-8a8b6f0c.js +0 -1
  226. package/esm/series-v2-8e5ff7c1.js +0 -1
  227. package/esm/series-v2-a1083c40.js +0 -1
  228. package/esm/series-v2-a8491399.js +0 -1
  229. package/esm/series-v2-b5cece98.js +0 -1
  230. package/esm/settings-icon-a98e5d8b.js +0 -1
  231. package/esm/skin-017721f3.js +0 -1
  232. package/esm/skin-01da91f0.js +0 -1
  233. package/esm/skin-032174d9.js +0 -1
  234. package/esm/skin-066d481a.js +0 -1
  235. package/esm/skin-072ed58b.js +0 -1
  236. package/esm/skin-0ca780ee.js +0 -1
  237. package/esm/skin-0f0bb3f9.js +0 -1
  238. package/esm/skin-130e5b01.js +0 -1
  239. package/esm/skin-1629e49c.js +0 -1
  240. package/esm/skin-1a12c6ed.js +0 -1
  241. package/esm/skin-258904b8.js +0 -1
  242. package/esm/skin-2a1e18f9.js +0 -1
  243. package/esm/skin-2f85dae8.js +0 -1
  244. package/esm/skin-30567c73.js +0 -1
  245. package/esm/skin-35e4ade3.js +0 -1
  246. package/esm/skin-3628bdf0.js +0 -1
  247. package/esm/skin-3ae22d7d.js +0 -1
  248. package/esm/skin-3e6fd83b.js +0 -1
  249. package/esm/skin-4ad0fccc.js +0 -1
  250. package/esm/skin-4cc51263.js +0 -1
  251. package/esm/skin-508bd0e2.js +0 -1
  252. package/esm/skin-55857acc.js +0 -1
  253. package/esm/skin-58b9263c.js +0 -1
  254. package/esm/skin-5ca6263c.js +0 -1
  255. package/esm/skin-74d07b0b.js +0 -1
  256. package/esm/skin-76430de3.js +0 -1
  257. package/esm/skin-7c5ac76d.js +0 -1
  258. package/esm/skin-8ceddbe1.js +0 -1
  259. package/esm/skin-a2bc9871.js +0 -1
  260. package/esm/skin-b3e77849.js +0 -1
  261. package/esm/skin-b83f4022.js +0 -1
  262. package/esm/skin-b8e87cdb.js +0 -1
  263. package/esm/skin-bff9e3fe.js +0 -1
  264. package/esm/skin-c05be60d.js +0 -1
  265. package/esm/skin-c4422587.js +0 -1
  266. package/esm/skin-c906e1c0.js +0 -1
  267. package/esm/skin-cb4566f3.js +0 -1
  268. package/esm/skin-cc9878af.js +0 -1
  269. package/esm/skin-d555b116.js +0 -1
  270. package/esm/skin-d8ab9efc.js +0 -1
  271. package/esm/skin-d93bcc9b.js +0 -1
  272. package/esm/skin-ddd25096.js +0 -1
  273. package/esm/skin-e4b35c14.js +0 -1
  274. package/esm/skin-e8919754.js +0 -1
  275. package/esm/skin-e9914c42.js +0 -1
  276. package/esm/skin-f5b2d1cc.js +0 -1
  277. package/esm/skin-f9988297.js +0 -1
  278. package/esm/skin-fdb749ad.js +0 -1
  279. package/esm/util-5b3b1f9c.js +0 -1
  280. package/esm/util-80257541.js +0 -1
  281. package/esm/util-90b9fbc3.js +0 -1
  282. package/esm/util-b1ec6897.js +0 -1
  283. package/esm/videoSelector-0c6d2d43.js +0 -1
  284. package/esm/videoSelector-1cf43fc8.js +0 -1
  285. package/esm/videoSelector-3c635dc2.js +0 -1
  286. package/esm/videoSelector-3ebdf49e.js +0 -1
  287. package/esm/videoSelector-47ad19c9.js +0 -1
  288. package/esm/videoSelector-9d611c93.js +0 -1
  289. package/esm/videoSelector-b8f21092.js +0 -1
  290. package/esm/videoSelector-c8e01367.js +0 -1
  291. package/esm/videoSelector-c94910d2.js +0 -1
  292. package/esm/videoSelector-cf7538bf.js +0 -1
  293. package/esm/videojs-dash5.es-600b6231.js +0 -1
  294. package/esm/videojs-dash5.es-bc6f319d.js +0 -1
  295. package/esm/videojs_contrib_dash-f7d94714.js +0 -1
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import o from"video.js";import i from"axios";import{g as r}from"./player_instance-34118a5b.js";import l from"md5";import a from"js-cookie";import{a as d,e as u,g as s,h as c,s as v,i as m,d as f}from"./currentVideoInfo-0b234e55.js";import{a as p,r as g}from"./captions-78bd2908.js";import h from"@babel/runtime/helpers/typeof";import{t as w,c as E}from"./skin-65765793.js";import I from"@babel/runtime/helpers/toConsumableArray";import y from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as T,formulateComscorePayload as b,createComscoreStreamingTag as _,setComscorePlayerInstance as S}from"@viewlift/comscore/index.js";function O(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function A(e){window.dataLayer=window.dataLayer||[],O("js",new Date),O("config",e)}function D(e,n){O("event",e,n)}var P={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 L(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function k(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?L(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):L(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var R={name:"@viewlift/player",version:"2.1.23",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.3","@viewlift/comscore":"^1.0.9",axios:"^1.2.3",md5:"^2.3.0","broadcast-channel":"^7.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","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=R.version;var F,C=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":B.get()+"".concat(null==P?void 0:P.getVideoDetails)},j=function(e,n){var t,o,r,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:C(),params:k({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":R.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})},N=function(e,n){var t,o,r,l,a,d,u=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(o=t.customData)&&void 0!==o&&o.overrideEntitlementResponse?new Promise(function(e,n){var t,o;return e({data:null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o?void 0:o.overrideEntitlementResponse})}):i({url:B.get()+P.getLinearChannelDetails,params:k(k(k(k(k({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:u},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(a=window)||void 0===a||null===(d=a.customData)||void 0===d?void 0:d.adbTempToken}})},V=function(e,n){var t,o,r=X(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:B.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},W=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,K();case 2:return o=e.sent,e.abrupt("return",i({url:B.get()+"".concat(null==P?void 0:P.saveWatchHistoryV2),method:"POST",headers:{Authorization:o},data:k({},n),params:k({},(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)}}(),U=function(e,n){var t,o,r=window.contentType;return i({method:"GET",url:B.get()+"".concat(null==P?void 0:P.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})},M=function(e){var n=e.videoId;return i({method:"GET",url:B.get()+"".concat(null==P?void 0:P.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},B=(F=null==P?void 0:P.apiBaseUrl,{set:function(e){e&&(F=e)},get:function(){return F}}),x=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})},H=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},G=null;function Q(){return{set:function(e){e&&(G=e)},get:function(){return G}}}var Y=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=Q().get(),o=B.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)}}(),z=null,K=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"))||!H(n)){e.next=6;break}return z||(z=Y().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&&Q().set(r),i||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){z=null})),e.abrupt("return",z);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),q=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},X=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))};function J(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 $(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?J(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):J(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Z=0,ee=null,ne=!1,te=function(){var e,n,t,o,i,r,l,a=d();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 oe(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return"".concat(e()).concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e(),"-").concat(e()).concat(e()).concat(e())}function ie(){return re.apply(this,arguments)}function re(){return(re=n(t.mark(function e(){var n,o,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,K();case 2:if(n=e.sent,o=X(n),!(i=null==o?void 0:o.userId)){e.next=9;break}return e.abrupt("return",i);case 9:return i=oe(),window.sessionStorage.setItem("uid",i),e.abrupt("return",i);case 12:case"end":return e.stop()}},e)}))).apply(this,arguments)}function le(){return ae.apply(this,arguments)}function ae(){return(ae=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,K();case 2:if(!(n=e.sent)){e.next=6;break}return o=JSON.parse(atob(n.split(".")[1])),e.abrupt("return",null!=o&&o.anonymousId?"guest-user":null==o?void 0:o.userId);case 6:return e.abrupt("return","guest-user");case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function de(e){return e?String(e):""}window.initialise=function(e){window.sid=oe(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e),ue(e),se(e)};var ue=function(e){e.on("play",function(){"pause"!==ee||e.scrubbing()||(ee="play",D("RESUME",{pfm:window.platform,uid:ie(),vid:te(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),e.on("pause",function(){setTimeout(function(){ne||(ee="pause",D("PAUSE",{pfm:window.platform,uid:ie(),vid:te(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))},50)})},se=function(e){if(e){var n=0,t=0,o=0,i=0;e.on("timeupdate",r),e.on("seeking",function(){if(ne)return;ne=!0,e.off("timeupdate",r),e.one("seeked",l)}),e.on("seeked",l)}function r(){n=t,t=Math.floor(e.currentTime()),n<t&&(i=n,n=t)}function l(){var n,t;o=Math.floor(e.currentTime());var l=Math.floor(o-i);if(0!==l&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")){var a=l>0?"SEEK_FORWARD":"SEEK_BACKWARD";D(a,{pfm:window.platform,uid:ie(),vid:te(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:a,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}i=Math.floor(e.currentTime()),setTimeout(function(){ne=!1},50),e.on("timeupdate",r)}};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,D(r?"FAILED_TO_START":"DROPPED_STREAM",$({pfm:window.platform,uid:ie(),vid:te(),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),ee="play",D("PLAY",$({pfm:window.platform,uid:ie(),vid:te(),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",$({"Video ID":te(),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")&&Z<4)Z++,D("BUFFERING",$({pfm:window.platform,uid:ie(),vid:te(),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,D("FIRST_FRAME",$({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ie(),vid:te()},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;D("AD_REQUEST",$({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ie(),vid:te(),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}),D("AD_IMPRESSION",$({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:ie(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},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)&&(Z=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(ce(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var ce=function(e,n,t){return e>=n&&e<=t},ve=function(){var e,n=d(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};function me(e,n,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var o=r(e);window.initialise(o,n),window.firstFrame(o,n,t),o.on("loadedmetadata",function(){window.endFirstFrame(o)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var o,r,l,a,d,u,s,c,v,m,f,p,g,h,w,E,I,y,T,b,_;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,K();case 2:return I=e.sent,y=X(I),T=null==y?void 0:y.site,b=null==y?void 0:y.siteId,e.t0=$,e.t1=$,e.t2=$({aid:T,cid:b,pfm:window.platform},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.next=12,ie();case 12:return e.t4=e.sent,e.t5=te(),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?de(n.adPosition):"",e.next=28,le();case 28:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(m=ve())&&void 0!==m?m:null,e.t28=null!=T?T:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.beacon)||void 0===g?void 0:g.params,e.t33=(0,e.t0)(e.t31,e.t32),_=[e.t33],i({url:(null===(h=window)||void 0===h||null===(w=h.customData)||void 0===w||null===(E=w.beacon)||void 0===E?void 0:E.url)||B.get()+P.getBeaconUrl,method:"post",headers:{Authorization:I},contentType:"application/x-www-form-urlencoded",dataType:"text",data:_}).catch(function(e){console.error(e)});case 46: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 fe=function(){var e,n;return navigator.userAgent.indexOf("Edg")>-1&&"macOS"!=(null===(e=window.navigator)||void 0===e||null===(n=e.userAgentData)||void 0===n?void 0:n.platform)?"IE":-1!=(navigator.userAgent.indexOf("Opera")||navigator.userAgent.indexOf("OPR"))?"Opera":-1!=navigator.userAgent.indexOf("Chrome")?"Chrome":-1!=navigator.userAgent.indexOf("Safari")?"Safari":-1!=navigator.userAgent.indexOf("Firefox")?"Firefox":"Unknown"},pe=function(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},ge=function(e,n){var t=new Map;M({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),c(t)}).catch(function(e){return console.log(e)})},he=function(){var e=u.get();return e>=0?e+1:1},we=function(){var e,n,t,o=s(),i=d(),r=null==i||null===(e=i.video)||void 0===e?void 0:e.id,l=u.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 Ee(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ie(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ee(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ee(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var ye=l,Te=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},be=function(e){var n=_e(e,"video.tags",[]),t=_e(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},_e=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},Se=function(){var n,t,o,i,l,d,u,s,c,v,m,f,p,g,h,w,E,I,y,T,b,_,S,O,A,D,P=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",L=arguments.length>1?arguments[1]:void 0,k=arguments.length>2?arguments[2]:void 0;if(null!==(n=window)&&void 0!==n&&null!==(t=n.customData)&&void 0!==t&&t.disableMacros)return P;var R=(null==k?void 0:k.siteName)||(null==k?void 0:k.site)||"",F=(null==k?void 0:k.contentType)||"video",C=(null==k||null===(o=k[F])||void 0===o?void 0:o.metadata)||(null==k||null===(i=k[F])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.metadata),j=r(L);if(!P.includes("VIEWLIFT_"))return P;var N,V=window.getComputedStyle(document.getElementById(L),null),W=Math.trunc(V.getPropertyValue("height").slice(0,-2)),U=Math.trunc(V.getPropertyValue("width").slice(0,-2)),M="linearchannel"===F?null==k||null===(d=k.linearchannel)||void 0===d||null===(u=d.channels)||void 0===u||null===(s=u.find(function(e){return(null==e?void 0:e.id)===(null==k?void 0:k.channelId)}))||void 0===s||null===(c=s.content)||void 0===c?void 0:c.id:_e(k,"video.gist.id",""),B="linearchannel"===F?null==k||null===(v=k.linearchannel)||void 0===v||null===(m=v.channels)||void 0===m||null===(f=m.find(function(e){return(null==e?void 0:e.id)===(null==k?void 0:k.channelId)}))||void 0===f?void 0:f.title:_e(k,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),x=null,H=null;"function"==typeof window.__gpp&&(null===(N=window)||void 0===N||N.__gpp("ping",function(e){x=null==e?void 0:e.gppString,H=null==e?void 0:e.sectionList[0]}));var G=a.get("us_privacy")||a.get("usprivacy"),Q=void 0!==G?G:"1YNN",Y=null!==(p=null===(g=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===g?void 0:g.fwIdentifier)&&void 0!==p?p:null,z=Ie(Ie({},Oe(C)),{},(O={VIEWLIFT_WIDTH:U,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:Te(U,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:_e(k,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:_e(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:_e(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==j||null===(w=j.options_)||void 0===w?void 0:w.autoplay)||1,VIEWLIFT_MUTE:(null==j||null===(E=j.options_)||void 0===E?void 0:E.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==R||"usanetwork"==R?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:be(k),VIEWLIFT_MEDIA_ID:M,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(_e(k,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:M,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+_e(k,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:_e(null===(I=window)||void 0===I||null===(y=I.app_data)||void 0===y||null===(T=y.site)||void 0===T?void 0:T.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==R||"usanetwork"==R?"":_e(null===(b=window)||void 0===b||null===(_=b.app_data)||void 0===_||null===(S=_.site)||void 0===S?void 0:S.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:Q,VIEWLIFT_TVE_PROVIDER:Y?ye(Y):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*_e(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:_e(k,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:M,VIEWLIFT_CONTENT_TITLE:B,VIEWLIFT_CONTENT_SERIES_TITLE:_e(k,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:_e(k,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:we(),VIEWLIFT_SEASON_NUMBER:he(),VIEWLIFT_CONTENT_TAGS:be(k),VIEWLIFT_GPP_SID:H||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:x||"VIEWLIFT_GPP",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:"",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},e(O,"VIEWLIFT_LAT",""),e(O,"VIEWLIFT_APP_BUNDLE",""),e(O,"VIEWLIFT_ATT_CONSENT",""),O),null===(A=window)||void 0===A||null===(D=A.customData)||void 0===D?void 0:D.macros);for(var K in z){var q=new RegExp(K,"g");P=P.replace(q,z[K])}return P},Oe=function(e){var n,t,o,i,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(o=t.subscription)||void 0===o?void 0:o.SVOD)||!1,s=(null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return u||s?(pe()?u?a=Ie(Ie({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||""}):s&&(a=Ie(Ie({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.tve")||""})):u?a=Ie(Ie({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||""}):s&&(a=Ie(Ie({},a),{},{VIEWLIFT_CSID:d.get("csid.web.tve")||""})),u?a=Ie(Ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}):s&&(a=Ie(Ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")||d.get("sfid.web.tve")||""})),a=pe()?Ie(Ie({},a),{},{VIEWLIFT_PROF:d.get("prof.mweb")||""}):Ie(Ie({},a),{},{VIEWLIFT_PROF:d.get("prof.web")||""})):(a=Ie(Ie({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")||d.get("sfid.web.dtc")||""}),a=pe()?Ie(Ie({},a),{},{VIEWLIFT_CSID:d.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:d.get("prof.mweb")||""}):Ie(Ie({},a),{},{VIEWLIFT_CSID:d.get("csid.web.dtc")||"",VIEWLIFT_PROF:d.get("prof.web")||""})),a=Ie(Ie({},a),{},{VIEWLIFT_AFID:d.get("afid"),VIEWLIFT_NIELSEN_APP_ID:d.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:d.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:d.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:d.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},Ae=function(e,n){var t,o,i,r,l,a,d,u,s,c,v,m,f,p=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[p])||void 0===t?void 0:t.drmEnabled,h=null==e||null===(o=e[p])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.videoAssets,w=null==e||null===(r=e[p])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,E=(null==e||null===(a=e[p])||void 0===a||null===(d=a.streamingInfo)||void 0===d||null===(u=d.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(s=e[p])||void 0===s||null===(c=s.liveDetails)||void 0===c||c.isDvrEnabled;var I=(null==e||null===(v=e[p])||void 0===v||null===(m=v.streamingInfo)||void 0===m||null===(f=m.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=w&&w.hls)return Pe(w);if(g){var y=Le(h,n);return y.src=Se(y.src,n,e),y}if("Safari"!==fe()&&I)return De(h);if(E){var T=Pe(h);return T.src=Se(T.src,n,e),T}if(null!=h&&h.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(h);return b.src=Se(b.src,n,e),b}return null},De=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},Pe=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Le=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,i=e.fairPlayCmaf||e.fairPlay,l=e.widevine,a=e.playReady,d=fe();if(r(n),"Safari"===d){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 ke(n),u}var s,c={src:l.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(ke(n),c.keySystems={"com.widevine.alpha":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==a?void 0:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==a?void 0:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==a?void 0:a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var ke=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==fe()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Re=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}},Fe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var o=document.getElementById(e);if(o){var i=document.createElement("div");i.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),i.appendChild(r),o.append(i)}}},Ce=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var je=!1,Ne=function(e,n,t){var o=Se(n,e,t),i=r(e);if(n&&window.google){if("function"!=typeof i.ima&&"object"!==h(i.ima))return;i.ima.initializeAdDisplayContainer&&i.ima.initializeAdDisplayContainer(),function(e,n){var t,o,i,l=r(e);if(null!==l.el_){je=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),je&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,o)}};function Ve(e,n){var t,o,i,l=r(e),a=null==l||null===(t=l.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,d=document.getElementsByTagName("video")[0];null===(i=document)||void 0===i||i.addEventListener("keydown",function(t){var o,i,r,u,s,c,v,m,f;if(Ue.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,g=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==d||d.focus()),p){case" ":null==a||a.click();break;case"m":case"M":l.muted(!l.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":g&&!1===n.liveui||Cn(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(i=window)||void 0===i||null===(r=i.app_data)||void 0===r||null===(u=r.appcmsMain)||void 0===u||null===(s=u.adsConfig)||void 0===s?void 0:s.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(m=v.appcmsMain)&&void 0!==m&&null!==(f=m.adsConfig)&&void 0!==f&&f.vodAdClientSideTracking)return;g||Fn(e,10)}}},!0)}var We,Ue=(We=!0,{enable:function(){We=!0},disable:function(){We=!1},get enabled(){return We}}),Me="ssai-breakStart",Be="ssai-adImpression",xe="ssai-firstQuartile",He="ssai-midpoint",Ge="ssai-thirdQuartile",Qe="ssai-complete",Ye="ssai-breakEnd",ze={breakStart:Me,impression:Be,firstQuartile:xe,midpoint:He,thirdQuartile:Ge,complete:Qe,breakEnd:Ye};function Ke(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var o=n.eventType,i=ze[o];i&&t.trigger(i,n)}function qe(e){var n=r(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var o=function(e,n){return t(n)};return n.on(e,o),function(){return n.off(e,o)}};return{adBreakStart:function(e){return t(Me,e)},adImpression:function(e){return t(Be,e)},adFirstQuartile:function(e){return t(xe,e)},adMidpoint:function(e){return t(He,e)},adThirdQuartile:function(e){return t(Ge,e)},adComplete:function(e){return t(Qe,e)},adBreakEnd:function(e){return t(Ye,e)}}}function Xe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Je(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Xe(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var $e,Ze=($e=null,{get:function(){return $e},set:function(e){$e=e}});function en(e,n){var t,o,i,l,a,u,s,c,v,m,f,p,g,h,w,E,I=null==e?void 0:e.playerId,y=r(I);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var O=d(),A=(null==O||null===(o=O.video)||void 0===o?void 0:o.metadata)||[],D=(null==A?void 0:A.length)&&A.filter(function(e){return"advertisingGenre"===e.name});if(null!==(i=D)&&void 0!==i&&i.length){var P=D.map(function(e){return e.value});D=null==P?void 0:P.join(",")}T();var L,k,R,F=null===(l=window)||void 0===l?void 0:l.lcProgrammeDetails,C=Array.isArray(null==F?void 0:F.category)?null==F||null===(a=F.category)||void 0===a?void 0:a.join(","):(null==F?void 0:F.category)||null,j=Je(Je(Je({},null==O?void 0:O.video),null==O?void 0:O.linearchannel),{},{siteName:(null==O?void 0:O.site)||null,programId:(null==F?void 0:F.videotmsid)||null,programTitle:(null==F?void 0:F.lcProgrammeName)||null,episodeId:(null==F?void 0:F.videotmsid)||null,seasonNumber:(null==O||null===(u=O.video)||void 0===u||null===(s=u.series)||void 0===s?void 0:s.seasonNumber)||(null==F||null===(c=F.seriesDetails)||void 0===c?void 0:c.season)||null,episodeNumber:(null==O||null===(v=O.video)||void 0===v||null===(m=v.series)||void 0===m?void 0:m.episodeNumber)||(null==F||null===(f=F.seriesDetails)||void 0===f?void 0:f.episode)||null,episodeTitle:(null==F?void 0:F.lcSubTitle)||null,isCompleteEpisode:!!(null!=O&&null!==(p=O.video)&&void 0!==p&&p.series||null!=F&&null!==(g=F.seriesDetails)&&void 0!==g&&g.episode),genre:D||C,comscoreConfig:{implementationId:(null==e||null===(h=e.comscore)||void 0===h?void 0:h.implementationId)||null,projectId:(null==e||null===(w=e.comscore)||void 0===w?void 0:w.projectId)||null}});if(null!=j&&null!==(E=j.streamingInfo)&&void 0!==E&&E.isLiveStream?j.contentType="LIVE":j.contentType="LONG_FORM_ON_DEMAND",null==j||!j.network){var N,V=(null==j?void 0:j.metadata)||[],W=null==V||null===(N=V.find(function(e){return"network"===e.name}))||void 0===N?void 0:N.value;j.network=W||null}null!=j&&j.network&&null!=j&&j.genre&&(j.customGenre="".concat(j.network,"_").concat((null==j?void 0:j.programTitle)||(L=j,null!=L&&L.series?null==L||null===(R=L.series)||void 0===R?void 0:R.title:null==L||null===(k=L.gist)||void 0===k?void 0:k.title),"_").concat(j.genre)),null!=F&&F.airDate&&(j.publishDate=F.airDate),null!=j&&j.runtime&&(j.runtime=1e3*((null==j?void 0:j.runtime)||0));var U=b(j,y);console.log("comscoreOptions player data",U),_(Je({playerName:"Video.js"},U)),S(y)}}function nn(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 tn(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?nn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):nn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}function on(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 rn(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)?rn(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 rn(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 ln,an=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),dn=(ln=null,{set:function(e){ln=e},get position(){return ln}});function un(e,n){return sn.apply(this,arguments)}function sn(){return(sn=n(t.mark(function e(n,o){var i,l,a,d,u,s,c,v,m,f,p,g,h,w,E,I,T,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r(n),a=Ae(o,n),d=a.src,u=(null==o?void 0:o.contentType)||"video",null==o||null===(i=o[u])||void 0===i||null===(l=i.streamingInfo)||void 0===l||l.isLiveStream,s=d.replace("/dash/","/session/").replace("/master/","/session/"),s=Se(s,n,o),c=vn(s),v=y(c,2),m=v[0],f=v[1],p=cn(f)||{},s=new URL(s.split("?")[0]),Object.keys(f).length>0&&Object.entries(f).forEach(function(e){var n=y(e,2),t=n[0],o=n[1];s.searchParams.set(t,o)}),e.prev=11,e.next=14,fetch(s,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(tn({adsParams:tn({},m)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return h=e.sent,w="https://"+new URL(s).hostname,E=h.trackingUrl,I=h.manifestUrl,T=w+E,b=w+I,an.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 cn(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=y(e,2),t=n[0],o=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(o)]}))||{}}function vn(e){var n={};if(!e.split("?")[1])return[{},{}];var t,o=new URL(e,window.location.origin),i=on((null==o?void 0:o.searchParams)||[]);try{for(i.s();!(t=i.n()).done;){var r=y(t.value,2),l=r[0],a=r[1];n[decodeURIComponent(l)]=decodeURIComponent(a||"")}}catch(e){i.e(e)}finally{i.f()}for(var d={},u={},s=0,c=Object.entries(n);s<c.length;s++){var v=y(c[s],2),m=v[0],f=v[1];if(m.startsWith("ads."))d[m.replace(/^ads\./,"")]=f;else u[m]=f}return[d,u]}var mn,fn,pn,gn,hn=(mn=[],{setQueuePoints:function(e){console.log("%c Setting SGAI Queue Points ","background: #bdf369; color: #000",e),mn=Array.isArray(e)?I(e):mn},getQueuePoints:function(){return console.log("%c Getting SGAI Queue Points ","background: #bdf369; color: #000",mn),I(mn)}}),wn=new Map;function En(e,n){return In.apply(this,arguments)}function In(){return In=n(t.mark(function e(o,i){var l,a,d,u,s,c,v,m,f,p,g,h,E,y,T,b,_,S,O,A,D,P,L,k,R,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,i,l,a){var d,u,s=r(o);if(!s.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds;var v=(null==n||null===(d=n.ads)||void 0===d||null===(u=d[i])||void 0===u?void 0:u.adId)||c;e<k&&L.clear(),k=e,Math.floor(s.currentTime());var m,f=on(t);try{var p=function(){var t,r,l,d=m.value,u=d.eventType,f=d.beaconUrls,p=d.startTimeInSeconds,g=d.startTime,h=d.durationInSeconds,w=p||c,E=f,I=(null===(t=window)||void 0===t||null===(r=t.customData)||void 0===r||null===(l=r.ads)||void 0===l?void 0:l.adEventHandler)||null,y="".concat(v,"_").concat(u),T="pod-".concat(c);wn.has(T)||wn.set(T,new Set);var b=wn.get(T);if(console.warn(e,w,"map:",u,"condition1:",e>=w,"map:",wn),e>=w&&e<=w+P){if(!b.has(y)){b.add(y);try{R(u,n,E,s)}catch(e){console.error("Error when calling triggerAdBeacon:",e,u,n)}if("breakEnd"==u){var _=dn.position;dn.set(null),setTimeout(function(){null!=_&&(s.currentTime(_),a())},500)}if("function"==typeof I)try{var S,O={eventType:u,startTimeInSeconds:p,startTime:g,durationInSeconds:h,ad:null==n||null===(S=n.ads)||void 0===S?void 0:S[i],pod:n,adIndex:i};I({adsData:O}),Ke(o,O)}catch(e){console.error("Error when calling ads callback:",e)}}var A=Ze.get();if(A&&0!==Object.keys(A).length){var D=A.formulateComscoreAdPayload,k=A.startComscoreAdTracking,F=A.finishComscoreAdTracking,C=A.endComscoreAdTracking,j="".concat(w,"_").concat(v,"_").concat(u);if(!L.has(j))if(L.set(j,!0),"impression"===u){var N,V=an.get();k(D(tn(tn({},null==n||null===(N=n.ads)||void 0===N?void 0:N[i]),{},{trackingUrl:V})))}else"complete"===u?F():"breakEnd"===u&&C()}}};for(f.s();!(m=f.n()).done;)p()}catch(e){f.e(e)}finally{f.f()}}},R=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"))},wn.clear(),dn.set(i),f=an.get(),(p=r(o)).one("loadeddata",function(){f&&A(f)}),g=new Map,h=new Map,E=-1,y=(null===(l=document)||void 0===l||null===(a=l.getElementsByClassName("tvProviderImage"))||void 0===a?void 0:a[0])||null,T=(null==p||null===(d=p.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,b=(null==p||null===(u=p.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,_=(null==p||null===(s=p.el())||void 0===s||null===(c=s.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,S=(null==p||null===(v=p.el())||void 0===v||null===(m=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,O=function(){var e,n,t=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 I(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!u&&l){var s=null==d?void 0:d.map(function(e){return tn(tn({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},A=function(){var e=n(t.mark(function e(n){var l,a,d,u,s,c,v,m,f,p,A,P,L,k,R,C,j,N,V,W,U,M,B,x;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",W),0===e.button&&j()},V=function(e){},N=function(){var e,n=p.currentTime(),t=null,o=on(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,g.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(){p.currentTime(t+2.2)},100))},j=function(){var e,n=p.currentTime(),t=null,o=on(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)&&!g.has(r)||n>=r&&n<=d)&&(t=r,g.set(r,!0),h.set(r,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){p.currentTime(t-.4)},100))},s=!1,e.next=7,fetch(n);case 7:return c=e.sent,e.next=10,c.json();case 10:v=e.sent,console.log("%c TRACKING URL RESPONSE ","background: #d9e7ff; color: #000",v),m=v.avails,f=[],p=r(o),A=p.controlBar.progressControl,P=A.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),m.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(s=!0),f.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!s&&i&&(p.currentTime(i),N()),null!=f&&f.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",f),window.adsQueueList=f,"function"==typeof(C=(null===(L=window)||void 0===L||null===(k=L.customData)||void 0===k||null===(R=k.ads)||void 0===R?void 0:R.onAdBreaksLoaded)||null)&&(null==f?void 0:f.length)>0&&C(f)),console.log(f,"data"),f.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=p.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)}}),p._timeUpdateHandler&&p.off("timeupdate",p._timeUpdateHandler),p._timeUpdateHandler=w(function(){var e=p.currentTime();if(e!==E){E=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-4&&e<=a+4){var d;e>=i&&e<=a&&Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n=!0),e>a&&g.set(i,!0),Ue.disable(),y&&y.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")),A.el().classList.add("hide-progress-bar");for(var u=e-i,s=0,c=0,v=0;v<l.length;v++){var m,p=null==l||null===(m=l[v])||void 0===m?void 0:m.durationInSeconds;if(u<s+p){c=v;break}s+=p}l[c];var w=Math.max(0,r-u),E=Math.round(w);U.style.display="block",x.textContent="".concat(c+1," of ").concat(l.length," • ").concat(D(E));var O=[];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)});O.push.apply(O,I(n))}),(null==t||null===(d=t.podSlotImpressionBeacon)||void 0===d?void 0:d.length)>0&&O.push.apply(O,I(null==t?void 0:t.podSlotImpressionBeacon)),F(e,t,O,c,0,N),"break"}h.delete(i)},o=0;o<f.length;o++){if("break"===t())break}n||(U.style.display="none",A.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")),y&&y.classList.remove("vjs-hidden"),_&&(_.style.pointerEvents="auto",_.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),Ue.enable())}},1e3),p.on("timeupdate",p._timeUpdateHandler),null===(a=document)||void 0===a||a.addEventListener("keydown",function(e){Ue.enabled&&"ArrowRight"==e.key&&(j(),Fn(o,10),e.stopPropagation())}),A.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(U=document.createElement("div")).className="ssai-ad-container",(M=document.createElement("div")).className="sponsored-adbox",(B=document.createElement("div")).className="sponsored-text",B.textContent="Sponsored Ad",M.append(B),(x=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",U.append(M),U.append(x),p.el().appendChild(U);case 45:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),P=1.5,L=new Map,k=-1;case 21:case"end":return e.stop()}},e)})),In.apply(this,arguments)}function yn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Tn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Tn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,r=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw r}}}}function Tn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function bn(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 _n(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?bn(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):bn(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))})}return n}var Sn={},On=(null===(fn=window)||void 0===fn||null===(pn=fn.location)||void 0===pn||null===(gn=pn.search)||void 0===gn?void 0:gn.includes("debug=true"))||!1,An=null;function Dn(e){return Pn.apply(this,arguments)}function Pn(){return Pn=n(t.mark(function e(o){var i,l,a,d,u,s,c,v,m,f,p,g,h,E,y,T,b,_,S,O,A,D,P,L,k,R,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,i,l){var a,d,u=r(o);if(!u.seeking()){var s=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(a=n.ads)||void 0===a||null===(d=a[i])||void 0===d?void 0:d.adId)||s;Math.floor(u.currentTime());var v,m=yn(t);try{for(m.s();!(v=m.n()).done;){var f,p,g,h=v.value,w=h.eventType,E=h.beaconUrls,I=h.startTimeInSeconds,y=h.startTime,T=h.durationInSeconds,b=(h.eventId,I||s),_=E,S=(null===(f=window)||void 0===f||null===(p=f.customData)||void 0===p||null===(g=p.ads)||void 0===g?void 0:g.adEventHandler)||null,O="".concat(c,"_").concat(w),A="pod-".concat(s);L.has(A)||L.set(A,new Set);var D=L.get(A);if(On&&console.warn(e,b,"map:",w,"condition1:",e>=b,"map:",L),e>=b&&e<=b+k&&!D.has(O)){D.add(O);try{R(w,n,_,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,w,n)}if("function"==typeof S)try{var P,F={eventType:w,startTimeInSeconds:I,startTime:y,durationInSeconds:T,ad:null==n||null===(P=n.ads)||void 0===P?void 0:P[i],pod:n,adIndex:i};S({adsData:F}),Ke(o,F)}catch(e){console.error("Error when calling ads callback:",e)}var C=Ze.get();if(C&&0!==Object.keys(C).length){var j=C.formulateComscoreAdPayload,N=C.startComscoreAdTracking,V=C.finishComscoreAdTracking,W=C.endComscoreAdTracking;if("impression"===w){var U,M=an.get();N(j(_n(_n({},null==n||null===(U=n.ads)||void 0===U?void 0:U[i]),{},{trackingUrl:M})))}else"complete"===w?V():"breakEnd"===w&&W()}}}}catch(e){m.e(e)}finally{m.f()}}},R=function(e,n,t,o){var i,r,l;"breakEnd"===e&&(null===(i=Sn)||void 0===i?void 0:i.currentAdIndex)+1!=(null===(r=Sn)||void 0===r?void 0:r.totalAds)&&(null==n||null===(l=n.ads)||void 0===l?void 0:l.length)>0||(On&&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)})}))},p=function(){An&&clearInterval(An)},m=an.get(),(f=r(o)).one("loadeddata",function(){p(),An=setInterval(function(){m&&!f.paused()&&P(m)},2e3)}),f.on("dispose",function(){p()}),g=new Map,h=new Map,E=-1,y=null,T=(null===(i=document)||void 0===i||null===(l=i.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==f||null===(a=f.controlBar)||void 0===a?void 0:a.getChild("videoSelector"))||null,_=(null==f||null===(d=f.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==f||null===(u=f.el())||void 0===u||null===(s=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===s?void 0:s[0])||null,O=(null==f||null===(c=f.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===v?void 0:v[0])||null,A=!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 I(o);var i=[],r=null==o?void 0:o.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),l=(null==r||null===(e=r.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,a=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],d=null==a||null===(n=a.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),u=(null==d?void 0:d.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!u&&l){var s=null==d?void 0:d.map(function(e){return _n(_n({},e),{},{eventType:"videoView",beaconUrls:[l]})});null!=s&&s[0]&&i.push(null==s?void 0:s[0])}return i},P=function(){var e=n(t.mark(function e(n){var i,l,a,d,u,s,c,v,m,f,p,P,L,k,R,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=new URL(n),y&&d.searchParams.append("nextToken",y),e.next=4,fetch(d.toString(),{method:"GET"});case 4:return u=e.sent,e.next=7,u.json();case 7:s=e.sent,c=s.avails,v=s.nextToken||null,y=v,m=[],f=r(o),p=null==f||null===(i=f.controlBar)||void 0===i?void 0:i.progressControl,P=null==p||null===(l=p.seekBar)||void 0===l?void 0:l.el(),null===(a=document)||void 0===a||a.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),c.map(function(e,n){m.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)})}),On&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),null!=m&&m.length&&(window.adsQueueList=m,"function"==typeof(C=(null===(L=window)||void 0===L||null===(k=L.customData)||void 0===k||null===(R=k.ads)||void 0===R?void 0:R.onAdBreaksLoaded)||null)&&(null==m?void 0:m.length)>0&&C(m)),m.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var 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)}}),f._timeUpdateHandler&&f.off("timeupdate",null==f?void 0:f._timeUpdateHandler),f._timeUpdateHandler=w(function(){if(isPlayerInitialised(o)){var e=null==f?void 0:f.currentTime();if(e!==E){E=e;for(var n=function(){var n=m[t],o=n.startTimeInSeconds,i=n.durationInSeconds,r=n.ads,l=o+i;if(e>=o-1.2&&e<=l+1.2){var a;A=!!(e>=o&&e<=l&&Array.isArray(r)&&(null==r?void 0:r.length)>0),e>l&&g.set(o,!0),Ue.disable(),T&&T.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),O&&(O.style.pointerEvents="none",O.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),_&&(_.el().style.pointerEvents="none",_.el().classList.add("vjs-hidden")),p.el().classList.add("hide-progress-bar");for(var d=e-o,u=0,s=0,c=0;c<r.length;c++){var v,f=null==r||null===(v=r[c])||void 0===v?void 0:v.durationInSeconds;if(d<u+f){s=c;break}u+=f}setTimeout(function(){Sn.totalAds=null==r?void 0:r.length,Sn.currentAdIndex=s},1e3);var w=[];return null==r||r.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});w.push.apply(w,I(n))}),(null==n||null===(a=n.podSlotImpressionBeacon)||void 0===a?void 0:a.length)>0&&w.push.apply(w,I(null==n?void 0:n.podSlotImpressionBeacon)),F(e,n,w,s),"break"}h.delete(o)},t=0;t<m.length;t++){if("break"===n())break}A||(Sn={},p.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&(_.el().style.pointerEvents="auto",_.el().classList.remove("vjs-hidden")),T&&T.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),O&&(O.style.pointerEvents="auto",O.classList.remove("vjs-hidden")),Ue.enable())}}},1e3),f.on("timeupdate",f._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,k=2.5;case 22:case"end":return e.stop()}},e)})),Pn.apply(this,arguments)}function Ln(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 kn=function(e){o(e).play()},Rn=function(e){o(e).pause()},Fn=function(e,n){var t=o(e),i=t.currentTime()+n;t.currentTime(i)},Cn=function(e,n){var t=o(e),i=t.currentTime(),r=i<=n?0:i-n;t.currentTime(r)},jn=function(e){return!!o.getPlayer("".concat(e))},Nn=function(e){return o(e).paused()},Vn=function(){var e=n(t.mark(function e(o,i){var l,a,d,u=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=u.length>2&&void 0!==u[2]&&u[2],e.next=3,K();case 3:return a=e.sent,d=r(o),e.abrupt("return",new Promise(function(e,r){var u=(null==i?void 0:i.programs)||[];null==i||delete i.programs,N(i,a).then(function(){var r=n(t.mark(function n(r){var a,s,c,m,p,g,h,w;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(a=null==r?void 0:r.data,window.sid=oe(),a.contentType="linearchannel",a.channelId=null==i?void 0:i.channelId,v(a),f(u),!l){n.next=16;break}if(h=(null==a||null===(s=a.linearchannel)||void 0===s?void 0:s.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(c=window)||void 0===c||null===(m=c.app_data)||void 0===m||null===(p=m.appcmsMain)||void 0===p||null===(g=p.adsConfig)||void 0===g?void 0:g.vodAdSticherProvider)||!1,w=Ae(a,o),!h){n.next=13;break}return n.next=12,un(o,a);case 12:w=n.sent;case 13:w&&(xn(o,w),h&&Dn(o),d.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:a})})),n.next=17;break;case 16:e({status:!0,msg:"Feed authenticated",response:a});case 17: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)}}(),Wn=function(){var e=n(t.mark(function e(o,i,l){var a,d,u,c,f,h,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,K();case 2:return c=e.sent,(s()||null)&&m(i),f=0,h=0,w=null,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(d=window)&&void 0!==d&&null!==(u=d.watchHistory)&&void 0!==u&&u.enable&&U(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)),f=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,(h=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null)<95)&&(w=(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){j(i,c).then(function(){var i=n(t.mark(function n(i){var a,d,u,s,c,m,E,I,y,T,b,_,S,O,A,D,P,L,k,R,F,C,j,N,V,W,U,M,B,x,H,G,Q,Y,z,K,q,X;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(D=null==i?void 0:i.data,P=(null==D?void 0:D.contentType)||"video",L=(null==D||null===(a=D[P])||void 0===a?void 0:a.isSSAIEnabled)&&"MEDIA_TAILOR"==(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(s=u.appcmsMain)||void 0===s||null===(c=s.adsConfig)||void 0===c?void 0:c.vodAdSticherProvider)||!1,k=(null==D||null===(m=D.video)||void 0===m||null===(E=m.streamingInfo)||void 0===E?void 0:E.isLiveStream)||!1,v(i.data),(R=(null==D||null===(I=D.ads)||void 0===I||null===(y=I.preRoll)||void 0===y||null===(T=y.adTags)||void 0===T||null===(b=T.web)||void 0===b?void 0:b.active)&&(null==D||null===(_=D.ads)||void 0===_||null===(S=_.preRoll)||void 0===S||null===(O=S.adTags)||void 0===O||null===(A=O.web)||void 0===A?void 0:A.url))&&Ne(o,R,D),F=Ae(D,o),!L){n.next=12;break}return n.next=11,un(o,D);case 11:F=n.sent;case 12:F?(G=(null==D||null===(C=D.video)||void 0===C||null===(j=C.gist)||void 0===j?void 0:j.videoImageUrl)||(null==D||null===(N=D.video)||void 0===N||null===(V=N.gist)||void 0===V||null===(W=V.imageGist)||void 0===W?void 0:W.r16x9),(Q=r(o)).poster(G),xn(o,F),L&&En(o,w),Q.on("loadstart",function(){k&&e({status:!0,msg:"Video Loaded",response:D})}),Q.on("loadeddata",function(){Ce(),e({status:!0,msg:"Video Loaded",response:D})}),Q.one("play",function(){f&&!L&&h<95&&setTimeout(function(){Q.currentTime(f)},0)}),Q.one("error",function(){var e;l({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==D||null===(U=D.video)||void 0===U||null===(M=U.contentDetails)||void 0===M||null===(B=M.closedCaptions)||void 0===B?void 0:B.length)>0||(null==D||null===(x=D.video)||void 0===x||null===(H=x.closedCaptions)||void 0===H?void 0:H.length)>0?(X=(null==D||null===(z=D.video)||void 0===z||null===(K=z.contentDetails)||void 0===K?void 0:K.closedCaptions)||(null==D||null===(q=D.video)||void 0===q?void 0:q.closedCaptions),Y=X.filter(function(e){return"VTT"===e.format}),p(o,Y)):g(o)):(Fe(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){Hn(e,o,l,i)})}));case 10:case"end":return e.stop()}},e)}));return function(n,t,o){return e.apply(this,arguments)}}(),Un=function(e,n,t){var o=r(e);return o.src(n),new Promise(function(e,n){var i=0;o.one("loadedmetadata",function(){clearTimeout(i),e({status:!0,msg:"video loaded"})}),o.one("loadstart",function(e){i=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Mn=function(e){var n=(Ze.get()||{}).destroyComscoreTag,t=r(e);if(Bn(),"function"==typeof n&&n(),E(),window.onresize=null,t)t.dispose();else{var o=document.getElementById(e);o&&o.remove()}},Bn=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()},xn=function(e,n){var t=r(e);t&&t.src(n)},Hn=function(n,t,o,i){var r,l,a,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);jn(t)&&Fe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),o&&o(function(n){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?Ln(Object(o),!0).forEach(function(t){e(n,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):Ln(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}))},Gn=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")},Qn=function(e){var n,t=r(e);return!(null!=t&&null!==(n=t.liveTracker)&&void 0!==n&&n.atLiveEdge())||null};export{Fn as A,kn as B,Rn as C,Cn as D,Wn as E,Vn as F,Mn as G,x as H,hn as I,qe as J,Qn as K,B as L,q as M,Q as N,H as O,A as P,wn as Q,Ve as R,pe as S,Nn as T,Dn as U,En as V,M as W,we as a,he as b,Ze as c,fe as d,Ae as e,Ce as f,ie as g,Fe as h,en as i,Gn as j,me as k,xn as l,Ne as m,Re as n,un as o,X as p,jn as q,j as r,W as s,U as t,Hn as u,K as v,N as w,V as x,ge as y,Un as z};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as a}from"./skin-58b9263c.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-b7fd8308.js";function m(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,n){m("event",e,n)}var w={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 i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function g(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var E={name:"@viewlift/player",version:"2.0.38",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=E.version;var T,h=function(e,n){var t,i,r,a,l,d,u,s;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==w?void 0:w.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,n){var t,i,r,a;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:F.get()+w.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,n){var t,i,r=x(n),a=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):o({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},b=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return i=e.sent,e.abrupt("return",o({url:F.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},O=function(e){var n=e.videoId;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),S=function(e,n,t,i){return o({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},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},R=null;function L(){return{set:function(e){e&&(R=e)},get:function(){return R}}}var W,V,A,C,N,j,B=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),i=F.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/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)}}(),U=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 U||(U=B().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){U=null})),e.abrupt("return",U);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),k=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},x=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){V=e},G=function(){return V},z=function(e){W=e},Y=function(){return W},X=function(){return A},q=function(e){A=e},J=function(){return N},K=function(e){C=new Map,e.map(function(e,n){C.set(e.id,n)})},Q=function(e){if(C){var n=C.get(e);q(n+1)}},Z=(j=0,{set:function(e){e>=0&&(j=e)},get:function(){return j}});function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ee(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var ne=0,te=function(){var e,n,t,i,o,r,a,l=G();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.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==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=n(t.mark(function e(){var n,i;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==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function le(e){return e?String(e):""}window.initialise=function(e){window.sid=ie(),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,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":te(),watchTime:Math.floor(e.currentTime())})}))},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=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ne<4)ne++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.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,i,o,r,a;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.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)&&(ne=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(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(de(n,r,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var de=function(e,n,t){return e>=n&&e<=t};function ue(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,r,a,l,d,u,s,c,v,m,f,p,I,g,E,T,h,y,_,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return T=e.sent,h=x(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=te(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(l=n.videoPosition)&&void 0!==l?l: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?le(n.adPosition):"",e.next=26,re();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27={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},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(I=window)||void 0===I||null===(g=I.customData)||void 0===g||null===(E=g.beacon)||void 0===E?void 0:E.url)||F.get()+w.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch(function(e){console.error(e)});case 42: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 se=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})}),N=t}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,n,t,i=Y(),o=G(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=Z.get(),l=null==i||null===(n=i[a])||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 l>=0?l+1:1};function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function fe(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}window._deviceInfo=s(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},we=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},ge=function(){var e,n,t,i,o,a,l,d,s,c,v,m,f,p,w,I,g,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0,O=(null==D?void 0:D.siteName)||"",F=(null==D?void 0:D.contentType)||"video",S=(null==D||null===(e=D[F])||void 0===e?void 0:e.metadata)||(null==D||null===(n=D[F])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.metadata),P=r(b);if(!_.includes("VIEWLIFT_"))return _;var R,L=window.getComputedStyle(document.getElementById(b),null),W=Math.trunc(L.getPropertyValue("height").slice(0,-2)),V=Math.trunc(L.getPropertyValue("width").slice(0,-2)),A="linearchannel"===F?null==D||null===(i=D.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(a=o.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===a||null===(l=a.content)||void 0===l?void 0:l.id:Ie(D,"video.gist.id",""),C="linearchannel"===F?null==D||null===(d=D.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===c?void 0:c.title:Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,j=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){N=null==e?void 0:e.gppString,j=null==e?void 0:e.sectionList[0]}));var B=fe(fe({},Ee(S)),{},{VIEWLIFT_WIDTH:V,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:pe(V,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==P||null===(m=P.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==P||null===(f=P.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==O?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(D),VIEWLIFT_MEDIA_ID:A,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:A,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(p=window)||void 0===p||null===(w=p.app_data)||void 0===w||null===(I=w.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:Ie(null===(g=window)||void 0===g||null===(E=g.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:A,VIEWLIFT_CONTENT_TITLE:C,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:we(D),VIEWLIFT_GPP_SID:j||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP"},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var U in B){var M=new RegExp(U,"g");_=_.replace(M,B[U])}return _},Ee=function(e){var n,t,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l()?fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l()?fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=fe(fe({},d),{},{VIEWLIFT_AFID:u.get("afid")})},Te=function(e,n){var t,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[w])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ye(E);if(I){var y=_e(g,n);return y.src=ge(y.src,n,e),y}if("Safari"!==d()&&h)return he(g);if(T){var _=ye(g);return _.src=ge(_.src,n,e),_}if(null!=g&&g.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,n,e),b}return null},he=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},_e=function(e,n){var t=e.fairPlayCmaf||e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(n),"Safari"===l){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 o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(t);return be(n),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(be(n),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var be=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},De=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Oe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),o.appendChild(r),i.append(o)}}},Fe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,Pe=function(e,n,t){var i=ge(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,a=r(e);if(null!==a.el_){Se=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Se&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,function(){s&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var Le=function(e){i(e).play()},We=function(e){i(e).pause()},Ve=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ae=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Ce=function(e){return!!i.getPlayer("".concat(e))},Ne=function(e){return i(e).paused()},je=function(){var e=n(t.mark(function e(n,i){var o,a,l,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,M();case 3:return a=e.sent,l=r(n),e.abrupt("return",new Promise(function(e,t){y(i,a).then(function(t){var r=null==t?void 0:t.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Te(r,n);H(r),a&&o?(xe(n,a),l.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Be=function(){var e=n(t.mark(function e(n,i,o){var a,l,d,u,s,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return u=e.sent,(Y()||null)&&Q(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&D(i,u).then(function(e){var n,t,i,o,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){h(i,u).then(function(i){var o,a,l,d,u,f,p,w,I,g,E=null==i?void 0:i.data,T=(null==E||null===(o=E.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;H(i.data);var h=(null==E||null===(l=E.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==E||null===(p=E.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(g=I.web)||void 0===g?void 0:g.url);h&&Pe(n,h,E);var y=Te(E,n);if(y){var _,b,D,O,F,S,P,R,L,W,V,A,C,N,j=(null==E||null===(_=E.video)||void 0===_||null===(b=_.gist)||void 0===b?void 0:b.videoImageUrl)||(null==E||null===(D=E.video)||void 0===D||null===(O=D.gist)||void 0===O||null===(F=O.imageGist)||void 0===F?void 0:F.r16x9),B=r(n);if(B.poster(j),xe(n,y),B.on("loadstart",function(){T&&e({status:!0,msg:"Video Loaded",response:E})}),B.on("loadeddata",function(){Fe(),e({status:!0,msg:"Video Loaded",response:E})}),B.one("play",function(){s&&m<95&&setTimeout(function(){B.currentTime(s)},0)}),B.one("error",function(){var e;t({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==E||null===(S=E.video)||void 0===S||null===(P=S.contentDetails)||void 0===P||null===(R=P.closedCaptions)||void 0===R?void 0:R.length)>0||(null==E||null===(L=E.video)||void 0===L||null===(W=L.closedCaptions)||void 0===W?void 0:W.length)>0)V=((null==E||null===(A=E.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==E||null===(N=E.video)||void 0===N?void 0:N.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(n,V);else v(n)}else Oe(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){He(e,n,t,i)})}));case 9:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),Ue=function(e,n,t){var i=r(e);return i.src(n),new Promise(function(e,n){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Me=function(e){var n=r(e);if(ke(),a(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ke=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()},xe=function(e,n){var t=r(e);t&&t.src(n)},He=function(n,t,i,o){var r,a,l,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ce(t)&&Oe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Re(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},Ge=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},ze=function(e){var n,t=r(e);return!t&&(null==t||null===(n=t.liveTracker)||void 0===n?void 0:n.atLiveEdge())};export{se as A,Z as B,z as C,Ue as D,Le as E,We as F,Ce as G,Be as H,je as I,Me as J,S as K,ze as L,F as M,k as N,L as O,P,f as Q,X as R,Ne as S,q as T,O as U,K as V,Q as W,ve as a,Y as b,ce as c,G as d,Te as e,H as f,oe as g,Fe as h,Oe as i,J as j,Ve as k,xe as l,ge as m,Ge as n,ue as o,Pe as p,De as q,Ae as r,b as s,x as t,h as u,D as v,He as w,M as x,y,_ as z};
@@ -1 +0,0 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as a}from"./skin-58b9263c.js";import{i as l,d}from"./browser-d4613b36.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-b7fd8308.js";function m(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,n){m("event",e,n)}var w={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 i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function g(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var E={name:"@viewlift/player",version:"2.0.38",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=E.version;var T,h=function(e,n){var t,i,r,a,l,d,u,s;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(l=window)&&void 0!==l&&null!==(d=l.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":F.get()+"".concat(null==w?void 0:w.getVideoDetails),params:g({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,n){var t,i,r,a;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:F.get()+w.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(a=r.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,n){var t,i,r=x(n),a=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):o({url:F.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},b=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return i=e.sent,e.abrupt("return",o({url:F.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},O=function(e){var n=e.videoId;return o({method:"GET",url:F.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},F=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),S=function(e,n,t,i){return o({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},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},R=null;function L(){return{set:function(e){e&&(R=e)},get:function(){return R}}}var V,W,A,C,N,j,B=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=L().get(),i=F.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/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)}}(),U=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 U||(U=B().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&L().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){U=null})),e.abrupt("return",U);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),k=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},x=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){W=e},G=function(){return W},z=function(e){V=e},Y=function(){return V},X=function(){return A},q=function(e){A=e},J=function(){return N},K=function(e){C=new Map,e.map(function(e,n){C.set(e.id,n)})},Q=function(e){if(C){var n=C.get(e);q(n+1)}},Z=(j=0,{set:function(e){e>=0&&(j=e)},get:function(){return j}});function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ee(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var ne=0,te=function(){var e,n,t,i,o,r,a,l=G();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.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==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(o=l.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return ae.apply(this,arguments)}function ae(){return(ae=n(t.mark(function e(){var n,i;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==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function le(e){return e?String(e):""}window.initialise=function(e){window.sid=ie(),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,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":te(),watchTime:Math.floor(e.currentTime())})}))},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=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ne<4)ne++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.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,i,o,r,a;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.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)&&(ne=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(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),a=i.end(o);if(de(n,r,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var de=function(e,n,t){return e>=n&&e<=t};function ue(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,r,a,l,d,u,s,c,v,m,f,p,I,g,E,T,h,y,_,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return T=e.sent,h=x(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(a=r.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=oe(),e.t5=te(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(l=n.videoPosition)&&void 0!==l?l: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?le(n.adPosition):"",e.next=26,re();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27={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},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(I=window)||void 0===I||null===(g=I.customData)||void 0===g||null===(E=g.beacon)||void 0===E?void 0:E.url)||F.get()+w.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch(function(e){console.error(e)});case 42: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 se=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})}),N=t}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,n,t,i=Y(),o=G(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,a=Z.get(),l=null==i||null===(n=i[a])||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 l>=0?l+1:1};function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function fe(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}window._deviceInfo=s(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},we=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},ge=function(){var e,n,t,i,o,a,l,d,s,c,v,m,f,p,w,I,g,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0,O=(null==D?void 0:D.siteName)||"",F=(null==D?void 0:D.contentType)||"video",S=(null==D||null===(e=D[F])||void 0===e?void 0:e.metadata)||(null==D||null===(n=D[F])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.metadata),P=r(b);if(!_.includes("VIEWLIFT_"))return _;var R,L=window.getComputedStyle(document.getElementById(b),null),V=Math.trunc(L.getPropertyValue("height").slice(0,-2)),W=Math.trunc(L.getPropertyValue("width").slice(0,-2)),A="linearchannel"===F?null==D||null===(i=D.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(a=o.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===a||null===(l=a.content)||void 0===l?void 0:l.id:Ie(D,"video.gist.id",""),C="linearchannel"===F?null==D||null===(d=D.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===c?void 0:c.title:Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,j=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){N=null==e?void 0:e.gppString,j=null==e?void 0:e.sectionList[0]}));var B=fe(fe({},Ee(S)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:pe(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===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==P||null===(m=P.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==P||null===(f=P.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==O?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(D),VIEWLIFT_MEDIA_ID:A,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:A,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(p=window)||void 0===p||null===(w=p.app_data)||void 0===w||null===(I=w.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:Ie(null===(g=window)||void 0===g||null===(E=g.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:A,VIEWLIFT_CONTENT_TITLE:C,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:we(D),VIEWLIFT_GPP_SID:j||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP"},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var U in B){var M=new RegExp(U,"g");_=_.replace(M,B[U])}return _},Ee=function(e){var n,t,i,o,r,a,d={},u=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){u.set(e.name,e.value)}));var s=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,c=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(a=r.subscription)||void 0===a?void 0:a.TVE)||!1;return s||c?(l()?s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l()?fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=fe(fe({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l()?fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):fe(fe({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=fe(fe({},d),{},{VIEWLIFT_AFID:u.get("afid")})},Te=function(e,n){var t,i,o,r,a,l,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[w])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[w])||void 0===l||null===(u=l.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ye(E);if(I){var y=_e(g,n);return y.src=ge(y.src,n,e),y}if("Safari"!==d()&&h)return he(g);if(T){var _=ye(g);return _.src=ge(_.src,n,e),_}if(null!=g&&g.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,n,e),b}return null},he=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},_e=function(e,n){var t=e.fairPlayCmaf||e.fairPlay,o=e.widevine,a=e.playReady,l=d();if(r(n),"Safari"===l){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 o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,o,r){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(t);return be(n),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(be(n),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):(c.keySystemOptions=[],c.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:o.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),c.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var be=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},De=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Oe=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),o.appendChild(r),i.append(o)}}},Fe=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,Pe=function(e,n,t){var i=ge(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,a=r(e);if(null!==a.el_){Se=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),Se&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),a.one(u,function(){s&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function Re(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var Le=function(e){i(e).play()},Ve=function(e){i(e).pause()},We=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ae=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Ce=function(e){return!!i.getPlayer("".concat(e))},Ne=function(e){return i(e).paused()},je=function(){var e=n(t.mark(function e(n,i){var o,a,l,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,M();case 3:return a=e.sent,l=r(n),e.abrupt("return",new Promise(function(e,t){y(i,a).then(function(t){var r=null==t?void 0:t.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var a=Te(r,n);H(r),a&&o?(xe(n,a),l.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Be=function(){var e=n(t.mark(function e(n,i,o){var a,l,d,u,s,m;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return u=e.sent,(Y()||null)&&Q(i),s=0,m=0,null!==(a=window)&&void 0!==a&&a.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(d=l.watchHistory)&&void 0!==d&&d.enable&&D(i,u).then(function(e){var n,t,i,o,r,a;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),s=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){h(i,u).then(function(i){var o,a,l,d,u,f,p,w,I,g,E=null==i?void 0:i.data,T=(null==E||null===(o=E.video)||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1;H(i.data);var h=(null==E||null===(l=E.ads)||void 0===l||null===(d=l.preRoll)||void 0===d||null===(u=d.adTags)||void 0===u||null===(f=u.web)||void 0===f?void 0:f.active)&&(null==E||null===(p=E.ads)||void 0===p||null===(w=p.preRoll)||void 0===w||null===(I=w.adTags)||void 0===I||null===(g=I.web)||void 0===g?void 0:g.url);h&&Pe(n,h,E);var y=Te(E,n);if(y){var _,b,D,O,F,S,P,R,L,V,W,A,C,N,j=(null==E||null===(_=E.video)||void 0===_||null===(b=_.gist)||void 0===b?void 0:b.videoImageUrl)||(null==E||null===(D=E.video)||void 0===D||null===(O=D.gist)||void 0===O||null===(F=O.imageGist)||void 0===F?void 0:F.r16x9),B=r(n);if(B.poster(j),xe(n,y),B.on("loadstart",function(){T&&e({status:!0,msg:"Video Loaded",response:E})}),B.on("loadeddata",function(){Fe(),e({status:!0,msg:"Video Loaded",response:E})}),B.one("play",function(){s&&m<95&&setTimeout(function(){B.currentTime(s)},0)}),B.one("error",function(){var e;t({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==E||null===(S=E.video)||void 0===S||null===(P=S.contentDetails)||void 0===P||null===(R=P.closedCaptions)||void 0===R?void 0:R.length)>0||(null==E||null===(L=E.video)||void 0===L||null===(V=L.closedCaptions)||void 0===V?void 0:V.length)>0)W=((null==E||null===(A=E.video)||void 0===A||null===(C=A.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==E||null===(N=E.video)||void 0===N?void 0:N.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(n,W);else v(n)}else Oe(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){He(e,n,t,i)})}));case 9:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),Ue=function(e,n,t){var i=r(e);return i.src(n),new Promise(function(e,n){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Me=function(e){var n=r(e);if(ke(),a(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},ke=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()},xe=function(e,n){var t=r(e);t&&t.src(n)},He=function(n,t,i,o){var r,a,l,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(d=l.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Ce(t)&&Oe(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Re(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Re(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},Ge=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{se as A,Z as B,z as C,Ue as D,Le as E,Ve as F,Ce as G,Be as H,je as I,Me as J,S as K,F as L,k as M,L as N,P as O,f as P,X as Q,Ne as R,q as S,O as T,K as U,Q as V,ve as a,Y as b,ce as c,G as d,Te as e,H as f,oe as g,Fe as h,Oe as i,J as j,We as k,xe as l,ge as m,Ge as n,ue as o,Pe as p,De as q,Ae as r,b as s,x as t,h as u,D as v,He as w,M as x,y,_ as z};
@@ -1 +0,0 @@
1
- var n=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-minimize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M40.397 37.511h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.004-9.004z' />\n <path fill='").concat(n||"white","' d='M24.443 26.763h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.003 9.004z' />\n </svg>")},C=function(n){return"<svg fill='".concat(n||"white","'\n class='icon icon-maximize'\n viewBox=\"0 0 70 70\"\n xmlns='http://www.w3.org/2000/svg'\n >\n <path fill='").concat(n||"white","' d='M43.369 45.938h-6.971l3.16 3.146h9.593v-9.714l-3.146-3.077v6.648l-8.823-8.823-2.817 2.817 9.004 9.004z' />\n <path fill='").concat(n||"white","' d='M21.969 18.834h6.971l-3.16-3.146h-9.593v9.714l3.146 3.077v-6.648l8.823 8.823 2.817-2.817-9.003-9.003z' />\n </svg>")},t=function(n){return'<svg style="width:16px" class=\'rewindbtn\' viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.88817 16.9913L7.72176 18.5762C9.58746 18.8613 11.4677 18.5376 13.1023 17.6161C17.1941 15.3094 18.4803 9.98978 15.9732 5.74243C13.47 1.50156 8.13865 -0.0590307 4.03665 2.25351C3.35173 2.64307 2.7379 3.12124 2.20384 3.67698L3.34087 4.82569C3.77642 4.37247 4.27773 3.98196 4.83679 3.66398C8.20452 1.76539 12.5901 3.04913 14.644 6.5288C16.6894 9.99402 15.6429 14.3223 12.3046 16.2043C10.9636 16.9602 9.42195 17.2257 7.88817 16.9913Z" fill=\''.concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.10742 0.462205L0.56205 5.24366L6.06202 5.79492L3.10742 0.462205Z" fill=\'').concat(window.color||"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.80172 14.1769C10.1682 14.1769 10.5096 14.1082 10.8258 13.9708C11.142 13.8333 11.416 13.6241 11.6479 13.343C11.8798 13.0619 12.0615 12.7059 12.1928 12.275C12.3242 11.8441 12.3898 11.3368 12.3898 10.753C12.3898 10.1661 12.3242 9.65803 12.1928 9.22868C12.0615 8.79934 11.8798 8.44413 11.6479 8.16305C11.416 7.88197 11.142 7.6727 10.8258 7.53525C10.5096 7.3978 10.1682 7.32907 9.80172 7.32907C9.43524 7.32907 9.09551 7.3978 8.78254 7.53525C8.46956 7.6727 8.19794 7.88197 7.96767 8.16305C7.7374 8.44413 7.5574 8.79934 7.42767 9.22868C7.29794 9.65803 7.23308 10.1661 7.23308 10.753C7.23308 11.3368 7.29794 11.8441 7.42767 12.275C7.5574 12.7059 7.7374 13.0619 7.96767 13.343C8.19794 13.6241 8.46956 13.8333 8.78254 13.9708C9.09551 14.1082 9.43524 14.1769 9.80172 14.1769ZM6.54713 14.1028V13.2457H5.28226V7.39394H4.2947L2.14929 9.13139L2.52875 9.62714C2.5547 9.66112 2.59443 9.69123 2.64794 9.71749C2.70145 9.74374 2.76064 9.75687 2.82551 9.75687C2.86767 9.75687 2.91064 9.75069 2.95443 9.73834C2.99821 9.72598 3.04118 9.70282 3.08335 9.66884L4.09524 8.86266C4.08551 9.02946 4.08064 9.18853 4.08064 9.33988V13.2457H2.65524V14.1028H6.54713ZM9.30308 13.1136C9.46362 13.1893 9.62983 13.2271 9.80172 13.2271C9.97686 13.2271 10.1455 13.1893 10.3077 13.1136C10.4698 13.038 10.6133 12.9059 10.7382 12.7175C10.8631 12.5291 10.9628 12.2758 11.0374 11.9576C11.112 11.6395 11.1493 11.238 11.1493 10.753C11.1493 10.2681 11.112 9.86652 11.0374 9.54838C10.9628 9.23023 10.8631 8.97695 10.7382 8.78853C10.6133 8.60011 10.4698 8.46807 10.3077 8.39239C10.1455 8.31672 9.97686 8.27888 9.80172 8.27888C9.62983 8.27888 9.46362 8.31672 9.30308 8.39239C9.14254 8.46807 9.00064 8.60011 8.8774 8.78853C8.75416 8.97695 8.65605 9.23023 8.58308 9.54838C8.5101 9.86652 8.47362 10.2681 8.47362 10.753C8.47362 11.238 8.5101 11.6395 8.58308 11.9576C8.65605 12.2758 8.75416 12.5291 8.8774 12.7175C9.00064 12.9059 9.14254 13.038 9.30308 13.1136Z" fill=\'').concat(window.color||"white","' />\n </svg>")},e=function(){return'<svg class=\'rewindbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.22363 9.43675L3.152 11.3434L5.08151 9.43675M2.91616 10.8667C2.88115 10.5537 2.86319 10.2356 2.86319 9.91341C2.86319 5.17486 6.74945 1.3335 11.5434 1.3335C16.3374 1.3335 20.2236 5.17486 20.2236 9.91341C20.2236 14.652 16.3374 18.4933 11.5434 18.4933C8.8166 18.4933 6.38346 17.2505 4.79212 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M9.92694 13.0831V6.80067H8.94318C8.58633 7.20106 7.97871 7.53473 7.37109 7.64912V8.66918C7.68937 8.64058 8.22947 8.52618 8.51881 8.39272V13.0831H9.92694Z" fill="white"/>\n <path d="M13.6545 6.6958C11.8316 6.6958 11.1951 8.23065 11.1951 9.94664C11.1951 11.6817 11.7641 13.1975 13.6255 13.1975C15.5159 13.1975 16.0656 11.634 16.0656 9.9085C16.0656 8.12579 15.4291 6.6958 13.6545 6.6958ZM13.6545 7.78259C14.4839 7.78259 14.6382 8.69778 14.6382 9.91804C14.6382 11.1478 14.5225 12.1107 13.6448 12.1107C12.7479 12.1107 12.6128 11.0811 12.6128 9.92757C12.6128 8.57385 12.8443 7.78259 13.6545 7.78259Z" fill="white"/>\n </svg>'},i=function(){return'<svg width="16" height="16" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M11 14C12.6569 14 14 12.6569 14 11C14 9.34315 12.6569 8 11 8C9.34315 8 8 9.34315 8 11C8 12.6569 9.34315 14 11 14Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M17.7273 13.7273C17.6063 14.0015 17.5702 14.3056 17.6236 14.6005C17.6771 14.8954 17.8177 15.1676 18.0273 15.3818L18.0818 15.4364C18.2509 15.6052 18.385 15.8057 18.4765 16.0265C18.568 16.2472 18.6151 16.4838 18.6151 16.7227C18.6151 16.9617 18.568 17.1983 18.4765 17.419C18.385 17.6397 18.2509 17.8402 18.0818 18.0091C17.913 18.1781 17.7124 18.3122 17.4917 18.4037C17.271 18.4952 17.0344 18.5423 16.7955 18.5423C16.5565 18.5423 16.3199 18.4952 16.0992 18.4037C15.8785 18.3122 15.678 18.1781 15.5091 18.0091L15.4545 17.9545C15.2403 17.745 14.9682 17.6044 14.6733 17.5509C14.3784 17.4974 14.0742 17.5335 13.8 17.6545C13.5311 17.7698 13.3018 17.9611 13.1403 18.205C12.9788 18.4489 12.8921 18.7347 12.8909 19.0273V19.1818C12.8909 19.664 12.6994 20.1265 12.3584 20.4675C12.0174 20.8084 11.5549 21 11.0727 21C10.5905 21 10.1281 20.8084 9.78708 20.4675C9.4461 20.1265 9.25455 19.664 9.25455 19.1818V19.1C9.24751 18.7991 9.15011 18.5073 8.97501 18.2625C8.79991 18.0176 8.55521 17.8312 8.27273 17.7273C7.99853 17.6063 7.69437 17.5702 7.39947 17.6236C7.10456 17.6771 6.83244 17.8177 6.61818 18.0273L6.56364 18.0818C6.39478 18.2509 6.19425 18.385 5.97353 18.4765C5.7528 18.568 5.51621 18.6151 5.27727 18.6151C5.03834 18.6151 4.80174 18.568 4.58102 18.4765C4.36029 18.385 4.15977 18.2509 3.99091 18.0818C3.82186 17.913 3.68775 17.7124 3.59626 17.4917C3.50476 17.271 3.45766 17.0344 3.45766 16.7955C3.45766 16.5565 3.50476 16.3199 3.59626 16.0992C3.68775 15.8785 3.82186 15.678 3.99091 15.5091L4.04545 15.4545C4.25503 15.2403 4.39562 14.9682 4.4491 14.6733C4.50257 14.3784 4.46647 14.0742 4.34545 13.8C4.23022 13.5311 4.03887 13.3018 3.79497 13.1403C3.55107 12.9788 3.26526 12.8921 2.97273 12.8909H2.81818C2.33597 12.8909 1.87351 12.6994 1.53253 12.3584C1.19156 12.0174 1 11.5549 1 11.0727C1 10.5905 1.19156 10.1281 1.53253 9.78708C1.87351 9.4461 2.33597 9.25455 2.81818 9.25455H2.9C3.2009 9.24751 3.49273 9.15011 3.73754 8.97501C3.98236 8.79991 4.16883 8.55521 4.27273 8.27273C4.39374 7.99853 4.42984 7.69437 4.37637 7.39947C4.3229 7.10456 4.18231 6.83244 3.97273 6.61818L3.91818 6.56364C3.74913 6.39478 3.61503 6.19425 3.52353 5.97353C3.43203 5.7528 3.38493 5.51621 3.38493 5.27727C3.38493 5.03834 3.43203 4.80174 3.52353 4.58102C3.61503 4.36029 3.74913 4.15977 3.91818 3.99091C4.08704 3.82186 4.28757 3.68775 4.50829 3.59626C4.72901 3.50476 4.96561 3.45766 5.20455 3.45766C5.44348 3.45766 5.68008 3.50476 5.9008 3.59626C6.12152 3.68775 6.32205 3.82186 6.49091 3.99091L6.54545 4.04545C6.75971 4.25503 7.03183 4.39562 7.32674 4.4491C7.62164 4.50257 7.9258 4.46647 8.2 4.34545H8.27273C8.54161 4.23022 8.77093 4.03887 8.93245 3.79497C9.09397 3.55107 9.18065 3.26526 9.18182 2.97273V2.81818C9.18182 2.33597 9.37338 1.87351 9.71435 1.53253C10.0553 1.19156 10.5178 1 11 1C11.4822 1 11.9447 1.19156 12.2856 1.53253C12.6266 1.87351 12.8182 2.33597 12.8182 2.81818V2.9C12.8193 3.19253 12.906 3.47834 13.0676 3.72224C13.2291 3.96614 13.4584 4.15749 13.7273 4.27273C14.0015 4.39374 14.3056 4.42984 14.6005 4.37637C14.8954 4.3229 15.1676 4.18231 15.3818 3.97273L15.4364 3.91818C15.6052 3.74913 15.8057 3.61503 16.0265 3.52353C16.2472 3.43203 16.4838 3.38493 16.7227 3.38493C16.9617 3.38493 17.1983 3.43203 17.419 3.52353C17.6397 3.61503 17.8402 3.74913 18.0091 3.91818C18.1781 4.08704 18.3122 4.28757 18.4037 4.50829C18.4952 4.72901 18.5423 4.96561 18.5423 5.20455C18.5423 5.44348 18.4952 5.68008 18.4037 5.9008C18.3122 6.12152 18.1781 6.32205 18.0091 6.49091L17.9545 6.54545C17.745 6.75971 17.6044 7.03183 17.5509 7.32674C17.4974 7.62164 17.5335 7.9258 17.6545 8.2V8.27273C17.7698 8.54161 17.9611 8.77093 18.205 8.93245C18.4489 9.09397 18.7347 9.18065 19.0273 9.18182H19.1818C19.664 9.18182 20.1265 9.37338 20.4675 9.71435C20.8084 10.0553 21 10.5178 21 11C21 11.4822 20.8084 11.9447 20.4675 12.2856C20.1265 12.6266 19.664 12.8182 19.1818 12.8182H19.1C18.8075 12.8193 18.5217 12.906 18.2778 13.0676C18.0339 13.2291 17.8425 13.4584 17.7273 13.7273Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},l=function(){return'<svg class=\'selected-stream\' width="25" height="25" viewBox="0 0 35 33" fill="none" xmlns="http://www.w3.org/2000/svg">\n <g clip-path="url(#clip0_319_60943)">\n <path d="M0 0H35V33H0V0Z" fill="#D2393B"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M15.8689 17.6541L22.3039 11.2898C22.6966 10.9014 23.3372 10.9054 23.7299 11.2937C24.1225 11.6821 24.1265 12.3157 23.7338 12.704L16.6345 19.7253C16.6189 19.743 16.6026 19.7604 16.5856 19.7772C16.5158 19.8463 16.4381 19.9032 16.3554 19.9479C15.9716 20.1587 15.4758 20.1009 15.1503 19.779C15.126 19.755 15.1032 19.73 15.0819 19.7042L12.2919 16.9449C11.8992 16.5565 11.9032 15.9229 12.2958 15.5346C12.6885 15.1462 13.3291 15.1423 13.7218 15.5306L15.8689 17.6541Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_319_60943">\n <path d="M0 0H35V33H8C3.58172 33 0 29.4183 0 25V0Z" fill="white"/>\n </clipPath>\n </defs>\n </svg>\n '},o=function(){return'<svg width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.7275 8.7189V11.2811L18.0174 11.7913C17.8497 12.5312 17.558 13.2374 17.1546 13.88L18.71 16.1626L16.8874 17.9721L14.6149 16.43C13.9694 16.8283 13.2636 17.1194 12.5249 17.2919L12.0143 20H9.43828L8.92846 17.2919C8.18971 17.1194 7.48385 16.8284 6.8384 16.43L4.56591 17.9721L2.74302 16.1626L4.28649 13.88C3.88787 13.2349 3.5965 12.5296 3.42371 11.7913L0.727539 11.2811V8.7189L3.42371 8.1968C3.59774 7.4568 3.89356 6.75083 4.29909 6.10771L2.74337 3.837L4.56626 2.02785L6.83875 3.57C7.48173 3.16673 8.18841 2.8752 8.92881 2.70777L9.43863 0H12.0147L12.5252 2.70777C13.2656 2.87529 13.9723 3.16682 14.6153 3.57L16.8878 2.02785L18.7103 3.837L17.1549 6.11996C17.5582 6.75838 17.85 7.46066 18.0177 8.1968L20.7275 8.7189ZM5.19864 10.0057C5.2018 13.0538 7.67684 15.5222 10.7268 15.5191C12.1916 15.5176 13.5957 14.9347 14.6304 13.8985C15.665 12.8624 16.2454 11.4579 16.2438 9.99405C16.2405 6.94597 13.7654 4.47766 10.7154 4.48088C7.6654 4.4841 5.19548 6.95764 5.19864 10.0057Z" fill="white"/>\n </svg>'},w=function(n){return'<svg style="width:16px" class=\'skipbtn\' viewBox="0 0 18 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M9.99586 16.9937L10.1623 18.5786C8.29657 18.8638 6.41631 18.54 4.78178 17.6185C0.689955 15.3118 -0.596286 9.9922 1.9108 5.74486C4.41407 1.50398 9.74539 -0.0566045 13.8474 2.25594C14.5323 2.64549 15.1461 3.12366 15.6802 3.6794L14.5432 4.82812C14.1076 4.3749 13.6063 3.98438 13.0472 3.66641C9.67952 1.76782 5.29397 3.05156 3.24002 6.53123C1.1946 9.99645 2.24115 14.3247 5.57947 16.2067C6.92039 16.9626 8.46208 17.2281 9.99586 16.9937Z" fill=\''.concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M14.7766 0.464616L17.322 5.24607L11.822 5.79733L14.7766 0.464616Z" fill=\'').concat(window.color?window.color:"white",'\' />\n <path fill-rule="evenodd" clip-rule="evenodd" d="M13.0245 14.115C13.391 14.115 13.7323 14.0463 14.0486 13.9088C14.3648 13.7714 14.6388 13.5621 14.8707 13.281C15.1026 13 15.2842 12.644 15.4156 12.2131C15.5469 11.7822 15.6126 11.2749 15.6126 10.6911C15.6126 10.1042 15.5469 9.59609 15.4156 9.16675C15.2842 8.73741 15.1026 8.38219 14.8707 8.10111C14.6388 7.82003 14.3648 7.61076 14.0486 7.47331C13.7323 7.33586 13.391 7.26714 13.0245 7.26714C12.658 7.26714 12.3183 7.33586 12.0053 7.47331C11.6923 7.61076 11.4207 7.82003 11.1904 8.10111C10.9602 8.38219 10.7802 8.73741 10.6504 9.16675C10.5207 9.59609 10.4559 10.1042 10.4559 10.6911C10.4559 11.2749 10.5207 11.7822 10.6504 12.2131C10.7802 12.644 10.9602 13 11.1904 13.281C11.4207 13.5621 11.6923 13.7714 12.0053 13.9088C12.3183 14.0463 12.658 14.115 13.0245 14.115ZM9.76991 14.0409V13.1837H8.50504V7.332H7.51748L5.37207 9.06945L5.75153 9.56521C5.77748 9.59918 5.81721 9.6293 5.87072 9.65555C5.92423 9.68181 5.98342 9.69493 6.04829 9.69493C6.09045 9.69493 6.13342 9.68876 6.17721 9.6764C6.22099 9.66405 6.26396 9.64088 6.30612 9.6069L7.31802 8.80073C7.30829 8.96752 7.30342 9.1266 7.30342 9.27795V13.1837H5.87802V14.0409H9.76991ZM12.5259 13.0517C12.6864 13.1274 12.8526 13.1652 13.0245 13.1652C13.1996 13.1652 13.3683 13.1274 13.5304 13.0517C13.6926 12.976 13.8361 12.844 13.961 12.6556C14.0859 12.4671 14.1856 12.2139 14.2602 11.8957C14.3348 11.5776 14.3721 11.176 14.3721 10.6911C14.3721 10.2061 14.3348 9.80459 14.2602 9.48644C14.1856 9.16829 14.0859 8.91501 13.961 8.7266C13.8361 8.53818 13.6926 8.40613 13.5304 8.33046C13.3683 8.25478 13.1996 8.21694 13.0245 8.21694C12.8526 8.21694 12.6864 8.25478 12.5259 8.33046C12.3653 8.40613 12.2234 8.53818 12.1002 8.7266C11.9769 8.91501 11.8788 9.16829 11.8059 9.48644C11.7329 9.80459 11.6964 10.2061 11.6964 10.6911C11.6964 11.176 11.7329 11.5776 11.8059 11.8957C11.8788 12.2139 11.9769 12.4671 12.1002 12.6556C12.2234 12.844 12.3653 12.976 12.5259 13.0517Z" fill=\'').concat(window.color?window.color:"white","' />\n </svg>")},h=function(){return'<svg class=\'skipbtn\' width="21" height="20" viewBox="0 0 21 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M19.7236 9.43675L17.7953 11.3434L15.8658 9.43675M18.0311 10.8667C18.0661 10.5537 18.0841 10.2356 18.0841 9.91341C18.0841 5.17486 14.1978 1.3335 9.40386 1.3335C4.6099 1.3335 0.723633 5.17486 0.723633 9.91341C0.723633 14.652 4.6099 18.4933 9.40386 18.4933C12.1307 18.4933 14.5638 17.2505 16.1551 15.3067" stroke="white" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.3"/>\n <path d="M7.80584 13.0831V6.80067H6.82209C6.46523 7.20106 5.85762 7.53473 5.25 7.64912V8.66918C5.56828 8.64058 6.10838 8.52618 6.39772 8.39272V13.0831H7.80584Z" fill="white"/>\n <path d="M11.5334 6.6958C9.71052 6.6958 9.07397 8.23065 9.07397 9.94664C9.07397 11.6817 9.64301 13.1975 11.5044 13.1975C13.3948 13.1975 13.9445 11.634 13.9445 9.9085C13.9445 8.12579 13.308 6.6958 11.5334 6.6958ZM11.5334 7.78259C12.3628 7.78259 12.5171 8.69778 12.5171 9.91804C12.5171 11.1478 12.4014 12.1107 11.5237 12.1107C10.6268 12.1107 10.4917 11.0811 10.4917 9.92757C10.4917 8.57385 10.7232 7.78259 11.5334 7.78259Z" fill="white"/>\n </svg>'},s=function(){return'<svg class=\'icon icon-episodes\' width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1 11.7368C1 11.3299 1.32989 11 1.73684 11H16.2632C16.6701 11 17 11.3299 17 11.7368V21.2632C17 21.6701 16.6701 22 16.2632 22H1.73684C1.3299 22 1 21.6701 1 21.2632V11.7368Z" fill="white"/>\n <path d="M5 8H19.2632C19.6701 8 20 8.3299 20 8.73684V18" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M8 4H22.2632C22.6701 4 23 4.3299 23 4.73684V13" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},d=function(){return'<svg width="18" height="16" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M5 6.5H10M5 10H13M7.68375 16H14.2C15.8802 16 16.7202 16 17.362 15.673C17.9265 15.3854 18.3854 14.9265 18.673 14.362C19 13.7202 19 12.8802 19 11.2V5.8C19 4.11984 19 3.27976 18.673 2.63803C18.3854 2.07354 17.9265 1.6146 17.362 1.32698C16.7202 1 15.8802 1 14.2 1H5.8C4.11984 1 3.27976 1 2.63803 1.32698C2.07354 1.6146 1.6146 2.07354 1.32698 2.63803C1 3.27976 1 4.11984 1 5.8V18.3355C1 18.8684 1 19.1348 1.10923 19.2716C1.20422 19.3906 1.34827 19.4599 1.50054 19.4597C1.67563 19.4595 1.88367 19.2931 2.29976 18.9602L4.68521 17.0518C5.17252 16.662 5.41617 16.4671 5.68749 16.3285C5.9282 16.2055 6.18443 16.1156 6.44921 16.0613C6.74767 16 7.0597 16 7.68375 16Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>'},r=function(){return'<svg width="21" height="18" viewBox="0 0 21 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4541 15.8369V2H0.454102V15.8369H11.992L17.7874 18V15.8369H20.4541ZM2.4541 4H18.4541V13.8614H15.9182L15.9179 15L11.9664 13.8614H2.4541V4Z" fill="white"/>\n <rect x="3.4541" y="6" width="9" height="2" fill="white"/>\n <rect x="14.4541" y="6" width="3" height="2" fill="white"/>\n <rect x="8.4541" y="10" width="9" height="2" fill="white"/>\n <rect x="3.4541" y="10" width="3" height="2" fill="white"/>\n </svg>\n '},c=function(n){return'<svg className=\'icon-play-next\' width="16" height="16" viewBox="0 0 25 25" fill='.concat(n,' xmlns="http://www.w3.org/2000/svg">\n <path d="M14.8837 9.99984L0 0V20L14.8837 9.99984Z" fill=').concat(n,' />\n <rect x="18" width="2" height="20" fill=').concat(n," />\n </svg>")},v=function(){return'<svg width="13" height="13" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M0.273985 2.30391C-0.124672 1.74341 -0.0882695 0.933084 0.383092 0.418212C0.893733 -0.139565 1.72148 -0.13938 2.23191 0.418626L9.25 8.09082L16.2681 0.418626C16.7785 -0.13938 17.6063 -0.139565 18.1169 0.418212C18.5883 0.933084 18.6247 1.74341 18.226 2.30391L18.1173 2.43852L11.1987 10.0029L18.1169 17.5611C18.5883 18.0759 18.6247 18.8863 18.226 19.4468L18.1173 19.5814C17.6461 20.0965 16.9046 20.1362 16.3916 19.7006L16.2685 19.5818L9.25 11.9155L2.23153 19.5818L2.10835 19.7006C1.59542 20.1362 0.853882 20.0965 0.382714 19.5814L0.273985 19.4468C-0.124672 18.8863 -0.0882694 18.0759 0.383092 17.5611L7.30134 10.0029L0.382714 2.43852L0.273985 2.30391Z" fill="white"/>\n </svg>\n \n '},a=function(){return'<svg width="22" height="20" viewBox="0 0 22 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M3.01316 12.1667L0.25 10.5V15.5L3.01316 14.25V18H15.25V8H3.01316V12.1667ZM7.67057 10.7216C7.53806 10.6283 7.35547 10.7231 7.35547 10.8852V15.1146C7.35547 15.2766 7.53806 15.3714 7.67057 15.2781L10.6757 13.1634C10.7889 13.0838 10.7889 12.916 10.6757 12.8363L7.67057 10.7216Z" fill="white"/>\n <path fill-rule="evenodd" clip-rule="evenodd" d="M7.25 2H20.25H21.25V3V10H20.25V3H7.25V2ZM17.25 5H4.25V6H17.25V13H18.25V6V5H17.25Z" fill="white"/>\n </svg>\n '},g=function(){return'<svg width="13" height="13" viewBox="0 0 11 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.6169 0.418212C11.0883 0.933084 11.1247 1.74341 10.726 2.30391L10.6173 2.43852L3.69866 10.0029L10.6169 17.5611C11.0883 18.0759 11.1247 18.8863 10.726 19.4468L10.6173 19.5814C10.1461 20.0965 9.40458 20.1362 8.89165 19.7006L8.76847 19.5818L0 10.0039L8.76809 0.418626C9.27852 -0.13938 10.1063 -0.139565 10.6169 0.418212Z" fill="white"/>\n </svg>\n '},p=function(){return'<svg width="28" height="28" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28">\n <path d="M21 10L11 20L7 16" stroke="white" stroke-width="2" fill="none"/>\n </svg>'},f=function(){return'<svg version="1.0" xmlns="http://www.w3.org/2000/svg"\n width="17" height="17" viewBox="0 0 512.000000 512.000000"\n preserveAspectRatio="xMidYMid meet">\n \n <g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"\n fill="white" stroke="none">\n <path d="M340 4674 c-46 -20 -77 -50 -103 -99 -22 -40 -22 -45 -25 -754 -3\n -813 -5 -788 72 -859 69 -64 158 -77 238 -36 17 9 232 177 478 374 492 394\n 490 392 490 499 0 60 -23 112 -72 158 -62 60 -863 695 -900 714 -45 23 -128\n 25 -178 3z"/>\n <path d="M2045 4673 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M2045 3393 c-164 -86 -166 -300 -3 -384 37 -19 73 -19 1382 -17\n l1344 3 44 30 c138 97 118 306 -34 370 -33 13 -189 15 -1370 15 -1195 -1\n -1336 -2 -1363 -17z"/>\n <path d="M340 2114 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186\n 3 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n <path d="M340 834 c-173 -75 -161 -342 18 -394 26 -8 692 -10 2224 -8 l2186 3\n 44 30 c138 97 118 306 -34 370 -33 13 -272 15 -2220 15 -1927 -1 -2187 -3\n -2218 -16z"/>\n </g>\n </svg>'},L=function(){return'<svg width="16" height="16" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M8.99935 13.167C9.23546 13.167 9.43338 13.0871 9.5931 12.9274C9.75282 12.7677 9.83268 12.5698 9.83268 12.3337C9.83268 12.0975 9.75282 11.8996 9.5931 11.7399C9.43338 11.5802 9.23546 11.5003 8.99935 11.5003C8.76324 11.5003 8.56532 11.5802 8.4056 11.7399C8.24588 11.8996 8.16602 12.0975 8.16602 12.3337C8.16602 12.5698 8.24588 12.7677 8.4056 12.9274C8.56532 13.0871 8.76324 13.167 8.99935 13.167ZM8.16602 9.83366H9.83268V4.83366H8.16602V9.83366ZM8.99935 17.3337C7.84657 17.3337 6.76324 17.1149 5.74935 16.6774C4.73546 16.2399 3.85352 15.6462 3.10352 14.8962C2.35352 14.1462 1.75977 13.2642 1.32227 12.2503C0.884766 11.2364 0.666016 10.1531 0.666016 9.00033C0.666016 7.84755 0.884766 6.76421 1.32227 5.75033C1.75977 4.73644 2.35352 3.85449 3.10352 3.10449C3.85352 2.35449 4.73546 1.76074 5.74935 1.32324C6.76324 0.885742 7.84657 0.666992 8.99935 0.666992C10.1521 0.666992 11.2355 0.885742 12.2493 1.32324C13.2632 1.76074 14.1452 2.35449 14.8952 3.10449C15.6452 3.85449 16.2389 4.73644 16.6764 5.75033C17.1139 6.76421 17.3327 7.84755 17.3327 9.00033C17.3327 10.1531 17.1139 11.2364 16.6764 12.2503C16.2389 13.2642 15.6452 14.1462 14.8952 14.8962C14.1452 15.6462 13.2632 16.2399 12.2493 16.6774C11.2355 17.1149 10.1521 17.3337 8.99935 17.3337ZM8.99935 15.667C10.8605 15.667 12.4368 15.0212 13.7285 13.7295C15.0202 12.4378 15.666 10.8614 15.666 9.00033C15.666 7.13921 15.0202 5.56283 13.7285 4.27116C12.4368 2.97949 10.8605 2.33366 8.99935 2.33366C7.13824 2.33366 5.56185 2.97949 4.27018 4.27116C2.97852 5.56283 2.33268 7.13921 2.33268 9.00033C2.33268 10.8614 2.97852 12.4378 4.27018 13.7295C5.56185 15.0212 7.13824 15.667 8.99935 15.667Z" fill="white"/>\n </svg>'};export{g as B,r as C,s as E,L as I,n as M,d as N,c as P,t as R,i as S,p as T,C as a,w as b,h as c,e as d,f as e,v as f,o as g,a as h,l as i};
@@ -1 +0,0 @@
1
- import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as h,q as g,t as b,u as w,v as k,w as O,x as j,y as S,z as T,A as I,B as E,C as P,D,E as x,F as A,G as C,H as R,I as L,J as N,K as M,L as _,M as V,N as B,O as U,P as H,Q as F}from"./generic-715a7738.js";import q from"@babel/runtime/helpers/defineProperty";import G from"@babel/runtime/helpers/asyncToGenerator";import K from"@babel/runtime/regenerator";import z from"video.js";import{o as J,g as W,a as Q,s as X,b as Y}from"./util-80257541.js";import{g as $,d as Z,a as ee,e as ne}from"./captions-b7fd8308.js";import{g as te}from"./renditions-4c09c626.js";import{playSelectedResolution as oe}from"./resolution-920515d1.js";import{g as re,t as ie,p as le,i as ae,a as se}from"./skin-58b9263c.js";import{d as ue}from"./browser-d4613b36.js";import{s as ce}from"./localisation-0bf399a1.js";import de from"@babel/runtime/helpers/typeof";import ve from"@babel/runtime/helpers/toConsumableArray";import fe from"@babel/runtime/helpers/slicedToArray";import{I as pe}from"./icons-3bd3bd8f.js";var me=function(e){return new Promise(function(n,t){if(ye(e))t("".concat(e," is alread initialised"));else{var o=document.createElement("script");o.async=!0,o.src=e,o.onload=function(){n()},o.onerror=function(n){t("Error while loading script ".concat(e," : ").concat(n))},document.head.appendChild(o)}})},ye=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},he=function(e,n,t){var o=re(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},ge=function(e){var n=re(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},be=function(){var e=G(K.mark(function e(n){var t,o,r,i,l;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=re(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,me("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(z),e.finish(13);case 16:(l=z.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==ue()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),we=function(e,n){var t=re(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=z.dom.getPointerPosition(a,n).x;z.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var ke=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),me("https://imasdk.googleapis.com/js/sdkloader/ima3.js").then(function(){}).catch(function(e){return console.log(e)})]);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("utilising contrib eme"),e.next=3,import("videojs-contrib-eme").then(function(e){z.getPlugin("eme")||z.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),je=function(){var e=G(K.mark(function e(){var n;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("videojs-mux");case 3:if(!(n=e.sent)||"function"!=typeof n.register){e.next=7;break}return n.register(z),e.abrupt("return");case 7:console.log("Mux registration failed"),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log("Failed to load Mux plugin:",e.t0);case 13:case"end":return e.stop()}},e,null,[[0,10]])}));return function(){return e.apply(this,arguments)}}(),Se=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./index-5d92eaa3.js");case 3:e.next=8;break;case 5:e.prev=5,e.t0=e.catch(0),console.error("Failed to load dvr seekbar");case 8:case"end":return e.stop()}},e,null,[[0,5]])}));return function(){return e.apply(this,arguments)}}(),Te=function(){var e=G(K.mark(function e(){return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs_contrib_dash-f7d94714.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),Ie=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){me("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(z)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(z)})},loadAdsLibrary:ke,loadEMELibrary:Oe,loadMuxPlugin:je,loadDvrSeekbar:Se,loadContribDash:Te});function Ee(e){return Pe.apply(this,arguments)}function Pe(){return(Pe=G(K.mark(function e(n){var t;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,ke();case 3:t&&"Safari"==ue()&&Promise.resolve().then(function(){return Ie}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function De(e,n){return xe.apply(this,arguments)}function xe(){return(xe=G(K.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==ue()?Oe():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?Te():Oe():"Safari"!=ue()&&d?Te():null,be(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Ae(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Ce(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ae(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ae(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Re=new Set,Le=null,Ne=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=Fe(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=Be(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ue(n),v["c3.cm.genreList"]=_e(n),v["c3.cm.genre"]=Me(n),v["c3.cm.channel"]=Ve(n);var p=Ge(t(),n);return v=Ce(Ce({},v),p)},Me=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},_e=function(e){var n,t=(null==e?void 0:e.contentType)||"video";return((null==e||null===(n=e[t])||void 0===n?void 0:n.categories)||[]).map(function(e){return null==e?void 0:e.title}).join(", ")||"Null"},Ve=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},Be=function(e){return(null==e?void 0:e.contentType)||"null"},Ue=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},He=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},Fe=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var qe,Ge=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Ke=function(e){switch(e){case"com.widevine.alpha":return"Widevine";case"com.microsoft.playready":return"PlayReady";case"org.w3.clearkey":return"ClearKey";case"com.apple.fps.1_0":return"FairPlay";default:return"Unknown DRM System"}},ze=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Je=function(){var e=G(K.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=re(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Ke(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Le&&Le!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Re.clear(),Le=d.currentSrc();var o=ze(d.currentType()),i=r(),s=Ne(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=He(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){Re.has(d.currentSrc())||(Re.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Re.has(d.currentSrc())&&Re.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==Re||Re.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),We=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-b83f4022.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-d93bcc9b.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-d555b116.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-2f85dae8.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-76430de3.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t&&import("./skin-30567c73.js").then(function(t){t.initialiseSkin(e,n)})};function Qe(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(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Qe(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Qe(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ye=[],$e=0,Ze=null;function en(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),h=c?100:Math.floor(v/f*100),g={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=nn(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return Xe(Xe({},e),{},q({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===qe});c<0?i.push(Xe(Xe({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=Xe(Xe(Xe({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(g={completed:c,watchedTime:y,watchedPercentage:h},d,n.siteOwner):(g=Xe(Xe({videoId:qe,watchedTime:y,watchedPercentage:h,doneWatching:c,profileId:d},Ze&&{seriesId:Ze}),p&&{originalObjectId:p}),i(g).then(function(e){}).catch(function(e){})),$e=v+t}function nn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function tn(e,n,t){var o=nn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var on=!1,rn=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!on){var i=ln(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),on=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function ln(e,n,t){if(Array.isArray(e))return e.map(function(e){return ln(e,n,t)});if(null!==e&&"object"===de(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=ln(e[r],n,t)}),o}return e}function an(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 sn(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)?sn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function sn(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 un(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 cn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?un(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):un(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var dn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=re(e),y=(null==f?void 0:f.contentType)||"video",h=(null==f?void 0:f[y].drmEnabled)||!1,g=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){g?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(cn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=$(e);if(null==l||l.map(function(n){return Z(e,n.id)}),b&&"Safari"===ue())try{var a;null==m||null===(a=m.liveTracker)||void 0===a||a.seekToLiveEdge()}catch(e){console.log("Cannot seek to Live Edge",e)}(null==m||!m.muted())&&he(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=cn(cn({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(Ze=null==n||null===(r=n.series)||void 0===r?void 0:r.id),Ye=[],$e=0,qe=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=re(e);a&&(a.on("timeupdate",function(){var e=Math.floor(a.currentTime());Ye.includes($e)||(e==$e?(Ye.push(e),en(a,n,l)):e>$e&&($e=e+l))}),a.one("ended",function(){en(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,h,g,w,k,O=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),j=null==O?void 0:O.gist,S={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==j?void 0:j.id,video_title:null==j?void 0:j.title,video_series:null==O||null===(g=O.series)||void 0===g?void 0:g.title,video_stream_type:null!=O&&null!==(w=O.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:S})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),h=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){g&&rn(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&g)?rn(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var t,o,i,l=null===(t=r())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id,a=d(),s=(null==a?void 0:a.get(l))||{t:0,p:0},u=s.t,c=s.p;u&&c<95&&setTimeout(function(){m.currentTime(u)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(g){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==de(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=an(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=an(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==ue()||"Edge"==ue()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function vn(e,n){var t,o,r,i=re(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o;if(pn.enabled&&"input"!=t.target.localName){var r=t.key,s=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(r)&&(t.preventDefault(),null==a||a.focus()),r){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":s&&!1===n.liveui||f(e,10);break;case"ArrowRight":s||v(e,10)}}},!0)}var fn,pn=(fn=!0,{enable:function(){fn=!0},disable:function(){fn=!1},get enabled(){return fn}});function mn(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 yn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?mn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function hn(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 gn(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)?gn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function gn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var bn,wn=(bn="",{set:function(e){e&&(bn=e)},get:function(){return bn}});function kn(e,n){return On.apply(this,arguments)}function On(){return(On=G(K.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,h,g;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return re(n),o=l(t,n),r=o.src,i=r.replace("dash","session").replace("master","session"),i=p(i,n,{}),a=jn(i),s=fe(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=fe(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.next=10,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:yn({},u)})});case 10:return d=e.sent,e.next=13,d.json();case 13:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,h=f+m,g=f+y,wn.set(h),console.log("%c TRACKING URL","background: #bdf369; color: #000",h),o.src=g,e.abrupt("return",o);case 23:case"end":return e.stop()}},e)}))).apply(this,arguments)}function jn(e){var n={},t=e.split("?")[1];if(!t)return n;var o,r=hn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=fe(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=fe(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}function Sn(e,n){return Tn.apply(this,arguments)}function Tn(){return Tn=G(K.mark(function e(n,t){var o,r,i,l,a,s,u,c;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:c=function(e,t,o,r,i,l){var c=l.redirectEl,d=l.redirectUrl,v=re(n);if(!v.seeking()){var f=t.startTimeInSeconds,p=t.durationInSeconds,m=Math.floor(v.currentTime()),y=Math.floor(f+p);m>=f&&m<=y&&d?(c.style.display="block",a(c,d)):c.style.display="none";var h,g=hn(o);try{for(g.s();!(h=g.n()).done;){var b,w,k,O=h.value,j=O.eventType,S=O.beaconUrls,T=O.startTimeInSeconds,I=(O.startTime,O.durationInSeconds,T||0),E=S,P=(null===(b=window)||void 0===b||null===(w=b.customData)||void 0===w||null===(k=w.ads)||void 0===k||k.adEventHandler,"".concat(I,"_").concat(j)),D=s.get("pod-".concat(i))||[];if(console.warn(e,I,"map:",j,"condition1:",e>=I,"map:",s),e>=I&&!D.includes(P)){D.push(P),s.set("pod-".concat(i),D);try{u(j,t,E,v)}catch(e){console.error("Error when calling triggerAdBeacon:",e,j,t)}}}}catch(e){g.e(e)}finally{g.f()}}},u=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){navigator.sendBeacon(e)})},a=function(e,n){l&&e.removeEventListener("click",l),l=function(){return window.open(n,"_blank")},e.addEventListener("click",l)},i=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},o=wn.get(),re(n).one("loadeddata",function(){o&&r(o)}),r=function(){var e=G(K.mark(function e(t){var o,r,l,a,u,d,v,f,p,m,y,h,g,b,w,k,O,j,S,T,I,E,P,D;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return O=function(e){document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",O),0===e.button&&w()},k=function(e){},w=function(){var e,n=f.currentTime(),t=null,o=hn(v);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!y.has(i)||n>=i&&n<=s)&&(t=i,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){f.currentTime(t+.4)},100))},e.next=5,fetch(t);case 5:return a=e.sent,e.next=8,a.json();case 8:u=e.sent,d=u.avails,v=[],f=re(n),p=f.controlBar.progressControl,m=p.seekBar.el(),d.map(function(e){var n,t;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:(null==e||null===(n=e.adBreakTrackingEvents)||void 0===n||null===(t=n.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===t?void 0:t[0])||[]})}),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",m.appendChild(i)}}),y=new Map,h=-1,g=(null==f||null===(o=f.controlBar)||void 0===o?void 0:o.getChild("videoSelector"))||null,b=(null==f||null===(r=f.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,f.on("timeupdate",ie(function(){var e=f.currentTime();if(e!==h){h=e;for(var n=!1,t=function(){var t=v[o],r=t.startTimeInSeconds,l=t.durationInSeconds,a=t.ads,u=r+l;if(e>=r-2.5&&e<=u+2.5){var d,f,m,h;e<=u&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>u&&y.set(r,!0),pn.disable(),g&&(g.el().style.pointerEvents="none",g.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().style.visibility="hidden";for(var w=e-r,k=0,O=0,S=0;S<a.length;S++){var T,I=null==a||null===(T=a[S])||void 0===T?void 0:T.durationInSeconds;if(w<k+I){O=S;break}k+=I}var E=a[O],x=w-k,A=Math.max(0,(null==E?void 0:E.durationInSeconds)-x),C=Math.round(A);j.style.display="block",P.textContent="".concat(O+1," of ").concat(a.length," • ").concat(i(C));var R=[];null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});R.push.apply(R,ve(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&R.push(null==t?void 0:t.podSlotImpressionBeacon);var L=(null==E||null===(d=E.trackingEvents)||void 0===d||null===(f=d.filter(function(e){var n;return null===(n=["clickThrough"])||void 0===n?void 0:n.includes(e.eventType)}))||void 0===f||null===(m=f[0])||void 0===m||null===(h=m.beaconUrls)||void 0===h?void 0:h[0])||null;return c(e,t,R,0,o,{redirectEl:D,redirectUrl:L}),"break"}s.delete("pod-".concat(o))},o=0;o<v.length;o++){if("break"===t())break}n||(j.style.display="none",p.el().style.visibility="visible",g&&(g.el().style.pointerEvents="auto",g.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),pn.enable())}},1e3)),p.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",O))}),(j=document.createElement("div")).className="ssai-ad-container",(S=document.createElement("div")).className="sponsored-adbox",(T=document.createElement("div")).className="sponsored-text",T.textContent="Sponsored Ad",(I=document.createElement("div")).className="ad-info-icon",E=le(pe()),I.appendChild(E),S.append(T),S.append(I),(P=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(D=document.createElement("div")).className="ad-visit-advertiser",D.textContent="Visit Advertiser",(null===(l=document.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])&&(D.style.right="8.6rem"),j.append(S),j.append(P),j.append(D),f.el().appendChild(j);case 49:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),s=new Map;case 10:case"end":return e.stop()}},e)})),Tn.apply(this,arguments)}function In(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 En(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?In(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):In(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Pn=function(e,n,t,o){var r,i,s,u,d,v,f,p,b,w,k,O,j,S,T,I,E,P,D,x,A,C,R,L,N,M,_,V,B,U,H,F,J,W,Q,X=n.res,Y=void 0===X?null:X,$=n.sres,Z=void 0===$?null:$,ne=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],te=(null===(r=Y)||void 0===r?void 0:r.contentType)||"video",oe=ae(null===(i=Y)||void 0===i||null===(s=i[te])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||ae(null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),ie=(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.liveDetails)||void 0===k?void 0:k.isDvrEnabled)||!1,le=(null===(O=Y)||void 0===O||null===(j=O[te])||void 0===j||null===(S=j.streamingInfo)||void 0===S?void 0:S.isLiveStream)||!1,se=(null===(T=Y)||void 0===T||null===(I=T.ads)||void 0===I||null===(E=I.preRoll)||void 0===E||null===(P=E.adTags)||void 0===P||null===(D=P.web)||void 0===D?void 0:D.active)&&(null===(x=Y)||void 0===x||null===(A=x.ads)||void 0===A||null===(C=A.preRoll)||void 0===C||null===(R=C.adTags)||void 0===R||null===(L=R.web)||void 0===L?void 0:L.url);Y=En(En({},Y),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var ce="MEDIA_TAILOR"==(null===(N=window)||void 0===N||null===(M=N.app_data)||void 0===M||null===(_=M.appcmsMain)||void 0===_||null===(V=_.adsConfig)||void 0===V?void 0:V.vodAdSticherProvider)||!1,de=(null==t?void 0:t.latency)||6,ve=(Q={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:ie},q(Q,"autoplay",null==t?void 0:t.autoplay),q(Q,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!se),q(Q,"loop",(null==t?void 0:t.loop)||!1),q(Q,"audioPosterMode",null==t?void 0:t.audioPosterMode),q(Q,"html5",En(En({dash:En(En(En({},!z.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(B=t.debugConfig)||void 0===B?void 0:B.enable)&&{debug:!0,logLevel:null!=t&&null!==(U=t.debugConfig)&&void 0!==U&&U.logLevel?null==t||null===(H=t.debugConfig)||void 0===H?void 0:H.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:de},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{useDefaultABRRules:!0,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:En(En({liveRangeSafeTimeDelta:de,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(F=t.customData)||void 0===F?void 0:F.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==ue()},0==(null==t||null===(J=t.customData)||void 0===J?void 0:J.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(W=t.customData)||void 0===W?void 0:W.nativeVideoTracks)&&{nativeVideoTracks:!1})),q(Q,"poster",oe),q(Q,"techOrder",ne),q(Q,"chromecast",{requestCustomDataFn:function(n){var t=re(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,h,g,b,w,k,O;p.isDrmEnabled=!0;var j=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,S=(null==j?void 0:j.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(h=y[0])||void 0===h||null===(g=h.options)||void 0===g?void 0:g.serverURL);p.licenseUrl=S;var T=(null==j?void 0:j.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(O=k.httpRequestHeaders)||void 0===O?void 0:O["X-AxDRM-Message"]);p.licenseToken=T}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(Y,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=re(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=Y)||void 0===t||null===(o=t[te])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),Q);if(!z.getPlayers()[e]){z.log.level("debug");var fe=z(e,ve,function(){var n=G(K.mark(function n(){var r,i,s,u,d,v,f,p,b,w,k,O,j,S,T,I,E,P,D,x;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(fe),console.log(z.VERSION),console.log(z.getPlugins()),n.next=5,De(t,Y);case 5:if(O=null===(r=Y)||void 0===r||null===(i=r[te])||void 0===i||null===(s=i.liveDetails)||void 0===s?void 0:s.startOverTime,le&&o.resolve(En({status:!0,msg:"Player Initialised"},Z?{seriesResponse:Z,response:Y}:{response:Y})),y(e,null==t?void 0:t.analyticsCb),Je(e,t),/Android/i.test(navigator.userAgent)&&(z.options.vhs.overrideNative=!0),ie&&we(e,O),!se||null!=t&&null!==(u=t.customData)&&void 0!==u&&u.disableAds||h(e,se,Y),j=l(Y,e),console.log(j),null!=t&&t.nearestClusterUrl&&(j=g(j,t.nearestClusterUrl)),!ce){n.next=19;break}return n.next=18,kn(e,Y);case 18:j=n.sent;case 19:j?a(e,j):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:Y}),c(e,"Incompatible / Missing Source")),((null===(d=Y)||void 0===d||null===(v=d[te])||void 0===v||null===(f=v.contentDetails)||void 0===f||null===(p=f.closedCaptions)||void 0===p?void 0:p.length)>0||(null===(b=Y)||void 0===b||null===(w=b[te])||void 0===w||null===(k=w.closedCaptions)||void 0===k?void 0:k.length)>0)&&(x=(null===(T=Y)||void 0===T||null===(I=T[te])||void 0===I||null===(E=I.contentDetails)||void 0===E?void 0:E.closedCaptions)||(null===(P=Y)||void 0===P||null===(D=P[te])||void 0===D?void 0:D.closedCaptions),S=x.filter(function(e){return"VTT"===e.format}),ee(e,S)),null!=t&&t.disableControls?m(e):We(e,En(En(En({},t),ve),{},{liveVideo:le,isDvrEnabled:ie,res:Y,sres:Z})),dn(e,En(En(En({},t),ve),{},{liveVideo:le}),o,{res:Y,sres:Z});case 23:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Dn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function xn(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 An(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Cn,Rn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Ln(e);Pn(r,{res:i},e,{resolve:t,reject:o})},Ln=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=b(l),s=null==a?void 0:a.site;return An(An({id:null==Dn?void 0:Dn[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Nn(e,n){return Mn.apply(this,arguments)}function Mn(){return(Mn=G(K.mark(function e(n,t){var o,r,i,l,a,u;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,j();case 6:u=e.sent,w(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,h,g=tn((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(g&&g.length)n.watchHistoryResumeTime=(null===(y=g[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(h=g[0])||void 0===h?void 0:h.watchedPercentage)||null;p.contentType="video",Pn(l,{res:p},n,{resolve:o,reject:r})}else k(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Pn(l,{res:p},n,{resolve:o,reject:r})});else Pn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function _n(e,n){return Vn.apply(this,arguments)}function Vn(){return(Vn=G(K.mark(function e(n,t){var o,r,i,l,a;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,j();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,S(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,Pn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){O(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Bn(e,n){return Un.apply(this,arguments)}function Un(){return(Un=G(K.mark(function e(n,t){var o,r,i,l,a,u,c;return K.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,j();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,E.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,T(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;P(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);I(c,l),w(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),Pn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){O(e,a,i,videoId)})}).catch(function(e){O(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Hn(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 Fn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Hn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Hn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function qn(){return{loadVideoInstantly:D,onTimeUpdate:J,getVideoDuration:W,onVideoEnded:Q,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=G(K.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,h,g,b,k,j,S,T,I,E,P;return K.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!C(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,h=null==e?void 0:e.videoId,g=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=h,k=null==e?void 0:e.token,!B(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",k),U().set(null==e?void 0:e.refreshToken),k&&!H(k)){n.next=16;break}return o({status:!1,msg:"".concat(k?"Token is expired !":"Missing Authorization Token"),response:{token:k}}),n.abrupt("return");case 16:Cn=JSON.parse(atob(k.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=Cn)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=Cn)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=Cn)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=Cn)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,j=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,S=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,ce(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),V.set(e.apiBaseUrl),null!=e&&e.skin&&!se(e.skin)||(e.skin="VL_ONE"),n.next=33,Ee(e);case 33:S&&me("https://www.googletagmanager.com/gtag/js?id=".concat(S)).then(function(){return F(S)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(j)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?w(E,k).then(function(n){var r=(null==n?void 0:n.data)||{};Pn(j,{res:Fn(Fn({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){O(e,j,o,E)}):Pn(j,{res:P},e,{resolve:t,reject:o})):b?Rn(e,{resolve:t,reject:o}):g?Bn(e,{resolve:t,reject:o}):y?_n(e,{resolve:t,reject:o}):Nn(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:te,skip:v,getPlayer:re,play:x,pause:A,detectBrowser:ue,rewind:f,loadVideo:a,seekToTimeStamp:X,isPlayerInitialised:C,load:R,authenticateLC:L,dispose:N,enableCaptions:ne,disableCaptions:Z,getCaptions:$,playSelectedResolution:oe,getSource:l,setVolume:he,getVolume:ge,disableControls:m,setPlaybackSpeed:Y,getEntitlementData:M,isBehindLive:_}}export{qn as V,vn as i,Sn as s};