@viewlift/player-backup 2.0.284-backup → 2.0.286-backup
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/autoNextVideo-6cab8d20.js +1 -0
- package/cjs/bundle.css +840 -627
- package/cjs/{caption-settings-544fd444.js → caption-settings-058ad013.js} +1 -1
- package/cjs/{captions-80f6eb66.js → captions-d98c49d6.js} +1 -1
- package/cjs/{features-90760526.js → features-d42cd8c1.js} +1 -1
- package/cjs/generic-9239e4ef.js +1 -0
- package/cjs/{index-0cb8083b.js → index-50e69a99.js} +1 -1
- package/cjs/{index-ee7aefc5.js → index-5daec8dc.js} +1 -1
- package/cjs/index-add7cff5.js +1 -0
- package/cjs/index.js +1 -1
- package/cjs/{multicamv2-7a2f60f1.js → multicamv2-1af47226.js} +1 -1
- package/cjs/{multicamv2-ee93bf7c.js → multicamv2-b1a591f5.js} +1 -1
- package/cjs/{nextEpisodeButton-9b032064.js → nextEpisodeButton-f6da5f9e.js} +1 -1
- package/cjs/playlist-25247b47.js +1 -0
- package/cjs/relatedVideosManager-88017db2.js +1 -0
- package/cjs/{renditions-d28715a3.js → renditions-6554142b.js} +1 -1
- package/cjs/{resolution-948774b8.js → resolution-4c007d14.js} +1 -1
- package/cjs/{series-31cb5b5e.js → series-c6abeb2a.js} +1 -1
- package/cjs/series-v2-370da4d6.js +1 -0
- package/cjs/series-v2-a347f3f7.js +1 -0
- package/cjs/{settings-icon-7a7e7810.js → settings-icon-0dcc3788.js} +1 -1
- package/cjs/{skin-a54370b0.js → skin-0a5108bb.js} +1 -1
- package/cjs/skin-47343a57.js +1 -0
- package/cjs/skin-56d77491.js +1 -0
- package/cjs/skin-71dbfc33.js +1 -0
- package/cjs/skin-89ad761c.js +1 -0
- package/cjs/{skin-a7446a3b.js → skin-a904ce92.js} +1 -1
- package/cjs/skin-cebece82.js +1 -0
- package/cjs/{skin-b151359d.js → skin-dfd8c833.js} +1 -1
- package/cjs/{skin-c97f0eea.js → skin-e0cf4554.js} +1 -1
- package/cjs/{skin-a193390e.js → skin-f3a5fe3d.js} +1 -1
- package/cjs/util-9e6f986e.js +1 -0
- package/cjs/videoSelector-24f40272.js +1 -0
- package/cjs/videoSelector-f49496de.js +1 -0
- package/esm/autoNextVideo-be06e737.js +1 -0
- package/esm/bundle.css +840 -627
- package/esm/{caption-settings-106547c2.js → caption-settings-a9b6581e.js} +1 -1
- package/esm/{captions-2b4caf69.js → captions-9659ee8f.js} +1 -1
- package/esm/components/auto-next-video/autoNextVideo.d.ts +1 -0
- package/esm/components/video-selector/videoSelector.d.ts +4 -0
- package/esm/components/video-selector_TEMP/videoSelector.d.ts +4 -0
- package/esm/{features-abc1af35.js → features-4a5d71b3.js} +1 -1
- package/esm/generic-5fc25fa4.js +1 -0
- package/esm/helpers/skin.d.ts +1 -1
- package/esm/{icons-699e8cf0.js → icons-262bef63.js} +1 -1
- package/esm/{index-7f9c8eec.js → index-b62e0f74.js} +1 -1
- package/esm/{index-209acda5.js → index-c9e6b4b1.js} +1 -1
- package/esm/index-d83589e3.js +1 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +1 -1
- package/esm/{multicamv2-febf5390.js → multicamv2-85a146f1.js} +1 -1
- package/esm/{multicamv2-587a5bc1.js → multicamv2-a74f52dc.js} +1 -1
- package/esm/{nextEpisodeButton-9cb4a256.js → nextEpisodeButton-4d4f981f.js} +1 -1
- package/esm/playlist-de8dcaf0.js +1 -0
- package/esm/relatedVideosManager-33634c11.js +1 -0
- package/esm/{renditions-19f0b3a9.js → renditions-4eddc06a.js} +1 -1
- package/esm/{resolution-56c85eaf.js → resolution-5926bb20.js} +1 -1
- package/esm/{series-26c7f982.js → series-a6e346df.js} +1 -1
- package/esm/series-v2-58f8f89a.js +1 -0
- package/esm/series-v2-8e6a3475.js +1 -0
- package/esm/{settings-icon-0de53818.js → settings-icon-c4e124b8.js} +1 -1
- package/esm/{skin-96f7cd4c.js → skin-07c5b42b.js} +1 -1
- package/esm/{skin-1331a0e5.js → skin-132a3fbe.js} +1 -1
- package/esm/{skin-49365d5b.js → skin-30c770e0.js} +1 -1
- package/esm/{skin-c1f9b537.js → skin-5fd8f1a1.js} +1 -1
- package/esm/skin-80a68255.js +1 -0
- package/esm/skin-876554ba.js +1 -0
- package/esm/skin-900c1bca.js +1 -0
- package/esm/skin-97dd73c4.js +1 -0
- package/{cjs/skin-24348af6.js → esm/skin-ae76c8c8.js} +1 -1
- package/esm/skin-e2592aa4.js +1 -0
- package/esm/util-8d51abc3.js +1 -0
- package/esm/utilities/relatedVideosManager.d.ts +11 -0
- package/esm/videoSelector-11ca5611.js +1 -0
- package/esm/videoSelector-38875a2f.js +1 -0
- package/package.json +1 -4
- package/cjs/autoNextVideo-fe71c875.js +0 -1
- package/cjs/generic-b0efda72.js +0 -1
- package/cjs/index-3bdc6d4e.js +0 -1
- package/cjs/index-8c9f1a67.js +0 -1
- package/cjs/playlist-c9565f07.js +0 -1
- package/cjs/series-v2-66bb2be2.js +0 -1
- package/cjs/series-v2-e74b725b.js +0 -1
- package/cjs/skin-3dd98a5f.js +0 -1
- package/cjs/skin-667cd458.js +0 -1
- package/cjs/skin-90c61d0a.js +0 -1
- package/cjs/skin-cfd6c675.js +0 -1
- package/cjs/videoSelector-3f4ee7e2.js +0 -1
- package/cjs/videoSelector-c824876b.js +0 -1
- package/esm/autoNextVideo-efd28455.js +0 -1
- package/esm/generic-bd7427c4.js +0 -1
- package/esm/index-95713239.js +0 -1
- package/esm/index-c3dfd0f5.js +0 -1
- package/esm/playlist-92500990.js +0 -1
- package/esm/series-v2-5993fd16.js +0 -1
- package/esm/series-v2-c71b9a69.js +0 -1
- package/esm/skin-1b825a55.js +0 -1
- package/esm/skin-1c513653.js +0 -1
- package/esm/skin-4f84b841.js +0 -1
- package/esm/skin-5419c4aa.js +0 -1
- package/esm/skin-b0ba54c4.js +0 -1
- package/esm/skin-f6e1b28e.js +0 -1
- package/esm/videoSelector-aef83393.js +0 -1
- package/esm/videoSelector-f9366913.js +0 -1
package/esm/generic-bd7427c4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import n from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/regenerator";import i from"video.js";import r from"axios";import{g as o,t as a,c as l}from"./skin-4f84b841.js";import{i as s,d}from"./browser-d4613b36.js";import u from"md5";import c from"js-cookie";import{r as v,a as f}from"./captions-2b4caf69.js";import m from"@babel/runtime/helpers/typeof";import p from"@babel/runtime/helpers/toConsumableArray";import h from"@babel/runtime/helpers/slicedToArray";import{destroyComscoreTag as g,formulateComscorePayload as y,createComscoreStreamingTag as w,setComscorePlayerInstance as T}from"@viewlift/comscore/index.js";import _ from"@babel/runtime/helpers/classCallCheck";import I from"@babel/runtime/helpers/createClass";function b(){var e,n;null===(e=window)||void 0===e||null===(n=e.dataLayer)||void 0===n||n.push(arguments)}function E(e){window.dataLayer=window.dataLayer||[],b("js",new Date),b("config",e)}function S(e,n){b("event",e,n)}var k={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 A(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function O(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var D={name:"@viewlift/player",version:"2.1.44",main:"dist/bundle.cjs.js",types:"dist/@viewlift/player/esm/index.d.ts",amdName:"_playerCore",scripts:{prepublishOnly:"release-assistant"},dependencies:{"@silvermine/videojs-airplay":"^1.3.0","@silvermine/videojs-chromecast":"^1.4.1","@viewlift/sse":"^0.0.3","broadcast-channel":"^7.3.0","@viewlift/comscore":"^1.0.18",axios:"^1.2.3",md5:"^2.3.0",ima:"npm:videojs-ima@2.2.0","js-cookie":"^3.0.5","jwt-decode":"^4.0.0","video.js":"8.22.0","videojs-contrib-ads":"7.5.2","videojs-contrib-eme":"5.5.1","videojs-mux":"^4.21.7","videojs-contrib-quality-menu":"^1.0.3"},overrides:{"min-document":"^2.19.1"}};window.vl_player_version=D.version;var L,P=function(){var e,n,t,i;return null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.overrideEntitlementBaseUrl?(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementBaseUrl)+"/video/status":W.get()+"".concat(null==k?void 0:k.getVideoDetails)},C=function(e,n){var t,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):r({url:P(),params:O({id:e,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,"Sdk-Version":D.version,"x-player-name":"videojs",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken},withCredentials:!0})},F=function(e,n){var t,i,o,a,l,s,d=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.overrideEntitlementResponse?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.overrideEntitlementResponse})}):r({url:W.get()+k.getLinearChannelDetails,params:O(O(O(O(O({id:null==e?void 0:e.id,deviceType:"web_browser",contentConsumption:"web",ssaiDisable:d},(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===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.entitlement),method:"GET",headers:{Authorization:n,hdcp:"HDCP-1.4",sl:"SW_SECURE_CRYPTO",adbTempToken:null===(l=window)||void 0===l||null===(s=l.customData)||void 0===s?void 0:s.adbTempToken}})},j=function(e,n){var t,i,o=ee(n),a=(null==o?void 0:o.site)||null;return null!==(t=window)&&void 0!==t&&null!==(i=t.customData)&&void 0!==i&&i.seriesData?new Promise(function(e,n){var t,i;return e({data:null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i?void 0:i.seriesData})}):r({url:W.get()+"/v3/content/series/".concat(e),params:{site:a},method:"GET",headers:{Authorization:n}})},R=function(){var e=n(t.mark(function e(n){var i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:return i=e.sent,e.abrupt("return",r({url:W.get()+"".concat(null==k?void 0:k.saveWatchHistoryV2),method:"POST",headers:{Authorization:i},data:O({},n),params:O({},(null==n?void 0:n.profileId)&&{profileId:null==n?void 0:n.profileId})}));case 4:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),V=function(e,n){var t,i,o=window.contentType;return r({method:"GET",url:W.get()+"".concat(null==k?void 0:k.getVideoInfoV2,"/").concat(o,"/").concat(e),headers:{Authorization:n,"x-api-key":null===(t=window)||void 0===t||null===(i=t.watchHistory)||void 0===i?void 0:i.xApiKey},timeout:15e3})},N=function(e){var n=e.videoId;return r({method:"GET",url:W.get()+"".concat(null==k?void 0:k.getSeriesWatchHistoryV2,"/").concat(n),headers:{Authorization:e.token},timeout:15e3})},W=(L=null==k?void 0:k.apiBaseUrl,{set:function(e){e&&(L=e)},get:function(){return L}}),x=function(e,n,t,i){var o,a;return r({url:t,params:{id:e,deviceType:"web_browser",contentConsumption:"web",latitude:null==i?void 0:i.latitude,longitude:null==i?void 0:i.longitude},method:"GET",headers:{Authorization:n,adbTempToken:null===(o=window)||void 0===o||null===(a=o.customData)||void 0===a?void 0:a.adbTempToken},withCredentials:!0})},M=function(e){var n=JSON.parse(atob(null==e?void 0:e.split(".")[1])),t=null==n?void 0:n.exp;if(new Date(1e3*t).getTime()<(new Date).getTime())return!0},U=null;function B(){return{set:function(e){e&&(U=e)},get:function(){return U}}}var H,G,q,Q,Y,z,K,X=function(){var e=n(t.mark(function e(){var n,i,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=B().get(),i=W.get(),e.prev=2,e.next=5,r({method:"GET",url:"".concat(i,"/identity/refresh/").concat(n)});case 5:return o=e.sent,e.abrupt("return",o);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)}}(),J=null,$=function(){var e=n(t.mark(function e(){var n;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(n=sessionStorage.getItem("vlp_token"))||!M(n)){e.next=6;break}return J||(J=X().then(function(e){var t,i,r=null==e||null===(t=e.data)||void 0===t?void 0:t.authorizationToken,o=null==e||null===(i=e.data)||void 0===i?void 0:i.refreshToken;return r&&sessionStorage.setItem("vlp_token",r),o&&B().set(o),r||n}).catch(function(e){return console.error("Error fetching refresh token",e),n}).finally(function(){J=null})),e.abrupt("return",J);case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Z=function(e){var n=!0,t=null==e?void 0:e.videoSourceUrl,i=null==e?void 0:e.asat;return t&&!i&&(n=!1),n},ee=function(e){if(e&&"string"==typeof e)return JSON.parse(atob(e.split(".")[1]))},ne=function(e){e&&"undefined"!=typeof window&&window.sessionStorage&&window.sessionStorage.setItem("uid",e)},te=(z=new Map,{set:function(e){var n,t=(null==e||null===(n=e.video)||void 0===n?void 0:n.id)||e||null;z.set(t,(z.get(t)||0)+1)},get:function(e){return z.get(e)},clear:function(){z.clear()}}),ie=function(e){G=e},re=function(){return G},oe=function(e){H=e},ae=function(){return H},le=function(){return q},se=function(e){q=e},de=function(){return Y},ue=function(e){Q=new Map,e.map(function(e,n){Q.set(e.id,n)})},ce=function(e){if(Q){var n=Q.get(e);se(n+1)}},ve=(K=0,{set:function(e){e>=0&&(K=e)},get:function(){return K}});function fe(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function me(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var pe,he=(pe={},{setConfig:function(e){pe=me(me({},pe),e)},getConfig:function(){return pe}});function ge(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function ye(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ge(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):ge(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var we=0,Te=null,_e=null,Ie=!1,be=function(){var e,n,t,i,r,o,a,l=re();return"linearchannel"==((null==l?void 0:l.contentType)||"video")?null==l||null===(e=l.linearchannel)||void 0===e||null===(n=e.channels)||void 0===n||null===(t=n.find(function(e){return(null==e?void 0:e.id)===(null==l?void 0:l.channelId)}))||void 0===t||null===(i=t.content)||void 0===i?void 0:i.id:(null==l||null===(r=l.video)||void 0===r||null===(o=r.gist)||void 0===o?void 0:o.id)||(null==l||null===(a=l.video)||void 0===a?void 0:a.id)||(null==l?void 0:l.id)};function Ee(){var e=function(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function Se(){return Te||window.sessionStorage.getItem("uid")}function ke(){return Ae.apply(this,arguments)}function Ae(){return(Ae=n(t.mark(function e(){var n,i;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:if(!(n=e.sent)){e.next=10;break}if(null==(i=JSON.parse(atob(n.split(".")[1])))||!i.anonymousId){e.next=9;break}return e.abrupt("return","guest-user");case 9:return e.abrupt("return",null==i?void 0:i.userId);case 10:return e.abrupt("return","guest-user");case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Oe(e){return e?String(e):""}window.initialise=function(e){window.sid=Ee(),window.environment="production",window.platform="WEBSITE",window.failedToStartTimer=null,window.droppedStreamTimer=null,window.firstFrameFired=!1,window.isAdPlaying=!1,streamFailures(e),buffering(e),ads(e),ping(e),De(e),Le(e)};var De=function(e){e.on("play",function(){"pause"!==_e||e.scrubbing()||(_e="play",S("RESUME",{pfm:window.platform,uid:Se(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"RESUME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))}),e.on("pause",function(){setTimeout(function(){Ie||(_e="pause",S("PAUSE",{pfm:window.platform,uid:Se(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:"PAUSE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}))},50)})},Le=function(e){if(e){var n=0,t=0,i=0,r=0;e.on("timeupdate",o),e.on("seeking",function(){if(Ie)return;Ie=!0,e.off("timeupdate",o),e.one("seeked",a)}),e.on("seeked",a)}function o(){n=t,t=Math.floor(e.currentTime()),n<t&&(r=n,n=t)}function a(){i=Math.floor(e.currentTime());var n=Math.floor(i-r);if(0!==n){var t=n>0?"SEEK_FORWARD":"SEEK_BACKWARD";S(t,{pfm:window.platform,uid:Se(),vid:be(),videoPosition:Math.floor(e.currentTime())}),fireEvent({eventName:t,videoPosition:Math.floor(e.currentTime()),isAdEvent:!1})}r=Math.floor(e.currentTime()),setTimeout(function(){Ie=!1},50),e.on("timeupdate",o)}};window.cleanupTimers=function(){clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),clearTimeout(window.droppedStreamTimer),window.failedToStartTimer=null,window.droppedStreamTimer=null},window.fireStreamFailure=function(e){var n,t,i,r=o(),a=null!=r&&r.el_?Math.floor(r.currentTime()):0;window.cleanupTimers(),S(e,ye({pfm:window.platform,uid:Se(),vid:be(),videoPosition:a},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:e,videoPosition:a,isAdEvent:!1})},window.streamFailures=function(e){e.on("error",function(){var e=window.firstFrameFired?"DROPPED_STREAM":"FAILED_TO_START";window.fireStreamFailure(e)})},window.firstFrame=function(e,n,t){e.one("play",tryCatch(function(){var i,r,o;_e="play",window.ttFirstFrameStartTime_In_MS=performance.now(),window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4),S("PLAY",ye({pfm:window.platform,uid:Se(),vid:be(),videoPosition:Math.floor(e.currentTime())},null===(i=window)||void 0===i||null===(r=i.customData)||void 0===r||null===(o=r.beacon)||void 0===o?void 0:o.params)),fireEvent({eventName:"PLAY",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1}),n&&n("started_video_playback",ye({"Video ID":be(),watchTime:Math.floor(e.currentTime())},t))}))},window.buffering=function(e){e.on("waiting",tryCatch(function(){window.firstFrameFired&&(e.currentTime(),clearInterval(window.bufferingTimer),window.bufferingTimer=setInterval(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()?window.totalBufferTime=window.handleBufferTimer?window.handleBufferTimer(window.totalBufferTime,e):null:(clearInterval(window.bufferingTimer),clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=null)},100),window.firstFrameFired&&(clearTimeout(window.droppedStreamTimer),window.droppedStreamTimer=setTimeout(function(){var n,t;null!=e&&null!==(n=e.el_)&&void 0!==n&&null!==(t=n.className)&&void 0!==t&&t.includes("vjs-waiting")&&!e.paused()&&window.fireStreamFailure("DROPPED_STREAM")},45e3)))}))},window.handleBufferTimer=function(e,n){var t,i;if(n.el_){var r,o,a,l=e+.1;if(+l.toFixed(2)%5==0&&null!=n&&null!==(t=n.el_)&&void 0!==t&&null!==(i=t.className)&&void 0!==i&&i.includes("vjs-waiting")&&we<4)we++,S("BUFFERING",ye({pfm:window.platform,uid:Se(),vid:be(),videoPosition:n.el_&&Math.floor(n.currentTime())},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"BUFFERING",videoPosition:n.el_&&Math.floor(n.currentTime()),isAdEvent:!1});return l}window.ttFirstFrameStartTime_In_MS=null},window.endFirstFrame=function(e){var n=tryCatch(function(){var t,i,r;if(window.ttFirstFrameStartTime_In_MS&&!window.firstFrameFired)if(window.isAdPlaying)console.log("'playing' event ignored during ad playback.");else{clearInterval(window.bufferingTimer),clearTimeout(window.failedToStartTimer),window.failedToStartTimer=null,window.firstFrameFired=!0;var o=(performance.now()-window.ttFirstFrameStartTime_In_MS)/1e3;window.ttFirstFrameStartTime_In_MS=null,window.totalBufferTime=o||0,S("FIRST_FRAME",ye({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Se(),vid:be()},null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(r=i.beacon)||void 0===r?void 0:r.params)),fireEvent({eventName:"FIRST_FRAME",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,ttFirstFrame:parseFloat(null==o?void 0:o.toFixed(2)),bufferHealth:window.getRemainingBufferTime(e)}),e.off("timeupdate",n)}});e.on("timeupdate",n)},window.ads=function(e){e.on("adsready",function(){e.ima.addEventListener(window.google.ima.AdEvent.Type.STARTED,function(){var n,t,i,r,o,a;window.isAdPlaying=!0,!window.firstFrameFired&&window.failedToStartTimer&&clearTimeout(window.failedToStartTimer),S("AD_REQUEST",ye({eventName:"AD_REQUEST",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Se(),vid:be(),resHeight:e.videoHeight(),resWidth:e.videoWidth()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"AD_REQUEST",videoPosition:Math.ceil(e.currentTime()),isAdEvent:!0,resHeight:e.videoHeight(),resWidth:e.videoWidth(),adPosition:1}),S("AD_IMPRESSION",ye({eventName:"AD_IMPRESSION",videoPosition:Math.floor(e.currentTime()),isAdEvent:!0,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Se(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:be()},null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params)),fireEvent({eventName:"AD_IMPRESSION",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!0,adPosition:1})}),e.ima.addEventListener(window.google.ima.AdEvent.Type.SKIPPED,function(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))}),e.ima.addEventListener(window.google.ima.AdEvent.Type.COMPLETE,function(){window.isAdPlaying=!1,window.firstFrameFired||(window.failedToStartTimer=setTimeout(function(){window.firstFrameFired||window.fireStreamFailure("FAILED_TO_START")},3e4))})})};var Pe=function(e,n,t){var i;fireEvent({eventName:"PING",videoPosition:n,isAdEvent:!1,duration:t,resHeight:e.videoHeight(),resWidth:e.videoWidth(),bufferHealth:window.getRemainingBufferTime(e),bitrate:(null===(i=e.tech_)||void 0===i?void 0:i.vhs)&&window.getBitrate(e)})};window.fireExitPing=function(e){if(!window.isAdPlaying){var n=null!=e&&e.el_?Math.floor(e.currentTime()):0;n<=0||Pe(e,n,n)}},window.ping=function(e){var n=[];e.on("dispose",tryCatch(function(){console.log('Player DISPOSED >> "dispose" event fired >>> firing exit PING'),window.fireExitPing(e)})),e.on("timeupdate",function(){var t=Math.floor(e.currentTime());t>=30&&t%30==0&&!n.includes(t)&&(we=0,n.push(t),Pe(e,t,30))})},window.getBitrate=function(e){return Math.round(e.tech_.vhs.selectPlaylist().attributes.BANDWIDTH/1e3)},window.getRemainingBufferTime=function(e){return tryCatch(function(){for(var n=e.currentTime(),t=e.duration(),i=e.buffered(),r=0;r<i.length;r++){var o=i.start(r),a=i.end(r);if(Ce(n,o,a)){var l=Math.round(t-a);if(isFinite(l))return l}}})()};var Ce=function(e,n,t){return e>=n&&e<=t},Fe=function(){var e,n=re(),t=(null==n?void 0:n.contentType)||"video";return(null==n||null===(e=n[t])||void 0===e?void 0:e.network)||null};function je(e,n){if("localhost"!==location.hostname&&"127.0.0.1"!==location.hostname){var t=he.getConfig();if(null==t||!t.disableBeacon){null!=n&&n.userId&&(Te=n.userId);var i=o(e);window.initialise(i,null==n?void 0:n.analyticsCb),window.firstFrame(i,null==n?void 0:n.analyticsCb,null==n?void 0:n.analyticsEventParams),window.endFirstFrame(i),window.watchLive(i)}}}window.fireEvent=function(){var e=n(t.mark(function e(n){var i,o,a,l,s,d,u,c,v,f,m,p,h,g,y,w,T,_,I,b,E;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:return T=e.sent,_=ee(T),I=null==_?void 0:_.site,b=null==_?void 0:_.siteId,e.t0=ye,e.t1=ye,e.t2=ye({aid:I,cid:b,pfm:window.platform},null===(i=window)||void 0===i||null===(o=i.customData)||void 0===o||null===(a=o.beacon)||void 0===a?void 0:a.params),e.t3={},e.t4=Se(),e.t5=be(),e.t6=n.url||document.location.href,e.t7=n.ref||document.referrer,e.t8=n.eventName,e.t9=null!==(l=n.videoPosition)&&void 0!==l?l:null,e.t10=window.environment,e.t11=n.dp1||"",e.t12=n.dp2||"",e.t13=n.dp3||"",e.t14=n.dp4||"",e.t15=n.dp5||"",e.t16=!0===n.isAdEvent?n.videoPosition:null,e.t17=!0===n.isAdEvent?Oe(n.adPosition):"",e.next=26,ke();case 26:e.t18=e.sent,e.t19=n.playerType||"native",e.t20=n.mediaType||"VIDEO",e.t21=window.sid,e.t22=null!==(s=n.ttFirstFrame)&&void 0!==s?s:null,e.t23=null!==(d=n.bitrate)&&void 0!==d?d:null,e.t24=null!==(u=n.resHeight)&&void 0!==u?u:null,e.t25=null!==(c=n.resWidth)&&void 0!==c?c:null,e.t26=null!==(v=n.bufferHealth)&&void 0!==v?v:null,e.t27=null!==(f=Fe())&&void 0!==f?f:null,e.t28=null!=I?I:null,e.t29={uid:e.t4,vid:e.t5,url:e.t6,ref:e.t7,pa:e.t8,vpos:e.t9,environment:e.t10,dp1:e.t11,dp2:e.t12,dp3:e.t13,dp4:e.t14,dp5:e.t15,apos:e.t16,apod:e.t17,profid:e.t18,player:e.t19,media_type:e.t20,stream_id:e.t21,embedurl:"",ttfirstframe:e.t22,bitrate:e.t23,connectionspeed:null,resolutionheight:e.t24,resolutionwidth:e.t25,bufferhealth:e.t26,networkname:e.t27,brandname:e.t28},e.t30=(null==n?void 0:n.duration)&&{duration:n.duration},e.t31=(0,e.t1)(e.t2,e.t3,e.t29,e.t30),e.t32=null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(h=p.beacon)||void 0===h?void 0:h.params,e.t33=(0,e.t0)(e.t31,e.t32),E=[e.t33],r({url:(null===(g=window)||void 0===g||null===(y=g.customData)||void 0===y||null===(w=y.beacon)||void 0===w?void 0:w.url)||W.get()+k.getBeaconUrl,method:"post",headers:{Authorization:T},contentType:"application/x-www-form-urlencoded",dataType:"text",data:E}).catch(function(e){console.error(e)});case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),window.tryCatch=function(e){return function(){try{return e.apply(window,arguments)}catch(e){return console.error(e),null}}},window.watchLive=function(e){var n,t=null===(n=e.controlBar)||void 0===n?void 0:n.getChild("SeekToLive");t?null==t||t.on("click",function(){var n,t,i;S("WATCH_LIVE",ye({eventName:"WATCH_LIVE",videoPosition:Math.floor(e.currentTime()),isAdEvent:!1,bufferHealth:window.getRemainingBufferTime(e),pfm:window.platform,uid:Se(),resHeight:e.videoHeight(),resWidth:e.videoWidth(),vid:be()},null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.beacon)||void 0===i?void 0:i.params)),fireEvent({eventName:"WATCH_LIVE",videoPosition:Math.ceil(e.currentTime()),resHeight:e.videoHeight(),resWidth:e.videoWidth(),isAdEvent:!1})}):console.log("Seek To Live Button not found")};var Re=function(e,n){var t=new Map;N({videoId:e,token:n}).then(function(e){e.data.map(function(e){t.set(e.videoId,{t:e.watchedTime,p:e.watchedPercentage})}),Y=t}).catch(function(e){return console.log(e)})},Ve=function(){var e=ve.get();return e>=0?e+1:1},Ne=function(){var e,n,t,i=ae(),r=re(),o=null==r||null===(e=r.video)||void 0===e?void 0:e.id,a=ve.get(),l=null==i||null===(n=i[a])||void 0===n||null===(t=n.episodes)||void 0===t?void 0:t.findIndex(function(e){return(null==e?void 0:e.id)===o});return l>=0?l+1:1};function We(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function xe(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?We(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):We(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Me=u,Ue=function(e,n){return e&&n?"".concat(e,"x").concat(n):e>1024?"L":e>768?"M":"S"},Be=function(e){var n=He(e,"video.tags",[]),t=He(e,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE");return n.length>0?n.map(function(e){return e.title}).join(","):t},He=function(e,n,t){for(var i=0,r=(n=n.split(".")).length;i<r;i++){var o;e=null===(o=e)||void 0===o?void 0:o[n[i]]}return e||t},Ge=function(){var e,n,t,i,r,a,l,s,d,u,v,f,m,p,h,g,y,w,T,_,I,b,E,S,k,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=arguments.length>1?arguments[1]:void 0,D=arguments.length>2?arguments[2]:void 0;if(null!==(e=window)&&void 0!==e&&null!==(n=e.customData)&&void 0!==n&&n.disableMacros)return A;var L=(null==D?void 0:D.siteName)||(null==D?void 0:D.site)||"",P=(null==D?void 0:D.contentType)||"video",C=(null==D||null===(t=D[P])||void 0===t?void 0:t.metadata)||(null==D||null===(i=D[P])||void 0===i||null===(r=i.gist)||void 0===r?void 0:r.metadata),F=o(O);if(!A.includes("VIEWLIFT_"))return A;var j,R=window.getComputedStyle(document.getElementById(O),null),V=Math.trunc(R.getPropertyValue("height").slice(0,-2)),N=Math.trunc(R.getPropertyValue("width").slice(0,-2)),W="linearchannel"===P?null==D||null===(a=D.linearchannel)||void 0===a||null===(l=a.channels)||void 0===l||null===(s=l.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===s||null===(d=s.content)||void 0===d?void 0:d.id:He(D,"video.gist.id",""),x="linearchannel"===P?null==D||null===(u=D.linearchannel)||void 0===u||null===(v=u.channels)||void 0===v||null===(f=v.find(function(e){return(null==e?void 0:e.id)===(null==D?void 0:D.channelId)}))||void 0===f?void 0:f.title:He(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE"),M=null,U=null;"function"==typeof window.__gpp&&(null===(j=window)||void 0===j||j.__gpp("ping",function(e){M=null==e?void 0:e.gppString,U=null==e?void 0:e.sectionList[0]}));var B=c.get("us_privacy")||c.get("usprivacy"),H=void 0!==B?B:"1YNN",G=null!==(m=null===(p=JSON.parse(localStorage.getItem("selectedMvpdProvider")||"{}"))||void 0===p?void 0:p.fwIdentifier)&&void 0!==m?m:null,q=xe(xe({},qe(C)),{},{VIEWLIFT_WIDTH:N,VIEWLIFT_HEIGHT:V,VIEWLIFT_SIZE:Ue(N,V),VIEWLIFT_DOMAIN:window.location.hostname,VIEWLIFT_URL:window.location.href,VIEWLIFT_ENCODED_URL:encodeURIComponent(window.location.href),VIEWLIFT_DOUBLE_ENCODED_URL:encodeURIComponent(encodeURIComponent(window.location.href)),VIEWLIFT_CACHEBUSTER:"3708662946268",VIEWLIFT_TIMESTAMP:Date.now().toString().substring(0,10),VIEWLIFT_TIMESTAMP_MS:Date.now().toString(),VIEWLIFT_IP:(null===(h=window)||void 0===h?void 0:h.ip)||"VIEWLIFT_IP",VIEWLIFT_USER_AGENT:encodeURIComponent(encodeURIComponent(navigator.userAgent)),VIEWLIFT_DNT:"1"===navigator.doNotTrack?"1":"0",VIEWLIFT_DESCRIPTION:He(D,"video.gist.description","VIEWLIFT_DESCRIPTION"),VIEWLIFT_DURATION:He(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_MIN_DURATION:0,VIEWLIFT_MAX_DURATION:He(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_AUTOPLAY:(null==F||null===(g=F.options_)||void 0===g?void 0:g.autoplay)||1,VIEWLIFT_MUTE:(null==F||null===(y=F.options_)||void 0===y?void 0:y.autoplay)||0,VIEWLIFT_DEVICE_ID:"spinco"==L||"usanetwork"==L?"":localStorage.getItem("deviceId")||"VIEWLIFT_DEVICE_ID",VIEWLIFT_DEVICETYPE:"WEB_BROWSER",VIEWLIFT_IDTYPE:"dpid",VIEWLIFT_KEYWORDS:Be(D),VIEWLIFT_MEDIA_ID:W,VIEWLIFT_ENCODED_VIDEO_TITLE:encodeURI(He(D,"video.gist.title","VIEWLIFT_ENCODED_VIDEO_TITLE")),VIEWLIFT_VIDEO_ID:W,VIEWLIFT_VIDEO_URL:encodeURI(window.location.origin+He(D,"video.gist.permalink","")),VIEWLIFT_CONSENT:c.get("cc")||"VIEWLIFT_CONSENT",VIEWLIFT_COPPA:He(null===(w=window)||void 0===w||null===(T=w.app_data)||void 0===T||null===(_=T.site)||void 0===_?void 0:_.settings,"compliance.coppa")?1:0,VIEWLIFT_GDPR_CONSENT:"",VIEWLIFT_ROKU_AD_ID:"",VIEWLIFT_ROKU_AD_KEYS:"",VIEWLIFT_RDID:"",VIEWLIFT_GDPR:"spinco"==L||"usanetwork"==L||"golfchannel"==L?"":He(null===(I=window)||void 0===I||null===(b=I.app_data)||void 0===b||null===(E=b.site)||void 0===E?void 0:E.settings,"compliance.gdpr")?1:0,VIEWLIFT_US_PRIVACY:H,VIEWLIFT_TVE_PROVIDER:G?Me(G):"",VIEWLIFT_CONTENT_DURATION_MS:1e3*He(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_DURATION:He(D,"video.runtime","VIEWLIFT_DURATION"),VIEWLIFT_CONTENT_ID:W,VIEWLIFT_CONTENT_TITLE:x,VIEWLIFT_CONTENT_SERIES_TITLE:He(D,"video.series.gist.title","VIEWLIFT_CONTENT_SERIES_TITLE"),VIEWLIFT_CONTENT_GENRE:He(D,"video.gist.primaryCategory.title","VIEWLIFT_CONTENT_GENRE"),VIEWLIFT_USER:sessionStorage.getItem("uid")||"VIEWLIFT_USER",VIEWLIFT_EPISODE_NUMBER:Ne(),VIEWLIFT_SEASON_NUMBER:Ve(),VIEWLIFT_CONTENT_TAGS:Be(D),VIEWLIFT_GPP_SID:U||"VIEWLIFT_GPP_SID",VIEWLIFT_GPP:M||"VIEWLIFT_GPP",VIEWLIFT_APP_ID:"",VIEWLIFT_APP_STORE_URL:"",VIEWLIFT_LAT:"",VIEWLIFT_APP_BUNDLE:"",VIEWLIFT_ATT_CONSENT:""},null===(S=window)||void 0===S||null===(k=S.customData)||void 0===k?void 0:k.macros);for(var Q in q){var Y=new RegExp(Q,"g");A=A.replace(Y,q[Q])}return A},qe=function(e){var n,t,i,r,o,a,l,d,u,c={},v=new Map;(null==e?void 0:e.length)>0&&(null==e||e.map(function(e){v.set(e.name,e.value)}));var f=(null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t||null===(i=t.subscription)||void 0===i?void 0:i.SVOD)||!1,m=(null===(r=window)||void 0===r||null===(o=r.customData)||void 0===o||null===(a=o.subscription)||void 0===a?void 0:a.TVE)||!1;return f||m?(s()?f?c=xe(xe({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||""}):m&&(c=xe(xe({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.tve.csai")||""})):f?c=xe(xe({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||""}):m&&(c=xe(xe({},c),{},{VIEWLIFT_CSID:v.get("csid.web.tve")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.tve.csai")||""})),f?c=xe(xe({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(s()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}):m&&(c=xe(xe({},c),{},{VIEWLIFT_SFID:v.get("sfid.tve")||v.get("sfid.web.tve")||"",VIEWLIFT_SFID_CSAI:v.get(s()?"sfid.mweb.tve.csai":"sfid.web.tve.csai")||""})),c=s()?xe(xe({},c),{},{VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):xe(xe({},c),{},{VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})):(c=xe(xe({},c),{},{VIEWLIFT_SFID:v.get("sfid.dtc")||v.get("sfid.web.dtc")||"",VIEWLIFT_SFID_CSAI:v.get(s()?"sfid.mweb.dtc.csai":"sfid.web.dtc.csai")||""}),c=s()?xe(xe({},c),{},{VIEWLIFT_CSID:v.get("csid.mweb.dtc")||"",VIEWLIFT_PROF:v.get("prof.mweb")||"",VIEWLIFT_CSID_CSAI:v.get("csid.mweb.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.mweb.csai")||""}):xe(xe({},c),{},{VIEWLIFT_CSID:v.get("csid.web.dtc")||"",VIEWLIFT_PROF:v.get("prof.web")||"",VIEWLIFT_CSID_CSAI:v.get("csid.web.dtc.csai")||"",VIEWLIFT_PROF_CSAI:v.get("prof.web.csai")||""})),c=xe(xe({},c),{},{VIEWLIFT_AFID:v.get("afid"),VIEWLIFT_NIELSEN_APP_ID:He(null===(l=window)||void 0===l||null===(d=l.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.analytics,"nielsen.id")||v.get("VIEWLIFT_NIELSEN_APP_ID")||"",VIEWLIFT_CHANNEL:v.get("VIEWLIFT_CHANNEL")||"",VIEWLIFT_GRACE_NOTE_ID:v.get("VIEWLIFT_GRACE_NOTE_ID")||"",VIEWLIFT_EXTERNAL_AD_ID:v.get("VIEWLIFT_EXTERNAL_AD_ID")||""})},Qe=function(e,n){var t,i,r,o,a,l,s,u,c,v,f,m,p,h=(null==e?void 0:e.contentType)||"video",g=null==e||null===(t=e[h])||void 0===t?void 0:t.drmEnabled,y=null==e||null===(i=e[h])||void 0===i||null===(r=i.streamingInfo)||void 0===r?void 0:r.videoAssets,w=null==e||null===(o=e[h])||void 0===o||null===(a=o.streamingInfo)||void 0===a?void 0:a.audioAssets,T=(null==e||null===(l=e[h])||void 0===l||null===(s=l.streamingInfo)||void 0===s||null===(u=s.videoAssets)||void 0===u?void 0:u.hls)||!1;null==e||null===(c=e[h])||void 0===c||null===(v=c.liveDetails)||void 0===v||v.isDvrEnabled;var _=(null==e||null===(f=e[h])||void 0===f||null===(m=f.streamingInfo)||void 0===m||null===(p=m.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!=w&&w.hls)return ze(w);if(g){var I=Ke(y,n);return I.src=Ge(I.src,n,e),I}if("Safari"!==d()&&_)return Ye(y);if(T){var b=ze(y);return b.src=Ge(b.src,n,e),b}if(null!=y&&y.mpeg){var E=function(e){var n=null==e?void 0:e.mpeg;return{src:n[n.length-1].url,type:"video/mp4"}}(y);return E.src=Ge(E.src,n,e),E}return null},Ye=function(e){var n=null==e?void 0:e.dash;return n?{src:n,type:"application/dash+xml"}:null},ze=function(e){var n=null==e?void 0:e.hls;return n?{src:n,type:"application/x-mpegURL"}:null},Ke=function(e,n){var t=(null==e?void 0:e.drmProvider)||null,r=e.fairPlayCmaf||e.fairPlay,a=e.widevine,l=e.playReady,s=d();if(o(n),"Safari"===s){var u=function(e){var n=e.url;return{src:n,type:"application/x-mpegURL",keySystems:{"com.apple.fps.1_0":{getCertificate:function(n,t){var r={uri:e.certificateUrl,method:"GET",responseType:"arraybuffer"};i.xhr(r,function(e,n,i){console.log(e),e&&t(e),t(null,new Uint8Array(i))})},getContentId:function(e,n){if(n){var t=n.indexOf("\0")+1;return n.slice(t)}},getLicense:function(n,t,r,o){var a={uri:e.licenseUrl,method:"POST",responseType:"arraybuffer",body:r,headers:{"Content-type":"application/octet-stream","X-AxDRM-Message":e&&e.licenseToken}};i.xhr(a,function(e,n,t){console.log(e),e&&o(e),o(null,t)})}}}}}(r);return Xe(n),u}var c,v={src:a.url,type:"application/dash+xml"};return"caliente"==(null===(c=window)||void 0===c?void 0:c.siteName)?(Xe(n),v.keySystems={"com.widevine.alpha":{url:a.licenseUrl,licenseHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"},"com.microsoft.playready":{url:null==l?void 0:l.licenseUrl,licenseHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}):"custom"==t?(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"Content-Type":"application/octet-stream"},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})):(v.keySystemOptions=[],v.keySystemOptions.push({name:"com.widevine.alpha",options:{serverURL:a.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":a.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}}),v.keySystemOptions.push({name:"com.microsoft.playready",options:{serverURL:null==l?void 0:l.licenseUrl,httpRequestHeaders:{"X-AxDRM-Message":null==l?void 0:l.licenseToken},videoRobustness:"SW_SECURE_CRYPTO",audioRobustness:"SW_SECURE_CRYPTO"}})),v};var Xe=function(e){var n=o(e);if("function"==typeof n.eme)try{n.eme(),"Safari"==d()&&n.eme.initLegacyFairplay()}catch(e){console.log("EME ERROR :",e)}},Je=function(e,n){var t=e.src,i=e.type;if(!t||"string"!=typeof t||!t.includes(".com"))return{src:t,type:i};n=n.replace(/\/$/,"");var r=t.split(".com")[1]||"";return{src:r?"".concat(n).concat(r):t,type:i}},$e=function(e,n){if(import("./error-2395864b.js").then(function(e){var n=document.createElement("style");n.id="errorblock",n.append("".concat(e.default)),document.head.appendChild(n)}),document.getElementsByClassName("error-container")[0]){var t=document.getElementsByClassName("error-message")[0];t&&(t.innerHTML="".concat(n))}else{var i=document.getElementById(e);if(i){var r=document.createElement("div");r.className="error-container";var o=document.createElement("div");o.className="error-message",o.innerHTML="".concat(n),r.appendChild(o),i.append(r)}}},Ze=function(){document.getElementsByClassName("error-container")[0]&&document.getElementsByClassName("error-container")[0].remove()};var en=!1,nn=function(e,n,t){var i=Ge(n,e,t),r=o(e);if(n&&window.google){if("function"!=typeof r.ima&&"object"!==m(r.ima))return;r.ima.initializeAdDisplayContainer&&r.ima.initializeAdDisplayContainer(),function(e,n){var t,i,r,a=o(e);if(null!==a.el_){en=!0;var l={id:e,adTagUrl:"".concat(n),adLabel:"Your video will resume after this sponsor message"};a.ima.initializeAdDisplayContainer&&a.ima.initializeAdDisplayContainer(),en&&null!==a.el_&&("function"==typeof a.ima?a.ima(l):setTimeout(function(){a.ima.setContentWithAdTag(null,n,!0),a.ima.requestAds()},1e3));var s=document.getElementById("".concat(e));(navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&s.hasAttribute("controls")&&s.removeAttribute("controls");var d="click",u=!1;(navigator.userAgent.match(/iPhone/i)||navigator.userAgent.match(/iPad/i)||navigator.userAgent.match(/Android/i))&&(u=!0,d="touchend"),a.one(d,function(){u&&a.ima.initializeAdDisplayContainer()});var c=(null===(t=window)||void 0===t||null===(i=t.customData)||void 0===i||null===(r=i.ads)||void 0===r?void 0:r.adEventHandler)||null;a.one("ads-ad-started",function(){c&&c({status:"STARTED",msg:"Advertisement Started"})}),a.one("ads-manager",function(e){var n=e.adsManager;n.addEventListener(google.ima.AdEvent.Type.COMPLETE,function(){c&&c({status:"ENDED",msg:"Advertisement Ended"})}),n.addEventListener(google.ima.AdEvent.Type.LOADED,function(e){c&&c({status:"LOADED",msg:"Advertisement Loaded",data:e})})}),a.on("adserror",function(e){c&&c({status:"ERROR",msg:"Advertisement Error"})})}}(e,i)}};function tn(e,n){var t,i,r,a=o(e),l=null==a||null===(t=a.controlBar)||void 0===t||null===(i=t.playToggle)||void 0===i?void 0:i.el_,s=document.getElementsByTagName("video")[0];null===(r=document)||void 0===r||r.addEventListener("keydown",function(t){var i,r,o,d,u,c,v,f,m;if(on.enabled&&!t.metaKey&&!t.ctrlKey&&"input"!=t.target.localName&&"textarea"!=t.target.localName){var p=t.key,h=!0===n.liveVideo||!0===n.liveui;switch([" ","m","M","f","F","ArrowLeft","ArrowRight"].includes(p)&&(t.preventDefault(),null==s||s.focus()),p){case" ":null==l||l.click();break;case"m":case"M":a.muted(!a.muted());break;case"f":case"F":null===(i=document.querySelector(".vjs-fullscreen-control"))||void 0===i||i.click();break;case"ArrowLeft":h&&!1===n.liveui||Yt(e,10);break;case"ArrowRight":if("MEDIA_TAILOR"==(null===(r=window)||void 0===r||null===(o=r.app_data)||void 0===o||null===(d=o.appcmsMain)||void 0===d||null===(u=d.adsConfig)||void 0===u?void 0:u.vodAdSticherProvider)&&null!==(c=window)&&void 0!==c&&null!==(v=c.app_data)&&void 0!==v&&null!==(f=v.appcmsMain)&&void 0!==f&&null!==(m=f.adsConfig)&&void 0!==m&&m.vodAdClientSideTracking)return;h||Qt(e,10)}}},!0)}var rn,on=(rn=!0,{enable:function(){rn=!0},disable:function(){rn=!1},get enabled(){return rn}}),an="ssai-breakStart",ln="ssai-adImpression",sn="ssai-firstQuartile",dn="ssai-midpoint",un="ssai-thirdQuartile",cn="ssai-complete",vn="ssai-breakEnd",fn={breakStart:an,impression:ln,firstQuartile:sn,midpoint:dn,thirdQuartile:un,complete:cn,breakEnd:vn};function mn(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=o(e);if(!t)return console.error("[SSAI] Player instance not found"),{};var i=n.eventType,r=fn[i];r&&t.trigger(r,n)}function pn(e){var n=o(e);if(!n)return console.error("[SSAI] Player instance not found"),{};var t=function(e,t){var i=function(e,n){return t(n)};return n.on(e,i),function(){return n.off(e,i)}};return{adBreakStart:function(e){return t(an,e)},adImpression:function(e){return t(ln,e)},adFirstQuartile:function(e){return t(sn,e)},adMidpoint:function(e){return t(dn,e)},adThirdQuartile:function(e){return t(un,e)},adComplete:function(e){return t(cn,e)},adBreakEnd:function(e){return t(vn,e)}}}function hn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function gn(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):hn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var yn,wn=(yn={},{get:function(){return yn},set:function(e){yn=e}});function Tn(e,n){var t,i,r,a,l,s,d,u,c,v,f,m,p,h,_,I,b,E,S,k,A,O=null==e?void 0:e.playerId,D=o(O);if(null!=e&&null!==(t=e.comscore)&&void 0!==t&&t.enable){var L=re(),P=(null==L||null===(i=L.video)||void 0===i?void 0:i.metadata)||[],C=(null==P?void 0:P.length)&&P.filter(function(e){return"advertisingGenre"===e.name});if(null!==(r=C)&&void 0!==r&&r.length){var F=C.map(function(e){return e.value});C=null==F?void 0:F.join(",")}g();var j,R,V,N=null===(a=window)||void 0===a?void 0:a.lcProgrammeDetails,W=Array.isArray(null==N?void 0:N.category)?null==N||null===(l=N.category)||void 0===l?void 0:l.join(","):(null==N?void 0:N.category)||null,x=gn(gn(gn({},null==L?void 0:L.video),null==L?void 0:L.linearchannel),{},{siteName:(null==e||null===(s=e.comscore)||void 0===s?void 0:s.applicationName)||(null==e||null===(d=e.comscore)||void 0===d||null===(u=d.metadata)||void 0===u?void 0:u.siteName)||(null==L?void 0:L.site)||null,programId:(null==N?void 0:N.videotmsid)||null,programTitle:(null==N?void 0:N.lcProgrammeName)||null,episodeId:(null==N?void 0:N.videotmsid)||null,seasonNumber:(null==L||null===(c=L.video)||void 0===c||null===(v=c.series)||void 0===v?void 0:v.seasonNumber)||(null==N||null===(f=N.seriesDetails)||void 0===f?void 0:f.season)||null,episodeNumber:(null==L||null===(m=L.video)||void 0===m||null===(p=m.series)||void 0===p?void 0:p.episodeNumber)||(null==N||null===(h=N.seriesDetails)||void 0===h?void 0:h.episode)||null,episodeTitle:(null==N?void 0:N.lcSubTitle)||null,isCompleteEpisode:!!(null!=L&&null!==(_=L.video)&&void 0!==_&&_.series||null!=N&&null!==(I=N.seriesDetails)&&void 0!==I&&I.episode),genre:C||W,comscoreConfig:{implementationId:(null==e||null===(b=e.comscore)||void 0===b?void 0:b.implementationId)||null,projectId:(null==e||null===(E=e.comscore)||void 0===E?void 0:E.projectId)||null}}),M=null==e||null===(S=e.comscore)||void 0===S||null===(k=S.metadata)||void 0===k?void 0:k.contentType;if(null!=x&&null!==(A=x.streamingInfo)&&void 0!==A&&A.isLiveStream?x.contentType="Live":x.contentType=M||"LongFormOnDemand",null==x||!x.network){var U,B=(null==x?void 0:x.metadata)||[],H=null==B||null===(U=B.find(function(e){return"network"===e.name}))||void 0===U?void 0:U.value;x.network=H||null}null!=x&&x.network&&null!=x&&x.genre&&(x.customGenre="".concat(x.network,"_").concat((null==x?void 0:x.programTitle)||(j=x,null!=j&&j.series?null==j||null===(V=j.series)||void 0===V?void 0:V.title:null==j||null===(R=j.gist)||void 0===R?void 0:R.title),"_").concat(x.genre)),null!=N&&N.airDate&&(x.publishDate=N.airDate),null!=x&&x.runtime&&"function"==typeof D.duration&&(x.runtime=1e3*Math.ceil(D.duration()));var G=y(x,D);console.log("comscoreOptions player data",G),w(gn({playerName:"Video.js"},G)),T(D)}}function _n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function In(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_n(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):_n(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function bn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return En(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?En(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function En(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var Sn,kn=function(){var e="";return{set:function(n){n&&(e=n)},get:function(){return e}}}(),An=(Sn=null,{set:function(e){Sn=e},get position(){return Sn}});function On(e,n){return Dn.apply(this,arguments)}function Dn(){return(Dn=n(t.mark(function e(n,i){var r,a,l,s,d,u,c,v,f,m,p,g,y,w,T,_,I,b;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o(n),l=Qe(i,n),s=l.src,d=(null==i?void 0:i.contentType)||"video",null==i||null===(r=i[d])||void 0===r||null===(a=r.streamingInfo)||void 0===a||a.isLiveStream,u=s.replace("/dash/","/session/").replace("/master/","/session/"),u=Ge(u,n,i),c=Pn(u),v=h(c,2),f=v[0],m=v[1],p=Ln(m)||{},u=new URL(u.split("?")[0]),Object.keys(m).length>0&&Object.entries(m).forEach(function(e){var n=h(e,2),t=n[0],i=n[1];u.searchParams.set(t,i)}),e.prev=11,e.next=14,fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(In({adsParams:In({},f)},p))});case 14:return g=e.sent,e.next=17,g.json();case 17:return y=e.sent,w="https://"+new URL(u).hostname,T=y.trackingUrl,_=y.manifestUrl,I=w+T,b=w+_,kn.set(I),console.log("%c TRACKING URL","background: #bdf369; color: #000",I),l.src=b,e.abrupt("return",l);case 29:return e.prev=29,e.t0=e.catch(11),e.abrupt("return",l);case 32:case"end":return e.stop()}},e,null,[[11,29]])}))).apply(this,arguments)}function Ln(e){var n;return Object.fromEntries(null==Object||null===(n=Object.entries(e))||void 0===n?void 0:n.map(function(e){var n=h(e,2),t=n[0],i=n[1];return[null==t?void 0:t.replace(/^aws\./,""),String(i)]}))||{}}function Pn(e){var n={};if(!e.split("?")[1])return[{},{}];var t,i=new URL(e,window.location.origin),r=bn((null==i?void 0:i.searchParams)||[]);try{for(r.s();!(t=r.n()).done;){var o=h(t.value,2),a=o[0],l=o[1];n[decodeURIComponent(a)]=decodeURIComponent(l||"")}}catch(e){r.e(e)}finally{r.f()}for(var s={},d={},u=0,c=Object.entries(n);u<c.length;u++){var v=h(c[u],2),f=v[0],m=v[1];if(f.startsWith("ads."))s[f.replace(/^ads\./,"")]=m;else d[f]=m}return[s,d]}var Cn,Fn,jn,Rn=new Map;function Vn(e,n){return Nn.apply(this,arguments)}function Nn(){return Nn=n(t.mark(function e(i,r){var l,s,d,u,c,v,f,m,h,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,C;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:C=function(e,n,t,r,a,l){var s,d,u=o(i);if(!u.seeking()){var c=n.startTimeInSeconds;n.durationInSeconds,e<L&&D.clear(),L=e;var v=(null==n||null===(s=n.ads)||void 0===s||null===(d=s[r])||void 0===d?void 0:d.adId)||c;Math.floor(u.currentTime());var f,m=bn(t);try{var p=function(){var t,o,s,d=f.value,c=d.eventType,m=d.beaconUrls,p=d.startTimeInSeconds,h=d.startTime,g=d.durationInSeconds,y=p||0,w=m,T=(null===(t=window)||void 0===t||null===(o=t.customData)||void 0===o||null===(s=o.ads)||void 0===s?void 0:s.adEventHandler)||null,_="".concat(y,"_").concat(c),I=Rn.get("pod-".concat(a))||[];if(console.warn(e,y,"map:",c,"condition1:",e>=y,"map:",Rn),e>=y&&!I.includes(_)){I.push(_),Rn.set("pod-".concat(a),I);try{P(c,n,w,u)}catch(e){console.error("Error when calling triggerAdBeacon:",e,c,n)}if("breakEnd"==c){var b=An.position;An.set(null),setTimeout(function(){null!=b&&(u.currentTime(b),l())},500)}if("function"==typeof T)try{var E,S={eventType:c,startTimeInSeconds:p,startTime:h,durationInSeconds:g,ad:null==n||null===(E=n.ads)||void 0===E?void 0:E[r],adIndex:r};T({adsData:S}),mn(i,S)}catch(e){console.error("Error when calling ads callback:",e)}var k=wn.get();if(k&&0!==Object.keys(k).length){var A=k.formulateComscoreAdPayload,O=k.startComscoreAdTracking,L=k.finishComscoreAdTracking,C=k.endComscoreAdTracking,F="".concat(y,"_").concat(v,"_").concat(c);if(!D.has(F))if(D.set(F,!0),"impression"===c){var j,R=kn.get();O(A(In(In({},null==n||null===(j=n.ads)||void 0===j?void 0:j[r]),{},{trackingUrl:R})))}else"complete"===c?L():"breakEnd"===c&&C()}}};for(m.s();!(f=m.n()).done;)p()}catch(e){m.e(e)}finally{m.f()}}},P=function(e,n,t,i){console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),console.log("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})})},O=function(e){var n=Math.floor(e/60),t=Math.floor(e%60);return"".concat(n,":").concat(t.toString().padStart(2,"0"))},Rn.clear(),An.set(r),h=kn.get(),(g=o(i)).one("loadeddata",function(){h&&A(h)}),y=new Map,w=new Map,T=-1,_=(null===(l=document)||void 0===l||null===(s=l.getElementsByClassName("tvProviderImage"))||void 0===s?void 0:s[0])||null,I=(null==g||null===(d=g.controlBar)||void 0===d?void 0:d.getChild("videoSelector"))||null,b=(null==g||null===(u=g.controlBar)||void 0===u?void 0:u.getChild("seriesV2"))||null,E=(null==g||null===(c=g.el())||void 0===c||null===(v=c.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===v?void 0:v[0])||null,S=(null==g||null===(f=g.el())||void 0===f||null===(m=f.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===m?void 0:m[0])||null,k=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return p(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return In(In({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},A=function(){var e=n(t.mark(function e(n){var l,s,d,u,c,v,f,m,h,g,A,D,L,P,F,j,R,V,N,W,x,M,U,B;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return W=function(e){document.removeEventListener("pointermove",N),document.removeEventListener("pointerup",W),0===e.button&&R()},N=function(e){},V=function(){var e,n=g.currentTime(),t=null,i=bn(h);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=(r.ads,Math.floor(o+a));n>=o&&n<=l&&(t=l,y.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==t&&(console.log("Seeking to end of the ad pod:",t),setTimeout(function(){g.currentTime(t+2.2)},100))},R=function(){var e,n=g.currentTime(),t=null,i=bn(h);try{for(i.s();!(e=i.n()).done;){var r=e.value,o=r.startTimeInSeconds,a=r.durationInSeconds,l=r.ads,s=Math.floor(o+a);(Array.isArray(l)&&(null==l?void 0:l.length)>0&&(n>s||n>o)&&!y.has(o)||n>=o&&n<=s)&&(t=o,y.set(o,!0),w.set(o,!0))}}catch(e){i.e(e)}finally{i.f()}null!==t&&(console.log("Seeking back to ad pod:",t),setTimeout(function(){g.currentTime(t+.4)},100))},c=!1,e.next=7,fetch(n);case 7:return v=e.sent,e.next=10,v.json();case 10:f=e.sent,m=f.avails,h=[],g=o(i),A=g.controlBar.progressControl,D=A.seekBar.el(),null===(l=document)||void 0===l||l.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),m.map(function(e,n){var t;0==n&&Array.isArray(null==e?void 0:e.ads)&&(null==e||null===(t=e.ads)||void 0===t?void 0:t.length)>0&&(c=!0),h.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:k(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),!c&&r&&(g.currentTime(r),V()),null!=h&&h.length&&(console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",h),window.adsQueueList=h,"function"==typeof(j=(null===(L=window)||void 0===L||null===(P=L.customData)||void 0===P||null===(F=P.ads)||void 0===F?void 0:F.onAdBreaksLoaded)||null)&&j(h)),console.log(h,"data"),h.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=g.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",D.appendChild(o)}}),g._timeUpdateHandler&&g.off("timeupdate",g._timeUpdateHandler),g._timeUpdateHandler=a(function(){var e=g.currentTime();if(e!==T){T=e;for(var n=!1,t=function(){var t=h[i],r=t.startTimeInSeconds,o=t.durationInSeconds,a=t.ads,l=r+o;if(e>=r-1.2&&e<=l+1.2){var s;e>=r&&e<=l&&Array.isArray(a)&&(null==a?void 0:a.length)>0&&(n=!0),e>l&&y.set(r,!0),on.disable(),_&&_.classList.add("vjs-hidden"),E&&(E.style.pointerEvents="none",E.classList.add("vjs-hidden")),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),I&&(I.el().style.pointerEvents="none",I.el().classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),A.el().classList.add("hide-progress-bar");for(var d=e-r,u=0,c=0,v=0;v<a.length;v++){var f,m=null==a||null===(f=a[v])||void 0===f?void 0:f.durationInSeconds;if(d<u+m){c=v;break}u+=m}a[c];var g=Math.max(0,o-d),T=Math.round(g);x.style.display="block",B.textContent="".concat(c+1," of ").concat(a.length," • ").concat(O(T));var k=[];return null==a||a.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});k.push.apply(k,p(n))}),(null==t||null===(s=t.podSlotImpressionBeacon)||void 0===s?void 0:s.length)>0&&k.push.apply(k,p(null==t?void 0:t.podSlotImpressionBeacon)),C(e,t,k,c,i,V),"break"}w.delete(r)},i=0;i<h.length;i++){if("break"===t())break}n||(x.style.display="none",A.el().classList.remove("hide-progress-bar"),I&&(I.el().style.pointerEvents="auto",I.el().classList.remove("vjs-hidden")),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),_&&_.classList.remove("vjs-hidden"),E&&(E.style.pointerEvents="auto",E.classList.remove("vjs-hidden")),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),on.enable())}},1e3),g.on("timeupdate",g._timeUpdateHandler),null===(s=document)||void 0===s||s.addEventListener("keydown",function(e){on.enabled&&"ArrowRight"==e.key&&(R(),Qt(i,10),e.stopPropagation())}),A.el().addEventListener("pointerdown",function(e){0===e.button&&(document.addEventListener("pointermove",N),document.addEventListener("pointerup",W))}),null===(d=document)||void 0===d||null===(u=d.querySelectorAll(".ssai-ad-container"))||void 0===u||u.forEach(function(e){return null==e?void 0:e.remove()}),(x=document.createElement("div")).className="ssai-ad-container",(M=document.createElement("div")).className="sponsored-adbox",(U=document.createElement("div")).className="sponsored-text",U.textContent="Sponsored Ad",M.append(U),(B=document.createElement("div")).className="ad-counter",document.createElement("div").className="ad-timer",x.append(M),x.append(B),g.el().appendChild(x);case 44:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),D=new Map,L=-1;case 21:case"end":return e.stop()}},e)})),Nn.apply(this,arguments)}function Wn(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return xn(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xn(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function xn(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}function Mn(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Un(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Mn(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Mn(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Bn={},Hn=(null===(Cn=window)||void 0===Cn||null===(Fn=Cn.location)||void 0===Fn||null===(jn=Fn.search)||void 0===jn?void 0:jn.includes("debug=true"))||!1,Gn=null;function qn(e){return Qn.apply(this,arguments)}function Qn(){return Qn=n(t.mark(function e(i){var r,l,s,d,u,c,v,f,m,h,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,C,F;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:F=function(e,n,t,r,a){var l,s,d=o(i);if(!d.seeking()){var u=n.startTimeInSeconds;n.durationInSeconds;var c=(null==n||null===(l=n.ads)||void 0===l||null===(s=l[r])||void 0===s?void 0:s.adId)||u;Math.floor(d.currentTime());var v,f=Wn(t);try{for(f.s();!(v=f.n()).done;){var m,p,h,g=v.value,y=g.eventType,w=g.beaconUrls,T=g.startTimeInSeconds,_=g.startTime,I=g.durationInSeconds,b=(g.eventId,T||u),E=w,S=(null===(m=window)||void 0===m||null===(p=m.customData)||void 0===p||null===(h=p.ads)||void 0===h?void 0:h.adEventHandler)||null,k="".concat(c,"_").concat(y),A="pod-".concat(u);L.has(A)||L.set(A,new Set);var O=L.get(A);if(Hn&&console.warn(e,b,"map:",y,"condition1:",e>=b,"map:",L),e>=b&&e<=b+P&&!O.has(k)){O.add(k);try{C(y,n,E,d)}catch(e){console.error("Error when calling triggerAdBeacon:",e,y,n)}if("function"==typeof S)try{var D,F={eventType:y,startTimeInSeconds:T,startTime:_,durationInSeconds:I,ad:null==n||null===(D=n.ads)||void 0===D?void 0:D[r],adIndex:r};S({adsData:F}),mn(i,F)}catch(e){console.error("Error when calling ads callback:",e)}var j=wn.get();if(j&&0!==Object.keys(j).length){var R=j.formulateComscoreAdPayload,V=j.startComscoreAdTracking,N=j.finishComscoreAdTracking,W=j.endComscoreAdTracking;if("impression"===y){var x,M=kn.get();V(R(Un(Un({},null==n||null===(x=n.ads)||void 0===x?void 0:x[r]),{},{trackingUrl:M})))}else"complete"===y?N():"breakEnd"===y&&W()}}}}catch(e){f.e(e)}finally{f.f()}}},C=function(e,n,t,i){var r,o,a;"breakEnd"===e&&(null===(r=Bn)||void 0===r?void 0:r.currentAdIndex)+1!=(null===(o=Bn)||void 0===o?void 0:o.totalAds)&&(null==n||null===(a=n.ads)||void 0===a?void 0:a.length)>0||(Hn&&console.warn("%c SSAI BEACON ","background: #e25822; color: #fff",e,"Fired:".concat(Math.round(i.currentTime())),"AD_POD:",n),null==t||t.forEach(function(e){fetch(e,{mode:"no-cors"}).catch(function(n){console.warn("Beacon failed:",e,n)})}))},g=function(){Gn&&clearInterval(Gn)},m=kn.get(),(h=o(i)).one("loadeddata",function(){g(),Gn=setInterval(function(){m&&!h.paused()&&D(m)},2e3)}),h.on("dispose",function(){g()}),y=new Map,w=new Map,T=-1,_=null,I=(null===(r=document)||void 0===r||null===(l=r.getElementsByClassName("tvProviderImage"))||void 0===l?void 0:l[0])||null,b=(null==h||null===(s=h.controlBar)||void 0===s?void 0:s.getChild("videoSelector"))||null,E=(null==h||null===(d=h.controlBar)||void 0===d?void 0:d.getChild("seriesV2"))||null,S=(null==h||null===(u=h.el())||void 0===u||null===(c=u.getElementsByClassName("vjs-button vjs-rewind-button"))||void 0===c?void 0:c[0])||null,k=(null==h||null===(v=h.el())||void 0===v||null===(f=v.getElementsByClassName("vjs-button vjs-skip-button"))||void 0===f?void 0:f[0])||null,A=!1,O=function(){var e,n,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(0==(null==t?void 0:t.length))return p(i);var r=[],o=null==i?void 0:i.find(function(e){return"breakEnd"===(null==e?void 0:e.eventType)}),a=(null==o||null===(e=o.beaconUrls)||void 0===e?void 0:e.find(function(e){return e.includes("videoView")}))||null,l=(null==t?void 0:t.length)>1?null==t?void 0:t[(null==t?void 0:t.length)-1]:null==t?void 0:t[0],s=null==l||null===(n=l.trackingEvents)||void 0===n?void 0:n.filter(function(e){return["breakEnd"].includes(null==e?void 0:e.eventType)}),d=(null==s?void 0:s.some(function(e){var n;return null==e||null===(n=e.beaconUrls)||void 0===n?void 0:n.some(function(e){return e.includes("videoView")})}))||!1;if(!d&&a){var u=null==s?void 0:s.map(function(e){return Un(Un({},e),{},{eventType:"videoView",beaconUrls:[a]})});null!=u&&u[0]&&r.push(null==u?void 0:u[0])}return r},D=function(){var e=n(t.mark(function e(n){var r,l,s,d,u,c,v,f,m,h,g,D;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return d=new URL(n),_&&d.searchParams.append("nextToken",_),e.next=4,fetch(d.toString(),{method:"GET"});case 4:return u=e.sent,e.next=7,u.json();case 7:c=e.sent,v=c.avails,f=c.nextToken||null,_=f,m=[],h=o(i),g=null==h||null===(r=h.controlBar)||void 0===r?void 0:r.progressControl,D=null==g||null===(l=g.seekBar)||void 0===l?void 0:l.el(),null===(s=document)||void 0===s||s.querySelectorAll(".vjs-seekbar-marker").forEach(function(e){return null==e?void 0:e.remove()}),v.map(function(e,n){m.push({ads:null==e?void 0:e.ads,durationInSeconds:null==e?void 0:e.durationInSeconds,startTimeInSeconds:null==e?void 0:e.startTimeInSeconds,markerPositionInSeconds:Math.floor(null==e?void 0:e.startTimeInSeconds),podSlotImpressionBeacon:O(null==e?void 0:e.ads,null==e?void 0:e.adBreakTrackingEvents)})}),Hn&&console.log("%c SSAI AD PODS ","background: #bdf369; color: #000",m),null!=m&&m.length&&(window.adsQueueList=m),m.forEach(function(e){var n=e.markerPositionInSeconds,t=e.ads,i=h.duration();if(!(n>i||Array.isArray(t)&&0==(null==t?void 0:t.length))){var r=n/i*100,o=document.createElement("div");o.className="vjs-seekbar-marker",o.style.left="".concat(r,"%"),o.style.position="absolute",o.style.top="0",o.style.bottom="0",o.style.width="2px",o.style.backgroundColor="#fecc09",o.style.left="".concat(r,"%"),o.style.pointerEvents="none",D.appendChild(o)}}),h._timeUpdateHandler&&h.off("timeupdate",null==h?void 0:h._timeUpdateHandler),h._timeUpdateHandler=a(function(){if(zt(i)){var e=null==h?void 0:h.currentTime();if(e!==T){T=e;for(var n=function(){var n=m[t],i=n.startTimeInSeconds,r=n.durationInSeconds,o=n.ads,a=i+r;if(e>=i-1.2&&e<=a+1.2){var l;A=!!(e>=i&&e<=a&&Array.isArray(o)&&(null==o?void 0:o.length)>0),e>a&&y.set(i,!0),on.disable(),I&&I.classList.add("vjs-hidden"),S&&(S.style.pointerEvents="none",S.classList.add("vjs-hidden")),k&&(k.style.pointerEvents="none",k.classList.add("vjs-hidden")),b&&(b.el().style.pointerEvents="none",b.el().classList.add("vjs-hidden")),E&&(E.el().style.pointerEvents="none",E.el().classList.add("vjs-hidden")),g.el().classList.add("hide-progress-bar");for(var s=e-i,d=0,u=0,c=0;c<o.length;c++){var v,f=null==o||null===(v=o[c])||void 0===v?void 0:v.durationInSeconds;if(s<d+f){u=c;break}d+=f}setTimeout(function(){Bn.totalAds=null==o?void 0:o.length,Bn.currentAdIndex=u},1e3);var h=[];return null==o||o.forEach(function(e){var n=e.trackingEvents.filter(function(e){return["breakStart","breakEnd","firstQuartile","secondQuartile","thirdQuartile","fourthQuartile","midpoint","impression","complete"].includes(e.eventType)});h.push.apply(h,p(n))}),(null==n||null===(l=n.podSlotImpressionBeacon)||void 0===l?void 0:l.length)>0&&h.push.apply(h,p(null==n?void 0:n.podSlotImpressionBeacon)),F(e,n,h,u),"break"}w.delete(i)},t=0;t<m.length;t++){if("break"===n())break}A||(Bn={},g.el().classList.remove("hide-progress-bar"),b&&(b.el().style.pointerEvents="auto",b.el().classList.remove("vjs-hidden")),E&&(E.el().style.pointerEvents="auto",E.el().classList.remove("vjs-hidden")),I&&I.classList.remove("vjs-hidden"),S&&(S.style.pointerEvents="auto",S.classList.remove("vjs-hidden")),k&&(k.style.pointerEvents="auto",k.classList.remove("vjs-hidden")),on.enable())}}},1e3),h.on("timeupdate",h._timeUpdateHandler);case 23:case"end":return e.stop()}},e)}));return function(n){return e.apply(this,arguments)}}(),L=new Map,P=2.5;case 22:case"end":return e.stop()}},e)})),Qn.apply(this,arguments)}var Yn=/(?:(\d{1,}):)?(\d{2}):(\d{2})((\.(\d{1,3})))?/g;function zn(e){return JSON.stringify((e||[]).map(function(e){return{availId:e.availId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds,ads:(e.ads||[]).map(function(e){return{adId:e.adId,startTimeInSeconds:e.startTimeInSeconds,durationInSeconds:e.durationInSeconds}})}}))}var Kn=function(){function e(n,t,i,r){_(this,e),this.video_=r,this.ad_=n,this.skipOffset_=function(e){if(!e)return null;var n=new RegExp(Yn.source,"g");n.lastIndex=0;var t=n.exec(e);if(!t)return null;var i=Number(t[1])||0,r=Number(t[2]),o=Number(t[3]),a=Number(t[6])||0;return r>59||o>59?null:a/1e3+o+60*r+3600*i}(null==n?void 0:n.skipOffset),this.adPosition_=t,this.totalAds_=i,this.isSkipped_=!1}return I(e,[{key:"isClientRendering",value:function(){return!1}},{key:"getDuration",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.durationInSeconds)&&void 0!==e?e:0}},{key:"getRemainingTime",value:function(){var e,n,t,i,r,o;return(null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0)+(null!==(t=null===(i=this.ad_)||void 0===i?void 0:i.durationInSeconds)&&void 0!==t?t:0)-(null!==(r=null===(o=this.video_)||void 0===o?void 0:o.currentTime)&&void 0!==r?r:0)}},{key:"isSkippable",value:function(){return"number"==typeof this.skipOffset_}},{key:"getTimeUntilSkippable",value:function(){if("number"!=typeof this.skipOffset_)return this.getRemainingTime();var e=this.getRemainingTime()+this.skipOffset_-this.getDuration();return Math.max(e,0)}},{key:"canSkipNow",value:function(){return 0===this.getTimeUntilSkippable()}},{key:"skip",value:function(){this.isSkipped_=!0,this.video_&&(this.video_.currentTime+=this.getRemainingTime())}},{key:"isLinear",value:function(){return!0}},{key:"getSequenceLength",value:function(){return this.totalAds_||1}},{key:"getPositionInSequence",value:function(){return this.adPosition_||1}},{key:"getTitle",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adTitle)||""}},{key:"getVastAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.vastAdId)||""}},{key:"getAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.adId)||""}},{key:"getCreativeAdId",value:function(){var e;return(null===(e=this.ad_)||void 0===e?void 0:e.creativeId)||""}},{key:"getTimeOffset",value:function(){var e,n;return null!==(e=null===(n=this.ad_)||void 0===n?void 0:n.startTimeInSeconds)&&void 0!==e?e:0}},{key:"release",value:function(){this.ad_=null,this.adPosition_=null,this.totalAds_=null}},{key:"isSkipped",value:function(){return this.isSkipped_}}]),e}(),Xn="impression",Jn="start",$n="mute",Zn="unmute",et="resume",nt="pause",tt="firstQuartile",it="midpoint",rt="thirdQuartile",ot="complete",at="skip",lt="breakStart",st="breakEnd",dt="skipStateChanged",ut="ad_impression",ct="ad_started",vt="ad_muted",ft="ad_volume_changed",mt="ad_resumed",pt="ad_paused",ht="ad_first_quartile",gt="ad_midpoint",yt="ad_third_quartile",wt="ad_complete",Tt="ad_stopped",_t="ad_skipped",It="ad_skip_state_changed",bt="ad_break_started",Et="ad_break_ended",St="ads_loaded",kt="ad_cuepoints_changed";function At(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Ot(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?At(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):At(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}function Dt(e,n){var t="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!t){if(Array.isArray(e)||(t=function(e,n){if(e){if("string"==typeof e)return Lt(e,n);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Lt(e,n):void 0}}(e))||n&&e&&"number"==typeof e.length){t&&(e=t);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){t=t.call(e)},n:function(){var e=t.next();return a=e.done,e},e:function(e){l=!0,o=e},f:function(){try{a||null==t.return||t.return()}finally{if(l)throw o}}}}function Lt(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,i=Array(n);t<n;t++)i[t]=e[t];return i}var Pt="[Transmit]";function Ct(e){var n,t,i;if(null==e)return{avails:[],nextToken:null,dashAvailabilityStartTime:null};var r=null!==(n=e.dashAvailabilityStartTime)&&void 0!==n?n:null,o=null!==(t=e.nextToken)&&void 0!==t?t:null,a=[];if(Array.isArray(e.avails))a=e.avails;else if(Array.isArray(e)){var l,s,d,u,c=e[0];if(c&&Array.isArray(c.avails))a=c.avails,r=null!==(l=null!==(s=r)&&void 0!==s?s:c.dashAvailabilityStartTime)&&void 0!==l?l:null,o=null!==(d=null!==(u=o)&&void 0!==u?u:c.nextToken)&&void 0!==d?d:null;else a=e}else if(Array.isArray(null==e||null===(i=e.data)||void 0===i?void 0:i.avails)){var v,f,m,p;a=e.data.avails,o=null!==(v=null!==(f=o)&&void 0!==f?f:e.data.nextToken)&&void 0!==v?v:null,r=null!==(m=null!==(p=r)&&void 0!==p?p:e.data.dashAvailabilityStartTime)&&void 0!==m?m:null}else Array.isArray(null==e?void 0:e.data)&&(a=e.data);return{avails:a,nextToken:o,dashAvailabilityStartTime:r}}var Ft=function(){function e(n,t,i){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};_(this,e),this.video_=n,this.player_=t,this.onEvent_="function"==typeof i?i:function(){},this.dashManifestUrl_=o.dashManifestUrl||null,this.config_=null,this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.pollIntervalMs_=2e3,this.pollId_=null,this.adBreaks_=[],this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null,this.eventsSent_=new Set,this.firedBeacons_=new Set,this.adBreakListenersAttached_=!1,this.globalListeners_=[],this.adListeners_=[],this.videoTimeupdate_=null,this.lastMutedForAd_=null,this.onDispose_=function(){return r.release()},this.apiTimelineAbsolute_=!1}var i,r,o;return I(e,[{key:"configure",value:function(e){this.config_=e}},{key:"addTrackingUrl",value:function(e){this.trackingUrl_=e||"",this.onEvent_({type:St,loadTime:0})}},{key:"getCuePoints",value:function(){var e,n=new Map,t=Dt(this.adBreaks_);try{for(t.s();!(e=t.n()).done;){var i,r=Dt(e.value.ads||[]);try{for(r.s();!(i=r.n()).done;){var o=i.value,a=o.startTimeInSeconds,l=a+o.durationInSeconds;if(isFinite(a)&&isFinite(l)&&!(l<=a)){var s="".concat(a.toFixed(1),"|").concat(l.toFixed(1));n.has(s)||n.set(s,{start:a,end:l})}}}catch(e){r.e(e)}finally{r.f()}}}catch(e){t.e(e)}finally{t.f()}return Array.from(n.values()).sort(function(e,n){return e.start-n.start})}},{key:"onManifestUpdated",value:function(){this.trackingUrl_&&(this.requestTrackingInfo_(this.firstTrackingRequest_),this.firstTrackingRequest_=!1,this.ensurePolling_())}},{key:"stop",value:function(){this.onEnded_(),this.detachAllListeners_(),this.eventsSent_.clear(),this.firedBeacons_.clear(),this.trackingUrl_="",this.firstTrackingRequest_=!0,this.nextToken_=null,this.dashAvailabilityStartTime_=0,this.dashAvailabilityStartTimeResolved_=!1,this.apiTimelineAbsolute_=!1,this.adBreaks_=[],this.adBreakListenersAttached_=!1,this.pollId_&&(clearInterval(this.pollId_),this.pollId_=null)}},{key:"release",value:function(){this.stop()}},{key:"ensurePolling_",value:function(){var e=this;this.pollId_||(this.pollId_=setInterval(function(){var n,t;e.trackingUrl_&&(null!==(n=e.player_)&&void 0!==n&&null!==(t=n.paused)&&void 0!==t&&t.call(n)||e.requestTrackingInfo_(!1))},this.pollIntervalMs_))}},{key:"requestTrackingInfo_",value:(o=n(t.mark(function e(n){var i,r,o,a,l,s,d,u,c,v,f,m,p,h,g,y,w;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,r=new Map,o=0,a=null;case 4:if(!(o<10)){e.next=25;break}return l=new URL(this.trackingUrl_),this.nextToken_&&l.searchParams.set("nextToken",this.nextToken_),e.next=9,fetch(l.toString(),{method:"GET"});case 9:return s=e.sent,e.next=12,s.json();case 12:d=e.sent,o++,(u=Ct(d)).dashAvailabilityStartTime&&!a&&(a=u.dashAvailabilityStartTime),c=Dt(u.avails);try{for(c.s();!(v=c.n()).done;)f=v.value,m=(null==f?void 0:f.availId)||"".concat(null==f?void 0:f.startTimeInSeconds),r.set(m,f)}catch(e){c.e(e)}finally{c.f()}if((p=u.nextToken||null)&&p!==this.nextToken_){e.next=22;break}return this.nextToken_=p,e.abrupt("break",25);case 22:this.nextToken_=p,e.next=4;break;case 25:if(h=Array.from(r.values()),this.updateApiTimelineAbsoluteFlag_(h),g=(null==h||null===(i=h[0])||void 0===i?void 0:i.startTimeInSeconds)||0,this.apiTimelineAbsolute_){e.next=33;break}return e.next=31,this.resolveDashAvailabilityStartTime_(a,g);case 31:e.next=35;break;case 33:this.dashAvailabilityStartTimeResolved_=!0,this.dashAvailabilityStartTime_=0;case 35:h.length?(y=this.normalizeAvails_(h),zn(this.adBreaks_)!==zn(y)&&(this.adBreaks_=y,w=this.getCuePoints(),this.onEvent_({type:kt,cuepoints:w}))):this.adBreaks_.length&&(this.onEvent_({type:kt,cuepoints:[]}),this.onEnded_(),this.adBreaks_=[]),n&&this.setupAdBreakListeners_(),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(0),console.warn(Pt,"tracking info fetch failed",e.t0);case 42:case"end":return e.stop()}},e,this,[[0,39]])})),function(e){return o.apply(this,arguments)})},{key:"updateApiTimelineAbsoluteFlag_",value:function(e){this.apiTimelineAbsolute_=!1;var n,t=1e6,i=Dt(e||[]);try{for(i.s();!(n=i.n()).done;){var r,o=n.value;if((null!==(r=null==o?void 0:o.startTimeInSeconds)&&void 0!==r?r:0)>t)return void(this.apiTimelineAbsolute_=!0);var a,l=Dt((null==o?void 0:o.ads)||[]);try{for(l.s();!(a=l.n()).done;){var s,d=a.value;if((null!==(s=null==d?void 0:d.startTimeInSeconds)&&void 0!==s?s:0)>t)return void(this.apiTimelineAbsolute_=!0)}}catch(e){l.e(e)}finally{l.f()}}}catch(e){i.e(e)}finally{i.f()}}},{key:"normalizeAvails_",value:function(e){var n=this,t=this.apiTimelineAbsolute_?0:this.dashAvailabilityStartTime_||0;return e.map(function(e){var i=n.resolveAbsoluteStart_(e,t,null);return Ot(Ot({},e),{},{startTimeInSeconds:i,ads:(e.ads||[]).map(function(r){return Ot(Ot({},r),{},{startTimeInSeconds:n.resolveAbsoluteStart_(r,t,e,i)})})})})}},{key:"resolveAbsoluteStart_",value:function(e,n,t,i){var r=null==e?void 0:e.adProgramDateTime;if(r){var o=new Date(r).getTime()/1e3;if(isFinite(o)&&o>0)return o}return null!=t&&t.adProgramDateTime&&"number"==typeof i?i+((e.startTimeInSeconds||0)-(t.startTimeInSeconds||0)):(e.startTimeInSeconds||0)+n}},{key:"resolveDashAvailabilityStartTime_",value:(r=n(t.mark(function e(n,i){var r,o;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.dashAvailabilityStartTimeResolved_){e.next=2;break}return e.abrupt("return");case 2:if(!n){e.next=8;break}if(r=new Date(n).getTime()/1e3,!(isFinite(r)&&r>0)){e.next=8;break}return this.dashAvailabilityStartTime_=r,this.dashAvailabilityStartTimeResolved_=!0,e.abrupt("return");case 8:if(!(i>0)){e.next=13;break}return e.next=11,this.fetchDashAvailabilityStartTimeFromMpd_();case 11:(o=e.sent)>0&&(this.dashAvailabilityStartTime_=o,this.dashAvailabilityStartTimeResolved_=!0);case 13:case"end":return e.stop()}},e,this)})),function(e,n){return r.apply(this,arguments)})},{key:"fetchDashAvailabilityStartTimeFromMpd_",value:(i=n(t.mark(function e(){var n,i,r,o,a,l;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(i=this.dashManifestUrl_||this.getCurrentSourceUrl_())&&i.includes(".mpd")){e.next=4;break}return e.abrupt("return",0);case 4:return e.next=6,fetch(i);case 6:return r=e.sent,e.next=9,r.text();case 9:return o=e.sent,a=(new DOMParser).parseFromString(o,"application/xml"),l=null===(n=a.querySelector("MPD"))||void 0===n?void 0:n.getAttribute("availabilityStartTime"),e.abrupt("return",l?new Date(l).getTime()/1e3:0);case 15:return e.prev=15,e.t0=e.catch(0),console.warn(Pt,"MPD availabilityStartTime parse failed",e.t0),e.abrupt("return",0);case 19:case"end":return e.stop()}},e,this,[[0,15]])})),function(){return i.apply(this,arguments)})},{key:"getCurrentSourceUrl_",value:function(){try{var e,n,t,i,r=(null===(e=this.player_)||void 0===e||null===(n=e.currentSrc)||void 0===n?void 0:n.call(e))||(null===(t=this.player_)||void 0===t||null===(i=t.src)||void 0===i?void 0:i.call(t));return"string"==typeof r?r:(null==r?void 0:r.src)||""}catch(e){return""}}},{key:"setupAdBreakListeners_",value:function(){var e=this;if(!this.adBreakListenersAttached_){this.adBreakListenersAttached_=!0,this.onTimeupdate_();this.attachGlobalListener_("timeupdate",function(){return e.onTimeupdate_()}),this.attachGlobalListener_("dispose",this.onDispose_),this.video_&&(this.videoTimeupdate_=function(){return e.onTimeupdate_()},this.video_.addEventListener("timeupdate",this.videoTimeupdate_))}}},{key:"isHlsSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase(),i=((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase();return t.includes(".m3u8")||"application/x-mpegurl"===i||"application/vnd.apple.mpegurl"===i}},{key:"isDashSource_",value:function(){var e,n,t=this.getCurrentSourceUrl_().toLowerCase();return"application/dash+xml"===((null===(e=this.player_)||void 0===e||null===(n=e.currentType)||void 0===n?void 0:n.call(e))||"").toLowerCase()||t.includes(".mpd")}},{key:"getDashMediaPlayerTimelineSeconds_",value:function(){try{var e,n,t=null===(e=this.player_)||void 0===e||null===(n=e.dash)||void 0===n?void 0:n.mediaPlayer;if(!t||"function"!=typeof t.time)return null;var i=t.time();return"number"==typeof i&&isFinite(i)&&i>1e6?i:null}catch(e){return null}}},{key:"getCurrentTime_",value:function(){var e,n,t,i=null!==(e=null===(n=this.video_)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:0,r=d();if(this.isHlsSource_()){var o,a,l=i,s=null===(o=this.player_)||void 0===o||null===(a=o.seekable)||void 0===a?void 0:a.call(o);return s&&s.length>0&&(l=s.end(s.length-1)),Date.now()/1e3-(l-i)}if(this.isDashSource_()){var u,c,v,f=this.getDashMediaPlayerTimelineSeconds_();if(null!=f)return f;var m=null===(u=this.player_)||void 0===u||null===(c=u.seekable)||void 0===c?void 0:c.call(u),p="function"==typeof(null===(v=this.player_)||void 0===v?void 0:v.currentTime)?this.player_.currentTime():i;if(m&&m.length>0){var h=m.start(0);if(h>1e6&&h+p>1e6)return h+p}if(this.apiTimelineAbsolute_&&(this.dashAvailabilityStartTime_||0)>1e9)return(this.dashAvailabilityStartTime_||0)+p}return"Safari"===r?i:"function"==typeof(null===(t=this.player_)||void 0===t?void 0:t.currentTime)?this.player_.currentTime():i}},{key:"onTimeupdate_",value:function(){if(this.ad_||this.adBreaks_.length){var e=this.getCurrentTime_();if(this.ad_){var n,t;this.sendInProgressEvents_(e,this.transmitAd_);var i=this.ad_.getDuration(),r=(null!==(n=null===(t=this.transmitAd_)||void 0===t?void 0:t.startTimeInSeconds)&&void 0!==n?n:0)+i,o=r-e;this.ad_.canSkipNow()&&o>0&&i>0&&this.sendTrackingEvent_(dt),i>0&&e>=r&&this.onEnded_()}this.ad_||this.checkLinearAds_(e)}}},{key:"sendInProgressEvents_",value:function(e,n){if(n){var t=n.startTimeInSeconds+.25*n.durationInSeconds,i=n.startTimeInSeconds+.5*n.durationInSeconds,r=n.startTimeInSeconds+.75*n.durationInSeconds;e>=t&&!this.eventsSent_.has(tt)&&(this.eventsSent_.add(tt),this.sendTrackingEvent_(tt)),e>=i&&!this.eventsSent_.has(it)&&(this.eventsSent_.add(it),this.sendTrackingEvent_(it)),e>=r&&!this.eventsSent_.has(rt)&&(this.eventsSent_.add(rt),this.sendTrackingEvent_(rt))}}},{key:"flushPendingQuartiles_",value:function(){for(var e=0,n=[tt,it,rt];e<n.length;e++){var t=n[e];this.eventsSent_.has(t)||(this.eventsSent_.add(t),this.sendTrackingEvent_(t))}}},{key:"checkLinearAds_",value:function(e){var n,t=Dt(this.adBreaks_);try{for(t.s();!(n=t.n()).done;){var i=n.value;if(this.ad_)break;for(var r=i.ads||[],o=0;o<r.length;o++){var a=r[o],l=a.startTimeInSeconds,s=l+a.durationInSeconds;if(l<=e&&s>e){this.onEnded_(),this.transmitAdBreak_=i,this.transmitAd_=a,this.ad_=new Kn(a,o+1,r.length,this.video_),0===o&&this.sendTrackingEvent_(lt),this.setupCurrentAdListeners_();break}}}}catch(e){t.e(e)}finally{t.f()}}},{key:"onEnded_",value:function(){this.ad_&&this.transmitAd_&&(this.ad_.isSkipped()||this.flushPendingQuartiles_(),this.removeCurrentAdListeners_(this.ad_.isSkipped()),this.ad_.getPositionInSequence()===this.ad_.getSequenceLength()&&this.sendTrackingEvent_(st),this.ad_=null,this.transmitAd_=null,this.transmitAdBreak_=null)}},{key:"setupCurrentAdListeners_",value:function(){var e,n,t,i,r,o=this,a=!1;null!==(e=this.player_)&&void 0!==e&&null!==(n=e.paused)&&void 0!==n&&n.call(e)?a=!0:(this.sendTrackingEvent_(Xn),this.sendTrackingEvent_(Jn)),this.lastMutedForAd_=null!==(t=null===(i=this.player_)||void 0===i||null===(r=i.muted)||void 0===r?void 0:r.call(i))&&void 0!==t&&t,this.attachAdListener_("volumechange",function(){var e,n,t,i=null!==(e=null===(n=o.player_)||void 0===n||null===(t=n.muted)||void 0===t?void 0:t.call(n))&&void 0!==e&&e;i!==o.lastMutedForAd_&&(o.lastMutedForAd_=i,i?o.sendTrackingEvent_($n):o.sendTrackingEvent_(Zn))}),this.attachAdListener_("play",function(){a?(o.sendTrackingEvent_(Xn),o.sendTrackingEvent_(Jn),a=!1):o.sendTrackingEvent_(et)}),this.attachAdListener_("pause",function(){o.sendTrackingEvent_(nt)})}},{key:"removeCurrentAdListeners_",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.sendTrackingEvent_(e?at:ot),this.detachAdListeners_(),this.eventsSent_.clear()}},{key:"attachGlobalListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.globalListeners_.push({event:e,handler:n}))}},{key:"attachAdListener_",value:function(e,n){this.player_&&(this.player_.on(e,n),this.adListeners_.push({event:e,handler:n}))}},{key:"detachAdListeners_",value:function(){var e,n=Dt(this.adListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r=e.value,o=r.event,a=r.handler;null===(t=this.player_)||void 0===t||null===(i=t.off)||void 0===i||i.call(t,o,a)}}catch(e){n.e(e)}finally{n.f()}this.adListeners_=[]}},{key:"detachAllListeners_",value:function(){this.detachAdListeners_();var e,n=Dt(this.globalListeners_);try{for(n.s();!(e=n.n()).done;){var t,i,r=e.value,o=r.event,a=r.handler;null===(t=this.player_)||void 0===t||null===(i=t.off)||void 0===i||i.call(t,o,a)}}catch(e){n.e(e)}finally{n.f()}this.globalListeners_=[],this.video_&&this.videoTimeupdate_&&(this.video_.removeEventListener("timeupdate",this.videoTimeupdate_),this.videoTimeupdate_=null)}},{key:"startComscoreForCurrentAd_",value:function(){try{var e=wn.get();if(!e||0===Object.keys(e).length)return;var n=e.formulateComscoreAdPayload,t=e.startComscoreAdTracking,i=kn.get();t(n(Ot(Ot({},this.transmitAd_),{},{trackingUrl:i})))}catch(e){console.warn(Pt,"comscore start failed",e)}}},{key:"sendTrackingEvent_",value:function(e){var n,t=this;if(this.transmitAd_&&this.transmitAdBreak_){var i=(this.transmitAd_.trackingEvents||[]).find(function(n){return n.eventType===e});if(i||(i=(this.transmitAdBreak_.adBreakTrackingEvents||[]).find(function(n){return n.eventType===e})),i&&(null===(n=this.config_)||void 0===n||!n.disableTrackingEvents)){var r,o,a,l=(null===(r=this.transmitAd_)||void 0===r?void 0:r.adId)||(null===(o=this.transmitAdBreak_)||void 0===o?void 0:o.availId)||"unknown",s=Dt(i.beaconUrls||[]);try{var d=function(){var n=a.value;if(!n)return"continue";var i="".concat(l,"|").concat(e,"|").concat(n);if(t.firedBeacons_.has(i))return"continue";t.firedBeacons_.add(i),fetch(n,{mode:"no-cors"}).catch(function(e){console.warn(Pt,"beacon failed",n,e)})};for(s.s();!(a=s.n()).done;)d()}catch(e){s.e(e)}finally{s.f()}}var u=wn.get(),c=u&&Object.keys(u).length?u:null;switch(e){case Xn:this.onEvent_({type:ut}),this.startComscoreForCurrentAd_();break;case Jn:this.onEvent_({type:ct,ad:this.ad_});break;case $n:this.onEvent_({type:vt});break;case Zn:this.onEvent_({type:ft});break;case et:this.onEvent_({type:mt});break;case nt:this.onEvent_({type:pt});break;case tt:this.onEvent_({type:ht});break;case it:this.onEvent_({type:gt});break;case rt:this.onEvent_({type:yt});break;case ot:this.onEvent_({type:wt}),this.onEvent_({type:Tt}),null!=c&&c.finishComscoreAdTracking&&c.finishComscoreAdTracking();break;case at:this.onEvent_({type:_t}),this.onEvent_({type:Tt});break;case lt:this.onEvent_({type:bt});break;case st:this.onEvent_({type:Et}),null!=c&&c.endComscoreAdTracking&&c.endComscoreAdTracking();break;case dt:this.onEvent_({type:It})}}else console.warn(Pt,"sendTrackingEvent_ skipped — no active ad",{eventType:e})}}]),e}();function jt(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function Rt(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?jt(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):jt(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}var Vt={dash:"tracking/initialize/dash",hls:"tracking/initialize/hls"};function Nt(e){if(null==e||!e.src)return null;var n=(e.type||"").toLowerCase(),t=String(e.src).toLowerCase();return"application/dash+xml"===n||t.includes(".mpd")?"dash":"application/x-mpegurl"===n||"application/vnd.apple.mpegurl"===n||t.includes(".m3u8")?"hls":null}function Wt(e,n,t){return xt.apply(this,arguments)}function xt(){return(xt=n(t.mark(function e(n,i,r){var o,a,l,s,d,u,c,v,f,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Nt(n)){e.next=3;break}return e.abrupt("return",n);case 3:return a=Ge(n.src,r,i),l=a.replace(o,Vt[o]),console.log("[Transmit] session init →",l),e.prev=6,e.next=9,fetch(l,{method:"GET",redirect:"follow"});case 9:return s=e.sent,e.next=12,s.json();case 12:if(d=e.sent,console.log("[Transmit] session response",d),u="dash"===o?null==d?void 0:d.dashUrl:null==d?void 0:d.hlsUrl,c=null==d?void 0:d.trackingUrl,u&&c){e.next=18;break}return e.abrupt("return",n);case 18:return v=new URL(l),f=v.hostname,m="https://".concat(f).concat(u),p="https://".concat(f).concat(c),kn.set(p),console.log("[Transmit] session ready",{manifestUrl:m,trackingUrl:p}),e.abrupt("return",Rt(Rt({},n),{},{src:m}));case 26:return e.prev=26,e.t0=e.catch(6),console.warn("[Transmit] session init failed",e.t0),e.abrupt("return",n);case 30:case"end":return e.stop()}},e,null,[[6,26]])}))).apply(this,arguments)}var Mt=null;function Ut(e,n){var t;if(Mt)return console.log("[Transmit] initializeTransmit skipped — manager already initialised"),Mt;var i=kn.get();if(!i)return console.warn("[Transmit] initializeTransmit skipped — no tracking URL"),null;var r=o(e);if(!r)return console.warn("[Transmit] initializeTransmit skipped — no player"),null;var a=(null===(t=r.el())||void 0===t?void 0:t.querySelector("video"))||null,l=function(e){try{var n="function"==typeof(null==e?void 0:e.currentSrc)&&e.currentSrc()||"function"==typeof(null==e?void 0:e.src)&&e.src()||"";if("application/dash+xml"===("function"==typeof(null==e?void 0:e.currentType)&&e.currentType()||"")||String(n).includes(".mpd"))return n}catch(e){}return null}(r);return(Mt=new Ft(a,r,function(e){var t,i;console.log("[Transmit] ad event",e);var r=null==n||null===(t=n.customData)||void 0===t||null===(i=t.ads)||void 0===i?void 0:i.adEventHandler;if("function"==typeof r)try{r(e)}catch(e){console.warn("[Transmit] adEventHandler threw",e)}},{dashManifestUrl:l})).configure({disableTrackingEvents:!1}),Mt.addTrackingUrl(i),Mt.onManifestUpdated(),Mt}function Bt(){Mt&&(Mt.release(),Mt=null)}function Ht(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}var Gt=function(e){i(e).play()},qt=function(e){i(e).pause()},Qt=function(e,n){var t=i(e),r=t.currentTime()+n;t.currentTime(r)},Yt=function(e,n){var t=i(e),r=t.currentTime(),o=r<=n?0:r-n;t.currentTime(o)},zt=function(e){return!!i.getPlayer("".concat(e))},Kt=function(e){return i(e).paused()},Xt=function(){var e=n(t.mark(function e(i,r){var a,l,s,d=arguments;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a=d.length>2&&void 0!==d[2]&&d[2],e.next=3,$();case 3:return l=e.sent,s=o(i),e.abrupt("return",new Promise(function(e,o){F(r,l).then(function(){var o=n(t.mark(function n(o){var l,d,u,c,v,f,m,p,h,g,y;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Bt(),f=null==o?void 0:o.data,window.sid=Ee(),f.contentType="linearchannel",f.channelId=null==r?void 0:r.channelId,m=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(d=window)||void 0===d||null===(u=d.app_data)||void 0===u||null===(c=u.appcmsMain)||void 0===c?void 0:c.adsConfig)||{},p=!(null==f||null===(v=f.linearchannel)||void 0===v||!v.isSSAIEnabled),h=p&&"MEDIA_TAILOR"==(null==m?void 0:m.vodAdSticherProvider),g=p&&"TRANSMIT"==(null==m?void 0:m.liveAdSticherProvider)&&!(null==m||!m.liveAdClientSideTracking),y=Qe(f,i),!h){n.next=17;break}return n.next=13,On(i,f);case 13:y=n.sent,a=!0,n.next=22;break;case 17:if(!g){n.next=22;break}return n.next=20,Wt(y,f,i);case 20:y=n.sent,a=!0;case 22:ie(f),y&&a?(ni(i,y),g?Ut(i,{customData:window.customData||{ads:m}}):h&&qn(i),s.on("loadstart",function(){e({status:!0,msg:"Feed authenticated and loaded",response:f})})):(wn.get()&&0!==Object.keys(wn.get()).length&&Tn({playerId:i,comscore:{enable:!0}}),e({status:!0,msg:"Feed authenticated",response:f}));case 24:case"end":return n.stop()}},n)}));return function(e){return o.apply(this,arguments)}}()).catch(function(e){o({status:!1,msg:"Cannot load feed",response:e})})}));case 6:case"end":return e.stop()}},e)}));return function(n,t){return e.apply(this,arguments)}}(),Jt=function(){var e=n(t.mark(function e(i,r,a){var l,s,d,u,c,m,p;return t.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,$();case 2:return u=e.sent,console.log("load video"),(ae()||null)&&ce(r),c=0,m=0,p=null,null!==(l=window)&&void 0!==l&&l.watchHistory&&null!==(s=window)&&void 0!==s&&null!==(d=s.watchHistory)&&void 0!==d&&d.enable&&V(r,u).then(function(e){var n,t,i,r,o,a,l;(null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(null==e?void 0:e.data)),c=(null==e||null===(o=e.data)||void 0===o?void 0:o.watchedTime)||null,(m=(null==e||null===(a=e.data)||void 0===a?void 0:a.watchedPercentage)||null)<95)&&(p=(null==e||null===(l=e.data)||void 0===l?void 0:l.watchedTime)||null)}).catch(function(e){var n,t,i,r;null!==(n=window)&&void 0!==n&&null!==(t=n.watchHistory)&&void 0!==t&&t.cb&&(null===(i=window)||void 0===i||null===(r=i.watchHistory)||void 0===r||r.cb(e))}),e.abrupt("return",new Promise(function(e,a){C(r,u).then(function(){var r=n(t.mark(function n(r){var l,s,d,u,h,g,y,w,T,_,I,b,E,S,k,A,O,D,L,P,C,F,j,R,V,N,W,x,M,U,B,H,G,q,Q,Y,z,K,X,J;return t.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(A=null==r?void 0:r.data,O=(null==A?void 0:A.contentType)||"video",D=(null===(l=window.customData)||void 0===l?void 0:l.ads)||(null===(s=window)||void 0===s||null===(d=s.app_data)||void 0===d||null===(u=d.appcmsMain)||void 0===u?void 0:u.adsConfig)||{},L=!(null==A||null===(h=A[O])||void 0===h||!h.isSSAIEnabled),P=L&&"MEDIA_TAILOR"==(null==D?void 0:D.vodAdSticherProvider),C=L&&"TRANSMIT"==(null==D?void 0:D.liveAdSticherProvider)&&!(null==D||!D.liveAdClientSideTracking),F=!(null==A||null===(g=A[O])||void 0===g||null===(y=g.streamingInfo)||void 0===y||!y.isLiveStream)||"linearchannel"===O,ie(r.data),(j=(null==A||null===(w=A.ads)||void 0===w||null===(T=w.preRoll)||void 0===T||null===(_=T.adTags)||void 0===_||null===(I=_.web)||void 0===I?void 0:I.active)&&(null==A||null===(b=A.ads)||void 0===b||null===(E=b.preRoll)||void 0===E||null===(S=E.adTags)||void 0===S||null===(k=S.web)||void 0===k?void 0:k.url))&&nn(i,j,A),R=Qe(A,i),!P){n.next=17;break}return n.next=14,On(i,A);case 14:R=n.sent,n.next=22;break;case 17:if(!C||!F){n.next=22;break}return Bt(),n.next=21,Wt(R,A,i);case 21:R=n.sent;case 22:if(!R){n.next=37;break}if((null==A||null===(V=A.video)||void 0===V||null===(N=V.gist)||void 0===N?void 0:N.videoImageUrl)||null==A||null===(W=A.video)||void 0===W||null===(x=W.gist)||void 0===x||null===(M=x.imageGist)||void 0===M||M.r16x9,Q=o(i)){n.next=28;break}return console.error("[VL][player-core] player not found for id=".concat(i),{player:Q}),n.abrupt("return",a({status:!1,msg:"Player not found",response:{}}));case 28:ni(i,R),C&&F?Ut(i,{customData:window.customData||{ads:D}}):P&&Vn(i,p),Q.on("loadstart",function(){F&&e({status:!0,msg:"Video Loaded",response:A})}),Q.on("loadeddata",function(){Ze(),e({status:!0,msg:"Video Loaded",response:A})}),Q.one("play",function(){!c||P||C&&F||m<95&&setTimeout(function(){Q.currentTime(c)},0)}),Q.one("error",function(){var e;a({status:!1,msg:(null==Q||null===(e=Q.error())||void 0===e?void 0:e.message)||"Some error occured"})}),(null==A||null===(U=A.video)||void 0===U||null===(B=U.contentDetails)||void 0===B||null===(H=B.closedCaptions)||void 0===H?void 0:H.length)>0||(null==A||null===(G=A.video)||void 0===G||null===(q=G.closedCaptions)||void 0===q?void 0:q.length)>0?(J=(null==A||null===(z=A.video)||void 0===z||null===(K=z.contentDetails)||void 0===K?void 0:K.closedCaptions)||(null==A||null===(X=A.video)||void 0===X?void 0:X.closedCaptions),Y=J.filter(function(e){return"VTT"===e.format}),f(i,Y)):v(i),n.next=39;break;case 37:$e(i,"Incompatible Source, only hls,mp4,drm content is allowed"),a("Incompatible Source, only hls,mp4,drm content is allowed");case 39:case"end":return n.stop()}},n)}));return function(e){return r.apply(this,arguments)}}()).catch(function(e){ti(e,i,a,r)})}));case 11:case"end":return e.stop()}},e)}));return function(n,t,i){return e.apply(this,arguments)}}(),$t=function(e,n,t){var i=o(e);return i.src(n),new Promise(function(e,n){var r=0;i.one("loadedmetadata",function(){clearTimeout(r),e({status:!0,msg:"video loaded"})}),i.one("loadstart",function(e){r=setTimeout(function(){n("FAILED: Took too long to load")},t)})})},Zt=function(e){Bt();var n=o(e),t=(wn.get()||{}).destroyComscoreTag;if(ei(),t&&t(),l(),window.onresize=null,n)n.dispose();else{var i=document.getElementById(e);i&&i.remove()}},ei=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()},ni=function(e,n){console.log("load video in core",n);var t=o(e);t&&t.src(n)},ti=function(n,t,i,r){var o,a,l,s,d,u,c=null==n||null===(o=n.response)||void 0===o||null===(a=o.data)||void 0===a?void 0:a.errorCode,v=(null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.errorMessage)||(null==n?void 0:n.message);zt(t)&&$e(t,(null===(d=window)||void 0===d?void 0:d.customErrors)&&(null===(u=window)||void 0===u?void 0:u.customErrors[c])||"".concat(v)),i&&i(function(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Ht(Object(i),!0).forEach(function(t){e(n,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ht(Object(i)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(i,e))})}return n}({status:!1,response:n,msg:"".concat(v)},r&&{videoId:r}))},ii=function(e){var n=document.getElementById(e),t=n.getElementsByClassName("vjs-control-bar")[0];t&&(t.style.visibility="hidden");var i=n.getElementsByClassName("vjs-big-play-button")[0];i&&(i.style.display="none");var r=n.getElementsByClassName("vjs-fullscreen-control")[0];r&&(r.style.display="none")};export{Kt as $,$ as A,F as B,j as C,Re as D,ve as E,oe as F,$t as G,Qt as H,Gt as I,qt as J,Yt as K,zt as L,Jt as M,Xt as N,Zt as O,x as P,pn as Q,ne as R,W as S,he as T,Z as U,B as V,M as W,E as X,Rn as Y,tn as Z,le as _,Ne as a,se as a0,Ut as a1,qn as a2,Vn as a3,N as a4,ue as a5,ce as a6,ae as b,wn as c,Ve as d,re as e,Qe as f,Se as g,ie as h,Tn as i,Ze as j,$e as k,ni as l,de as m,ii as n,Wt as o,je as p,nn as q,Je as r,R as s,kn as t,On as u,te as v,ee as w,C as x,V as y,ti as z};
|
package/esm/index-95713239.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/typeof";import{e as n,v as t,Y as a,L as o}from"./generic-bd7427c4.js";import{g as r}from"./skin-4f84b841.js";import i from"@babel/runtime/helpers/toConsumableArray";import l from"@babel/runtime/helpers/slicedToArray";import{g as c}from"./localisation-0bf399a1.js";var s=!1,u=function(e,n,t){var a=r(e);a?n>=0&&n<=a.duration()?(t({status:!0,msg:"Successfully seeked to timestamp : ".concat(n)}),a.currentTime(n)):t({status:!1,msg:"Out of bounds, please provide a valid timestamp"}):t("Cannot find player with id: '".concat(e,"'"))},d=function(e,n){var t=r(e);if(!t)return"Cannot find player with id: '".concat(e,"'");try{return t.playbackRate(n),"Playback speed set to ".concat(n,"x")}catch(e){return"Error: ".concat(e)}},v=function(e,o){var i=r(e);i?(i.on("ended",function(){return s=!0}),i.on("timeupdate",function(){if(!i.paused()&&s){var e,r,l=null===(e=n())||void 0===e||null===(r=e.video)||void 0===r?void 0:r.id;t.get(l)?(t.clear(),a.clear(),o(),t.set(l)):(t.clear(),t.set(l)),s=!1}})):o("Cannot find player with id: '".concat(e,"'"))},m=function(e,n){var t=r(e);t?t.on("timeupdate",function(){return n(t.currentTime())}):n("Cannot find player with id: '".concat(e,"'"))},f=function(e,n){var t=r(e);t?t.on("ended",function(){return n(!0)}):n("Cannot find player with id: '".concat(e,"'"))},h=function(e){var n=r(e);return n?n.duration():"Cannot find player with id: '".concat(e,"'")};function g(){var n=function(e,n){var t=r(e);if(!t)throw"Cannot find player with id: '".concat(e,"'");if("function"!=typeof n)throw"Callback function (cb) is missing or not a function";return t};return{onPlay:function(e,t){n(e,t).on("play",function(){return t()})},onPause:function(e,t){n(e,t).on("pause",function(){return t()})},onMute:function(e,t){var a=n(e,t);a.on("volumechange",function(){a.muted()?t({muted:!0}):t({muted:!1})})},onPictureInPictureChange:function(e,t){var a=n(e,t);a.on("enterpictureinpicture",function(){t({pip:!0})}),a.on("leavepictureinpicture",function(){t({pip:!1})})},onFullScreenChange:function(e,t){var a=n(e,t);a.on("fullscreenchange",function(e){a.isFullscreen_?t({isFullscreen:!0}):t({isFullscreen:!1})})},onSetVolume:function(e,t){var a=n(e,t);a.on("volumechange",function(){var e=100*a.volume().toFixed(2);a.muted()?t({vol:0}):t({vol:e})})},onSeeked:function(e,t){var a=n(e,t);a.on("seeked",function(){t({seeked:a.currentTime()})})},onSubtitleEnable:function(e,t){var a=n(e,t);a.textTracks().on("change",function(e){console.log(a.textTracks());var n=a.textTracks().tracks_.filter(function(e){return("subtitles"===e.kind||"captions"===e.kind)&&"showing"===e.mode});n.length>0&&t({enabled:n[0]})})},onDisableSubtitles:function(e,t){var a=n(e,t);a.textTracks().on("change",function(e){var n,o;console.log(a.textTracks()),(null==a||null===(n=a.textTracks())||void 0===n||null===(o=n.tracks_)||void 0===o?void 0:o.every(function(e){return"showing"!=e.mode}))&&t({captions_disabled:!0})})},onSubtitleCueChange:function(t,a){var o=n(t,a);o.on("loadeddata",function(){var n,t,r,i,l,c=o.textTracks();"object"==e(o.dash)&&null!=o.dash&&o.dash.mediaPlayer.on(null===(t=window)||void 0===t||null===(r=t.dashjs)||void 0===r||null===(i=r.MediaPlayer)||void 0===i||null===(l=i.events)||void 0===l?void 0:l.CAPTION_RENDERED,function(e){a(e)});for(var s=0;s<c.length;s++){var u=c[s];"metadata"===u.kind&&(u.mode="hidden",n=u)}n&&n.addEventListener("cuechange",function(){var e=n.activeCues;if(e&&e.length>0)for(var t=0;t<e.length;t++){var o=e[t];a(o)}else console.log("no active cue at this moment")})})},onError:function(e,t){var a=n(e,t);a.on("error",function(){var e,n;t({error:null==a||null===(e=a.error())||void 0===e?void 0:e.code,msg:null==a||null===(n=a.error())||void 0===n?void 0:n.message})})}}}var p,E=null,y=function(e,n){(new Date).getMonth(),new Date(n).getMonth(),(new Date).getFullYear(),new Date(n).getFullYear();var t=Math.floor(e/6048e5),a=function(e,n){var t;return t=12*(n.getFullYear()-e.getFullYear()),t-=e.getMonth(),(t+=n.getMonth())<=0?0:t}(new Date,new Date(n)),o=a>0&&t>4?a:0,r=function(e,n){var t=new Date(n).getFullYear()-new Date(e).getFullYear(),a=new Date(n).getMonth()-new Date(e).getMonth();return new Date(n).getDay()-new Date(e).getDay()<0&&(a-=1),a<0&&(t-=1),t}(new Date,new Date(n));return[r>0&&o>0?r:0,o,t,Math.floor(e/864e5),Math.floor(e%864e5/36e5),Math.floor(e%36e5/6e4),Math.floor(e%6e4/1e3)]},C=function(e){var n,t=l(e,8),a=t[0],o=t[1],r=t[2],i=t[3],c=t[4],s=t[5],u=t[6],d=t[7];n=a>=1?" ".concat(a," Year"):o>=1?" ".concat(o," month"):r>=1?" ".concat(r," week"):i>=1?" ".concat(i," day"):c<24&&c>=12?" ".concat(c," hour"):c>0?"".concat(c," hours ").concat(s," minutes ").concat(u," seconds"):s>0?"".concat(s," minutes ").concat(u," seconds"):"".concat(u," seconds"),d.textContent="".concat(n)},D=(p={scheduleStartTimeMs:0,scheduleEndTimeMs:0},{get:function(){return p},set:function(e){p={scheduleStartTimeMs:null==e?void 0:e.startDateTime,scheduleEndTimeMs:null==e?void 0:e.endDateTime}}});function w(e,n,t,a){if(e){var o=function(){var e,o,l=null===(e=D.get())||void 0===e?void 0:e.scheduleStartTimeMs,s=null===(o=D.get())||void 0===o?void 0:o.scheduleEndTimeMs,u=Date.now();if(u-s>0){var d=document.getElementsByClassName("error-message")[0];return d&&(d.textContent=c("eventEnded")||"Game has ended",a.textContent=""),clearInterval(r),void(null==t||t())}var v=l-u;if(v/1e3<=0)return clearInterval(r),null==n||n([0,0,0,0,0,0,0,a]),void(null==t||t());var m=y(v,l);null==n||n([].concat(i(m),[a]))};o();var r=setInterval(o,1e3);return r}}var T=function(e,n,t){var a,o,r,i,l,s,u,d,v=null==n||null===(a=n.response)||void 0===a||null===(o=a.data)||void 0===o?void 0:o.errorCode,m=(null==n||null===(r=n.response)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.errorMessage)||(null==n?void 0:n.message)||null;D.set({startDateTime:null==n||null===(l=n.response)||void 0===l||null===(s=l.data)||void 0===s?void 0:s.scheduleStartDate,endDateTime:null==n||null===(u=n.response)||void 0===u||null===(d=u.data)||void 0===d?void 0:d.scheduleEndDate}),function(e,n,t,a){var o,r,i=Date.now(),l=null===(o=D.get())||void 0===o?void 0:o.scheduleStartTimeMs,s=null===(r=D.get())||void 0===r?void 0:r.scheduleEndTimeMs,u=function(e,n,t,a){var o;e<0?o=c("eventNotStarted")||a||"Game starts in":(n>0||"VIDEO_NOT_EXISTS"==t)&&(o=c("eventEnded")||a||"Game has ended");return o||a}(i-l,i-s,n,t);if(document.getElementsByClassName("error-container")[0]){var d=document.getElementsByClassName("error-message")[0];d&&(d.textContent="".concat(u));var v=document.getElementsByClassName("error-timer-message")[0];v&&w(Math.abs(l),C,a,v)}else{var m=document.getElementById(e).parentElement;if(m){var f=document.createElement("div");f.className="error-container";var h=document.createElement("div");h.className="error-message";var g=document.createElement("div");g.className="error-timer-message",h.textContent="".concat(u),f.appendChild(h),f.appendChild(g),m.append(f),w(Math.abs(l),C,a,g)}}}(e,v,m,t)};function M(e,n){var t=n.scheduleEndDate,a=n.scheduleStartDate;D.set({startDateTime:a,endDateTime:t}),E&&clearInterval(E),E=setInterval(function(){var n,t=Date.now(),a=null===(n=D.get())||void 0===n?void 0:n.scheduleEndTimeMs;if(console.log("scheduleEndTimeMs",a),a&&t>a){var i;console.log("Game ended");var l=r(e);if(o(e)&&l){var s;l.dispose(),console.log("Player disposed");var u=null===(s=document.getElementsByClassName("vl-container"))||void 0===s?void 0:s[0],d=document.createElement("video");d.id=e,d.className="video-js",d.style.width="100%",d.style.height="100%",u&&u.appendChild(d)}var v=c("eventEnded")||"Game has ended",m=null===(i=document.getElementsByClassName("error-container"))||void 0===i?void 0:i[0];if(m){var f=m.querySelector(".error-message");f&&(f.textContent=v)}else{var h=document.getElementById(e),g=null==h?void 0:h.parentElement;if(g){(m=document.createElement("div")).className="error-container";var p=document.createElement("div");p.className="error-message",p.textContent=v,m.appendChild(p),g.append(m)}}clearInterval(E)}},1e3)}export{T as a,f as b,u as c,d,v as e,h as g,M as h,m as o,g as p,D as s};
|
package/esm/index-c3dfd0f5.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import{g as t,p as n,d as o}from"./skin-4f84b841.js";import{_ as i,b as l}from"./generic-bd7427c4.js";import{s as a}from"./autoNextVideo-efd28455.js";import{e as r}from"./icons-699e8cf0.js";import s from"@babel/runtime/helpers/typeof";import d from"video.js";var c,u,m,v,p=[],f=!1,g=function(a,s){var d;if(f=!1,null!=s&&null!==(d=s.series)&&void 0!==d&&d.enable){var c;p=[];var u=l();null==u||u.map(function(t){var n;return(n=p).push.apply(n,e(t.episodes))}),null==s||null===(c=s.series)||void 0===c||c.cb}else{var m,v;p=(null==s||null===(m=s.relatedVideos)||void 0===m?void 0:m.content)||[],null==s||null===(v=s.relatedVideos)||void 0===v||v.cb}var g=t(a);g.on("timeupdate",function(){var e,t;if(!f){var n=Math.floor(g.currentTime()),o=g.duration(),l=null===(e=document.getElementsByClassName("next-ep-preview"))||void 0===e?void 0:e[0];o-n<=10&&i()<=(null===(t=p)||void 0===t?void 0:t.length)-1?l&&(l.style.visibility="visible"):l&&(l.style.visibility="hidden")}});var y,A=p.filter(function(e,t){return t==i()});if((null==A?void 0:A.length)>0)if(null!==(y=document.getElementsByClassName("next-ep-preview"))&&void 0!==y&&y[0]){var x,w,E,b,C,N,B,L,j,k,P,O;(null===(x=document.getElementsByClassName("next-ep-preview"))||void 0===x?void 0:x[0]).style.visibility="hidden";var I=null===(w=document.getElementsByClassName("next-ep-title"))||void 0===w?void 0:w[0],M=null===(E=document.getElementsByClassName("next-ep-img"))||void 0===E?void 0:E[0],T=null===(b=document.getElementsByClassName("next-ep-content"))||void 0===b?void 0:b[0],F=null===(C=A[0])||void 0===C?void 0:C.title;(null===(N=F)||void 0===N?void 0:N.length)>60&&(F=F.substr(0,60)+"..."),I.textContent="".concat(F),M.src=(null===(B=A[0])||void 0===B||null===(L=B.gist)||void 0===L||null===(j=L.imageGist)||void 0===j?void 0:j.r16x9)||(null==A||null===(k=A[0])||void 0===k?void 0:k.img)||(null===(P=window)||void 0===P||null===(O=P.customData)||void 0===O?void 0:O.fallbackImage),T.onclick=function(){return h(a)}}else{var X,R,D,G,S,V,H,_,Q=document.createElement("div");Q.className="next-ep-preview",Q.style.visibility="hidden",document.getElementById(a).append(Q);var U=document.createElement("div");U.className="next-heading-wrapper";var W=document.createElement("div");W.className="next-ep-header",W.textContent="Next up";var Y=document.createElement("div");Y.className="next-ep-close",Y.onclick=function(){Q.style.visibility="hidden",f=!0},Y.appendChild(n(r())),U.append(W),U.append(Y);var q=null===(X=A[0])||void 0===X?void 0:X.title,z=document.createElement("img");z.className="next-ep-img",z.src=(null===(R=A[0])||void 0===R||null===(D=R.gist)||void 0===D||null===(G=D.imageGist)||void 0===G?void 0:G.r16x9)||(null==A||null===(S=A[0])||void 0===S?void 0:S.img)||(null===(V=window)||void 0===V||null===(H=V.customData)||void 0===H?void 0:H.fallbackImage);var J=document.createElement("div");J.className="next-ep-title",(null===(_=q)||void 0===_?void 0:_.length)>60&&(q=q.substr(0,60)+"..."),J.textContent="".concat(q);var K=document.createElement("div");K.className="next-ep-content",K.append(z),K.append(J),K.onclick=o(function(){null==Q||Q.remove(),f=!0,h(a)},400),Q.append(U),Q.append(K)}},h=function(e,n){var o=t(e),l=Math.floor(o.currentTime());if(Math.floor(o.duration())!=l){o.pause(e);var r=i();a(r,e,p)}};function y(e,n){var o=t(e),i=null==n?void 0:n.tvProviderLogoUrl;if(i){var l=document.createElement("div");l.className="tvProviderImage";var a=document.createElement("img");a.src="".concat(i),a.alt="Provider Image",l.append(a),o.el().appendChild(l),o.on("useractive",function(){l.classList.remove("vjs-fade")}),o.on("userinactive",function(){o.paused()||l.classList.add("vjs-fade")}),o.on("fullscreenchange",function(){o.isFullscreen_?l.style.top="3.2rem":l.style.top="1rem"})}}c={0:{src:"data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",alt:"loading"}},u=function e(){var t,n,o,i,l;for(o in n=(t=Array.prototype.slice.call(arguments)).shift()||{},t)for(l in i=t[o])i.hasOwnProperty(l)&&("object"===s(i[l])?n[l]=e(n[l],i[l]):n[l]=i[l]);return n},m=function(e,t){return function(n){return window.getComputedStyle?window.getComputedStyle(e,t)[n]:e.currentStyle[n]}},v=function e(t){return"HTML"!==t.nodeName&&"static"===m(t)("position")?e(t.offsetParent):t},d.registerPlugin("thumbnails",function(e){var t,n,o,i,l,a,r,s;function d(){document.removeEventListener("pointermove",r),document.removeEventListener("pointerup",d),s()}n=u({},c,e),i=this,function(){var e,t,n;-1!==navigator.userAgent.toLowerCase().indexOf("android")&&(t=function(){e.addClass("fake-active")},n=function(){e.removeClass("fake-active")},(e=i.controlBar.progressControl).on("touchstart",t),e.on("touchend",n),e.on("touchcancel",n))}(),(t=document.createElement("div")).className="vjs-thumbnail-holder",o=document.createElement("img"),t.appendChild(o),o.src=n[0].src,o.className="vjs-thumbnail",u(o.style,n[0].style),o.style.left||o.style.right||(o.onload=function(){o.style.left=-o.naturalWidth/2+"px"}),a=i.duration(),i.on("durationchange",function(e){a=i.duration()}),i.on("loadedmetadata",function(e){a=i.duration()}),(l=i.controlBar.progressControl).el().appendChild(t),r=function(e){var i,r,s,d,c,p,f,g,h,y;for(r in s=0,h=(window.pageXOffset?{x:window.pageXOffset,y:window.pageYOffset}:{x:document.documentElement.scrollLeft,y:document.documentElement.scrollTop}).x,f=((y=v(l.el()).getBoundingClientRect()).width||y.right)+h,p=e.pageX,e.changedTouches&&(p=e.changedTouches[0].pageX),d=p||e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,d-=v(l.el()).getBoundingClientRect().left+h,i=Math.floor((d-l.el().offsetLeft)/l.width()*a),n)i>r&&(s=Math.max(s,r));(c=n[s]).src&&o.src!=c.src&&(o.src=c.src),c.style&&o.style!=c.style&&u(o.style,c.style),d+(g=function(e,t){var n;return t?parseFloat(t):"auto"!==(n=m(e)("clip"))&&"inherit"!==n&&4===(n=n.split(/(?:\(|\))/)[1].split(/(?:,| )/)).length?parseFloat(n[1])-parseFloat(n[3]):0}(o,c.width||n[0].width)/2)>f?d-=d+g-f:d<g&&(d=g),t.style.left=d+"px"},l.on("mousemove",r),l.on("touchmove",r),l.on("pointerdown",function(e){document.addEventListener("pointermove",r),document.addEventListener("pointerup",d)}),s=function(e){t.style.left="-1000px"},l.on("mouseout",s),l.on("touchcancel",s),l.on("touchend",s),i.on("userinactive",s)});export{g as a,y as b};
|
package/esm/playlist-92500990.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import l from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as s,e as r}from"./icons-699e8cf0.js";import{M as c,a0 as d}from"./generic-bd7427c4.js";import{a as p}from"./autoNextVideo-efd28455.js";import{j as m,g as u}from"./skin-4f84b841.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-95713239.js";import"./localisation-0bf399a1.js";function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(v=function(){return!!e})()}var y=a.getComponent("Component"),h=function(){n(g,y);var h,f,b=(h=g,f=v(),function(){var e,t=i(h);if(f){var o=i(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return l(this,e)});function g(e){var o,n,l,i,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t(this,g),(i=b.call(this,e,a)).playerId=a.playerId,i.seriesData=a.sres,i.videos=null==a||null===(o=a.playlist)||void 0===o?void 0:o.content,i.cb=(null==a||null===(n=a.playlist)||void 0===n?void 0:n.cb)||null,i.autoNext=(null==a||null===(l=a.playlist)||void 0===l?void 0:l.autoNext)||!1,i.currentVideoData=a.res,i.initialiseStructure(),i.loadCSS(),i.autoNext&&p({playerId:i.playerId,content:i.videos,cb:i.cb}),i}return o(g,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"playlist-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"playlist-selector-icon",innerHTML:"".concat(s())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./playlist-7ecf432a.js").then(function(e){var t=document.createElement("style");t.id="playlist-selection",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"initialiseStructure",value:function(){var e=this.el(),t=a.dom.createEl("div",{className:"selection-container hidden"});a.dom.$(".playlist-selector-icon",this.el()).onclick=function(){var o;null!==(o=t.classList)&&void 0!==o&&o.contains("hidden")?(m(),t.classList.remove("hidden"),e.classList.add("open"),t.style.right="0px"):(t.classList.add("hidden"),e.classList.remove("open"),t.style.right="-350px")};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px"),a.dom.appendContent(e,t),o.style.overflow="hidden",this.addFunctionality(t)}}},{key:"addFunctionality",value:function(t){var o=this,n=this.el(),l=a.dom.createEl("div",{className:"playlist-selector-head"}),i=a.dom.createEl("div",{className:"playlist-selector-cross-icon",innerHTML:"".concat(r())});i.onclick=function(){t.classList.add("hidden"),n.classList.remove("open"),t.style.right="-350px"};for(var s=a.dom.createEl("div",{className:"playlist-selector-title",innerHTML:"Playlist"}),p=a.dom.createEl("div",{className:"playlist-selector-content"}),m=function(t){var n,l,i=a.dom.createEl("div",{className:"playlist-container"}),s=a.dom.createEl("div",{className:"playlist-section",index:t}),r=a.dom.createEl("div",{className:"playlist-title",innerHTML:"".concat((null===(n=o.videos[t])||void 0===n?void 0:n.title)||"")}),m=a.dom.createEl("div",{className:"playlist-progress-bar",innerHTML:"<div style='width:".concat(o.videos[t].watchedPercentage,"%' class='playlist-progress-bar-value'></div>")});a.dom.appendContent(s,r),a.dom.appendContent(s,m),a.dom.appendContent(i,s),a.dom.appendContent(p,i);var u=a.dom.createEl("div",{className:"playlist-section-expanded hidden"}),v=a.dom.createEl("div",{className:"playlist-description",innerHTML:"".concat((null===(l=o.videos[t])||void 0===l?void 0:l.description)||"")}),y=a.dom.createEl("div",{className:"playlist-image"});y.style.backgroundImage="url(".concat(o.videos[t].img,")"),a.dom.appendContent(u,y),a.dom.appendContent(u,v),a.dom.appendContent(i,u),a.dom.appendContent(p,i),u.onclick=function(e){e.stopPropagation(),d(t+1),c(o.playerId,o.videos[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})},s.onclick=function(t){var o,n,l,a=document.getElementsByClassName("playlist-selector-content")[0].childNodes,s=(a=e(a))[t.target.index].getElementsByClassName("playlist-section-expanded")[0];null!=s&&null!==(o=s.classList)&&void 0!==o&&o.contains("hidden")?(i.style.backgroundColor="#0000007d",null==s||null===(n=s.classList)||void 0===n||n.remove("hidden")):(null==s||null===(l=s.classList)||void 0===l||l.add("hidden"),i.style.backgroundColor="unset")}},v=0;v<this.videos.length;v++)m(v);a.dom.appendContent(l,i),a.dom.appendContent(l,s),a.dom.appendContent(t,l),a.dom.appendContent(t,p),u(this.playerId).on("fullscreenchange",function(){var e=document.getElementById(o.playerId);if(e){var n=window.getComputedStyle(e,null).getPropertyValue("height").slice(0,-2);t.style.height="".concat(n,"px")}})}}]),g}();export{h as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import s from"@babel/runtime/helpers/createClass";import o from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{g as r,e as d,B as c}from"./icons-699e8cf0.js";import{m as u,a5 as m,a6 as v,M as p,b as h,E as f}from"./generic-bd7427c4.js";import{j as b,s as y,p as C,l as g,g as E,i as N}from"./skin-4f84b841.js";import{a as k}from"./autoNextVideo-efd28455.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-95713239.js";import"./localisation-0bf399a1.js";function x(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(x=function(){return!!e})()}var I=a.getComponent("Component"),S=function(){n(B,I);var S,L,w=(S=B,L=x(),function(){var e,t=l(S);if(L){var s=l(this).constructor;e=Reflect.construct(t,arguments,s)}else e=t.apply(this,arguments);return i(this,e)});function B(s){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,B),(d=w.call(this,s,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=u(),null!==(a=o(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var p,h,f,b,y=null==c||null===(p=c.sres)||void 0===p?void 0:p.seasons,C=[];y.map(function(t){C.push.apply(C,e(t.episodes))}),m(C),v(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(b=f.video)||void 0===b?void 0:b.id),k({playerId:d.playerId,content:C,cb:d.cb,series:null==c?void 0:c.sres})}return d}return s(B,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("button",{className:"series-selector-icon",title:"season selector",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-6e9853f8.js").then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,s=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(b(),e.classList.remove("hidden"),s.classList.add("open"),y(this.playerId,e)):(e.classList.add("hidden"),s.classList.remove("open"))}},{key:"handleTabIndexSelector",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog open",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=0);for(var s=0;s<(null==t?void 0:t.length);s++)t[s].tabIndex=0}},{key:"handleCloseTabIndex",value:function(){var e,t=document.getElementsByClassName("season-holder");document.getElementById("sr-announcer").textContent="season selector dialog closed",null!==(e=document.getElementsByClassName("series-selector-cross-icon"))&&void 0!==e&&e[0]&&(document.getElementsByClassName("series-selector-cross-icon")[0].tabIndex=-1);for(var s=0;s<(null==t?void 0:t.length);s++)t[s]&&(t[s].tabIndex=-1);setTimeout(function(){document.getElementsByClassName("series-selector-icon")[0]&&document.getElementsByClassName("series-selector-icon")[0].focus()},100)}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),s=a.dom.createEl("div",{className:"series-selection-container hidden",role:"dialog",ariaModal:"true"});s.setAttribute("aria-labelledby","seasons"),a.dom.$(".series-selector-icon",this.el()).onclick=function(){e.toggleOpenClose(s),e.handleTabIndexSelector()};var o=document.getElementById(this.playerId);if(o){var n=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);s.style.height="".concat(n,"px"),a.dom.appendContent(t,s),o.style.overflow="hidden",this.addFunctionality(s)}}},{key:"handleSeriesCloseIcon",value:function(e,t,s){if("series-selector-cross-icon"===e.className)t.classList.add("hidden"),s.classList.remove("open"),this.handleCloseTabIndex();else if("series-selector-back-icon"===e.className){var o=a.dom.$(".series-selector-content",this.el());for(a.dom.$(".series-selector-cross-icon",this.el()),e.className="series-selector-cross-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=this.createSeasonLister();for(a.dom.appendContent(o,n),a.dom.$(".series-selector-title",this.el()).textContent="Seasons";null!=e&&e.firstChild;)e.removeChild(e.firstChild);var i=C(d());e.appendChild(i)}}},{key:"addFunctionality",value:function(e){var t=this,s=this.el(),o=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("button",{className:"series-selector-cross-icon",ariaLabel:"close season selector",innerHTML:"".concat(d()),tabIndex:-1});n.onclick=function(){t.handleSeriesCloseIcon(n,e,s)},n.onkeydown=function(o){"Enter"===o.key&&t.handleSeriesCloseIcon(n,e,s)};var i=a.dom.createEl("h2",{className:"series-selector-title",ariaLabel:"Seasons",innerHTML:"Seasons",id:"seasons"}),l=a.dom.createEl("div",{style:"position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden;",ariaLive:"assertive",id:"sr-announcer",tabIndex:-1}),r=a.dom.createEl("div",{className:"series-selector-content"}),c=this.createSeasonLister();a.dom.appendContent(o,l),a.dom.appendContent(r,c),a.dom.appendContent(o,n),a.dom.appendContent(o,i),a.dom.appendContent(e,o),a.dom.appendContent(e,r),g(this.playerId,e)}},{key:"createSeasonLister",value:function(){var e=this;E(this.playerId);for(var t=h(),s=a.dom.createEl("div",{className:"season-container"}),o=function(o){var n,i,l,r,d=document.createElement("label");d.className="season-holder",d.ariaLabel=null===(n=t[o])||void 0===n?void 0:n.title,d.role="button",d.type="button",d.setAttribute("aria-LabelledBy",null===(i=t[o])||void 0===i?void 0:i.title),d.setAttribute("for","season-".concat(o));var c=document.createElement("div");c.className="season - ".concat(o),c.textContent=null===(l=t[o])||void 0===l?void 0:l.title,c.id=null===(r=t[o])||void 0===r?void 0:r.title;var u=a.dom.createEl("input",{className:"radio - ".concat(o),id:"season-".concat(o),name:"season-radio"});u.setAttribute("type","radio"),e.selectedSeason==o&&(u.checked=!0),u.onclick=function(t){f.set(o),e.showSeasonDetails(o)},d.onkeydown=function(t){"Enter"===t.key&&(f.set(o),e.showSeasonDetails(o))},a.dom.appendContent(d,u),a.dom.appendContent(d,c),a.dom.appendContent(s,d)},n=0;n<t.length;n++)o(n);return s}},{key:"loadSeriesAssetById",value:function(e,t){var s,o=this;v(null===(s=e[t])||void 0===s?void 0:s.id),p(this.playerId,e[t].id).then(function(e){null!=o&&o.cb&&o.cb(e)}).catch(function(e){null!=o&&o.cb&&o.cb(e)})}},{key:"getSeasonDetailsContainer",value:function(t,s){var o=this;t=t.map(function(e){var t,s,n,i,l,a,r,d,c;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:(null==e||null===(s=e.gist)||void 0===s||null===(n=s.imageGist)||void 0===n?void 0:n.r16x9)||(null===(i=window)||void 0===i||null===(l=i.app_data)||void 0===l||null===(a=l.appcmsMain)||void 0===a||null===(r=a.images)||void 0===r?void 0:r.placeholderCover),watchedPercentage:(null==o||null===(d=o.watchMap)||void 0===d||null===(c=d.get(null==e?void 0:e.id))||void 0===c?void 0:c.p)||0}});for(var n=function(n){var i,l,r,d,c,u=a.dom.createEl("div",{className:"series-container",tabIndex:0,role:"button",type:"button"}),m=a.dom.createEl("div",{className:"series-section-data",index:n,innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")});a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(l=t[n])||void 0===l?void 0:l.title)||"")}),a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});var v=a.dom.createEl("div",{className:"series-section-image"}),p=(null===(r=t[n])||void 0===r?void 0:r.description)||"";(null===(d=p)||void 0===d?void 0:d.length)>170&&(p=p.substr(0,170)+"..."),a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(p||"")});var h=a.dom.createEl("img",{className:"series-image"});h.src="".concat(N(null===(c=t[n])||void 0===c?void 0:c.img)),h.alt="Episode ".concat(n+1),a.dom.appendContent(v,h),a.dom.appendContent(u,v),a.dom.appendContent(u,m),a.dom.appendContent(s,u),u.onclick=function(e){e.stopPropagation(),o.loadSeriesAssetById(t,n)},u.onkeydown=function(e){"Enter"===e.key&&(e.stopPropagation(),o.loadSeriesAssetById(t,n))},m.onclick=function(t){var s,o,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(s=l.classList)&&void 0!==s&&s.contains("hidden")?(u.style.backgroundColor="#0000007d",null==l||null===(o=l.classList)||void 0===o||o.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),u.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var s=h()[e].episodes;this.getSeasonDetailsContainer(s,t);var o=a.dom.$(".series-selector-cross-icon",this.el());for(o.className="series-selector-back-icon";null!=o&&o.firstChild;)o.removeChild(o.firstChild);var n=C(c());o.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),B}();export{S as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import t from"@babel/runtime/helpers/classCallCheck";import o from"@babel/runtime/helpers/createClass";import s from"@babel/runtime/helpers/assertThisInitialized";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import a from"video.js";import{E as r,e as d,B as c}from"./icons-699e8cf0.js";import{m,a5 as u,a6 as p,b as v,E as h,M as f}from"./generic-bd7427c4.js";import{j as C,p as y,g}from"./skin-4f84b841.js";import{a as b}from"./autoNextVideo-efd28455.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./index-95713239.js";import"./localisation-0bf399a1.js";function N(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(N=function(){return!!e})()}var E=a.getComponent("Component"),k=function(){n(L,E);var k,S,x=(k=L,S=N(),function(){var e,t=l(k);if(S){var o=l(this).constructor;e=Reflect.construct(t,arguments,o)}else e=t.apply(this,arguments);return i(this,e)});function L(o){var n,i,l,a,r,d,c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,L),(d=x.call(this,o,c)).playerId=c.playerId,d.seriesData=c.sres,d.videos=null==c||null===(n=c.sres)||void 0===n?void 0:n.seasons,d.currentVideoData=c.res,d.initialiseStructure(),d.loadCSS(),d.selectedSeason=0,d.cb=null==c||null===(i=c.series)||void 0===i?void 0:i.cb,d.autoPlayNext=(null==c||null===(l=c.series)||void 0===l?void 0:l.autoPlayNext)||!1,sessionStorage.getItem("token"),d.watchMap=m(),null!==(a=s(d))&&void 0!==a&&a.autoPlayNext&&null!=c&&null!==(r=c.series)&&void 0!==r&&r.enable){var v,h,f,C,y=null==c||null===(v=c.sres)||void 0===v?void 0:v.seasons,g=[];y.map(function(t){g.push.apply(g,e(t.episodes))}),u(g),p(null===(h=d.options_)||void 0===h||null===(f=h.res)||void 0===f||null===(C=f.video)||void 0===C?void 0:C.id),b({playerId:d.playerId,content:g,cb:d.cb,series:null==c?void 0:c.sres})}return d}return o(L,[{key:"createEl",value:function(){var e=a.dom.createEl("div",{className:"series-selection vjs-control vjs-button"});e.style.position="unset";var t=a.dom.createEl("div",{className:"series-selector-icon",innerHTML:"".concat(r())});return a.dom.appendContent(e,t),e}},{key:"loadCSS",value:function(){import("./series-v2-87343239.js").then(function(e){var t=document.createElement("style");t.id="series-v2",t.append("".concat(e.default)),document.head.appendChild(t)})}},{key:"toggleOpenClose",value:function(e){var t,o=this.el();null!=e&&null!==(t=e.classList)&&void 0!==t&&t.contains("hidden")?(C(),e.classList.remove("hidden"),o.classList.add("open"),e.style.right="0px"):(e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px")}},{key:"initialiseStructure",value:function(){var e=this,t=this.el(),o=a.dom.createEl("div",{className:"series-selection-container hidden"});a.dom.$(".series-selector-icon",this.el()).onclick=function(){return e.toggleOpenClose(o)};var s=document.getElementById(this.playerId);if(s){var n=window.getComputedStyle(s,null).getPropertyValue("height").slice(0,-2);o.style.height="".concat(n,"px"),a.dom.appendContent(t,o),s.style.overflow="hidden",this.addFunctionality(o)}}},{key:"addFunctionality",value:function(e){var t=this,o=this.el(),s=a.dom.createEl("div",{className:"series-selector-head"}),n=a.dom.createEl("div",{className:"series-selector-cross-icon",innerHTML:"".concat(d())});n.onclick=function(){if("series-selector-cross-icon"===n.className)e.classList.add("hidden"),o.classList.remove("open"),e.style.right="-350px";else if("series-selector-back-icon"===n.className){var s=a.dom.$(".series-selector-content",t.el());for(a.dom.$(".series-selector-cross-icon",t.el()),n.className="series-selector-cross-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var i=t.createSeasonLister();for(a.dom.appendContent(s,i),a.dom.$(".series-selector-title",t.el()).textContent="Seasons";null!=n&&n.firstChild;)n.removeChild(n.firstChild);var l=y(d());n.appendChild(l)}};var i=a.dom.createEl("div",{className:"series-selector-title",innerHTML:"Seasons"}),l=a.dom.createEl("div",{className:"series-selector-content"}),r=this.createSeasonLister();a.dom.appendContent(l,r),a.dom.appendContent(s,n),a.dom.appendContent(s,i),a.dom.appendContent(e,s),a.dom.appendContent(e,l),g(this.playerId).on("fullscreenchange",function(){var o=document.getElementById(t.playerId);if(o){var s=window.getComputedStyle(o,null).getPropertyValue("height").slice(0,-2);e.style.height="".concat(s,"px")}})}},{key:"createSeasonLister",value:function(){var e=this;g(this.playerId);for(var t=v(),o=a.dom.createEl("div",{className:"season-container"}),s=function(s){var n,i=document.createElement("label");i.className="season-holder",i.setAttribute("for","season-".concat(s));var l=document.createElement("div");l.className="season - ".concat(s),l.textContent=null===(n=t[s])||void 0===n?void 0:n.title;var r=a.dom.createEl("input",{className:"radio - ".concat(s),id:"season-".concat(s),name:"season-radio"});r.setAttribute("type","radio"),e.selectedSeason==s&&(r.checked=!0),r.onclick=function(t){h.set(s),e.showSeasonDetails(s)},a.dom.appendContent(i,r),a.dom.appendContent(i,l),a.dom.appendContent(o,i)},n=0;n<t.length;n++)s(n);return o}},{key:"getSeasonDetailsContainer",value:function(t,o){var s=this;t=t.map(function(e){var t,o,n,i,l;return{id:null==e?void 0:e.id,title:null==e?void 0:e.title,description:null==e||null===(t=e.gist)||void 0===t?void 0:t.description,img:null==e||null===(o=e.gist)||void 0===o||null===(n=o.imageGist)||void 0===n?void 0:n.r16x9,watchedPercentage:(null==s||null===(i=s.watchMap)||void 0===i||null===(l=i.get(null==e?void 0:e.id))||void 0===l?void 0:l.p)||0}});for(var n=function(n){var i,l,r,d,c,m,u,v=a.dom.createEl("div",{className:"series-container"}),h=a.dom.createEl("div",{className:"series-section",index:n}),C=a.dom.createEl("div",{className:"series-title",innerHTML:"".concat((null===(i=t[n])||void 0===i?void 0:i.title)||"")}),y=a.dom.createEl("div",{className:"series-progress-bar",innerHTML:"<div style='width:".concat(t[n].watchedPercentage,"%' class='series-progress-bar-value'></div>")});a.dom.appendContent(h,C),a.dom.appendContent(h,y),a.dom.appendContent(v,h),a.dom.appendContent(o,v);var g=a.dom.createEl("div",{className:"series-section-expanded hidden"}),b=(null===(l=t[n])||void 0===l?void 0:l.description)||"";(null===(r=b)||void 0===r?void 0:r.length)>170&&(b=b.substr(0,170)+"...");var N=a.dom.createEl("div",{className:"series-description",innerHTML:"".concat(b||"")}),E=a.dom.createEl("img",{className:"series-image"});E.src="".concat((null===(d=t[n])||void 0===d?void 0:d.img)||(null===(c=window)||void 0===c||null===(m=c.customData)||void 0===m?void 0:m.fallbackImage)),E.alt="".concat(null===(u=t[n])||void 0===u?void 0:u.title),a.dom.appendContent(g,E),a.dom.appendContent(g,N),a.dom.appendContent(v,g),a.dom.appendContent(o,v),g.onclick=function(e){var o;e.stopPropagation(),p(null===(o=t[n])||void 0===o?void 0:o.id),f(s.playerId,t[n].id).then(function(e){null!=s&&s.cb&&s.cb(e)}).catch(function(e){null!=s&&s.cb&&s.cb(e)})},h.onclick=function(t){var o,s,n,i=document.getElementsByClassName("series-selector-content")[0].childNodes,l=(i=e(i))[t.target.index].getElementsByClassName("series-section-expanded")[0];null!=l&&null!==(o=l.classList)&&void 0!==o&&o.contains("hidden")?(v.style.backgroundColor="#0000007d",null==l||null===(s=l.classList)||void 0===s||s.remove("hidden")):(null==l||null===(n=l.classList)||void 0===n||n.add("hidden"),v.style.backgroundColor="unset")}},i=0;i<t.length;i++)n(i);return parent}},{key:"showSeasonDetails",value:function(e){this.selectedSeason=e;for(var t=a.dom.$(".series-selector-content",this.el());null!=t&&t.firstChild;)t.removeChild(t.firstChild);var o=v()[e].episodes;this.getSeasonDetailsContainer(o,t);var s=a.dom.$(".series-selector-cross-icon",this.el());for(s.className="series-selector-back-icon";null!=s&&s.firstChild;)s.removeChild(s.firstChild);var n=y(c());s.appendChild(n),a.dom.$(".series-selector-title",this.el()).textContent="Season ".concat(e+1)}}]),L}();export{k as default};
|
package/esm/skin-1b825a55.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as l,r as i,d as e,e as n,j as o,k as t,l as r,m as s}from"./features-abc1af35.js";import{f as a}from"./icons-699e8cf0.js";import{g as d,p as u,e as v}from"./skin-4f84b841.js";import{g as C}from"./renditions-19f0b3a9.js";import{a as c,b as p}from"./index-c3dfd0f5.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{a1 as h,a2 as m,e as f,a3 as b,m as g}from"./generic-bd7427c4.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-efd28455.js";import"./index-95713239.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@viewlift/comscore/index.js";function L(L,y){d(L).addClass("skin_news_live"),function(i,e){var n=d(i);n&&n.on("loadeddata",function(){var n,o,t,r,s,a,d;(null===(n=C(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e),!(null!=e&&null!==(t=e.series)&&void 0!==t&&t.enable||null!==(r=window)&&void 0!==r&&null!==(s=r.app_data)&&void 0!==s&&null!==(a=s.appcmsMain)&&void 0!==a&&null!==(d=a.features)&&void 0!==d&&d.auto_play)||null!=e&&e.liveVideo||c(i,e)})}(L,y),function(l,i){var e,n,o,t,r,s,a,C,c,p,h,m,f,b,g,L,y,B,j,w,E,V,x,M,k,S,T,Z,A,P,_=d(l);null===(e=_.controlBar)||void 0===e||e.removeChild("PlayToggle");var H=null==_||null===(n=_.controlBar)||void 0===n||null===(o=n.el())||void 0===o||null===(t=o.children)||void 0===t?void 0:t[2],N=document.createElement("div");N.className="vjs-play-toggle-container",N.append(null==_||null===(r=_.controlBar)||void 0===r||null===(s=r.addChild("PlayToggle"))||void 0===s?void 0:s.el()),null==_||null===(a=_.controlBar)||void 0===a||null===(C=a.el())||void 0===C||C.insertBefore(N,H),null==_||null===(c=_.controlBar)||void 0===c||c.removeChild("VolumePanel"),null==_||null===(p=_.controlBar)||void 0===p||p.addChild("VolumePanel",{inline:!0},1);var I=null==_||null===(h=_.controlBar)||void 0===h?void 0:h.getChild("ProgressControl");null===(m=_.controlBar)||void 0===m||m.removeChild("SeekToLive"),null===(f=_.controlBar)||void 0===f||f.addChild("SeekToLive",{inline:!1},2);var q=null===(b=_.controlBar)||void 0===b||null===(g=b.getChild("SeekToLive"))||void 0===g?void 0:g.el();q&&(q.onclick=function(){if(_.paused())try{_.play()}catch(l){console.log(l)}});var D=document.createElement("div");D.className="custom-spaced-progress-bar",I&&D.append(I.el());null===(L=_.controlBar)||void 0===L||null===(y=L.el())||void 0===y||y.append(D);var O='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';_.el().insertBefore(u(O),null!==(B=_.el().firstChild)&&void 0!==B?B:null);var R=(null==_||null===(j=_.controlBar)||void 0===j||null===(w=j.getChild("PlayToggle"))||void 0===w||null===(E=w.el())||void 0===E?void 0:E.firstChild)||null;if(R){R.style.height="18px",R.style.width="18px";var F=v(R,_.paused()?"#vjs-icon-play":"#vjs-icon-pause");_.on("pause",function(){return F.setAttributeNS(null,"href","#vjs-icon-play")}),_.on("play",function(){return F.setAttributeNS(null,"href","#vjs-icon-pause")})}var G=(null==_||null===(V=_.controlBar)||void 0===V||null===(x=V.getChild("FullscreenToggle"))||void 0===x||null===(M=x.el())||void 0===M?void 0:M.firstChild)||null;if(G){G.style.height="24px",G.style.width="24px";var z=v(G,"#vjs-icon-fullscreen");_.on("fullscreenchange",function(){var l=_.isFullscreen_;null==z||z.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var J=(null==_||null===(k=_.controlBar)||void 0===k||null===(S=k.getChild("VolumePanel"))||void 0===S?void 0:S.el())||null;if(J){var K=J.querySelector(".vjs-mute-control .vjs-icon-placeholder");K.classList.add("vjs-svg-icon"),K.style.height="24px",K.style.width="24px";var Q=v(K,_.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");_.on("volumechange",function(l){var i=_.volume();console.log(i,_.muted()),0==i||_.muted()?Q.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?Q.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?Q.setAttributeNS(null,"href","#vjs-icon-volume2"):Q.setAttributeNS(null,"href","#vjs-icon-volume3")})}var U=(null==_||null===(T=_.controlBar)||void 0===T||null===(Z=T.getChild("PictureInPictureToggle"))||void 0===Z?void 0:Z.el())||null;if(U){var W=null==U?void 0:U.querySelector(".vjs-icon-placeholder");W.style.height="25px",W.style.width="25px";var X=v(W,"#vjs-icon-pip");_.on("enterpictureinpicture",function(){X.setAttributeNS(null,"href","#vjs-icon-pip")})}var Y=(null==_||null===(A=_.controlBar)||void 0===A||null===(P=A.getChild("SubsCapsButton"))||void 0===P?void 0:P.el())||null;if(Y){var $=Y.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");$.classList.add("vjs-svg-icon"),$.style.height="29px",$.style.width="29px";var ll=v($,"#vjs-icon-caps");ll.setAttributeNS(null,"href","#vjs-icon-captions-off"),_.textTracks().on("change",function(l){for(var i=_.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?ll.setAttributeNS(null,"href","#vjs-icon-captions"):ll.setAttributeNS(null,"href","#vjs-icon-captions-off")})}_&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(_.liveTracker.on("liveedgechange",function(){nl(_)}),_.on("timeupdate",function(){nl(_)}));function il(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function el(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function nl(l){var i,e,n=l.liveTracker.atLiveEdge(),o=el(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var r=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",r&&(r.innerText=il(o)))}}}(L,y),function(l,d){var u,v,C,c,p,L,y,B,j,w,E=(null==d?void 0:d.liveVideo)||!1,V=(null==d||null===(u=d.res)||void 0===u?void 0:u.contentType)||"video",x=(null==d||null===(v=d.res)||void 0===v||null===(C=v[V])||void 0===C?void 0:C.isSSAIEnabled)||!1,M=(null==d?void 0:d.skin_settings)||{};null==M||M.slowMoBtn;var k=(null==d||null===(c=d.customData)||void 0===c?void 0:c.ads)||{};i(l),null!=M&&M.skipBtn&&0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=M&&M.rewindBtn&&(0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)||1==(null==d?void 0:d.liveui))&&n(l,"VL_ONE",a());(null==d||null===(p=d.relatedVideos)||void 0===p||null===(L=p.content)||void 0===L?void 0:L.length)>0&&o(l,null==d?void 0:d.relatedVideos);(null==d||null===(y=d.streams)||void 0===y?void 0:y.length)>1&&t(l,null==d?void 0:d.streams);(null==d||null===(B=d.playlist)||void 0===B||null===(j=B.content)||void 0===j?void 0:j.length)>0&&r(l,null==d?void 0:d.playlist);null!=d&&null!==(w=d.series)&&void 0!==w&&w.enable&&s(l,d);if(x&&E&&"TRANSMIT"==(null==k?void 0:k.liveAdSticherProvider)&&null!=k&&k.liveAdClientSideTracking)h(l,d);else if("MEDIA_TAILOR"==(null==k?void 0:k.vodAdSticherProvider)&&null!=k&&k.vodAdClientSideTracking&&x)if(E)m(l);else{var S,T=null;if(null!=d&&null!==(S=d.series)&&void 0!==S&&S.enable){var Z,A,P,_,H,N=null===(Z=f())||void 0===Z||null===(A=Z.video)||void 0===A||null===(P=A.gist)||void 0===P?void 0:P.id,I=g(),q=(null==I?void 0:I.get(N))||{t:0,p:0},D=q.t,O=q.p;"function"==typeof(null===(_=window)||void 0===_||null===(H=_.watchHistory)||void 0===H?void 0:H.cb)&&window.watchHistory.cb({watchedTime:D}),O<95&&(T=D)}else{var R=d.watchHistoryResumeTime;d.watchedPercentage<95&&(T=R)}b(l,T)}}(L,y),p(L,y)}export{L as initialiseSkin};
|
package/esm/skin-1c513653.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as l,g as e,h as o,d as i,e as n,i as t,j as r,k as a,l as d,m as s}from"./features-abc1af35.js";import{M as u,a as m,c as v,d as p}from"./icons-699e8cf0.js";import{g as c,b as h}from"./skin-4f84b841.js";import{g as f}from"./renditions-19f0b3a9.js";import{g as b}from"./captions-2b4caf69.js";import{a as g,b as C}from"./index-c3dfd0f5.js";import{i as j}from"./index-209acda5.js";import{i as y,d as w}from"./browser-d4613b36.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./generic-bd7427c4.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/toConsumableArray";import"@babel/runtime/helpers/slicedToArray";import"@viewlift/comscore/index.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-efd28455.js";import"./index-95713239.js";function V(V,B){c(V).addClass("skin_defaultv2"),function(){"Chrome"==w()&&import("./chromett-a3cbb2e1.js").then(function(l){var e=document.createElement("style");e.id="chromett",e.append("".concat(l.default)),document.head.appendChild(e)});import("./skin-46def1ff.js").then(function(l){var e=document.createElement("style");e.id="default_v2",e.append("".concat(l.default)),document.head.appendChild(e)})}(),function(i,n){var t=c(i);t&&(t.on("loadeddata",function(){var o,t,r,a,d,s,u;(null===(o=f(i))||void 0===o?void 0:o.length)>0&&l(i,n),(null===(t=b(i))||void 0===t?void 0:t.length)>0&&e(i,n),!(null!=n&&null!==(r=n.series)&&void 0!==r&&r.enable||null!==(a=window)&&void 0!==a&&null!==(d=a.app_data)&&void 0!==d&&null!==(s=d.appcmsMain)&&void 0!==s&&null!==(u=s.features)&&void 0!==u&&u.auto_play)||null!=n&&n.liveVideo||g(i,n),null!=n&&n.liveVideo||y()||j(i)}),t.one("play",function(){var l,e,n,t;null!==(l=window)&&void 0!==l&&null!==(e=l.customData)&&void 0!==e&&e.iframeOverlayUrl&&o(i,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}(V,B),function(l,e){var o,i,n,t,r,a,d,s,v,p,f,b,g,C=c(l);null===(o=C.controlBar)||void 0===o||o.removeChild("VolumePanel"),null===(i=C.controlBar)||void 0===i||i.addChild("VolumePanel",{inline:!1},1);var j=null===(n=C.controlBar)||void 0===n?void 0:n.getChild("ProgressControl"),y=null===(t=C.controlBar)||void 0===t?void 0:t.getChild("CurrentTimeDisplay"),w=null===(r=C.controlBar)||void 0===r?void 0:r.getChild("SeekToLive"),V=document.createElement("div");V.className="custom-spaced-progress-bar",j&&y&&w&&V.append(j.el(),y.el(),w.el());null===(a=C.controlBar)||void 0===a||null===(d=a.el())||void 0===d||d.append(V),null==C||null===(s=C.controlBar)||void 0===s||null===(v=s.getChild("FullscreenToggle"))||void 0===v||null===(p=v.el())||void 0===p||p.appendChild(h(u(window.controlsColor))),null==C||null===(f=C.controlBar)||void 0===f||null===(b=f.getChild("FullscreenToggle"))||void 0===b||null===(g=b.el())||void 0===g||g.appendChild(h(m(window.controlsColor)));var B=document.getElementsByClassName("vjs-time-control");e.liveVideo&&B[0]&&(B[0].style.display="none")}(V,B),function(l,e){var o,u,m,c,h,f,b=(null==e?void 0:e.skin_settings)||{},g=0!=(null==b?void 0:b.slowMoBtn);0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)&&i(l,"defaultV2",v());(0==(null==e?void 0:e.liveVideo)&&0==(null==e?void 0:e.liveui)||1==(null==e?void 0:e.liveui))&&n(l,"defaultV2",p());!e.liveVideo&&g&&t(l);(null==e||null===(o=e.relatedVideos)||void 0===o||null===(u=o.content)||void 0===u?void 0:u.length)>0&&r(l,null==e?void 0:e.relatedVideos);(null==e||null===(m=e.streams)||void 0===m?void 0:m.length)>1&&a(l,null==e?void 0:e.streams);(null==e||null===(c=e.playlist)||void 0===c||null===(h=c.content)||void 0===h?void 0:h.length)>0&&d(l,null==e?void 0:e.playlist);null!=e&&null!==(f=e.series)&&void 0!==f&&f.enable&&s(l,e)}(V,B),C(V,B)}export{V as initialiseSkin};
|
package/esm/skin-4f84b841.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/toConsumableArray";import n from"video.js";var t=function(e){return!!n.getPlayer("".concat(e))&&n.getPlayer("".concat(e))},i=["live","carousel","V2","defaultV2","multiplayer","minimalist","VL_ONE","news","mini","news_live"],o=function(e){return!i.includes(e)},r=function(e){var n=(new DOMParser).parseFromString(e,"text/html");return null==n?void 0:n.querySelector("body")},l=function(e){var n=(new DOMParser).parseFromString(e,"image/svg+xml");return null==n?void 0:n.querySelector("svg")},a="http://www.w3.org/2000/svg";function u(e,n){if(!e)return null;e.classList.add("vjs-svg-icon");var t=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0 0 48 48",t=document.createElementNS(a,"svg");t.setAttribute("viewBox",n),t.setAttribute("preserveAspectRatio","xMidYMid meet");var i=document.createElementNS(a,"use");return i.setAttributeNS(null,"href",e),t.appendChild(i),{svg:t,use:i}}(n),i=t.svg,o=t.use;return e.appendChild(i),o}var d=function(e){return l(e)},s=function(n,i){if(i){var o,r,l=t(i);if(l&&"function"==typeof l.el&&null!=l&&null!==(o=l.el())&&void 0!==o&&null!==(r=o.classList)&&void 0!==r&&r.contains("skin_defaultv2"))return void c(n)}var a=e(document.querySelectorAll("[video-idx]"));console.log(a),a.map(function(e){var t=e.parentNode,i=e.getAttribute("video-idx");t.style.background=i==n?"gray":"none"})},c=function(n){e(document.querySelectorAll("[video-idx]")).map(function(e){var t=e.getAttribute("video-idx");e.style.border=t==n?"2px solid white":"none"})},v=function(){var n=e(document.getElementsByClassName("vjs-control vjs-button open"));null==n||n.map(function(e){var n,t;null==e||null===(n=e.childNodes)||void 0===n||null===(t=n[0])||void 0===t||t.click()})},m=function(e){return e&&!e.includes("?impolicy")?e+"?impolicy=resize&w=1920&h=1080":null},w="",f=function(e,n){var t,i=function(){return function(e,n){var t=window.matchMedia("(orientation: portrait)").matches?"potrait":"landscape",i=document.getElementById(e);if(i&&w!==t){var o=window.getComputedStyle(i,null).getPropertyValue("height");n&&(n.style.height="".concat(o)),w=t}}(e,n)};window._orientationChangeHandler=i;window.addEventListener("resize",function(){clearTimeout(t),t=setTimeout(function(){i()},100)})},p=function(e,n){var i,o=t(e),r=t(e).el(),l=new ResizeObserver(function(){var t;null!==(t=n.classList)&&void 0!==t&&t.contains("hidden")||(i&&clearTimeout(i),i=setTimeout(function(){g(e,n)},300))});l.observe(r),o.on("dispose",function(){l.disconnect()}),o.on("fullscreenchange",function(){setTimeout(function(){g(e,n)},50)})},g=function(e,n){var t;if(n){var i=document.getElementById(e),o=null===(t=window.getComputedStyle(i,null))||void 0===t?void 0:t.height;n.style.height!==o&&(n.style.height="".concat(o))}},h=function(){window._orientationChangeHandler&&(window.removeEventListener("resize",window._orientationChangeHandler),delete window._orientationChangeHandler),window._multiplayer_dbClickHandler&&(window.removeEventListener("dblclick",window._multiplayer_dbClickHandler),delete window._multiplayer_dbClickHandler),window._multiplayer_dbTapHandler&&(window.removeEventListener("touchend",window._multiplayer_dbTapHandler),delete window._multiplayer_dbTapHandler)};function y(e,n){var t=null,i=null;return function(){for(var o=this,r=arguments.length,l=new Array(r),a=0;a<r;a++)l[a]=arguments[a];i?(clearTimeout(t),t=setTimeout(function(){Date.now()-i>=n&&(e.apply(o,l),i=Date.now())},n-(Date.now()-i))):(e.apply(this,l),i=Date.now())}}var b=function(e,n){var t;return function(){for(var i=arguments.length,o=new Array(i),r=0;r<i;r++)o[r]=arguments[r];var l=this;clearTimeout(t),t=setTimeout(function(){e.apply(l,o)},n)}};export{o as a,d as b,h as c,b as d,u as e,r as f,t as g,s as h,m as i,v as j,f as k,p as l,c as m,l as p,g as s,y as t};
|
package/esm/skin-5419c4aa.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{f as l,r as i,d as e,e as n,j as o,k as t,l as s,m as r}from"./features-abc1af35.js";import{f as a}from"./icons-699e8cf0.js";import{g as d,p as u,e as v}from"./skin-4f84b841.js";import{g as C}from"./renditions-19f0b3a9.js";import{a as c,b as p}from"./index-c3dfd0f5.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/toConsumableArray";import{a1 as h,a2 as m,e as f,a3 as y,m as b}from"./generic-bd7427c4.js";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"video.js";import"./localisation-0bf399a1.js";import"./autoNextVideo-efd28455.js";import"./index-95713239.js";import"@babel/runtime/helpers/typeof";import"axios";import"./browser-d4613b36.js";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@viewlift/comscore/index.js";function L(L,g){d(L).addClass("skin_news"),function(i,e){var n=d(i);n&&n.on("loadeddata",function(){var n,o,t,s,r,a,d;(null===(n=C(i))||void 0===n?void 0:n.length)>0&&0!=(null==e||null===(o=e.skin_settings)||void 0===o?void 0:o.settingsToggle)&&l(i,e),!(null!=e&&null!==(t=e.series)&&void 0!==t&&t.enable||null!==(s=window)&&void 0!==s&&null!==(r=s.app_data)&&void 0!==r&&null!==(a=r.appcmsMain)&&void 0!==a&&null!==(d=a.features)&&void 0!==d&&d.auto_play)||null!=e&&e.liveVideo||c(i,e)})}(L,g),function(l,i){var e,n,o,t,s,r,a,C,c,p,h,m,f,y,b,L,g,B,w=d(l);if(null!=i&&i.liveVideo){var j,E,V,x,M,k,S=null===(j=w.controlBar)||void 0===j||null===(E=j.getChild("TimeDivider"))||void 0===E?void 0:E.el(),T=null===(V=w.controlBar)||void 0===V||null===(x=V.getChild("CurrentTimeDisplay"))||void 0===x?void 0:x.el(),Z=null===(M=w.controlBar)||void 0===M||null===(k=M.getChild("DurationDisplay"))||void 0===k?void 0:k.el();S&&(S.style.display="none"),T&&(T.style.display="none"),Z&&(Z.style.display="none")}var A=null===(e=w.controlBar)||void 0===e?void 0:e.getChild("ProgressControl"),H=null===(n=w.controlBar)||void 0===n||null===(o=n.getChild("SeekToLive"))||void 0===o?void 0:o.el();H&&(H.onclick=function(){if(w.paused())try{w.play()}catch(l){console.log(l)}});var _=document.createElement("div");_.className="custom-spaced-progress-bar",A&&_.append(A.el());null===(t=w.controlBar)||void 0===t||null===(s=t.el())||void 0===s||s.append(_);var N='<svg xmlns="http://www.w3.org/2000/svg" style="display : none">\n <defs>\n <symbol id="vjs-icon-pause" viewBox="0 0 17 16">\n <path d="M6.00138 15.4894C6.02138 15.7494 5.82138 15.9694 5.56138 15.9894C5.54138 15.9894 5.52138 15.9894 5.50138 15.9894H2.50138C2.24138 16.0094 2.02138 15.8094 2.00138 15.5494C2.00138 15.5294 2.00138 15.5094 2.00138 15.4894V0.499411C1.98138 0.239411 2.18138 0.0194107 2.44138 -0.000589337C2.46138 -0.000589337 2.48138 -0.000589337 2.50138 -0.000589337H5.50138C5.76138 -0.0205893 5.98138 0.179411 6.00138 0.439411C6.00138 0.459411 6.00138 0.479411 6.00138 0.499411V15.4894ZM14.0014 0.509411C14.0214 0.249411 13.8214 0.0294105 13.5614 0.00941051C13.5414 0.00941051 13.5214 0.00941051 13.5014 0.00941051H10.5014C10.2414 -0.0105895 10.0214 0.189411 10.0014 0.449411C10.0014 0.469411 10.0014 0.489411 10.0014 0.509411V15.4994C9.98138 15.7594 10.1814 15.9794 10.4414 15.9994C10.4614 15.9994 10.4814 15.9994 10.5014 15.9994H13.5014C13.7614 16.0194 13.9814 15.8194 14.0014 15.5594C14.0014 15.5394 14.0014 15.5194 14.0014 15.4994V0.509411Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-play" viewBox="0 0 17 16">\n <path d="M0.38279 15.9526C0.28279 16.0326 0.142791 16.0126 0.0527906 15.9126C0.0127906 15.8626 -0.00720943 15.8026 0.00279057 15.7326V0.262601C-0.0172094 0.132601 0.0727907 0.0226013 0.192791 0.00260128C0.262791 -0.00739872 0.32279 0.0126014 0.38279 0.0426014L15.8528 7.8126C16.0628 7.9226 16.0628 8.0926 15.8528 8.1926L0.38279 15.9526Z" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-fullscreen" viewBox="0 0 24 24">\n <path d="M19.8621 5.44209L19.0221 10.4521C18.9821 10.7221 18.7821 10.7821 18.5821 10.5921L17.1421 9.15209L14.3521 11.9421L12.9321 10.5221L15.7221 7.73209L14.2821 6.29209C14.0921 6.10209 14.1521 5.90209 14.4221 5.85209L19.4321 5.01209C19.6121 4.96209 19.7921 5.07209 19.8421 5.25209C19.8821 5.32209 19.8821 5.38209 19.8621 5.44209ZM9.15209 17.1621L11.9421 14.3721L10.5221 12.9521L7.73209 15.7421L6.29209 14.3021C6.10209 14.1121 5.90209 14.1721 5.85209 14.4421L5.01209 19.4521C4.96209 19.6321 5.07209 19.8121 5.25209 19.8621C5.30209 19.8821 5.37209 19.8821 5.42209 19.8621L10.4321 19.0221C10.7021 18.9821 10.7621 18.7821 10.5721 18.5821L9.15209 17.1621Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-fullscreen-back" viewBox="0 0 24 24">\n <path d="M10.92 13.49L10.08 18.5C10.04 18.77 9.84001 18.83 9.64001 18.64L8.20001 17.2L5.41001 19.99L3.99001 18.57L6.78001 15.78L5.34001 14.34C5.15001 14.15 5.21001 13.95 5.48001 13.9L10.49 13.06C10.67 13.01 10.85 13.12 10.9 13.3C10.94 13.37 10.94 13.43 10.92 13.49ZM17.21 8.21L20 5.42L18.58 4L15.79 6.79L14.35 5.35C14.16 5.16 13.96 5.22 13.91 5.49L13.07 10.5C13.02 10.68 13.13 10.86 13.31 10.91C13.36 10.93 13.43 10.93 13.48 10.91L18.49 10.07C18.76 10.03 18.82 9.83 18.63 9.63L17.21 8.21Z" fill="#EBEBEB"/>\n </symbol>\n\n <symbol id="vjs-icon-volume1" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume2" viewBox="0 0 24 24"> \n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-volume3" viewBox="0 0 24 24">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M13.62 16V14C14.73 14 15.62 13.11 15.62 12C15.62 10.89 14.73 10 13.62 10V8C15.83 8 17.62 9.79 17.62 12C17.62 14.21 15.83 16 13.62 16Z" fill="#EBEBEB"/>\n <path d="M21.62 12C21.62 7.58 18.04 4 13.62 4V6C16.93 6 19.62 8.69 19.62 12C19.62 15.31 16.93 18 13.62 18V20C18.04 19.99 21.61 16.41 21.62 12Z" fill="#EBEBEB"/>\n </symbol>\n <symbol id="vjs-icon-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="#EBEBEB"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="white"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="white"/>\n </clipPath>\n </defs>\n </symbol>\n <symbol id="vjs-icon-big-mute" viewBox="0 0 24 24"> \n <g clip-path="url(#clip0_19_559)">\n <path d="M11.65 4.28V19.72C11.65 20 11.48 20.08 11.27 19.89L5.86 15.09H2.9C2.62 15.09 2.38 14.86 2.38 14.57V9.43C2.38 9.15 2.61 8.91 2.9 8.91H5.86L11.27 4.11C11.48 3.92 11.65 3.99 11.65 4.28Z" fill="inherit"/>\n <path d="M19.0909 12.5238L21.2626 14.6955L19.8146 16.1436L17.6429 13.9718L15.4711 16.1436L14.0231 14.6955L16.1948 12.5238L14.0231 10.352L15.4711 8.904L17.6429 11.0757L19.8146 8.904L21.2626 10.352L19.0909 12.5238Z" fill="inherit"/>\n </g>\n <defs>\n <clipPath id="clip0_19_559">\n <rect width="24" height="24" fill="inherit"/>\n </clipPath>\n </defs>\n </symbol>\n\n <symbol id="vjs-icon-pip" viewBox="0 0 24 16">\n <rect x="1" y="1" width="22" height="14" rx="1" stroke="white" stroke-width="2"/>\n <rect x="9.33331" y="6.66666" width="10.6667" height="5.33333" rx="1" fill="white"/>\n </symbol>\n\n <symbol id="vjs-icon-captions" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" fill="white" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="#050910"/>\n </symbol>\n\n <symbol id="vjs-icon-captions-off" viewBox="0 0 29 16">\n <rect x="1" y="1" width="27" height="14" rx="1" stroke="white" stroke-width="2"/>\n <path d="M11.9795 5.25488C11.6377 5.25488 11.3317 5.31673 11.0615 5.44043C10.7946 5.56413 10.5684 5.74316 10.3828 5.97754C10.1973 6.20866 10.0557 6.49023 9.95801 6.82227C9.86035 7.15104 9.81152 7.52214 9.81152 7.93555C9.81152 8.48893 9.88965 8.96582 10.0459 9.36621C10.2021 9.76335 10.4398 10.0693 10.7588 10.2842C11.0778 10.4958 11.4814 10.6016 11.9697 10.6016C12.2725 10.6016 12.5671 10.5723 12.8535 10.5137C13.14 10.4551 13.4362 10.3753 13.7422 10.2744V11.2705C13.4525 11.3844 13.1595 11.4674 12.8633 11.5195C12.5671 11.5716 12.2253 11.5977 11.8379 11.5977C11.1087 11.5977 10.5033 11.4463 10.0215 11.1436C9.54297 10.8408 9.1849 10.4144 8.94727 9.86426C8.71289 9.31413 8.5957 8.6696 8.5957 7.93066C8.5957 7.3903 8.67057 6.89551 8.82031 6.44629C8.97005 5.99707 9.18815 5.6097 9.47461 5.28418C9.76107 4.9554 10.1143 4.70312 10.5342 4.52734C10.9574 4.34831 11.4408 4.25879 11.9844 4.25879C12.3424 4.25879 12.694 4.29948 13.0391 4.38086C13.3874 4.45898 13.7096 4.57129 14.0059 4.71777L13.5957 5.68457C13.3483 5.56738 13.0895 5.46647 12.8193 5.38184C12.5492 5.2972 12.2692 5.25488 11.9795 5.25488ZM17.9174 5.25488C17.5756 5.25488 17.2696 5.31673 16.9994 5.44043C16.7325 5.56413 16.5062 5.74316 16.3207 5.97754C16.1352 6.20866 15.9936 6.49023 15.8959 6.82227C15.7982 7.15104 15.7494 7.52214 15.7494 7.93555C15.7494 8.48893 15.8275 8.96582 15.9838 9.36621C16.14 9.76335 16.3777 10.0693 16.6967 10.2842C17.0157 10.4958 17.4193 10.6016 17.9076 10.6016C18.2104 10.6016 18.5049 10.5723 18.7914 10.5137C19.0779 10.4551 19.3741 10.3753 19.6801 10.2744V11.2705C19.3904 11.3844 19.0974 11.4674 18.8012 11.5195C18.5049 11.5716 18.1632 11.5977 17.7758 11.5977C17.0466 11.5977 16.4411 11.4463 15.9594 11.1436C15.4809 10.8408 15.1228 10.4144 14.8852 9.86426C14.6508 9.31413 14.5336 8.6696 14.5336 7.93066C14.5336 7.3903 14.6085 6.89551 14.7582 6.44629C14.9079 5.99707 15.126 5.6097 15.4125 5.28418C15.699 4.9554 16.0521 4.70312 16.4721 4.52734C16.8952 4.34831 17.3786 4.25879 17.9223 4.25879C18.2803 4.25879 18.6319 4.29948 18.977 4.38086C19.3253 4.45898 19.6475 4.57129 19.9437 4.71777L19.5336 5.68457C19.2862 5.56738 19.0274 5.46647 18.7572 5.38184C18.487 5.2972 18.2071 5.25488 17.9174 5.25488Z" fill="white"/>\n </symbol>\n\n </defs>\n </svg>';w.el().insertBefore(u(N),null!==(r=w.el().firstChild)&&void 0!==r?r:null);var P=(null==w||null===(a=w.controlBar)||void 0===a||null===(C=a.getChild("PlayToggle"))||void 0===C||null===(c=C.el())||void 0===c?void 0:c.firstChild)||null;if(P){P.style.height="18px",P.style.width="18px";var D=v(P,w.paused()?"#vjs-icon-play":"#vjs-icon-pause");w.on("pause",function(){return D.setAttributeNS(null,"href","#vjs-icon-play")}),w.on("play",function(){return D.setAttributeNS(null,"href","#vjs-icon-pause")})}var I=(null==w||null===(p=w.controlBar)||void 0===p||null===(h=p.getChild("FullscreenToggle"))||void 0===h||null===(m=h.el())||void 0===m?void 0:m.firstChild)||null;if(I){I.style.height="24px",I.style.width="24px";var q=v(I,"#vjs-icon-fullscreen");w.on("fullscreenchange",function(){var l=w.isFullscreen_;null==q||q.setAttributeNS(null,"href",l?"#vjs-icon-fullscreen-back":"#vjs-icon-fullscreen")})}var O=(null==w||null===(f=w.controlBar)||void 0===f||null===(y=f.getChild("VolumePanel"))||void 0===y?void 0:y.el())||null;if(O){var R=O.querySelector(".vjs-mute-control .vjs-icon-placeholder");R.classList.add("vjs-svg-icon"),R.style.height="24px",R.style.width="24px";var F=v(R,w.muted()?"#vjs-icon-mute":"#vjs-icon-volume1");w.on("volumechange",function(l){var i=w.volume();console.log(i,w.muted()),0==i||w.muted()?F.setAttributeNS(null,"href","#vjs-icon-mute"):i>0&&i<=.3?F.setAttributeNS(null,"href","#vjs-icon-volume1"):i>=.3&&i<=.7?F.setAttributeNS(null,"href","#vjs-icon-volume2"):F.setAttributeNS(null,"href","#vjs-icon-volume3")})}var G=(null==w||null===(b=w.controlBar)||void 0===b||null===(L=b.getChild("PictureInPictureToggle"))||void 0===L?void 0:L.el())||null;if(G){var z=null==G?void 0:G.querySelector(".vjs-icon-placeholder");z.style.height="25px",z.style.width="25px";var J=v(z,"#vjs-icon-pip");w.on("enterpictureinpicture",function(){J.setAttributeNS(null,"href","#vjs-icon-pip")})}var K=(null==w||null===(g=w.controlBar)||void 0===g||null===(B=g.getChild("SubsCapsButton"))||void 0===B?void 0:B.el())||null;if(K){var Q=K.querySelector(".vjs-subs-caps-button .vjs-icon-placeholder");Q.classList.add("vjs-svg-icon"),Q.style.height="29px",Q.style.width="29px";var U=v(Q,"#vjs-icon-caps");U.setAttributeNS(null,"href","#vjs-icon-captions-off"),w.textTracks().on("change",function(l){for(var i=w.textTracks(),e=!1,n=0;n<i.length;n++){var o=i[n];if(("captions"===o.kind||"subtitles"===o.kind)&&"showing"===o.mode){e=!0;break}}e?U.setAttributeNS(null,"href","#vjs-icon-captions"):U.setAttributeNS(null,"href","#vjs-icon-captions-off")})}w&&null!=i&&i.liveVideo&&null!=i&&i.liveui&&(w.liveTracker.on("liveedgechange",function(){Y(w)}),w.on("timeupdate",function(){Y(w)}));function W(l){var i=Math.floor(l/3600),e=Math.floor(l%3600/60),n=Math.floor(l%60),o=function(l){return String(l).padStart(2,"0")};return 0===i?"".concat(o(e),":").concat(o(n)):"".concat(o(i),":").concat(o(e),":").concat(o(n))}function X(l){var i=l.seekable();if(i&&i.length>0){var e=i.end(0);return Math.max(0,e-l.currentTime())}return 0}function Y(l){var i,e,n=l.liveTracker.atLiveEdge(),o=X(l),t=null==l||null===(i=l.controlBar)||void 0===i||null===(e=i.remainingTimeDisplay)||void 0===e?void 0:e.el();if(t){var s=t.querySelector(".vjs-remaining-time-display");n?t.style.display="none":(t.style.display="flex",s&&(s.innerText=W(o)))}}}(L,g),function(l,d){var u,v,C,c,p,L,g,B,w,j,E=(null==d?void 0:d.liveVideo)||!1,V=(null==d||null===(u=d.res)||void 0===u?void 0:u.contentType)||"video",x=(null==d||null===(v=d.res)||void 0===v||null===(C=v[V])||void 0===C?void 0:C.isSSAIEnabled)||!1,M=(null==d?void 0:d.skin_settings)||{};null==M||M.slowMoBtn;var k=(null==d||null===(c=d.customData)||void 0===c?void 0:c.ads)||{};i(l),null!=M&&M.skipBtn&&0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)&&e(l,"VL_ONE",SkipSvgV2());null!=M&&M.rewindBtn&&(0==(null==d?void 0:d.liveVideo)&&0==(null==d?void 0:d.liveui)||1==(null==d?void 0:d.liveui))&&n(l,"VL_ONE",a());(null==d||null===(p=d.relatedVideos)||void 0===p||null===(L=p.content)||void 0===L?void 0:L.length)>0&&o(l,null==d?void 0:d.relatedVideos);(null==d||null===(g=d.streams)||void 0===g?void 0:g.length)>1&&t(l,null==d?void 0:d.streams);(null==d||null===(B=d.playlist)||void 0===B||null===(w=B.content)||void 0===w?void 0:w.length)>0&&s(l,null==d?void 0:d.playlist);null!=d&&null!==(j=d.series)&&void 0!==j&&j.enable&&r(l,d);if(x&&E&&"TRANSMIT"==(null==k?void 0:k.liveAdSticherProvider)&&null!=k&&k.liveAdClientSideTracking)h(l,d);else if("MEDIA_TAILOR"==(null==k?void 0:k.vodAdSticherProvider)&&null!=k&&k.vodAdClientSideTracking&&x)if(E)m(l);else{var S,T=null;if(null!=d&&null!==(S=d.series)&&void 0!==S&&S.enable){var Z,A,H,_,N,P=null===(Z=f())||void 0===Z||null===(A=Z.video)||void 0===A||null===(H=A.gist)||void 0===H?void 0:H.id,D=b(),I=(null==D?void 0:D.get(P))||{t:0,p:0},q=I.t,O=I.p;"function"==typeof(null===(_=window)||void 0===_||null===(N=_.watchHistory)||void 0===N?void 0:N.cb)&&window.watchHistory.cb({watchedTime:q}),O<95&&(T=q)}else{var R=d.watchHistoryResumeTime;d.watchedPercentage<95&&(T=R)}y(l,T)}}(L,g),p(L,g)}export{L as initialiseSkin};
|
package/esm/skin-b0ba54c4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as l,d as e,e as i,o,p as n,q as t}from"./features-abc1af35.js";import{g as a}from"./skin-4f84b841.js";import{a as r,b as d}from"./index-c3dfd0f5.js";import{i as u}from"./index-209acda5.js";import{i as s}from"./browser-d4613b36.js";import"videojs-contrib-quality-menu";import v from"video.js";import{f as c,Z as p,a1 as m,a2 as y,e as f,a3 as h,m as b}from"./generic-bd7427c4.js";import{c as g,d as w}from"./icons-699e8cf0.js";import"@babel/runtime/helpers/defineProperty";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./renditions-19f0b3a9.js";import"./localisation-0bf399a1.js";import"@babel/runtime/helpers/toConsumableArray";import"./autoNextVideo-efd28455.js";import"./index-95713239.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"axios";import"md5";import"js-cookie";import"./captions-2b4caf69.js";import"@viewlift/comscore/index.js";var C=function(l){try{var e,i,o=a(l);if(!o||"function"!=typeof o.qualityMenu)return;null!==(e=o.dash)&&void 0!==e&&e.mediaPlayer&&"function"==typeof o.qualityLevels&&0===(null===(i=o.qualityLevels())||void 0===i?void 0:i.length)&&function(l){var e,i;if(l._dashQualityLevelsBridged)return!0;var o=null===(e=l.dash)||void 0===e?void 0:e.mediaPlayer;if(!o||"function"!=typeof l.qualityLevels)return!1;var n=(null===(i=o.getRepresentationsByType)||void 0===i?void 0:i.call(o,"video"))||[];if(!n.length)return!1;var t=l.qualityLevels(),a={};n.forEach(function(l){a[l.id]=!0}),n.forEach(function(l){try{t.addQualityLevel({id:l.id,width:l.width,height:l.height,bandwidth:l.bitrate,frameRate:l.frameRate,enabled:function(e){if(void 0===e)return a[l.id];a[l.id]=e;try{n.filter(function(l){return a[l.id]}).length===n.length?o.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!0}}}}):e&&(o.updateSettings({streaming:{abr:{autoSwitchBitrate:{video:!1}}}}),o.setRepresentationForTypeByIndex("video",l.index,!0))}catch(l){console.warn("[quality-selector] dash switch failed",l)}}})}catch(e){console.warn("[quality-selector] addQualityLevel failed for rep",null==l?void 0:l.id,e)}});var r=function(l){try{for(var e=0;e<t.length;e++)if(t[e].id===l){t.selectedIndex_=e,t.trigger({selectedIndex:e,type:"change"});break}}catch(l){console.warn("[quality-selector] setSelected failed",l)}};try{var d,u,s=null===(d=o.getCurrentRepresentationForType)||void 0===d?void 0:d.call(o,"video");null!=s&&s.id&&r(s.id),null===(u=o.on)||void 0===u||u.call(o,"qualityChangeRendered",function(l){try{var e,i,o;if("video"!==(null==l?void 0:l.mediaType))return;var t=null!==(e=null==l||null===(i=l.newRepresentation)||void 0===i?void 0:i.id)&&void 0!==e?e:"number"==typeof(null==l?void 0:l.newQuality)?null===(o=n[l.newQuality])||void 0===o?void 0:o.id:null;t&&r(t)}catch(l){console.warn("[quality-selector] qualityChangeRendered handler failed",l)}})}catch(l){console.warn("[quality-selector] subscribe qualityChangeRendered failed",l)}l._dashQualityLevelsBridged=!0}(o),o.qualityMenu({useResolutionLabels:!0})}catch(l){console.warn("[quality-selector] addQualitySelector failed",l)}};function j(v,j){a(v).addClass("skin_vlone"),function(e,i){var o,n=a(e),t=(null==i||null===(o=i.res)||void 0===o?void 0:o.siteId)||"";n&&(n.on("loadeddata",function(){var l,o,n,a,d;C(e),!(null!=i&&null!==(l=i.series)&&void 0!==l&&l.enable||null!==(o=window)&&void 0!==o&&null!==(n=o.app_data)&&void 0!==n&&null!==(a=n.appcmsMain)&&void 0!==a&&null!==(d=a.features)&&void 0!==d&&d.auto_play)||null!=i&&i.liveVideo||r(e,i),null!=i&&i.liveVideo||s()||"b13633d9-f778-40c6-a5ea-c330617cdf55"===t||u(e)}),n.one("play",function(){var i,o,n,t;null!==(i=window)&&void 0!==i&&null!==(o=i.customData)&&void 0!==o&&o.iframeOverlayUrl&&l(e,null===(n=window)||void 0===n||null===(t=n.customData)||void 0===t?void 0:t.iframeOverlayUrl)}))}(v,j),function(l,r){var u,s,v,C,j,B,k,q,T=a(l),R=(null==r?void 0:r.liveVideo)||!1,L=(null==r||null===(u=r.res)||void 0===u?void 0:u.contentType)||"video",S=(null==r||null===(s=r.res)||void 0===s||null===(v=s[L])||void 0===v?void 0:v.isSSAIEnabled)||!1,_=c(null==r?void 0:r.res,l)||{};_.src;var x=(null==r?void 0:r.skin_settings)||{},A=(null==r||null===(C=r.customData)||void 0===C?void 0:C.ads)||{};if(R&&(null==r||!r.liveui)){var V,E,I=(null==T||null===(V=T.controlBar)||void 0===V||null===(E=V.getChild("LiveDisplay"))||void 0===E?void 0:E.el())||null;I&&(I.onclick=function(){try{var l;null==T||null===(l=T.liveTracker)||void 0===l||l.seekToLiveEdge()}catch(l){console.log(l,"Cannot seek to LE")}})}null!=x&&x.skipBtn&&0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)&&e(l,"VL_ONE",g());(null!=x&&x.rewindBtn&&0==(null==r?void 0:r.liveVideo)&&0==(null==r?void 0:r.liveui)||1==(null==r?void 0:r.liveui))&&i(l,"VL_ONE",w());(null==r||null===(j=r.relatedVideos)||void 0===j||null===(B=j.content)||void 0===B?void 0:B.length)>0&&o(l,null==r?void 0:r.relatedVideos);null!=r&&null!==(k=r.series)&&void 0!==k&&k.enable&&n(l,r);(null==r||null===(q=r.streams)||void 0===q?void 0:q.length)>1&&t(l,null==r?void 0:r.streams);if(d(l,r),p(l,r),S&&R&&"TRANSMIT"==(null==A?void 0:A.liveAdSticherProvider)&&!(null==A||!A.liveAdClientSideTracking))m(l,r);else if("MEDIA_TAILOR"==(null==A?void 0:A.vodAdSticherProvider)&&null!=A&&A.vodAdClientSideTracking&&S)if(R)y(l);else{var P,M=null;if(null!=r&&null!==(P=r.series)&&void 0!==P&&P.enable){var Q,D,O,N,F,H=null===(Q=f())||void 0===Q||null===(D=Q.video)||void 0===D||null===(O=D.gist)||void 0===O?void 0:O.id,U=b(),$=(null==U?void 0:U.get(H))||{t:0,p:0},G=$.t,Z=$.p;"function"==typeof(null===(N=window)||void 0===N||null===(F=N.watchHistory)||void 0===F?void 0:F.cb)&&window.watchHistory.cb({watchedTime:G}),Z<95&&(M=G)}else{var z=r.watchHistoryResumeTime;r.watchedPercentage<95&&(M=z)}h(l,M)}}(v,j),B(v,j)}var B=function(l,e){var i,o,n,t,r,d,u,s,c,p,m,y,f=a(l),h=(null==e?void 0:e.theme)||{},b=v.dom.$(".vjs-play-progress"),g=v.dom.$(".video-js .vjs-big-play-button .vjs-icon-placeholder");g&&(g.style.color="".concat(null===(i=window)||void 0===i||null===(o=i.app_data)||void 0===o||null===(n=o.appcmsMain)||void 0===n||null===(t=n.brand)||void 0===t||null===(r=t.cta)||void 0===r||null===(d=r.primary)||void 0===d?void 0:d.backgroundColor)),b&&(b.style.background="".concat(null===(u=window)||void 0===u||null===(s=u.app_data)||void 0===s||null===(c=s.appcmsMain)||void 0===c||null===(p=c.brand)||void 0===p||null===(m=p.cta)||void 0===m||null===(y=m.primary)||void 0===y?void 0:y.backgroundColor));var w=f.getChild("BigPlayButton")||null;(null==h?void 0:h.progressBarColor)&&b&&(b.style.background=h.progressBarColor),(null==h?void 0:h.playButtonBackgroundColor)&&w&&(w.el().style.background=h.playButtonBackgroundColor),(null==h?void 0:h.playButtonColor)&&g&&(g.style.color=h.playButtonColor),(null==h?void 0:h.playButtonType)&&("square"==(null==h?void 0:h.playButtonType)?w.el().style.borderRadius=".3em":w.el().style.borderRadius="1.3em")};export{j as initialiseSkin};
|