@viewlift/player-backup 2.0.259-backup → 2.0.260-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 (231) hide show
  1. package/cjs/bundle.css +440 -440
  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 +440 -440
  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-cb31894f.js +0 -1
  13. package/cjs/autoNextVideo-ff0d1de3.js +0 -1
  14. package/cjs/features-16937305.js +0 -1
  15. package/cjs/features-258a9a64.js +0 -1
  16. package/cjs/features-25da73a6.js +0 -1
  17. package/cjs/features-b6127bee.js +0 -1
  18. package/cjs/generic-29417780.js +0 -1
  19. package/cjs/generic-29d5b2ec.js +0 -1
  20. package/cjs/generic-743174bb.js +0 -1
  21. package/cjs/generic-939a3e97.js +0 -1
  22. package/cjs/index-04b27b15.js +0 -1
  23. package/cjs/index-10d97ab9.js +0 -1
  24. package/cjs/index-20de6bc7.js +0 -1
  25. package/cjs/index-2b05c277.js +0 -1
  26. package/cjs/index-5b18b394.js +0 -1
  27. package/cjs/index-5c93e8c6.js +0 -1
  28. package/cjs/index-64db4d74.js +0 -1
  29. package/cjs/index-6593cb6f.js +0 -1
  30. package/cjs/index-67289ebc.js +0 -1
  31. package/cjs/index-67e8cb8e.js +0 -1
  32. package/cjs/index-6bc2d039.js +0 -1
  33. package/cjs/index-73a1b75f.js +0 -1
  34. package/cjs/index-8047cfe4.js +0 -1
  35. package/cjs/index-99c100ab.js +0 -1
  36. package/cjs/index-afff893e.js +0 -1
  37. package/cjs/index-c51fccda.js +0 -1
  38. package/cjs/index-e4393a77.js +0 -1
  39. package/cjs/index-e5d7c072.js +0 -1
  40. package/cjs/multicamv2-138af789.js +0 -1
  41. package/cjs/multicamv2-25acee8c.js +0 -1
  42. package/cjs/multicamv2-3f9ffd46.js +0 -1
  43. package/cjs/multicamv2-4a67a1c7.js +0 -1
  44. package/cjs/multicamv2-574b49ad.js +0 -1
  45. package/cjs/multicamv2-92e2b919.js +0 -1
  46. package/cjs/multicamv2-ec232dbd.js +0 -1
  47. package/cjs/multicamv2-ee975960.js +0 -1
  48. package/cjs/nextEpisodeButton-10a8c935.js +0 -1
  49. package/cjs/nextEpisodeButton-2ba4aa6f.js +0 -1
  50. package/cjs/nextEpisodeButton-6aebdc8a.js +0 -1
  51. package/cjs/nextEpisodeButton-ee1f4e87.js +0 -1
  52. package/cjs/playlist-8b12d044.js +0 -1
  53. package/cjs/playlist-9710ef70.js +0 -1
  54. package/cjs/playlist-a6c55be5.js +0 -1
  55. package/cjs/playlist-d6f8e3b6.js +0 -1
  56. package/cjs/series-602d1f2c.js +0 -1
  57. package/cjs/series-8bd07d22.js +0 -1
  58. package/cjs/series-ab2fb794.js +0 -1
  59. package/cjs/series-c3138dfb.js +0 -1
  60. package/cjs/series-v2-04bb2f24.js +0 -1
  61. package/cjs/series-v2-0fe2e1c3.js +0 -1
  62. package/cjs/series-v2-3578532c.js +0 -1
  63. package/cjs/series-v2-693bc5cc.js +0 -1
  64. package/cjs/series-v2-7d183e67.js +0 -1
  65. package/cjs/series-v2-8694c212.js +0 -1
  66. package/cjs/series-v2-a532b003.js +0 -1
  67. package/cjs/series-v2-f67606dc.js +0 -1
  68. package/cjs/skin-02df14d4.js +0 -1
  69. package/cjs/skin-08a270c1.js +0 -1
  70. package/cjs/skin-14f83052.js +0 -1
  71. package/cjs/skin-29a5361a.js +0 -1
  72. package/cjs/skin-31d84d3e.js +0 -1
  73. package/cjs/skin-334830ee.js +0 -1
  74. package/cjs/skin-3481c5cb.js +0 -1
  75. package/cjs/skin-3d6f28e9.js +0 -1
  76. package/cjs/skin-46d92899.js +0 -1
  77. package/cjs/skin-5493ce5f.js +0 -1
  78. package/cjs/skin-56e72a1b.js +0 -1
  79. package/cjs/skin-572a65a9.js +0 -1
  80. package/cjs/skin-585353b3.js +0 -1
  81. package/cjs/skin-5e4b3ad1.js +0 -1
  82. package/cjs/skin-6e922e32.js +0 -1
  83. package/cjs/skin-7afabe4c.js +0 -1
  84. package/cjs/skin-7afce973.js +0 -1
  85. package/cjs/skin-7e40bdaa.js +0 -1
  86. package/cjs/skin-7f58ba4c.js +0 -1
  87. package/cjs/skin-84cac674.js +0 -1
  88. package/cjs/skin-861125f0.js +0 -1
  89. package/cjs/skin-91814213.js +0 -1
  90. package/cjs/skin-98b66c5d.js +0 -1
  91. package/cjs/skin-999521e6.js +0 -1
  92. package/cjs/skin-9d420b99.js +0 -1
  93. package/cjs/skin-ab226d57.js +0 -1
  94. package/cjs/skin-ae3ca001.js +0 -1
  95. package/cjs/skin-ae526505.js +0 -1
  96. package/cjs/skin-af838b06.js +0 -1
  97. package/cjs/skin-b671419f.js +0 -1
  98. package/cjs/skin-bac14ade.js +0 -1
  99. package/cjs/skin-bf73e43b.js +0 -1
  100. package/cjs/skin-c2d7c6d3.js +0 -1
  101. package/cjs/skin-cea29f97.js +0 -1
  102. package/cjs/skin-cfa023f1.js +0 -1
  103. package/cjs/skin-d5a8b61b.js +0 -1
  104. package/cjs/skin-dbeec98f.js +0 -1
  105. package/cjs/skin-eac05283.js +0 -1
  106. package/cjs/skin-f0486679.js +0 -1
  107. package/cjs/skin-f55aefe8.js +0 -1
  108. package/cjs/util-233dec09.js +0 -1
  109. package/cjs/util-4769ed5b.js +0 -1
  110. package/cjs/util-fbe3d806.js +0 -1
  111. package/cjs/videoSelector-239532a4.js +0 -1
  112. package/cjs/videoSelector-29fbaa66.js +0 -1
  113. package/cjs/videoSelector-2d51c4d2.js +0 -1
  114. package/cjs/videoSelector-642f00ed.js +0 -1
  115. package/cjs/videoSelector-9d841083.js +0 -1
  116. package/cjs/videoSelector-a122278c.js +0 -1
  117. package/cjs/videoSelector-dcbb1d54.js +0 -1
  118. package/cjs/videoSelector-eddf015c.js +0 -1
  119. package/cjs/videojs-dash5.es-8bc4e9b4.js +0 -1
  120. package/cjs/videojs-dash5.es-f9629f7f.js +0 -1
  121. package/esm/autoNextVideo-15f76d85.js +0 -1
  122. package/esm/autoNextVideo-281e802c.js +0 -1
  123. package/esm/autoNextVideo-3d6570ee.js +0 -1
  124. package/esm/autoNextVideo-f6a502c9.js +0 -1
  125. package/esm/features-3fc61a30.js +0 -1
  126. package/esm/features-ab6f492e.js +0 -1
  127. package/esm/features-c3e53ffd.js +0 -1
  128. package/esm/features-d7440f39.js +0 -1
  129. package/esm/generic-1697c09f.js +0 -1
  130. package/esm/generic-205dfe5c.js +0 -1
  131. package/esm/generic-2f9efcf1.js +0 -1
  132. package/esm/generic-79a719c8.js +0 -1
  133. package/esm/index-02ed8ded.js +0 -1
  134. package/esm/index-0ce0e085.js +0 -1
  135. package/esm/index-0ffc31e8.js +0 -1
  136. package/esm/index-13b7c455.js +0 -1
  137. package/esm/index-1d1f438d.js +0 -1
  138. package/esm/index-403dd12e.js +0 -1
  139. package/esm/index-433697e2.js +0 -1
  140. package/esm/index-4a04166e.js +0 -1
  141. package/esm/index-62e1ef44.js +0 -1
  142. package/esm/index-7304e60f.js +0 -1
  143. package/esm/index-a3bbcba7.js +0 -1
  144. package/esm/index-b507b376.js +0 -1
  145. package/esm/index-c880c052.js +0 -1
  146. package/esm/index-cf927b34.js +0 -1
  147. package/esm/index-e1345c4e.js +0 -1
  148. package/esm/index-e796a94f.js +0 -1
  149. package/esm/index-ebda7269.js +0 -1
  150. package/esm/index-f2d0aa7c.js +0 -1
  151. package/esm/multicamv2-051519e5.js +0 -1
  152. package/esm/multicamv2-2f2829fb.js +0 -1
  153. package/esm/multicamv2-9166cf23.js +0 -1
  154. package/esm/multicamv2-a8db4d7f.js +0 -1
  155. package/esm/multicamv2-bed3a0bc.js +0 -1
  156. package/esm/multicamv2-e247f9b6.js +0 -1
  157. package/esm/multicamv2-e85ff8d3.js +0 -1
  158. package/esm/multicamv2-f8c068cb.js +0 -1
  159. package/esm/nextEpisodeButton-2a75ce5c.js +0 -1
  160. package/esm/nextEpisodeButton-38661562.js +0 -1
  161. package/esm/nextEpisodeButton-a6ef9e2a.js +0 -1
  162. package/esm/nextEpisodeButton-e79ba9ea.js +0 -1
  163. package/esm/playlist-3b568899.js +0 -1
  164. package/esm/playlist-78ea48cc.js +0 -1
  165. package/esm/playlist-b9595b14.js +0 -1
  166. package/esm/playlist-c13c7244.js +0 -1
  167. package/esm/series-97434a7c.js +0 -1
  168. package/esm/series-9dcc32b9.js +0 -1
  169. package/esm/series-c0b5c787.js +0 -1
  170. package/esm/series-c73c97f1.js +0 -1
  171. package/esm/series-v2-04e9add7.js +0 -1
  172. package/esm/series-v2-10742435.js +0 -1
  173. package/esm/series-v2-1263db01.js +0 -1
  174. package/esm/series-v2-52212b58.js +0 -1
  175. package/esm/series-v2-647dcbf9.js +0 -1
  176. package/esm/series-v2-8e5ff7c1.js +0 -1
  177. package/esm/series-v2-a1083c40.js +0 -1
  178. package/esm/series-v2-b5cece98.js +0 -1
  179. package/esm/skin-017721f3.js +0 -1
  180. package/esm/skin-01da91f0.js +0 -1
  181. package/esm/skin-032174d9.js +0 -1
  182. package/esm/skin-066d481a.js +0 -1
  183. package/esm/skin-072ed58b.js +0 -1
  184. package/esm/skin-0ca780ee.js +0 -1
  185. package/esm/skin-0f0bb3f9.js +0 -1
  186. package/esm/skin-130e5b01.js +0 -1
  187. package/esm/skin-1629e49c.js +0 -1
  188. package/esm/skin-1a12c6ed.js +0 -1
  189. package/esm/skin-258904b8.js +0 -1
  190. package/esm/skin-2a1e18f9.js +0 -1
  191. package/esm/skin-30567c73.js +0 -1
  192. package/esm/skin-35e4ade3.js +0 -1
  193. package/esm/skin-3628bdf0.js +0 -1
  194. package/esm/skin-3ae22d7d.js +0 -1
  195. package/esm/skin-3e6fd83b.js +0 -1
  196. package/esm/skin-4ad0fccc.js +0 -1
  197. package/esm/skin-4cc51263.js +0 -1
  198. package/esm/skin-508bd0e2.js +0 -1
  199. package/esm/skin-55857acc.js +0 -1
  200. package/esm/skin-5ca6263c.js +0 -1
  201. package/esm/skin-74d07b0b.js +0 -1
  202. package/esm/skin-7c5ac76d.js +0 -1
  203. package/esm/skin-8ceddbe1.js +0 -1
  204. package/esm/skin-a2bc9871.js +0 -1
  205. package/esm/skin-b3e77849.js +0 -1
  206. package/esm/skin-b83f4022.js +0 -1
  207. package/esm/skin-b8e87cdb.js +0 -1
  208. package/esm/skin-c05be60d.js +0 -1
  209. package/esm/skin-c4422587.js +0 -1
  210. package/esm/skin-c906e1c0.js +0 -1
  211. package/esm/skin-cb4566f3.js +0 -1
  212. package/esm/skin-cc9878af.js +0 -1
  213. package/esm/skin-d8ab9efc.js +0 -1
  214. package/esm/skin-e8919754.js +0 -1
  215. package/esm/skin-e9914c42.js +0 -1
  216. package/esm/skin-f5b2d1cc.js +0 -1
  217. package/esm/skin-f9988297.js +0 -1
  218. package/esm/skin-fdb749ad.js +0 -1
  219. package/esm/util-5b3b1f9c.js +0 -1
  220. package/esm/util-90b9fbc3.js +0 -1
  221. package/esm/util-b1ec6897.js +0 -1
  222. package/esm/videoSelector-0c6d2d43.js +0 -1
  223. package/esm/videoSelector-3c635dc2.js +0 -1
  224. package/esm/videoSelector-3ebdf49e.js +0 -1
  225. package/esm/videoSelector-47ad19c9.js +0 -1
  226. package/esm/videoSelector-9d611c93.js +0 -1
  227. package/esm/videoSelector-b8f21092.js +0 -1
  228. package/esm/videoSelector-c8e01367.js +0 -1
  229. package/esm/videoSelector-cf7538bf.js +0 -1
  230. package/esm/videojs-dash5.es-600b6231.js +0 -1
  231. package/esm/videojs-dash5.es-bc6f319d.js +0 -1
@@ -0,0 +1 @@
1
+ import"video.js/dist/video-js.min.css";import{d as e,c as n,g as t,a as o,b as i,s as l,e as r,f as a,h as s,i as u,l as d,j as c,k as v,m as p,n as f,o as m,p as g,q as h,r as y,t as b,u as w,v as k,w as S,x as I,y as E,z as O,A as D,B as T,C as j,D as C,E as P,F as x,G as A,H as R,I as N,J as L,K as M,L as _,M as B,N as V,O as U,P as H,Q as F,R as G}from"./generic-7505da7f.js";import q from"@babel/runtime/helpers/defineProperty";import K from"@babel/runtime/helpers/asyncToGenerator";import J from"@babel/runtime/regenerator";import W from"video.js";import{o as Y,g as z,a as X,s as Q,b as $,p as Z,c as ee}from"./util-a420b997.js";import{g as ne,d as te,a as oe,e as ie}from"./captions-78bd2908.js";import{g as le,p as re}from"./resolution-62be852a.js";import{i as ae,a as se}from"./skin-65765793.js";import{g as ue}from"./player_instance-34118a5b.js";import{g as de,s as ce}from"./localisation-0bf399a1.js";import{g as ve,a as pe,b as fe,s as me,v as ge,c as he,d as ye,e as be,f as we}from"./currentVideoInfo-0b234e55.js";import ke from"@babel/runtime/helpers/typeof";import{s as Se,w as Ie}from"./icons-37daa6b3.js";import{c as Ee,p as Oe,a as De,h as Te,r as je,g as Ce,b as Pe,d as xe,s as Ae,e as Re,f as Ne}from"./helper-d52dff3c.js";import Le from"@babel/runtime/helpers/toConsumableArray";import Me from"@babel/runtime/helpers/slicedToArray";import{createSSETransport as _e}from"@viewlift/sse";var Be=function(e){return new Promise(function(n,t){if(Ve(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)}})},Ve=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},Ue=function(e,n,t){var o=ue(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var i=parseFloat(n)/100;o.volume(i),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,"'")})},He=function(e){var n=ue(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Fe=function(){var n=K(J.mark(function n(t){var o,i,l,r,a;return J.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(l=ue(null==t?void 0:t.playerId),null!=t&&null!==(o=t.series)&&void 0!==o&&o.enable||!(null!=t&&t.chromecastReceiverId||null!=t&&t.airplay)){n.next=10;break}return n.prev=2,n.next=5,Be("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 5:n.next=10;break;case 7:n.prev=7,n.t0=n.catch(2),console.log("Error",n.t0);case 10:if(null!=t&&null!==(i=t.series)&&void 0!==i&&i.enable||null==t||!t.chromecastReceiverId){n.next=21;break}return n.next=13,import("@silvermine/videojs-chromecast");case 13:n.sent.default(W),(a=W.getTech("chromecast"))&&!a.prototype.seeking&&(a.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==l||l.chromecast({receiverAppID:null==t?void 0:t.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},n.next=22;break;case 21:console.log("Chromecast plugin is not available");case 22:null!=t&&t.airplay&&"Safari"==e()?null==l||l.airPlay({addButtonToControlBar:"VL_ONE"==t.skin||"defaultV2"==t.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 23:case"end":return n.stop()}},n,null,[[2,7]])}));return function(e){return n.apply(this,arguments)}}(),Ge=function(e,n){var t=ue(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,i,l,r,a=this.el(),s=W.dom.getPointerPosition(a,n).x;W.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,d=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S;if(console.log(u),u&&"CONNECTED"===d){window.cast.framework.RemotePlayer.canSeek=!0;var c=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=c.h.media[0].liveSeekableRange.end;c.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,c.seek()}})};var qe=function(){var e=K(J.mark(function e(){return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),Be("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)}}(),Ke=function(){var e=K(J.mark(function e(){return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,import("@viewlift/comscore/index.js").then(function(e){n.set(e)});case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Je=function(){var e=K(J.mark(function e(){return J.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){W.getPlugin("eme")||W.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),We=function(){var e=K(J.mark(function e(){var n;return J.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(W),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)}}(),Ye=function(){var e=K(J.mark(function e(){return J.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)}}(),ze=function(){var e=K(J.mark(function e(){return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs-dash5.es-1a1bf509.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)}}(),Xe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){Be("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(W)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(W)})},loadAdsLibrary:qe,loadEMELibrary:Je,loadMuxPlugin:We,loadDvrSeekbar:Ye,loadContribDash:ze,loadComscorePlugin:Ke});function Qe(e){return $e.apply(this,arguments)}function $e(){return($e=K(J.mark(function n(t){var o,i,l;return J.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return o=(null==t?void 0:t.airplay)||!1,n.next=3,qe();case 3:o&&"Safari"==e()?Promise.resolve().then(function(){return Xe}).then(function(e){e.importAirplay()}):(l=(null===(i=document)||void 0===i?void 0:i.getElementById(null==t?void 0:t.playerId))||null)&&l.setAttribute("x-webkit-airplay","deny");case 4:case"end":return n.stop()}},n)}))).apply(this,arguments)}function Ze(e){return en.apply(this,arguments)}function en(){return(en=K(J.mark(function e(n){var t,o,i,l,r,a,s,u,d;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=ue(n.playerId),e.next=3,Ke();case 3:d.comscore({publisherId:null==n||null===(t=n.comscore)||void 0===t?void 0:t.publishedId,endpoint:null==n||null===(o=n.comscore)||void 0===o?void 0:o.endpoint,applicationName:(null==n||null===(i=n.comscore)||void 0===i?void 0:i.applicationName)||(null===(l=window)||void 0===l?void 0:l.siteName)||null,implementationId:null==n||null===(r=n.comscore)||void 0===r?void 0:r.implementationId,projectId:null==n||null===(a=n.comscore)||void 0===a?void 0:a.projectId,debug:(null==n||null===(s=n.comscore)||void 0===s?void 0:s.debug)||!1,persistentLabels:(null==n||null===(u=n.comscore)||void 0===u?void 0:u.persistentLabels)||{}});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function nn(e,n){return tn.apply(this,arguments)}function tn(){return(tn=K(J.mark(function n(t,o){var i,l,r,a,s,u,d,c,v,p,f,m,g,h;return J.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return v=(null==o?void 0:o.contentType)||"video",p=null==o||null===(i=o[v])||void 0===i?void 0:i.drmEnabled,null==o||null===(l=o[v])||void 0===l||null===(r=l.liveDetails)||void 0===r||r.isDvrEnabled,null==t||t.showPositiveSeekbar,f=(null==o||null===(a=o[v])||void 0===a||null===(s=a.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.dash)||null,m=(null==t||null===(d=t.comscore)||void 0===d?void 0:d.enable)||!1,g=!(null==t||null===(c=t.analytics)||void 0===c||!c.muxKey),n.prev=7,n.next=10,Promise.allSettled([p?"Safari"==e()?Je():"caliente"!=(null===(h=window)||void 0===h?void 0:h.siteName)?ze():Je():"Safari"!=e()&&f?ze():null,m?Ze(t):null,g?We():null,Fe(t)]);case 10:n.next=15;break;case 12:n.prev=12,n.t0=n.catch(7),console.log("Error",n.t0);case 15:case"end":return n.stop()}},n,null,[[7,12]])}))).apply(this,arguments)}function on(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 ln(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?on(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):on(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var rn=new Set,an=null,sn=function(e,n,o,i){var l,r,a,s,u,d,c,v={},p=(null==e?void 0:e.contentType)||"video";v["c3.cm.id"]=(null===(l=e[p])||void 0===l?void 0:l.id)||"Null",v["c3.cm.contentType"]=mn(e),v[null==o||null===(r=o.Constants)||void 0===r?void 0:r.IS_LIVE]=!(null==e||!e.linearchannel),v[null==o||null===(a=o.Constants)||void 0===a?void 0:a.STREAM_URL]=n.currentSrc(),v[null==o||null===(s=o.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===t()?"NULL":t(),v["c3.cm.categoryType"]=vn(e),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=e[p])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(d=e[p])&&void 0!==d&&null!==(c=d.gist)&&void 0!==c&&c.isSSAIEnabled?"YES":"NO",v[o.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=pn(e),v["c3.cm.genreList"]=dn(e),v["c3.cm.genre"]=un(e),v["c3.cm.channel"]=cn(e,i);var f=yn(ve(),e);return v=ln(ln({},v),f)},un=function(e){var n,t,o,i=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[i])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},dn=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"},cn=function(e,n){var t,o,i=(null==e?void 0:e.contentType)||"video";return"video"===i?"VOD":(null===(o=((null==e||null===(t=e[i])||void 0===t?void 0:t.channels)||[]).find(function(e){return(null==e?void 0:e.id)===(null==n?void 0:n.channelId)}))||void 0===o?void 0:o.title)||"NULL"},vn=function(e){var n,t;return null!=e&&e.linearchannel?"Linear Channel":null!=e&&null!==(n=e.video)&&void 0!==n&&null!==(t=n.streamingInfo)&&void 0!==t&&t.isLiveStream?"Live Event":"VOD"},pn=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",i=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return i?"YES":"NO"},fn=function(e,n){var t,o,i=(n||{}).epg;if(i&&null!=i&&i.enable&&null!=i&&i.programTitle)return i.programTitle;var l=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(t=e[l])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(r)},mn=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var gn,hn,yn=function(e,n){var t,l,r,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!n||null!=n&&n.linearchannel)return u;var d=i(),c=o();return u["c3.cm.seriesName"]=(null==n||null===(t=n.video)||void 0===t||null===(l=t.series)||void 0===l?void 0:l.title)||"Null",u["c3.cm.seasonNumber"]=(null==d?void 0:d.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(r=e[d-1])||void 0===r||null===(a=r.episodes)||void 0===a||null===(s=a[c-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==c?void 0:c.toString())||"Null",u},bn=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"}},wn=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},kn=function(){var e=K(J.mark(function e(n,t){var o,i,l,r,a,s,u,d,c,v,p,f;return J.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,r=o.tveProvider,a=o.enable,s=o.appName,d=(u=t||{}).token,c=u.epg,a){e.next=4;break}return e.abrupt("return");case 4:if(v=ue(n),"function"==typeof(p=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,p("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:v.ready(function(){var e=v.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=bn(t.keySystem);p("contentInfo",{DRMEnabled:o})}else p("contentInfo",{DRMEnabled:"None"})}),n||p("contentInfo",{DRMEnabled:"None"})}),v.on("loadstart",function(){var e,n;an&&an!==v.currentSrc()&&p("playbackEnded"),p("setPlayer",v),rn.clear(),an=v.currentSrc();var o=wn(v.currentType()),i=pe(),a=sn(i,v,f,c);a[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=s||"WEB",a[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=fn(i,t),a.authToken=d||"NULL",a.streamType=o,a.D2CType=l||"NONE",a.subscriberType=r?"MVPD":"FREE"!==l?"D2C":"FREE",a["c3.cm.affiliate"]=r||"NULL",Sn.setData(a),p("contentInfo",a)}),v.on("loadedmetadata",function(){var e,n=v.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),p("contentInfo",{screenResolution:e})}),v.on("play",function(){rn.has(v.currentSrc())||(rn.add(v.currentSrc()),p("playbackStarted",null))}),v.on("ended",function(){rn.has(v.currentSrc())&&rn.delete(v.currentSrc()),p("playbackEnded")}),v.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&p("initAdSensor",{player:v,adsLoader:null==e?void 0:e.adsLoader})}),v.on("dispose",function(){null==rn||rn.clear(),p("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Sn=(gn={},{setData:function(e){gn=ln(ln({},gn),e)},getData:function(){return gn}}),In=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-f21ef5ec.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-61229ce9.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-aeae977d.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-a2b5e469.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-b3357b0d.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-5a424471.js").then(function(t){t.initialiseSkin(e,n)}):"news"==t?import("./skin-d656e076.js").then(function(t){t.initialiseSkin(e,n)}):"news_live"==t?import("./skin-8db4ed62.js").then(function(t){t.initialiseSkin(e,n)}):"mini"==t&&import("./skin-6cf385ed.js").then(function(t){t.initialiseSkin(e,n)})};function En(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function On(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?En(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):En(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Dn=[],Tn=0,jn=null;function Cn(){console.log("Cleaning up watch history data"),hn=null,Dn=[],Tn=0,jn=null}function Pn(e,n,t){var o,i,r,a,s,u=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===(i=n.watchHistory)||void 0===i?void 0:i.profileId,c=Math.floor(e.currentTime()),v=Math.floor(e.duration());null==n||null===(r=n.watchHistory)||void 0===r||r.xapiKey;var p=(null==n||null===(a=n.video)||void 0===a?void 0:a.originalObjectId)||null,f=(null==n||null===(s=n.watchHistory)||void 0===s?void 0:s.saveOffline)||!1,m=Math.floor(e.currentTime()),g=u?100:Math.floor(c/v*100),h={};f?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=xn(o),l=(new Date).getTime(),r=pe(),a=(null==r?void 0:r.video)||{},s=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return On(On({},e),{},q({},n,a[n]))},{}),u=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===hn});u<0?i.push(On(On({content:s},e),{},{addedDate:l,updateDate:l})):i[u]=On(On(On({},i[u]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(h={completed:u,watchedTime:m,watchedPercentage:g},d,n.siteOwner):(h=On(On({videoId:hn,watchedTime:m,watchedPercentage:g,doneWatching:u,profileId:d},jn&&{seriesId:jn}),p&&{originalObjectId:p}),l(h).then(function(e){}).catch(function(e){})),Tn=c+t}function xn(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function An(e,n,t){var o=xn(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),i=[];return o&&Array.isArray(o)&&(i=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),i}function Rn(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 Nn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Rn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Rn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Ln,Mn=(Ln={},{setConfig:function(e){Ln=Nn(Nn({},Ln),e)},getConfig:function(){return Ln}}),_n=!1,Bn=function(){var e=K(J.mark(function e(n,t){var o,i,l,s,u,c,v,p,f,m;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=(null==n?void 0:n.contentType)||"video",!((null==n||null===(o=n[l])||void 0===o||null===(i=o.streamingInfo)||void 0===i?void 0:i.secondaryVideoAssets)||null)||_n){e.next=19;break}if(c=Mn.getConfig(),v=(null==c||null===(s=c.customData)||void 0===s?void 0:s.ads)||{},p=(null==n||null===(u=n[l])||void 0===u?void 0:u.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==v?void 0:v.vodAdSticherProvider)||!1,f=Un(n,"videoAssets","secondaryVideoAssets"),m=r(f,t),!p){e.next=12;break}return e.next=11,a(t,f);case 11:m=e.sent;case 12:return m&&d(t,m),_n=!0,console.log("switching to secondary source"),Vn(t,f,c),e.abrupt("return",!0);case 19:return console.log("secondary source is either corrupted / not available"),e.abrupt("return",!1);case 21:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}();function Vn(e,n,t){var o,i,l,r,a=(null==t||null===(o=t.customData)||void 0===o?void 0:o.ads)||{},d=(null==n?void 0:n.contentType)||"video",c=(null==n||null===(i=n[d])||void 0===i?void 0:i.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==a?void 0:a.vodAdSticherProvider)||!1,v=(null==n||null===(l=n[d])||void 0===l||null===(r=l.streamingInfo)||void 0===r?void 0:r.isLiveStream)||!1;if("MEDIA_TAILOR"==(null==a?void 0:a.vodAdSticherProvider)&&null!=a&&a.vodAdClientSideTracking&&c)if(v)s(e);else{var p,f=null;if(null!=t&&null!==(p=t.series)&&void 0!==p&&p.enable){var m,g,h,y,b,w=null===(m=pe())||void 0===m||null===(g=m.video)||void 0===g||null===(h=g.gist)||void 0===h?void 0:h.id,k=fe(),S=(null==k?void 0:k.get(w))||{t:0,p:0},I=S.t,E=S.p;"function"==typeof(null===(y=window)||void 0===y||null===(b=y.watchHistory)||void 0===b?void 0:b.cb)&&window.watchHistory.cb({watchedTime:I}),E<95&&(f=I)}else{var O=options,D=O.watchHistoryResumeTime;O.watchedPercentage<95&&(f=D)}u(e,f)}}function Un(e,n,t){if(Array.isArray(e))return e.map(function(e){return Un(e,n,t)});if(null!==e&&"object"===ke(e)){var o={};return Object.keys(e).forEach(function(i){i===n&&void 0!==e[t]?o[i]=e[t]:i===t&&void 0!==e[n]?o[i]=e[n]:o[i]=Un(e[i],n,t)}),o}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 Fn(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)?Fn(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 l,r=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return r=e.done,e},e:function(e){a=!0,l=e},f:function(){try{r||null==t.return||t.return()}finally{if(a)throw l}}}}function Fn(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 Gn(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 qn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Gn(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Gn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Kn=function(n,t,o,i){var l,r,a,s,u,d=i.res,f=i.sres,m=ue(n),g=(null==d?void 0:d.contentType)||"video",h=(null==d||null===(l=d[g])||void 0===l?void 0:l.drmEnabled)||!1,y=(null==d||null===(r=d[g])||void 0===r||null===(a=r.streamingInfo)||void 0===a?void 0:a.isLiveStream)||!1,b=(null==d||null===(s=d[g])||void 0===s||null===(u=s.liveDetails)||void 0===u?void 0:u.isDvrEnabled)||!1;me(d),ge.set(d),m&&(m.on("loadstart",function(){y?o.resolve({status:!0,msg:"Video Loaded",response:d}):o.resolve(qn({status:!0,msg:"Player Initialised"},f?{seriesResponse:f,response:d}:{response:d}))}),m.on("loadeddata",function(){var o,i,l,r=ne(n);if(null==r||r.map(function(e){return te(n,e.id)}),b&&"Safari"===e())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())&&Ue(n,sessionStorage.getItem("volume")||"100");var s=pe();if(c(t),v(),null!=t&&t.watchHistory&&null!=t&&null!==(o=t.watchHistory)&&void 0!==o&&o.enable&&(!t.isAnonymousUser||null!=t&&null!==(i=t.watchHistory)&&void 0!==i&&i.saveOffline)){var u,p,f=qn(qn({},t),d);!function(e,n,t){var o,i,l;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(jn=null==n||null===(i=n.series)||void 0===i?void 0:i.id),Dn=[],Tn=0,hn=t;var r=(null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.interval)||30,a=ue(e);a&&(a.on("dispose",Cn),a.on("timeupdate",function(){if(!a.seeking()){var e=Math.floor(a.currentTime());Dn.includes(Tn)||(e!=Tn||e<r?e>Tn&&(Tn=e+r):(Dn.push(e),Pn(a,n,r)))}}),a.one("ended",function(){Pn(a,n,r,!0)}))}(n,f,null==s||null===(u=s.video)||void 0===u||null===(p=u.gist)||void 0===p?void 0:p.id)}if(null!=t&&null!==(l=t.analytics)&&void 0!==l&&l.muxKey&&null!=m&&m.mux){var g,h,y,w,k,S,I=(null===(g=pe())||void 0===g?void 0:g.video)||(null==d?void 0:d.video),E=null==I?void 0:I.gist,O={env_key:null==t||null===(h=t.analytics)||void 0===h?void 0:h.muxKey,player_name:"vl-web-player",player_version:null===(y=window)||void 0===y?void 0:y.vl_player_version,video_id:null==E?void 0:E.id,video_title:null==E?void 0:E.title,video_series:null==I||null===(w=I.series)||void 0===w?void 0:w.title,video_stream_type:null!=I&&null!==(k=I.streamingInfo)&&void 0!==k&&k.isLiveStream?"live":"video",viewer_user_id:null==t||null===(S=t.analytics)||void 0===S?void 0:S.userId};m.mux({debug:!1,data:O})}}),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,i,l,r,a,s,u,d,c,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,p=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(i=o.framework)||void 0===i||null===(l=i.CastContext)||void 0===l||null===(r=l.getInstance())||void 0===r?void 0:r.S,f=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(d=u.CastContext)||void 0===d||null===(c=d.getInstance())||void 0===c?void 0:c.getCurrentSession();if(v&&"CONNECTED"===p){var m,g=f.getMediaSession(),h=g.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),g.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){y&&Bn(d,n)}),m.on("error",function(){var e,t;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&y)?Bn(d,n):(p(n,(null==m||null===(e=m.error())||void 0===e?void 0:e.message)||"Some error occured"),o.reject({status:!1,msg:(null==m||null===(t=m.error())||void 0===t?void 0:t.message)||"Some error occured",response:d}))}),m.one("play",function(){var e,n,o,i,l;if(null===(e=window)||void 0===e||null===(n=e.app_data)||void 0===n||null===(o=n.appcmsMain)||void 0===o||null===(i=o.adsConfig)||void 0===i||!i.vodAdClientSideTracking){if(null!=t&&null!==(l=t.series)&&void 0!==l&&l.enable){var r,a,s,u=null===(r=pe())||void 0===r||null===(a=r.video)||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.id,d=fe(),c=(null==d?void 0:d.get(u))||{t:0,p:0},v=c.t,p=c.p;v&&p<95&&setTimeout(function(){m.currentTime(v)},0)}else null!=t&&t.watchHistoryResumeTime&&(null==t?void 0:t.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==t?void 0:t.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(y){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var n,t=(null==m||null===(n=m.audioTracks())||void 0===n?void 0:n.tracks_)||null;if(t)if(t.sort(function(e,n){var t=(e.language||e.language||"").toUpperCase(),o=(n.language||n.label||"").toUpperCase();return t<o?-1:t>o?1:0}),"object"==ke(m.dash)){var o,i,l,r=null==m||null===(o=m.dash)||void 0===o||null===(i=o.mediaPlayer)||void 0===i?void 0:i.getTracksFor("audio"),a=null==r?void 0:r.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),s=Hn(t);try{for(s.s();!(l=s.n()).done;){var u=l.value;if(a&&(null==u?void 0:u.id)=="dash-audio-".concat(a.index)){u.enabled=!0;break}}}catch(e){s.e(e)}finally{s.f()}}else{var d,c=Hn(t);try{for(c.s();!(d=c.n()).done;){var v,p,f,g=d.value;if(("Chrome"==e()||"Edge"==e()&&(null!==(v=navigator)&&void 0!==v&&null!==(p=v.userAgent)&&void 0!==p&&p.includes("Macintosh")||!h))&&null!=g&&null!==(f=g.label)&&void 0!==f&&f.includes("5.1"))m.audioTracks().removeTrack(g);else{if("main"==g.kind){g.enabled=!0;break}g.enabled=!1}}}catch(e){c.e(e)}finally{c.f()}}}))};function Jn(e){var n=ue(e),t=n.seekable(),o=n.controlBar.progressControl.seekBar.el();if(t&&t.length>0){var i=t.start(0),l=t.end(t.length-1)-i;Yn(),zn(l).forEach(function(e){var n=e.id,t=e.title,i=e.time,r=Wn(n,t,Math.min(i/l*100,99.5));o.appendChild(r)})}}function Wn(e,n,t){var o=document.createElement("div");return o.className="vjs-seekbar-program-marker",o.id=e,o.style.title=n,o.style.left="".concat(t,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="4px",o.style.backgroundColor="#000000",o.style.left="".concat(t,"%"),o.style.pointerEvents="none",o}function Yn(){document.querySelectorAll(".vjs-seekbar-program-marker").forEach(function(e){e.remove()})}function zn(e){var n=(new Date).getTime(),t=new Date(n-1e3*e).getTime();return(he()||[]).filter(function(e){var o=new Date(e.formatted_startdate).getTime();return o>=t&&o<=n}).map(function(e){var n=new Date(e.formatted_startdate).getTime()-t;return{title:e.title,time:n/1e3,id:e.programme_id}})}function Xn(e,n){var t=ue(e);if(t){var o=n.dvrConfig,i=void 0===o?{}:o,l=n.videoId;n.epg;var r=i.playLive,a=i.playFromBegining,s=i.programs;ye(s),t.on("loadeddata",function(){Ee(n)?a?Oe(t,n):r?De(t,l):(!function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=n.dvrConfig,o=void 0===t?{}:t,i=n.videoId,l=n.epg,r=o.buttonConfig,a=void 0===r?{}:r,s=a.watchLive;a.resume;var u=a.startFromBegining,d=i;if(l&&null!=l&&l.enable){var c=JSON.parse(sessionStorage.getItem("epgConfig"));d="".concat(null==c?void 0:c.programId,"-").concat(null==c?void 0:c.channelId)}var v=!!Ce(d),p=document.querySelector(".vjs-dvr-btn-overlay");p||((p=document.createElement("div")).className="vjs-dvr-btn-overlay");var f=Pe(n);f&&(p.style.backgroundImage="url(".concat(f,")"),p.style.backgroundPosition="center center",p.style.backgroundRepeat="no-repeat",p.style.backgroundSize="cover");p.innerHTML=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],t=(null==e?void 0:e.buttonConfig)||{},o=t.watchLive,i=t.resume,l=t.startFromBegining,r=n?(null==i?void 0:i.text)||"Resume":(null==o?void 0:o.text)||"Watch Live",a='<button id="watch-live-resume-btn">'.concat(Ie()," ").concat(r,"</button>"),s='<button id="watch-begining-btn">'.concat(Se()," ").concat((null==l?void 0:l.text)||"Start From Beginning","</button>");return'<div class="dvr-button">'.concat(a," ").concat(s,"</div>")}(o,v),p.style.display="flex",e.el().appendChild(p),xe(e),Qn("watch-live-resume-btn",s,function(){Ne(e,p),De(e,d)}),Qn("watch-begining-btn",u,function(){Ne(e,p),Oe(e,n)})}(t,n),Te({player:t,showWatchLive:!0,showStartOver:!0})):je(t)}),t.one("loadedmetadata",function(){sessionStorage.setItem("program_switched",!0),function(e,n){var t=n.videoId,o=e.currentTime(),i=!1,l=e.seekable(),r=l.start(0),a=l.end(l.length-1)-r,s=JSON.parse(sessionStorage.getItem("epgConfig")),u=t,d=!0;if(s&&null!=s&&s.enable){var c;d=(null==n||null===(c=n.epg)||void 0===c?void 0:c.programId)===(null==s?void 0:s.programId),u=null==s?void 0:s.programId}e.on("seeking",function(){i=!0}),e.on("seeked",function(){i=!1,o=e.currentTime();var t=JSON.parse(sessionStorage.getItem("epgConfig"));if(t&&null!=t&&t.enable){if(!d||sessionStorage.getItem("program_switched"))return;u="".concat(null==t?void 0:t.programId,"-").concat(null==t?void 0:t.channelId)}Ae(u,o),Re(e,n),Te({player:e,showWatchLive:e.seekable().end(0)-e.currentTime()>5,showStartOver:!0})}),e.on("timeupdate",function(){if(!i){var n=JSON.parse(sessionStorage.getItem("epgConfig"));if(n&&null!=n&&n.enable){if(!d||sessionStorage.getItem("program_switched")&&!e.currentTime())return;if(sessionStorage.getItem("program_switched")&&e.currentTime())return void sessionStorage.removeItem("program_switched");u="".concat(null==n?void 0:n.programId,"-").concat(null==n?void 0:n.channelId)}var t=e.currentTime();Math.abs(t-o)>=20&&(Ae(u,t),o=t,function(e,n){zn(n).forEach(function(t){var o=t.id,i=t.title,l=t.time,r=document.getElementById(o);if(r){var a=Math.min(l/n*100,99.5);r.style.left="".concat(a,"%")}else{var s=e.controlBar.progressControl.seekBar.el(),u=Wn(o,i,Math.min(l/n*100,99.5));s.appendChild(u)}})}(e,a))}})}(t,n)})}else console.warn("Player instance is required to initialize start over.")}function Qn(e,n,t){var o,i,l=document.getElementById(e);l&&(i=n,(o=l)&&(o.style.color="".concat((null==i?void 0:i.textColor)||"#000"),o.style.backgroundColor="".concat((null==i?void 0:i.backGroundColor)||"#DCF95B")),l.addEventListener("click",t))}function $n(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 Zn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?$n(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):$n(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var et=function(n,t,o,i){var l,s,u,c,v,y,b,w,k,S,I,E,O,D,T,j,C,P,x,A,R,N,L,M,_,B,V,U,H,F,G,Y,z,X,Q,$,Z,ee=t.res,ne=void 0===ee?null:ee,te=t.sres,ie=void 0===te?null:te,le=null!=o&&o.chromecastReceiverId?["chromecast","html5"]:["html5"],re=(null===(l=ne)||void 0===l?void 0:l.contentType)||"video",se=ae(null===(s=ne)||void 0===s||null===(u=s[re])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl)||ae(null===(v=ne)||void 0===v||null===(y=v[re])||void 0===y||null===(b=y.gist)||void 0===b||null===(w=b.imageGist)||void 0===w?void 0:w.r16x9),de=(null===(k=ne)||void 0===k||null===(S=k[re])||void 0===S||null===(I=S.liveDetails)||void 0===I?void 0:I.isDvrEnabled)||!1,ce=(null===(E=ne)||void 0===E||null===(O=E[re])||void 0===O||null===(D=O.streamingInfo)||void 0===D?void 0:D.isLiveStream)||!1,ve=(null===(T=ne)||void 0===T||null===(j=T.ads)||void 0===j||null===(C=j.preRoll)||void 0===C||null===(P=C.adTags)||void 0===P||null===(x=P.web)||void 0===x?void 0:x.active)&&(null===(A=ne)||void 0===A||null===(R=A.ads)||void 0===R||null===(N=R.preRoll)||void 0===N||null===(L=N.adTags)||void 0===L||null===(M=L.web)||void 0===M?void 0:M.url);ne=Zn(Zn({},ne),{},{audioAssetSource:null==o?void 0:o.audioAssetSource});var pe=(null==o||null===(_=o.customData)||void 0===_?void 0:_.ads)||{},fe=(null===(B=ne)||void 0===B||null===(V=B[re])||void 0===V?void 0:V.isSSAIEnabled)&&"MEDIA_TAILOR"==(null==pe?void 0:pe.vodAdSticherProvider)||!1,me=(null==o?void 0:o.latency)||6,ge=(null==o?void 0:o.skin_settings)||{};null==o||o.dvrConfig;var he=($={enableSmoothSeeking:!0,controls:0!=(null==o?void 0:o.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==o?void 0:o.muted)||!1,autoplay:(null==o?void 0:o.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:(null==ge?void 0:ge.pictureInPictureToggle)||!1},playbackRates:null!=ge&&ge.playbackRates?[.5,1,1.5,2]:[],muteToggle:"multiplayer"==o.skin,liveui:de},q($,"autoplay",null==o?void 0:o.autoplay),q($,"normalizeAutoplay",(null==o?void 0:o.autoplay)&&!ve),q($,"loop",(null==o?void 0:o.loop)||!1),q($,"audioPosterMode",null==o?void 0:o.audioPosterMode),q($,"html5",Zn(Zn({dash:Zn(Zn(Zn({},!W.browser.IS_SAFARI&&{useTTML:!0}),(null==o?void 0:o.debugConfig)&&(null==o||null===(U=o.debugConfig)||void 0===U?void 0:U.enable)&&{debug:!0,logLevel:null!=o&&null!==(H=o.debugConfig)&&void 0!==H&&H.logLevel?null==o||null===(F=o.debugConfig)||void 0===F?void 0:F.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:me},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},gaps:{enableStallFix:!0,stallSeek:3},abr:Zn(Zn({},(null==o?void 0:o.initialBandwidth)&&{initialBitrate:{audio:-1,video:(null==o?void 0:o.initialBandwidth)/1e3}}),{},{autoSwitchBitrate:{video:!0,audio:!0},additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0}})}}}),vhs:Zn(Zn(Zn({},(null==o?void 0:o.initialBandwidth)&&{bandwidth:o.initialBandwidth}),{},{liveRangeSafeTimeDelta:me,useDevicePixelRatio:!0,experimentalLLHLS:(null==o?void 0:o.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:null==o||!o.initialBandwidth},(null==o||null===(G=o.customData)||void 0===G?void 0:G.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:null!==(Y=null==o?void 0:o.enableLowInitialPlaylist)&&void 0!==Y&&Y}),debug:(null==o?void 0:o.debugConfig)&&(null==o||null===(z=o.debugConfig)||void 0===z?void 0:z.enable)||!1,nativeTextTracks:"Safari"==e()},0==(null==o||null===(X=o.customData)||void 0===X?void 0:X.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==o||null===(Q=o.customData)||void 0===Q?void 0:Q.nativeVideoTracks)&&{nativeVideoTracks:!1})),q($,"poster",se),q($,"techOrder",le),q($,"chromecast",{requestCustomDataFn:function(e){var t,i,l=ue(n),r=((null==l?void 0:l.textTracksJson_)||l.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind}),a=function(e,n,t){var o,i,l,r,a,s,u,d,c,v,p=(null==e?void 0:e.contentType)||"video",f={};if(e&&null!=e&&e[p]&&null!=e&&e[p].drmEnabled){var m,g,h,y,b,w,k,S;f.isDrmEnabled=!0;var I=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,E=(null==I?void 0:I.url)||(null==n||null===(g=n.keySystemOptions)||void 0===g||null===(h=g[0])||void 0===h||null===(y=h.options)||void 0===y?void 0:y.serverURL);f.licenseUrl=E;var O=(null==I?void 0:I.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===(S=k.httpRequestHeaders)||void 0===S?void 0:S["X-AxDRM-Message"]);f.licenseToken=O}var D=(null==e||null===(o=e[p])||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType)||"VIDEO";f.contentType=D;var T=null==e||null===(l=e[p])||void 0===l||null===(r=l.gist)||void 0===r?void 0:r.runtime;f.duration=T;var j=null==e||null===(a=e[p])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;f.mediaTitle=j;var C=null==e||null===(u=e[p])||void 0===u||null===(d=u.gist)||void 0===d?void 0:d.videoImageUrl;return f.mediaImage=C,f.subTitles=t,f.DVR=(null==e||null===(c=e[p])||void 0===c||null===(v=c.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(f),f}(ne,e,r);return Zn(Zn({},a),{},{convivaMetaData:Zn({customerKey:(null==o||null===(t=o.convivaConfig)||void 0===t?void 0:t.customerKey)||null,debug:(null==o||null===(i=o.convivaConfig)||void 0===i?void 0:i.debug)||!1},Sn.getData())})},modifyLoadRequestFn:function(e){var t,o,i,l,r,a=ue(n),s=(null==a?void 0:a.currentSource())||{};!(null===(t=ne)||void 0===t||null===(o=t[re])||void 0===o||null===(i=o.streamingInfo)||void 0===i||null===(l=i.videoAssets)||void 0===l?void 0:l.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(r=s.src)&&void 0!==r&&r.includes(".m3u8")&&(e.media.hlsSegmentFormat="fmp4",e.media.hlsVideoSegmentFormat="fmp4");return e}}),$);if(!W.getPlayers()[n]){null!=o&&o.debugConfig&&null!=o&&null!==(Z=o.debugConfig)&&void 0!==Z&&Z.enable&&W.log.level("debug");var ye=W(n,he,function(){var e=K(J.mark(function e(){var t,l,s,u,c,v,y,b,w,k,S,I,E,O,D,T,j,C,P,x,A;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(ye),console.log(W.VERSION),console.log(W.getPlugins()),e.next=5,nn(o,ne);case 5:if(E=null===(t=ne)||void 0===t||null===(l=t[re])||void 0===l||null===(s=l.liveDetails)||void 0===s?void 0:s.startOverTime,ce&&i.resolve(Zn({status:!0,msg:"Player Initialised"},ie?{seriesResponse:ie,response:ne}:{response:ne})),de&&null!=o&&null!==(u=o.dvrConfig)&&void 0!==u&&u.enable&&Xn(n,Zn(Zn({},o),{},{isDvrEnabled:de})),m(n,null==o?void 0:o.analyticsCb,null==o?void 0:o.analyticsEventParams),kn(n,o),/Android/i.test(navigator.userAgent)&&(W.options.vhs.overrideNative=!0),de&&Ge(n,E),!ve||null!=o&&null!==(c=o.customData)&&void 0!==c&&c.disableAds||g(n,ve,ne),O=r(ne,n),console.log(O),null!=o&&o.nearestClusterUrl&&(O=h(O,o.nearestClusterUrl)),!fe){e.next=21;break}return e.next=20,a(n,ne);case 20:O=e.sent;case 21:O?d(n,O):(i.reject({status:!1,msg:"Incompatible / Missing Source",response:ne}),p(n,"Incompatible / Missing Source")),((null===(v=ne)||void 0===v||null===(y=v[re])||void 0===y||null===(b=y.contentDetails)||void 0===b||null===(w=b.closedCaptions)||void 0===w?void 0:w.length)>0||(null===(k=ne)||void 0===k||null===(S=k[re])||void 0===S||null===(I=S.closedCaptions)||void 0===I?void 0:I.length)>0)&&(A=(null===(T=ne)||void 0===T||null===(j=T[re])||void 0===j||null===(C=j.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null===(P=ne)||void 0===P||null===(x=P[re])||void 0===x?void 0:x.closedCaptions),D=A.filter(function(e){return"VTT"===e.format||"WEBVTT"===e.format}),oe(n,D)),null!=o&&o.disableControls?f(n):In(n,Zn(Zn(Zn({},o),he),{},{liveVideo:ce,isDvrEnabled:de,res:ne,sres:ie})),Kn(n,Zn(Zn(Zn({},o),he),{},{liveVideo:ce}),i,{res:ne,sres:ie});case 25:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}())}};function nt(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 tt(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?nt(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):nt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var ot,it=function(e,n){var t=n.resolve,o=n.reject,i=null==e?void 0:e.playerId,l=lt(e);et(i,{res:l},e,{resolve:t,reject:o})},lt=function(e){var n,t,o,i,l,r,a,s,u,d,c,v,p,f=null==e?void 0:e.streamingInfo,m=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,g=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,h=(null==e||null===(o=e.streamingInfo)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.url)||null,b=(null==e||null===(l=e.streamingInfo)||void 0===l?void 0:l.posterUrl)||null,w=(null==e||null===(r=e.streamingInfo)||void 0===r?void 0:r.subtitles)||[],k=(null==e||null===(a=e.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.drmProvider)||null,S=(null==e||null===(u=e.streamingInfo)||void 0===u?void 0:u.macroMap)||[],I=(null==e||null===(d=e.customData)||void 0===d||null===(c=d.ads)||void 0===c?void 0:c.isSSAIEnabled)||!1,E=null==e?void 0:e.token,O=y(E);null==O||O.site;var D=null==O?void 0:O.siteId,T=(null==e||null===(v=e.customData)||void 0===v||null===(p=v.comscore)||void 0===p?void 0:p.video)||null,j=tt(tt({id:"".concat(D,"_external")},!g&&{directPlaybackUrl:null==m?void 0:m.url}),{},{video:tt(tt(tt(tt(tt({drmEnabled:g,streamingInfo:tt(tt({videoAssets:tt(tt({},k&&{drmProvider:k}),{},{widevine:null==m?void 0:m.widevine,fairPlay:null==m?void 0:m.fairPlay,playReady:null==m?void 0:m.playReady})},(null==f?void 0:f.isDvrEnabled)&&{isLiveStream:!0}),(null==T?void 0:T.isLiveStream)&&{isLiveStream:null==T?void 0:T.isLiveStream})},I&&{isSSAIEnabled:I}),{},{metadata:S,liveDetails:{isDvrEnabled:null==f?void 0:f.isDvrEnabled},gist:tt(tt(tt({},b&&{videoImageUrl:b}),(null==T?void 0:T.videoId)&&{id:null==T?void 0:T.videoId}),(null==T?void 0:T.videoTitle)&&{title:null==T?void 0:T.videoTitle}),contentDetails:tt({},(null==w?void 0:w.length)>0&&{closedCaptions:Le(w)})},(null==T?void 0:T.runtime)&&{runtime:null==T?void 0:T.runtime}),(null==T?void 0:T.publishDate)&&{publishDate:null==T?void 0:T.publishDate}),(null==T?void 0:T.platform)&&{platform:null==T?void 0:T.platform}),(null==T?void 0:T.series)&&{series:null==T?void 0:T.series}),ads:{preRoll:{adTags:{web:tt(tt({},h&&{active:!0}),h&&{url:h})}}}});return T&&(null!=T&&T.isDvrEnabled&&(j.video.liveDetails=tt(tt({},j.video.liveDetails),{},{isDvrEnabled:null==T?void 0:T.isDvrEnabled})),null!=T&&T.metadata&&(j.video.metadata=[].concat(Le(j.video.metadata),Le(null==T?void 0:T.metadata)))),j},rt=null,at=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),o=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),i=o>0&&t>4?o:0,l=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),o=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(o-=1),o<0&&(t-=1),t}(new Date,new Date(n));return[l>0&&i>0?l:0,i,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},st=function(e){var n,t=Me(e,8),o=t[0],i=t[1],l=t[2],r=t[3],a=t[4],s=t[5],u=t[6],d=t[7];n=o>=1?" ".concat(o," Year"):i>=1?" ".concat(i," month"):l>=1?" ".concat(l," week"):r>=1?" ".concat(r," day"):a<24&&a>=12?" ".concat(a," hour"):a>0?"".concat(a," hours ").concat(s," minutes ").concat(u," seconds"):s>0?"".concat(s," minutes ").concat(u," seconds"):"".concat(u," seconds"),d.textContent="".concat(n)},ut=(ot={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return ot},set:function(e){ot={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function dt(e,n,t,o){if(e){var i=function(){var e,i,r=null===(e=ut.get())||void 0===e?void 0:e.scheduleStartTimeMs,a=null===(i=ut.get())||void 0===i?void 0:i.scheduleEndTimeMs,s=Date.now();if(s-a>0){var u=document.getElementsByClassName("error-message")[0];return u&&(u.textContent=de("eventEnded")||"Game has ended",o.textContent=""),clearInterval(l),void(null==t||t())}var d=r-s;if(d/1e3<=0)return clearInterval(l),null==n||n([0,0,0,0,0,0,0,o]),void(null==t||t());var c=at(d,r);null==n||n([].concat(Le(c),[o]))};i();var l=setInterval(i,1e3);return l}}var ct=function(e,n,t){var o,i,l,r,a,s,u,d,c=null==n||null===(o=n.response)||void 0===o||null===(i=o.data)||void 0===i?void 0:i.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(r=l.data)||void 0===r?void 0:r.errorMessage)||(null==n?void 0:n.message)||null;ut.set({startDateTime:null==n||null===(a=n.response)||void 0===a||null===(s=a.data)||void 0===s?void 0:s.scheduleStartDate,endDateTime:null==n||null===(u=n.response)||void 0===u||null===(d=u.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,o){var i,l,r=Date.now(),a=null===(i=ut.get())||void 0===i?void 0:i.scheduleStartTimeMs,s=null===(l=ut.get())||void 0===l?void 0:l.scheduleEndTimeMs,u=function(e,n,t,o){var i;e<0?i=de("eventNotStarted")||o||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(i=de("eventEnded")||o||"Game has ended");return i||o}(r-a,r-s,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(u));var c=document.getElementsByClassName("error-timer-message")[0];c&&dt(Math.abs(a),st,o,c)}else{var v=document.getElementById(e).parentElement;if(v){var p=document.createElement("div");p.className="error-container";var f=document.createElement("div");f.className="error-message";var m=document.createElement("div");m.className="error-timer-message",f.textContent="".concat(u),p.appendChild(f),p.appendChild(m),v.append(p),dt(Math.abs(a),st,o,m)}}}(e,c,v,t)};function vt(e,n){var t=n.scheduleEndDate,o=n.scheduleStartDate;ut.set({startDateTime:o,endDateTime:t}),rt&&clearInterval(rt),rt=setInterval(function(){var n,t=Date.now(),o=null===(n=ut.get())||void 0===n?void 0:n.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",o),o&&t>o){var i;console.log("Game ended");var l=ue(e);if(b(e)&&l){var r;l.dispose(),console.log("Player disposed");var a=null===(r=document.getElementsByClassName("vl-container"))||void 0===r?void 0:r[0],s=document.createElement("video");s.id=e,s.className="video-js",s.style.width="100%",s.style.height="100%",a&&a.appendChild(s)}var u=de("eventEnded")||"Game has ended",d=null===(i=document.getElementsByClassName("error-container"))||void 0===i?void 0:i[0];if(d){var c=d.querySelector(".error-message");c&&(c.textContent=u)}else{var v=document.getElementById(e),p=null==v?void 0:v.parentElement;if(p){(d=document.createElement("div")).className="error-container";var f=document.createElement("div");f.className="error-message",f.textContent=u,d.appendChild(f),p.append(d)}}clearInterval(rt)}},1e3)}function pt(e,n){return ft.apply(this,arguments)}function ft(){return ft=K(J.mark(function e(n,t){var o,i,l,r,a,s,u,d,c;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,a=null==n?void 0:n.videoId,s=null==n?void 0:n.playerId,u=!(null==n||!n.anonymousId),e.next=6,I();case 6:d=e.sent,c=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),w(a,d,c).then(function(e){var t,o,i,c,v,p,f,m,g,h;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.contentType,me(null==e?void 0:e.data);var y=null==e||null===(c=e.data)||void 0===c||null===(v=c.video)||void 0===v||null===(p=v.gist)||void 0===p?void 0:p.scheduleEndDate,b=null==e||null===(f=e.data)||void 0===f||null===(m=f.video)||void 0===m||null===(g=m.gist)||void 0===g?void 0:g.scheduleStartDate;vt(s,{scheduleEndDate:y,scheduleStartDate:b});var w,S=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(h=n.watchHistory)&&void 0!==h&&h.enable&&!u)if((null===(w=n.watchHistory)||void 0===w?void 0:w.saveOffline)||!1){var I,E,O,D=An((null===(I=n.watchHistory)||void 0===I?void 0:I.profileId)||"",a,null==n?void 0:n.siteOwner);if(D&&D.length)n.watchHistoryResumeTime=(null===(E=D[0])||void 0===E?void 0:E.watchedTime)||null,n.watchedPercentage=(null===(O=D[0])||void 0===O?void 0:O.watchedPercentage)||null;S.contentType="video",et(s,{res:S},n,{resolve:l,reject:r})}else k(a,d).then(function(e){var t,o,i,l,r,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(i=window)||void 0===i||null===(l=i.watchHistory)||void 0===l||l.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,S.contentType="video"}).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))}).finally(function(){et(s,{res:S},n,{resolve:l,reject:r})});else et(s,{res:S},n,{resolve:l,reject:r})}).catch(function(e){var t,o,i=(null==n||null===(t=n.event)||void 0===t?void 0:t.showScheduleTimer)||!1,l=(null==n||null===(o=n.event)||void 0===o?void 0:o.onCountdownComplete)||null;i&&ct(s,e,l),S(e,s,r,a)});case 9:case"end":return e.stop()}},e)})),ft.apply(this,arguments)}function mt(e,n){return gt.apply(this,arguments)}function gt(){return gt=K(J.mark(function e(n,t){var o,i,l,r,a,s,u,d;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=t.resolve,r=t.reject,e.next=3,I();case 3:a=e.sent,s=null==n?void 0:n.playerId,u=null==n?void 0:n.epg,d=!1===(null==n||null===(o=n.customData)||void 0===o||null===(i=o.ads)||void 0===i?void 0:i.isSSAIEnabled),E(u,a,d).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==u?void 0:u.channelId,et(s,{res:t},n,{resolve:l,reject:r})}).catch(function(e){S(e,s,r,videoId)});case 8:case"end":return e.stop()}},e)})),gt.apply(this,arguments)}function ht(e,n){return yt.apply(this,arguments)}function yt(){return yt=K(J.mark(function e(n,t){var o,i,l,r,a,s,u;return J.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=t.resolve,l=t.reject,e.next=3,I();case 3:r=e.sent,a=null==n?void 0:n.playerId,s=sessionStorage.getItem("season-idx")||0,be.set(parseInt(s)),u=null==n||null===(o=n.series)||void 0===o?void 0:o.id,O(u,r).then(function(e){var t,o,s,d=e.data,c=e.data.seasons;we(c);var v=videoId||(null==c||null===(t=c[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(s=o[0])||void 0===s?void 0:s.id);D(u,r),w(v,r).then(function(e){var t,o,r;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType,me(e.data),et(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:i,reject:l})}).catch(function(e){S(e,a,l,videoId)})}).catch(function(e){S(e,a,l)});case 9:case"end":return e.stop()}},e)})),yt.apply(this,arguments)}var bt,wt=function(e){var n=e.enable,t=e.site,o=e.sseBaseUrl,i=e.sseEndpoint;if(n){var l=function(e){var n=e.site,t=e.sseBaseUrl,o=e.sseEndpoint;return _e({site:n,sseBaseUrl:t,getToken:I,sseEndpoint:o,onOpen:function(e){var n=e.userId,t=e.endpoint;console.log("SSE Connected:",n,t)},onMessage:function(e){var n,t,o,i,l,r,a,s,u,d;if(console.log("SSE Message:",e),(null===(n=pe())||void 0===n||null===(t=n.video)||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.id)===(null==e||null===(i=e.payload)||void 0===i?void 0:i.id)&&"GAME_STATE_CHANGE"===(null==e?void 0:e.notificationType)){var c=1e3*(null==e||null===(l=e.payload)||void 0===l||null===(r=l.states)||void 0===r||null===(a=r.live)||void 0===a?void 0:a.startDateTime),v=1e3*(null==e||null===(s=e.payload)||void 0===s||null===(u=s.states)||void 0===u||null===(d=u.end)||void 0===d?void 0:d.endDateTime);c&&v&&(console.log("Setting schedule timer",c,v),ut.set({startDateTime:c,endDateTime:v}))}},onReconnectAttempt:function(e){console.log("Reconnect attempt:",e)},onHeartbeatTimeout:function(e){var n=e.elapsed;console.warn("Heartbeat timeout after:",n)},onTokenInvalid:function(e){console.error("Invalid token:",e),window.location.href="/login"},onError:function(e,n){console.error("SSE Error:",e,n)},onClose:function(){console.log("SSE Closed")}})}({site:t,sseBaseUrl:o,sseEndpoint:i});return l._sseBaseUrl=o,l._site=t,l._sseEndpoint=i,l}};function kt(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 St(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?kt(Object(t),!0).forEach(function(n){q(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):kt(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function It(){return{loadVideoInstantly:T,onTimeUpdate:Y,getVideoDuration:z,onVideoEnded:X,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=K(J.mark(function n(t,o){var i,l,r,a,s,u,d,c,v,p,f,m,g,h,y,k,I,E,O,D,T,j,C,P,x,A,R,N,L,M;return J.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!b(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(I=(null==e?void 0:e.videoSourceUrl)||!1,E=null==e?void 0:e.asat,O=(null==e||null===(i=e.epg)||void 0===i?void 0:i.enable)||!1,D=null==e?void 0:e.videoId,T=(null==e||null===(l=e.series)||void 0===l?void 0:l.enable)||!1,j=(null==e?void 0:e.streamingInfo)||!1,window.videoId=D,C=null==e?void 0:e.token,!U(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",C),H().set(null==e?void 0:e.refreshToken),C&&!F(C)){n.next=16;break}return o({status:!1,msg:"".concat(C?"Token is expired !":"Missing Authorization Token"),response:{token:C}}),n.abrupt("return");case 16:bt=JSON.parse(atob(C.split(".")[1]));case 17:return window.siteName=null===(r=bt)||void 0===r?void 0:r.site,window.siteId=null===(a=bt)||void 0===a?void 0:a.siteId,e.isAnonymousUser=!(null===(s=bt)||void 0===s||!s.anonymousId),e.siteOwner=(null===(u=bt)||void 0===u?void 0:u.site)||null,e.userId=(null===(d=bt)||void 0===d?void 0:d.userId)||null,window.sessionStorage.setItem("uid",null===(c=bt)||void 0===c?void 0:c.userId),window.watchHistory=e.watchHistory||null,P=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(v=e.series)&&void 0!==v&&v.enable?null:null==e?void 0:e.chromecastReceiverId,x=(null==e||null===(p=e.analytics)||void 0===p?void 0:p.gaId)||null,(A=null==e?void 0:e.errors)&&(window.customErrors=A),window.customData=null==e?void 0:e.customData,ce(null==e||null===(f=e.customData)||void 0===f?void 0:f.localisation),V.set(e.apiBaseUrl),null!=e&&e.skin&&!se(e.skin)||(e.skin="VL_ONE"),n.next=35,Qe(e);case 35:Mn.setConfig(e),x&&Be("https://www.googletagmanager.com/gtag/js?id=".concat(x)).then(function(){return G(x)}).catch(function(e){}),(R=null===(m=document)||void 0===m?void 0:m.getElementById("".concat(P)))&&R.addEventListener("contextmenu",function(e){return e.preventDefault()}),(N=wt({enable:null==e||null===(g=e.sse)||void 0===g?void 0:g.enable,site:null==e||null===(h=e.sse)||void 0===h?void 0:h.siteName,sseBaseUrl:null==e||null===(y=e.sse)||void 0===y?void 0:y.sseBaseUrl,sseEndpoint:null==e||null===(k=e.sse)||void 0===k?void 0:k.sseEndpoint}))&&!N.isConnectionActive()&&N.connect(),I?(M={directPlaybackUrl:I,id:L="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},E?w(L,C).then(function(n){var i=(null==n?void 0:n.data)||{};et(P,{res:St(St({},i),M)},e,{resolve:t,reject:o})}).catch(function(e){S(e,P,o,L)}):et(P,{res:M},e,{resolve:t,reject:o})):j?it(e,{resolve:t,reject:o}):T?ht(e,{resolve:t,reject:o}):O?mt(e,{resolve:t,reject:o}):pt(e,{resolve:t,reject:o});case 42:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:le,skip:j,getPlayer:ue,play:C,pause:P,detectBrowser:e,rewind:x,loadVideo:d,seekToTimeStamp:Q,isPlayerInitialised:b,load:A,authenticateLC:R,dispose:N,enableCaptions:ie,disableCaptions:te,getCaptions:ne,playSelectedResolution:re,getSource:r,setVolume:Ue,getVolume:He,disableControls:f,setPlaybackSpeed:$,getEntitlementData:L,adsQueuePointManager:M,getSsaiEvents:_,playerEvents:Z,onReplay:ee,isBehindLive:B}}export{It as V,Jn as i,Yn as r};
package/esm/index.js CHANGED
@@ -1 +1 @@
1
- import"video.js/dist/video-js.min.css";import"./generic-7505da7f.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-0ffc31e8.js";import"./util-a420b997.js";import"./captions-78bd2908.js";import"./resolution-62be852a.js";import"./skin-65765793.js";import"./localisation-0bf399a1.js";import"./player_instance-34118a5b.js";import"axios";import"md5";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./icons-37daa6b3.js";import"./helper-d52dff3c.js";import"@viewlift/sse";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
1
+ import"video.js/dist/video-js.min.css";import"./generic-7505da7f.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"video.js";export{V as default}from"./index-3860a02a.js";import"./util-a420b997.js";import"./captions-78bd2908.js";import"./resolution-62be852a.js";import"./skin-65765793.js";import"./localisation-0bf399a1.js";import"./player_instance-34118a5b.js";import"axios";import"md5";import"js-cookie";import"./currentVideoInfo-0b234e55.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./icons-37daa6b3.js";import"./helper-d52dff3c.js";import"@viewlift/sse";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/assertThisInitialized";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";
@@ -1 +1 @@
1
- import{h as l,d as e,e as i,o,p as n,q as t,r,s as a}from"./features-f634dd8c.js";import{g as u}from"./player_instance-34118a5b.js";import{a as s,b as d}from"./index-04f28499.js";import{i as v}from"./index-aee2840d.js";import{U as c,e as m,T as p,h as b,i as h}from"./generic-7505da7f.js";import"videojs-contrib-quality-menu";import{i as f,r as y}from"./index-0ffc31e8.js";import{c as g}from"./helper-d52dff3c.js";import{c as j,a as w,b as C}from"./currentVideoInfo-0b234e55.js";import k from"video.js";import{c as T,d as B}from"./icons-37daa6b3.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-62be852a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./skin-65765793.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-7323cf5f.js";import"./util-a420b997.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"md5";import"js-cookie";import"./captions-78bd2908.js";import"@viewlift/comscore/index.js";import"video.js/dist/video-js.min.css";import"@viewlift/sse";function L(e,i){var o=u(e);o&&(o.on("loadeddata",function(){var l,n,t,r,a,d=g(i),m=j();o.qualityLevels()&&o.qualityLevels().length&&function(l){var e=u(l);e&&(null==e||e.qualityMenu,e.qualityMenu({useResolutionLabels:!0}))}(e),!(null!=i&&null!==(l=i.series)&&void 0!==l&&l.enable||null!==(n=window)&&void 0!==n&&null!==(t=n.app_data)&&void 0!==t&&null!==(r=t.appcmsMain)&&void 0!==r&&null!==(a=r.features)&&void 0!==a&&a.auto_play)||null!=i&&i.liveVideo||s(e,i),null!=i&&i.liveVideo||c()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||v(e),d&&m&&m.length?f(e):y()}),o.one("play",function(){var i,o,n,t;null!==(i=window)&&void 0!==i&&null!==(o=i.customData)&&void 0!==o&&o.iframeOverlayUrl&&l(e,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}function V(l,s){u(l).addClass("skin_vlone"),L(l,s),function(l,s){var v,c,f,y,j,k,L,V,E,M=u(l),q=(null==s?void 0:s.liveVideo)||!1,x=(null==s||null===(v=s.res)||void 0===v?void 0:v.contentType)||"video",_=(null==s||null===(c=s.res)||void 0===c||null===(f=c[x])||void 0===f?void 0:f.isSSAIEnabled)||!1,A=m(null==s?void 0:s.res,l)||{};A.src;var D=(null==s?void 0:s.skin_settings)||{},I=(null==s||null===(y=s.customData)||void 0===y?void 0:y.ads)||{};if(g(s),q&&!(null!=s&&s.liveui)){var R,O,P=(null==M||null===(R=M.controlBar)||void 0===R||null===(O=R.getChild("LiveDisplay"))||void 0===O?void 0:O.el())||null;P&&(P.onclick=function(){try{var l;null==M||null===(l=M.liveTracker)||void 0===l||l.seekToLiveEdge()}catch(l){console.log(l,"Cannot seek to LE")}})}null!=D&&D.skipBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)&&e(l,"VL_ONE",T());(null!=D&&D.rewindBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)||1==(null==s?void 0:s.liveui))&&i(l,"VL_ONE",B());(null==s||null===(j=s.relatedVideos)||void 0===j||null===(k=j.content)||void 0===k?void 0:k.length)>0&&o(l,null==s?void 0:s.relatedVideos);null!=s&&null!==(L=s.series)&&void 0!==L&&L.enable&&n(l,s);(null==s||null===(V=s.streams)||void 0===V?void 0:V.length)>1&&t(l,null==s?void 0:s.streams);if(d(l,s),p(l,s),"MEDIA_TAILOR"==(null==I?void 0:I.vodAdSticherProvider)&&null!=I&&I.vodAdClientSideTracking&&_)if(q)b(l);else{var S,H=null;if(null!=s&&null!==(S=s.series)&&void 0!==S&&S.enable){var N,U,$,z,G,J=null===(N=w())||void 0===N||null===(U=N.video)||void 0===U||null===($=U.gist)||void 0===$?void 0:$.id,K=C(),Y=(null==K?void 0:K.get(J))||{t:0,p:0},F=Y.t,Q=Y.p;"function"==typeof(null===(z=window)||void 0===z||null===(G=z.watchHistory)||void 0===G?void 0:G.cb)&&window.watchHistory.cb({watchedTime:F}),Q<95&&(H=F)}else{var W=s.watchHistoryResumeTime;s.watchedPercentage<95&&(H=W)}h(l,H)}null!=s&&s.isDvrEnabled&&null!=s&&null!==(E=s.dvrConfig)&&void 0!==E&&E.enable&&(r(l,s),a(l,s))}(l,s),E(l,s),function(l){var e,i,o,n=u(l),t=null;if(!n)return;var r=n.controlBar.getChild("VolumePanel"),a=null===(e=r.getChild("MuteToggle"))||void 0===e?void 0:e.el(),s=null==r||null===(i=r.el())||void 0===i?void 0:i.querySelector(".vjs-volume-bar"),d=null==r||null===(o=r.el())||void 0===o?void 0:o.querySelector(".vjs-volume-level");if(!r||!s||!d)return;function v(l){l.preventDefault(),t&&(clearTimeout(t),t=null),m(p(l.touches[0]))}function c(l){l.preventDefault(),m(p(l.changedTouches[0])),t=setTimeout(function(){r.el().classList.remove("vjs-hover")},2e3)}function m(l){var e=Math.min(Math.max(l,0),100);d.style.height=e+"%",s.setAttribute("aria-valuenow",e),s.setAttribute("aria-valuetext",e+"%"),n.volume(e/100)}function p(l){var e=s.getBoundingClientRect(),i=l.clientY-e.top,o=e.height;return 100-Math.min(Math.max(i/o*100,0),100)}a.addEventListener("touchend",function(){null!=r&&r.el()&&(r.el().classList.toggle("vjs-hover"),n.muted(!1),t&&(clearTimeout(t),t=null),t=setTimeout(function(){r.el().classList.remove("vjs-hover")},2e3))}),s.addEventListener("touchmove",v,{passive:!1}),s.addEventListener("touchstart",v,{passive:!1}),s.addEventListener("touchend",c,{passive:!1})}(l)}var E=function(l,e){var i,o,n,t,r,a,s,d,v,c,m,p,b=u(l),h=(null==e?void 0:e.theme)||{},f=k.dom.$(".vjs-play-progress"),y=k.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");y&&(y.style.color="".concat(null===(i=window)||void 0===i||null===(o=i.app_data)||void 0===o||null===(n=o.appcmsMain)||void 0===n||null===(t=n.brand)||void 0===t||null===(r=t.cta)||void 0===r||null===(a=r.primary)||void 0===a?void 0:a.backgroundColor)),f&&(f.style.background="".concat(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(v=d.appcmsMain)||void 0===v||null===(c=v.brand)||void 0===c||null===(m=c.cta)||void 0===m||null===(p=m.primary)||void 0===p?void 0:p.backgroundColor));var g=b.getChild("BigPlayButton")||null;(null==h?void 0:h.progressBarColor)&&f&&(f.style.background=h.progressBarColor),(null==h?void 0:h.playButtonBackgroundColor)&&g&&(g.el().style.background=h.playButtonBackgroundColor),(null==h?void 0:h.playButtonColor)&&y&&(y.style.color=h.playButtonColor),(null==h?void 0:h.playButtonType)&&("square"==(null==h?void 0:h.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{V as initialiseSkin};
1
+ import{h as l,d as e,e as i,o,p as n,q as t,r,s as a}from"./features-f634dd8c.js";import{g as u}from"./player_instance-34118a5b.js";import{a as s,b as d}from"./index-04f28499.js";import{i as v}from"./index-aee2840d.js";import{U as c,e as m,T as p,h as b,i as h}from"./generic-7505da7f.js";import"videojs-contrib-quality-menu";import{i as f,r as y}from"./index-3860a02a.js";import{c as g}from"./helper-d52dff3c.js";import{c as j,a as w,b as C}from"./currentVideoInfo-0b234e55.js";import k from"video.js";import{c as T,d as B}from"./icons-37daa6b3.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./resolution-62be852a.js";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/assertThisInitialized";import"./skin-65765793.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-7323cf5f.js";import"./util-a420b997.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/slicedToArray";import"axios";import"md5";import"js-cookie";import"./captions-78bd2908.js";import"@viewlift/comscore/index.js";import"video.js/dist/video-js.min.css";import"@viewlift/sse";function L(e,i){var o=u(e);o&&(o.on("loadeddata",function(){var l,n,t,r,a,d=g(i),m=j();o.qualityLevels()&&o.qualityLevels().length&&function(l){var e=u(l);e&&(null==e||e.qualityMenu,e.qualityMenu({useResolutionLabels:!0}))}(e),!(null!=i&&null!==(l=i.series)&&void 0!==l&&l.enable||null!==(n=window)&&void 0!==n&&null!==(t=n.app_data)&&void 0!==t&&null!==(r=t.appcmsMain)&&void 0!==r&&null!==(a=r.features)&&void 0!==a&&a.auto_play)||null!=i&&i.liveVideo||s(e,i),null!=i&&i.liveVideo||c()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===siteId||"cea398b9-09ab-4331-958f-8c3d6a356b88"===siteId||v(e),d&&m&&m.length?f(e):y()}),o.one("play",function(){var i,o,n,t;null!==(i=window)&&void 0!==i&&null!==(o=i.customData)&&void 0!==o&&o.iframeOverlayUrl&&l(e,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}function V(l,s){u(l).addClass("skin_vlone"),L(l,s),function(l,s){var v,c,f,y,j,k,L,V,E,M=u(l),q=(null==s?void 0:s.liveVideo)||!1,x=(null==s||null===(v=s.res)||void 0===v?void 0:v.contentType)||"video",_=(null==s||null===(c=s.res)||void 0===c||null===(f=c[x])||void 0===f?void 0:f.isSSAIEnabled)||!1,A=m(null==s?void 0:s.res,l)||{};A.src;var D=(null==s?void 0:s.skin_settings)||{},I=(null==s||null===(y=s.customData)||void 0===y?void 0:y.ads)||{};if(g(s),q&&!(null!=s&&s.liveui)){var R,O,P=(null==M||null===(R=M.controlBar)||void 0===R||null===(O=R.getChild("LiveDisplay"))||void 0===O?void 0:O.el())||null;P&&(P.onclick=function(){try{var l;null==M||null===(l=M.liveTracker)||void 0===l||l.seekToLiveEdge()}catch(l){console.log(l,"Cannot seek to LE")}})}null!=D&&D.skipBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)&&e(l,"VL_ONE",T());(null!=D&&D.rewindBtn&&0==(null==s?void 0:s.liveVideo)&&0==(null==s?void 0:s.liveui)||1==(null==s?void 0:s.liveui))&&i(l,"VL_ONE",B());(null==s||null===(j=s.relatedVideos)||void 0===j||null===(k=j.content)||void 0===k?void 0:k.length)>0&&o(l,null==s?void 0:s.relatedVideos);null!=s&&null!==(L=s.series)&&void 0!==L&&L.enable&&n(l,s);(null==s||null===(V=s.streams)||void 0===V?void 0:V.length)>1&&t(l,null==s?void 0:s.streams);if(d(l,s),p(l,s),"MEDIA_TAILOR"==(null==I?void 0:I.vodAdSticherProvider)&&null!=I&&I.vodAdClientSideTracking&&_)if(q)b(l);else{var S,H=null;if(null!=s&&null!==(S=s.series)&&void 0!==S&&S.enable){var N,U,$,z,G,J=null===(N=w())||void 0===N||null===(U=N.video)||void 0===U||null===($=U.gist)||void 0===$?void 0:$.id,K=C(),Y=(null==K?void 0:K.get(J))||{t:0,p:0},F=Y.t,Q=Y.p;"function"==typeof(null===(z=window)||void 0===z||null===(G=z.watchHistory)||void 0===G?void 0:G.cb)&&window.watchHistory.cb({watchedTime:F}),Q<95&&(H=F)}else{var W=s.watchHistoryResumeTime;s.watchedPercentage<95&&(H=W)}h(l,H)}null!=s&&s.isDvrEnabled&&null!=s&&null!==(E=s.dvrConfig)&&void 0!==E&&E.enable&&(r(l,s),a(l,s))}(l,s),E(l,s),function(l){var e,i,o,n=u(l),t=null;if(!n)return;var r=n.controlBar.getChild("VolumePanel"),a=null===(e=r.getChild("MuteToggle"))||void 0===e?void 0:e.el(),s=null==r||null===(i=r.el())||void 0===i?void 0:i.querySelector(".vjs-volume-bar"),d=null==r||null===(o=r.el())||void 0===o?void 0:o.querySelector(".vjs-volume-level");if(!r||!s||!d)return;function v(l){l.preventDefault(),t&&(clearTimeout(t),t=null),m(p(l.touches[0]))}function c(l){l.preventDefault(),m(p(l.changedTouches[0])),t=setTimeout(function(){r.el().classList.remove("vjs-hover")},2e3)}function m(l){var e=Math.min(Math.max(l,0),100);d.style.height=e+"%",s.setAttribute("aria-valuenow",e),s.setAttribute("aria-valuetext",e+"%"),n.volume(e/100)}function p(l){var e=s.getBoundingClientRect(),i=l.clientY-e.top,o=e.height;return 100-Math.min(Math.max(i/o*100,0),100)}a.addEventListener("touchend",function(){null!=r&&r.el()&&(r.el().classList.toggle("vjs-hover"),n.muted(!1),t&&(clearTimeout(t),t=null),t=setTimeout(function(){r.el().classList.remove("vjs-hover")},2e3))}),s.addEventListener("touchmove",v,{passive:!1}),s.addEventListener("touchstart",v,{passive:!1}),s.addEventListener("touchend",c,{passive:!1})}(l)}var E=function(l,e){var i,o,n,t,r,a,s,d,v,c,m,p,b=u(l),h=(null==e?void 0:e.theme)||{},f=k.dom.$(".vjs-play-progress"),y=k.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");y&&(y.style.color="".concat(null===(i=window)||void 0===i||null===(o=i.app_data)||void 0===o||null===(n=o.appcmsMain)||void 0===n||null===(t=n.brand)||void 0===t||null===(r=t.cta)||void 0===r||null===(a=r.primary)||void 0===a?void 0:a.backgroundColor)),f&&(f.style.background="".concat(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(v=d.appcmsMain)||void 0===v||null===(c=v.brand)||void 0===c||null===(m=c.cta)||void 0===m||null===(p=m.primary)||void 0===p?void 0:p.backgroundColor));var g=b.getChild("BigPlayButton")||null;(null==h?void 0:h.progressBarColor)&&f&&(f.style.background=h.progressBarColor),(null==h?void 0:h.playButtonBackgroundColor)&&g&&(g.el().style.background=h.playButtonBackgroundColor),(null==h?void 0:h.playButtonColor)&&y&&(y.style.color=h.playButtonColor),(null==h?void 0:h.playButtonType)&&("square"==(null==h?void 0:h.playButtonType)?g.el().style.borderRadius=".3em":g.el().style.borderRadius="1.3em")};export{V as initialiseSkin};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viewlift/player-backup",
3
- "version": "2.0.259-backup",
3
+ "version": "2.0.260-backup",
4
4
  "main": "dist/bundle.cjs.js",
5
5
  "types": "dist/@viewlift/player/esm/index.d.ts",
6
6
  "amdName": "_playerCore",
@@ -1 +0,0 @@
1
- "use strict";var e,i=require("./currentVideoInfo-5802821b.js"),t=require("./generic-743174bb.js"),n=require("./util-233dec09.js"),o=require("./skin-eeec7a85.js"),r=require("./player_instance-fcf6a8fb.js"),u=0,d=0,c=function e(n,r,u,c){d=n,n>u.length-1||(i.setVideoIdx(d+1),t.load(r,u[n].id).then(function(e){o.highlightVideo(d,r),d++,s(e)}).catch(function(i){s(i),setTimeout(function(){o.highlightVideo(d,r),d++,e(d,r,u)},5e3)}))},s=function(i){e&&e(i)};exports.autoPlayNext=function(h){clearTimeout(u);var l=null==h?void 0:h.content;e=null==h?void 0:h.cb;var a=h.playerId;n.onVideoEnded(a,function(){var e=r.getPlayer(a);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>l.length-1||(i.setVideoIdx(d+1),t.load(a,l[d].id).then(function(e){o.highlightVideo(d,a),i.setCurrentVideo(e.response),d++,s(e)}).catch(function(e){s(e),o.highlightVideo(d,a),d++,u=setTimeout(function(){t.isPaused(a)&&c(d,a,l)},5e3)})))})},exports.switchToNext=c;
@@ -1 +0,0 @@
1
- "use strict";var e,i=require("./currentVideoInfo-5802821b.js"),t=require("./generic-29d5b2ec.js"),n=require("./util-fbe3d806.js"),o=require("./skin-eeec7a85.js"),r=require("./player_instance-fcf6a8fb.js"),u=0,d=0,c=function e(n,r,u,c){d=n,n>u.length-1||(i.setVideoIdx(d+1),t.load(r,u[n].id).then(function(e){o.highlightVideo(d,r),d++,s(e)}).catch(function(i){s(i),setTimeout(function(){o.highlightVideo(d,r),d++,e(d,r,u)},5e3)}))},s=function(i){e&&e(i)};exports.autoPlayNext=function(h){clearTimeout(u);var l=null==h?void 0:h.content;e=null==h?void 0:h.cb;var a=h.playerId;n.onVideoEnded(a,function(){var e=r.getPlayer(a);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>l.length-1||(i.setVideoIdx(d+1),t.load(a,l[d].id).then(function(e){o.highlightVideo(d,a),i.setCurrentVideo(e.response),d++,s(e)}).catch(function(e){s(e),o.highlightVideo(d,a),d++,u=setTimeout(function(){t.isPaused(a)&&c(d,a,l)},5e3)})))})},exports.switchToNext=c;
@@ -1 +0,0 @@
1
- "use strict";var e,i=require("./currentVideoInfo-5802821b.js"),t=require("./generic-939a3e97.js"),n=require("./util-4769ed5b.js"),o=require("./skin-eeec7a85.js"),r=require("./player_instance-fcf6a8fb.js"),u=0,d=0,c=function e(n,r,u,c){d=n,n>u.length-1||(i.setVideoIdx(d+1),t.load(r,u[n].id).then(function(e){o.highlightVideo(d,r),d++,s(e)}).catch(function(i){s(i),setTimeout(function(){o.highlightVideo(d,r),d++,e(d,r,u)},5e3)}))},s=function(i){e&&e(i)};exports.autoPlayNext=function(h){clearTimeout(u);var l=null==h?void 0:h.content;e=null==h?void 0:h.cb;var a=h.playerId;n.onVideoEnded(a,function(){var e=r.getPlayer(a);0!==(null==e?void 0:e.currentTime())&&((d=i.getVideoIdx())>l.length-1||(i.setVideoIdx(d+1),t.load(a,l[d].id).then(function(e){o.highlightVideo(d,a),i.setCurrentVideo(e.response),d++,s(e)}).catch(function(e){s(e),o.highlightVideo(d,a),d++,u=setTimeout(function(){t.isPaused(a)&&c(d,a,l)},5e3)})))})},exports.switchToNext=c;
@@ -1 +0,0 @@
1
- "use strict";var e,i=require("./generic-29417780.js"),t=require("./util-ef2cd61e.js"),n=require("./skin-3544db58.js"),o=0,u=0,d=function e(t,o,d,c){u=t,t>d.length-1||(i.setVideoIdx(u+1),i.load(o,d[t].id).then(function(e){n.highlightVideo(u,o),u++,r(e)}).catch(function(i){r(i),setTimeout(function(){n.highlightVideo(u,o),u++,e(u,o,d)},5e3)}))},r=function(i){e&&e(i)};exports.autoPlayNext=function(c){clearTimeout(o);var h=null==c?void 0:c.content;e=null==c?void 0:c.cb;var l=c.playerId;t.onVideoEnded(l,function(){var e=n.getPlayer(l);0!==(null==e?void 0:e.currentTime())&&((u=i.getVideoIdx())>h.length-1||(i.setVideoIdx(u+1),i.load(l,h[u].id).then(function(e){n.highlightVideo(u,l),i.setCurrentVideo(e.response),u++,r(e)}).catch(function(e){r(e),n.highlightVideo(u,l),u++,o=setTimeout(function(){i.isPaused(l)&&d(u,l,h)},5e3)})))})},exports.switchToNext=d;
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-29417780.js"),s=require("./renditions-fed22c12.js"),d=require("./skin-3544db58.js"),c=require("./localisation-56e0a999.js");function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function h(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?u(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-be714e97.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=d.getPlayer(e).el(),r=0,n=d.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-25acee8c.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-ec232dbd.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-ee1f4e87.js")}).then(function(n){var o=n.default,l=d.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=d.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-8b12d044.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-e46c9615.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-8bd07d22.js")}).then(function(n){var o=n.seriesModule,l=d.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},c=0;c<a.length;c++)s(c)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-a532b003.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-7d183e67.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-70f8857a.js")}).then(function(r){var n,o,l,a,s=r.default,c=d.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),c&&c.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},c.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=d.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=c.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-239532a4.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-642f00ed.js")}).then(function(r){var n=r.default,o=d.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})};
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-939a3e97.js"),s=require("./resolution-9c4872ec.js"),u=require("./skin-eeec7a85.js"),d=require("./localisation-56e0a999.js"),c=require("./player_instance-fcf6a8fb.js");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addBigMuteButton=function(e,t){Promise.resolve().then(function(){return require("./index-7ae433c7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("MuteButton",n),o.addChild("MuteButton",g({playerId:e},t))})},exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-25cabfc0.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=c.getPlayer(e).el(),r=0,n=c.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-ee975960.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-92e2b919.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-10a8c935.js")}).then(function(n){var o=n.default,l=c.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=c.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-d6f8e3b6.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-v2-50cbd77b.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=c.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-ab2fb794.js")}).then(function(n){var o=n.seriesModule,l=c.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},u=0;u<a.length;u++)s(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-693bc5cc.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-8694c212.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-a419af57.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then(function(){return require("./start-begin-btn-5adfa5b7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-2d51c4d2.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-a122278c.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addWatchLiveButton=function(e,t){Promise.resolve().then(function(){return require("./watch-live-btn-1c5d2e69.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-29d5b2ec.js"),s=require("./resolution-9c4872ec.js"),u=require("./skin-eeec7a85.js"),d=require("./localisation-56e0a999.js"),c=require("./player_instance-fcf6a8fb.js");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addBigMuteButton=function(e,t){Promise.resolve().then(function(){return require("./index-7ae433c7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("MuteButton",n),o.addChild("MuteButton",g({playerId:e},t))})},exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-25cabfc0.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=c.getPlayer(e).el(),r=0,n=c.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-4a67a1c7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-138af789.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-6aebdc8a.js")}).then(function(n){var o=n.default,l=c.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=c.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-a6c55be5.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-v2-50cbd77b.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=c.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-602d1f2c.js")}).then(function(n){var o=n.seriesModule,l=c.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},u=0;u<a.length;u++)s(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-f67606dc.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-0fe2e1c3.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-a419af57.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then(function(){return require("./start-begin-btn-5adfa5b7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-eddf015c.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-dcbb1d54.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addWatchLiveButton=function(e,t){Promise.resolve().then(function(){return require("./watch-live-btn-1c5d2e69.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),l=require("@babel/runtime/helpers/getPrototypeOf"),i=require("video.js"),a=require("./generic-743174bb.js"),s=require("./resolution-9c4872ec.js"),u=require("./skin-eeec7a85.js"),d=require("./localisation-56e0a999.js"),c=require("./player_instance-fcf6a8fb.js");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?h(Object(n),!0).forEach(function(r){e(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function p(e){var t=v();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}exports.addBigMuteButton=function(e,t){Promise.resolve().then(function(){return require("./index-7ae433c7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("MuteButton",n),o.addChild("MuteButton",g({playerId:e},t))})},exports.addCaptionButton=function(e,t){Promise.resolve().then(function(){return require("./caption-settings-25cabfc0.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("captionSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("caption-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("captionSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addDBClickFullScreen=function(e){var t=c.getPlayer(e).el(),r=0,n=c.getPlayer(e);n.addChild("fullscreenToggle");var o=function(){var e,r=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];r&&r.click()};n.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;n.el().addEventListener("touchend",function(){var e=(new Date).getTime(),n=e-r;if(n<300&&n>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}r=e}),window._multiplayer_dbTapHandler=o},exports.addMulticamSelector=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-574b49ad.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addMulticamSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./multicamv2-3f9ffd46.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("streamSelector",n),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},exports.addNextEpisodeButton=function(e,t,r){Promise.resolve().then(function(){return require("./nextEpisodeButton-2ba4aa6f.js")}).then(function(n){var o=n.default,l=c.getPlayer(r);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:r,sres:e,res:t},l.controlBar.children().length-5)})},exports.addOutputtingOverlay=function(e,t){var r=c.getPlayer(e).el(),n=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});r.append(n)},exports.addPlaylistSelector=function(e,t){Promise.resolve().then(function(){return require("./playlist-9710ef70.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("playlistSelector",n),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},exports.addResolutionModule=function(e,t,r){Promise.resolve().then(function(){return require("./resolution-v2-50cbd77b.js")}).then(function(n){var o=n.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=c.getPlayer(e),a=s.getRenditions(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:r,renditions:a},l.controlBar.children().length-4))})},exports.addRewindButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-rewind-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.rewind(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSeriesModule=function(e,t,r){Promise.resolve().then(function(){return require("./series-c3138dfb.js")}).then(function(n){var o=n.seriesModule,l=c.getPlayer(e);i.registerComponent("seriesModule",o),l.getChild("controlBar").addChild("seriesModule",{playerId:e,seriesData:t},l.controlBar.children().length-4);for(var a=document.querySelectorAll(".season-title-sdk"),s=function(e){a[e].addEventListener("click",function(){t[e]&&n.handleSeasonChange(t[e],e,l,r)})},u=0;u<a.length;u++)s(u)})},exports.addSeriesSelectorV2=function(e,t){Promise.resolve().then(function(){return require("./series-v2-04bb2f24.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSeriesSelectorV2_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./series-v2-3578532c.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("seriesV2",n),o.getChild("controlBar").addChild("seriesV2",g({playerId:e},t),o.controlBar.children().length-3)})},exports.addSettingsButtonV2=function(e,t){Promise.resolve().then(function(){return require("./settings-icon-a419af57.js")}).then(function(r){var n,o,l,a,s=r.default,u=c.getPlayer(e);i.registerComponent("settingsSelector",s),null===(n=document)||void 0===n||null===(o=n.getElementById(e))||void 0===o||null===(l=o.getElementsByClassName("settings-selection vjs-control vjs-button"))||void 0===l||null===(a=l[0])||void 0===a||a.remove(),u&&u.getChild("controlBar").addChild("settingsSelector",{playerId:e,options:t},u.controlBar.children().length-3)})},exports.addSkipButton=function(e,o,l){var s=function(o){n(s,o);var i=p(s);function s(e,r){var n;t(this,s);var o=(n=i.call(this,e,r)).el_;o.classList.add("vjs-skip-button");var a=u.parseSvgString(l);return o.append(a),n}return r(s,[{key:"handleClick",value:function(){a.skip(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},exports.addSlowMotion=function(e){var o=function(e){n(i,e);var o=p(i);function i(e,r){var n;t(this,i);var l=(n=o.call(this,e,r)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=d.getLocalisation("slowMoText")||"Slow Mo",n}return r(i,[{key:"handleClick",value:function(){1==l.playbackRate()?(l.playbackRate(.5),this.el().style.background="darkgray"):(l.playbackRate(1),this.el().style.background="none")}}]),i}(i.getComponent("Button"));i.registerComponent("MyButton",o);var l=i(e);l.getChild("controlBar").addChild("myButton",{},2)},exports.addStartFromBeginningButton=function(e,t){Promise.resolve().then(function(){return require("./start-begin-btn-5adfa5b7.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("startFromBeginingButton",n);var l=o.getChild("controlBar").addChild("startFromBeginingButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_}));o.startFromBeginningButton=l})},exports.addVideoSelector=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-9d841083.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addVideoSelector_DEFAULTV2_TEMP=function(e,t){Promise.resolve().then(function(){return require("./videoSelector-29fbaa66.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("videoSelector",n),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},exports.addWatchLiveButton=function(e,t){Promise.resolve().then(function(){return require("./watch-live-btn-1c5d2e69.js")}).then(function(r){var n=r.default,o=c.getPlayer(e);i.registerComponent("watchLiveButton",n);var l=o.getChild("controlBar").addChild("watchLiveButton",g({playerId:e},t),o.controlBar.children().findIndex(function(e){return"PlayToggle"===e.name_})+1);o.watchLiveButton=l})};
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/asyncToGenerator"),n=require("@babel/runtime/regenerator"),i=require("video.js"),o=require("axios"),r=require("./skin-3544db58.js"),l=require("./browser-77c57718.js"),a=require("js-cookie"),d=require("ua-parser-js"),u=require("./captions-07bd3069.js");function s(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function c(e,t){s("event",e,t)}var v={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function p(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?m(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):m(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var f={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=f.version;var w,g=function(e,t){var n,i,r,l,a,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(a=window)&&void 0!==a&&null!==(d=a.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":y.get()+"".concat(null==v?void 0:v.getVideoDetails),params:p({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":f.version},withCredentials:!0})},I=function(e,t){var n,i,r,l;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:y.get()+v.getLinearChannelDetails,params:p(p(p(p(p({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===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},E=function(){var e=t(n.mark(function e(t){var i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return i=e.sent,e.abrupt("return",o({url:y.get()+"".concat(null==v?void 0:v.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:p({},t),params:p({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),T=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},h=function(e){var t=e.videoId;return o({method:"GET",url:y.get()+"".concat(null==v?void 0:v.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},y=(w=null==v?void 0:v.apiBaseUrl,{set:function(e){e&&(w=e)},get:function(){return w}}),_=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},b=null;function D(){return{set:function(e){e&&(b=e)},get:function(){return b}}}var O,F,P,S,R,L,V=function(){var e=t(n.mark(function e(){var t,i,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=D().get(),i=y.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});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)}}(),W=null,C=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!_(t)){e.next=6;break}return W||(W=V().then(function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&D().set(r),o||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){W=null})),e.abrupt("return",W);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),A=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},x=function(e){F=e},N=function(){return F},B=function(){return O},M=function(e){P=e},j=function(e){if(S){var t=S.get(e);M(t+1)}},U=(L=0,{set:function(e){e>=0&&(L=e)},get:function(){return L}});function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function H(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?k(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):k(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var G=0,Y=function(){var e,t,n,i,o,r,l,a=N();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.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 q(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function z(){var e=window.sessionStorage.getItem("uid");return e||(e=q(),window.sessionStorage.setItem("uid",e),e)}function X(){return J.apply(this,arguments)}function J(){return(J=t(n.mark(function e(){var t,i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.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 K(e){return e?String(e):""}window.initialise=function(e){window.sid=q(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,c(r?"FAILED_TO_START":"DROPPED_STREAM",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),c("PLAY",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.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}),t&&t("started_video_playback",{"Video ID":Y(),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 t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&G<4)G++,c("BUFFERING",H({pfm:window.platform,uid:z(),vid:Y(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,c("FIRST_FRAME",H({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),vid:Y()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.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 t,n,i,o,r,l;c("AD_REQUEST",H({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),vid:Y(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.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}),c("AD_IMPRESSION",H({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:z(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:Y()},null===(o=window)||void 0===o||null===(r=o.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 t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(G=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,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 t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(Q(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var Q=function(e,t,n){return e>=t&&e<=n};window.fireEvent=function(){var e=t(n.mark(function e(t){var i,r,l,a,d,u,s,c,m,p,f,w,g,I,E,T,h,_,b,D;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return T=e.sent,h=A(T),_=null==h?void 0:h.site,b=null==h?void 0:h.siteId,e.t0=H,e.t1=H,e.t2=H({aid:_,cid:b,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=z(),e.t5=Y(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?K(t.adPosition):"",e.next=26,X();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(m=t.bufferHealth)&&void 0!==m?m: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==t?void 0:t.duration)&&{duration:t.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(p=window)||void 0===p||null===(f=p.customData)||void 0===f||null===(w=f.beacon)||void 0===w?void 0:w.params,e.t31=(0,e.t0)(e.t29,e.t30),D=[e.t31],o({url:(null===(g=window)||void 0===g||null===(I=g.customData)||void 0===I||null===(E=I.beacon)||void 0===E?void 0:E.url)||y.get()+v.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:D}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){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 Z=function(){var e=U.get();return e>=0?e+1:1},$=function(){var e,t,n,i=B(),o=N(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=U.get(),a=null==i||null===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function ee(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function te(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?ee(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ee(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}window._deviceInfo=d.UAParser(navigator.userAgent);var ne=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},ie=function(e){var t=oe(e,"video.tags",[]),n=oe(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},oe=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},re=function(){var e,t,n,i,o,l,d,u,s,c,v,m,p,f,w,g,I,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",P=(null==D||null===(e=D[F])||void 0===e?void 0:e.metadata)||(null==D||null===(t=D[F])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),S=r.getPlayer(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)),C="linearchannel"===F?null==D||null===(i=D.linearchannel)||void 0===i||null===(o=i.channels)||void 0===o||null===(l=o.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===l||null===(d=l.content)||void 0===d?void 0:d.id:oe(D,"video.gist.id",""),A="linearchannel"===F?null==D||null===(u=D.linearchannel)||void 0===u||null===(s=u.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:oe(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),x=null,N=null;"function"==typeof window.__gpp&&(null===(R=window)||void 0===R||R.__gpp("ping",function(e){x=null==e?void 0:e.gppString,N=null==e?void 0:e.sectionList[0]}));var B=te(te({},le(P)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:ne(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:oe(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==S||null===(m=S.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==S||null===(p=S.options_)||void 0===p?void 0:p.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==O?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:ie(D),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(oe(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+oe(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:a.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:oe(null===(f=window)||void 0===f||null===(w=f.app_data)||void 0===w||null===(g=w.site)||void 0===g?void 0:g.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:oe(null===(I=window)||void 0===I||null===(E=I.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*oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:oe(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:oe(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:oe(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:$(),VIEWLIFT_SEASON_NUMBER:Z(),VIEWLIFT_CONTENT_TAGS:ie(D),VIEWLIFT_GPP_SID:N||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:x||"VIEWLIFT_GPP"},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var M in B){var j=new RegExp(M,"g");_=_.replace(j,B[M])}return _},le=function(e){var t,n,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===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.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.isMobile()?s?d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.tve")||""})):s?d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.tve")||""})),s?d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}):c&&(d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.tve")||u.get("sfid.web.tve")||""})),d=l.isMobile()?te(te({},d),{},{VIEWLIFT_PROF:u.get("prof.mweb")||""}):te(te({},d),{},{VIEWLIFT_PROF:u.get("prof.web")||""})):(d=te(te({},d),{},{VIEWLIFT_SFID:u.get("sfid.dtc")||u.get("sfid.web.dtc")||""}),d=l.isMobile()?te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:u.get("prof.mweb")||""}):te(te({},d),{},{VIEWLIFT_CSID:u.get("csid.web.dtc")||"",VIEWLIFT_PROF:u.get("prof.web")||""})),d=te(te({},d),{},{VIEWLIFT_AFID:u.get("afid")})},ae=function(e,t){var n,i,o,r,a,d,u,s,c,v,m,p,f,w=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[w])||void 0===n?void 0:n.drmEnabled,I=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===(d=e[w])||void 0===d||null===(u=d.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[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===(p=m.streamingInfo)||void 0===p||null===(f=p.videoAssets)||void 0===f?void 0:f.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return ue(E);if(g){var y=se(I,t);return y.src=re(y.src,t,e),y}if("Safari"!==l.detectBrowser()&&h)return de(I);if(T){var _=ue(I);return _.src=re(_.src,t,e),_}if(null!=I&&I.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(I);return b.src=re(b.src,t,e),b}return null},de=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},ue=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},se=function(e,t){var n=e.fairPlayCmaf||e.fairPlay,o=e.widevine,a=e.playReady,d=l.detectBrowser();if(r.getPlayer(t),"Safari"===d){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(n);return ce(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(ce(t),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 ce=function(e){var t=r.getPlayer(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==l.detectBrowser()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},ve=function(e,t){if(Promise.resolve().then(function(){return require("./error-26d5a3c3.js")}).then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}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(t),o.appendChild(r),i.append(o)}}},me=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var pe=!1,fe=function(e,t,n){var i=re(t,e,n),o=r.getPlayer(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,l=r.getPlayer(e);if(null!==l.el_){pe=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),pe&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!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===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var ge=function(e){return!!i.getPlayer("".concat(e))},Ie=function(){var e=t(n.mark(function e(t,i){var o,l,a,d=arguments;return n.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,C();case 3:return l=e.sent,a=r.getPlayer(t),e.abrupt("return",new Promise(function(e,n){I(i,l).then(function(n){var r=null==n?void 0:n.data;window.sid=q(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ae(r,t);x(r),l&&o?(he(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Ee=function(){var e=t(n.mark(function e(t,i,o){var l,a,d,s,c,v;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,C();case 2:return s=e.sent,(B()||null)&&j(i),c=0,v=0,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(a=window)&&void 0!==a&&null!==(d=a.watchHistory)&&void 0!==d&&d.enable&&T(i,s).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),c=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,v=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,n){g(i,s).then(function(i){var o,l,a,d,s,m,p,f,w,g,I=null==i?void 0:i.data,E=(null==I||null===(o=I.video)||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;x(i.data);var T=(null==I||null===(a=I.ads)||void 0===a||null===(d=a.preRoll)||void 0===d||null===(s=d.adTags)||void 0===s||null===(m=s.web)||void 0===m?void 0:m.active)&&(null==I||null===(p=I.ads)||void 0===p||null===(f=p.preRoll)||void 0===f||null===(w=f.adTags)||void 0===w||null===(g=w.web)||void 0===g?void 0:g.url);T&&fe(t,T,I);var h=ae(I,t);if(h){var y,_,b,D,O,F,P,S,R,L,V,W,C,A,N=(null==I||null===(y=I.video)||void 0===y||null===(_=y.gist)||void 0===_?void 0:_.videoImageUrl)||(null==I||null===(b=I.video)||void 0===b||null===(D=b.gist)||void 0===D||null===(O=D.imageGist)||void 0===O?void 0:O.r16x9),B=r.getPlayer(t);if(B.poster(N),he(t,h),B.on("loadstart",function(){E&&e({status:!0,msg:"Video Loaded",response:I})}),B.on("loadeddata",function(){me(),e({status:!0,msg:"Video Loaded",response:I})}),B.one("play",function(){c&&v<95&&setTimeout(function(){B.currentTime(c)},0)}),B.one("error",function(){var e;n({status:!1,msg:(null==B||null===(e=B.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==I||null===(F=I.video)||void 0===F||null===(P=F.contentDetails)||void 0===P||null===(S=P.closedCaptions)||void 0===S?void 0:S.length)>0||(null==I||null===(R=I.video)||void 0===R||null===(L=R.closedCaptions)||void 0===L?void 0:L.length)>0)V=((null==I||null===(W=I.video)||void 0===W||null===(C=W.contentDetails)||void 0===C?void 0:C.closedCaptions)||(null==I||null===(A=I.video)||void 0===A?void 0:A.closedCaptions)).filter(function(e){return"VTT"===e.format}),u.addCaptions(t,V);else u.removeCaptions(t)}else ve(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){ye(e,t,n,i)})}));case 9:case"end":return e.stop()}},e)}));return function(t,n,i){return e.apply(this,arguments)}}(),Te=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()},he=function(e,t){var n=r.getPlayer(e);n&&n.src(t)},ye=function(t,n,i,o){var r,l,a,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);ge(n)&&ve(n,(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(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?we(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):we(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))};exports.authenticateLC=Ie,exports.baseUrlManager=y,exports.clearError=me,exports.createIdxMapping=function(e){S=new Map,e.map(function(e,t){S.set(e.id,t)})},exports.createSeriesWatchMap=function(e,t){var n=new Map;h({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),R=n}).catch(function(e){return console.log(e)})},exports.disableControls=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")},exports.dispose=function(e){var t=r.getPlayer(e);if(Te(),r.clearEventListeners(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.remove()}},exports.getCurrentSeries=B,exports.getCurrentVideo=N,exports.getDecodedToken=A,exports.getEntitlementData=function(e,t,n,i){return o({url:n,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:t},withCredentials:!0})},exports.getEpisodeNumber=$,exports.getLinearChannelDetails=I,exports.getSeasonNumber=Z,exports.getSeriesDetails=function(e,t){var n,i,r=A(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):o({url:y.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},exports.getSeriesWatchHistory=h,exports.getSeriesWatchMap=function(){return R},exports.getSource=ae,exports.getToken=C,exports.getUpdatedClusterSource=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},exports.getUserId=z,exports.getVideoDetails=g,exports.getVideoIdx=function(){return P},exports.getVideoInfo=T,exports.handleError=ve,exports.initialiseAdvertisement=fe,exports.initiateErrorHandling=ye,exports.inititateBeacon=function(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r.getPlayer(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}},exports.isPaused=function(e){return i(e).paused()},exports.isPlayerInitialised=ge,exports.isTokenExpired=_,exports.load=Ee,exports.loadVideo=he,exports.loadVideoInstantly=function(e,t,n){var i=r.getPlayer(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},exports.pause=function(e){i(e).pause()},exports.play=function(e){i(e).play()},exports.refreshTokenManager=D,exports.replaceMacros=re,exports.rewind=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},exports.runGtag=function(e){window.dataLayer=window.dataLayer||[],s("js",new Date),s("config",e)},exports.saveWatchHistory=E,exports.seasonIdxManager=U,exports.setCurrentSeries=function(e){O=e},exports.setCurrentVideo=x,exports.setVideoIdx=M,exports.setVideoIdxById=j,exports.skip=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},exports.token_authentication_enabled=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t};