@viewlift/player-backup 2.0.93-smartTv → 2.0.94-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 (53) hide show
  1. package/cjs/{autoNextVideo-9449cbfe.js → autoNextVideo-5b8fdd6b.js} +1 -1
  2. package/cjs/bundle.css +148 -148
  3. package/cjs/{features-30281e69.js → features-82c34ced.js} +1 -1
  4. package/cjs/{generic-5a02e10b.js → generic-b5f982ea.js} +1 -1
  5. package/cjs/{index-43ea5276.js → index-2e96841d.js} +1 -1
  6. package/cjs/{index-af17d1c6.js → index-4957341d.js} +1 -1
  7. package/cjs/index.js +1 -1
  8. package/cjs/{multicamv2-083e32a2.js → multicamv2-1d5af2a7.js} +1 -1
  9. package/cjs/{multicamv2-a11ec67d.js → multicamv2-7e821035.js} +1 -1
  10. package/cjs/{nextEpisodeButton-92dd01f2.js → nextEpisodeButton-d3b19f53.js} +1 -1
  11. package/cjs/{playlist-f8d8b7c1.js → playlist-f4807704.js} +1 -1
  12. package/cjs/renditions-e532b53a.js +1 -0
  13. package/cjs/{series-8302ae1c.js → series-adc750f1.js} +1 -1
  14. package/cjs/{series-v2-44d65351.js → series-v2-4ee331bf.js} +1 -1
  15. package/cjs/{series-v2-6f59a489.js → series-v2-e6524c77.js} +1 -1
  16. package/cjs/{settings-icon-2da8dc4f.js → settings-icon-2e475bdd.js} +1 -1
  17. package/cjs/{skin-0502267f.js → skin-0427933f.js} +1 -1
  18. package/cjs/{skin-be700778.js → skin-431a6b65.js} +1 -1
  19. package/cjs/{skin-63183b5b.js → skin-615f73ab.js} +1 -1
  20. package/cjs/{skin-b202beae.js → skin-869192f6.js} +1 -1
  21. package/cjs/{skin-e4f1b4e2.js → skin-a6eb4bb5.js} +1 -1
  22. package/cjs/{skin-7e096cd2.js → skin-aa6805be.js} +1 -1
  23. package/cjs/{skin-53f5f63d.js → skin-f854dcc6.js} +1 -1
  24. package/cjs/{videoSelector-34d1c075.js → videoSelector-1417d949.js} +1 -1
  25. package/cjs/{videoSelector-a54bea51.js → videoSelector-a18e0bb4.js} +1 -1
  26. package/esm/{autoNextVideo-2a251071.js → autoNextVideo-caf055cd.js} +1 -1
  27. package/esm/bundle.css +148 -148
  28. package/esm/{features-5a403413.js → features-4b63c2f8.js} +1 -1
  29. package/esm/{generic-403acd7f.js → generic-882d1361.js} +1 -1
  30. package/esm/{index-0fe05289.js → index-d3d46b66.js} +1 -1
  31. package/esm/{index-adaa903b.js → index-ecd8c093.js} +1 -1
  32. package/esm/index.js +1 -1
  33. package/esm/{multicamv2-764bbccd.js → multicamv2-8d79febd.js} +1 -1
  34. package/esm/{multicamv2-49eb5c11.js → multicamv2-cac9eb87.js} +1 -1
  35. package/esm/{nextEpisodeButton-55f35341.js → nextEpisodeButton-a04db7be.js} +1 -1
  36. package/esm/{playlist-ef940460.js → playlist-6fccbc60.js} +1 -1
  37. package/esm/renditions-34a3a9b2.js +1 -0
  38. package/esm/{series-1ebc053a.js → series-74ae195b.js} +1 -1
  39. package/esm/{series-v2-03df2d8f.js → series-v2-2dfcfbb6.js} +1 -1
  40. package/esm/{series-v2-032182e6.js → series-v2-b8a48ab2.js} +1 -1
  41. package/esm/{settings-icon-e237364c.js → settings-icon-2f23e07c.js} +1 -1
  42. package/esm/{skin-4f582bc9.js → skin-0721d5fe.js} +1 -1
  43. package/esm/{skin-b50893be.js → skin-563fe6d0.js} +1 -1
  44. package/esm/{skin-06e5cc26.js → skin-6ca381b7.js} +1 -1
  45. package/esm/{skin-8e5ae9f4.js → skin-c44476f3.js} +1 -1
  46. package/esm/{skin-f63ed162.js → skin-d8b50916.js} +1 -1
  47. package/esm/{skin-fe4ac786.js → skin-e9dc44d9.js} +1 -1
  48. package/esm/{skin-1f8fb058.js → skin-e9fb655d.js} +1 -1
  49. package/esm/{videoSelector-515067b5.js → videoSelector-0c313517.js} +1 -1
  50. package/esm/{videoSelector-9256d814.js → videoSelector-59722451.js} +1 -1
  51. package/package.json +1 -1
  52. package/cjs/renditions-ce5f817d.js +0 -1
  53. package/esm/renditions-5c744382.js +0 -1
package/esm/bundle.css CHANGED
@@ -2,153 +2,6 @@
2
2
 
3
3
 
4
4
 
5
-
6
-
7
- .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
8
- height: 0.7em;
9
- position: absolute;
10
- top: -0.7em;
11
- width: 100%;
12
- }
13
-
14
- .video-js.skin_vlone .vjs-progress-holder.vjs-slider.vjs-slider-horizontal {
15
- height: 100%;
16
- }
17
-
18
- .video-js.skin_vlone .vjs-play-progress:before {
19
- display: none !important;
20
- }
21
-
22
- .video-js.skin_vlone .vjs-progress-control>.vjs-progress-holder.vjs-slider {
23
- margin: 0 !important;
24
-
25
- }
26
-
27
-
28
- .video-js.skin_vlone .vjs-custom-control-spacer {
29
- display: block;
30
- flex: 1 1 auto;
31
- }
32
-
33
- .video-js.skin_vlone .vjs-volume-panel.vjs-volume-panel-vertical{
34
- z-index: 1;
35
- }
36
-
37
-
38
- .video-js.skin_vlone .vjs-control-bar {
39
- height: 40px;
40
- }
41
-
42
- .video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before,
43
- .vjs-button>.vjs-icon-placeholder:before {
44
- position: relative !important;
45
- }
46
- .video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before{
47
- display: flex;
48
- left: 0px;
49
- top: -1px;
50
- }
51
-
52
- .vjs-button>.vjs-icon-placeholder:before {
53
- font-size: 2em !important;
54
- }
55
-
56
- .video-js.skin_vlone .vjs-control {
57
- width: 4.3em;
58
- }
59
-
60
- .vjs-menu-button-popup .vjs-menu {
61
- bottom: 10px !important;
62
- }
63
-
64
-
65
- .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control:hover {
66
- height: 1.3em;
67
- position: absolute;
68
- top: -1.3em;
69
- transition: height 0.3s, top 0.3s;
70
- }
71
-
72
-
73
- .video-js.skin_vlone.vjs-live .vjs-time-control{
74
- display: none !important;
75
- }
76
-
77
- .video-js.skin_vlone .vjs-time-control {
78
- display: block;
79
- }
80
- .video-js.skin_vlone .vjs-remaining-time {
81
- display: none;
82
- }
83
-
84
- .video-js.skin_vlone .vjs-remaining-time.vjs-time-control.vjs-control>span.vjs-remaining-time-display {
85
- line-height: 3.5em;
86
- font-size: 1.1em;
87
- min-width: 4em;
88
- }
89
-
90
- .video-js.skin_vlone .vjs-time-divider > div{
91
- display: flex;
92
- justify-content: center;
93
- }
94
-
95
- .video-js.skin_vlone .vjs-live-control{
96
- align-items: center;
97
- }
98
- .video-js.skin_vlone .vjs-live-display{
99
- height: 2.2em;
100
- display: flex;
101
- align-items: center;
102
- font-family: monospace;
103
- width: 4em;
104
- justify-content: center;
105
- background: red;
106
- margin: 4px 0px 4px 12px;
107
- }
108
-
109
- .video-js.skin_vlone .vjs-time-control {
110
- line-height: 3.5em !important;
111
- font-size: 1.1em !important;
112
- width: min-content !important;
113
- min-width: 1.5em;
114
- padding: 0 !important;
115
- user-select: none;
116
- }
117
-
118
- .video-js.skin_vlone .vjs-current-time.vjs-time-control.vjs-control {
119
- margin-left: 16px !important;
120
- }
121
-
122
-
123
- /* Big play */
124
- .video-js.skin_vlone.vjs-paused .vjs-big-play-button {
125
- width: 80px;
126
- height: 80px;
127
- display: flex;
128
- justify-content: center;
129
- align-items: center;
130
- border: none;
131
- position: absolute;
132
- top: 0;
133
- left: 0;
134
- right: 0;
135
- bottom: 0;
136
- margin: auto;
137
- font-size: 5em;
138
- line-height: 1.3em;
139
- transform: none !important;
140
- border-radius: 1.3em;
141
- }
142
-
143
-
144
- @media(max-width:600px){
145
- .video-js.skin_vlone button.vjs-big-play-button {
146
- width: 50px !important;
147
- height: 50px !important;
148
- font-size: 2.1rem !important;
149
- }
150
- }
151
-
152
5
  /*
153
6
  * Styles the icon size and line height for button icons in the SmartTV skin.
154
7
  *
@@ -1708,6 +1561,153 @@ iframe {
1708
1561
 
1709
1562
 
1710
1563
 
1564
+
1565
+
1566
+ .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control {
1567
+ height: 0.7em;
1568
+ position: absolute;
1569
+ top: -0.7em;
1570
+ width: 100%;
1571
+ }
1572
+
1573
+ .video-js.skin_vlone .vjs-progress-holder.vjs-slider.vjs-slider-horizontal {
1574
+ height: 100%;
1575
+ }
1576
+
1577
+ .video-js.skin_vlone .vjs-play-progress:before {
1578
+ display: none !important;
1579
+ }
1580
+
1581
+ .video-js.skin_vlone .vjs-progress-control>.vjs-progress-holder.vjs-slider {
1582
+ margin: 0 !important;
1583
+
1584
+ }
1585
+
1586
+
1587
+ .video-js.skin_vlone .vjs-custom-control-spacer {
1588
+ display: block;
1589
+ flex: 1 1 auto;
1590
+ }
1591
+
1592
+ .video-js.skin_vlone .vjs-volume-panel.vjs-volume-panel-vertical{
1593
+ z-index: 1;
1594
+ }
1595
+
1596
+
1597
+ .video-js.skin_vlone .vjs-control-bar {
1598
+ height: 40px;
1599
+ }
1600
+
1601
+ .video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before,
1602
+ .vjs-button>.vjs-icon-placeholder:before {
1603
+ position: relative !important;
1604
+ }
1605
+ .video-js.skin_vlone .vjs-big-play-button .vjs-icon-placeholder:before{
1606
+ display: flex;
1607
+ left: 0px;
1608
+ top: -1px;
1609
+ }
1610
+
1611
+ .vjs-button>.vjs-icon-placeholder:before {
1612
+ font-size: 2em !important;
1613
+ }
1614
+
1615
+ .video-js.skin_vlone .vjs-control {
1616
+ width: 4.3em;
1617
+ }
1618
+
1619
+ .vjs-menu-button-popup .vjs-menu {
1620
+ bottom: 10px !important;
1621
+ }
1622
+
1623
+
1624
+ .video-js.skin_vlone .vjs-control-bar .vjs-progress-control.vjs-control:hover {
1625
+ height: 1.3em;
1626
+ position: absolute;
1627
+ top: -1.3em;
1628
+ transition: height 0.3s, top 0.3s;
1629
+ }
1630
+
1631
+
1632
+ .video-js.skin_vlone.vjs-live .vjs-time-control{
1633
+ display: none !important;
1634
+ }
1635
+
1636
+ .video-js.skin_vlone .vjs-time-control {
1637
+ display: block;
1638
+ }
1639
+ .video-js.skin_vlone .vjs-remaining-time {
1640
+ display: none;
1641
+ }
1642
+
1643
+ .video-js.skin_vlone .vjs-remaining-time.vjs-time-control.vjs-control>span.vjs-remaining-time-display {
1644
+ line-height: 3.5em;
1645
+ font-size: 1.1em;
1646
+ min-width: 4em;
1647
+ }
1648
+
1649
+ .video-js.skin_vlone .vjs-time-divider > div{
1650
+ display: flex;
1651
+ justify-content: center;
1652
+ }
1653
+
1654
+ .video-js.skin_vlone .vjs-live-control{
1655
+ align-items: center;
1656
+ }
1657
+ .video-js.skin_vlone .vjs-live-display{
1658
+ height: 2.2em;
1659
+ display: flex;
1660
+ align-items: center;
1661
+ font-family: monospace;
1662
+ width: 4em;
1663
+ justify-content: center;
1664
+ background: red;
1665
+ margin: 4px 0px 4px 12px;
1666
+ }
1667
+
1668
+ .video-js.skin_vlone .vjs-time-control {
1669
+ line-height: 3.5em !important;
1670
+ font-size: 1.1em !important;
1671
+ width: min-content !important;
1672
+ min-width: 1.5em;
1673
+ padding: 0 !important;
1674
+ user-select: none;
1675
+ }
1676
+
1677
+ .video-js.skin_vlone .vjs-current-time.vjs-time-control.vjs-control {
1678
+ margin-left: 16px !important;
1679
+ }
1680
+
1681
+
1682
+ /* Big play */
1683
+ .video-js.skin_vlone.vjs-paused .vjs-big-play-button {
1684
+ width: 80px;
1685
+ height: 80px;
1686
+ display: flex;
1687
+ justify-content: center;
1688
+ align-items: center;
1689
+ border: none;
1690
+ position: absolute;
1691
+ top: 0;
1692
+ left: 0;
1693
+ right: 0;
1694
+ bottom: 0;
1695
+ margin: auto;
1696
+ font-size: 5em;
1697
+ line-height: 1.3em;
1698
+ transform: none !important;
1699
+ border-radius: 1.3em;
1700
+ }
1701
+
1702
+
1703
+ @media(max-width:600px){
1704
+ .video-js.skin_vlone button.vjs-big-play-button {
1705
+ width: 50px !important;
1706
+ height: 50px !important;
1707
+ font-size: 2.1rem !important;
1708
+ }
1709
+ }
1710
+
1711
1711
  /* CSS for videojs-dvr-seekbar */
1712
1712
 
1713
1713
  .video-js.vjs-dvr-seekbar {
@@ -1880,6 +1880,7 @@ iframe {
1880
1880
 
1881
1881
 
1882
1882
 
1883
+
1883
1884
  .video-js .multicamera-parent.default{
1884
1885
  height: 345px;
1885
1886
  position: absolute;
@@ -1963,7 +1964,6 @@ iframe {
1963
1964
 
1964
1965
 
1965
1966
 
1966
-
1967
1967
  /* nextep */
1968
1968
  .next-ep-preview{
1969
1969
  position: absolute;
@@ -1 +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-403acd7f.js";import{g as c}from"./renditions-5c744382.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-55f35341.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-1ebc053a.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-9256d814.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-76bbd9ca.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-e237364c.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-ef940460.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-03df2d8f.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-764bbccd.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-515067b5.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-032182e6.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-49eb5c11.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};
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-882d1361.js";import{g as c}from"./renditions-34a3a9b2.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-a04db7be.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-74ae195b.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-59722451.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-76bbd9ca.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-2f23e07c.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-6fccbc60.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-2dfcfbb6.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-8d79febd.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-0c313517.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-b8a48ab2.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-cac9eb87.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};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n 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-0280b028.js";function m(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,t){m("event",e,t)}var I={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 g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function w(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?g(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var E={name:"@viewlift/player-backup",version:"2.0.93-smartTv",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0",install:"^0.13.0","js-cookie":"^3.0.5",npm:"^11.5.2","ua-parser-js":"^2.0.3","video.js":"7.21.7","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-contrib-quality-menu":"^1.0.3","videojs-mux":"^4.21.7"}};window.vl_player_version=E.version;var T,h=function(e,t){var n,i,r,l,a,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(a=window)&&void 0!==a&&null!==(d=a.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":O.get()+"".concat(null==I?void 0:I.getVideoDetails),params:w({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,t){var n,i,r,l;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:O.get()+I.getLinearChannelDetails,params:w(w(w(w(w({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,t){var n,i,r=k(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):o({url:O.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},F=function(){var e=t(n.mark(function e(t){var i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return i=e.sent,e.abrupt("return",o({url:O.get()+"".concat(null==I?void 0:I.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:w({},t),params:w({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),b=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:O.get()+"".concat(null==I?void 0:I.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},D=function(e){var t=e.videoId;return o({method:"GET",url:O.get()+"".concat(null==I?void 0:I.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},O=(T=null==I?void 0:I.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),L=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},S=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},V=null;function R(){return{set:function(e){e&&(V=e)},get:function(){return V}}}var W,P,C,A,N,x,j=function(){var e=t(n.mark(function e(){var t,i,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=R().get(),i=O.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),B=null,U=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!S(t)){e.next=6;break}return B||(B=j().then(function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&R().set(r),o||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){B=null})),e.abrupt("return",B);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),M=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},k=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){P=e},z=function(){return P},G=function(e){W=e},Y=function(){return W},X=function(){return C},q=function(e){C=e},J=function(){return N},K=function(e){A=new Map,e.map(function(e,t){A.set(e.id,t)})},Q=function(e){if(A){var t=A.get(e);q(t+1)}},Z=(x=0,{set:function(e){e>=0&&(x=e)},get:function(){return x}});function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var te=0,ne=function(){var e,t,n,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===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function 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=t(n.mark(function e(){var t,i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function 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 t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":ne(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&te<4)te++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,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:ne()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,o,r,l;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),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:ne()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(te=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(de(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var de=function(e,t,n){return e>=t&&e<=n};function ue(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}}window.fireEvent=function(){var e=t(n.mark(function e(t){var i,r,l,a,d,u,s,c,v,m,f,p,g,w,E,T,h,y,_,F;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();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=ne(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?ae(t.adPosition):"",e.next=26,re();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.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==t?void 0:t.duration)&&{duration:t.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),F=[e.t31],o({url:(null===(g=window)||void 0===g||null===(w=g.customData)||void 0===w||null===(E=w.beacon)||void 0===E?void 0:E.url)||O.get()+I.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var se=function(e,t){var n=new Map;D({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=n}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,t,n,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===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function fe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?me(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}window._deviceInfo=s(navigator.userAgent);var pe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},Ie=function(e){var t=ge(e,"video.tags",[]),n=ge(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},ge=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},we=function(){var e,t,n,i,o,l,a,d,s,c,v,m,f,p,I,g,w,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",F=arguments.length>1?arguments[1]:void 0,b=arguments.length>2?arguments[2]:void 0,D=(null==b?void 0:b.siteName)||"",O=(null==b?void 0:b.contentType)||"video",L=(null==b||null===(e=b[O])||void 0===e?void 0:e.metadata)||(null==b||null===(t=b[O])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),S=r(F);if(!_.includes("VIEWLIFT_"))return _;var V,R=window.getComputedStyle(document.getElementById(F),null),W=Math.trunc(R.getPropertyValue("height").slice(0,-2)),P=Math.trunc(R.getPropertyValue("width").slice(0,-2)),C="linearchannel"===O?null==b||null===(i=b.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==b?void 0:b.channelId)}))||void 0===l||null===(a=l.content)||void 0===a?void 0:a.id:ge(b,"video.gist.id",""),A="linearchannel"===O?null==b||null===(d=b.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==b?void 0:b.channelId)}))||void 0===c?void 0:c.title:ge(b,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,x=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",function(e){N=null==e?void 0:e.gppString,x=null==e?void 0:e.sectionList[0]}));var j=fe(fe({},Ee(L)),{},{VIEWLIFT_WIDTH:P,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:pe(P,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ge(b,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==S||null===(m=S.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==S||null===(f=S.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:Ie(b),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ge(b,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ge(b,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ge(null===(p=window)||void 0===p||null===(I=p.app_data)||void 0===I||null===(g=I.site)||void 0===g?void 0:g.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D?"":ge(null===(w=window)||void 0===w||null===(E=w.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*ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:ge(b,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ge(b,"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:Ie(b),VIEWLIFT_GPP_SID:x||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var B in j){var U=new RegExp(B,"g");_=_.replace(U,j[B])}return _},Ee=function(e){var t,n,i,o,r,l,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return Te(e);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===(n=window)||void 0===n||null===(i=n.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 t,n,i,o,r,l,a={},d=new Map;return(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)})),null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i||i.SVOD,(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?"lgTv"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):"lgTv"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.firetv.dtc")||"",VIEWLIFT_PROF:d.get("prof.firetv")||""})):(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})),a},he=function(e){var t=null;try{var n,i,o,r,l,a,d,u,s,c,v,m,f,p,I,g,w,E,T,h,y,_,F,b,D,O,L,S,V,R,W,P,C,A,N,x,j;if(null!==(n=window)&&void 0!==n&&n.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)t=null==e||null===(O=e.ads)||void 0===O||null===(L=O.preRoll)||void 0===L||null===(S=L.adTags)||void 0===S||null===(V=S.samsung_tv)||void 0===V?void 0:V.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 B,U,M,k;t=null==e||null===(B=e.ads)||void 0===B||null===(U=B.preRoll)||void 0===U||null===(M=U.adTags)||void 0===M||null===(k=M.lg_tv)||void 0===k?void 0:k.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 H,z,G,Y;t=null==e||null===(H=e.ads)||void 0===H||null===(z=H.preRoll)||void 0===z||null===(G=z.adTags)||void 0===G||null===(Y=G.vizioTv)||void 0===Y?void 0:Y.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(I=p.preRoll)&&void 0!==I&&null!==(g=I.adTags)&&void 0!==g&&null!==(w=g.xbox)&&void 0!==w&&w.active){var X,q,J,K;t=null==e||null===(X=e.ads)||void 0===X||null===(q=X.preRoll)||void 0===q||null===(J=q.adTags)||void 0===J||null===(K=J.xbox)||void 0===K?void 0:K.url}else if("xbox"==window.customData.device&&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.xbox)&&void 0!==y&&y.active){var Q,Z,$,ee;t=null==e||null===(Q=e.ads)||void 0===Q||null===(Z=Q.preRoll)||void 0===Z||null===($=Z.adTags)||void 0===$||null===(ee=$.xbox)||void 0===ee?void 0:ee.url}else if("FireTV"==window.customData.device&&null!=e&&null!==(_=e.ads)&&void 0!==_&&null!==(F=_.preRoll)&&void 0!==F&&null!==(b=F.adTags)&&void 0!==b&&null!==(D=b.firetv)&&void 0!==D&&D.active){var te,ne,ie,oe;t=null==e||null===(te=e.ads)||void 0===te||null===(ne=te.preRoll)||void 0===ne||null===(ie=ne.adTags)||void 0===ie||null===(oe=ie.firetv)||void 0===oe?void 0:oe.url}}else t=(null==e||null===(R=e.ads)||void 0===R||null===(W=R.preRoll)||void 0===W||null===(P=W.adTags)||void 0===P||null===(C=P.web)||void 0===C?void 0:C.active)&&(null==e||null===(A=e.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(x=N.adTags)||void 0===x||null===(j=x.web)||void 0===j?void 0:j.url)}catch(e){}return t},ye=function(e,t){var n,i,o,r,l,a,u,s,c,v,m,f,p,I=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[I])||void 0===n?void 0:n.drmEnabled,w=null==e||null===(i=e[I])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[I])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(a=e[I])||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[I])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[I])||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 Fe(E);if(g){var y=be(w,t);return y.src=we(y.src,t,e),y}if("Safari"!==d()&&h){var _=_e(w);return _.src=we(_.src,t,e),_}if(T){var F=Fe(w);return F.src=we(F.src,t,e),F}if(null!=w&&w.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(w);return b.src=we(b.src,t,e),b}return null},_e=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},Fe=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},be=function(e,t){var n=e.fairPlayCmaf||e.fairPlay,o=e.widevine,l=e.playReady,a=d();if(r(t),"Safari"===a){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(n);return De(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(De(t),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url: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 De=function(e){var t=r(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==d()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Oe=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Le=function(e,t){if(import("./error-2395864b.js").then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},Se=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Ve=!1,Re=function(e,t,n){var i=we(t,e,n),o=r(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,l=r(e);if(null!==l.el_){Ve=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Ve&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var Pe=function(e){i(e).play()},Ce=function(e){i(e).pause()},Ae=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ne=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},xe=function(e){return!!i.getPlayer("".concat(e))},je=function(e){return i(e).paused()},Be=function(){var e=t(n.mark(function e(t,i){var o,l,a,d=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,U();case 3:return l=e.sent,a=r(t),e.abrupt("return",new Promise(function(e,n){y(i,l).then(function(n){var r=null==n?void 0:n.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ye(r,t);H(r),l&&o?(ze(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Ue=function(){var e=t(n.mark(function e(t,i){var o,l,a,d,u,s,m=arguments;return n.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,U();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&&b(i,d).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),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 t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,n){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&&Re(t,m,a);var f=ye(a,t);if(f){var p,I,g,w,E,T,h,y,_,F,b,D,O,L,S=(null==a||null===(p=a.video)||void 0===p||null===(I=p.gist)||void 0===I?void 0:I.videoImageUrl)||(null==a||null===(g=a.video)||void 0===g||null===(w=g.gist)||void 0===w||null===(E=w.imageGist)||void 0===E?void 0:E.r16x9),V=r(t);if(V.poster(S),ze(t,f),V.on("loadstart",function(){d&&e({status:!0,msg:"Video Loaded",response:a})}),V.on("loadeddata",function(){Se(),e({status:!0,msg:"Video Loaded",response:a})}),V.one("play",function(){u&&s<95&&setTimeout(function(){V.currentTime(u)},0)}),V.one("error",function(){var e;n({status:!1,msg:(null==V||null===(e=V.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===(F=_.closedCaptions)||void 0===F?void 0:F.length)>0)b=((null==a||null===(D=a.video)||void 0===D||null===(O=D.contentDetails)||void 0===O?void 0:O.closedCaptions)||(null==a||null===(L=a.video)||void 0===L?void 0:L.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(t,b);else v(t)}else Le(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){Ge(e,t,n,i)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Me=function(e,t,n){var i=r(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},ke=function(e){var t=r(e);if(He(),l(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.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,t){var n=r(e);n&&n.src(t)},Ge=function(t,n,i,o){var r,l,a,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);xe(n)&&Le(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?We(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):We(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},Ye=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{_ as A,se as B,Z as C,G as D,Me as E,Pe as F,Ce as G,je as H,xe as I,Ue as J,Be as K,ke as L,L as M,O as N,M as O,R as P,S as Q,f as R,X as S,q as T,D 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,Se as h,Le as i,J as j,Ae as k,ze as l,we as m,he as n,Ye as o,ue as p,Re as q,Ne as r,F as s,Oe as t,k as u,h as v,b as w,Ge as x,U as y,y as z};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/asyncToGenerator";import n 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-0280b028.js";function m(){var e,t;null===(e=window)||void 0===e||null===(t=e.dataLayer)||void 0===t||t.push(arguments)}function f(e){window.dataLayer=window.dataLayer||[],m("js",new Date),m("config",e)}function p(e,t){m("event",e,t)}var I={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 g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function w(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?g(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var E={name:"@viewlift/player-backup",version:"2.0.94-smartTv",main:"dist/bundle.cjs.js",amdName:"_playerCore",dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1",axios:"^1.2.3",ima:"npm:videojs-ima@2.2.0",install:"^0.13.0","js-cookie":"^3.0.5",npm:"^11.5.2","ua-parser-js":"^2.0.3","video.js":"7.21.7","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-contrib-quality-menu":"^1.0.3","videojs-mux":"^4.21.7"}};window.vl_player_version=E.version;var T,h=function(e,t){var n,i,r,l,a,d,u,s;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:null!==(a=window)&&void 0!==a&&null!==(d=a.customData)&&void 0!==d&&d.overrideEntitlementBaseUrl?(null===(u=window)||void 0===u||null===(s=u.customData)||void 0===s?void 0:s.overrideEntitlementBaseUrl)+"/video/status":O.get()+"".concat(null==I?void 0:I.getVideoDetails),params:w({id:e,deviceType:"web_browser",contentConsumption:"web"},null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,"Sdk-Version":E.version},withCredentials:!0})},y=function(e,t){var n,i,r,l;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):o({url:O.get()+I.getLinearChannelDetails,params:w(w(w(w(w({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web"},(null==e?void 0:e.channelId)&&{channelId:null==e?void 0:e.channelId}),(null==e?void 0:e.programId)&&{programId:null==e?void 0:e.programId}),(null==e?void 0:e.programTitle)&&{programTitle:null==e?void 0:e.programTitle}),(null==e?void 0:e.programSubType)&&{programSubType:null==e?void 0:e.programSubType}),null===(r=window)||void 0===r||null===(l=r.customData)||void 0===l?void 0:l.entitlement),method:"GET",headers:{Authorization:t,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO"}})},_=function(e,t){var n,i,r=k(t),l=(null==r?void 0:r.site)||null;return null!==(n=window)&&void 0!==n&&null!==(i=n.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,t){var n,i;return e({data:null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i?void 0:i.seriesData})}):o({url:O.get()+"/v3/content/series/".concat(e),params:{site:l},method:"GET",headers:{Authorization:t}})},F=function(){var e=t(n.mark(function e(t){var i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return i=e.sent,e.abrupt("return",o({url:O.get()+"".concat(null==I?void 0:I.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:w({},t),params:w({},(null==t?void 0:t.profileId)&&{profileId:null==t?void 0:t.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),b=function(e,t){var n,i,r=window.contentType;return o({method:"GET",url:O.get()+"".concat(null==I?void 0:I.getVideoInfoV2,"/").concat(r,"/").concat(e),headers:{Authorization:t,"x-api-key":null===(n=window)||void 0===n||null===(i=n.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},D=function(e){var t=e.videoId;return o({method:"GET",url:O.get()+"".concat(null==I?void 0:I.getSeriesWatchHistoryV2,"/").concat(t),headers:{Authorization:e.token},timeout:15e3})},O=(T=null==I?void 0:I.apiBaseUrl,{set:function(e){e&&(T=e)},get:function(){return T}}),L=function(e,t,n,i){return o({url:n,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:t},withCredentials:!0})},S=function(e){var t=JSON.parse(atob(null==e?void 0:e.split(".")[1])),n=null==t?void 0:t.exp;if(new Date(1e3*n).getTime()<(new Date).getTime())return!0},V=null;function R(){return{set:function(e){e&&(V=e)},get:function(){return V}}}var W,P,C,A,N,x,j=function(){var e=t(n.mark(function e(){var t,i,r;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=R().get(),i=O.get(),e.prev=2,e.next=5,o({method:"GET",url:"".concat(i,"/identity/refresh/").concat(t)});case 5:return r=e.sent,e.abrupt("return",r);case 9:throw e.prev=9,e.t0=e.catch(2),console.error("Error fetching refresh token",e.t0),e.t0;case 13:case"end":return e.stop()}},e,null,[[2,9]])}));return function(){return e.apply(this,arguments)}}(),B=null,U=function(){var e=t(n.mark(function e(){var t;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=sessionStorage.getItem("vlp_token"))||!S(t)){e.next=6;break}return B||(B=j().then(function(e){var n,i,o=null==e||null===(n=e.data)||void 0===n?void 0:n.authorizationToken,r=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return o&&sessionStorage.setItem("vlp_token",o),r&&R().set(r),o||t}).catch(function(e){return console.error("Error fetching refresh token",e),t}).finally(function(){B=null})),e.abrupt("return",B);case 6:return e.abrupt("return",t);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),M=function(e){var t=!0,n=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return n&&!i&&(t=!1),t},k=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},H=function(e){P=e},z=function(){return P},G=function(e){W=e},Y=function(){return W},X=function(){return C},q=function(e){C=e},J=function(){return N},K=function(e){A=new Map,e.map(function(e,t){A.set(e.id,t)})},Q=function(e){if(A){var t=A.get(e);q(t+1)}},Z=(x=0,{set:function(e){e>=0&&(x=e)},get:function(){return x}});function $(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function ee(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?$(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):$(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var te=0,ne=function(){var e,t,n,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===(t=e.channels)||void 0===t||null===(n=t.find(function(e){return(null==e?void 0:e.id)===(null==a?void 0:a.channelId)}))||void 0===n||null===(i=n.content)||void 0===i?void 0:i.id:(null==a||null===(o=a.video)||void 0===o||null===(r=o.gist)||void 0===r?void 0:r.id)||(null==a||null===(l=a.video)||void 0===l?void 0:l.id)||(null==a?void 0:a.id)};function 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=t(n.mark(function e(){var t,i;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:if(!(t=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(t.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function 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 t=Math.floor(e.currentTime());e.on("error",function(){var n,i,o,r=Math.floor(e.currentTime());clearInterval(window.bufferingTimer),window.buffering=null,window.handleBufferTimer=null,p(r?"FAILED_TO_START":"DROPPED_STREAM",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:t===r?"FAILED_TO_START":"DROPPED_STREAM",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})})},window.firstFrame=function(e,t){e.one("play",tryCatch(function(){var n,i,o;window.ttFirstFrame=0,window.ttFirstFrameTimer=setInterval(function(){window.ttFirstFrame=window.handleBufferTimer?window.handleBufferTimer(window.ttFirstFrame,e):null},100),p("PLAY",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:Math.floor(e.currentTime())},null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),t&&t("started_video_playback",{"Video ID":ne(),watchTime:Math.floor(e.currentTime())})}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.ttFirstFrameTimer||(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var t,n;null!=e&&null!==(t=e.el_)&&void 0!==t&&null!==(n=t.className)&&void 0!==n&&n.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:clearInterval(window.bufferingTimer)},100))}))},window.handleBufferTimer=function(e,t){var n,i;if(t.el_){var o,r,l,a=e+.1;if(+a.toFixed(2)%5==0&&null!=t&&null!==(n=t.el_)&&void 0!==n&&null!==(i=n.className)&&void 0!==i&&i.includes("vjs-waiting")&&te<4)te++,p("BUFFERING",ee({pfm:window.platform,uid:oe(),vid:ne(),videoPosition:t.el_&&Math.floor(t.currentTime())},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"BUFFERING",videoPosition:t.el_&&Math.floor(t.currentTime()),isAdEvent:!1});return a}clearInterval(window.ttFirstFrameTimer)},window.endFirstFrame=function(e){e.one("timeupdate",function(){var t,n,i;clearInterval(window.ttFirstFrameTimer),clearInterval(window.bufferingTimer),window.ttFirstFrameTimer=null,window.totalBufferTime=window.ttFirstFrame||0,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:ne()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:window.ttFirstFrame,bufferHealth:window.getRemainingBufferTime(e)})})},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var t,n,i,o,r,l;p("AD_REQUEST",ee({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:oe(),vid:ne(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),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:ne()},null===(o=window)||void 0===o||null===(r=o.customData)||void 0===r||null===(l=r.beacon)||void 0===l?void 0:l.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.ttFirstFrame=0}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.ttFirstFrame=0})})},window.ping=function(e){var t=[];e.on("timeupdate",function(){var n=Math.floor(e.currentTime());n>=30&&n%30==0&&!t.includes(n)&&(te=0,t.push(n),fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:30,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:e.tech_.vhs&&window.getBitrate(e)}))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var t=e.currentTime(),n=e.duration(),i=e.buffered(),o=0;o<i.length;o++){var r=i.start(o),l=i.end(o);if(de(t,r,l)){var a=Math.round(n-l);if(isFinite(a))return a}}})()};var de=function(e,t,n){return e>=t&&e<=n};function ue(e,t){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var n=r(e);window.initialise(n,t),window.firstFrame(n,t),n.on("loadedmetadata",function(){window.endFirstFrame(n)})}}window.fireEvent=function(){var e=t(n.mark(function e(t){var i,r,l,a,d,u,s,c,v,m,f,p,g,w,E,T,h,y,_,F;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();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=ne(),e.t6=t.url||document.location.href,e.t7=t.ref||document.referrer,e.t8=t.eventName,e.t9=null!==(a=t.videoPosition)&&void 0!==a?a:null,e.t10=window.environment,e.t11=t.dp1||"",e.t12=t.dp2||"",e.t13=t.dp3||"",e.t14=t.dp4||"",e.t15=t.dp5||"",e.t16=!0===t.isAdEvent?t.videoPosition:null,e.t17=!0===t.isAdEvent?ae(t.adPosition):"",e.next=26,re();case 26:e.t18=e.sent,e.t19=t.playerType||"native",e.t20=t.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(d=t.ttFirstFrame)&&void 0!==d?d:null,e.t23=null!==(u=t.bitrate)&&void 0!==u?u:null,e.t24=null!==(s=t.resHeight)&&void 0!==s?s:null,e.t25=null!==(c=t.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=t.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==t?void 0:t.duration)&&{duration:t.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),F=[e.t31],o({url:(null===(g=window)||void 0===g||null===(w=g.customData)||void 0===w||null===(E=w.beacon)||void 0===E?void 0:E.url)||O.get()+I.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:F}).catch(function(e){console.error(e)});case 42:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}};var se=function(e,t){var n=new Map;D({videoId:e,token:t}).then(function(e){e.data.map(function(e){n.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),N=n}).catch(function(e){return console.log(e)})},ce=function(){var e=Z.get();return e>=0?e+1:1},ve=function(){var e,t,n,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===(t=i[l])||void 0===t||null===(n=t.episodes)||void 0===n?void 0:n.findIndex(function(e){return(null==e?void 0:e.id)===r});return a>=0?a+1:1};function me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function fe(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?me(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):me(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}window._deviceInfo=s(navigator.userAgent);var pe=function(e,t){return e&&t?"".concat(e,"x").concat(t):e>1024?"L":e>768?"M":"S"},Ie=function(e){var t=ge(e,"video.tags",[]),n=ge(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return t.length>0?t.map(function(e){return e.title}).join(","):n},ge=function(e,t,n){for(var i=0,o=(t=t.split(".")).length;i<o;i++){var r;e=null===(r=e)||void 0===r?void 0:r[t[i]]}return e||n},we=function(){var e,t,n,i,o,l,a,d,s,c,v,m,f,p,I,g,w,E,T,h,y,_=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",F=arguments.length>1?arguments[1]:void 0,b=arguments.length>2?arguments[2]:void 0,D=(null==b?void 0:b.siteName)||"",O=(null==b?void 0:b.contentType)||"video",L=(null==b||null===(e=b[O])||void 0===e?void 0:e.metadata)||(null==b||null===(t=b[O])||void 0===t||null===(n=t.gist)||void 0===n?void 0:n.metadata),S=r(F);if(!_.includes("VIEWLIFT_"))return _;var V,R=window.getComputedStyle(document.getElementById(F),null),W=Math.trunc(R.getPropertyValue("height").slice(0,-2)),P=Math.trunc(R.getPropertyValue("width").slice(0,-2)),C="linearchannel"===O?null==b||null===(i=b.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==b?void 0:b.channelId)}))||void 0===l||null===(a=l.content)||void 0===a?void 0:a.id:ge(b,"video.gist.id",""),A="linearchannel"===O?null==b||null===(d=b.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==b?void 0:b.channelId)}))||void 0===c?void 0:c.title:ge(b,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),N=null,x=null;"function"==typeof window.__gpp&&(null===(V=window)||void 0===V||V.__gpp("ping",function(e){N=null==e?void 0:e.gppString,x=null==e?void 0:e.sectionList[0]}));var j=fe(fe({},Ee(L)),{},{VIEWLIFT_WIDTH:P,VIEWLIFT_HEIGHT:W,VIEWLIFT_SIZE:pe(P,W),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(v=window)||void 0===v?void 0:v.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:ge(b,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==S||null===(m=S.options_)||void 0===m?void 0:m.autoplay)||1,VIEWLIFT_MUTE:(null==S||null===(f=S.options_)||void 0===f?void 0:f.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==D?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:Ie(b),VIEWLIFT_MEDIA_ID:C,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(ge(b,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:C,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+ge(b,"video.gist.permalink","")),VIEWLIFT_CONSENT:u.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:ge(null===(p=window)||void 0===p||null===(I=p.app_data)||void 0===I||null===(g=I.site)||void 0===g?void 0:g.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_GDPR:"spinco"==D?"":ge(null===(w=window)||void 0===w||null===(E=w.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*ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:ge(b,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:C,VIEWLIFT_CONTENT_TITLE:A,VIEWLIFT_CONTENT_SERIES_TITLE:ge(b,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:ge(b,"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:Ie(b),VIEWLIFT_GPP_SID:x||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:N||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:""},null===(h=window)||void 0===h||null===(y=h.customData)||void 0===y?void 0:y.macros);for(var B in j){var U=new RegExp(B,"g");_=_.replace(U,j[B])}return _},Ee=function(e){var t,n,i,o,r,l,d;if(null!==(t=window)&&void 0!==t&&t.customData.isSmartTV)return Te(e);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===(n=window)||void 0===n||null===(i=n.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 t,n,i,o,r,l,a={},d=new Map;return(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){d.set(e.name,e.value)})),null===(t=window)||void 0===t||null===(n=t.customData)||void 0===n||null===(i=n.subscription)||void 0===i||i.SVOD,(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?"lgTv"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.tve")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.tve")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.tve")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.tve")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.tve")||d.get("sfid.tve")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.tve")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})):"lgTv"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.lgtv.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.lgtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.lgtv")||""})):"vizioTv"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.viziotv.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.viziotv.dtc")||"",VIEWLIFT_PROF:d.get("prof.viziotv")||""})):"xfinityX1"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xfinity.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xfinity.dtc")||"",VIEWLIFT_PROF:d.get("prof.xfinity")||""})):"xbox"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.xbox.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.xbox.dtc")||"",VIEWLIFT_PROF:d.get("prof.xbox")||""})):"FireTV"==window.customData.device?(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.firetv.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.firetv.dtc")||"",VIEWLIFT_PROF:d.get("prof.firetv")||""})):(a=fe(fe({},a),{},{VIEWLIFT_SFID:d.get("sfid.samsungtv.dtc")||d.get("sfid.dtc")}),a=fe(fe({},a),{},{VIEWLIFT_CSID:d.get("csid.samsungtv.dtc")||"",VIEWLIFT_PROF:d.get("prof.samsungtv")||""})),a},he=function(e){var t=null;try{var n,i,o,r,l,a,d,u,s,c,v,m,f,p,I,g,w,E,T,h,y,_,F,b,D,O,L,S,V,R,W,P,C,A,N,x,j;if(null!==(n=window)&&void 0!==n&&n.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)t=null==e||null===(O=e.ads)||void 0===O||null===(L=O.preRoll)||void 0===L||null===(S=L.adTags)||void 0===S||null===(V=S.samsung_tv)||void 0===V?void 0:V.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 B,U,M,k;t=null==e||null===(B=e.ads)||void 0===B||null===(U=B.preRoll)||void 0===U||null===(M=U.adTags)||void 0===M||null===(k=M.lg_tv)||void 0===k?void 0:k.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 H,z,G,Y;t=null==e||null===(H=e.ads)||void 0===H||null===(z=H.preRoll)||void 0===z||null===(G=z.adTags)||void 0===G||null===(Y=G.vizioTv)||void 0===Y?void 0:Y.url}else if("xbox"==window.customData.device&&null!=e&&null!==(p=e.ads)&&void 0!==p&&null!==(I=p.preRoll)&&void 0!==I&&null!==(g=I.adTags)&&void 0!==g&&null!==(w=g.xbox)&&void 0!==w&&w.active){var X,q,J,K;t=null==e||null===(X=e.ads)||void 0===X||null===(q=X.preRoll)||void 0===q||null===(J=q.adTags)||void 0===J||null===(K=J.xbox)||void 0===K?void 0:K.url}else if("xbox"==window.customData.device&&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.xbox)&&void 0!==y&&y.active){var Q,Z,$,ee;t=null==e||null===(Q=e.ads)||void 0===Q||null===(Z=Q.preRoll)||void 0===Z||null===($=Z.adTags)||void 0===$||null===(ee=$.xbox)||void 0===ee?void 0:ee.url}else if("FireTV"==window.customData.device&&null!=e&&null!==(_=e.ads)&&void 0!==_&&null!==(F=_.preRoll)&&void 0!==F&&null!==(b=F.adTags)&&void 0!==b&&null!==(D=b.firetv)&&void 0!==D&&D.active){var te,ne,ie,oe;t=null==e||null===(te=e.ads)||void 0===te||null===(ne=te.preRoll)||void 0===ne||null===(ie=ne.adTags)||void 0===ie||null===(oe=ie.firetv)||void 0===oe?void 0:oe.url}}else t=(null==e||null===(R=e.ads)||void 0===R||null===(W=R.preRoll)||void 0===W||null===(P=W.adTags)||void 0===P||null===(C=P.web)||void 0===C?void 0:C.active)&&(null==e||null===(A=e.ads)||void 0===A||null===(N=A.preRoll)||void 0===N||null===(x=N.adTags)||void 0===x||null===(j=x.web)||void 0===j?void 0:j.url)}catch(e){}return t},ye=function(e,t){var n,i,o,r,l,a,u,s,c,v,m,f,p,I=(null==e?void 0:e.contentType)||"video",g=null==e||null===(n=e[I])||void 0===n?void 0:n.drmEnabled,w=null==e||null===(i=e[I])||void 0===i||null===(o=i.streamingInfo)||void 0===o?void 0:o.videoAssets,E=null==e||null===(r=e[I])||void 0===r||null===(l=r.streamingInfo)||void 0===l?void 0:l.audioAssets,T=(null==e||null===(a=e[I])||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[I])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var h=(null==e||null===(m=e[I])||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 Fe(E);if(g){var y=be(w,t);return y.src=we(y.src,t,e),y}if("Safari"!==d()&&h){var _=_e(w);return _.src=we(_.src,t,e),_}if(T){var F=Fe(w);return F.src=we(F.src,t,e),F}if(null!=w&&w.mpeg){var b=function(e){var t=null==e?void 0:e.mpeg;return{src:t[t.length-1].url,type:"video/mp4"}}(w);return b.src=we(b.src,t,e),b}return null},_e=function(e){var t=null==e?void 0:e.dash;return t?{src:t,type:"application/dash+xml"}:null},Fe=function(e){var t=null==e?void 0:e.hls;return t?{src:t,type:"application/x-mpegURL"}:null},be=function(e,t){var n=e.fairPlayCmaf||e.fairPlay,o=e.widevine,l=e.playReady,a=d();if(r(t),"Safari"===a){var u=function(e){var t=e.url;return{src:t,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(t,n){var o={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(o,function(e,t,i){console.log(e),e&&n(e),n(null,new Uint8Array(i))})},getContentId:function(e,t){if(t){var n=t.indexOf("\0")+1;return t.slice(n)}},getLicense:function(t,n,o,r){var l={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:o,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(l,function(e,t,n){console.log(e),e&&r(e),r(null,n)})}}}}}(n);return De(t),u}var s,c={src:o.url,type:"application/dash+xml"};return"caliente"==(null===(s=window)||void 0===s?void 0:s.siteName)?(De(t),c.keySystems={"com.widevine.alpha":{url:o.licenseUrl,licenseHeaders:{"X-AxDRM-Message":o.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url: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 De=function(e){var t=r(e);if("function"==typeof t.eme)try{t.eme(),"Safari"==d()&&t.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Oe=function(e,t){var n=e.src,i=e.type;if(!n||"string"!=typeof n||!n.includes(".com"))return{src:n,type:i};t=t.replace(/\/$/,"");var o=n.split(".com")[1]||"";return{src:o?"".concat(t).concat(o):n,type:i}},Le=function(e,t){if(import("./error-2395864b.js").then(function(e){var t=document.createElement("style");t.id="errorblock",t.append("".concat(e.default)),document.head.appendChild(t)}),document.getElementsByClassName("error-container")[0]){var n=document.getElementsByClassName("error-message")[0];n&&(n.innerHTML="".concat(t))}else{var i=document.getElementById(e);if(i){var o=document.createElement("div");o.className="error-container";var r=document.createElement("div");r.className="error-message",r.innerHTML="".concat(t),o.appendChild(r),i.append(o)}}},Se=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var Ve=!1,Re=function(e,t,n){var i=we(t,e,n),o=r(e);if(t&&window.google){if("function"!=typeof o.ima)return;o.ima.initializeAdDisplayContainer&&o.ima.initializeAdDisplayContainer(),function(e,t){var n,i,o,l=r(e);if(null!==l.el_){Ve=!0;var a={id:e,adTagUrl:"".concat(t),adLabel:"Your video will resume after this sponsor message"};l.ima.initializeAdDisplayContainer&&l.ima.initializeAdDisplayContainer(),Ve&&null!==l.el_&&("function"==typeof l.ima?l.ima(a):setTimeout(function(){l.ima.setContentWithAdTag(null,t,!0),l.ima.requestAds()},1e3));var d=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&d.hasAttribute("controls")&&d.removeAttribute("controls");var u="click",s=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(s=!0,u="touchend"),l.one(u,function(){s&&l.ima.initializeAdDisplayContainer()});var c=(null===(n=window)||void 0===n||null===(i=n.customData)||void 0===i||null===(o=i.ads)||void 0===o?void 0:o.adEventHandler)||null;l.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),l.one("ads-manager",function(e){e.adsManager.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})})}),l.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function We(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}var Pe=function(e){i(e).play()},Ce=function(e){i(e).pause()},Ae=function(e,t){var n=i(e),o=n.currentTime()+t;n.currentTime(o)},Ne=function(e,t){var n=i(e),o=n.currentTime(),r=o<=t?0:o-t;n.currentTime(r)},xe=function(e){return!!i.getPlayer("".concat(e))},je=function(e){return i(e).paused()},Be=function(){var e=t(n.mark(function e(t,i){var o,l,a,d=arguments;return n.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=d.length>2&&void 0!==d[2]&&d[2],e.next=3,U();case 3:return l=e.sent,a=r(t),e.abrupt("return",new Promise(function(e,n){y(i,l).then(function(n){var r=null==n?void 0:n.data;window.sid=ie(),r.contentType="linearchannel",r.channelId=null==i?void 0:i.channelId;var l=ye(r,t);H(r),l&&o?(ze(t,l),a.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:r})})):e({status:!0,msg:"Feed authenticated",response:r})}).catch(function(e){n({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Ue=function(){var e=t(n.mark(function e(t,i){var o,l,a,d,u,s,m=arguments;return n.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,U();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&&b(i,d).then(function(e){var t,n,i,o,r,l;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(null==e?void 0:e.data)),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 t,n,i,o;null!==(t=window)&&void 0!==t&&null!==(n=t.watchHistory)&&void 0!==n&&n.cb&&(null===(i=window)||void 0===i||null===(o=i.watchHistory)||void 0===o||o.cb(e))}),e.abrupt("return",new Promise(function(e,n){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&&Re(t,m,a);var f=ye(a,t);if(f){var p,I,g,w,E,T,h,y,_,F,b,D,O,L,S=(null==a||null===(p=a.video)||void 0===p||null===(I=p.gist)||void 0===I?void 0:I.videoImageUrl)||(null==a||null===(g=a.video)||void 0===g||null===(w=g.gist)||void 0===w||null===(E=w.imageGist)||void 0===E?void 0:E.r16x9),V=r(t);if(V.poster(S),ze(t,f),V.on("loadstart",function(){d&&e({status:!0,msg:"Video Loaded",response:a})}),V.on("loadeddata",function(){Se(),e({status:!0,msg:"Video Loaded",response:a})}),V.one("play",function(){u&&s<95&&setTimeout(function(){V.currentTime(u)},0)}),V.one("error",function(){var e;n({status:!1,msg:(null==V||null===(e=V.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===(F=_.closedCaptions)||void 0===F?void 0:F.length)>0)b=((null==a||null===(D=a.video)||void 0===D||null===(O=D.contentDetails)||void 0===O?void 0:O.closedCaptions)||(null==a||null===(L=a.video)||void 0===L?void 0:L.closedCaptions)).filter(function(e){return"VTT"===e.format}),c(t,b);else v(t)}else Le(t,"Incompatible Source, only hls,mp4,drm content is allowed"),n("Incompatible Source, only hls,mp4,drm content is allowed")}).catch(function(e){Ge(e,t,n,i)})}));case 11:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Me=function(e,t,n){var i=r(e);return i.src(t),new Promise(function(e,t){var o=0;i.one("loadedmetadata",function(){clearTimeout(o),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){o=setTimeout(function(){t("FAILED: Took too long to load")},n)})})},ke=function(e){var t=r(e);if(He(),l(),window.onresize=null,t)t.dispose();else{var n=document.getElementById(e);n&&n.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,t){var n=r(e);n&&n.src(t)},Ge=function(t,n,i,o){var r,l,a,d,u,s,c=null==t||null===(r=t.response)||void 0===r||null===(l=r.data)||void 0===l?void 0:l.errorCode,v=(null==t||null===(a=t.response)||void 0===a||null===(d=a.data)||void 0===d?void 0:d.errorMessage)||(null==t?void 0:t.message);xe(n)&&Le(n,(null===(u=window)||void 0===u?void 0:u.customErrors)&&(null===(s=window)||void 0===s?void 0:s.customErrors[c])||"".concat(v)),i&&i(function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?We(Object(i),!0).forEach(function(n){e(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):We(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}({status:!1,response:t,msg:"".concat(v)},o&&{videoId:o}))},Ye=function(e){var t=document.getElementById(e),n=t.getElementsByClassName("vjs-control-bar")[0];n&&(n.style.visibility="hidden");var i=t.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var o=t.getElementsByClassName("vjs-fullscreen-control")[0];o&&(o.style.display="none")};export{_ as A,se as B,Z as C,G as D,Me as E,Pe as F,Ce as G,je as H,xe as I,Ue as J,Be as K,ke as L,L as M,O as N,M as O,R as P,S as Q,f as R,X as S,q as T,D 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,Se as h,Le as i,J as j,Ae as k,ze as l,we as m,he as n,Ye as o,ue as p,Re as q,Ne as r,F as s,Oe as t,k as u,h as v,b as w,Ge as x,U as y,y as z};