bitmovin-player 8.280.0 → 8.281.0
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/bitmovinplayer-serviceworker.js +2 -2
- package/bitmovinplayer-serviceworker.prod.js +2 -2
- package/bitmovinplayer-ui.js +1 -1
- package/bitmovinplayer.js +2 -2
- package/bitmovinplayer.prod.js +2 -2
- package/modules/bitmovinplayer-abr.js +2 -2
- package/modules/bitmovinplayer-abr.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-bitmovin.js +2 -2
- package/modules/bitmovinplayer-advertising-bitmovin.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-core.js +2 -2
- package/modules/bitmovinplayer-advertising-core.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-ima.js +2 -2
- package/modules/bitmovinplayer-advertising-ima.prod.js +2 -2
- package/modules/bitmovinplayer-advertising-omsdk.js +2 -2
- package/modules/bitmovinplayer-advertising-omsdk.prod.js +2 -2
- package/modules/bitmovinplayer-analytics.js +2 -2
- package/modules/bitmovinplayer-analytics.prod.js +2 -2
- package/modules/bitmovinplayer-container-mp4.js +2 -2
- package/modules/bitmovinplayer-container-mp4.prod.js +2 -2
- package/modules/bitmovinplayer-container-ts.js +2 -2
- package/modules/bitmovinplayer-container-ts.prod.js +2 -2
- package/modules/bitmovinplayer-container-webm.js +2 -2
- package/modules/bitmovinplayer-container-webm.prod.js +2 -2
- package/modules/bitmovinplayer-core.js +2 -2
- package/modules/bitmovinplayer-core.prod.js +2 -2
- package/modules/bitmovinplayer-crypto.js +2 -2
- package/modules/bitmovinplayer-crypto.prod.js +2 -2
- package/modules/bitmovinplayer-dash.js +2 -2
- package/modules/bitmovinplayer-dash.prod.js +2 -2
- package/modules/bitmovinplayer-drm.js +2 -2
- package/modules/bitmovinplayer-drm.prod.js +2 -2
- package/modules/bitmovinplayer-engine-bitmovin.js +2 -2
- package/modules/bitmovinplayer-engine-bitmovin.prod.js +2 -2
- package/modules/bitmovinplayer-engine-native.js +2 -2
- package/modules/bitmovinplayer-engine-native.prod.js +2 -2
- package/modules/bitmovinplayer-engine-webrtc.js +2 -2
- package/modules/bitmovinplayer-engine-webrtc.prod.js +2 -2
- package/modules/bitmovinplayer-envivio.js +1 -1
- package/modules/bitmovinplayer-envivio.prod.js +1 -1
- package/modules/bitmovinplayer-hls.js +2 -2
- package/modules/bitmovinplayer-hls.prod.js +2 -2
- package/modules/bitmovinplayer-lowlatency.js +2 -2
- package/modules/bitmovinplayer-lowlatency.prod.js +2 -2
- package/modules/bitmovinplayer-mserenderer.js +2 -2
- package/modules/bitmovinplayer-mserenderer.prod.js +2 -2
- package/modules/bitmovinplayer-patch.js +1 -1
- package/modules/bitmovinplayer-patch.prod.js +1 -1
- package/modules/bitmovinplayer-playstation4.js +2 -2
- package/modules/bitmovinplayer-playstation4.prod.js +2 -2
- package/modules/bitmovinplayer-playstation5.js +2 -2
- package/modules/bitmovinplayer-playstation5.prod.js +2 -2
- package/modules/bitmovinplayer-polyfill.js +1 -1
- package/modules/bitmovinplayer-polyfill.prod.js +1 -1
- package/modules/bitmovinplayer-reactnative.js +1 -1
- package/modules/bitmovinplayer-reactnative.prod.js +1 -1
- package/modules/bitmovinplayer-remotecontrol.js +2 -2
- package/modules/bitmovinplayer-remotecontrol.prod.js +2 -2
- package/modules/bitmovinplayer-serviceworker-client.js +2 -2
- package/modules/bitmovinplayer-serviceworker-client.prod.js +2 -2
- package/modules/bitmovinplayer-serviceworker.js +2 -2
- package/modules/bitmovinplayer-serviceworker.prod.js +2 -2
- package/modules/bitmovinplayer-sgai.js +2 -2
- package/modules/bitmovinplayer-sgai.prod.js +2 -2
- package/modules/bitmovinplayer-smooth.js +2 -2
- package/modules/bitmovinplayer-smooth.prod.js +2 -2
- package/modules/bitmovinplayer-style.js +2 -2
- package/modules/bitmovinplayer-style.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-cea608.js +2 -2
- package/modules/bitmovinplayer-subtitles-cea608.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-native.js +2 -2
- package/modules/bitmovinplayer-subtitles-native.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-ttml.js +2 -2
- package/modules/bitmovinplayer-subtitles-ttml.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles-vtt.js +2 -2
- package/modules/bitmovinplayer-subtitles-vtt.prod.js +2 -2
- package/modules/bitmovinplayer-subtitles.js +2 -2
- package/modules/bitmovinplayer-subtitles.prod.js +2 -2
- package/modules/bitmovinplayer-thumbnail-imp.js +2 -2
- package/modules/bitmovinplayer-thumbnail-imp.prod.js +2 -2
- package/modules/bitmovinplayer-thumbnail.js +2 -2
- package/modules/bitmovinplayer-thumbnail.prod.js +2 -2
- package/modules/bitmovinplayer-tizen.js +2 -2
- package/modules/bitmovinplayer-tizen.prod.js +2 -2
- package/modules/bitmovinplayer-ui.js +2 -2
- package/modules/bitmovinplayer-ui.prod.js +2 -2
- package/modules/bitmovinplayer-vidaa.js +2 -2
- package/modules/bitmovinplayer-vidaa.prod.js +2 -2
- package/modules/bitmovinplayer-vr.js +2 -2
- package/modules/bitmovinplayer-vr.prod.js +2 -2
- package/modules/bitmovinplayer-webos.js +2 -2
- package/modules/bitmovinplayer-webos.prod.js +2 -2
- package/modules/bitmovinplayer-wpe.js +2 -2
- package/modules/bitmovinplayer-wpe.prod.js +2 -2
- package/modules/bitmovinplayer-xml.js +1 -1
- package/modules/bitmovinplayer-xml.prod.js +1 -1
- package/package.json +1 -1
- package/types/advertising/API.d.ts +9 -0
- package/types/advertising/ConfigAPI.d.ts +6 -5
- package/types/core/BufferSettings.d.ts +58 -0
- package/types/core/LogLevels.d.ts +54 -0
- package/types/core/Logger.d.ts +51 -0
- package/types/core/Settings.d.ts +856 -0
- package/types/core/network/ManifestMimeType.d.ts +5 -0
- package/types/core/util/MimeTypeHelper.d.ts +52 -0
- package/types/sgai/SgaiConfigAPI.d.ts +1 -1
- package/types/sgai/SgaiErrorCode.d.ts +6 -1
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
* This software includes open-source components. See THIRD_PARTY_NOTICES
|
|
10
10
|
* in the distribution for details.
|
|
11
11
|
*
|
|
12
|
-
* Bitmovin Player Version 8.
|
|
12
|
+
* Bitmovin Player Version 8.281.0
|
|
13
13
|
*
|
|
14
14
|
****************************************************************************/
|
|
15
15
|
|
|
16
16
|
(function() {
|
|
17
|
-
"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["advertising-bitmovin"]=e():(t.bitmovin=t.bitmovin||{},t.bitmovin.player=t.bitmovin.player||{},t.bitmovin.player["advertising-bitmovin"]=e())}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[860],{6341:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractOverlayAdManager=e.OverlayAdDisplayStatus=void 0;var r,n=i(6365);!function(t){t.Displayed="displayed",t.Cancelled="cancelled",t.Failed="failed"}(r||(e.OverlayAdDisplayStatus=r={}));var o=function(){function t(t,e){this.adContainer=t,this.isCustomAdContainer=e}return t.prototype.adjustAdContainer=function(t,e,i){void 0===i&&(i=!1),this.adContainer.style.display="block",this.isCustomAdContainer||(this.adContainer.style.width=i?"100%":t+"px",this.adContainer.style.height=i?"100%":e+"px",this.adContainer.style.top=i?"0":"",this.adContainer.style.bottom=i?"":n.DEFAULT_OVERLAY_AD_BOTTOM_POSITION,this.adContainer.style.left="0",this.adContainer.style.right="0",this.adContainer.style.marginLeft=i?"":"auto",this.adContainer.style.marginRight=i?"":"auto")},t}();e.AbstractOverlayAdManager=o},77800:function(t,e,i){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)},n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var r,n=0,o=e.length;n<o;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.AdBreakService=void 0,e.preprocessAdBreak=function(t,e,i){var n=[];return t.ads.forEach(function(t){var o,a;if((0,v.isInternalLinearAd)(t)){var s=(0,A.selectLinearMediaFile)(t.supportedMediaFiles,i.technology);if(!s){var u=t.supportedMediaFiles.filter(f.isProgressiveMediaFile);s=e(u)}n.push(function(t,e){return t.publicAd.data=r(r({},t.publicAd.data),(0,f.getAdDataForLinear)(e)),t.publicAd.mediaFileUrl=e.fileURL,t.publicAd.height=e.height,t.publicAd.width=e.width,t.isVpaid=(0,f.isVpaid)(e),null==t.publicAd.uiConfig.requestsUi&&(t.publicAd.uiConfig.requestsUi=!t.isVpaid),t}(t,s))}else if((0,v.isInternalOverlayAd)(t)){var c=(0,A.selectNonLinearMediaFile)(t.supportedVariations,i.resolution,null!==(o=i.nonLinearTargetResolution)&&void 0!==o?o:function(t){return{width:t.width*k,height:t.height*b}}(i.resolution),null!==(a=i.allowScaledNonLinearAds)&&void 0!==a&&a);c&&n.push(function(t,e){var i=r(r({},t),{selectedVastVariation:e.originalVastVariation,isVpaid:(0,f.isVpaid)(e),type:e.mimeType,htmlResource:e.htmlResource,iframeResource:e.iframeResource,staticResource:e.staticResource,adParameters:e.adParameters});return i.publicAd.data=r(r({},i.publicAd.data),(0,f.getAdDataForNonLinear)(e)),i.publicAd.mediaFileUrl=e.staticResource||e.htmlResource||e.iframeResource,i.publicAd.clickThroughUrl=e.nonlinearClickThroughURLTemplate,i.publicAd.height=e.height,i.publicAd.width=e.width,i}(t,c))}}),r(r({},t),{ads:n})};var o=i(49075),a=i(76713),s=i(45392),u=i(90176),c=i(28610),l=i(23912),d=i(6365),p=i(47091),h=i(5838),f=i(45980),v=i(64092),y=i(88944),A=i(85320),m=i(58656),g=function(){function t(t,e,i,n){this.KM=t,this.NM=[],this.OM=[],this.PM=[],this.QM=[],this.RM=[],this.LM=e,this.MM=e.strategy,this.SM=0,this.TM=0,this.UM=i,this.VM=this.KM.getVideoElement().parentElement,this.WM=n,this.LM.placeholders=r(r({},u.adTagPlaceholderDefaults),this.LM.placeholders)}return t.prototype.schedule=function(t){var e=this.nM(t);return this.mM(e)?this.XM(e,this.YM()):Promise.reject("can not schedule invalid AdConfig")},t.prototype.XM=function(t,e){var i=this;return this.bM(t).then(function(r){return 0===r.length&&t.fallbackTags&&t.fallbackTags.length>0?(t.tag=t.fallbackTags.shift(),i.XM(t,e)):Promise.resolve(i.ZM(r.map(function(r){return i.aM(t,r,e)})))})},t.prototype.YM=function(){return this.TM+=100,this.TM},t.prototype.ZM=function(t){var e=this,i=[],r=[],n=[];t.forEach(function(t,o){var s=e.KM.parsePosition(t.publicAdBreak.position);t.orderingIndex=t.orderingIndex+o,(0,a.isPauseAdBreak)(t.publicAdBreak)?(t.publicAdBreak.scheduleTime=NaN,n.push(t),i.push(t)):isNaN(s)?e.OM.push(t):(t.publicAdBreak.scheduleTime=s,i.push(t),r.push(t))});var o=i.filter(function(t){return t.publicAdBreak.persistent});return this.NM=this.NM.concat(r),this.QM=this.QM.concat(o),this.PM=this.PM.concat(n),this.NM.sort(m.adBreakPreloadComparator),i},t.prototype.aM=function(t,e,i){var n=r({},e.publicAdBreakConfig),o=r(r({publicAdBreak:n,orderingIndex:i},e),{isScheduled:!1,discardAfterPlayback:t.discardAfterPlayback});return delete o.publicAdBreakConfig,o},t.prototype.bM=function(t){var e=this;return new Promise(function(i){if(t.tag.type===l.AdTagType.VMAP){var r=t.tag.url;t.tag.url=e.gM(t.tag.url),h.VmapExtractor.extractAdBreakConfigs(t,e.WM).then(function(n){var o=n.adBreakConfigs.filter(function(t){var i=e.KM.parsePosition(t.publicAdBreakConfig.position);return isNaN(i)||i>=e.SM});t.tag.url=r,e.KM.metadataLoaded(t,n.downloadTiming),i(o)}).catch(function(n){t.tag.url=r,n?e.KM.onError(n.code,null,t):e.KM.onError(p.VastErrorCode.UNDEFINED_ERROR,null,t),i([])})}else i([{publicAdBreakConfig:t}])})},t.prototype.list=function(){return this.NM.concat(this.RM)},t.prototype.discardAdBreak=function(t){var e=function(e){return e.publicAdBreak.id!==t};this.NM=this.NM.filter(e),this.RM=this.RM.filter(e)},t.prototype.setCurrentScheduleTime=function(t){this.SM=t},t.prototype.resetPlayedAdBreaks=function(t){this.list().forEach(function(e){e.publicAdBreak.scheduleTime>=t&&(e.loading=!1,e.isScheduled=!1)})},t.prototype.getPauseAdBreaks=function(){return this.PM.slice()},t.prototype.preloadAdBreaks=function(t){var e=this;this.OM.length>0&&this.ZM(this.OM.splice(0,this.OM.length));var i=this.NM[0];if(!i||t<i.publicAdBreak.scheduleTime-i.publicAdBreak.preloadOffset)return Promise.resolve();var r=this.NM.filter(function(e){return t>=e.publicAdBreak.scheduleTime-e.publicAdBreak.preloadOffset&&!e.isScheduled&&!e.loading}).filter(function(t){var i=e.MM.shouldLoadAdBreak(t.publicAdBreak);return i||(t.discardAfterPlayback?e.discardAdBreak(t.publicAdBreak.id):t.isScheduled=!0),i});return Promise.all(r.map(function(t){return e.cM(t)})).then(function(){})},t.prototype.discardPauseAdBreakIfNotReplayable=function(t){t.discardAfterPlayback&&this.jM(t)},t.prototype.cM=function(t){var e=this;return t.loading=!0,this.dM(t).then(function(){t.discardAfterPlayback&&e.hM(t),t.isScheduled=!0,e.RM.push(t),e.RM.sort(m.adBreakScheduleComparator)},function(i){t.discardAfterPlayback&&e.hM(t),e.iM(t),e.fM(t,i)})},t.prototype.loadPauseAdBreak=function(t){var e=this;return t.loading?Promise.resolve(null):(delete t.ads,delete t.publicAdBreak.ads,this.MM.shouldLoadAdBreak(t.publicAdBreak)?(t.loading=!0,this.dM(t).then(function(){return t},function(i){return e.fM(t,i),e.discardPauseAdBreakIfNotReplayable(t),null}).finally(function(){return t.loading=!1})):(this.discardPauseAdBreakIfNotReplayable(t),Promise.resolve(null)))},t.prototype.dM=function(t){for(var e,i=this,r=this.eM(t,t.publicAdBreak.tag),n=function(e){r=r.catch(function(){return i.eM(t,e)})},o=0,a=null!==(e=t.publicAdBreak.fallbackTags)&&void 0!==e?e:[];o<a.length;o++)n(a[o]);return r},t.prototype.eM=function(t,e){var i=this,r=this.gM(e.url);return this.WM.downloadVastManifest(r).then(function(e){return i.KM.metadataLoaded(t.publicAdBreak,e.downloadTiming),i.lM(e.manifest,t.publicAdBreak).then(function(e){var r;t.ads=e;var o=e.filter(v.isInternalLinearAd),a=e.filter(function(t){return!(0,v.isInternalLinearAd)(t)}),s=(0,y.splitAdsBySequence)(o,null!==(r=i.LM.freewheelVastFallbackHandling)&&void 0!==r&&r).mainAds;t.publicAdBreak.ads=n(n([],s.map(function(t){return t.publicAd}),!0),a.map(function(t){return t.publicAd}),!0)})})},t.prototype.fM=function(t,e){this.KM.onError(e.code,void 0,t.publicAdBreak),(0,s.pingVmapTrackingUrls)(t.trackingEvents,c.VmapTrackingEventType.BreakStart),(0,s.pingVmapTrackingUrls)(t.trackingEvents,c.VmapTrackingEventType.Error),(0,s.pingVmapTrackingUrls)(t.trackingEvents,c.VmapTrackingEventType.BreakEnd)},t.prototype.gM=function(t){var e=this,i={playbackTime:this.SM,height:String(this.VM.clientHeight),width:String(this.VM.clientWidth),domain:encodeURIComponent(document.location.hostname),page:encodeURIComponent(document.location.href),referrer:encodeURIComponent(document.referrer),random:Math.floor(1e7+9e7*Math.random()).toString(),timestamp:String(Date.now())};return Object.keys(this.LM.placeholders).forEach(function(r){e.LM.placeholders[r].forEach(function(e){t=t.replace(e,i[r])})}),t},t.prototype.hM=function(t){var e=this.NM.indexOf(t);e>=0&&this.NM.splice(e,1)},t.prototype.iM=function(t){var e=this.RM.indexOf(t);e>=0&&this.RM.splice(e,1)},t.prototype.jM=function(t){var e=this.PM.indexOf(t);e>=0&&this.PM.splice(e,1)},t.prototype.kM=function(){return{id:"",adId:"",universalAdId:{idRegistry:"",value:""},trackingEvents:{complete:[],firstQuartile:[],midpoint:[],thirdQuartile:[]},apiFramework:null,sequence:null,type:"",adParameters:null,duration:-1,icons:[],mediaFiles:[],skipDelay:-1,videoClickThroughURLTemplate:"",videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[]}},t.prototype.lM=function(t,e){var i,n=this;return this.UM.parseManifest(t,null!==(i=this.LM.freewheelVastFallbackHandling)&&void 0!==i&&i).then(function(t){var i=t.ads.flatMap(function(t){var i,s,u=f.AdTranslator.fromVastAd(t,e),c=(0,a.isPauseAdBreak)(e)?function(t){return t.filter(v.isInternalOverlayAd).map(function(t){return r(r({},t),{supportedVariations:t.supportedVariations.filter(f.isStaticImageNonLinearVariation)})}).filter(function(t){return t.supportedVariations.length>0})}(u):u;if(0===c.length){var l=null!==(s=null===(i=t.creatives)||void 0===i?void 0:i[0])&&void 0!==s?s:n.kM();new o.VASTTracker(void 0,t,l).errorWithCode(String(p.VastErrorCode.NO_SUPPORTED_MEDIAFILE))}return c});if(0===i.length)throw{code:p.VastErrorCode.NO_SUPPORTED_MEDIAFILE};return i})},t.prototype.getPlayableAdBreaks=function(t){var e=this,i=this.RM[0];if(!i||t<i.publicAdBreak.scheduleTime)return[];var r=this.RM.filter(function(e){return t>=e.publicAdBreak.scheduleTime});return this.RM=this.RM.filter(function(t){return!r.includes(t)}),r.filter(function(t){return e.MM.shouldPlayAdBreak(t.publicAdBreak)})},t.prototype.mM=function(t){return[t.tag].concat(t.fallbackTags||[]).every(function(t){return t&&t.url&&Object.keys(l.AdTagType).some(function(e){return t.type===l.AdTagType[e]})})},t.prototype.reset=function(){this.PM=this.QM.filter(function(t){return(0,a.isPauseAdBreak)(t.publicAdBreak)}),this.NM=this.QM.filter(function(t){return!(0,a.isPauseAdBreak)(t.publicAdBreak)}).sort(m.adBreakPreloadComparator),this.RM=[],this.SM=0},t.prototype.nM=function(t){var e=r({},t);return e.position||(e.position=a.DEFAULT_AD_BREAK_POSITION),"number"!=typeof e.preloadOffset&&(e.preloadOffset=d.DEFAULT_PRELOAD_OFFSET),e},t.prototype.getPlayerContainerResolution=function(){return{width:this.VM.clientWidth,height:this.VM.clientHeight}},t}();e.AdBreakService=g;var k=.85,b=.15},56528:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.AdPlayerWrapperFactory=void 0;var r=i(63589),n=i(72756),o=function(){function t(){}return t.create=function(t,e,i,o){return e.isVpaid?t.requestReporter().then(function(t){return new n.VpaidAdPlayer(t,i,o)}):t.requestPlayer().then(function(t){return new r.VideoAdPlayer(t,o)})},t}();e.AdPlayerWrapperFactory=o},45980:function(t,e,i){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AdTranslator=void 0,e.getSupportedMediaFiles=d,e.isStreamingMediaFile=p,e.isProgressiveMediaFile=function(t){return!p(t)},e.isStaticImageNonLinearVariation=function(t){return Boolean(t.staticResource)&&o.MimeTypeHelper.isImage(t.mimeType)&&!h(t)},e.isVpaid=h,e.getAdDataForLinear=function(t){var e={};return t.mimeType&&(e.mimeType=t.mimeType),t.id&&(e.mediaFileId=t.id),t.deliveryType&&(e.delivery=t.deliveryType),t.codec&&(e.codec=t.codec),t.bitrate>0&&(e.bitrate=t.bitrate),t.minBitrate>0&&(e.minBitrate=t.minBitrate),t.maxBitrate>0&&(e.maxBitrate=t.maxBitrate),t.apiFramework&&(e.apiFramework=t.apiFramework),e},e.getAdDataForNonLinear=function(t){var e={};return t.minSuggestedDuration&&t.minSuggestedDuration!==c.NON_SKIPPABLE_IDENTIFIER&&(e.minSuggestedDuration=t.minSuggestedDuration),t.apiFramework&&(e.apiFramework=t.apiFramework),e};var n,o=i(85434),a=i(23068),s=i(58313),u=i(70850),c=i(6365);!function(t){t.Linear="linear",t.Companion="companion",t.NonLinear="nonlinear"}(n||(n={}));var l=function(){function t(){}return t.fromVastAd=function(t,e){var i=this.extractMainAds(t,e),r=this.extractCompanionAds(t);return r.length>0&&i.forEach(function(t){t.companionAds=r,t.publicAd.companionAds=r.map(function(t){return t.publicAd})}),i},t.extractMainAds=function(t,e){var i=this;return this.sortCreatives(t),this.addCachebustingPlaceholder(t),t.creatives.filter(function(t){return t.type!==n.Companion}).map(function(r){return i.translateVastCreativeToAd(r,t,e)}).filter(function(t){return Boolean(null==t?void 0:t.publicAd)})},t.sortCreatives=function(t){return t.creatives.sort(function(t,e){return Number(t.sequence||0)-Number(e.sequence||0)})},t.translateVastCreativeToAd=function(t,e,i){var r,o,a=t.type===n.Linear?this.mapToLinearAd(e,t,i):this.mapToOverlayAd(e,t);return a&&(e.id&&(a.publicAd.id=e.id),(null===(r=e.verifications)||void 0===r?void 0:r.length)>0&&(a.publicAd.id=a.publicAd.id||"adVerification-"+u.Util.generateUniqueId(),a.publicAd.verifications=e.verifications),(null===(o=e.extensions)||void 0===o?void 0:o.length)>0&&(a.publicAd.extensions=e.extensions),a.originalVastAd=e,a.originalVastCreative=t),a},t.extractCompanionAds=function(t){var e=this;return t.creatives.filter(function(t){return t.type===n.Companion}).flatMap(function(t){return e.mapToCompanionAds(t)})},t.mapToCompanionAds=function(t){return t.variations.map(function(t){return{publicAd:{width:Number(t.width),height:Number(t.height)},id:t.id,clickThroughUrl:t.companionClickThroughURLTemplate,type:t.type,htmlResource:t.htmlResource,iframeResource:t.iframeResource,staticResource:t.staticResource}})},t.mapToLinearAd=function(t,e,i){var r=d(e.mediaFiles);if(!r.length)return null;var n=(0,a.isNumber)(i.skippableAfter)?i.skippableAfter:e.skipDelay,o=null!=n&&n!==c.NON_SKIPPABLE_IDENTIFIER,s={publicAd:{duration:e.duration,skippable:o,isLinear:!0,clickThroughUrl:e.videoClickThroughURLTemplate,width:0,height:0,data:this.collectVastAdData(t,e),uiConfig:this.getUiConfig(i)},adParameters:e.adParameters,supportedMediaFiles:r,fallback:Boolean(t.isFallback)};return o&&(s.publicAd.skippableAfter=n),s},t.getUiConfig=function(t){var e={};return t.linearAdUiConfig?(e.message=t.linearAdUiConfig.message,e.skippableMessage=t.linearAdUiConfig.skippableMessage,e.untilSkippableMessage=t.linearAdUiConfig.untilSkippableMessage,null!=t.linearAdUiConfig.requestsUi&&(e.requestsUi=t.linearAdUiConfig.requestsUi),e):e},t.mapToOverlayAd=function(t,e){var i=e.variations.map(f);return i.length?{publicAd:{isLinear:!1,width:0,height:0,data:this.collectVastAdData(t,e)},type:"",supportedVariations:i}:null},t.collectVastAdData=function(t,e){var i,r,n,o,a={adTitle:t.title,adDescription:t.description,wrapperAdIds:t.wrapperAdIds};return Object.keys(e).length&&(a.creative=function(t){var e,i={};return t.id&&(i.id=t.id),t.adId&&(i.adId=t.adId),(null===(e=t.universalAdId)||void 0===e?void 0:e.value)&&t.universalAdId.idRegistry&&(i.universalAdId={value:t.universalAdId.value,idRegistry:t.universalAdId.idRegistry}),i}(e)),(null===(i=t.system)||void 0===i?void 0:i.value)&&(a.adSystem=t.system.version?{name:t.system.value,version:t.system.version}:{name:t.system.value}),(null===(r=t.advertiser)||void 0===r?void 0:r.name)&&(a.advertiser=v(t.advertiser,["name","id"])),(null===(n=t.survey)||void 0===n?void 0:n.uri)&&(a.survey=v(t.survey,["uri","type"])),(null===(o=t.pricing)||void 0===o?void 0:o.value)&&t.pricing.model&&t.pricing.currency&&(a.pricing={value:Number(t.pricing.value),model:t.pricing.model,currency:t.pricing.currency}),a},t.addCachebustingPlaceholder=function(t){t.creatives.forEach(function(t){var e=t.trackingEvents;e&&Object.keys(e).forEach(function(t){var i=e[t];i.forEach(function(t,e){t.includes("CACHEBUSTING")||(i[e]=s.URLHelper.appendQueryParametersToUrl(t,{"[CACHEBUSTING]":null}))})})})},t}();function d(t){var e=function(t){return t.filter(function(t){return t.deliveryType&&t.mimeType&&t.fileURL})}(t),i=document.createElement("video");return e.filter(function(t){return p(t)?function(t){return o.MimeTypeHelper.isDash(t.mimeType)||o.MimeTypeHelper.isHls(t.mimeType)||h(t)}(t):function(t,e){return function(t,e){return["maybe","probably"].includes(e.canPlayType(t.mimeType))}(t,e)||h(t)}(t,i)})}function p(t){return t.deliveryType===c.MediaFileDeliveryType.Streaming}function h(t){return t.apiFramework&&t.apiFramework.toLowerCase()===c.VastApiFramework.Vpaid}function f(t){return r(r({},t),{originalVastVariation:t,width:parseInt(t.width),height:parseInt(t.height),mimeType:t.type})}function v(t,e){var i={};return e.filter(function(e){return null!=t[e]}).forEach(function(e){return i[e]=t[e]}),i}e.AdTranslator=l},60814:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.splitArray=function(t,e){var i=t.filter(e),r=t.filter(function(t){return!i.includes(t)});return[i,r]}},27319:function(t,e,i){var r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var r,n=0,o=e.length;n<o;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.BitmovinModule=e.OverlayAdRemovalReason=void 0,e.getAdLoadingError=S;var a,s=i(4224),u=i(45202),c=i(3714),l=i(34841),d=i(65348),p=i(89927),h=i(88844),f=i(88052),v=i(62756),y=i(76713),A=i(45392),m=i(28412),g=i(28610),k=i(6365),b=i(60326),T=i(47091),M=i(6341),E=i(77800),P=i(56528),V=i(88944),O=i(59409),C=i(76955);!function(t){t.Closed="closed",t.Failed="failed",t.Finished="finished",t.Unloaded="unloaded"}(a||(e.OverlayAdRemovalReason=a={}));var R=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.Ti=null,n.Wi=[],n.ji=!1,n.ki=!1,n.pi=Promise.resolve(),n.cj=function(){n.Wi.forEach(function(t){return t.complete()}),n.ej()},n.ej=function(){return n.pi.then(function(){return n.Xi?(n.pi=n.Xi.done().catch(function(t){}).finally(function(){return n.dj()}),n.Xi=null,n.pi):n.pi})},n.fj=function(){n.gj({code:T.VastErrorCode.GENERAL_LINEAR_ERROR}),n.ej()},n.si(i,e),n.Si=new E.AdBreakService(e,i,new b.VastClientWrapper(i.videoLoadTimeout,i.withCredentials,i.disableStorageApi),r),n.Vi=[],n.ai=!1,n.bi=!1,n.hi=!1,n.ii=!1,n.ei=-1/0,n.ri(),n.ni=Promise.resolve([]),n}return r(e,t),e.prototype.initialize=function(){},e.prototype.ri=function(){this.fi=this.player.getVideoElement().parentElement,"function"==typeof this.config.adContainer&&(this.gi=this.config.adContainer(),this.gi instanceof HTMLElement?this.hi=!0:this.player.onError(T.VastErrorCode.UNDEFINED_ERROR,"AdvertisingConfig.adContainer was defined but did not provide a valid HTMLElement.")),this.hi||(this.gi=d.DOMHelper.createTag("div",{class:u.Environment.idPrefix+"overlay-container"},{height:"100%",width:"100%",display:"none",border:"none",overflow:"hidden",position:"absolute",top:"0"}),this.fi.appendChild(this.gi))},e.prototype.si=function(t,e){var i,r=f.ModuleManager.get(v.ModuleName.AdvertisingOmSdk,!1);if(null===(i=t.trackers)||void 0===i?void 0:i.omSdk){if(!r)return void e.onWarning(s.WarningCode.MODULE_ADVERTISING_OM_SDK_MODULE_MISSING);try{this.qi=new r.BitmovinOpenMeasurementAdVerification(e.getVideoElement(),e.onWarning,t.trackers.omSdk)}catch(t){e.onWarning(s.WarningCode.MODULE_ADVERTISING_OM_SDK_INIT_FAILURE,t.message,t)}}},e.prototype.afterContent=function(){var t=this;return this.ti(1/0).then(function(){return t.Si.resetPlayedAdBreaks(0)})},e.prototype.beforeContent=function(){var t=this;return this.ni.then(function(){return t.ti(0)})},e.prototype.currentTime=function(){return this.Xi.currentTime},e.prototype.duration=function(){return this.Xi.duration},e.prototype.discardAdBreak=function(t){this.Si.discardAdBreak(t),this.Vi=this.Vi.filter(function(e){return e.publicAdBreak.id!==t}),this.oi&&this.oi.done()},e.prototype.getActiveAdBreak=function(){return this.Ti&&this.Ti.publicAdBreak},e.prototype.getActiveAd=function(){return this.Ui},e.prototype.isLinearAdActive=function(t){return t?Boolean(this.Zi&&!this.Xi.paused):Boolean(this.Zi)},e.prototype.list=function(){return o(o([],this.Vi,!0),this.Si.list(),!0).map(function(t){return t.publicAdBreak})},e.prototype.onResize=function(t,e,i){!(this.ci&&i!==this.ci.isFullscreen)||this.kj()||this.xi()||this.Wi.forEach(function(t){return t.setFullscreen(i)}),this.ci={width:t,height:e,isFullscreen:i},this.Xi&&(this.Xi.playerResolution=this.ci)},e.prototype.onContentPaused=function(){this.Nj(),this.vi()&&this.yi()},e.prototype.onPlay=function(){var t;this.Nj(),(0,y.isPauseAdBreak)(null===(t=this.Ti)||void 0===t?void 0:t.publicAdBreak)&&this.mj()},e.prototype.onSeek=function(t,e){var i=this;this.Ai(),this.Si.resetPlayedAdBreaks(e),this.ii=!0,this.Si.preloadAdBreaks(e).then(function(){var r=i.Vi.concat(i.Si.getPlayableAdBreaks(e)),n=r.map(function(t){return t.publicAdBreak}),o=i.config.strategy.shouldPlaySkippedAdBreaks(n,t,e);i.Vi=r.filter(function(t){return o.find(function(e){return e===t.publicAdBreak})})}).finally(function(){i.ii=!1})},e.prototype.onSeeked=function(){this.Bi()},e.prototype.onTimeChanged=function(t){var e=this;if(this.isLinearAdActive()){var i=this.Xi.duration;return(!isFinite(this.ei)||i!==this.ei&&i>0)&&(this.ei=i,this.Wi.forEach(function(t){return t.setDuration(e.ei)})),void this.Wi.forEach(function(e){return e.progress(t)})}this.ii||this.ti(t,!0).then(function(){}).catch(function(){})},e.prototype.ti=function(t,e){var i=this;return void 0===e&&(e=!1),this.Si.setCurrentScheduleTime(t),this.ii=!0,this.Si.preloadAdBreaks(t).then(function(){if(!e||!i.player.isContentPaused()){var r=i.Si.getPlayableAdBreaks(t);return i.Qj(r)}}).finally(function(){i.ii=!1})},e.prototype.onVolumeChanged=function(t){this.kj()||this.xi()||this.Wi.forEach(function(e){return e.volumeChanged(t)})},e.prototype.pause=function(){this.Xi&&!this.Xi.paused&&(this.Xi.pause(),this.Wi.forEach(function(t){return t.setPaused(!0)}))},e.prototype.reset=function(){var t,e,i=this;this.Nj(),this.ji=!1,this.bi=this.ai,this.Vi=[],this.Si.reset(),this.ni=Promise.resolve([]),this.mj(a.Unloaded),this.Wi.forEach(function(t){return t.dispose()}),this.Wi=[];var r=null!==(e=null===(t=this.Xi)||void 0===t?void 0:t.reset())&&void 0!==e?e:Promise.resolve();return this.Zi=!1,this.Ui=null,this.Ti=null,this.mi=void 0,this.ei=-1/0,r.then(function(){i.Xi=null})},e.prototype.resume=function(){var t=this;this.Xi&&this.Xi.paused&&this.Xi.play().then(function(){return t.Wi.forEach(function(t){return t.setPaused(!1)})})},e.prototype.schedule=function(t){var e=this;return t.discardAfterPlayback=!1!==t.discardAfterPlayback,this.ni=this.Si.schedule(t),this.ni.then(function(t){return t.some(function(t){return(0,y.isPauseAdBreak)(t.publicAdBreak)})&&e.vi()&&e.yi(),t.map(function(t){return t.publicAdBreak})})},e.prototype.skip=function(){var t;return this.jj()&&this.mj(a.Closed),this.isLinearAdActive()&&(null===(t=this.Xi)||void 0===t?void 0:t.skippable)?(this.Xi.skip(),this.ui()):Promise.resolve()},e.prototype.ui=function(){return this.Wi.forEach(function(t){return t.skip()}),this.ej()},e.prototype.vi=function(){return this.wi()&&!this.player.isContentSeeking()},e.prototype.wi=function(){return this.player.isContentPaused()&&!this.Ti&&!this.isLinearAdActive()&&!this.Yi},e.prototype.xi=function(){var t;return Boolean(this.Ui&&!this.Ui.isLinear&&(0,y.isPauseAdBreak)(null===(t=this.Ti)||void 0===t?void 0:t.publicAdBreak))},e.prototype.yi=function(){this.ki||this.ji||(this.ki=!0,this.zi())},e.prototype.zi=function(){var t=this;this.Mj(),this.li=window.setTimeout(function(){t.li=void 0,t.player.isContentSeeking()||(t.ki=!1,t.vi()&&t.Oj().catch(function(){}))},(0,p.toMilliSeconds)(k.DEFAULT_PAUSE_AD_ACTIVATION_DELAY))},e.prototype.Ai=function(){this.ki&&this.Mj()},e.prototype.Bi=function(){this.ki&&!this.player.isContentSeeking()&&(this.vi()?this.zi():this.Nj())},e.prototype.Mj=function(){(0,h.clearTimeoutIfDefined)(this.li),this.li=void 0},e.prototype.Nj=function(){this.ki=!1,this.Mj()},e.prototype.Oj=function(){var t=this;if(this.ji||!this.wi())return Promise.resolve();this.ji=!0;for(var e=Promise.resolve(!0),i=function(i){e=e.then(function(e){return!!(e&&t.ji&&t.wi())&&t.Pj(i)})},r=0,n=this.Si.getPauseAdBreaks();r<n.length;r++)i(n[r]);return e.then(function(){}).finally(function(){return t.ji=!1})},e.prototype.Pj=function(t){var e=this;return this.Si.loadPauseAdBreak(t).then(function(i){var r,n;if(!e.ji||!e.wi())return null===(r=null==i?void 0:i.ads)||void 0===r||r.forEach(function(t){return C.VastAdTracker.trackNotUsed(t)}),!1;if(!(null==i?void 0:i.ads))return!0;var o=(0,E.preprocessAdBreak)(i,function(t){return e.Rj(t)},{technology:e.config.preferredTechnology,resolution:e.Si.getPlayerContainerResolution(),nonLinearTargetResolution:e.Si.getPlayerContainerResolution(),allowScaledNonLinearAds:!0});return e.config.strategy.shouldPlayAdBreak(o.publicAdBreak)?e.hj(o).then(function(i){return i!==M.OverlayAdDisplayStatus.Cancelled&&e.Si.discardPauseAdBreakIfNotReplayable(t),void 0===i||i===M.OverlayAdDisplayStatus.Failed}):(null===(n=o.ads)||void 0===n||n.forEach(function(t){return C.VastAdTracker.trackNotUsed(t)}),e.Si.discardPauseAdBreakIfNotReplayable(t),!0)})},e.prototype.Qj=function(t){var e=this;this.Vi=this.Vi.concat(t);var i=this.Vi.shift();if(!i)return Promise.resolve();var r=(0,E.preprocessAdBreak)(i,function(t){return e.Rj(t)},{technology:this.config.preferredTechnology,resolution:this.Si.getPlayerContainerResolution()});return this.Sj(r).then(function(t){return t?e.Qj([]):void 0})},e.prototype.Rj=function(t){var e=this.player.selectMediaFile(t),i=t.map(function(t){return n({},t)});return(this.config.onSelectAdQuality?this.config.onSelectAdQuality(e,i):null)||e},e.prototype.Sj=function(t){var e=this;return(0,A.pingVmapTrackingUrls)(t.trackingEvents,g.VmapTrackingEventType.BreakStart),t.ads&&0!==t.ads.length?(this.mj(),this.Ti=t,this.Tj(t).then(function(){return e.hj(t)}).then(function(e){return e!==M.OverlayAdDisplayStatus.Cancelled&&((0,A.pingVmapTrackingUrls)(t.trackingEvents,g.VmapTrackingEventType.BreakEnd),!0)}).finally(function(){e.Ti===t&&(e.Ti=null)})):((0,A.pingVmapTrackingUrls)(t.trackingEvents,g.VmapTrackingEventType.BreakEnd),Promise.resolve(!0))},e.prototype.Tj=function(t){var e=this,i=function(t){return t.filter(_)}(t.ads);return 0===i.length?Promise.resolve():this.player.requestAdPlayback(t.publicAdBreak).then(function(t){e.oi||(e.oi=t);var r=(0,V.splitAdsBySequence)(i,e.config.freewheelVastFallbackHandling),n=Promise.resolve();r.mainAds.forEach(function(i){n=n.then(function(){return e.Wj(i,t,r.getBackupAds(i))})});var o=Boolean(e.Vi.length>0&&e.Vi[0].ads.find(function(t){return t.publicAd.isLinear}));return n.then(function(){return t.done(!o)})})},e.prototype.Uj=function(t){var e=this,i={width:this.fi.clientWidth,height:this.fi.clientHeight,isFullscreen:this.ci&&this.ci.isFullscreen};return this.ai=!0,this.Xi.load(t,i).then(function(){return e.bj(t.publicAd)}).catch(function(i){return e.bi||e.gj(S(t,i)),e.ej().finally(function(){return Promise.reject(i)})}).finally(function(){e.ai=!1,e.bi=!1})},e.prototype.Vj=function(t,e){var i=this,r=new l.Deferred;return this.di=r,P.AdPlayerWrapperFactory.create(e,t,this.gi,this.config.videoLoadTimeout).then(function(e){var r,n;if(i.Xi=e,i.Xj(t),i.Wi.push(new C.VastAdTracker(t,i.player)),i.qi){var o=null===(n=null===(r=i.Ti)||void 0===r?void 0:r.publicAdBreak)||void 0===n?void 0:n.scheduleTime,a=f.ModuleManager.get(v.ModuleName.AdvertisingOmSdk).OmSdkAdTracker;i.Wi.push(new a(t,i.player,i.qi,o))}return i.Wi=i.Wi.filter(function(t){return t.setupWasSuccessful()}),t.publicAd.clickThroughUrlOpened=i.Yj(t),i.Uj(t)}).then(function(){return r.promise})},e.prototype.Wj=function(t,e,i){var r=this;return this.Vj(t,e).catch(function(){var n,o=i.shift();if(o)return function(t,e,i){var r=null==t?void 0:t.ads;if(r){var n=r.indexOf(e.publicAd);n>=0&&(r[n]=i.publicAd)}}(null===(n=r.Ti)||void 0===n?void 0:n.publicAdBreak,t,o),r.Wj(o,e,i)})},e.prototype.Xj=function(t){var e=this;this.Xi.on(c.PlayerEvent.PlaybackFinished,this.cj),this.Xi.on(c.PlayerEvent.Error,function(){e.bi=e.ai,e.aj().then(e.ej)}),this.Xi.on(c.PlayerEvent.AdSkipped,function(){return e.ui()}),this.Xi.on(c.PlayerEvent.AdClicked,this.Yj(t)),this.Xi.on(c.PlayerEvent.AdInteraction,function(t){return e.Zj(t,c.AdInteractionType.Vpaid)})},e.prototype.Yj=function(t){var e=this;return function(){e.Wi.forEach(function(t){return t.click()}),e.player.adClicked(t.publicAd.clickThroughUrl)}},e.prototype.Zj=function(t,e){var i=t[0][0];this.player.adInteraction(e,i)},e.prototype.aj=function(){return this.Zi=!1,this.gj({code:T.VastErrorCode.GENERAL_LINEAR_ERROR}),Promise.resolve()},e.prototype.bj=function(t){this.Xi.on(c.PlayerEvent.Error,this.fj),this.Wi.forEach(function(t){return t.trackImpression()}),this.Zi=!0,this.Ui=t},e.prototype.dj=function(){this.Zi=!1,this.Ui=null,this.ei=-1/0,this.Wi.forEach(function(t){return t.dispose()}),this.Wi=[],this.di&&(this.di.resolve(),this.di=null)},e.prototype.gj=function(t,e){void 0===e&&(e=this.getActiveAdBreak()),this.player.onError(t.code,t.message,e),T.VastErrorCode[t.code]&&this.Wi.forEach(function(e){return e.errorWithCode(String(t.code))})},e.prototype.hj=function(t){var e=this,i=t.ads.filter(function(t){return!t.publicAd.isLinear});if(0===i.length)return Promise.resolve(void 0);this.mj();var r=this.ij(i[0],t);if(!(0,y.isPauseAdBreak)(t.publicAdBreak))return r.then(function(t){return t.status});for(var n=function(i){r=r.then(function(r){return r.status!==M.OverlayAdDisplayStatus.Failed?r:e.ji&&e.wi()?e.ij(i,t):(C.VastAdTracker.trackNotUsed(i),{status:M.OverlayAdDisplayStatus.Cancelled})})},o=0,a=i.slice(1);o<a.length;o++)n(a[o]);return r.then(function(t){return t.status})},e.prototype.ij=function(t,e){var i=this,r=O.OverlayAdManagerFactory.create(t,this.gi,this.hi,this.config.videoLoadTimeout);this.Yi=r,this.Ti=e,this.Wi.push(new C.VastAdTracker(t,this.player)),t.publicAd.clickThroughUrlOpened=function(){i.Wi.forEach(function(t){return t.click()}),i.player.adClicked(t.publicAd.clickThroughUrl)},this.Yi.on(c.PlayerEvent.AdClicked,this.Yj(t)),this.Yi.on(c.PlayerEvent.Error,function(t){i.Yi===r&&i.lj(e.publicAdBreak,t)});var n={width:this.fi.clientWidth,height:this.fi.clientHeight,isFullscreen:this.ci&&this.ci.isFullscreen};return r.display(t,n,(0,y.isPauseAdBreak)(e.publicAdBreak)).catch(function(){return{status:M.OverlayAdDisplayStatus.Failed,errorCode:T.VastErrorCode.GENERAL_NONLINEARADS_ERROR}}).then(function(n){return n.status===M.OverlayAdDisplayStatus.Cancelled||i.Yi!==r?(C.VastAdTracker.trackNotUsed(t),{status:M.OverlayAdDisplayStatus.Cancelled}):n.status===M.OverlayAdDisplayStatus.Failed?(i.gj({code:n.errorCode},e.publicAdBreak),i.mj(a.Failed),n):(i.Ui=t.publicAd,i.Wi.forEach(function(t){return t.trackImpression()}),i.mi=Date.now(),(0,y.isPauseAdBreak)(e.publicAdBreak)?i.player.nonLinearAdStarted(t.publicAd,e.publicAdBreak.position):i.player.overlayAdStarted(t.publicAd),n)})},e.prototype.jj=function(){var t=this.getActiveAd();return!!t&&!t.isLinear},e.prototype.kj=function(){return!!this.Yi&&!this.Ui},e.prototype.lj=function(t,e){void 0===e&&(e=T.VastErrorCode.GENERAL_NONLINEARADS_ERROR),this.gj({code:e},t),this.mj(a.Failed)},e.prototype.mj=function(t){var e;void 0===t&&(t=a.Finished);var i=this.getActiveAd(),r=this.jj();if(this.Yi||r){var n=this.Ti,o=this.Wi;if(this.Ti=null,null===(e=this.Yi)||void 0===e||e.stop(),this.Yi=null,this.Wi=[],r){this.Ui=null;var s=void 0!==this.mi?(0,p.toSeconds)(Date.now()-this.mi):0;this.mi=void 0,o.forEach(function(e){e.trackOverlayViewDuration(s),t===a.Closed?e.close():t===a.Finished&&e.complete()})}o.forEach(function(t){return t.dispose()}),r&&n&&(0,y.isPauseAdBreak)(n.publicAdBreak)&&(t===a.Closed?this.player.nonLinearAdSkipped(i,n.publicAdBreak.position):this.player.nonLinearAdFinished(i,n.publicAdBreak.position))}},e.prototype.dispose=function(){this.Nj(),this.ji=!1,this.mj(a.Unloaded),this.Wi.forEach(function(t){return t.dispose()}),this.Wi=[],this.ni=null,this.Ti=null,this.Ui=null,this.Vi=[],this.fi.removeChild(this.gi),this.gi=null},e.prototype.getModuleInfo=function(){return{name:e.MODULE_NAME,version:e.MODULE_VERSION}},e.bitmovinMarker=function(){},e.MODULE_NAME="advertising-bitmovin",e.MODULE_VERSION=u.Environment.VERSION_NUMBER,e}(m.AdvertisingModule);function S(t,e){return(null==e?void 0:e.code)?e:t.publicAd.isLinear?{code:T.VastErrorCode.MEDIAFILE_URI_TIMEOUT}:{code:T.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE}}function _(t){return t.publicAd.isLinear}e.BitmovinModule=R},92996:function(t,e){var i;Object.defineProperty(e,"__esModule",{value:!0}),e.BitmovinModuleErrorCode=void 0,i||(e.BitmovinModuleErrorCode=i={})},64092:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.isInternalLinearAd=function(t){return(0,r.isObject)(t)&&Boolean(t.supportedMediaFiles)},e.isInternalOverlayAd=function(t){return(0,r.isObject)(t)&&Boolean(t.supportedVariations)};var r=i(94685)},88944:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.splitAdsBySequence=function(t,e){return e?function(t){var e=function(t){var e={};return t.forEach(function(t){var i=function(t){return Number(t.originalVastAd&&(t.originalVastAd.sequence||t.originalVastAd.fallbackAdSequence))||1/0}(t);!function(t,e,i){i[t]?i[t].fallback.push(e):i[t]={main:e,fallback:[]}}(i,t,e)}),e}(t);return{mainAds:Object.keys(e).sort(n).map(function(t){return e[t].main}),getBackupAds:function(t){var i=Object.values(e).find(function(e){return e.main===t});return null==i?[]:i.fallback}}}(t):function(t){var e=(0,r.splitArray)(t,function(t){return!t.fallback}),i=e[0],n=e[1];return{mainAds:i,getBackupAds:function(t){return n}}}(t)};var r=i(60814);function n(t,e){return(Number(t)||999)-(Number(e)||999)}},85320:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.selectLinearMediaFile=function(t,e){var i=function(t,e){return(0,n.getBestTech)(e,function(t){return t.reduce(function(t,e){return t[function(t){return o.MimeTypeHelper.isDash(t)?r.StreamType.Dash:o.MimeTypeHelper.isHls(t)?r.StreamType.Hls:r.StreamType.Progressive}(e.mimeType)]=e.fileURL,t},{})}(t)).streaming}(t,e);return i===r.StreamType.Dash||i===r.StreamType.Hls?function(t,e){return e.find(function(e){return t===r.StreamType.Dash?o.MimeTypeHelper.isDash(e.mimeType):t===r.StreamType.Hls&&o.MimeTypeHelper.isHls(e.mimeType)})}(i,t):null},e.selectNonLinearMediaFile=function(t,e,i,r){var n=t.filter(function(t){return t.width<=e.width&&t.height<=e.height||r&&t.scalable});return n.length?(0,a.findMediaFileByResolution)(i.width,i.height,n):null};var r=i(44468),n=i(47993),o=i(85434),a=i(65185)},17614:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.BitmovinModuleErrorCode=e.AdvertisingBitmovinModuleDefinition=void 0;var r=i(62756),n=i(27319),o=i(92996);Object.defineProperty(e,"BitmovinModuleErrorCode",{enumerable:!0,get:function(){return o.BitmovinModuleErrorCode}}),e.AdvertisingBitmovinModuleDefinition={name:r.ModuleName.Advertising,module:function(){return n.BitmovinModule},dependencies:[r.ModuleName.AdvertisingCore],exports:{BitmovinModuleErrorCode:o.BitmovinModuleErrorCode}},e.default=e.AdvertisingBitmovinModuleDefinition},59409:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayAdManagerFactory=void 0;var r=i(36396),n=i(10332),o=function(){function t(){}return t.create=function(t,e,i,o){return t.isVpaid?new n.VpaidOverlayAdManager(e,i,o):new r.OverlayAdManager(e,i,o)},t}();e.OverlayAdManagerFactory=o},58656:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.adBreakPreloadComparator=e.adBreakScheduleComparator=void 0;var r=i(6365);e.adBreakScheduleComparator=function(t,e){if(t.publicAdBreak.scheduleTime>e.publicAdBreak.scheduleTime)return 1;if(e.publicAdBreak.scheduleTime>t.publicAdBreak.scheduleTime)return-1;var i=t.orderingIndex,r=e.orderingIndex;return i>r?1:i<r?-1:0},e.adBreakPreloadComparator=function(t,e){var i,n,o=t.publicAdBreak.scheduleTime-(null!==(i=t.publicAdBreak.preloadOffset)&&void 0!==i?i:r.DEFAULT_PRELOAD_OFFSET)-(e.publicAdBreak.scheduleTime-(null!==(n=e.publicAdBreak.preloadOffset)&&void 0!==n?n:r.DEFAULT_PRELOAD_OFFSET));return 0!==o?o:t.orderingIndex-e.orderingIndex}},36396:function(t,e,i){var r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayAdManager=void 0,e.loadImage=u;var n=i(65348),o=i(7581),a=i(6341),s=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.loadTimeout=r,n}return r(e,t),e.prototype.display=function(t,e,i){var r=this;void 0===i&&(i=!1);var n=t.publicAd.mediaFileUrl;return t.staticResource&&n?new Promise(function(e){var s,c=function(){null==s||s(),s=void 0,r.N8=void 0},l=function(t){c(),r.stop(),e({status:a.OverlayAdDisplayStatus.Failed,errorCode:t})};r.N8=function(){c(),e({status:a.OverlayAdDisplayStatus.Cancelled})},s=u(n,r.loadTimeout,function(n){c();try{r.O8(t,n,i),e({status:a.OverlayAdDisplayStatus.Displayed})}catch(t){l(o.VastErrorCode.GENERAL_NONLINEARADS_ERROR)}},function(){return l(o.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)},function(){return l(o.VastErrorCode.INLINE_AD_DISPLAY_TIMEOUT)})}):Promise.resolve({status:a.OverlayAdDisplayStatus.Failed,errorCode:o.VastErrorCode.NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE})},e.prototype.O8=function(t,e,i){var r,n=this.P8(t,e,i);this.M8=n,n.onclick=null!==(r=t.publicAd.clickThroughUrlOpened)&&void 0!==r?r:null,this.adjustAdContainer(t.publicAd.width,t.publicAd.height,i),this.adContainer.appendChild(n)},e.prototype.P8=function(t,e,i){void 0===i&&(i=!1);var r=i?"100%":t.publicAd.width+"px",o=i?"100%":t.publicAd.height+"px",a=n.DOMHelper.createTag("a",{href:t.publicAd.clickThroughUrl,target:"_blank"},{width:r,height:o});return e.style.width=r,e.style.height=o,i&&(a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="center",e.style.objectFit="contain"),a.appendChild(e),a},e.prototype.on=function(){},e.prototype.stop=function(){var t,e;null===(t=this.N8)||void 0===t||t.call(this),this.adContainer.style.display="none",this.M8&&(null===(e=this.M8.parentNode)||void 0===e||e.removeChild(this.M8),this.M8=void 0)},e}(a.AbstractOverlayAdManager);function u(t,e,i,r,o){var a=n.DOMHelper.createTag("img"),s=!0,u=function(){s&&(c(),a.src="")},c=function(){s=!1,window.clearTimeout(p),a.removeEventListener("load",d),a.removeEventListener("error",l)},l=function(){c(),r()},d=function(){c(),a.naturalWidth?i(a):r()},p=window.setTimeout(function(){u(),o()},e);return a.addEventListener("load",d),a.addEventListener("error",l),a.src=t,a.complete&&d(),u}e.OverlayAdManager=s},76955:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VastAdTracker=void 0;var r=i(11417),n=i(49075),o=i(3714),a=i(95217),s=i(64092),u=/\[ADPLAYHEAD\]/gi,c=function(){function t(e,i){this.player=i,this.pM=[],this.oM=t.createVastTracker(e),this.AN=(0,s.isInternalOverlayAd)(e),this.CN(this.oM,i)}return t.createVastTracker=function(t){var e=(0,s.isInternalOverlayAd)(t)?t.selectedVastVariation:void 0;return new n.VASTTracker(null,t.originalVastAd,t.originalVastCreative,e)},t.prototype.setupWasSuccessful=function(){return null!=this.oM},t.prototype.setFullscreen=function(t){this.oM.setFullscreen(t)},t.prototype.volumeChanged=function(t){this.oM.setMuted(0===t)},t.prototype.setMuted=function(t){this.oM.setMuted(t)},t.prototype.setPaused=function(t){this.oM.setPaused(t)},t.prototype.skip=function(){this.BN(),this.oM.skip()},t.prototype.click=function(){this.oM.click()},t.prototype.complete=function(){this.BN(),this.AN||this.DN(),this.oM.complete()},t.prototype.close=function(){this.oM.close()},t.trackNotUsed=function(e){var i=t.createVastTracker(e).trackingEvents,r=null==i?void 0:i.notUsed;r&&0!==r.length&&y(r)},t.prototype.trackOverlayViewDuration=function(t){var e=this.oM.trackingEvents,i=null==e?void 0:e.overlayViewDuration;if(i&&0!==i.length){var r=function(t){var e=Math.max(0,Math.round(t*p)),i=d*p,r=l*p,n=Math.floor(e/r),o=Math.floor(e%r/i),a=Math.floor(e%i/p),s=e%p;return"".concat(v(n,h),":").concat(v(o,h),":")+"".concat(v(a,h),".").concat(v(s,f))}(t);y(i.map(function(t){return t.replace(u,r)}))}},t.prototype.progress=function(t){this.oM.setProgress(t)},t.prototype.loaded=function(){},t.prototype.started=function(){},t.prototype.setDuration=function(t){this.oM.setDuration(t)},t.prototype.trackImpression=function(){this.oM.trackImpression()},t.prototype.errorWithCode=function(t){this.oM.errorWithCode(t)},t.prototype.BN=function(){this.oM.removeAllListeners(o.AdQuartile.FIRST_QUARTILE),this.oM.removeAllListeners(o.AdQuartile.MIDPOINT),this.oM.removeAllListeners(o.AdQuartile.THIRD_QUARTILE)},t.prototype.CN=function(t,e){var i=this;t.on(a.AdTrackingEvent.FirstQuartile,function(){e.onQuartile(o.AdQuartile.FIRST_QUARTILE),i.pM.push(o.AdQuartile.FIRST_QUARTILE)}),t.on(a.AdTrackingEvent.Midpoint,function(){e.onQuartile(o.AdQuartile.MIDPOINT),i.pM.push(o.AdQuartile.MIDPOINT)}),t.on(a.AdTrackingEvent.ThirdQuartile,function(){e.onQuartile(o.AdQuartile.THIRD_QUARTILE),i.pM.push(o.AdQuartile.THIRD_QUARTILE)})},t.prototype.DN=function(){var t=this;[o.AdQuartile.FIRST_QUARTILE,o.AdQuartile.MIDPOINT,o.AdQuartile.THIRD_QUARTILE].forEach(function(e){t.pM.includes(e)||t.player.onQuartile(e)})},t.prototype.dispose=function(){this.BN()},t}();e.VastAdTracker=c;var l=3600,d=60,p=1e3,h=2,f=3;function v(t,e){for(var i=String(t);i.length<e;)i="0"+i;return i}function y(t){r.util.resolveURLTemplates(t).forEach(function(t){return(0,a.pingUrl)(t)})}},63589:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoAdPlayer=void 0;var r=i(3714),n=i(19483),o=i(88844),a=i(6365),s=function(){function t(t,e){this.adPlayer=t,this.loadTimeout=e,this.K7=[r.PlayerEvent.AdSkipped,r.PlayerEvent.AdClicked,r.PlayerEvent.AdInteraction],this.J7=new n.ArrayMap}return t.prototype.done=function(){var t=this;return this.adPlayer?this.adPlayer.done().then(function(){return t.adPlayer=null}):Promise.resolve()},t.prototype.load=function(t){var e=this,i=window.setTimeout(function(){return e.done()},this.loadTimeout);return this.I7=t,this.adPlayer.load(t.publicAd).finally(function(){return(0,o.clearTimeoutIfDefined)(i)})},t.prototype.on=function(t,e){this.K7.includes(t)||(this.J7.add(t,e),this.adPlayer.on(t,e))},t.prototype.pause=function(){this.adPlayer.pause()},t.prototype.play=function(){return this.adPlayer.play()},t.prototype.skip=function(){},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.adPlayer.currentTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paused",{get:function(){return this.adPlayer.paused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this.adPlayer.duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"muted",{get:function(){return this.adPlayer.muted},set:function(t){this.adPlayer.muted=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){return this.adPlayer.volume},set:function(t){this.adPlayer.volume=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playerResolution",{set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skippable",{get:function(){var t=this.I7.publicAd.skippableAfter!==a.NON_SKIPPABLE_IDENTIFIER,e=this.I7.publicAd.skippableAfter<=this.currentTime;return t&&e},enumerable:!1,configurable:!0}),t.prototype.reset=function(){return Promise.resolve()},t}();e.VideoAdPlayer=s},72756:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidAdPlayer=void 0;var r=i(3714),n=i(34841),o=i(88844),a=i(25534),s=i(61411),u=i(41680),c=function(){function t(t,e,i){var s=this;this.P7=new Map,this.i7=function(){s.done().catch(function(){}),s.W7.reject()},this.j7=function(){(0,o.clearTimeoutIfDefined)(s.Y7),s.Y7=void 0,(0,o.clearTimeoutIfDefined)(s.a7),s.N7.style.display="block",s.Q7.videoElement.style.setProperty("display","block","important"),s.a7=window.setTimeout(s.l7,s.Z7),s.M7.startAd()},this.l7=function(){s.M7.stopAd(),s.k7(),s.W7.reject()},this.m7=function(){(0,o.clearTimeoutIfDefined)(s.a7),s.a7=void 0,s.T7=!0,s.W7.resolve(),s.Q7.started(s.L7.publicAd)},this.n7=function(){},this.o7=function(t){s.W7.reject(t),s.reset()},this.p7=function(){return s.T7=!1,s.V7&&(s.V7.reject(),s.V7=null),s.Q7.paused(s.currentTime),s.M7&&s.duration>0&&s.M7.getAdLinear()&&0===s.M7.getAdRemainingTime()?s.done():Promise.resolve()},this.q7=function(){s.V7&&(s.V7.resolve(),s.V7=null),s.T7||(s.T7=!0,s.Q7.resumed(s.currentTime))},this.r7=function(){s.h7=!1,s.Q7.skipped(),s.reset()},this.C8=function(t){var e=t[0],i=e[0],r=e[2],n=i||s.L7.publicAd.clickThroughUrl;r&&null!=n&&window.open(n)},this.D8=function(){s.duration<=0&&!isFinite(s.X7)&&(s.X7=4*s.currentTime)},this.E8=function(){if(s.M7){var t=s.M7.getAdRemainingTime();if(-1!==t&&-2!==t){var e=s.M7.getAdDuration()-t;if(isFinite(e)&&e>=0&&e!==s.S7){if(s.S7=e,!s.T7)return;s.Q7.timeupdate(s.S7)}}}},this.I8=function(){s.H8(),s.k7(),s.d7.resolve()},this.J8=function(){s.e7=!0,(0,o.clearTimeoutIfDefined)(s.b7),s.a7=void 0,s.d7.resolve()},this.done=function(){return(0,o.clearIntervalIfDefined)(s.U7),s.U7=void 0,s.K8().then(function(){return s.d7.promise}).then(function(){return s.c7=[],s.H8(),s.L8(),s.Q7.done()}).then(function(){s.h7&&s.Q7.skipped()})},this.N7=e,this.Q7=t,this.P7=new Map,this.S7=-1/0,this.T7=!1,this.W7=new n.Deferred,this.X7=-1/0,this.Z7=i,this.c7=[],this.d7=new n.Deferred,this.e7=!1,this.f7=new u.VpaidEventHandler,this.P7.set(r.PlayerEvent.PlaybackFinished,a.VpaidEvent.AdStopped),this.P7.set(r.PlayerEvent.Error,a.VpaidEvent.AdError),this.P7.set(r.PlayerEvent.AdClicked,a.VpaidEvent.AdClickThru),this.P7.set(r.PlayerEvent.AdSkipped,a.VpaidEvent.AdSkipped),this.P7.set(r.PlayerEvent.AdInteraction,a.VpaidEvent.AdInteraction),this.G8()}return t.prototype.load=function(t,e){var i=this,r=this.Q7.videoElement;return this.L7=t,this.O7=e,this.g7={autoplay:r.autoplay,crossOrigin:r.crossOrigin,preload:r.preload,style:r.getAttribute("style")},s.VpaidContextFactory.createVpaidContext(this.L7.publicAd.mediaFileUrl,this.N7,this.Z7).then(function(e){var r,n=i.O7.isFullscreen?a.VpaidViewMode.Fullscreen:a.VpaidViewMode.Normal;(0,o.clearTimeoutIfDefined)(i.Y7),i.Y7=window.setTimeout(i.i7,i.Z7),i.M7=e.api,i.f7.attach(i.M7),i.U7=window.setInterval(i.E8,250),i.M7.initAd(i.O7.width,i.O7.height,n,1e5,{AdParameters:t.adParameters},{videoSlotCanAutoPlay:!0,videoSlot:i.Q7.videoElement,slot:null===(r=e.container.contentDocument)||void 0===r?void 0:r.body})}).catch(function(){return i.done().then(function(){i.W7.reject()})}),this.W7.promise.catch(function(t){return i.d7.resolve(),Promise.reject(t)})},t.prototype.k7=function(){this.c7.forEach(function(t){return t()})},t.prototype.F8=function(t,e){this.f7.on(t,e)},t.prototype.on=function(t,e){t===r.PlayerEvent.Error&&this.c7.push(e),this.f7.on(this.P7.get(t)||t,e)},t.prototype.off=function(t,e){this.f7.off(t,e)},t.prototype.G8=function(){this.F8(a.VpaidEvent.AdLoaded,this.j7),this.f7.on(a.VpaidEvent.AdError,this.o7),this.f7.on(a.VpaidEvent.AdPaused,this.p7),this.f7.on(a.VpaidEvent.AdPlaying,this.q7),this.f7.on(a.VpaidEvent.AdStarted,this.m7),this.f7.on(a.VpaidEvent.AdStopped,this.J8),this.f7.on(a.VpaidEvent.AdSkipped,this.r7),this.f7.on(a.VpaidEvent.AdClickThru,this.C8),this.f7.on(a.VpaidEvent.AdImpression,this.n7),this.f7.on(a.VpaidEvent.AdVideoFirstQuartile,this.D8)},t.prototype.H8=function(){this.M7&&(this.f7.detach(this.M7),this.M7.done(),this.M7=null,this.g7&&(this.Q7.videoElement.preload=this.g7.preload,this.Q7.videoElement.autoplay=this.g7.autoplay,this.Q7.videoElement.crossOrigin=this.g7.crossOrigin,this.g7.style&&this.Q7.videoElement.setAttribute("style",this.g7.style),this.g7=null)),this.N7.style.setProperty("display","none")},t.prototype.K8=function(){return this.e7?Promise.resolve():((0,o.clearTimeoutIfDefined)(this.b7),this.a7=void 0,this.M7?(this.b7=window.setTimeout(this.I8,this.Z7),this.M7.stopAd()):this.d7.resolve(),this.d7.promise)},t.prototype.pause=function(){this.M7.pauseAd(),this.V7&&this.V7.reject()},t.prototype.play=function(){if(this.T7)return Promise.resolve();this.V7=this.V7||new n.Deferred;var t=this.V7.promise;return this.M7.resumeAd(),t},t.prototype.skip=function(){this.M7&&this.M7.skipAd(),this.h7=!0},Object.defineProperty(t.prototype,"currentTime",{get:function(){return isFinite(this.S7)?this.S7:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paused",{get:function(){return!this.T7},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){var t=this.M7.getAdDuration();return t<=0&&isFinite(this.X7)?this.X7:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"muted",{get:function(){return 0===this.M7.getAdVolume()},set:function(t){t&&this.M7.getAdVolume()>0?(this.R7=this.M7.getAdVolume(),this.M7.setAdVolume(0)):t||this.M7.setAdVolume(this.R7)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){return this.M7.getAdVolume()},set:function(t){this.M7.setAdVolume(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playerResolution",{set:function(t){t&&(this.O7=t),this.M7&&this.M7.resizeAd(this.O7.width,this.O7.height,this.O7.isFullscreen?a.VpaidViewMode.Fullscreen:a.VpaidViewMode.Normal)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skippable",{get:function(){return!!this.M7&&this.M7.getAdSkippableState()},enumerable:!1,configurable:!0}),t.prototype.reset=function(){var t=this;return this.M7?(this.f7.detach(this.M7),this.K8().then(function(){t.H8()})):(this.L8(),Promise.resolve())},t.prototype.L8=function(){(0,o.clearIntervalIfDefined)(this.U7),(0,o.clearTimeoutIfDefined)(this.Y7),(0,o.clearTimeoutIfDefined)(this.a7),(0,o.clearTimeoutIfDefined)(this.b7),this.U7=void 0,this.Y7=void 0,this.a7=void 0,this.b7=void 0},t}();e.VpaidAdPlayer=c},25534:function(t,e){var i,r;Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidViewMode=e.VpaidEvent=void 0,function(t){t.AdError="AdError",t.AdLoaded="AdLoaded",t.AdPaused="AdPaused",t.AdPlaying="AdPlaying",t.AdSkipped="AdSkipped",t.AdStarted="AdStarted",t.AdStopped="AdStopped",t.AdClickThru="AdClickThru",t.AdInteraction="AdInteraction",t.AdImpression="AdImpression",t.AdVideoStart="AdVideoStart",t.AdVideoMidpoint="AdVideoMidpoint",t.AdVideoComplete="AdVideoComplete",t.AdVideoThirdQuartile="AdVideoThirdQuartile",t.AdVideoFirstQuartile="AdVideoFirstQuartile"}(i||(e.VpaidEvent=i={})),function(t){t.Normal="normal",t.Thumbnail="thumbnail",t.Fullscreen="fullscreen"}(r||(e.VpaidViewMode=r={}))},61411:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidContextFactory=e.VpaidContextFactoryError=void 0;var r,n=i(34841),o=i(65348),a=i(88844);!function(t){t.Timeout="timeout",t.ScriptError="scripterror"}(r||(e.VpaidContextFactoryError=r={}));var s=function(){function t(){}return t.onContainerIframeLoaded=function(t,e,i,r,n){i.contentDocument.body.style.margin="0",i.contentDocument.body.style.padding="0",r.onerror=this.onVpaidScriptError.bind(this,t),r.onload=this.onVpaidScriptLoaded.bind(this,t,i,e,window.setTimeout(this.onScriptLoadTimeout.bind(this,t,r),n)),i.contentWindow.document.head.appendChild(r)},t.onScriptLoadTimeout=function(t,e){e.src="",e.parentElement.removeChild(e),t.reject(r.Timeout)},t.onVpaidScriptError=function(t){t.reject(r.ScriptError)},t.onVpaidScriptLoaded=function(t,e,i,r){var n=e.contentWindow.getVPAIDAd;if(n&&"function"==typeof n){var o=n();(0,a.clearTimeoutIfDefined)(r),o.done=i.removeChild.bind(i,e),t.resolve({api:o,container:e})}else t.reject()},t.createVpaidContext=function(t,e,i){var r=this,a=new n.Deferred,s=o.DOMHelper.createTag("iframe",{allow:"autoplay",src:"about:blank"},{width:"100%",height:"100%",border:"none"}),u=o.DOMHelper.createTag("script",{src:t});return s.onload=function(){return r.onContainerIframeLoaded(a,e,s,u,i)},e.appendChild(s),a.promise},t}();e.VpaidContextFactory=s},41680:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidEventHandler=void 0;var r=i(19483),n=i(25534),o=function(){function t(){this.Kfb=new Map,this.Jfb=new r.ArrayMap}return t.prototype.Lfb=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];(this.Jfb.get(t)||[]).slice().forEach(function(t){return t(e)})},t.prototype.attach=function(t){var e=this,i=function(i){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.Lfb(i,t)};t.subscribe(n,i),r.Kfb.set(i,n)},r=this;for(var o in n.VpaidEvent)i(o)},t.prototype.detach=function(t){for(var e in n.VpaidEvent)t.unsubscribe(this.Kfb.get(e),e)},t.isAlreadyRegistered=function(t,e,i){var r=t.get(e);return r&&r.includes(i)},t.prototype.on=function(e,i){t.isAlreadyRegistered(this.Jfb,e,i)||this.Jfb.add(e,i)},t.prototype.off=function(t,e){this.Jfb.deleteValue(t,e)},t.prototype.dispose=function(){this.Kfb.clear(),this.Jfb.clear()},t}();e.VpaidEventHandler=o},10332:function(t,e,i){var r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidOverlayAdManager=void 0;var n=i(3714),o=i(34841),a=i(88844),s=i(7581),u=i(6341),c=i(25534),l=i(61411),d=i(41680),p=function(t){function e(e,i,r){var l=t.call(this,e,i)||this;return l.c8=!1,l.f8=function(){l.g8(s.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)},l.h8=function(){l.c8||((0,a.clearTimeoutIfDefined)(l.V8),l.V8=void 0,(0,a.clearTimeoutIfDefined)(l.X8),l.X8=window.setTimeout(l.j8,l.W8),l.adjustAdContainer(l.Q8.publicAd.width,l.Q8.publicAd.height),l.R8.startAd())},l.j8=function(){l.g8(s.VastErrorCode.INLINE_AD_DISPLAY_TIMEOUT)},l.k8=function(){l.c8||(l.U8.hasSettled?l.i8():l.g8(s.VastErrorCode.GENERAL_VPAID_ERROR))},l.l8=function(){l.c8||((0,a.clearTimeoutIfDefined)(l.X8),l.X8=void 0,l.U8.resolve({status:u.OverlayAdDisplayStatus.Displayed}))},l.o8=function(){l.n8(),l.a8.resolve()},l.p8=function(){l.b8=!0,(0,a.clearTimeoutIfDefined)(l.Y8),l.Y8=void 0,l.a8.resolve()},l.W8=r,l.T8=new Map,l.U8=new o.Deferred,l.Z8=[],l.a8=new o.Deferred,l.b8=!1,l.d8=new d.VpaidEventHandler,l.T8.set(n.PlayerEvent.PlaybackFinished,c.VpaidEvent.AdStopped),l.T8.set(n.PlayerEvent.AdClicked,c.VpaidEvent.AdClickThru),l.m8(),l}return r(e,t),e.prototype.display=function(t,e){var i=this;return this.Q8=t,l.VpaidContextFactory.createVpaidContext(this.Q8.publicAd.mediaFileUrl,this.adContainer,this.W8).then(function(r){if(i.c8)r.api.done();else{if(!e)throw r.api.done(),new Error("Player resolution is required to initialize a VPAID ad");i.e8(r,t,e)}},function(){return i.g8(s.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)}).catch(function(){i.g8(s.VastErrorCode.GENERAL_VPAID_ERROR)}),this.U8.promise},e.prototype.e8=function(t,e,i){var r,n=i.isFullscreen?c.VpaidViewMode.Fullscreen:c.VpaidViewMode.Normal;(0,a.clearTimeoutIfDefined)(this.V8),this.V8=window.setTimeout(this.f8,this.W8),this.R8=t.api,this.S8=t.container;var o=null===(r=t.container.contentDocument)||void 0===r?void 0:r.body;o?(this.d8.attach(this.R8),this.R8.initAd(i.width,i.height,n,1e5,{AdParameters:e.adParameters},{slot:o})):this.g8(s.VastErrorCode.GENERAL_VPAID_ERROR)},e.prototype.g8=function(t){this.U8.hasSettled||(this.U8.resolve({status:u.OverlayAdDisplayStatus.Failed,errorCode:t}),this.stop())},e.prototype.i8=function(){this.Z8.forEach(function(t){return t(s.VastErrorCode.GENERAL_VPAID_ERROR)})},e.prototype.on=function(t,e){t!==n.PlayerEvent.Error?this.d8.on(this.T8.get(t)||t,e):this.Z8.push(e)},e.prototype.off=function(t,e){this.d8.off(t,e)},e.prototype.m8=function(){this.d8.on(c.VpaidEvent.AdLoaded,this.h8),this.d8.on(c.VpaidEvent.AdStarted,this.l8),this.d8.on(c.VpaidEvent.AdStopped,this.p8),this.d8.on(c.VpaidEvent.AdError,this.k8)},e.prototype.n8=function(){this.R8&&(this.d8.detach(this.R8),this.R8.done(),this.R8=null,this.S8=void 0)},e.prototype.q8=function(){this.b8||((0,a.clearTimeoutIfDefined)(this.Y8),this.R8?(this.Y8=window.setTimeout(this.o8,this.W8),this.R8.stopAd()):(this.Y8=void 0,this.a8.resolve()))},e.prototype.stop=function(){var t=this;this.c8||(this.c8=!0,this.r8(),this.adContainer.style.display="none",this.S8&&(this.S8.style.display="none"),this.Q8&&!this.U8.hasSettled&&this.U8.resolve({status:u.OverlayAdDisplayStatus.Cancelled}),this.a8.promise.then(function(){t.Z8=[],t.n8(),t.r8()}),this.q8())},e.prototype.r8=function(){(0,a.clearTimeoutIfDefined)(this.V8),(0,a.clearTimeoutIfDefined)(this.X8),(0,a.clearTimeoutIfDefined)(this.Y8),this.V8=void 0,this.X8=void 0,this.Y8=void 0},e}(u.AbstractOverlayAdManager);e.VpaidOverlayAdManager=p},49075:function(t,e,i){var r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.VASTTracker=void 0;var n=i(31472),o=i(77615),a=i(37007),s=i(57219),u=i(11417),c=function(t){function e(e,i,r,n){void 0===n&&(n=null);var a=t.call(this)||this;for(var s in a.ad=i,a.creative=r,a.variation=n,a.muted=!1,a.impressed=!1,a.skippable=!1,a.trackingEvents={},a._alreadyTriggeredQuartiles={},a.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","resume","pause","rewind","skip","closeLinear","close"],a.creative.trackingEvents){var u=a.creative.trackingEvents[s];a.trackingEvents[s]=u.slice(0)}return a.creative instanceof o.CreativeLinear?a._initLinearTracking():a._initVariationTracking(),e&&a.on("start",function(){e.lastSuccessfulAd=Date.now()}),a}return r(e,t),e.prototype._initLinearTracking=function(){this.linear=!0,this.skipDelay=this.creative.skipDelay,this.setDuration(this.creative.duration),this.clickThroughURLTemplate=this.creative.videoClickThroughURLTemplate,this.clickTrackingURLTemplates=this.creative.videoClickTrackingURLTemplates},e.prototype._initVariationTracking=function(){this.linear=!1,this.skipDelay=-1;var t=this.variation||this.creative&&this.creative.variations&&this.creative.variations[0]||null;if(t){for(var e in t.trackingEvents){var i=t.trackingEvents[e];this.trackingEvents[e]?this.trackingEvents[e]=this.trackingEvents[e].concat(i.slice(0)):this.trackingEvents[e]=i.slice(0)}t instanceof s.NonLinearAd?(this.clickThroughURLTemplate=t.nonlinearClickThroughURLTemplate,this.clickTrackingURLTemplates=t.nonlinearClickTrackingURLTemplates,this.setDuration(t.minSuggestedDuration)):t instanceof n.CompanionAd&&(this.clickThroughURLTemplate=t.companionClickThroughURLTemplate,this.clickTrackingURLTemplates=t.companionClickTrackingURLTemplates)}},e.prototype.setDuration=function(t){this.assetDuration=t,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100}},e.prototype.setProgress=function(t){var e=this,i=this.skipDelay||-1;if(-1===i||this.skippable||(i>t?this.emit("skip-countdown",i-t):(this.skippable=!0,this.emit("skip-countdown",0))),this.assetDuration>0){var r=[];if(t>0){var n=Math.round(t/this.assetDuration*100);for(var o in r.push("start"),r.push("progress-".concat(n,"%")),r.push("progress-".concat(Math.round(t))),this.quartiles)this.isQuartileReached(o,this.quartiles[o],t)&&(r.push(o),this._alreadyTriggeredQuartiles[o]=!0)}r.forEach(function(t){e.track(t,!0)}),t<this.progress&&this.track("rewind")}this.progress=t},e.prototype.isQuartileReached=function(t,e,i){var r=!1;return e<=i&&!this._alreadyTriggeredQuartiles[t]&&(r=!0),r},e.prototype.setMuted=function(t){this.muted!==t&&this.track(t?"mute":"unmute"),this.muted=t},e.prototype.setPaused=function(t){this.paused!==t&&this.track(t?"pause":"resume"),this.paused=t},e.prototype.setFullscreen=function(t){this.fullscreen!==t&&this.track(t?"fullscreen":"exitFullscreen"),this.fullscreen=t},e.prototype.setExpand=function(t){this.expanded!==t&&this.track(t?"expand":"collapse"),this.expanded=t},e.prototype.setSkipDelay=function(t){"number"==typeof t&&(this.skipDelay=t)},e.prototype.trackImpression=function(){this.impressed||(this.impressed=!0,this.trackURLs(this.ad.impressionURLTemplates),this.track("creativeView"))},e.prototype.errorWithCode=function(t){this.trackURLs(this.ad.errorURLTemplates,{ERRORCODE:t})},e.prototype.complete=function(){this.track("complete")},e.prototype.close=function(){this.track(this.linear?"closeLinear":"close")},e.prototype.skip=function(){this.track("skip"),this.trackingEvents=[]},e.prototype.click=function(t){void 0===t&&(t=null),this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates);var e=this.clickThroughURLTemplate||t;if(e){var i=this.linear?{CONTENTPLAYHEAD:this.progressFormatted()}:{},r=u.util.resolveURLTemplates([e],i)[0];this.emit("clickthrough",r)}},e.prototype.track=function(t,e){void 0===e&&(e=!1),"closeLinear"===t&&!this.trackingEvents[t]&&this.trackingEvents.close&&(t="close");var i=this.trackingEvents[t],r=this.emitAlwaysEvents.indexOf(t)>-1;i?(this.emit(t,""),this.trackURLs(i)):r&&this.emit(t,""),e&&(delete this.trackingEvents[t],r&&this.emitAlwaysEvents.splice(this.emitAlwaysEvents.indexOf(t),1))},e.prototype.trackURLs=function(t,e){void 0===e&&(e={}),this.linear&&(this.creative&&this.creative.mediaFiles&&this.creative.mediaFiles[0]&&this.creative.mediaFiles[0].fileURL&&(e.ASSETURI=this.creative.mediaFiles[0].fileURL),e.CONTENTPLAYHEAD=this.progressFormatted()),u.util.track(t,e)},e.prototype.progressFormatted=function(){var t=parseInt(this.progress),e=t/3600;e.length<2&&(e="0".concat(e));var i=t/60%60;i.length<2&&(i="0".concat(i));var r=t%60;r.length<2&&(r="0".concat(i));var n=parseInt(100*(this.progress-t));return"".concat(e,":").concat(i,":").concat(r,".").concat(n)},e}(a.EventEmitter);e.VASTTracker=c}},function(t){return function(){return t(17614)}()}])});
|
|
17
|
+
"use strict";!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["advertising-bitmovin"]=e():(t.bitmovin=t.bitmovin||{},t.bitmovin.player=t.bitmovin.player||{},t.bitmovin.player["advertising-bitmovin"]=e())}(self,function(){return(self.webpackChunkbitmovin_player=self.webpackChunkbitmovin_player||[]).push([[860],{6341:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractOverlayAdManager=e.OverlayAdDisplayStatus=void 0;var r,n=i(6365);!function(t){t.Displayed="displayed",t.Cancelled="cancelled",t.Failed="failed"}(r||(e.OverlayAdDisplayStatus=r={}));var o=function(){function t(t,e){this.adContainer=t,this.isCustomAdContainer=e}return t.prototype.adjustAdContainer=function(t,e,i){void 0===i&&(i=!1),this.adContainer.style.display="block",this.isCustomAdContainer||(this.adContainer.style.width=i?"100%":t+"px",this.adContainer.style.height=i?"100%":e+"px",this.adContainer.style.top=i?"0":"",this.adContainer.style.bottom=i?"":n.DEFAULT_OVERLAY_AD_BOTTOM_POSITION,this.adContainer.style.left="0",this.adContainer.style.right="0",this.adContainer.style.marginLeft=i?"":"auto",this.adContainer.style.marginRight=i?"":"auto")},t}();e.AbstractOverlayAdManager=o},77800:function(t,e,i){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)},n=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var r,n=0,o=e.length;n<o;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.AdBreakService=void 0,e.preprocessAdBreak=function(t,e,i){var n=[];return t.ads.forEach(function(t){var o,a;if((0,y.isInternalLinearAd)(t)){var s=(0,m.selectLinearMediaFile)(t.supportedMediaFiles,i.technology);if(!s){var u=t.supportedMediaFiles.filter(v.isProgressiveMediaFile);s=e(u)}n.push(function(t,e){return t.publicAd.data=r(r({},t.publicAd.data),(0,v.getAdDataForLinear)(e)),t.publicAd.mediaFileUrl=e.fileURL,t.publicAd.height=e.height,t.publicAd.width=e.width,t.isVpaid=(0,v.isVpaid)(e),null==t.publicAd.uiConfig.requestsUi&&(t.publicAd.uiConfig.requestsUi=!t.isVpaid),t}(t,s))}else if((0,y.isInternalOverlayAd)(t)){var l=(0,m.selectNonLinearMediaFile)(t.supportedVariations,i.resolution,null!==(o=i.nonLinearTargetResolution)&&void 0!==o?o:function(t){return{width:t.width*b,height:t.height*E}}(i.resolution),null!==(a=i.allowScaledNonLinearAds)&&void 0!==a&&a);l&&n.push(function(t,e){var i=r(r({},t),{selectedVastVariation:e.originalVastVariation,isVpaid:(0,v.isVpaid)(e),type:e.mimeType,htmlResource:e.htmlResource,iframeResource:e.iframeResource,staticResource:e.staticResource,adParameters:e.adParameters});return i.publicAd.data=r(r({},i.publicAd.data),(0,v.getAdDataForNonLinear)(e)),i.publicAd.mediaFileUrl=e.staticResource||e.htmlResource||e.iframeResource,i.publicAd.clickThroughUrl=e.nonlinearClickThroughURLTemplate,i.publicAd.height=e.height,i.publicAd.width=e.width,i}(t,l))}}),r(r({},t),{ads:n})};var o=i(49075),a=i(76713),s=i(45392),u=i(90176),l=i(50205),c=i(28610),d=i(23912),h=i(6365),p=i(47091),f=i(5838),v=i(45980),y=i(64092),A=i(88944),m=i(85320),g=i(58656),k=function(){function t(t,e,i,n){this.iL=t,this.lL=[],this.mL=[],this.nL=[],this.oL=[],this.pL=[],this.jL=e,this.kL=e.strategy,this.qL=0,this.rL=0,this.sL=i,this.tL=this.iL.getVideoElement().parentElement,this.uL=n,this.jL.placeholders=r(r({},u.adTagPlaceholderDefaults),this.jL.placeholders)}return t.prototype.schedule=function(t){var e=this.LL(t);return this.KL(e)?this.vL(e,this.wL()):Promise.reject("can not schedule invalid AdConfig")},t.prototype.vL=function(t,e){var i=this;return this.zL(t).then(function(r){return 0===r.length&&t.fallbackTags&&t.fallbackTags.length>0?(t.tag=t.fallbackTags.shift(),i.vL(t,e)):Promise.resolve(i.xL(r.map(function(r){return i.yL(t,r,e)})))})},t.prototype.wL=function(){return this.rL+=100,this.rL},t.prototype.xL=function(t){var e=this,i=[],r=[],n=[];t.forEach(function(t,o){var s=e.iL.parsePosition(t.publicAdBreak.position);t.orderingIndex=t.orderingIndex+o,(0,a.isPauseAdBreak)(t.publicAdBreak)?(t.publicAdBreak.scheduleTime=NaN,n.push(t),i.push(t)):isNaN(s)?e.mL.push(t):(t.publicAdBreak.scheduleTime=s,i.push(t),r.push(t))});var o=i.filter(function(t){return t.publicAdBreak.persistent});return this.lL=this.lL.concat(r),this.oL=this.oL.concat(o),this.nL=this.nL.concat(n),this.lL.sort(g.adBreakPreloadComparator),i},t.prototype.yL=function(t,e,i){var n=r({},e.publicAdBreakConfig),o=r(r({publicAdBreak:n,orderingIndex:i},e),{isScheduled:!1,discardAfterPlayback:t.discardAfterPlayback});return delete o.publicAdBreakConfig,o},t.prototype.zL=function(t){var e=this;return new Promise(function(i){if(t.tag.type===d.AdTagType.VMAP){var r=t.tag.url;t.tag.url=e.EL(t.tag.url),f.VmapExtractor.extractAdBreakConfigs(t,e.uL).then(function(n){var o=n.adBreakConfigs.filter(function(t){var i=e.iL.parsePosition(t.publicAdBreakConfig.position);return isNaN(i)||i>=e.qL});t.tag.url=r,e.iL.metadataLoaded(t,n.downloadTiming),i(o)}).catch(function(n){t.tag.url=r,n?e.iL.onError(n.code,null,t):e.iL.onError(p.VastErrorCode.UNDEFINED_ERROR,null,t),i([])})}else i([{publicAdBreakConfig:t}])})},t.prototype.list=function(){return this.lL.concat(this.pL)},t.prototype.discardAdBreak=function(t){var e=function(e){return e.publicAdBreak.id!==t};this.lL=this.lL.filter(e),this.pL=this.pL.filter(e)},t.prototype.setCurrentScheduleTime=function(t){this.qL=t},t.prototype.resetPlayedAdBreaks=function(t){this.list().forEach(function(e){e.publicAdBreak.scheduleTime>=t&&(e.loading=!1,e.isScheduled=!1)})},t.prototype.getPauseAdBreaks=function(){return this.nL.slice()},t.prototype.preloadAdBreaks=function(t){var e=this;this.mL.length>0&&this.xL(this.mL.splice(0,this.mL.length));var i=this.lL[0];if(!i||t<i.publicAdBreak.scheduleTime-i.publicAdBreak.preloadOffset)return Promise.resolve();var r=this.lL.filter(function(e){return t>=e.publicAdBreak.scheduleTime-e.publicAdBreak.preloadOffset&&!e.isScheduled&&!e.loading}).filter(function(t){var i=(0,l.shouldLoadAdBreak)(e.kL,t.publicAdBreak,e.iL.logger);return i||(t.discardAfterPlayback?e.discardAdBreak(t.publicAdBreak.id):t.isScheduled=!0),i});return Promise.all(r.map(function(t){return e.AL(t)})).then(function(){})},t.prototype.discardPauseAdBreakIfNotReplayable=function(t){t.discardAfterPlayback&&this.HL(t)},t.prototype.AL=function(t){var e=this;return t.loading=!0,this.BL(t).then(function(){t.discardAfterPlayback&&e.FL(t),t.isScheduled=!0,e.pL.push(t),e.pL.sort(g.adBreakScheduleComparator)},function(i){t.discardAfterPlayback&&e.FL(t),e.GL(t),e.DL(t,i)})},t.prototype.loadPauseAdBreak=function(t){var e=this;return t.loading?Promise.resolve(null):(delete t.ads,delete t.publicAdBreak.ads,(0,l.shouldLoadAdBreak)(this.kL,t.publicAdBreak,this.iL.logger)?(t.loading=!0,this.BL(t).then(function(){return t},function(i){return e.DL(t,i),e.discardPauseAdBreakIfNotReplayable(t),null}).finally(function(){return t.loading=!1})):(this.discardPauseAdBreakIfNotReplayable(t),Promise.resolve(null)))},t.prototype.BL=function(t){for(var e,i=this,r=this.CL(t,t.publicAdBreak.tag),n=function(e){r=r.catch(function(){return i.CL(t,e)})},o=0,a=null!==(e=t.publicAdBreak.fallbackTags)&&void 0!==e?e:[];o<a.length;o++)n(a[o]);return r},t.prototype.CL=function(t,e){var i=this,r=this.EL(e.url);return this.uL.downloadVastManifest(r).then(function(e){return i.iL.metadataLoaded(t.publicAdBreak,e.downloadTiming),i.JL(e.manifest,t.publicAdBreak).then(function(e){var r;t.ads=e;var o=e.filter(y.isInternalLinearAd),a=e.filter(function(t){return!(0,y.isInternalLinearAd)(t)}),s=(0,A.splitAdsBySequence)(o,null!==(r=i.jL.freewheelVastFallbackHandling)&&void 0!==r&&r).mainAds;t.publicAdBreak.ads=n(n([],s.map(function(t){return t.publicAd}),!0),a.map(function(t){return t.publicAd}),!0)})})},t.prototype.DL=function(t,e){this.iL.onError(e.code,void 0,t.publicAdBreak),(0,s.pingVmapTrackingUrls)(t.trackingEvents,c.VmapTrackingEventType.BreakStart),(0,s.pingVmapTrackingUrls)(t.trackingEvents,c.VmapTrackingEventType.Error),(0,s.pingVmapTrackingUrls)(t.trackingEvents,c.VmapTrackingEventType.BreakEnd)},t.prototype.EL=function(t){var e=this,i={playbackTime:this.qL,height:String(this.tL.clientHeight),width:String(this.tL.clientWidth),domain:encodeURIComponent(document.location.hostname),page:encodeURIComponent(document.location.href),referrer:encodeURIComponent(document.referrer),random:Math.floor(1e7+9e7*Math.random()).toString(),timestamp:String(Date.now())};return Object.keys(this.jL.placeholders).forEach(function(r){e.jL.placeholders[r].forEach(function(e){t=t.replace(e,i[r])})}),t},t.prototype.FL=function(t){var e=this.lL.indexOf(t);e>=0&&this.lL.splice(e,1)},t.prototype.GL=function(t){var e=this.pL.indexOf(t);e>=0&&this.pL.splice(e,1)},t.prototype.HL=function(t){var e=this.nL.indexOf(t);e>=0&&this.nL.splice(e,1)},t.prototype.IL=function(){return{id:"",adId:"",universalAdId:{idRegistry:"",value:""},trackingEvents:{complete:[],firstQuartile:[],midpoint:[],thirdQuartile:[]},apiFramework:null,sequence:null,type:"",adParameters:null,duration:-1,icons:[],mediaFiles:[],skipDelay:-1,videoClickThroughURLTemplate:"",videoClickTrackingURLTemplates:[],videoCustomClickURLTemplates:[]}},t.prototype.JL=function(t,e){var i,n=this;return this.sL.parseManifest(t,null!==(i=this.jL.freewheelVastFallbackHandling)&&void 0!==i&&i).then(function(t){var i=t.ads.flatMap(function(t){var i,s,u=v.AdTranslator.fromVastAd(t,e),l=(0,a.isPauseAdBreak)(e)?function(t){return t.filter(y.isInternalOverlayAd).map(function(t){return r(r({},t),{supportedVariations:t.supportedVariations.filter(v.isStaticImageNonLinearVariation)})}).filter(function(t){return t.supportedVariations.length>0})}(u):u;if(0===l.length){var c=null!==(s=null===(i=t.creatives)||void 0===i?void 0:i[0])&&void 0!==s?s:n.IL();new o.VASTTracker(void 0,t,c).errorWithCode(String(p.VastErrorCode.NO_SUPPORTED_MEDIAFILE))}return l});if(0===i.length)throw{code:p.VastErrorCode.NO_SUPPORTED_MEDIAFILE};return i})},t.prototype.getPlayableAdBreaks=function(t){var e=this,i=this.pL[0];if(!i||t<i.publicAdBreak.scheduleTime)return[];var r=this.pL.filter(function(e){return t>=e.publicAdBreak.scheduleTime});return this.pL=this.pL.filter(function(t){return!r.includes(t)}),r.filter(function(t){return(0,l.shouldPlayAdBreak)(e.kL,t.publicAdBreak,e.iL.logger)})},t.prototype.KL=function(t){return[t.tag].concat(t.fallbackTags||[]).every(function(t){return t&&t.url&&Object.keys(d.AdTagType).some(function(e){return t.type===d.AdTagType[e]})})},t.prototype.reset=function(){this.nL=this.oL.filter(function(t){return(0,a.isPauseAdBreak)(t.publicAdBreak)}),this.lL=this.oL.filter(function(t){return!(0,a.isPauseAdBreak)(t.publicAdBreak)}).sort(g.adBreakPreloadComparator),this.pL=[],this.qL=0},t.prototype.LL=function(t){var e=r({},t);return e.position||(e.position=a.DEFAULT_AD_BREAK_POSITION),"number"!=typeof e.preloadOffset&&(e.preloadOffset=h.DEFAULT_PRELOAD_OFFSET),e},t.prototype.getPlayerContainerResolution=function(){return{width:this.tL.clientWidth,height:this.tL.clientHeight}},t}();e.AdBreakService=k;var b=.85,E=.15},56528:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.AdPlayerWrapperFactory=void 0;var r=i(63589),n=i(72756),o=function(){function t(){}return t.create=function(t,e,i,o){return e.isVpaid?t.requestReporter().then(function(t){return new n.VpaidAdPlayer(t,i,o)}):t.requestPlayer().then(function(t){return new r.VideoAdPlayer(t,o)})},t}();e.AdPlayerWrapperFactory=o},45980:function(t,e,i){var r=this&&this.__assign||function(){return r=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},r.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AdTranslator=void 0,e.getSupportedMediaFiles=d,e.isStreamingMediaFile=h,e.isProgressiveMediaFile=function(t){return!h(t)},e.isStaticImageNonLinearVariation=function(t){return Boolean(t.staticResource)&&o.MimeTypeHelper.isImage(t.mimeType)&&!p(t)},e.isVpaid=p,e.getAdDataForLinear=function(t){var e={};return t.mimeType&&(e.mimeType=t.mimeType),t.id&&(e.mediaFileId=t.id),t.deliveryType&&(e.delivery=t.deliveryType),t.codec&&(e.codec=t.codec),t.bitrate>0&&(e.bitrate=t.bitrate),t.minBitrate>0&&(e.minBitrate=t.minBitrate),t.maxBitrate>0&&(e.maxBitrate=t.maxBitrate),t.apiFramework&&(e.apiFramework=t.apiFramework),e},e.getAdDataForNonLinear=function(t){var e={};return t.minSuggestedDuration&&t.minSuggestedDuration!==l.NON_SKIPPABLE_IDENTIFIER&&(e.minSuggestedDuration=t.minSuggestedDuration),t.apiFramework&&(e.apiFramework=t.apiFramework),e};var n,o=i(85434),a=i(23068),s=i(58313),u=i(70850),l=i(6365);!function(t){t.Linear="linear",t.Companion="companion",t.NonLinear="nonlinear"}(n||(n={}));var c=function(){function t(){}return t.fromVastAd=function(t,e){var i=this.extractMainAds(t,e),r=this.extractCompanionAds(t);return r.length>0&&i.forEach(function(t){t.companionAds=r,t.publicAd.companionAds=r.map(function(t){return t.publicAd})}),i},t.extractMainAds=function(t,e){var i=this;return this.sortCreatives(t),this.addCachebustingPlaceholder(t),t.creatives.filter(function(t){return t.type!==n.Companion}).map(function(r){return i.translateVastCreativeToAd(r,t,e)}).filter(function(t){return Boolean(null==t?void 0:t.publicAd)})},t.sortCreatives=function(t){return t.creatives.sort(function(t,e){return Number(t.sequence||0)-Number(e.sequence||0)})},t.translateVastCreativeToAd=function(t,e,i){var r,o,a=t.type===n.Linear?this.mapToLinearAd(e,t,i):this.mapToOverlayAd(e,t);return a&&(e.id&&(a.publicAd.id=e.id),(null===(r=e.verifications)||void 0===r?void 0:r.length)>0&&(a.publicAd.id=a.publicAd.id||"adVerification-"+u.Util.generateUniqueId(),a.publicAd.verifications=e.verifications),(null===(o=e.extensions)||void 0===o?void 0:o.length)>0&&(a.publicAd.extensions=e.extensions),a.originalVastAd=e,a.originalVastCreative=t),a},t.extractCompanionAds=function(t){var e=this;return t.creatives.filter(function(t){return t.type===n.Companion}).flatMap(function(t){return e.mapToCompanionAds(t)})},t.mapToCompanionAds=function(t){return t.variations.map(function(t){return{publicAd:{width:Number(t.width),height:Number(t.height)},id:t.id,clickThroughUrl:t.companionClickThroughURLTemplate,type:t.type,htmlResource:t.htmlResource,iframeResource:t.iframeResource,staticResource:t.staticResource}})},t.mapToLinearAd=function(t,e,i){var r=d(e.mediaFiles);if(!r.length)return null;var n=(0,a.isNumber)(i.skippableAfter)?i.skippableAfter:e.skipDelay,o=null!=n&&n!==l.NON_SKIPPABLE_IDENTIFIER,s={publicAd:{duration:e.duration,skippable:o,isLinear:!0,clickThroughUrl:e.videoClickThroughURLTemplate,width:0,height:0,data:this.collectVastAdData(t,e),uiConfig:this.getUiConfig(i)},adParameters:e.adParameters,supportedMediaFiles:r,fallback:Boolean(t.isFallback)};return o&&(s.publicAd.skippableAfter=n),s},t.getUiConfig=function(t){var e={};return t.linearAdUiConfig?(e.message=t.linearAdUiConfig.message,e.skippableMessage=t.linearAdUiConfig.skippableMessage,e.untilSkippableMessage=t.linearAdUiConfig.untilSkippableMessage,null!=t.linearAdUiConfig.requestsUi&&(e.requestsUi=t.linearAdUiConfig.requestsUi),e):e},t.mapToOverlayAd=function(t,e){var i=e.variations.map(f);return i.length?{publicAd:{isLinear:!1,width:0,height:0,data:this.collectVastAdData(t,e)},type:"",supportedVariations:i}:null},t.collectVastAdData=function(t,e){var i,r,n,o,a={adTitle:t.title,adDescription:t.description,wrapperAdIds:t.wrapperAdIds};return Object.keys(e).length&&(a.creative=function(t){var e,i={};return t.id&&(i.id=t.id),t.adId&&(i.adId=t.adId),(null===(e=t.universalAdId)||void 0===e?void 0:e.value)&&t.universalAdId.idRegistry&&(i.universalAdId={value:t.universalAdId.value,idRegistry:t.universalAdId.idRegistry}),i}(e)),(null===(i=t.system)||void 0===i?void 0:i.value)&&(a.adSystem=t.system.version?{name:t.system.value,version:t.system.version}:{name:t.system.value}),(null===(r=t.advertiser)||void 0===r?void 0:r.name)&&(a.advertiser=v(t.advertiser,["name","id"])),(null===(n=t.survey)||void 0===n?void 0:n.uri)&&(a.survey=v(t.survey,["uri","type"])),(null===(o=t.pricing)||void 0===o?void 0:o.value)&&t.pricing.model&&t.pricing.currency&&(a.pricing={value:Number(t.pricing.value),model:t.pricing.model,currency:t.pricing.currency}),a},t.addCachebustingPlaceholder=function(t){t.creatives.forEach(function(t){var e=t.trackingEvents;e&&Object.keys(e).forEach(function(t){var i=e[t];i.forEach(function(t,e){t.includes("CACHEBUSTING")||(i[e]=s.URLHelper.appendQueryParametersToUrl(t,{"[CACHEBUSTING]":null}))})})})},t}();function d(t){var e=function(t){return t.filter(function(t){return t.deliveryType&&t.mimeType&&t.fileURL})}(t),i=document.createElement("video");return e.filter(function(t){return h(t)?function(t){return o.MimeTypeHelper.isDash(t.mimeType)||o.MimeTypeHelper.isHls(t.mimeType)||p(t)}(t):function(t,e){return function(t,e){return["maybe","probably"].includes(e.canPlayType(t.mimeType))}(t,e)||p(t)}(t,i)})}function h(t){return t.deliveryType===l.MediaFileDeliveryType.Streaming}function p(t){return t.apiFramework&&t.apiFramework.toLowerCase()===l.VastApiFramework.Vpaid}function f(t){return r(r({},t),{originalVastVariation:t,width:parseInt(t.width),height:parseInt(t.height),mimeType:t.type})}function v(t,e){var i={};return e.filter(function(e){return null!=t[e]}).forEach(function(e){return i[e]=t[e]}),i}e.AdTranslator=c},60814:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.splitArray=function(t,e){var i=t.filter(e),r=t.filter(function(t){return!i.includes(t)});return[i,r]}},27319:function(t,e,i){var r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}(),n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},n.apply(this,arguments)},o=this&&this.__spreadArray||function(t,e,i){if(i||2===arguments.length)for(var r,n=0,o=e.length;n<o;n++)!r&&n in e||(r||(r=Array.prototype.slice.call(e,0,n)),r[n]=e[n]);return t.concat(r||Array.prototype.slice.call(e))};Object.defineProperty(e,"__esModule",{value:!0}),e.BitmovinModule=e.OverlayAdRemovalReason=void 0,e.getAdLoadingError=I;var a,s=i(4224),u=i(45202),l=i(3714),c=i(34841),d=i(65348),h=i(89927),p=i(88844),f=i(88052),v=i(62756),y=i(76713),A=i(45392),m=i(28412),g=i(50205),k=i(28610),b=i(6365),E=i(60326),L=i(47091),T=i(6341),P=i(77800),C=i(56528),O=i(88944),V=i(59409),R=i(76955);!function(t){t.Closed="closed",t.Failed="failed",t.Finished="finished",t.Unloaded="unloaded"}(a||(e.OverlayAdRemovalReason=a={}));var _=function(t){function e(e,i,r){var n=t.call(this,e,i,r)||this;return n.Xh=null,n.ah=[],n.nh=!1,n.oh=!1,n.Di=Promise.resolve(),n.gi=function(){n.ah.forEach(function(t){return t.complete()}),n.ii()},n.ii=function(){return n.Di.then(function(){return n.bh?(n.Di=n.bh.done().catch(function(t){n.player.logger&&n.player.logger.debug("Failed to finalize ad playback",t)}).finally(function(){return n.hi()}),n.bh=null,n.Di):n.Di})},n.ji=function(){n.ki({code:L.VastErrorCode.GENERAL_LINEAR_ERROR}),n.ii()},n.Gi(i,e),n.Wh=new P.AdBreakService(e,i,new E.VastClientWrapper(i.videoLoadTimeout,i.withCredentials,i.disableStorageApi),r),n.Zh=[],n.eh=!1,n.fh=!1,n.lh=!1,n.mh=!1,n.ih=-1/0,n.Fi(),n.rh=Promise.resolve([]),n}return r(e,t),e.prototype.initialize=function(){},e.prototype.Fi=function(){this.jh=this.player.getVideoElement().parentElement,"function"==typeof this.config.adContainer&&(this.kh=this.config.adContainer(),this.kh instanceof HTMLElement?this.lh=!0:this.player.onError(L.VastErrorCode.UNDEFINED_ERROR,"AdvertisingConfig.adContainer was defined but did not provide a valid HTMLElement.")),this.lh||(this.kh=d.DOMHelper.createTag("div",{class:u.Environment.idPrefix+"overlay-container"},{height:"100%",width:"100%",display:"none",border:"none",overflow:"hidden",position:"absolute",top:"0"}),this.jh.appendChild(this.kh))},e.prototype.Gi=function(t,e){var i,r=f.ModuleManager.get(v.ModuleName.AdvertisingOmSdk,!1);if(null===(i=t.trackers)||void 0===i?void 0:i.omSdk){if(!r)return void e.onWarning(s.WarningCode.MODULE_ADVERTISING_OM_SDK_MODULE_MISSING);try{this.Ei=new r.BitmovinOpenMeasurementAdVerification(e.getVideoElement(),e.onWarning,t.trackers.omSdk)}catch(t){e.onWarning(s.WarningCode.MODULE_ADVERTISING_OM_SDK_INIT_FAILURE,t.message,t)}}},e.prototype.afterContent=function(){var t=this;return this.Hi(1/0).then(function(){return t.Wh.resetPlayedAdBreaks(0)})},e.prototype.beforeContent=function(){var t=this;return this.rh.then(function(){return t.Hi(0)})},e.prototype.currentTime=function(){return this.bh.currentTime},e.prototype.duration=function(){return this.bh.duration},e.prototype.discardAdBreak=function(t){this.Wh.discardAdBreak(t),this.Zh=this.Zh.filter(function(e){return e.publicAdBreak.id!==t}),this.Ci&&this.Ci.done()},e.prototype.getActiveAdBreak=function(){return this.Xh&&this.Xh.publicAdBreak},e.prototype.getActiveAd=function(){return this.Yh},e.prototype.isLinearAdActive=function(t){return t?Boolean(this.dh&&!this.bh.paused):Boolean(this.dh)},e.prototype.list=function(){return o(o([],this.Zh,!0),this.Wh.list(),!0).map(function(t){return t.publicAdBreak})},e.prototype.onResize=function(t,e,i){!(this.gh&&i!==this.gh.isFullscreen)||this.oi()||this.Li()||this.ah.forEach(function(t){return t.setFullscreen(i)}),this.gh={width:t,height:e,isFullscreen:i},this.bh&&(this.bh.playerResolution=this.gh)},e.prototype.onContentPaused=function(){this.Ri(),this.Ji()&&this.Mi()},e.prototype.onPlay=function(){var t;this.Ri(),(0,y.isPauseAdBreak)(null===(t=this.Xh)||void 0===t?void 0:t.publicAdBreak)&&this.qi()},e.prototype.onSeek=function(t,e){var i=this;this.Oi(),this.Wh.resetPlayedAdBreaks(e),this.mh=!0,this.Wh.preloadAdBreaks(e).then(function(){var r=i.Zh.concat(i.Wh.getPlayableAdBreaks(e)),n=r.map(function(t){return t.publicAdBreak}),o=(0,g.shouldPlaySkippedAdBreaks)(i.config.strategy,n,t,e,i.player.logger);i.Zh=r.filter(function(t){return o.find(function(e){return e===t.publicAdBreak})})}).finally(function(){i.mh=!1})},e.prototype.onSeeked=function(){this.Pi()},e.prototype.onTimeChanged=function(t){var e=this;if(this.isLinearAdActive()){var i=this.bh.duration;return(!isFinite(this.ih)||i!==this.ih&&i>0)&&(this.ih=i,this.ah.forEach(function(t){return t.setDuration(e.ih)})),void this.ah.forEach(function(e){return e.progress(t)})}this.mh||this.Hi(t,!0).then(function(){}).catch(function(){})},e.prototype.Hi=function(t,e){var i=this;return void 0===e&&(e=!1),this.Wh.setCurrentScheduleTime(t),this.mh=!0,this.Wh.preloadAdBreaks(t).then(function(){if(!e||!i.player.isContentPaused()){var r=i.Wh.getPlayableAdBreaks(t);return i.Ui(r)}}).finally(function(){i.mh=!1})},e.prototype.onVolumeChanged=function(t){this.oi()||this.Li()||this.ah.forEach(function(e){return e.volumeChanged(t)})},e.prototype.pause=function(){this.bh&&!this.bh.paused&&(this.bh.pause(),this.ah.forEach(function(t){return t.setPaused(!0)}))},e.prototype.reset=function(){var t,e,i=this;this.Ri(),this.nh=!1,this.fh=this.eh,this.Zh=[],this.Wh.reset(),this.rh=Promise.resolve([]),this.qi(a.Unloaded),this.ah.forEach(function(t){return t.dispose()}),this.ah=[];var r=null!==(e=null===(t=this.bh)||void 0===t?void 0:t.reset())&&void 0!==e?e:Promise.resolve();return this.dh=!1,this.Yh=null,this.Xh=null,this.qh=void 0,this.ih=-1/0,r.then(function(){i.bh=null})},e.prototype.resume=function(){var t=this;this.bh&&this.bh.paused&&this.bh.play().then(function(){return t.ah.forEach(function(t){return t.setPaused(!1)})})},e.prototype.schedule=function(t){var e=this;return t.discardAfterPlayback=!1!==t.discardAfterPlayback,this.rh=this.Wh.schedule(t),this.rh.then(function(t){return t.some(function(t){return(0,y.isPauseAdBreak)(t.publicAdBreak)})&&e.Ji()&&e.Mi(),t.map(function(t){return t.publicAdBreak})})},e.prototype.skip=function(){var t;return this.ni()&&this.qi(a.Closed),this.isLinearAdActive()&&(null===(t=this.bh)||void 0===t?void 0:t.skippable)?(this.bh.skip(),this.Ii()):Promise.resolve()},e.prototype.Ii=function(){return this.ah.forEach(function(t){return t.skip()}),this.ii()},e.prototype.Ji=function(){return this.Ki()&&!this.player.isContentSeeking()},e.prototype.Ki=function(){return this.player.isContentPaused()&&!this.Xh&&!this.isLinearAdActive()&&!this.ch},e.prototype.Li=function(){var t;return Boolean(this.Yh&&!this.Yh.isLinear&&(0,y.isPauseAdBreak)(null===(t=this.Xh)||void 0===t?void 0:t.publicAdBreak))},e.prototype.Mi=function(){this.oh||this.nh||(this.oh=!0,this.Ni())},e.prototype.Ni=function(){var t=this;this.Qi(),this.ph=window.setTimeout(function(){t.ph=void 0,t.player.isContentSeeking()||(t.oh=!1,t.Ji()&&t.Si().catch(function(){}))},(0,h.toMilliSeconds)(b.DEFAULT_PAUSE_AD_ACTIVATION_DELAY))},e.prototype.Oi=function(){this.oh&&this.Qi()},e.prototype.Pi=function(){this.oh&&!this.player.isContentSeeking()&&(this.Ji()?this.Ni():this.Ri())},e.prototype.Qi=function(){(0,p.clearTimeoutIfDefined)(this.ph),this.ph=void 0},e.prototype.Ri=function(){this.oh=!1,this.Qi()},e.prototype.Si=function(){var t=this;if(this.nh||!this.Ki())return Promise.resolve();this.nh=!0;for(var e=Promise.resolve(!0),i=function(i){e=e.then(function(e){return!!(e&&t.nh&&t.Ki())&&t.Ti(i)})},r=0,n=this.Wh.getPauseAdBreaks();r<n.length;r++)i(n[r]);return e.then(function(){}).finally(function(){return t.nh=!1})},e.prototype.Ti=function(t){var e=this;return this.Wh.loadPauseAdBreak(t).then(function(i){var r,n;if(!e.nh||!e.Ki())return null===(r=null==i?void 0:i.ads)||void 0===r||r.forEach(function(t){return R.VastAdTracker.trackNotUsed(t)}),!1;if(!(null==i?void 0:i.ads))return!0;var o=(0,P.preprocessAdBreak)(i,function(t){return e.Vi(t)},{technology:e.config.preferredTechnology,resolution:e.Wh.getPlayerContainerResolution(),nonLinearTargetResolution:e.Wh.getPlayerContainerResolution(),allowScaledNonLinearAds:!0});return(0,g.shouldPlayAdBreak)(e.config.strategy,o.publicAdBreak,e.player.logger)?e.li(o).then(function(i){return i!==T.OverlayAdDisplayStatus.Cancelled&&e.Wh.discardPauseAdBreakIfNotReplayable(t),void 0===i||i===T.OverlayAdDisplayStatus.Failed}):(null===(n=o.ads)||void 0===n||n.forEach(function(t){return R.VastAdTracker.trackNotUsed(t)}),e.Wh.discardPauseAdBreakIfNotReplayable(t),!0)})},e.prototype.Ui=function(t){var e=this;this.Zh=this.Zh.concat(t);var i=this.Zh.shift();if(!i)return Promise.resolve();var r=(0,P.preprocessAdBreak)(i,function(t){return e.Vi(t)},{technology:this.config.preferredTechnology,resolution:this.Wh.getPlayerContainerResolution()});return this.Wi(r).then(function(t){return t?e.Ui([]):void 0})},e.prototype.Vi=function(t){var e=this.player.selectMediaFile(t),i=t.map(function(t){return n({},t)});return(this.config.onSelectAdQuality?this.config.onSelectAdQuality(e,i):null)||e},e.prototype.Wi=function(t){var e=this;return(0,A.pingVmapTrackingUrls)(t.trackingEvents,k.VmapTrackingEventType.BreakStart),t.ads&&0!==t.ads.length?(this.qi(),this.Xh=t,this.Xi(t).then(function(){return e.li(t)}).then(function(e){return e!==T.OverlayAdDisplayStatus.Cancelled&&((0,A.pingVmapTrackingUrls)(t.trackingEvents,k.VmapTrackingEventType.BreakEnd),!0)}).finally(function(){e.Xh===t&&(e.Xh=null)})):((0,A.pingVmapTrackingUrls)(t.trackingEvents,k.VmapTrackingEventType.BreakEnd),Promise.resolve(!0))},e.prototype.Xi=function(t){var e=this,i=function(t){return t.filter(D)}(t.ads);return 0===i.length?Promise.resolve():this.player.requestAdPlayback(t.publicAdBreak).then(function(t){e.Ci||(e.Ci=t);var r=(0,O.splitAdsBySequence)(i,e.config.freewheelVastFallbackHandling),n=Promise.resolve();r.mainAds.forEach(function(i){n=n.then(function(){return e.ai(i,t,r.getBackupAds(i))})});var o=Boolean(e.Zh.length>0&&e.Zh[0].ads.find(function(t){return t.publicAd.isLinear}));return n.then(function(){return t.done(!o)})})},e.prototype.Yi=function(t){var e=this,i={width:this.jh.clientWidth,height:this.jh.clientHeight,isFullscreen:this.gh&&this.gh.isFullscreen};return this.eh=!0,this.bh.load(t,i).then(function(){return e.fi(t.publicAd)}).catch(function(i){return e.fh||e.ki(I(t,i)),e.ii().finally(function(){return Promise.reject(i)})}).finally(function(){e.eh=!1,e.fh=!1})},e.prototype.Zi=function(t,e){var i=this,r=new c.Deferred;return this.hh=r,C.AdPlayerWrapperFactory.create(e,t,this.kh,this.config.videoLoadTimeout).then(function(e){var r,n;if(i.bh=e,i.bi(t),i.ah.push(new R.VastAdTracker(t,i.player)),i.Ei){var o=null===(n=null===(r=i.Xh)||void 0===r?void 0:r.publicAdBreak)||void 0===n?void 0:n.scheduleTime,a=f.ModuleManager.get(v.ModuleName.AdvertisingOmSdk).OmSdkAdTracker;i.ah.push(new a(t,i.player,i.Ei,o))}return i.ah=i.ah.filter(function(t){return t.setupWasSuccessful()}),t.publicAd.clickThroughUrlOpened=i.ci(t),i.Yi(t)}).then(function(){return r.promise})},e.prototype.ai=function(t,e,i){var r=this;return this.Zi(t,e).catch(function(){var n,o=i.shift();if(o)return function(t,e,i){var r=null==t?void 0:t.ads;if(r){var n=r.indexOf(e.publicAd);n>=0&&(r[n]=i.publicAd)}}(null===(n=r.Xh)||void 0===n?void 0:n.publicAdBreak,t,o),r.ai(o,e,i)})},e.prototype.bi=function(t){var e=this;this.bh.on(l.PlayerEvent.PlaybackFinished,this.gi),this.bh.on(l.PlayerEvent.Error,function(){e.fh=e.eh,e.ei().then(e.ii)}),this.bh.on(l.PlayerEvent.AdSkipped,function(){return e.Ii()}),this.bh.on(l.PlayerEvent.AdClicked,this.ci(t)),this.bh.on(l.PlayerEvent.AdInteraction,function(t){return e.di(t,l.AdInteractionType.Vpaid)})},e.prototype.ci=function(t){var e=this;return function(){e.ah.forEach(function(t){return t.click()}),e.player.adClicked(t.publicAd.clickThroughUrl)}},e.prototype.di=function(t,e){var i=t[0][0];this.player.adInteraction(e,i)},e.prototype.ei=function(){return this.dh=!1,this.ki({code:L.VastErrorCode.GENERAL_LINEAR_ERROR}),Promise.resolve()},e.prototype.fi=function(t){this.bh.on(l.PlayerEvent.Error,this.ji),this.ah.forEach(function(t){return t.trackImpression()}),this.dh=!0,this.Yh=t},e.prototype.hi=function(){this.dh=!1,this.Yh=null,this.ih=-1/0,this.ah.forEach(function(t){return t.dispose()}),this.ah=[],this.hh&&(this.hh.resolve(),this.hh=null)},e.prototype.ki=function(t,e){void 0===e&&(e=this.getActiveAdBreak()),this.player.onError(t.code,t.message,e),L.VastErrorCode[t.code]&&this.ah.forEach(function(e){return e.errorWithCode(String(t.code))})},e.prototype.li=function(t){var e=this,i=t.ads.filter(function(t){return!t.publicAd.isLinear});if(0===i.length)return Promise.resolve(void 0);this.qi();var r=this.mi(i[0],t);if(!(0,y.isPauseAdBreak)(t.publicAdBreak))return r.then(function(t){return t.status});for(var n=function(i){r=r.then(function(r){return r.status!==T.OverlayAdDisplayStatus.Failed?r:e.nh&&e.Ki()?e.mi(i,t):(R.VastAdTracker.trackNotUsed(i),{status:T.OverlayAdDisplayStatus.Cancelled})})},o=0,a=i.slice(1);o<a.length;o++)n(a[o]);return r.then(function(t){return t.status})},e.prototype.mi=function(t,e){var i=this,r=V.OverlayAdManagerFactory.create(t,this.kh,this.lh,this.config.videoLoadTimeout);this.ch=r,this.Xh=e,this.ah.push(new R.VastAdTracker(t,this.player)),t.publicAd.clickThroughUrlOpened=function(){i.ah.forEach(function(t){return t.click()}),i.player.adClicked(t.publicAd.clickThroughUrl)},this.ch.on(l.PlayerEvent.AdClicked,this.ci(t)),this.ch.on(l.PlayerEvent.Error,function(t){i.ch===r&&i.pi(e.publicAdBreak,t)});var n={width:this.jh.clientWidth,height:this.jh.clientHeight,isFullscreen:this.gh&&this.gh.isFullscreen};return r.display(t,n,(0,y.isPauseAdBreak)(e.publicAdBreak)).catch(function(){return{status:T.OverlayAdDisplayStatus.Failed,errorCode:L.VastErrorCode.GENERAL_NONLINEARADS_ERROR}}).then(function(n){return n.status===T.OverlayAdDisplayStatus.Cancelled||i.ch!==r?(R.VastAdTracker.trackNotUsed(t),{status:T.OverlayAdDisplayStatus.Cancelled}):n.status===T.OverlayAdDisplayStatus.Failed?(i.ki({code:n.errorCode},e.publicAdBreak),i.qi(a.Failed),n):(i.Yh=t.publicAd,i.ah.forEach(function(t){return t.trackImpression()}),i.qh=Date.now(),(0,y.isPauseAdBreak)(e.publicAdBreak)?i.player.nonLinearAdStarted(t.publicAd,e.publicAdBreak.position):i.player.overlayAdStarted(t.publicAd),n)})},e.prototype.ni=function(){var t=this.getActiveAd();return!!t&&!t.isLinear},e.prototype.oi=function(){return!!this.ch&&!this.Yh},e.prototype.pi=function(t,e){void 0===e&&(e=L.VastErrorCode.GENERAL_NONLINEARADS_ERROR),this.ki({code:e},t),this.qi(a.Failed)},e.prototype.qi=function(t){var e;void 0===t&&(t=a.Finished);var i=this.getActiveAd(),r=this.ni();if(this.ch||r){var n=this.Xh,o=this.ah;if(this.Xh=null,null===(e=this.ch)||void 0===e||e.stop(),this.ch=null,this.ah=[],r){this.Yh=null;var s=void 0!==this.qh?(0,h.toSeconds)(Date.now()-this.qh):0;this.qh=void 0,o.forEach(function(e){e.trackOverlayViewDuration(s),t===a.Closed?e.close():t===a.Finished&&e.complete()})}o.forEach(function(t){return t.dispose()}),r&&n&&(0,y.isPauseAdBreak)(n.publicAdBreak)&&(t===a.Closed?this.player.nonLinearAdSkipped(i,n.publicAdBreak.position):this.player.nonLinearAdFinished(i,n.publicAdBreak.position))}},e.prototype.dispose=function(){this.Ri(),this.nh=!1,this.qi(a.Unloaded),this.ah.forEach(function(t){return t.dispose()}),this.ah=[],this.rh=null,this.Xh=null,this.Yh=null,this.Zh=[],this.jh.removeChild(this.kh),this.kh=null},e.prototype.getModuleInfo=function(){return{name:e.MODULE_NAME,version:e.MODULE_VERSION}},e.bitmovinMarker=function(){},e.MODULE_NAME="advertising-bitmovin",e.MODULE_VERSION=u.Environment.VERSION_NUMBER,e}(m.AdvertisingModule);function I(t,e){return(null==e?void 0:e.code)?e:t.publicAd.isLinear?{code:L.VastErrorCode.MEDIAFILE_URI_TIMEOUT}:{code:L.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE}}function D(t){return t.publicAd.isLinear}e.BitmovinModule=_},92996:function(t,e){var i;Object.defineProperty(e,"__esModule",{value:!0}),e.BitmovinModuleErrorCode=void 0,i||(e.BitmovinModuleErrorCode=i={})},64092:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.isInternalLinearAd=function(t){return(0,r.isObject)(t)&&Boolean(t.supportedMediaFiles)},e.isInternalOverlayAd=function(t){return(0,r.isObject)(t)&&Boolean(t.supportedVariations)};var r=i(94685)},88944:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.splitAdsBySequence=function(t,e){return e?function(t){var e=function(t){var e={};return t.forEach(function(t){var i=function(t){return Number(t.originalVastAd&&(t.originalVastAd.sequence||t.originalVastAd.fallbackAdSequence))||1/0}(t);!function(t,e,i){i[t]?i[t].fallback.push(e):i[t]={main:e,fallback:[]}}(i,t,e)}),e}(t);return{mainAds:Object.keys(e).sort(n).map(function(t){return e[t].main}),getBackupAds:function(t){var i=Object.values(e).find(function(e){return e.main===t});return null==i?[]:i.fallback}}}(t):function(t){var e=(0,r.splitArray)(t,function(t){return!t.fallback}),i=e[0],n=e[1];return{mainAds:i,getBackupAds:function(t){return n}}}(t)};var r=i(60814);function n(t,e){return(Number(t)||999)-(Number(e)||999)}},85320:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.selectLinearMediaFile=function(t,e){var i=function(t,e){return(0,n.getBestTech)(e,function(t){return t.reduce(function(t,e){return t[function(t){return o.MimeTypeHelper.isDash(t)?r.StreamType.Dash:o.MimeTypeHelper.isHls(t)?r.StreamType.Hls:r.StreamType.Progressive}(e.mimeType)]=e.fileURL,t},{})}(t)).streaming}(t,e);return i===r.StreamType.Dash||i===r.StreamType.Hls?function(t,e){return e.find(function(e){return t===r.StreamType.Dash?o.MimeTypeHelper.isDash(e.mimeType):t===r.StreamType.Hls&&o.MimeTypeHelper.isHls(e.mimeType)})}(i,t):null},e.selectNonLinearMediaFile=function(t,e,i,r){var n=t.filter(function(t){return t.width<=e.width&&t.height<=e.height||r&&t.scalable});return n.length?(0,a.findMediaFileByResolution)(i.width,i.height,n):null};var r=i(44468),n=i(47993),o=i(85434),a=i(65185)},17614:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.BitmovinModuleErrorCode=e.AdvertisingBitmovinModuleDefinition=void 0;var r=i(62756),n=i(27319),o=i(92996);Object.defineProperty(e,"BitmovinModuleErrorCode",{enumerable:!0,get:function(){return o.BitmovinModuleErrorCode}}),e.AdvertisingBitmovinModuleDefinition={name:r.ModuleName.Advertising,module:function(){return n.BitmovinModule},dependencies:[r.ModuleName.AdvertisingCore],exports:{BitmovinModuleErrorCode:o.BitmovinModuleErrorCode}},e.default=e.AdvertisingBitmovinModuleDefinition},59409:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayAdManagerFactory=void 0;var r=i(36396),n=i(10332),o=function(){function t(){}return t.create=function(t,e,i,o){return t.isVpaid?new n.VpaidOverlayAdManager(e,i,o):new r.OverlayAdManager(e,i,o)},t}();e.OverlayAdManagerFactory=o},58656:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.adBreakPreloadComparator=e.adBreakScheduleComparator=void 0;var r=i(6365);e.adBreakScheduleComparator=function(t,e){if(t.publicAdBreak.scheduleTime>e.publicAdBreak.scheduleTime)return 1;if(e.publicAdBreak.scheduleTime>t.publicAdBreak.scheduleTime)return-1;var i=t.orderingIndex,r=e.orderingIndex;return i>r?1:i<r?-1:0},e.adBreakPreloadComparator=function(t,e){var i,n,o=t.publicAdBreak.scheduleTime-(null!==(i=t.publicAdBreak.preloadOffset)&&void 0!==i?i:r.DEFAULT_PRELOAD_OFFSET)-(e.publicAdBreak.scheduleTime-(null!==(n=e.publicAdBreak.preloadOffset)&&void 0!==n?n:r.DEFAULT_PRELOAD_OFFSET));return 0!==o?o:t.orderingIndex-e.orderingIndex}},36396:function(t,e,i){var r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.OverlayAdManager=void 0,e.loadImage=u;var n=i(65348),o=i(7581),a=i(6341),s=function(t){function e(e,i,r){var n=t.call(this,e,i)||this;return n.loadTimeout=r,n}return r(e,t),e.prototype.display=function(t,e,i){var r=this;void 0===i&&(i=!1);var n=t.publicAd.mediaFileUrl;return t.staticResource&&n?new Promise(function(e){var s,l=function(){null==s||s(),s=void 0,r.S8=void 0},c=function(t){l(),r.stop(),e({status:a.OverlayAdDisplayStatus.Failed,errorCode:t})};r.S8=function(){l(),e({status:a.OverlayAdDisplayStatus.Cancelled})},s=u(n,r.loadTimeout,function(n){l();try{r.T8(t,n,i),e({status:a.OverlayAdDisplayStatus.Displayed})}catch(t){c(o.VastErrorCode.GENERAL_NONLINEARADS_ERROR)}},function(){return c(o.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)},function(){return c(o.VastErrorCode.INLINE_AD_DISPLAY_TIMEOUT)})}):Promise.resolve({status:a.OverlayAdDisplayStatus.Failed,errorCode:o.VastErrorCode.NO_SUPPORTED_NONLINEAR_RESOURCE_TYPE})},e.prototype.T8=function(t,e,i){var r,n=this.U8(t,e,i);this.R8=n,n.onclick=null!==(r=t.publicAd.clickThroughUrlOpened)&&void 0!==r?r:null,this.adjustAdContainer(t.publicAd.width,t.publicAd.height,i),this.adContainer.appendChild(n)},e.prototype.U8=function(t,e,i){void 0===i&&(i=!1);var r=i?"100%":t.publicAd.width+"px",o=i?"100%":t.publicAd.height+"px",a=n.DOMHelper.createTag("a",{href:t.publicAd.clickThroughUrl,target:"_blank"},{width:r,height:o});return e.style.width=r,e.style.height=o,i&&(a.style.display="flex",a.style.alignItems="center",a.style.justifyContent="center",e.style.objectFit="contain"),a.appendChild(e),a},e.prototype.on=function(){},e.prototype.stop=function(){var t,e;null===(t=this.S8)||void 0===t||t.call(this),this.adContainer.style.display="none",this.R8&&(null===(e=this.R8.parentNode)||void 0===e||e.removeChild(this.R8),this.R8=void 0)},e}(a.AbstractOverlayAdManager);function u(t,e,i,r,o){var a=n.DOMHelper.createTag("img"),s=!0,u=function(){s&&(l(),a.src="")},l=function(){s=!1,window.clearTimeout(h),a.removeEventListener("load",d),a.removeEventListener("error",c)},c=function(){l(),r()},d=function(){l(),a.naturalWidth?i(a):r()},h=window.setTimeout(function(){u(),o()},e);return a.addEventListener("load",d),a.addEventListener("error",c),a.src=t,a.complete&&d(),u}e.OverlayAdManager=s},76955:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VastAdTracker=void 0;var r=i(11417),n=i(49075),o=i(3714),a=i(95217),s=i(64092),u=/\[ADPLAYHEAD\]/gi,l=function(){function t(e,i){this.player=i,this.NL=[],this.ML=t.createVastTracker(e),this.OL=(0,s.isInternalOverlayAd)(e),this.QL(this.ML,i)}return t.createVastTracker=function(t){var e=(0,s.isInternalOverlayAd)(t)?t.selectedVastVariation:void 0;return new n.VASTTracker(null,t.originalVastAd,t.originalVastCreative,e)},t.prototype.setupWasSuccessful=function(){return null!=this.ML},t.prototype.setFullscreen=function(t){this.ML.setFullscreen(t)},t.prototype.volumeChanged=function(t){this.ML.setMuted(0===t)},t.prototype.setMuted=function(t){this.ML.setMuted(t)},t.prototype.setPaused=function(t){this.ML.setPaused(t)},t.prototype.skip=function(){this.PL(),this.ML.skip()},t.prototype.click=function(){this.ML.click()},t.prototype.complete=function(){this.PL(),this.OL||this.RL(),this.ML.complete()},t.prototype.close=function(){this.ML.close()},t.trackNotUsed=function(e){var i=t.createVastTracker(e).trackingEvents,r=null==i?void 0:i.notUsed;r&&0!==r.length&&y(r)},t.prototype.trackOverlayViewDuration=function(t){var e=this.ML.trackingEvents,i=null==e?void 0:e.overlayViewDuration;if(i&&0!==i.length){var r=function(t){var e=Math.max(0,Math.round(t*h)),i=d*h,r=c*h,n=Math.floor(e/r),o=Math.floor(e%r/i),a=Math.floor(e%i/h),s=e%h;return"".concat(v(n,p),":").concat(v(o,p),":")+"".concat(v(a,p),".").concat(v(s,f))}(t);y(i.map(function(t){return t.replace(u,r)}))}},t.prototype.progress=function(t){this.ML.setProgress(t)},t.prototype.loaded=function(){},t.prototype.started=function(){},t.prototype.setDuration=function(t){this.ML.setDuration(t)},t.prototype.trackImpression=function(){this.ML.trackImpression()},t.prototype.errorWithCode=function(t){this.ML.errorWithCode(t)},t.prototype.PL=function(){this.ML.removeAllListeners(o.AdQuartile.FIRST_QUARTILE),this.ML.removeAllListeners(o.AdQuartile.MIDPOINT),this.ML.removeAllListeners(o.AdQuartile.THIRD_QUARTILE)},t.prototype.QL=function(t,e){var i=this;t.on(a.AdTrackingEvent.FirstQuartile,function(){e.onQuartile(o.AdQuartile.FIRST_QUARTILE),i.NL.push(o.AdQuartile.FIRST_QUARTILE)}),t.on(a.AdTrackingEvent.Midpoint,function(){e.onQuartile(o.AdQuartile.MIDPOINT),i.NL.push(o.AdQuartile.MIDPOINT)}),t.on(a.AdTrackingEvent.ThirdQuartile,function(){e.onQuartile(o.AdQuartile.THIRD_QUARTILE),i.NL.push(o.AdQuartile.THIRD_QUARTILE)})},t.prototype.RL=function(){var t=this;[o.AdQuartile.FIRST_QUARTILE,o.AdQuartile.MIDPOINT,o.AdQuartile.THIRD_QUARTILE].forEach(function(e){t.NL.includes(e)||t.player.onQuartile(e)})},t.prototype.dispose=function(){this.PL()},t}();e.VastAdTracker=l;var c=3600,d=60,h=1e3,p=2,f=3;function v(t,e){for(var i=String(t);i.length<e;)i="0"+i;return i}function y(t){r.util.resolveURLTemplates(t).forEach(function(t){return(0,a.pingUrl)(t)})}},63589:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VideoAdPlayer=void 0;var r=i(3714),n=i(19483),o=i(88844),a=i(6365),s=function(){function t(t,e){this.adPlayer=t,this.loadTimeout=e,this.E7=[r.PlayerEvent.AdSkipped,r.PlayerEvent.AdClicked,r.PlayerEvent.AdInteraction],this.D7=new n.ArrayMap}return t.prototype.done=function(){var t=this;return this.adPlayer?this.adPlayer.done().then(function(){return t.adPlayer=null}):Promise.resolve()},t.prototype.load=function(t){var e=this,i=window.setTimeout(function(){return e.done()},this.loadTimeout);return this.C7=t,this.adPlayer.load(t.publicAd).finally(function(){return(0,o.clearTimeoutIfDefined)(i)})},t.prototype.on=function(t,e){this.E7.includes(t)||(this.D7.add(t,e),this.adPlayer.on(t,e))},t.prototype.pause=function(){this.adPlayer.pause()},t.prototype.play=function(){return this.adPlayer.play()},t.prototype.skip=function(){},Object.defineProperty(t.prototype,"currentTime",{get:function(){return this.adPlayer.currentTime},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paused",{get:function(){return this.adPlayer.paused},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this.adPlayer.duration},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"muted",{get:function(){return this.adPlayer.muted},set:function(t){this.adPlayer.muted=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){return this.adPlayer.volume},set:function(t){this.adPlayer.volume=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playerResolution",{set:function(t){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skippable",{get:function(){var t=this.C7.publicAd.skippableAfter!==a.NON_SKIPPABLE_IDENTIFIER,e=this.C7.publicAd.skippableAfter<=this.currentTime;return t&&e},enumerable:!1,configurable:!0}),t.prototype.reset=function(){return Promise.resolve()},t}();e.VideoAdPlayer=s},72756:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidAdPlayer=void 0;var r=i(3714),n=i(34841),o=i(88844),a=i(25534),s=i(61411),u=i(41680),l=function(){function t(t,e,i){var s=this;this.J7=new Map,this.c7=function(){s.done().catch(function(){}),s.Q7.reject()},this.d7=function(){(0,o.clearTimeoutIfDefined)(s.S7),s.S7=void 0,(0,o.clearTimeoutIfDefined)(s.U7),s.H7.style.display="block",s.K7.videoElement.style.setProperty("display","block","important"),s.U7=window.setTimeout(s.f7,s.T7),s.G7.startAd()},this.f7=function(){s.G7.stopAd(),s.e7(),s.Q7.reject()},this.g7=function(){(0,o.clearTimeoutIfDefined)(s.U7),s.U7=void 0,s.N7=!0,s.Q7.resolve(),s.K7.started(s.F7.publicAd)},this.h7=function(){},this.i7=function(t){s.Q7.reject(t),s.reset()},this.j7=function(){return s.N7=!1,s.P7&&(s.P7.reject(),s.P7=null),s.K7.paused(s.currentTime),s.G7&&s.duration>0&&s.G7.getAdLinear()&&0===s.G7.getAdRemainingTime()?s.done():Promise.resolve()},this.k7=function(){s.P7&&(s.P7.resolve(),s.P7=null),s.N7||(s.N7=!0,s.K7.resumed(s.currentTime))},this.l7=function(){s.b7=!1,s.K7.skipped(),s.reset()},this.m7=function(t){var e=t[0],i=e[0],r=e[2],n=i||s.F7.publicAd.clickThroughUrl;r&&null!=n&&window.open(n)},this.n7=function(){s.duration<=0&&!isFinite(s.R7)&&(s.R7=4*s.currentTime)},this.o7=function(){if(s.G7){var t=s.G7.getAdRemainingTime();if(-1!==t&&-2!==t){var e=s.G7.getAdDuration()-t;if(isFinite(e)&&e>=0&&e!==s.M7){if(s.M7=e,!s.N7)return;s.K7.timeupdate(s.M7)}}}},this.C8=function(){s.r7(),s.e7(),s.X7.resolve()},this.D8=function(){s.Y7=!0,(0,o.clearTimeoutIfDefined)(s.V7),s.U7=void 0,s.X7.resolve()},this.done=function(){return(0,o.clearIntervalIfDefined)(s.O7),s.O7=void 0,s.E8().then(function(){return s.X7.promise}).then(function(){return s.W7=[],s.r7(),s.F8(),s.K7.done()}).then(function(){s.b7&&s.K7.skipped()})},this.H7=e,this.K7=t,this.J7=new Map,this.M7=-1/0,this.N7=!1,this.Q7=new n.Deferred,this.R7=-1/0,this.T7=i,this.W7=[],this.X7=new n.Deferred,this.Y7=!1,this.Z7=new u.VpaidEventHandler,this.J7.set(r.PlayerEvent.PlaybackFinished,a.VpaidEvent.AdStopped),this.J7.set(r.PlayerEvent.Error,a.VpaidEvent.AdError),this.J7.set(r.PlayerEvent.AdClicked,a.VpaidEvent.AdClickThru),this.J7.set(r.PlayerEvent.AdSkipped,a.VpaidEvent.AdSkipped),this.J7.set(r.PlayerEvent.AdInteraction,a.VpaidEvent.AdInteraction),this.q7()}return t.prototype.load=function(t,e){var i=this,r=this.K7.videoElement;return this.F7=t,this.I7=e,this.a7={autoplay:r.autoplay,crossOrigin:r.crossOrigin,preload:r.preload,style:r.getAttribute("style")},s.VpaidContextFactory.createVpaidContext(this.F7.publicAd.mediaFileUrl,this.H7,this.T7).then(function(e){var r,n=i.I7.isFullscreen?a.VpaidViewMode.Fullscreen:a.VpaidViewMode.Normal;(0,o.clearTimeoutIfDefined)(i.S7),i.S7=window.setTimeout(i.c7,i.T7),i.G7=e.api,i.Z7.attach(i.G7),i.O7=window.setInterval(i.o7,250),i.G7.initAd(i.I7.width,i.I7.height,n,1e5,{AdParameters:t.adParameters},{videoSlotCanAutoPlay:!0,videoSlot:i.K7.videoElement,slot:null===(r=e.container.contentDocument)||void 0===r?void 0:r.body})}).catch(function(){return i.done().then(function(){i.Q7.reject()})}),this.Q7.promise.catch(function(t){return i.X7.resolve(),Promise.reject(t)})},t.prototype.e7=function(){this.W7.forEach(function(t){return t()})},t.prototype.p7=function(t,e){this.Z7.on(t,e)},t.prototype.on=function(t,e){t===r.PlayerEvent.Error&&this.W7.push(e),this.Z7.on(this.J7.get(t)||t,e)},t.prototype.off=function(t,e){this.Z7.off(t,e)},t.prototype.q7=function(){this.p7(a.VpaidEvent.AdLoaded,this.d7),this.Z7.on(a.VpaidEvent.AdError,this.i7),this.Z7.on(a.VpaidEvent.AdPaused,this.j7),this.Z7.on(a.VpaidEvent.AdPlaying,this.k7),this.Z7.on(a.VpaidEvent.AdStarted,this.g7),this.Z7.on(a.VpaidEvent.AdStopped,this.D8),this.Z7.on(a.VpaidEvent.AdSkipped,this.l7),this.Z7.on(a.VpaidEvent.AdClickThru,this.m7),this.Z7.on(a.VpaidEvent.AdImpression,this.h7),this.Z7.on(a.VpaidEvent.AdVideoFirstQuartile,this.n7)},t.prototype.r7=function(){this.G7&&(this.Z7.detach(this.G7),this.G7.done(),this.G7=null,this.a7&&(this.K7.videoElement.preload=this.a7.preload,this.K7.videoElement.autoplay=this.a7.autoplay,this.K7.videoElement.crossOrigin=this.a7.crossOrigin,this.a7.style&&this.K7.videoElement.setAttribute("style",this.a7.style),this.a7=null)),this.H7.style.setProperty("display","none")},t.prototype.E8=function(){return this.Y7?Promise.resolve():((0,o.clearTimeoutIfDefined)(this.V7),this.U7=void 0,this.G7?(this.V7=window.setTimeout(this.C8,this.T7),this.G7.stopAd()):this.X7.resolve(),this.X7.promise)},t.prototype.pause=function(){this.G7.pauseAd(),this.P7&&this.P7.reject()},t.prototype.play=function(){if(this.N7)return Promise.resolve();this.P7=this.P7||new n.Deferred;var t=this.P7.promise;return this.G7.resumeAd(),t},t.prototype.skip=function(){this.G7&&this.G7.skipAd(),this.b7=!0},Object.defineProperty(t.prototype,"currentTime",{get:function(){return isFinite(this.M7)?this.M7:0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"paused",{get:function(){return!this.N7},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){var t=this.G7.getAdDuration();return t<=0&&isFinite(this.R7)?this.R7:t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"muted",{get:function(){return 0===this.G7.getAdVolume()},set:function(t){t&&this.G7.getAdVolume()>0?(this.L7=this.G7.getAdVolume(),this.G7.setAdVolume(0)):t||this.G7.setAdVolume(this.L7)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"volume",{get:function(){return this.G7.getAdVolume()},set:function(t){this.G7.setAdVolume(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"playerResolution",{set:function(t){t&&(this.I7=t),this.G7&&this.G7.resizeAd(this.I7.width,this.I7.height,this.I7.isFullscreen?a.VpaidViewMode.Fullscreen:a.VpaidViewMode.Normal)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"skippable",{get:function(){return!!this.G7&&this.G7.getAdSkippableState()},enumerable:!1,configurable:!0}),t.prototype.reset=function(){var t=this;return this.G7?(this.Z7.detach(this.G7),this.E8().then(function(){t.r7()})):(this.F8(),Promise.resolve())},t.prototype.F8=function(){(0,o.clearIntervalIfDefined)(this.O7),(0,o.clearTimeoutIfDefined)(this.S7),(0,o.clearTimeoutIfDefined)(this.U7),(0,o.clearTimeoutIfDefined)(this.V7),this.O7=void 0,this.S7=void 0,this.U7=void 0,this.V7=void 0},t}();e.VpaidAdPlayer=l},25534:function(t,e){var i,r;Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidViewMode=e.VpaidEvent=void 0,function(t){t.AdError="AdError",t.AdLoaded="AdLoaded",t.AdPaused="AdPaused",t.AdPlaying="AdPlaying",t.AdSkipped="AdSkipped",t.AdStarted="AdStarted",t.AdStopped="AdStopped",t.AdClickThru="AdClickThru",t.AdInteraction="AdInteraction",t.AdImpression="AdImpression",t.AdVideoStart="AdVideoStart",t.AdVideoMidpoint="AdVideoMidpoint",t.AdVideoComplete="AdVideoComplete",t.AdVideoThirdQuartile="AdVideoThirdQuartile",t.AdVideoFirstQuartile="AdVideoFirstQuartile"}(i||(e.VpaidEvent=i={})),function(t){t.Normal="normal",t.Thumbnail="thumbnail",t.Fullscreen="fullscreen"}(r||(e.VpaidViewMode=r={}))},61411:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidContextFactory=e.VpaidContextFactoryError=void 0;var r,n=i(34841),o=i(65348),a=i(88844);!function(t){t.Timeout="timeout",t.ScriptError="scripterror"}(r||(e.VpaidContextFactoryError=r={}));var s=function(){function t(){}return t.onContainerIframeLoaded=function(t,e,i,r,n){i.contentDocument.body.style.margin="0",i.contentDocument.body.style.padding="0",r.onerror=this.onVpaidScriptError.bind(this,t),r.onload=this.onVpaidScriptLoaded.bind(this,t,i,e,window.setTimeout(this.onScriptLoadTimeout.bind(this,t,r),n)),i.contentWindow.document.head.appendChild(r)},t.onScriptLoadTimeout=function(t,e){e.src="",e.parentElement.removeChild(e),t.reject(r.Timeout)},t.onVpaidScriptError=function(t){t.reject(r.ScriptError)},t.onVpaidScriptLoaded=function(t,e,i,r){var n=e.contentWindow.getVPAIDAd;if(n&&"function"==typeof n){var o=n();(0,a.clearTimeoutIfDefined)(r),o.done=i.removeChild.bind(i,e),t.resolve({api:o,container:e})}else t.reject()},t.createVpaidContext=function(t,e,i){var r=this,a=new n.Deferred,s=o.DOMHelper.createTag("iframe",{allow:"autoplay",src:"about:blank"},{width:"100%",height:"100%",border:"none"}),u=o.DOMHelper.createTag("script",{src:t});return s.onload=function(){return r.onContainerIframeLoaded(a,e,s,u,i)},e.appendChild(s),a.promise},t}();e.VpaidContextFactory=s},41680:function(t,e,i){Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidEventHandler=void 0;var r=i(19483),n=i(25534),o=function(){function t(){this.Cfb=new Map,this.Bfb=new r.ArrayMap}return t.prototype.Dfb=function(t){for(var e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];(this.Bfb.get(t)||[]).slice().forEach(function(t){return t(e)})},t.prototype.attach=function(t){var e=this,i=function(i){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.Dfb(i,t)};t.subscribe(n,i),r.Cfb.set(i,n)},r=this;for(var o in n.VpaidEvent)i(o)},t.prototype.detach=function(t){for(var e in n.VpaidEvent)t.unsubscribe(this.Cfb.get(e),e)},t.isAlreadyRegistered=function(t,e,i){var r=t.get(e);return r&&r.includes(i)},t.prototype.on=function(e,i){t.isAlreadyRegistered(this.Bfb,e,i)||this.Bfb.add(e,i)},t.prototype.off=function(t,e){this.Bfb.deleteValue(t,e)},t.prototype.dispose=function(){this.Cfb.clear(),this.Bfb.clear()},t}();e.VpaidEventHandler=o},10332:function(t,e,i){var r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.VpaidOverlayAdManager=void 0;var n=i(3714),o=i(34841),a=i(88844),s=i(7581),u=i(6341),l=i(25534),c=i(61411),d=i(41680),h=function(t){function e(e,i,r){var c=t.call(this,e,i)||this;return c.h8=!1,c.k8=function(){c.l8(s.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)},c.m8=function(){c.h8||((0,a.clearTimeoutIfDefined)(c.a8),c.a8=void 0,(0,a.clearTimeoutIfDefined)(c.c8),c.c8=window.setTimeout(c.o8,c.b8),c.adjustAdContainer(c.V8.publicAd.width,c.V8.publicAd.height),c.W8.startAd())},c.o8=function(){c.l8(s.VastErrorCode.INLINE_AD_DISPLAY_TIMEOUT)},c.p8=function(){c.h8||(c.Z8.hasSettled?c.n8():c.l8(s.VastErrorCode.GENERAL_VPAID_ERROR))},c.q8=function(){c.h8||((0,a.clearTimeoutIfDefined)(c.c8),c.c8=void 0,c.Z8.resolve({status:u.OverlayAdDisplayStatus.Displayed}))},c.t8=function(){c.s8(),c.f8.resolve()},c.u8=function(){c.g8=!0,(0,a.clearTimeoutIfDefined)(c.d8),c.d8=void 0,c.f8.resolve()},c.b8=r,c.Y8=new Map,c.Z8=new o.Deferred,c.e8=[],c.f8=new o.Deferred,c.g8=!1,c.i8=new d.VpaidEventHandler,c.Y8.set(n.PlayerEvent.PlaybackFinished,l.VpaidEvent.AdStopped),c.Y8.set(n.PlayerEvent.AdClicked,l.VpaidEvent.AdClickThru),c.r8(),c}return r(e,t),e.prototype.display=function(t,e){var i=this;return this.V8=t,c.VpaidContextFactory.createVpaidContext(this.V8.publicAd.mediaFileUrl,this.adContainer,this.b8).then(function(r){if(i.h8)r.api.done();else{if(!e)throw r.api.done(),new Error("Player resolution is required to initialize a VPAID ad");i.j8(r,t,e)}},function(){return i.l8(s.VastErrorCode.UNABLE_TO_FETCH_NONLINEAR_RESOURCE)}).catch(function(){i.l8(s.VastErrorCode.GENERAL_VPAID_ERROR)}),this.Z8.promise},e.prototype.j8=function(t,e,i){var r,n=i.isFullscreen?l.VpaidViewMode.Fullscreen:l.VpaidViewMode.Normal;(0,a.clearTimeoutIfDefined)(this.a8),this.a8=window.setTimeout(this.k8,this.b8),this.W8=t.api,this.X8=t.container;var o=null===(r=t.container.contentDocument)||void 0===r?void 0:r.body;o?(this.i8.attach(this.W8),this.W8.initAd(i.width,i.height,n,1e5,{AdParameters:e.adParameters},{slot:o})):this.l8(s.VastErrorCode.GENERAL_VPAID_ERROR)},e.prototype.l8=function(t){this.Z8.hasSettled||(this.Z8.resolve({status:u.OverlayAdDisplayStatus.Failed,errorCode:t}),this.stop())},e.prototype.n8=function(){this.e8.forEach(function(t){return t(s.VastErrorCode.GENERAL_VPAID_ERROR)})},e.prototype.on=function(t,e){t!==n.PlayerEvent.Error?this.i8.on(this.Y8.get(t)||t,e):this.e8.push(e)},e.prototype.off=function(t,e){this.i8.off(t,e)},e.prototype.r8=function(){this.i8.on(l.VpaidEvent.AdLoaded,this.m8),this.i8.on(l.VpaidEvent.AdStarted,this.q8),this.i8.on(l.VpaidEvent.AdStopped,this.u8),this.i8.on(l.VpaidEvent.AdError,this.p8)},e.prototype.s8=function(){this.W8&&(this.i8.detach(this.W8),this.W8.done(),this.W8=null,this.X8=void 0)},e.prototype.v8=function(){this.g8||((0,a.clearTimeoutIfDefined)(this.d8),this.W8?(this.d8=window.setTimeout(this.t8,this.b8),this.W8.stopAd()):(this.d8=void 0,this.f8.resolve()))},e.prototype.stop=function(){var t=this;this.h8||(this.h8=!0,this.w8(),this.adContainer.style.display="none",this.X8&&(this.X8.style.display="none"),this.V8&&!this.Z8.hasSettled&&this.Z8.resolve({status:u.OverlayAdDisplayStatus.Cancelled}),this.f8.promise.then(function(){t.e8=[],t.s8(),t.w8()}),this.v8())},e.prototype.w8=function(){(0,a.clearTimeoutIfDefined)(this.a8),(0,a.clearTimeoutIfDefined)(this.c8),(0,a.clearTimeoutIfDefined)(this.d8),this.a8=void 0,this.c8=void 0,this.d8=void 0},e}(u.AbstractOverlayAdManager);e.VpaidOverlayAdManager=h},49075:function(t,e,i){var r=this&&this.__extends||function(){var t=function(e,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},t(e,i)};return function(e,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function r(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.VASTTracker=void 0;var n=i(31472),o=i(77615),a=i(37007),s=i(57219),u=i(11417),l=function(t){function e(e,i,r,n){void 0===n&&(n=null);var a=t.call(this)||this;for(var s in a.ad=i,a.creative=r,a.variation=n,a.muted=!1,a.impressed=!1,a.skippable=!1,a.trackingEvents={},a._alreadyTriggeredQuartiles={},a.emitAlwaysEvents=["creativeView","start","firstQuartile","midpoint","thirdQuartile","complete","resume","pause","rewind","skip","closeLinear","close"],a.creative.trackingEvents){var u=a.creative.trackingEvents[s];a.trackingEvents[s]=u.slice(0)}return a.creative instanceof o.CreativeLinear?a._initLinearTracking():a._initVariationTracking(),e&&a.on("start",function(){e.lastSuccessfulAd=Date.now()}),a}return r(e,t),e.prototype._initLinearTracking=function(){this.linear=!0,this.skipDelay=this.creative.skipDelay,this.setDuration(this.creative.duration),this.clickThroughURLTemplate=this.creative.videoClickThroughURLTemplate,this.clickTrackingURLTemplates=this.creative.videoClickTrackingURLTemplates},e.prototype._initVariationTracking=function(){this.linear=!1,this.skipDelay=-1;var t=this.variation||this.creative&&this.creative.variations&&this.creative.variations[0]||null;if(t){for(var e in t.trackingEvents){var i=t.trackingEvents[e];this.trackingEvents[e]?this.trackingEvents[e]=this.trackingEvents[e].concat(i.slice(0)):this.trackingEvents[e]=i.slice(0)}t instanceof s.NonLinearAd?(this.clickThroughURLTemplate=t.nonlinearClickThroughURLTemplate,this.clickTrackingURLTemplates=t.nonlinearClickTrackingURLTemplates,this.setDuration(t.minSuggestedDuration)):t instanceof n.CompanionAd&&(this.clickThroughURLTemplate=t.companionClickThroughURLTemplate,this.clickTrackingURLTemplates=t.companionClickTrackingURLTemplates)}},e.prototype.setDuration=function(t){this.assetDuration=t,this.quartiles={firstQuartile:Math.round(25*this.assetDuration)/100,midpoint:Math.round(50*this.assetDuration)/100,thirdQuartile:Math.round(75*this.assetDuration)/100}},e.prototype.setProgress=function(t){var e=this,i=this.skipDelay||-1;if(-1===i||this.skippable||(i>t?this.emit("skip-countdown",i-t):(this.skippable=!0,this.emit("skip-countdown",0))),this.assetDuration>0){var r=[];if(t>0){var n=Math.round(t/this.assetDuration*100);for(var o in r.push("start"),r.push("progress-".concat(n,"%")),r.push("progress-".concat(Math.round(t))),this.quartiles)this.isQuartileReached(o,this.quartiles[o],t)&&(r.push(o),this._alreadyTriggeredQuartiles[o]=!0)}r.forEach(function(t){e.track(t,!0)}),t<this.progress&&this.track("rewind")}this.progress=t},e.prototype.isQuartileReached=function(t,e,i){var r=!1;return e<=i&&!this._alreadyTriggeredQuartiles[t]&&(r=!0),r},e.prototype.setMuted=function(t){this.muted!==t&&this.track(t?"mute":"unmute"),this.muted=t},e.prototype.setPaused=function(t){this.paused!==t&&this.track(t?"pause":"resume"),this.paused=t},e.prototype.setFullscreen=function(t){this.fullscreen!==t&&this.track(t?"fullscreen":"exitFullscreen"),this.fullscreen=t},e.prototype.setExpand=function(t){this.expanded!==t&&this.track(t?"expand":"collapse"),this.expanded=t},e.prototype.setSkipDelay=function(t){"number"==typeof t&&(this.skipDelay=t)},e.prototype.trackImpression=function(){this.impressed||(this.impressed=!0,this.trackURLs(this.ad.impressionURLTemplates),this.track("creativeView"))},e.prototype.errorWithCode=function(t){this.trackURLs(this.ad.errorURLTemplates,{ERRORCODE:t})},e.prototype.complete=function(){this.track("complete")},e.prototype.close=function(){this.track(this.linear?"closeLinear":"close")},e.prototype.skip=function(){this.track("skip"),this.trackingEvents=[]},e.prototype.click=function(t){void 0===t&&(t=null),this.clickTrackingURLTemplates&&this.clickTrackingURLTemplates.length&&this.trackURLs(this.clickTrackingURLTemplates);var e=this.clickThroughURLTemplate||t;if(e){var i=this.linear?{CONTENTPLAYHEAD:this.progressFormatted()}:{},r=u.util.resolveURLTemplates([e],i)[0];this.emit("clickthrough",r)}},e.prototype.track=function(t,e){void 0===e&&(e=!1),"closeLinear"===t&&!this.trackingEvents[t]&&this.trackingEvents.close&&(t="close");var i=this.trackingEvents[t],r=this.emitAlwaysEvents.indexOf(t)>-1;i?(this.emit(t,""),this.trackURLs(i)):r&&this.emit(t,""),e&&(delete this.trackingEvents[t],r&&this.emitAlwaysEvents.splice(this.emitAlwaysEvents.indexOf(t),1))},e.prototype.trackURLs=function(t,e){void 0===e&&(e={}),this.linear&&(this.creative&&this.creative.mediaFiles&&this.creative.mediaFiles[0]&&this.creative.mediaFiles[0].fileURL&&(e.ASSETURI=this.creative.mediaFiles[0].fileURL),e.CONTENTPLAYHEAD=this.progressFormatted()),u.util.track(t,e)},e.prototype.progressFormatted=function(){var t=parseInt(this.progress),e=t/3600;e.length<2&&(e="0".concat(e));var i=t/60%60;i.length<2&&(i="0".concat(i));var r=t%60;r.length<2&&(r="0".concat(i));var n=parseInt(100*(this.progress-t));return"".concat(e,":").concat(i,":").concat(r,".").concat(n)},e}(a.EventEmitter);e.VASTTracker=l}},function(t){return function(){return t(17614)}()}])});
|
|
18
18
|
})();
|