@viewlift/player-backup 2.0.58-smarttv → 2.0.59-smarttv

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 (47) hide show
  1. package/cjs/autoNextVideo-120cf971.js +1 -0
  2. package/cjs/bundle.css +181 -181
  3. package/cjs/features-c54bc400.js +1 -0
  4. package/cjs/generic-eb762976.js +1 -0
  5. package/cjs/index-cc3636dc.js +1 -0
  6. package/cjs/index-ff713f4f.js +1 -0
  7. package/cjs/index.js +1 -1
  8. package/cjs/multicamv2-e77bb903.js +1 -0
  9. package/cjs/multicamv2-fb5800a9.js +1 -0
  10. package/cjs/nextEpisodeButton-6909498b.js +1 -0
  11. package/cjs/playlist-82003213.js +1 -0
  12. package/cjs/series-27c26852.js +1 -0
  13. package/cjs/series-v2-360c8212.js +1 -0
  14. package/cjs/series-v2-b83ac660.js +1 -0
  15. package/cjs/skin-557760d1.js +1 -0
  16. package/cjs/skin-6319b282.js +1 -0
  17. package/cjs/skin-7fe5d474.js +1 -0
  18. package/cjs/skin-b17e1ce1.js +1 -0
  19. package/cjs/skin-b993c1cf.js +1 -0
  20. package/cjs/skin-d1cb8690.js +1 -0
  21. package/cjs/skin-ef5451f7.js +1 -0
  22. package/cjs/videoSelector-29c78eea.js +1 -0
  23. package/cjs/videoSelector-ea9cbf9f.js +1 -0
  24. package/esm/autoNextVideo-07a370db.js +1 -0
  25. package/esm/bundle.css +181 -181
  26. package/esm/features-8cef1121.js +1 -0
  27. package/esm/generic-ee738b64.js +1 -0
  28. package/esm/index-ddf2d3ea.js +1 -0
  29. package/esm/index-dea74cd1.js +1 -0
  30. package/esm/index.js +1 -1
  31. package/esm/multicamv2-16cacb77.js +1 -0
  32. package/esm/multicamv2-7facfccf.js +1 -0
  33. package/esm/nextEpisodeButton-acdb34b1.js +1 -0
  34. package/esm/playlist-e55365b6.js +1 -0
  35. package/esm/series-5e71497f.js +1 -0
  36. package/esm/series-v2-51c00a2b.js +1 -0
  37. package/esm/series-v2-68fdb003.js +1 -0
  38. package/esm/skin-154be57f.js +1 -0
  39. package/esm/skin-44af7d3b.js +1 -0
  40. package/esm/skin-4d9324ff.js +1 -0
  41. package/esm/skin-8de18b79.js +1 -0
  42. package/esm/skin-a61876d8.js +1 -0
  43. package/esm/skin-aac012c7.js +1 -0
  44. package/esm/skin-bbdea1f7.js +1 -0
  45. package/esm/videoSelector-7c71fb84.js +1 -0
  46. package/esm/videoSelector-872b1dad.js +1 -0
  47. package/package.json +1 -1
package/esm/bundle.css CHANGED
@@ -1,154 +1,5 @@
1
1
 
2
2
 
3
-
4
-
5
- .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
6
- height: 0.7em;
7
- position: absolute;
8
- top: -0.7em;
9
- width: 100%;
10
- }
11
-
12
- .video-js.skin_vlone .vjs-progress-holder.vjs-slider.vjs-slider-horizontal {
13
- height: 100%;
14
- }
15
-
16
- .video-js.skin_vlone .vjs-play-progress:before {
17
- display: none !important;
18
- }
19
-
20
- .video-js.skin_vlone .vjs-progress-control>.vjs-progress-holder.vjs-slider {
21
- margin: 0 !important;
22
-
23
- }
24
-
25
-
26
- .video-js.skin_vlone .vjs-custom-control-spacer {
27
- display: block;
28
- flex: 1 1 auto;
29
- }
30
-
31
- .video-js.skin_vlone .vjs-volume-panel.vjs-volume-panel-vertical{
32
- z-index: 1;
33
- }
34
-
35
-
36
- .video-js.skin_vlone .vjs-control-bar {
37
- height: 40px;
38
- }
39
-
40
- .video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before,
41
- .vjs-button>.vjs-icon-placeholder:before {
42
- position: relative !important;
43
- }
44
- .video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before{
45
- display: flex;
46
- left: 0px;
47
- top: -1px;
48
- }
49
-
50
- .vjs-button>.vjs-icon-placeholder:before {
51
- font-size: 2em !important;
52
- }
53
-
54
- .video-js.skin_vlone .vjs-control {
55
- width: 4.3em;
56
- }
57
-
58
- .vjs-menu-button-popup .vjs-menu {
59
- bottom: 10px !important;
60
- }
61
-
62
-
63
- .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control:hover {
64
- height: 1.3em;
65
- position: absolute;
66
- top: -1.3em;
67
- transition: height 0.3s, top 0.3s;
68
- }
69
-
70
-
71
- .video-js.skin_vlone.vjs-live .vjs-time-control{
72
- display: none !important;
73
- }
74
-
75
- .video-js.skin_vlone .vjs-time-control {
76
- display: block;
77
- }
78
- .video-js.skin_vlone .vjs-remaining-time {
79
- display: none;
80
- }
81
-
82
- .video-js.skin_vlone .vjs-remaining-time.vjs-time-control.vjs-control>span.vjs-remaining-time-display {
83
- line-height: 3.5em;
84
- font-size: 1.1em;
85
- min-width: 4em;
86
- }
87
-
88
- .video-js.skin_vlone .vjs-time-divider > div{
89
- display: flex;
90
- justify-content: center;
91
- }
92
-
93
- .video-js.skin_vlone .vjs-live-control{
94
- align-items: center;
95
- }
96
- .video-js.skin_vlone .vjs-live-display{
97
- height: 2.2em;
98
- display: flex;
99
- align-items: center;
100
- font-family: monospace;
101
- width: 4em;
102
- justify-content: center;
103
- background: red;
104
- margin: 4px 0px 4px 12px;
105
- }
106
-
107
- .video-js.skin_vlone .vjs-time-control {
108
- line-height: 3.5em !important;
109
- font-size: 1.1em !important;
110
- width: min-content !important;
111
- min-width: 1.5em;
112
- padding: 0 !important;
113
- user-select: none;
114
- }
115
-
116
- .video-js.skin_vlone .vjs-current-time.vjs-time-control.vjs-control {
117
- margin-left: 16px !important;
118
- }
119
-
120
-
121
- /* Big play */
122
- .video-js.skin_vlone.vjs-paused .vjs-big-play-button {
123
- width: 80px;
124
- height: 80px;
125
- display: flex;
126
- justify-content: center;
127
- align-items: center;
128
- border: none;
129
- position: absolute;
130
- top: 0;
131
- left: 0;
132
- right: 0;
133
- bottom: 0;
134
- margin: auto;
135
- font-size: 5em;
136
- line-height: 1.3em;
137
- transform: none !important;
138
- border-radius: 1.3em;
139
- }
140
-
141
-
142
- @media(max-width:600px){
143
- .video-js.skin_vlone button.vjs-big-play-button {
144
- width: 50px !important;
145
- height: 50px !important;
146
- font-size: 2.1rem !important;
147
- }
148
- }
149
-
150
-
151
-
152
3
  /*
153
4
  * Styles the icon size and line height for button icons in the SmartTV skin.
154
5
  *
@@ -1708,6 +1559,155 @@ iframe {
1708
1559
 
1709
1560
 
1710
1561
 
1562
+ .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
1563
+ height: 0.7em;
1564
+ position: absolute;
1565
+ top: -0.7em;
1566
+ width: 100%;
1567
+ }
1568
+
1569
+ .video-js.skin_vlone .vjs-progress-holder.vjs-slider.vjs-slider-horizontal {
1570
+ height: 100%;
1571
+ }
1572
+
1573
+ .video-js.skin_vlone .vjs-play-progress:before {
1574
+ display: none !important;
1575
+ }
1576
+
1577
+ .video-js.skin_vlone .vjs-progress-control>.vjs-progress-holder.vjs-slider {
1578
+ margin: 0 !important;
1579
+
1580
+ }
1581
+
1582
+
1583
+ .video-js.skin_vlone .vjs-custom-control-spacer {
1584
+ display: block;
1585
+ flex: 1 1 auto;
1586
+ }
1587
+
1588
+ .video-js.skin_vlone .vjs-volume-panel.vjs-volume-panel-vertical{
1589
+ z-index: 1;
1590
+ }
1591
+
1592
+
1593
+ .video-js.skin_vlone .vjs-control-bar {
1594
+ height: 40px;
1595
+ }
1596
+
1597
+ .video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before,
1598
+ .vjs-button>.vjs-icon-placeholder:before {
1599
+ position: relative !important;
1600
+ }
1601
+ .video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before{
1602
+ display: flex;
1603
+ left: 0px;
1604
+ top: -1px;
1605
+ }
1606
+
1607
+ .vjs-button>.vjs-icon-placeholder:before {
1608
+ font-size: 2em !important;
1609
+ }
1610
+
1611
+ .video-js.skin_vlone .vjs-control {
1612
+ width: 4.3em;
1613
+ }
1614
+
1615
+ .vjs-menu-button-popup .vjs-menu {
1616
+ bottom: 10px !important;
1617
+ }
1618
+
1619
+
1620
+ .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control:hover {
1621
+ height: 1.3em;
1622
+ position: absolute;
1623
+ top: -1.3em;
1624
+ transition: height 0.3s, top 0.3s;
1625
+ }
1626
+
1627
+
1628
+ .video-js.skin_vlone.vjs-live .vjs-time-control{
1629
+ display: none !important;
1630
+ }
1631
+
1632
+ .video-js.skin_vlone .vjs-time-control {
1633
+ display: block;
1634
+ }
1635
+ .video-js.skin_vlone .vjs-remaining-time {
1636
+ display: none;
1637
+ }
1638
+
1639
+ .video-js.skin_vlone .vjs-remaining-time.vjs-time-control.vjs-control>span.vjs-remaining-time-display {
1640
+ line-height: 3.5em;
1641
+ font-size: 1.1em;
1642
+ min-width: 4em;
1643
+ }
1644
+
1645
+ .video-js.skin_vlone .vjs-time-divider > div{
1646
+ display: flex;
1647
+ justify-content: center;
1648
+ }
1649
+
1650
+ .video-js.skin_vlone .vjs-live-control{
1651
+ align-items: center;
1652
+ }
1653
+ .video-js.skin_vlone .vjs-live-display{
1654
+ height: 2.2em;
1655
+ display: flex;
1656
+ align-items: center;
1657
+ font-family: monospace;
1658
+ width: 4em;
1659
+ justify-content: center;
1660
+ background: red;
1661
+ margin: 4px 0px 4px 12px;
1662
+ }
1663
+
1664
+ .video-js.skin_vlone .vjs-time-control {
1665
+ line-height: 3.5em !important;
1666
+ font-size: 1.1em !important;
1667
+ width: min-content !important;
1668
+ min-width: 1.5em;
1669
+ padding: 0 !important;
1670
+ user-select: none;
1671
+ }
1672
+
1673
+ .video-js.skin_vlone .vjs-current-time.vjs-time-control.vjs-control {
1674
+ margin-left: 16px !important;
1675
+ }
1676
+
1677
+
1678
+ /* Big play */
1679
+ .video-js.skin_vlone.vjs-paused .vjs-big-play-button {
1680
+ width: 80px;
1681
+ height: 80px;
1682
+ display: flex;
1683
+ justify-content: center;
1684
+ align-items: center;
1685
+ border: none;
1686
+ position: absolute;
1687
+ top: 0;
1688
+ left: 0;
1689
+ right: 0;
1690
+ bottom: 0;
1691
+ margin: auto;
1692
+ font-size: 5em;
1693
+ line-height: 1.3em;
1694
+ transform: none !important;
1695
+ border-radius: 1.3em;
1696
+ }
1697
+
1698
+
1699
+ @media(max-width:600px){
1700
+ .video-js.skin_vlone button.vjs-big-play-button {
1701
+ width: 50px !important;
1702
+ height: 50px !important;
1703
+ font-size: 2.1rem !important;
1704
+ }
1705
+ }
1706
+
1707
+
1708
+
1709
+
1710
+
1711
1711
  /* CSS for videojs-dvr-seekbar */
1712
1712
 
1713
1713
  .video-js.vjs-dvr-seekbar {
@@ -2024,6 +2024,38 @@ iframe {
2024
2024
  margin-left: 8px;
2025
2025
  }
2026
2026
  }
2027
+ /* a wrapper element that tracks the mouse vertically */
2028
+ .vjs-thumbnail-holder {
2029
+ position: absolute;
2030
+ left: -1000px;
2031
+ }
2032
+
2033
+ /* the thumbnail image itself */
2034
+ .vjs-thumbnail {
2035
+ position: absolute;
2036
+ left: 0;
2037
+ bottom: 1.3em;
2038
+ opacity: 0;
2039
+ transition: opacity .2s ease;
2040
+ -webkit-transition: opacity .2s ease;
2041
+ -moz-transition: opacity .2s ease;
2042
+ -mz-transition: opacity .2s ease;
2043
+ }
2044
+
2045
+ /* fade in the thumbnail when hovering over the progress bar */
2046
+ /* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
2047
+ .vjs-progress-control:hover .vjs-thumbnail,
2048
+ .vjs-progress-control.fake-active .vjs-thumbnail,
2049
+ .vjs-progress-control:active .vjs-thumbnail {
2050
+ opacity: 1;
2051
+ }
2052
+
2053
+ /* ... but hide the thumbnail when hovering directly over it */
2054
+ .vjs-progress-control:hover .vjs-thumbnail:hover,
2055
+ .vjs-progress-control:active .vjs-thumbnail:active {
2056
+ opacity: 0;
2057
+ }
2058
+
2027
2059
  .video-js.vjs-quality-menu {
2028
2060
  display: block;
2029
2061
  }
@@ -2094,38 +2126,6 @@ iframe {
2094
2126
  -webkit-animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
2095
2127
  animation: vjs-spinner-spin 1.1s cubic-bezier(0.6, 0.2, 0, 0.8) infinite;
2096
2128
  }
2097
- /* a wrapper element that tracks the mouse vertically */
2098
- .vjs-thumbnail-holder {
2099
- position: absolute;
2100
- left: -1000px;
2101
- }
2102
-
2103
- /* the thumbnail image itself */
2104
- .vjs-thumbnail {
2105
- position: absolute;
2106
- left: 0;
2107
- bottom: 1.3em;
2108
- opacity: 0;
2109
- transition: opacity .2s ease;
2110
- -webkit-transition: opacity .2s ease;
2111
- -moz-transition: opacity .2s ease;
2112
- -mz-transition: opacity .2s ease;
2113
- }
2114
-
2115
- /* fade in the thumbnail when hovering over the progress bar */
2116
- /* .fake-active is needed for Android only. It's removed on touchend/touchecancel */
2117
- .vjs-progress-control:hover .vjs-thumbnail,
2118
- .vjs-progress-control.fake-active .vjs-thumbnail,
2119
- .vjs-progress-control:active .vjs-thumbnail {
2120
- opacity: 1;
2121
- }
2122
-
2123
- /* ... but hide the thumbnail when hovering directly over it */
2124
- .vjs-progress-control:hover .vjs-thumbnail:hover,
2125
- .vjs-progress-control:active .vjs-thumbnail:active {
2126
- opacity: 0;
2127
- }
2128
-
2129
2129
  .vjs-poster {
2130
2130
  display: inline-block;
2131
2131
  vertical-align: middle;
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/classCallCheck";import n from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import i from"video.js";import{r as a,k as s}from"./generic-ee738b64.js";import{g as c}from"./renditions-53ee066f.js";import{g as d,p as u}from"./skin-86e7e2b5.js";import{g as p}from"./localisation-0bf399a1.js";function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function h(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?m(Object(r),!0).forEach(function(n){e(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function f(e){var t=v();return function(){var n,r=l(e);if(t){var i=l(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return o(this,n)}}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var g=function(e){var o=function(e){r(i,e);var o=f(i);function i(e,n){var r;t(this,i);var l=(r=o.call(this,e,n)).el_;return l.classList.add("vjs-slowmo-button"),l.textContent=p("slowMoText")||"Slow Mo",r}return n(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)},C=function(e,o,l){var s=function(o){r(s,o);var i=f(s);function s(e,n){var r;t(this,s);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-rewind-button");var a=u(l);return o.append(a),r}return n(s,[{key:"handleClick",value:function(){a(e,10)}}]),s}(i.getComponent("Button"));i.registerComponent("MyButton",s),i(e).getChild("controlBar").addChild("myButton",{},1)},y=function(e,o,l){var a=function(o){r(a,o);var i=f(a);function a(e,n){var r;t(this,a);var o=(r=i.call(this,e,n)).el_;o.classList.add("vjs-skip-button");var s=u(l);return o.append(s),r}return n(a,[{key:"handleClick",value:function(){s(e,10)}}]),a}(i.getComponent("Button"));i.registerComponent("MyButton",a),i(e).getChild("controlBar").addChild("myButton",{},1)},B=function(e,t,n){import("./resolution-69172876.js").then(function(r){var o=r.default;document.getElementById(e).getElementsByClassName("container")[0]&&document.getElementById(e).getElementsByClassName("container")[0].remove();var l=d(e),a=c(e);(null==a?void 0:a.length)>0&&(i.registerComponent("resolutionModule",o),l.getChild("controlBar").addChild("resolutionModule",{playerId:e,skin:t,icon:n,renditions:a},l.controlBar.children().length-4))})},b=function(e,t,n){import("./nextEpisodeButton-acdb34b1.js").then(function(r){var o=r.default,l=d(n);i.registerComponent("nextEpisodeButtonModule",o),l.getChild("controlBar").addChild("nextEpisodeButtonModule",{playerId:n,sres:e,res:t},l.controlBar.children().length-5)})},j=function(e,t,n){import("./series-5e71497f.js").then(function(r){var o=r.seriesModule,l=d(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]&&r.handleSeasonChange(t[e],e,l,n)})},c=0;c<a.length;c++)s(c)})},k=function(e,t){import("./videoSelector-7c71fb84.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},S=function(e,t){import("./caption-settings-4f1c1a37.js").then(function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("captionSelector",s),null===(r=document)||void 0===r||null===(o=r.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)})},E=function(e,t){import("./settings-icon-1adaf42d.js").then(function(n){var r,o,l,a,s=n.default,c=d(e);i.registerComponent("settingsSelector",s),null===(r=document)||void 0===r||null===(o=r.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)})},O=function(e,t){import("./playlist-e55365b6.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("playlistSelector",r),o.getChild("controlBar").addChild("playlistSelector",{playerId:e,playlist:t},o.controlBar.children().length-3)})},w=function(e,t){import("./series-v2-51c00a2b.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},I=function(e,t){import("./multicamv2-16cacb77.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})},M=function(e,t){var n=d(e).el(),r=i.dom.createEl("div",{className:"output-overlay",innerHTML:'<iframe frameBorder="0" src='.concat(t,"></iframe>")});n.append(r)},P=function(e){var t=d(e).el(),n=0,r=d(e);r.addChild("fullscreenToggle");var o=function(){var e,n=null==t||null===(e=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===e?void 0:e[0];n&&n.click()};r.el().addEventListener("dblclick",o),window._multiplayer_dbClickHandler=o;r.el().addEventListener("touchend",function(){var e=(new Date).getTime(),r=e-n;if(r<300&&r>0){var o,l=null==t||null===(o=t.getElementsByClassName("vjs-fullscreen-control"))||void 0===o?void 0:o[0];l&&l.click()}n=e}),window._multiplayer_dbTapHandler=o},x=function(e,t){import("./videoSelector-872b1dad.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("videoSelector",r),o.getChild("controlBar").addChild("videoSelector",{playerId:e,related:t},o.controlBar.children().length-3)})},L=function(e,t){import("./series-v2-68fdb003.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("seriesV2",r),o.getChild("controlBar").addChild("seriesV2",h({playerId:e},t),o.controlBar.children().length-3)})},N=function(e,t){import("./multicamv2-7facfccf.js").then(function(n){var r=n.default,o=d(e);i.registerComponent("streamSelector",r),o.getChild("controlBar").addChild("streamSelector",{playerId:e,streams:t},o.controlBar.children().length-4)})};export{B as a,j as b,b as c,y as d,C as e,E as f,S as g,M as h,g as i,x as j,N as k,O as l,L as m,P as n,k as o,w as p,I as q};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import o from"axios";import{g as r,c as l}from"./skin-86e7e2b5.js";import{i as a,d}from"./browser-512cd55a.js";import u from"js-cookie";import{UAParser as s}from"ua-parser-js";import{a as c,r as v}from"./captions-d155b725.js";function m(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,n){m("event",e,n)}var w={apiBaseUrl:"https://prod-api.viewlift.com",getVideoDetails:"/entitlement/video/status",getSeriesDetails:"/entitlement/series/status",saveWatchHistoryV1:"/user/userId/history/video",saveWatchHistoryV2:"/v2/user/history",getVideoInfoV1:"/user/info/video",getVideoInfoV2:"/v2/user/info",getSeriesWatchHistoryV1:"/user/userId/history/video",getSeriesWatchHistoryV2:"/v2/user/history/series",getLinearChannelDetails:"/v3/entitlement/linearchannel",getBeaconUrl:"/analytics/player-beacon"};function I(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function g(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?I(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):I(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var E={name:"@viewlift/player-backup",version:"2.0.59-smarttv",main:"src/index.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","ua-parser-js":"^2.0.3","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"}};window.vl_player_version=E.version;var T,h=function(e,n){var t,i,r,l,a,d,u,s;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(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":O.get()+"".concat(null==w?void 0:w.getVideoDetails),params:g({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:n,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,n){var t,i,r,l;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:O.get()+w.getLinearChannelDetails,params:g(g(g(g(g({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,n){var t,i,r=k(n),l=(null==r?void 0:r.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):o({url:O.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:n}})},b=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return i=e.sent,e.abrupt("return",o({url:O.get()+"".concat(null==w?void 0:w.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:g({},n),params:g({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=function(e,n){var t,i,r=window.contentType;return o({method:"GET",url:O.get()+"".concat(null==w?void 0:w.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},F=function(e){var n=e.videoId;return o({method:"GET",url:O.get()+"".concat(null==w?void 0:w.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},O=(T=null==w?void 0:w.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),R=function(e,n,t,i){return o({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n},withCredentials:!0})},L=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},S=null;function P(){return{set:function(e){e&&(S=e)},get:function(){return S}}}var V,W,C,A,N,B,j=function(){var e=n(t.mark(function e(){var n,i,r;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=P().get(),i=O.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),x=null,M=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!L(n)){e.next=6;break}return x||(x=j().then(function(e){var t,i,o=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&P().set(r),o||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){x=null})),e.abrupt("return",x);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),U=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},k=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){W=e},z=function(){return W},G=function(e){V=e},Y=function(){return V},X=function(){return C},q=function(e){C=e},J=function(){return N},K=function(e){A=new Map,e.map(function(e,n){A.set(e.id,n)})},Q=function(e){if(A){var n=A.get(e);q(n+1)}},Z=(B=0,{set:function(e){e>=0&&(B=e)},get:function(){return B}});function $(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ee(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?$(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var ne=0,te=function(){var e,n,t,i,o,r,l,a=z();return"linearchannel"==((null==a?void 0:a.contentType)||"video")?null==a||null===(e=a.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===t||null===(i=t.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 ie(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function oe(){var e=window.sessionStorage.getItem("uid");return e||(e=ie(),window.sessionStorage.setItem("uid",e),e)}function re(){return le.apply(this,arguments)}function le(){return(le=n(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ae(e){return e?String(e):""}window.initialise=function(e){window.sid=ie(),window.environment="production",window.platform="WEBSITE",streamFailures(e),buffering(e),ads(e),ping(e)},window.streamFailures=function(e){var n=Math.floor(e.currentTime());e.on("error",function(){var t,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:n===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,n){e.one("play",tryCatch(function(){var t,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:Math.floor(e.currentTime())},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",{"Video ID":te(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=handleBufferTimer(window.totalBufferTime,e):clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&ne<4)ne++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:te(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var n,t,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,p("FIRST_FRAME",ee({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,i,o,r,l;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:te(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),p("AD_IMPRESSION",ee({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:te()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var n=[];e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(ne=0,n.push(t),fireEvent({eventName:"PING",videoPosition:t,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(de(n,r,l)){var a=Math.round(t-l);if(isFinite(a))return a}}})()};var de=function(e,n,t){return e>=n&&e<=t};function ue(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=r(e);window.initialise(t,n),window.firstFrame(t,n),t.on("loadedmetadata",function(){window.endFirstFrame(t)})}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,r,l,a,d,u,s,c,v,m,f,p,I,g,E,T,h,y,_,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M();case 2:return T=e.sent,h=k(T),y=null==h?void 0:h.site,_=null==h?void 0:h.siteId,e.t0=ee,e.t1=ee,e.t2=ee({aid:y,cid:_,pfm:window.platform},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params),e.t3={},e.t4=oe(),e.t5=te(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(a=n.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?ae(n.adPosition):"",e.next=26,re();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=n.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=n.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=n.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26},e.t28=(null==n?void 0:n.duration)&&{duration:n.duration},e.t29=(0,e.t1)(e.t2,e.t3,e.t27,e.t28),e.t30=null===(m=window)||void 0===m||null===(f=m.customData)||void 0===f||null===(p=f.beacon)||void 0===p?void 0:p.params,e.t31=(0,e.t0)(e.t29,e.t30),b=[e.t31],o({url:(null===(I=window)||void 0===I||null===(g=I.customData)||void 0===g||null===(E=g.beacon)||void 0===E?void 0:E.url)||O.get()+w.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:b}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var se=function(e,n){var t=new Map;F({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=t}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,n,t,i=Y(),o=z(),r=null==o||null===(e=o.video)||void 0===e?void 0:e.id,l=Z.get(),a=null==i||null===(n=i[l])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function me(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function fe(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?me(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}window._deviceInfo=s(navigator.userAgent);var pe=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},we=function(e){var n=Ie(e,"video.tags",[]),t=Ie(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},Ie=function(e,n,t){for(var i=0,o=(n=n.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[n[i]]}return e||t},ge=function(){var e,n,t,i,o,l,a,d,s,c,v,m,f,p,w,I,g,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",b=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0,F=(null==D?void 0:D.siteName)||"",O=(null==D?void 0:D.contentType)||"video",R=(null==D||null===(e=D[O])||void 0===e?void 0:e.metadata)||(null==D||null===(n=D[O])||void 0===n||null===(t=n.gist)||void 0===t?void 0:t.metadata),L=r(b);if(!_.includes("VIEWLIFT_"))return _;var S,P=window.getComputedStyle(document.getElementById(b),null),V=Math.trunc(P.getPropertyValue("height").slice(0,-2)),W=Math.trunc(P.getPropertyValue("width").slice(0,-2)),C="linearchannel"===O?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===(a=l.content)||void 0===a?void 0:a.id:Ie(D,"video.gist.id",""),A="linearchannel"===O?null==D||null===(d=D.linearchannel)||void 0===d||null===(s=d.channels)||void 0===s||null===(c=s.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===c?void 0:c.title:Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,B=null;"function"==typeof window.__gpp&&(null===(S=window)||void 0===S||S.__gpp("ping",function(e){N=null==e?void 0:e.gppString,B=null==e?void 0:e.sectionList[0]}));var j=fe(fe({},Ee(R)),{},{VIEWLIFT_WIDTH:W,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:pe(W,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:Ie(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==L||null===(m=L.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==L||null===(f=L.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==F?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:we(D),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(Ie(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+Ie(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:Ie(null===(p=window)||void 0===p||null===(w=p.app_data)||void 0===w||null===(I=w.site)||void 0===I?void 0:I.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR:Ie(null===(g=window)||void 0===g||null===(E=g.app_data)||void 0===E||null===(T=E.site)||void 0===T?void 0:T.settings,"compliance.gdpr")?1:0,VIEWLIFT_CONTENT_DURATION_MS:1e3*Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:Ie(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:Ie(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:Ie(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:ve(),VIEWLIFT_SEASON_NUMBER:ce(),VIEWLIFT_CONTENT_TAGS:we(D),VIEWLIFT_GPP_SID:B||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP"},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var x in j){var M=new RegExp(x,"g");_=_.replace(M,j[x])}return _},Ee=function(e){var n,t,i,o,r,l,d;if(null!==(n=window)&&void 0!==n&&n.customData.isSmartTV)return Te(u);var u={},s=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){s.set(e.name,e.value)}));var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(o=i.subscription)||void 0===o?void 0:o.SVOD)||!1,v=(null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l||null===(d=l.subscription)||void 0===d?void 0:d.TVE)||!1;return c||v?(a()?c?u=fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||""}):v&&(u=fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.tve")||""})):c?u=fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||""}):v&&(u=fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.tve")||""})),c?u=fe(fe({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}):v&&(u=fe(fe({},u),{},{VIEWLIFT_SFID:s.get("sfid.tve")||s.get("sfid.web.tve")||""})),u=a()?fe(fe({},u),{},{VIEWLIFT_PROF:s.get("prof.mweb")||""}):fe(fe({},u),{},{VIEWLIFT_PROF:s.get("prof.web")||""})):(u=fe(fe({},u),{},{VIEWLIFT_SFID:s.get("sfid.dtc")||s.get("sfid.web.dtc")||""}),u=a()?fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:s.get("prof.mweb")||""}):fe(fe({},u),{},{VIEWLIFT_CSID:s.get("csid.web.dtc")||"",VIEWLIFT_PROF:s.get("prof.web")||""})),u=fe(fe({},u),{},{VIEWLIFT_AFID:s.get("afid")})},Te=function(e){var n,t,i,o,r,l,a={},d=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)}));var u=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,s=(null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.subscription)||void 0===l?void 0:l.TVE)||!1;return(u||s)&&(s?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.tve")}),a="lgTv"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.dtc")}),a="lgTv"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""}):"vizioTv"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""}):"xfinityX1"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""}):"xbox"==window.customData.device?fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""}):fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""}))),a},he=function(e){var n=null;try{var t,i,o,r,l,a,d,u,s,c,v,m,f,p,w,I,g,E,T,h,y,_,b,D,F,O,R,L,S;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV){if("samsungTv"==window.customData.device&&null!=e&&null!==(i=e.ads)&&void 0!==i&&null!==(o=i.preRoll)&&void 0!==o&&null!==(r=o.adTags)&&void 0!==r&&null!==(l=r.samsung_tv)&&void 0!==l&&l.active)n=null==e||null===(E=e.ads)||void 0===E||null===(T=E.preRoll)||void 0===T||null===(h=T.adTags)||void 0===h||null===(y=h.samsung_tv)||void 0===y?void 0:y.url;else if("lgTv"==window.customData.device&&null!=e&&null!==(a=e.ads)&&void 0!==a&&null!==(d=a.preRoll)&&void 0!==d&&null!==(u=d.adTags)&&void 0!==u&&null!==(s=u.lg_tv)&&void 0!==s&&s.active){var P,V,W,C;n=null==e||null===(P=e.ads)||void 0===P||null===(V=P.preRoll)||void 0===V||null===(W=V.adTags)||void 0===W||null===(C=W.lg_tv)||void 0===C?void 0:C.url}else if("vizioTv"==window.customData.device&&null!=e&&null!==(c=e.ads)&&void 0!==c&&null!==(v=c.preRoll)&&void 0!==v&&null!==(m=v.adTags)&&void 0!==m&&null!==(f=m.vizioTv)&&void 0!==f&&f.active){var A,N,B,j;n=null==e||null===(A=e.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(B=N.adTags)||void 0===B||null===(j=B.vizioTv)||void 0===j?void 0:j.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(w=p.preRoll)&&void 0!==w&&null!==(I=w.adTags)&&void 0!==I&&null!==(g=I.xbox)&&void 0!==g&&g.active){var x,M,U,k;n=null==e||null===(x=e.ads)||void 0===x||null===(M=x.preRoll)||void 0===M||null===(U=M.adTags)||void 0===U||null===(k=U.xbox)||void 0===k?void 0:k.url}}else n=(null==e||null===(_=e.ads)||void 0===_||null===(b=_.preRoll)||void 0===b||null===(D=b.adTags)||void 0===D||null===(F=D.web)||void 0===F?void 0:F.active)&&(null==e||null===(O=e.ads)||void 0===O||null===(R=O.preRoll)||void 0===R||null===(L=R.adTags)||void 0===L||null===(S=L.web)||void 0===S?void 0:S.url)}catch(e){}return n},ye=function(e,n){var t,i,o,r,l,a,u,s,c,v,m,f,p,w=(null==e?void 0:e.contentType)||"video",I=null==e||null===(t=e[w])||void 0===t?void 0:t.drmEnabled,g=null==e||null===(i=e[w])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[w])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(a=e[w])||void 0===a||null===(u=a.streamingInfo)||void 0===u||null===(s=u.videoAssets)||void 0===s?void 0:s.hls)||!1;null==e||null===(c=e[w])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[w])||void 0===m||null===(f=m.streamingInfo)||void 0===f||null===(p=f.videoAssets)||void 0===p?void 0:p.dash)||!1;if(null!=e&&e.directPlaybackUrl)return{src:null==e?void 0:e.directPlaybackUrl,type:null};if(null!=e&&e.audioAssetSource&&null!=E&&E.hls)return be(E);if(I){var y=De(g,n);return y.src=ge(y.src,n,e),y}if("Safari"!==d()&&h)return _e(g);if(T){var _=be(g);return _.src=ge(_.src,n,e),_}if(null!=g&&g.mpeg){var b=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(g);return b.src=ge(b.src,n,e),b}return null},_e=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},be=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},De=function(e,n){var t=e.fairPlayCmaf||e.fairPlay,o=e.widevine,l=e.playReady,a=d();if(r(n),"Safari"===a){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,o,r){var 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,n,t){console.log(e),e&&r(e),r(null,t)})}}}}}(t);return Fe(n),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(Fe(n),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":l.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:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),c};var Fe=function(e){var n=r(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Oe=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var o=t.split(".com")[1]||"";return{src:o?"".concat(n).concat(o):t,type:i}},Re=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(n),o.appendChild(r),i.append(o)}}},Le=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Se=!1,Pe=function(e,n,t){var i=ge(n,e,t),o=r(e);if(n&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,n){var t,i,o,l=r(e);if(null!==l.el_){Se=!0;var a={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Se&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,n,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.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 Ve(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var We=function(e){i(e).play()},Ce=function(e){i(e).pause()},Ae=function(e,n){var t=i(e),o=t.currentTime()+n;t.currentTime(o)},Ne=function(e,n){var t=i(e),o=t.currentTime(),r=o<=n?0:o-n;t.currentTime(r)},Be=function(e){return!!i.getPlayer("".concat(e))},je=function(e){return i(e).paused()},xe=function(){var e=n(t.mark(function e(n,i){var o,l,a,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,M();case 3:return l=e.sent,a=r(n),e.abrupt("return",new Promise(function(e,t){y(i,l).then(function(t){var r=null==t?void 0:t.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ye(r,n);H(r),l&&o?(ze(n,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){t({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Me=function(){var e=n(t.mark(function e(n,i){var o,l,a,d,u,s,m=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d=m.length>2&&void 0!==m[2]?m[2]:null){e.next=5;break}return e.next=4,M();case 4:d=e.sent;case 5:return(Y()||null)&&Q(i),u=0,s=0,null!==(o=window)&&void 0!==o&&o.watchHistory&&null!==(l=window)&&void 0!==l&&null!==(a=l.watchHistory)&&void 0!==a&&a.enable&&D(i,d).then(function(e){var n,t,i,o,r,l;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),u=(null==e||null===(r=e.data)||void 0===r?void 0:r.watchedTime)||null,s=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedPercentage)||null}).catch(function(e){var n,t,i,o;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,t){h(i,d).then(function(i){var o,l,a=null==i?void 0:i.data,d=(null==a||null===(o=a.video)||void 0===o||null===(l=o.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1;H(i.data);var m=he(a);m&&Pe(n,m,a);var f=ye(a,n);if(f){var p,w,I,g,E,T,h,y,_,b,D,F,O,R,L=(null==a||null===(p=a.video)||void 0===p||null===(w=p.gist)||void 0===w?void 0:w.videoImageUrl)||(null==a||null===(I=a.video)||void 0===I||null===(g=I.gist)||void 0===g||null===(E=g.imageGist)||void 0===E?void 0:E.r16x9),S=r(n);if(S.poster(L),ze(n,f),S.on("loadstart",function(){d&&e({status:!0,msg:"Video Loaded",response:a})}),S.on("loadeddata",function(){Le(),e({status:!0,msg:"Video Loaded",response:a})}),S.one("play",function(){u&&s<95&&setTimeout(function(){S.currentTime(u)},0)}),S.one("error",function(){var e;t({status:!1,msg:(null==S||null===(e=S.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==a||null===(T=a.video)||void 0===T||null===(h=T.contentDetails)||void 0===h||null===(y=h.closedCaptions)||void 0===y?void 0:y.length)>0||(null==a||null===(_=a.video)||void 0===_||null===(b=_.closedCaptions)||void 0===b?void 0:b.length)>0)D=((null==a||null===(F=a.video)||void 0===F||null===(O=F.contentDetails)||void 0===O?void 0:O.closedCaptions)||(null==a||null===(R=a.video)||void 0===R?void 0:R.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(n,D);else v(n)}else Re(n,"Incompatible Source, only hls,mp4,drm content is allowed"),t("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){Ge(e,n,t,i)})}));case 11:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Ue=function(e,n,t){var i=r(e);return i.src(n),new Promise(function(e,n){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},ke=function(e){var n=r(e);if(He(),l(),window.onresize=null,n)n.dispose();else{var t=document.getElementById(e);t&&t.remove()}},He=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()},ze=function(e,n){var t=r(e);t&&t.src(n)},Ge=function(n,t,i,o){var r,l,a,d,u,s,c=null==n||null===(r=n.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==n||null===(a=n.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==n?void 0:n.message);Be(t)&&Re(t,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ve(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ve(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},o&&{videoId:o}))},Ye=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=n.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{_ as A,se as B,Z as C,G as D,Ue as E,We as F,Ce as G,je as H,Be as I,Me as J,xe as K,ke as L,R as M,O as N,U as O,P,L as Q,f as R,X as S,q as T,F as U,K as V,Q as W,ve as a,Y as b,ce as c,z as d,ye as e,H as f,oe as g,Le as h,Re as i,J as j,Ae as k,ze as l,ge as m,he as n,Ye as o,ue as p,Pe as q,Ne as r,b as s,Oe as t,k as u,h as v,D as w,Ge as x,M as y,y as z};
@@ -0,0 +1 @@
1
+ import"video.js/dist/video-js.min.css";import{g as e,a as n,b as t,c as o,d as r,s as i,e as l,l as a,f as s,h as u,i as c,j as d,k as v,r as f,m as p,n as m,o as y,p as h,q as g,t as b,u as w,v as k,w as O,x as S,y as j,z as T,A as I,B as E,C as P,D,E as x,F as A,G as C,H as R,I as L,J as N,K as _,L as M,M as V,N as U,O as B,P as H,Q as F,R as q}from"./generic-ee738b64.js";import G from"@babel/runtime/helpers/defineProperty";import K from"@babel/runtime/helpers/asyncToGenerator";import z from"@babel/runtime/regenerator";import J from"video.js";import{o as W,g as Q,a as X,b as Y,s as $,c as Z}from"./util-42912ffd.js";import{g as ee,d as ne,a as te,e as oe}from"./captions-d155b725.js";import{g as re,t as ie,p as le,i as ae,a as se}from"./skin-86e7e2b5.js";import{g as ue}from"./renditions-53ee066f.js";import{playSelectedResolution as ce}from"./resolution-69172876.js";import{d as de}from"./browser-512cd55a.js";import{s as ve}from"./localisation-0bf399a1.js";import fe from"@babel/runtime/helpers/typeof";import pe from"@babel/runtime/helpers/toConsumableArray";import me from"@babel/runtime/helpers/slicedToArray";import{I as ye}from"./icons-3bd3bd8f.js";var he=function(e){return new Promise(function(n,t){if(ge(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)}})},ge=function(e){return document.querySelectorAll('script[src="'.concat(e,'"]')).length>0},be=function(e){var n,t=re(e);return(null==t||null===(n=t.audioTracks())||void 0===n?void 0:n.tracks_)||[]||[]},we=function(e,n){for(var t=re(e).audioTracks().tracks_||[],o=0;o<t.length;o++){var r=t[o];r.id==n?r.enabled=!0:r.enabled=!1}},ke=function(e,n,t){var o=re(e);if(o)if(n>=0&&n<=100){o.muted()&&o.muted(!1);var r=parseFloat(n)/100;o.volume(r),t&&t({status:!0,msg:"Volume set to ".concat(n,"%")})}else t&&t({status:!1,msg:"Please enter a valid volume percentage (0 ≥ V ≤ 100)"});else t({status:!1,msg:"Cannot find player with id: '".concat(e,"'")})},Oe=function(e){var n=re(e);return n?parseInt(100*n.volume())+"%":"Cannot find player with id: '".concat(e,"'")},Se=function(){var e=K(z.mark(function e(n){var t,o,r,i,l;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=re(null==n?void 0:n.playerId),null!=n&&null!==(t=n.series)&&void 0!==t&&t.enable||null==n||!n.chromecastReceiverId){e.next=22;break}return e.next=4,import("@silvermine/videojs-chromecast");case 4:return i=e.sent,e.prev=5,e.next=8,he("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1");case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:return e.prev=13,i.default(J),e.finish(13);case 16:(l=J.getTech("chromecast"))&&!l.prototype.seeking&&(l.prototype.seeking=function(){}),null!==(r=window)&&void 0!==r&&r.cast?null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0}):window.__onGCastApiAvailable=function(){null==o||o.chromecast({receiverAppID:null==n?void 0:n.chromecastReceiverId,addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5,addCastLabelToButton:!0})},e.next=23;break;case 22:console.log("Chromecast plugin is not available");case 23:null!=n&&n.airplay&&"Safari"==de()?null==o||o.airPlay({addButtonToControlBar:"VL_ONE"==n.skin||"defaultV2"==n.skin,buttonPositionIndex:-5}):console.log("AirPlay plugin is not available");case 24:case"end":return e.stop()}},e,null,[[5,10,13,16]])}));return function(n){return e.apply(this,arguments)}}(),je=function(e,n){var t=re(e);t&&n&&t.controlBar&&t.controlBar.progressControl.seekBar.on("click",function(n){var t,o,r,i,l,a=this.el(),s=J.dom.getPointerPosition(a,n).x;J.getPlayer(e).controlBar.durationDisplay.options_.playerOptions.disableRemotePlayback=!1;var u=window.cast&&window.cast.framework&&window.cast.framework.CastSession,c=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S;if(console.log(u),u&&"CONNECTED"===c){window.cast.framework.RemotePlayer.canSeek=!0;var d=new window.cast.framework.RemotePlayerController(window.cast.framework.RemotePlayer),v=d.h.media[0].liveSeekableRange.end;d.getSeekPosition(),window.cast.framework.RemotePlayer.currentTime=v*s,d.seek()}})};var Te=function(){var e=K(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all([import("videojs-contrib-ads"),import("ima"),he("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)}}(),Ie=function(){var e=K(z.mark(function e(){return z.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){J.getPlugin("eme")||J.registerPlugin("eme",e.default)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ee=function(){var e=K(z.mark(function e(){var n;return z.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(J),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)}}(),Pe=function(){var e=K(z.mark(function e(){return z.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)}}(),De=function(){var e=K(z.mark(function e(){return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,import("./videojs_contrib_dash-f7d94714.js");case 3:console.log("utilising contrib dash"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("Failed to load contrib dash plugin");case 9:case"end":return e.stop()}},e,null,[[0,6]])}));return function(){return e.apply(this,arguments)}}(),xe=Object.freeze({__proto__:null,importChromecast:function(){import("@silvermine/videojs-chromecast").then(function(e){he("https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1").then(function(){e.default(J)}).catch(function(e){console.log(e)})})},importAirplay:function(){import("@silvermine/videojs-airplay").then(function(e){e.default(J)})},loadAdsLibrary:Te,loadEMELibrary:Ie,loadMuxPlugin:Ee,loadDvrSeekbar:Pe,loadContribDash:De});function Ae(e){return Ce.apply(this,arguments)}function Ce(){return(Ce=K(z.mark(function e(n){var t;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=(null==n?void 0:n.airplay)||!1,e.next=3,Te();case 3:t&&"Safari"==de()&&Promise.resolve().then(function(){return xe}).then(function(e){e.importAirplay()});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Re(e,n){return Le.apply(this,arguments)}function Le(){return(Le=K(z.mark(function e(n,t){var o,r,i,l,a,s,u,c,d,v;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return u=(null==t?void 0:t.contentType)||"video",c=null==t||null===(o=t[u])||void 0===o?void 0:o.drmEnabled,null==t||null===(r=t[u])||void 0===r||null===(i=r.liveDetails)||void 0===i||i.isDvrEnabled,null==n||n.showPositiveSeekbar,d=(null==t||null===(l=t[u])||void 0===l||null===(a=l.streamingInfo)||void 0===a||null===(s=a.videoAssets)||void 0===s?void 0:s.dash)||null,e.prev=5,e.next=8,Promise.allSettled([c?"Safari"==de()?Ie():"caliente"!=(null===(v=window)||void 0===v?void 0:v.siteName)?De():Ie():"Safari"!=de()&&d?De():null,Se(n)]);case 8:e.next=13;break;case 10:e.prev=10,e.t0=e.catch(5),console.log("Error",e.t0);case 13:case"end":return e.stop()}},e,null,[[5,10]])}))).apply(this,arguments)}function Ne(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 _e(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ne(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ne(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Me=new Set,Ve=null,Ue=function(n,o,r){var i,l,a,s,u,c,d,v={},f=(null==n?void 0:n.contentType)||"video";v["c3.cm.id"]=(null===(i=n[f])||void 0===i?void 0:i.id)||"Null",v["c3.cm.contentType"]=ze(n),v[null==r||null===(l=r.Constants)||void 0===l?void 0:l.IS_LIVE]=!(null==n||!n.linearchannel),v[null==r||null===(a=r.Constants)||void 0===a?void 0:a.STREAM_URL]=o.currentSrc(),v[null==r||null===(s=r.Constants)||void 0===s?void 0:s.VIEWER_ID]="undefined"===e()?"NULL":e(),v["c3.cm.categoryType"]=qe(n),v["m3.net.t"]=function(){var e=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(!e)return"Unknown";if(e.type)switch(e.type){case"wifi":return"WiFi";case"ethernet":return"Ethernet";default:return e.type}switch(e.effectiveType){case"slow-2g":case"2g":return"2G";case"3g":return"3G";case"4g":return e.downlink>=20?"WiFi":"4G";default:return"Unknown"}}(),v.DRMEnabled=(null===(u=n[f])||void 0===u?void 0:u.drmEnabled)||"None",v.DAIStream=null!==(c=n[f])&&void 0!==c&&null!==(d=c.gist)&&void 0!==d&&d.isSSAIEnabled?"YES":"NO",v[r.Constants.DEFAULT_RESOURCE]="AKAMAI",v["c3.cm.brand"]="NULL",v.CDVREnabled=Ge(n),v["c3.cm.genreList"]=He(n),v["c3.cm.genre"]=Be(n),v["c3.cm.channel"]=Fe(n);var p=We(t(),n);return v=_e(_e({},v),p)},Be=function(e){var n,t,o,r=(null==e?void 0:e.contentType)||"video";return(null==e||null===(n=e[r])||void 0===n||null===(t=n.gist)||void 0===t||null===(o=t.primaryCategory)||void 0===o?void 0:o.title)||"Null"},He=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"},Fe=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video";return"video"===o?"VOD":(null==e||null===(n=e[o])||void 0===n||null===(t=n.channels[0])||void 0===t?void 0:t.title)||"NULL"},qe=function(e){return(null==e?void 0:e.contentType)||"null"},Ge=function(e){var n,t,o=(null==e?void 0:e.contentType)||"video",r=(null==e||null===(n=e[o])||void 0===n||null===(t=n.liveDetails)||void 0===t?void 0:t.isDvrEnabled)||!1;return r?"YES":"NO"},Ke=function(e,n){var t,o,r=(n||{}).epg;if(r&&null!=r&&r.enable&&null!=r&&r.programTitle)return r.programTitle;var i=(null==e?void 0:e.contentType)||"video",l=(null==e||null===(t=e[i])||void 0===t||null===(o=t.gist)||void 0===o?void 0:o.title)||"Null";return"".concat(l)},ze=function(e){return"linearchannel"===((null==e?void 0:e.contentType)||"video")?"Live":"VOD"};var Je,We=function(e,t){var r,i,l,a,s,u={"c3.cm.seriesName":"Null","c3.cm.seasonNumber":"Null","c3.cm.showTitle":"Null","c3.cm.episodeNumber":"Null"};if(!e||!t||null!=t&&t.linearchannel)return u;var c=o(),d=n();return u["c3.cm.seriesName"]=(null==t||null===(r=t.video)||void 0===r||null===(i=r.series)||void 0===i?void 0:i.title)||"Null",u["c3.cm.seasonNumber"]=(null==c?void 0:c.toString())||"Null",u["c3.cm.showTitle"]=(null==e||null===(l=e[c-1])||void 0===l||null===(a=l.episodes)||void 0===a||null===(s=a[d-1])||void 0===s?void 0:s.title)||"Null",u["c3.cm.episodeNumber"]=(null==d?void 0:d.toString())||"Null",u},Qe=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"}},Xe=function(e){switch(e){case"application/x-mpegURL":case"application/vnd.apple.mpegurl":return"HLS";case"application/dash+xml":return"DASH";default:return"Unknown"}},Ye=function(){var e=K(z.mark(function e(n,t){var o,i,l,a,s,u,c,d,v,f;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=(null==t?void 0:t.convivaConfig)||{},i=o.trackConvivaPlayerEvent,l=o.paymentHandler,a=o.tveProvider,s=o.enable,u=o.appName,c=(t||{}).token,s){e.next=4;break}return e.abrupt("return");case 4:if(d=re(n),"function"==typeof(v=i)){e.next=8;break}return e.abrupt("return");case 8:return e.next=10,v("getConvivaObject");case 10:if(f=e.sent){e.next=13;break}return e.abrupt("return");case 13:d.ready(function(){var e=d.tech(!0),n=!1;e.on("keysessioncreated",function(e){n=!0;var t=e.target;if(t&&t.keySystem){var o=Qe(t.keySystem);v("contentInfo",{DRMEnabled:o})}else v("contentInfo",{DRMEnabled:"None"})}),n||v("contentInfo",{DRMEnabled:"None"})}),d.on("loadstart",function(){var e,n;Ve&&Ve!==d.currentSrc()&&v("playbackEnded"),v("setPlayer",d),Me.clear(),Ve=d.currentSrc();var o=Xe(d.currentType()),i=r(),s=Ue(i,d,f);s[null==f||null===(e=f.Constants)||void 0===e?void 0:e.PLAYER_NAME]=u||"WEB",s[null==f||null===(n=f.Constants)||void 0===n?void 0:n.ASSET_NAME]=Ke(i,t),s.authToken=c||"NULL",s.streamType=o,s.D2CType=l||"NONE",s.subscriberType=a||(l?"D2C":"FREE"),s["c3.cm.affiliate"]=a||"NULL",v("contentInfo",s)}),d.on("loadedmetadata",function(){var e,n=d.videoHeight();e=n>=2160?"4K":n>=1440?"1440p":n>=1080?"1080p":n>=720?"720p":n>=480?"480p":"".concat(n,"p"),v("contentInfo",{screenResolution:e})}),d.on("play",function(){Me.has(d.currentSrc())||(Me.add(d.currentSrc()),v("playbackStarted",null))}),d.on("ended",function(){Me.has(d.currentSrc())&&Me.delete(d.currentSrc()),v("playbackEnded")}),d.on("ads-loader",function(e){e&&null!=e&&e.adsLoader&&v("initAdSensor",{player:d,adsLoader:null==e?void 0:e.adsLoader})}),d.on("dispose",function(){null==Me||Me.clear(),v("playbackEnded")});case 20:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),$e=function(e,n){var t=null==n?void 0:n.skin;"default"==t?import("./skin-aac012c7.js").then(function(t){t.initialiseSkin(e,n)}):"carousel"==t?import("./skin-8de18b79.js").then(function(n){n.initaliseSkin(e)}):"defaultV2"==t?import("./skin-154be57f.js").then(function(t){t.initialiseSkin(e,n)}):"multiplayer"==t?import("./skin-bbdea1f7.js").then(function(t){t.initialiseSkin(e,n)}):"minimalist"==t?import("./skin-a61876d8.js").then(function(t){t.initaliseSkin(e,n)}):"VL_ONE"==t?import("./skin-4d9324ff.js").then(function(t){t.initialiseSkin(e,n)}):"VL_SmartTV"==t&&import("./skin-44af7d3b.js").then(function(t){t.initialiseSkin(e,n)})};function Ze(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function en(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ze(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ze(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var nn=[],tn=0,on=null;function rn(e,n,t){var o,l,a,s,u,c=arguments.length>3&&void 0!==arguments[3]&&arguments[3];null==n||null===(o=n.watchHistory)||void 0===o||o.apiVersion;var d=null==n||null===(l=n.watchHistory)||void 0===l?void 0:l.profileId,v=Math.floor(e.currentTime()),f=Math.floor(e.duration());null==n||null===(a=n.watchHistory)||void 0===a||a.xapiKey;var p=(null==n||null===(s=n.video)||void 0===s?void 0:s.originalObjectId)||null,m=(null==n||null===(u=n.watchHistory)||void 0===u?void 0:u.saveOffline)||!1,y=Math.floor(e.currentTime()),h=c?100:Math.floor(v/f*100),g={};m?function(e,n,t){var o=n?"watchhistory-data-".concat(n):"watchhistory-data-guest-".concat(t),i=ln(o),l=(new Date).getTime(),a=r(),s=(null==a?void 0:a.video)||{},u=["id","title","gist","categories","tags","status","publishDate","plans","isVerticalVideo","monetizationBadgeIdentifier","runtime"].reduce(function(e,n){return en(en({},e),{},G({},n,s[n]))},{}),c=i.findIndex(function(e){var n;return(null==e||null===(n=e.content)||void 0===n?void 0:n.id)===Je});c<0?i.push(en(en({content:u},e),{},{addedDate:l,updateDate:l})):i[c]=en(en(en({},i[c]),e),{},{updateDate:l});localStorage.setItem("".concat(o),JSON.stringify(i))}(g={completed:c,watchedTime:y,watchedPercentage:h},d,n.siteOwner):(g=en(en({videoId:Je,watchedTime:y,watchedPercentage:h,doneWatching:c,profileId:d},on&&{seriesId:on}),p&&{originalObjectId:p}),i(g).then(function(e){}).catch(function(e){})),tn=v+t}function ln(e){var n=[];return e&&(n=JSON.parse(localStorage.getItem("".concat(e))||"[]")),n}function an(e,n,t){var o=ln(e?"watchhistory-data-".concat(e):"watchhistory-data-guest-".concat(t)),r=[];return o&&Array.isArray(o)&&(r=o.filter(function(e){var t;return(null==e||null===(t=e.content)||void 0===t?void 0:t.id)===n})),r}var sn=!1,un=function(e,n){var t,o,r=(null==e?void 0:e.contentType)||"video";if(((null==e||null===(t=e[r])||void 0===t||null===(o=t.streamingInfo)||void 0===o?void 0:o.secondaryVideoAssets)||null)&&!sn){var i=cn(e,"videoAssets","secondaryVideoAssets"),s=l(i,n);return s&&a(n,s),sn=!0,console.log("switching to secondary source"),!0}return console.log("secondary source is either corrupted / not available"),!1};function cn(e,n,t){if(Array.isArray(e))return e.map(function(e){return cn(e,n,t)});if(null!==e&&"object"===fe(e)){var o={};return Object.keys(e).forEach(function(r){r===n&&void 0!==e[t]?o[r]=e[t]:r===t&&void 0!==e[n]?o[r]=e[n]:o[r]=cn(e[r],n,t)}),o}return e}function dn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return vn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?vn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function vn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}function fn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function pn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?fn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):fn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var mn=function(e,n,t,o){var i,l,a,v,f=o.res,p=o.sres,m=re(e),y=(null==f?void 0:f.contentType)||"video",h=(null==f?void 0:f[y].drmEnabled)||!1,g=(null==f||null===(i=f[y])||void 0===i||null===(l=i.streamingInfo)||void 0===l?void 0:l.isLiveStream)||!1,b=(null==f||null===(a=f[y])||void 0===a||null===(v=a.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1;s(f),m&&(m.on("loadstart",function(){g?t.resolve({status:!0,msg:"Video Loaded",response:f}):t.resolve(pn({status:!0,msg:"Player Initialised"},p?{seriesResponse:p,response:f}:{response:f}))}),m.on("loadeddata",function(){var t,o,i,l=ee(e);if(null==l||l.map(function(n){return ne(e,n.id)}),b&&"Safari"===de())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())&&ke(e,sessionStorage.getItem("volume")||"100");var s=r();if(u(),null!=n&&n.watchHistory&&null!=n&&null!==(t=n.watchHistory)&&void 0!==t&&t.enable&&(!n.isAnonymousUser||null!=n&&null!==(o=n.watchHistory)&&void 0!==o&&o.saveOffline)){var c,d,v=pn(pn({},n),f);!function(e,n,t){var o,r,i;null!=n&&n.series&&null!=n&&null!==(o=n.series)&&void 0!==o&&o.enable&&(on=null==n||null===(r=n.series)||void 0===r?void 0:r.id),nn=[],tn=0,Je=t;var l=(null==n||null===(i=n.watchHistory)||void 0===i?void 0:i.interval)||30,a=re(e);a&&(a.on("timeupdate",function(){var e=Math.floor(a.currentTime());nn.includes(tn)||(e==tn?(nn.push(e),rn(a,n,l)):e>tn&&(tn=e+l))}),a.one("ended",function(){rn(a,n,l,!0)}))}(e,v,null==s||null===(c=s.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.id)}if(null!=n&&null!==(i=n.analytics)&&void 0!==i&&i.muxKey&&null!=m&&m.mux){var p,y,h,g,w,k,O=(null===(p=r())||void 0===p?void 0:p.video)||(null==f?void 0:f.video),S=null==O?void 0:O.gist,j={env_key:null==n||null===(y=n.analytics)||void 0===y?void 0:y.muxKey,player_name:"vl-web-player",player_version:null===(h=window)||void 0===h?void 0:h.vl_player_version,video_id:null==S?void 0:S.id,video_title:null==S?void 0:S.title,video_series:null==O||null===(g=O.series)||void 0===g?void 0:g.title,video_stream_type:null!=O&&null!==(w=O.streamingInfo)&&void 0!==w&&w.isLiveStream?"live":"video",viewer_user_id:null==n||null===(k=n.analytics)||void 0===k?void 0:k.userId};m.mux({debug:!1,data:j})}}),m.textTracks().on("change",function(e){var n=this.tracks_.filter(function(e){if(("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode)return!0})[0];m.trigger("subtitlechanged",n)}),m.on("subtitlechanged",function(e,n){var t,o,r,i,l,a,s,u,c,d,v=window.cast&&window.cast.framework&&window.cast.framework.CastSession,f=null===(t=window)||void 0===t||null===(o=t.cast)||void 0===o||null===(r=o.framework)||void 0===r||null===(i=r.CastContext)||void 0===i||null===(l=i.getInstance())||void 0===l?void 0:l.S,p=null===(a=window)||void 0===a||null===(s=a.cast)||void 0===s||null===(u=s.framework)||void 0===u||null===(c=u.CastContext)||void 0===c||null===(d=c.getInstance())||void 0===d?void 0:d.getCurrentSession();if(v&&"CONNECTED"===f){var m,y=p.getMediaSession(),h=y.media.tracks.filter(function(e){return"TEXT"==e.type});m=n?new chrome.cast.media.EditTracksInfoRequest([h[0].trackId]):new chrome.cast.media.EditTracksInfoRequest([]),y.editTracksInfo(m)}}),m.tech_.on("retryplaylist",function(){g&&un(f,e)}),m.on("error",function(){var n,o;(console.log("ERROR",m.error(),m.error().code),4===m.error().code&&g)?un(f,e):(c(e,(null==m||null===(n=m.error())||void 0===n?void 0:n.message)||"Some error occured"),t.reject({status:!1,msg:(null==m||null===(o=m.error())||void 0===o?void 0:o.message)||"Some error occured",response:f}))}),m.one("play",function(){var e;if(null!=n&&null!==(e=n.series)&&void 0!==e&&e.enable){var t,o,i,l=null===(t=r())||void 0===t||null===(o=t.video)||void 0===o||null===(i=o.gist)||void 0===i?void 0:i.id,a=d(),s=(null==a?void 0:a.get(l))||{t:0,p:0},u=s.t,c=s.p;u&&c<95&&setTimeout(function(){m.currentTime(u)},0)}else null!=n&&n.watchHistoryResumeTime&&(null==n?void 0:n.watchedPercentage)<95&&setTimeout(function(){m.currentTime(null==n?void 0:n.watchHistoryResumeTime)},0);if(null!=m&&m.dvrSeekbar)try{m.dvrSeekbar()}catch(e){console.error("Error while initilizing dvr seekbar")}}),m.on("volumechange",function(){var e=100*m.volume().toFixed(2);m.muted()?sessionStorage.setItem("volume",0):sessionStorage.setItem("volume",e)}),m.on("chromecastDisconnected",function(){if(g){m.currentSource();for(var e=m.textTracks(),n=e.length-1;n>=0;n--)m.removeRemoteTextTrack(e[n])}}),m.one("loadeddata",function(){var e,n=(null==m||null===(e=m.audioTracks())||void 0===e?void 0:e.tracks_)||null;if(n)if("object"==fe(m.dash)){var t,o,r,i=null==m||null===(t=m.dash)||void 0===t||null===(o=t.mediaPlayer)||void 0===o?void 0:o.getTracksFor("audio"),l=null==i?void 0:i.find(function(e){var n;return null==e||null===(n=e.roles)||void 0===n?void 0:n.includes("main")}),a=dn(n);try{for(a.s();!(r=a.n()).done;){var s=r.value;if(l&&(null==s?void 0:s.id)=="dash-audio-".concat(l.index)){s.enabled=!0;break}}}catch(e){a.e(e)}finally{a.f()}}else{var u,c=dn(n);try{for(c.s();!(u=c.n()).done;){var d,v,f,p=u.value;("Chrome"==de()||"Edge"==de()&&(null!==(d=navigator)&&void 0!==d&&null!==(v=d.userAgent)&&void 0!==v&&v.includes("Macintosh")||!h))&&null!=p&&null!==(f=p.label)&&void 0!==f&&f.includes("5.1")?m.audioTracks().removeTrack(p):"main"==p.kind?p.enabled=!0:p.enabled=!1}}catch(e){c.e(e)}finally{c.f()}}}))};function yn(e,n){var t,o,r,i=re(e),l=null==i||null===(t=i.controlBar)||void 0===t||null===(o=t.playToggle)||void 0===o?void 0:o.el_,a=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var o;if(gn.enabled&&"input"!=t.target.localName){var r=t.key,s=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(r)&&(t.preventDefault(),null==a||a.focus()),r){case" ":null==l||l.click();break;case"m":case"M":i.muted(!i.muted());break;case"f":case"F":null===(o=document.querySelector(".vjs-fullscreen-control"))||void 0===o||o.click();break;case"ArrowLeft":s&&!1===n.liveui||f(e,10);break;case"ArrowRight":s||v(e,10)}}},!0)}var hn,gn=(hn=!0,{enable:function(){hn=!0},disable:function(){hn=!1},get enabled(){return hn}});function bn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function wn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?bn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):bn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function kn(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 On(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)?On(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,a=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return l=e.done,e},e:function(e){a=!0,i=e},f:function(){try{l||null==t.return||t.return()}finally{if(a)throw i}}}}function On(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,o=Array(n);t<n;t++)o[t]=e[t];return o}var Sn,jn=(Sn="",{set:function(e){e&&(Sn=e)},get:function(){return Sn}});function Tn(e,n){return In.apply(this,arguments)}function In(){return(In=K(z.mark(function e(n,t){var o,r,i,a,s,u,c,d,v,f,m,y,h,g;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return re(n),o=l(t,n),r=o.src,i=r.replace("dash","session").replace("master","session"),i=p(i,n,{}),a=En(i),s=me(a,2),u=s[0],c=s[1],i=new URL(i.split("?")[0]),Object.keys(c).length>0&&Object.entries(c).forEach(function(e){var n=me(e,2),t=n[0],o=n[1];i.searchParams.set(t,o)}),e.next=10,fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({adsParams:wn({},u)})});case 10:return d=e.sent,e.next=13,d.json();case 13:return v=e.sent,f="https://"+new URL(i).hostname,m=v.trackingUrl,y=v.manifestUrl,h=f+m,g=f+y,jn.set(h),console.log("%c TRACKING URL","background: #bdf369; color: #000",h),o.src=g,e.abrupt("return",o);case 23:case"end":return e.stop()}},e)}))).apply(this,arguments)}function En(e){var n={},t=e.split("?")[1];if(!t)return n;var o,r=kn(t.split("&"));try{for(r.s();!(o=r.n()).done;){var i=o.value.split("="),l=me(i,2),a=l[0],s=l[1];n[decodeURIComponent(a)]=decodeURIComponent(s||"")}}catch(e){r.e(e)}finally{r.f()}for(var u={},c={},d=0,v=Object.entries(n);d<v.length;d++){var f=me(v[d],2),p=f[0],m=f[1];if(p.startsWith("ads."))u[p.replace(/^ads\./,"")]=m;else c[p]=m}return[u,c]}function Pn(e,n){return Dn.apply(this,arguments)}function Dn(){return Dn=K(z.mark(function e(n,t){var o,r,i,l,a,s,u,c;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:c=function(e,t,o,r,i,l){var c=l.redirectEl,d=l.redirectUrl,v=re(n);if(!v.seeking()){var f=t.startTimeInSeconds,p=t.durationInSeconds,m=Math.floor(v.currentTime()),y=Math.floor(f+p);m>=f&&m<=y&&d?(c.style.display="block",a(c,d)):c.style.display="none";var h,g=kn(o);try{for(g.s();!(h=g.n()).done;){var b,w,k,O=h.value,S=O.eventType,j=O.beaconUrls,T=O.startTimeInSeconds,I=(O.startTime,O.durationInSeconds,T||0),E=j,P=(null===(b=window)||void 0===b||null===(w=b.customData)||void 0===w||null===(k=w.ads)||void 0===k||k.adEventHandler,"".concat(I,"_").concat(S)),D=s.get("pod-".concat(i))||[];if(console.warn(e,I,"map:",S,"condition1:",e>=I,"map:",s),e>=I&&!D.includes(P)){D.push(P),s.set("pod-".concat(i),D);try{u(S,t,E,v)}catch(e){console.error("Error when calling triggerAdBeacon:",e,S,t)}}}}catch(e){g.e(e)}finally{g.f()}}},u=function(e,n,t,o){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(o.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){navigator.sendBeacon(e)})},a=function(e,n){l&&e.removeEventListener("click",l),l=function(){return window.open(n,"_blank")},e.addEventListener("click",l)},i=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},o=jn.get(),re(n).one("loadeddata",function(){o&&r(o)}),r=function(){var e=K(z.mark(function e(t){var o,r,l,a,u,d,v,f,p,m,y,h,g,b,w,k,O,S,j,T,I,E,P,D;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return O=function(e){document.removeEventListener("pointermove",k),document.removeEventListener("pointerup",O),0===e.button&&w()},k=function(e){},w=function(){var e,n=f.currentTime(),t=null,o=kn(v);try{for(o.s();!(e=o.n()).done;){var r=e.value,i=r.startTimeInSeconds,l=r.durationInSeconds,a=r.ads,s=Math.floor(i+l);(Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n>s||n>i)&&!y.has(i)||n>=i&&n<=s)&&(t=i,y.set(i,!0))}}catch(e){o.e(e)}finally{o.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){f.currentTime(t+.4)},100))},e.next=5,fetch(t);case 5:return a=e.sent,e.next=8,a.json();case 8:u=e.sent,d=u.avails,v=[],f=re(n),p=f.controlBar.progressControl,m=p.seekBar.el(),d.map(function(e){var n,t;v.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:(null==e||null===(n=e.adBreakTrackingEvents)||void 0===n||null===(t=n.filter(function(e){return"breakStart"==(null==e?void 0:e.eventType)}))||void 0===t?void 0:t[0])||[]})}),v.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,o=f.duration();if(!(n>o||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/o*100,i=document.createElement("div");i.className="vjs-seekbar-marker",i.style.left="".concat(r,"%"),i.style.position="absolute",i.style.top="0",i.style.bottom="0",i.style.width="2px",i.style.backgroundColor="#fecc09",i.style.left="".concat(r,"%"),i.style.pointerEvents="none",m.appendChild(i)}}),y=new Map,h=-1,g=(null==f||null===(o=f.controlBar)||void 0===o?void 0:o.getChild("videoSelector"))||null,b=(null==f||null===(r=f.controlBar)||void 0===r?void 0:r.getChild("seriesV2"))||null,f.on("timeupdate",ie(function(){var e=f.currentTime();if(e!==h){h=e;for(var n=!1,t=function(){var t=v[o],r=t.startTimeInSeconds,l=t.durationInSeconds,a=t.ads,u=r+l;if(e>=r-2.5&&e<=u+2.5){var d,f,m,h;e<=u&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>u&&y.set(r,!0),gn.disable(),g&&(g.el().style.pointerEvents="none",g.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),p.el().style.visibility="hidden";for(var w=e-r,k=0,O=0,j=0;j<a.length;j++){var T,I=null==a||null===(T=a[j])||void 0===T?void 0:T.durationInSeconds;if(w<k+I){O=j;break}k+=I}var E=a[O],x=w-k,A=Math.max(0,(null==E?void 0:E.durationInSeconds)-x),C=Math.round(A);S.style.display="block",P.textContent="".concat(O+1," of ").concat(a.length," • ").concat(i(C));var R=[];null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});R.push.apply(R,pe(n))}),Array.isArray(a)&&0==(null==a?void 0:a.length)&&R.push(null==t?void 0:t.podSlotImpressionBeacon);var L=(null==E||null===(d=E.trackingEvents)||void 0===d||null===(f=d.filter(function(e){var n;return null===(n=["clickThrough"])||void 0===n?void 0:n.includes(e.eventType)}))||void 0===f||null===(m=f[0])||void 0===m||null===(h=m.beaconUrls)||void 0===h?void 0:h[0])||null;return c(e,t,R,0,o,{redirectEl:D,redirectUrl:L}),"break"}s.delete("pod-".concat(o))},o=0;o<v.length;o++){if("break"===t())break}n||(S.style.display="none",p.el().style.visibility="visible",g&&(g.el().style.pointerEvents="auto",g.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),gn.enable())}},1e3)),p.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",k),document.addEventListener("pointerup",O))}),(S=document.createElement("div")).className="ssai-ad-container",(j=document.createElement("div")).className="sponsored-adbox",(T=document.createElement("div")).className="sponsored-text",T.textContent="Sponsored Ad",(I=document.createElement("div")).className="ad-info-icon",E=le(ye()),I.appendChild(E),j.append(T),j.append(I),(P=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",(D=document.createElement("div")).className="ad-visit-advertiser",D.textContent="Visit Advertiser",(null===(l=document.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])&&(D.style.right="8.6rem"),S.append(j),S.append(P),S.append(D),f.el().appendChild(S);case 49:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),s=new Map;case 10:case"end":return e.stop()}},e)})),Dn.apply(this,arguments)}function xn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function An(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?xn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):xn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var Cn=function(e,n,t,o){var r,i,s,u,d,v,f,p,w,k,O,S,j,T,I,E,P,D,x,A,C,R,L,N,_,M,V=n.res,U=void 0===V?null:V,B=n.sres,H=void 0===B?null:B,F=null!=t&&t.chromecastReceiverId?["chromecast","html5"]:["html5"],q=(null===(r=U)||void 0===r?void 0:r.contentType)||"video",W=ae(null===(i=U)||void 0===i||null===(s=i[q])||void 0===s||null===(u=s.gist)||void 0===u?void 0:u.videoImageUrl)||ae(null===(d=U)||void 0===d||null===(v=d[q])||void 0===v||null===(f=v.gist)||void 0===f||null===(p=f.imageGist)||void 0===p?void 0:p.r16x9),Q=(null===(w=U)||void 0===w||null===(k=w[q])||void 0===k||null===(O=k.liveDetails)||void 0===O?void 0:O.isDvrEnabled)||!1,X=(null===(S=U)||void 0===S||null===(j=S[q])||void 0===j||null===(T=j.streamingInfo)||void 0===T?void 0:T.isLiveStream)||!1,Y=m(U);U=An(An({},U),{},{audioAssetSource:null==t?void 0:t.audioAssetSource});var $="MEDIA_TAILOR"==(null===(I=window)||void 0===I||null===(E=I.app_data)||void 0===E||null===(P=E.appcmsMain)||void 0===P||null===(D=P.adsConfig)||void 0===D?void 0:D.vodAdSticherProvider)||!1,Z=(null==t?void 0:t.latency)||6,ee=(_={enableSmoothSeeking:!0,controls:0!=(null==t?void 0:t.controls),playsinline:!0,fluid:!0,aspectRatio:"16:9",muted:(null==t?void 0:t.muted)||!1,autoplay:(null==t?void 0:t.autoplay)||!1,controlBar:{volumePanel:{inline:!1},fullscreenToggle:!0,audioTrackButton:!0,pictureInPictureToggle:!1},muteToggle:"multiplayer"==t.skin,liveui:Q},G(_,"autoplay",null==t?void 0:t.autoplay),G(_,"normalizeAutoplay",(null==t?void 0:t.autoplay)&&!Y),G(_,"loop",(null==t?void 0:t.loop)||!1),G(_,"audioPosterMode",null==t?void 0:t.audioPosterMode),G(_,"html5",An(An({dash:An(An(An({},!J.browser.IS_SAFARI&&{useTTML:!0}),(null==t?void 0:t.debugConfig)&&(null==t||null===(x=t.debugConfig)||void 0===x?void 0:x.enable)&&{debug:!0,logLevel:null!=t&&null!==(A=t.debugConfig)&&void 0!==A&&A.logLevel?null==t||null===(C=t.debugConfig)||void 0===C?void 0:C.logLevel:"DEBUG"}),{},{updateSettings:{streaming:{delay:{liveDelay:Z},text:{defaultEnabled:!1},liveCatchup:{maxDrift:0,playbackRate:{min:-.1,max:.1}},abr:{useDefaultABRRules:!0,additionalAbrRules:{insufficientBufferRule:!0,switchHistoryRule:!0,droppedFramesRule:!0,abandonRequestsRule:!0},autoSwitchBitrate:{video:!0,audio:!0}}}}}),vhs:An(An({liveRangeSafeTimeDelta:Z,useDevicePixelRatio:!0,experimentalLLHLS:(null==t?void 0:t.lowLatency)||!1,limitRenditionByPlayerDimensions:!1,useNetworkInformationApi:!0},(null==t||null===(R=t.customData)||void 0===R?void 0:R.overrideNative)&&{overrideNative:!0}),{},{enableLowInitialPlaylist:!0}),debug:!0,nativeTextTracks:"Safari"==de()},0==(null==t||null===(L=t.customData)||void 0===L?void 0:L.nativeAudioTracks)&&{nativeAudioTracks:!1}),0==(null==t||null===(N=t.customData)||void 0===N?void 0:N.nativeVideoTracks)&&{nativeVideoTracks:!1})),G(_,"poster",W),G(_,"techOrder",F),G(_,"chromecast",{requestCustomDataFn:function(n){var t=re(e),o=((null==t?void 0:t.textTracksJson_)||t.textTracks().tracks_).filter(function(e){return"captions"==e.kind||"subtitles"==e.kind});return function(e,n,t){var o,r,i,l,a,s,u,c,d,v,f=(null==e?void 0:e.contentType)||"video",p={};if(e&&null!=e&&e[f]&&null!=e&&e[f].drmEnabled){var m,y,h,g,b,w,k,O;p.isDrmEnabled=!0;var S=(null==n||null===(m=n.keySystems)||void 0===m?void 0:m["com.widevine.alpha"])||null,j=(null==S?void 0:S.url)||(null==n||null===(y=n.keySystemOptions)||void 0===y||null===(h=y[0])||void 0===h||null===(g=h.options)||void 0===g?void 0:g.serverURL);p.licenseUrl=j;var T=(null==S?void 0:S.licenseHeaders["X-AxDRM-Message"])||(null==n||null===(b=n.keySystemOptions)||void 0===b||null===(w=b[0])||void 0===w||null===(k=w.options)||void 0===k||null===(O=k.httpRequestHeaders)||void 0===O?void 0:O["X-AxDRM-Message"]);p.licenseToken=T}var I=(null==e||null===(o=e[f])||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.contentType)||"VIDEO";p.contentType=I;var E=null==e||null===(i=e[f])||void 0===i||null===(l=i.gist)||void 0===l?void 0:l.runtime;p.duration=E;var P=null==e||null===(a=e[f])||void 0===a||null===(s=a.gist)||void 0===s?void 0:s.title;p.mediaTitle=P;var D=null==e||null===(u=e[f])||void 0===u||null===(c=u.gist)||void 0===c?void 0:c.videoImageUrl;return p.mediaImage=D,p.subTitles=t,p.DVR=(null==e||null===(d=e[f])||void 0===d||null===(v=d.liveDetails)||void 0===v?void 0:v.isDvrEnabled)||!1,console.log(p),p}(U,n,o)},modifyLoadRequestFn:function(n){var t,o,r,i,l,a=re(e),s=(null==a?void 0:a.currentSource())||{};!(null===(t=U)||void 0===t||null===(o=t[q])||void 0===o||null===(r=o.streamingInfo)||void 0===r||null===(i=r.videoAssets)||void 0===i?void 0:i.is4K)&&1||null!=s&&s.src&&null!=s&&null!==(l=s.src)&&void 0!==l&&l.includes(".m3u8")&&(n.media.hlsSegmentFormat="fmp4",n.media.hlsVideoSegmentFormat="fmp4");return n}}),_);if(!J.getPlayers()[e]){null!==(M=window)&&void 0!==M&&M.customData.isSmartTV&&(ee.spatialNavigation={enabled:!0,horizontalSeek:!0}),J.log.level("debug");var ne=J(e,ee,function(){var n=K(z.mark(function n(){var r,i,s,u,d,v,f,p,m,w,k,O,S,j,T,I,E,P,D,x,A;return z.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return console.log(ne),console.log(J.VERSION),console.log(J.getPlugins()),n.next=5,Re(t,U);case 5:if(null!==(r=window)&&void 0!==r&&r.customData.isSmartTV&&ne.spatialNavigation.start(),S=null===(i=U)||void 0===i||null===(s=i[q])||void 0===s||null===(u=s.liveDetails)||void 0===u?void 0:u.startOverTime,X&&o.resolve(An({status:!0,msg:"Player Initialised"},H?{seriesResponse:H,response:U}:{response:U})),h(e,null==t?void 0:t.analyticsCb),Ye(e,t),/Android/i.test(navigator.userAgent)&&(J.options.vhs.overrideNative=!0),Q&&je(e,S),!Y||null!=t&&null!==(d=t.customData)&&void 0!==d&&d.disableAds||g(e,Y,U),j=l(U,e),console.log(j),null!=t&&t.nearestClusterUrl&&(j=b(j,t.nearestClusterUrl)),!$){n.next=20;break}return n.next=19,Tn(e,U);case 19:j=n.sent;case 20:j?a(e,j):(o.reject({status:!1,msg:"Incompatible / Missing Source",response:U}),c(e,"Incompatible / Missing Source")),((null===(v=U)||void 0===v||null===(f=v[q])||void 0===f||null===(p=f.contentDetails)||void 0===p||null===(m=p.closedCaptions)||void 0===m?void 0:m.length)>0||(null===(w=U)||void 0===w||null===(k=w[q])||void 0===k||null===(O=k.closedCaptions)||void 0===O?void 0:O.length)>0)&&(A=(null===(I=U)||void 0===I||null===(E=I[q])||void 0===E||null===(P=E.contentDetails)||void 0===P?void 0:P.closedCaptions)||(null===(D=U)||void 0===D||null===(x=D[q])||void 0===x?void 0:x.closedCaptions),T=A.filter(function(e){return"VTT"===e.format}),te(e,T)),null!=t&&t.disableControls?y(e):$e(e,An(An(An({},t),ee),{},{liveVideo:X,isDvrEnabled:Q,res:U,sres:H})),mn(e,An(An(An({},t),ee),{},{liveVideo:X}),o,{res:U,sres:H});case 24:case"end":return n.stop()}},n)}));return function(){return n.apply(this,arguments)}}())}},Rn={spinco:"e8f2c1a7-5d94-4a1f-93ea-7c0b9186f1cd"};function Ln(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,o)}return t}function Nn(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?Ln(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ln(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var _n,Mn=function(e,n){var t=n.resolve,o=n.reject,r=null==e?void 0:e.playerId,i=Vn(e);Cn(r,{res:i},e,{resolve:t,reject:o})},Vn=function(e){var n,t,o=null==e?void 0:e.streamingInfo,r=null==e||null===(n=e.streamingInfo)||void 0===n?void 0:n.videoAssets,i=(null==e||null===(t=e.streamingInfo)||void 0===t?void 0:t.isDrmEnabled)||null,l=null==e?void 0:e.token,a=w(l),s=null==a?void 0:a.site;return Nn(Nn({id:null==Rn?void 0:Rn[s]},!i&&{directPlaybackUrl:null==r?void 0:r.url}),{},{video:{drmEnabled:i,streamingInfo:{videoAssets:{widevine:null==r?void 0:r.widevine,fairPlay:null==r?void 0:r.fairPlay,playReady:null==r?void 0:r.playReady}},liveDetails:{isDvrEnabled:null==o?void 0:o.isDvrEnabled}}})};function Un(e,n){return Bn.apply(this,arguments)}function Bn(){return(Bn=K(z.mark(function e(n,t){var o,r,i,l,a,u;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,i=null==n?void 0:n.videoId,l=null==n?void 0:n.playerId,a=!(null==n||!n.anonymousId),e.next=6,j();case 6:u=e.sent,k(i,u).then(function(e){var t,c,d,v;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(c=t.video)||void 0===c||null===(d=c.gist)||void 0===d?void 0:d.contentType,s(null==e?void 0:e.data);var f,p=null==e?void 0:e.data;if(null!=n&&n.watchHistory&&null!=n&&null!==(v=n.watchHistory)&&void 0!==v&&v.enable&&!a)if((null===(f=n.watchHistory)||void 0===f?void 0:f.saveOffline)||!1){var m,y,h,g=an((null===(m=n.watchHistory)||void 0===m?void 0:m.profileId)||"",i,null==n?void 0:n.siteOwner);if(g&&g.length)n.watchHistoryResumeTime=(null===(y=g[0])||void 0===y?void 0:y.watchedTime)||null,n.watchedPercentage=(null===(h=g[0])||void 0===h?void 0:h.watchedPercentage)||null;p.contentType="video",Cn(l,{res:p},n,{resolve:o,reject:r})}else O(i,u).then(function(e){var t,o,r,i,l,a;null!==(t=window)&&void 0!==t&&null!==(o=t.watchHistory)&&void 0!==o&&o.cb&&(null===(r=window)||void 0===r||null===(i=r.watchHistory)||void 0===i||i.cb(null==e?void 0:e.data)),n.watchHistoryResumeTime=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null,n.watchedPercentage=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null,p.contentType="video"}).catch(function(e){var n,t,o,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(o=window)||void 0===o||null===(r=o.watchHistory)||void 0===r||r.cb(e))}).finally(function(){Cn(l,{res:p},n,{resolve:o,reject:r})});else Cn(l,{res:p},n,{resolve:o,reject:r})}).catch(function(e){S(e,l,r,i)});case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Hn(e,n){return Fn.apply(this,arguments)}function Fn(){return(Fn=K(z.mark(function e(n,t){var o,r,i,l,a;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.resolve,r=t.reject,e.next=3,j();case 3:i=e.sent,l=null==n?void 0:n.playerId,a=null==n?void 0:n.epg,T(a,i).then(function(e){var t=null==e?void 0:e.data;t.contentType="linearchannel",t.channelId=null==a?void 0:a.channelId,Cn(l,{res:t},n,{resolve:o,reject:r})}).catch(function(e){S(e,l,r,videoId)});case 7:case"end":return e.stop()}},e)}))).apply(this,arguments)}function qn(e,n){return Gn.apply(this,arguments)}function Gn(){return(Gn=K(z.mark(function e(n,t){var o,r,i,l,a,u,c;return z.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.resolve,i=t.reject,e.next=3,j();case 3:l=e.sent,a=null==n?void 0:n.playerId,u=sessionStorage.getItem("season-idx")||0,P.set(parseInt(u)),c=null==n||null===(o=n.series)||void 0===o?void 0:o.id,I(c,l).then(function(e){var t,o,u,d=e.data,v=e.data.seasons;D(v);var f=videoId||(null==v||null===(t=v[0])||void 0===t||null===(o=t.episodes)||void 0===o||null===(u=o[0])||void 0===u?void 0:u.id);E(c,l),k(f,l).then(function(e){var t,o,l;window.contentType=null==e||null===(t=e.data)||void 0===t||null===(o=t.video)||void 0===o||null===(l=o.gist)||void 0===l?void 0:l.contentType,s(e.data),Cn(a,{res:null==e?void 0:e.data,sres:d},n,{resolve:r,reject:i})}).catch(function(e){S(e,a,i,videoId)})}).catch(function(e){S(e,a,i)});case 9:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Kn(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?Kn(Object(t),!0).forEach(function(n){G(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Kn(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function Jn(){return{loadVideoInstantly:x,onTimeUpdate:W,getVideoDuration:Q,getVideoCurrentTime:X,onVideoEnded:Y,init:function(e){return console.log("%c VIDEOJS-8 ","background: #bdf369; color: #000"),new Promise(function(){var n=K(z.mark(function n(t,o){var r,i,l,a,s,u,c,d,v,f,p,m,y,h,g,b,w,O,j,T,I,E,P;return z.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(!L(null==e?void 0:e.playerId)){n.next=2;break}return n.abrupt("return");case 2:if(p=(null==e?void 0:e.videoSourceUrl)||!1,m=null==e?void 0:e.asat,y=(null==e||null===(r=e.epg)||void 0===r?void 0:r.enable)||!1,h=null==e?void 0:e.videoId,g=(null==e||null===(i=e.series)||void 0===i?void 0:i.enable)||!1,b=(null==e?void 0:e.streamingInfo)||!1,window.videoId=h,w=null==e?void 0:e.token,!B(e)){n.next=17;break}if(sessionStorage.setItem("vlp_token",w),H().set(null==e?void 0:e.refreshToken),w&&!F(w)){n.next=16;break}return o({status:!1,msg:"".concat(w?"Token is expired !":"Missing Authorization Token"),response:{token:w}}),n.abrupt("return");case 16:_n=JSON.parse(atob(w.split(".")[1]));case 17:return e.isAnonymousUser=!(null===(l=_n)||void 0===l||!l.anonymousId),e.siteOwner=(null===(a=_n)||void 0===a?void 0:a.site)||null,e.userId=(null===(s=_n)||void 0===s?void 0:s.userId)||null,window.sessionStorage.setItem("uid",null===(u=_n)||void 0===u?void 0:u.userId),window.watchHistory=e.watchHistory||null,O=null==e?void 0:e.playerId,e.chromecastReceiverId=null!=e&&null!==(c=e.series)&&void 0!==c&&c.enable?null:null==e?void 0:e.chromecastReceiverId,j=(null==e||null===(d=e.analytics)||void 0===d?void 0:d.gaId)||null,(T=null==e?void 0:e.errors)&&(window.customErrors=T),window.customData=null==e?void 0:e.customData,ve(null==e||null===(v=e.customData)||void 0===v?void 0:v.localisation),U.set(e.apiBaseUrl),null!=e&&e.skin&&!se(e.skin)||(e.skin="VL_ONE"),n.next=33,Ae(e);case 33:j&&he("https://www.googletagmanager.com/gtag/js?id=".concat(j)).then(function(){return q(j)}).catch(function(e){}),(I=null===(f=document)||void 0===f?void 0:f.getElementById("".concat(O)))&&I.addEventListener("contextmenu",function(e){return e.preventDefault()}),p?(P={directPlaybackUrl:p,id:E="c09576ca-8202-4e8e-ba1e-06d1ab0ce063"},m?k(E,w).then(function(n){var r=(null==n?void 0:n.data)||{};Cn(O,{res:zn(zn({},r),P)},e,{resolve:t,reject:o})}).catch(function(e){S(e,O,o,E)}):Cn(O,{res:P},e,{resolve:t,reject:o})):b?Mn(e,{resolve:t,reject:o}):g?qn(e,{resolve:t,reject:o}):y?Hn(e,{resolve:t,reject:o}):Un(e,{resolve:t,reject:o});case 37:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}())},getRenditions:ue,skip:v,getPlayer:re,play:A,pause:C,isPaused:R,detectBrowser:de,rewind:f,loadVideo:a,seekToTimeStamp:$,isPlayerInitialised:L,load:N,authenticateLC:_,dispose:M,enableCaptions:oe,disableCaptions:ne,getCaptions:ee,getAudioTracks:be,enableAudioTrack:we,playSelectedResolution:ce,getSource:l,setVolume:ke,getVolume:Oe,disableControls:y,setPlaybackSpeed:Z,getEntitlementData:V}}export{Jn as V,yn as i,Pn as s};