zogrepsili.com Open in urlscan Pro
2a00:1178:1:4b::17  Public Scan

Submitted URL: http://zogrepsili.com/d.maFazbdYGYlMt/Pb3/pCvibSmGVhJzZwDL0D0DNZztgD1BMAzEMa1cLxT/QK3lONDxUOz/MMzsY_
Effective URL: https://zogrepsili.com/d.maFazbdYGYlMt/Pb3/pCvibSmGVhJzZwDL0D0DNZztgD1BMAzEMa1cLxT/QK3lONDxUOz/MMzsY_
Submission: On August 07 via manual from SG — Scanned from NL

Form analysis 0 forms found in the DOM

Text Content

(function(e){function t(e,t){var s=document.createElement("script"),i=document.head||document.getElementsByTagName("head")[0],n="",o="[[[ navigator is not available ]]]",a="0.3.3";try{o=navigator.userAgent}catch{}typeof e=="undefined"?n+="Error object is undefined (sic).":(typeof e.message!="undefined"&&(n+="Message: "+e.message),typeof e.stack!="undefined"&&(n+=`
Stack: `+e.stack),typeof e.situation!="undefined"&&(n+=`
Situation: `+e.situation)),t&&(n+=`
More info: `+t),n+=`
Url: `+window.location.href,n+=`
Version: `+a,s.src="//"+("zogrepsili.com"==="{{JSErrorDomain}}"?"ptekuwiny.pro":"zogrepsili.com")+"/jserr?msg="+encodeURIComponent(n)+"&ua="+encodeURIComponent(o)+"&tag=videoim",i.appendChild(s)}function n(e){if(this.isProhibited())return;this.prepare(e),this.render()}n.prototype={defaults:{layout:{props:{tagName:"div"}}},settings:{videojs:{config:{autoplay:"muted",inactivityTimeout:0,html5:{hls:{withCredentials:!1}}}},player:{adsBy:"Ads by HilltopAds",adsByLink:"https://hilltopads.com/"},options:{ignoredBetterJs:[],customCSS:"",script:null,layout:{defaultClass:null,uniqueID:null},timer:5,videoWidth:"400",videoHeight:"300",preload:"none",clickAd:"hide"},clickUrl:null,videoStartUrl:null,videoFinishUrl:null,videoViewingUrl:null,vastUrl:null},layout:{dom:{videoim:{adsBy:null,close:null,video:{videoSource:null}}},props:{videoim:{tagName:"div",attributes:{class:function(){return this.settings.options.layout.defaultClass},id:function(){return this.settings.options.layout.defaultClass}},assign:"adVideoIm"},adsBy:{tagName:"a",attributes:{class:function(){return this.settings.options.layout.defaultClass+"__adsby"},href:function(){return this.settings.player.adsByLink},target:"_blank"},content:function(){return this.settings.player.adsBy}},close:{tagName:"div",attributes:{class:function(){return this.settings.options.layout.defaultClass+"__close"}},content:"Close",click:"closeAd"},video:{tagName:"video",attributes:{class:function(){return this.settings.options.layout.defaultClass+"__video video-js"},id:function(){return this.settings.options.layout.defaultClass+"__video"},width:function(){return this.settings.options.videoWidth},height:function(){return this.settings.options.videoHeight},controls:"controls","webkit-playsinline":"",playsinline:""},assign:"adVideo"},videoSource:{tagName:"source",attributes:{src:"data:video/mp4;base64,AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAAAu1tZGF0AAACrQYF//+p3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE1NSByMjkwMSA3ZDBmZjIyIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxOCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTMgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MzoweDExMyBtZT1oZXggc3VibWU9NyBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0xIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MSA4eDhkY3Q9MSBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0tMiB0aHJlYWRzPTMgbG9va2FoZWFkX3RocmVhZHM9MSBzbGljZWRfdGhyZWFkcz0wIG5yPTAgZGVjaW1hdGU9MSBpbnRlcmxhY2VkPTAgYmx1cmF5X2NvbXBhdD0wIGNvbnN0cmFpbmVkX2ludHJhPTAgYmZyYW1lcz0zIGJfcHlyYW1pZD0yIGJfYWRhcHQ9MSBiX2JpYXM9MCBkaXJlY3Q9MSB3ZWlnaHRiPTEgb3Blbl9nb3A9MCB3ZWlnaHRwPTIga2V5aW50PTI1MCBrZXlpbnRfbWluPTEgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD00MCByYz1jcmYgbWJ0cmVlPTEgY3JmPTI4LjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IGlwX3JhdGlvPTEuNDAgYXE9MToxLjAwAIAAAAAwZYiEAD//8m+P5OXfBeLGOfKE3xkODvFZuBflHv/+VwJIta6cbpIo4ABLoKBaYTkTAAAC7m1vb3YAAABsbXZoZAAAAAAAAAAAAAAAAAAAA+gAAAPoAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIYdHJhawAAAFx0a2hkAAAAAwAAAAAAAAAAAAAAAQAAAAAAAAPoAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAACgAAAAWgAAAAAAJGVkdHMAAAAcZWxzdAAAAAAAAAABAAAD6AAAAAAAAQAAAAABkG1kaWEAAAAgbWRoZAAAAAAAAAAAAAAAAAAAQAAAAEAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAATttaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAD7c3RibAAAAJdzdHNkAAAAAAAAAAEAAACHYXZjMQAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAACgAFoASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAADFhdmNDAWQACv/hABhnZAAKrNlCjfkhAAADAAEAAAMAAg8SJZYBAAZo6+JLIsAAAAAYc3R0cwAAAAAAAAABAAAAAQAAQAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAC5QAAAAEAAAAUc3RjbwAAAAAAAAABAAAAMAAAAGJ1ZHRhAAAAWm1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRvbwAAAB1kYXRhAAAAAQAAAABMYXZmNTguMTIuMTAw",type:function(){return"video/mp4"}}}},css:`#QQuniqueIDWW .QQdefaultClassWW__video {
  max-width: 100%;
  width: 100%;
  height: 100%;
  background-color: #111;
  visibility: visible;
}
#QQuniqueIDWW .QQdefaultClassWW__adsby {
  position: absolute;
  bottom: 100%;
  left: 0;
  padding: 2px 8px 3px;
  border-radius: 5px 5px 0 0;
  font-size: 11px;
  text-decoration: none;
  color: white;
  background: black;
}
#QQuniqueIDWW .QQdefaultClassWW__close {
  position: absolute;
  top: 0;
  right: 10px;
  height: 14px;
  padding: 1px 15px 1px 4px;
  text-transform: uppercase;
  font-size: 9px;
  line-height: 14px;
  color: #fff;
  background: #000;  opacity: .75;  cursor: pointer;
  z-index: 1;
}
#QQuniqueIDWW .QQdefaultClassWW__close:before,
#QQuniqueIDWW .QQdefaultClassWW__close:after {
  content: '';
  position: absolute;
  top: 7px;
  right: 4px;
  display: block;
  height: 1px;
  width: 9px;
  background: #fff;
  box-shadow: 0 0 .5px 0 #fff;
  border-radius: 10px;
  transform: rotate(-45deg);
}
#QQuniqueIDWW .QQdefaultClassWW__close:after {
  transform: rotate(45deg);
}
#QQuniqueIDWW .QQdefaultClassWW__close:hover:before,
`+`#QQuniqueIDWW .QQdefaultClassWW__close:hover:after {
`+`  background: #ebebeb;
`+`}
`},isProhibited:function(){var e,t=document.head||document.getElementsByTagName("head")[0];try{e=navigator.userAgent}catch{}if(t.htavim||/BingPreview/i.test(e))return!0},prepare:function(e){this.setVideoIMFlag(),this.copySettings(e,!0),this.setDefaultClass(),this.installUtils()},installUtils:function(){if(window.XMLHttpRequest){var t=[],n=window.XMLHttpRequest.prototype.send,s=window.XMLHttpRequest.prototype.open;window.XMLHttpRequest.ensureWithoutCredentials=function(e){if(!e)return;e=e.toLowerCase(),t.indexOf(e)===-1&&t.push(e)},window.XMLHttpRequest.prototype.open=function(){if(arguments.length>=2){var e=(arguments[1]||"").toLowerCase();t.indexOf(e)!==-1&&(this._ensureWithoutCredentials=!0)}return s.apply(this,arguments)},window.XMLHttpRequest.prototype.send=function(){return this._ensureWithoutCredentials&&(this.withCredentials=!1),n.apply(this,arguments)}}},render:function(){this.makeDOM(),this.setUniqueID(),this.injectVideoAssets(),this.insertStyles(),this.injectDOM(),this.initAd()},copySettings:function(e,t){if(typeof e=="object"){if(typeof e.options=="object"&&Object.keys(e.options).length>0)for(o in e.options)this.settings.options[o]=e.options[o];if(t){var n,o,s=["clickUrl","videoAdStartUrl","videoAdFinishUrl","videoAdViewingUrl","vastUrl"];for(n=0;n<s.length;n++)e[s[n]]&&(this.settings[s[n]]=e[s[n]])}}},makeDOM:function(e,t){if(e=e||this.layout.dom,t=t||document.createElement("div"),typeof e=="object"){for(r in e){switch(n=this.layout.props[r]||this.defaults.layout.props,o=n.if,typeof o){case"function":o=o.call(this);break;case"undefined":o=!0;break}if(o){c=n.tagName||this.defaults.layout.props.tagName,l=this.getValue(n.repeat)||1;for(var n,s,o,i,a,r,c,l,d=0;d<l;d++){switch(s=document.createElement(c),a=n.attributes,a&&(s=this.setAttributes(s,a)),i=this.getValue(n.content),typeof i!="undefined"&&(s.innerHTML=i),this.settings.options.ignoredBetterJs.push(s),t.appendChild(s),typeof n.assign!="undefined"&&(this[n.assign]=s),typeof n.click){case"string":s.addEventListener("click",this[n.click].bind(this),!1);break;case"function":s.addEventListener("click",n.click.bind(this),!1)}e[r]&&this.makeDOM(e[r],s)}}}e===this.layout.dom&&(this.adElement=t.firstElementChild)}},insertStyles:function(){var e=document.createElement("style"),t=this.settings.options.customCSS;e.innerHTML=this.replaceAttributesInStyles(this.layout.css),t&&(e.innerHTML+=t),this.adElement.insertBefore(e,this.adElement.firstChild)},replaceAttributesInStyles:function(e){var t,s,n=this.settings.options.layout;for(t in n)s=new RegExp("QQ"+t+"WW","g"),e=e.replace(s,n[t]);return e},injectDOM:function(){try{this.extra.appendToBody(this.adElement)}catch(e){t(e,"Failed to insert video ad [injectDOM].")}},setVideoIMFlag:function(){var e=document.head||document.getElementsByTagName("head")[0];e.htavim=!0},removeVideoIMFlag:function(){var e=document.head||document.getElementsByTagName("head")[0];delete e.htavim},injectVideoAssets:function(){var t=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.innerHTML=this.replaceAttributesInStyles(this.assetsCss.join(`
`)),t.appendChild(e),this.assetsJs.forEach(function(e){e(this)},this)},initAd:function(){window.HELP_IMPROVE_VIDEOJS=!1,document.body?this.startAd():window.addEventListener("DOMContentLoaded",this.startAd.bind(this),!1)},startAd:function(){this.player=videojs(this.adVideo.id,this.settings.videojs.config,this.startVast.bind(this))},startVast:function(){if(!this.settings.vastUrl)return;window.XMLHttpRequest.ensureWithoutCredentials&&typeof window.XMLHttpRequest.ensureWithoutCredentials=="function"&&window.XMLHttpRequest.ensureWithoutCredentials(this.settings.vastUrl),this.player.ready(function(){this.play()}),this.player.vastClient({adTagUrl:this.settings.vastUrl,playAdAlways:!0,adCancelTimeout:60*60*1e3,verbosity:-1}),this.bindEventsOnPlayer()},bindEventsOnPlayer:function(){this.player.on("vast.adStart",this.onAdStart.bind(this)),this.player.on("vast.adEnd",this.onAdEnd.bind(this)),this.player.on("vast.adSkip",this.onAdSkip.bind(this)),this.player.on("vast.adError",this.onAdError.bind(this))},hideAd:function(){this.adElement.classList.add("skipped"),this.restoreTransition(),window.removeEventListener("resize",this.resizeAdBinded,!1),this.player.vast.disable(),setTimeout(function(){this.player.dispose(),this.adElement.outerHTML=""}.bind(this),350),this.removeVideoIMFlag()},closeAd:function(){this.player.trigger("vast.adSkip")},onAdError:function(e){this.closeAd();var n=e.error&&e.error.code===303;n||t(e.error)},onAdStart:function(){this.resizeAd(),this.resizeAdBinded=this.resizeAd.bind(this),window.addEventListener("resize",this.resizeAdBinded,!1),this.restoreTransition(),this.adElement.classList.add("started")},onAdSkip:function(){this.player.skipped=!0,this.hideAd()},onAdEnd:function(){this.player.skipped||this.hideAd()},restoreTransition:function(){this.adElement.classList.remove("notransition")},resizeAd:function(){var t,i,e=this.adElement,s=this.player.videoWidth()||480,a=this.player.videoHeight()||270,n=s/a,r=window.innerWidth>window.innerHeight,o=r?window.innerHeight:window.innerWidth;s<50&&(n=1.777),t=parseInt(getComputedStyle(e).height)*n,e.style.removeProperty("height"),e.style.removeProperty("width"),e.classList.add("notransition"),t>o&&(t=o,i=t/n,e.style.height=i+"px"),e.style.width=t+"px"},getValue:function(e){return typeof e=="function"?e.call(this):e},setAttributes:function(e,t){var n,s;for(s in t)n=this.getValue(t[s])||"",e.setAttribute(s,n);return e},setUniqueID:function(){var e=this.settings.options.layout.uniqueID;(typeof e!="string"||!e||!isNaN(e.charAt(0)))&&(e=this.randomString(6)),this.adElement.id=this.settings.options.layout.uniqueID=e},setDefaultClass:function(){var e=this.settings.options.layout.defaultClass;(typeof e!="string"||!e||!isNaN(e.charAt(0)))&&(e=this.randomEmoji(1)),this.settings.options.layout.defaultClass=e},randomEmoji:function(e){var t,n="",s="â–¶";for(t=0;t<(e||1);t++)n+=s.charAt(Math.floor(Math.random()*s.length));return n},randomString:function(e){var t,n="",s="abcdefghijklmnopqrstuvwxyz";for(t=0;t<(e||6);t++)n+=s.charAt(Math.floor(Math.random()*s.length));return n},extra:{appendToBody:function(e){function t(){document.body.appendChild(e)}document.body?t():window.addEventListener("DOMContentLoaded",t,!1)},isVideoPlaying:function(){if("playing"in HTMLMediaElement.prototype)return;Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}})}()},assetsJs:[function(e){var t="#QQuniqueIDWW .video-js {width: 300px;height: 150px;}#QQuniqueIDWW .vjs-fluid {padding-top: 56.25%;}",t=e.replaceAttributesInStyles(t);!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self).videojs=t()}(this,function(){"use strict";Po="7.11.7",N="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function we(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function k(e,t){return e(t={exports:{}},t.exports),t.exports}for(var Xt,t="undefined"!=typeof window?window:"undefined"!=typeof N?N:"undefined"!=typeof self?self:{},Sl={},Al="undefined"!=typeof N?N:"undefined"!=typeof window?window:{},s="undefined"!=typeof document?document:Al["__GLOBAL_DOCUMENT_CACHE@4"]||(Al["__GLOBAL_DOCUMENT_CACHE@4"]=Sl),un={prefixed:!0},vn=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror","-moz-full-screen"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError","-ms-fullscreen"]],kl=vn[0],yn=0;yn<vn.length;yn++)if(vn[yn][1]in s){Xt=vn[yn];break}if(Xt){for(Yt=0;Yt<Xt.length;Yt++)un[kl[Yt]]=Xt[Yt];un.prefixed=Xt[0]!==kl[0]}var V=[],v1=function(e,n){return function(s,o,i){var a,r,c=n.levels[o],l=new RegExp("^("+c+")$");("log"!==s&&i.unshift(s.toUpperCase()+":"),i.unshift(e+":"),V)&&(V.push([].concat(i)),r=V.length-1e3,V.splice(0,0<r?r:0)),t.console&&(a=t.console[s],a||"debug"!==s||(a=t.console.info||t.console.log),a&&c&&l.test(s)&&a[Array.isArray(i)?"apply":"call"](t.console,i))}},d=function e(t){function n(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];o("log",s,n)}var o,s="info";return o=v1(t,n),n.createLogger=function(n){return e(t+": "+n)},n.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:s},n.level=function(e){if("string"==typeof e){if(!n.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');s=e}return s},(n.history=function(){return V?[].concat(V):[]}).filter=function(e){return(V||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},n.history.clear=function(){V&&(V.length=0)},n.history.disable=function(){null!==V&&(V.length=0,V=null)},n.history.enable=function(){null===V&&(V=[])},n.error=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return o("error",s,n)},n.warn=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return o("warn",s,n)},n.debug=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return o("debug",s,n)},n}("VIDEOJS"),El=d.createLogger,Mn=k(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t,s,n=1;n<arguments.length;n++){t=arguments[n];for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},t.apply(this,arguments)}e.exports=t}),g1=Object.prototype.toString,Cl=function(e){return pe(e)?Object.keys(e):[]};function He(e,t){Cl(e).forEach(function(n){return t(e[n],n)})}function p(e){for(var n=arguments.length,s=new Array(1<n?n-1:0),t=1;t<n;t++)s[t-1]=arguments[t];return Object.assign?Mn.apply(void 0,[e].concat(s)):(s.forEach(function(t){t&&He(t,function(t,n){e[n]=t})}),e)}function pe(e){return!!e&&"object"==typeof e}function yt(e){return pe(e)&&"[object Object]"===g1.call(e)&&e.constructor===Object}function _t(e,n){if(!e||!n)return"";if("function"!=typeof t.getComputedStyle)return"";var s=t.getComputedStyle(e);return s?s.getPropertyValue(n)||s[n]:""}var bs,gs,ps,_s,O=t.navigator&&t.navigator.userAgent||"",xl=/AppleWebKit\/([\d.]+)/i.exec(O),p1=xl?parseFloat(xl.pop()):null,yl=/iPod/i.test(O),h1=(bs=O.match(/OS (\d+)_/i))&&bs[1]?bs[1]:null,ue=/Android/i.test(O),uo=function(){if(e=O.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i),!e)return null;var e,t=e[1]&&parseFloat(e[1]),n=e[2]&&parseFloat(e[2]);return t&&n?parseFloat(e[1]+"."+e[2]):t||null}(),jl=ue&&uo<5&&p1<537,ml=/Firefox/i.test(O),Kt=/Edg/i.test(O),le=!Kt&&(/Chrome/i.test(O)||/CriOS/i.test(O)),ul=(gs=O.match(/(Chrome|CriOS)\/(\d+)/))&&gs[2]?parseFloat(gs[2]):null,Zt=(ps=/MSIE\s(\d+)\.\d/.exec(O),!(_s=ps&&parseFloat(ps[1]))&&/Trident\/7.0/i.test(O)&&/rv:11.0/.test(O)&&(_s=11),_s),ri=/Safari/i.test(O)&&!le&&!ue&&!Kt,dl=/Windows/i.test(O),Ie=Boolean(ot()&&("ontouchstart"in t||t.navigator.maxTouchPoints||t.DocumentTouch&&t.document instanceof t.DocumentTouch)),si=/iPad/i.test(O)||ri&&Ie&&!/iPhone/i.test(O),Qo=/iPhone/i.test(O)&&!si,q=Qo||si||yl,Xn=(ri||q)&&!le,u1=Object.freeze({__proto__:null,IS_IPOD:yl,IOS_VERSION:h1,IS_ANDROID:ue,ANDROID_VERSION:uo,IS_NATIVE_ANDROID:jl,IS_FIREFOX:ml,IS_EDGE:Kt,IS_CHROME:le,CHROME_VERSION:ul,IE_VERSION:Zt,IS_SAFARI:ri,IS_WINDOWS:dl,TOUCH_ENABLED:Ie,IS_IPAD:si,IS_IPHONE:Qo,IS_IOS:q,IS_ANY_SAFARI:Xn});function cl(e){return"string"==typeof e&&Boolean(e.trim())}function rl(e){if(0<=e.indexOf(" "))throw new Error("class has illegal whitespace characters")}function ot(){return s===t.document}function lt(e){return pe(e)&&1===e.nodeType}function sl(){try{return t.parent!==t.self}catch{return!0}}function nl(e){return function(t,n){if(!cl(t))return s[e](null);cl(n)&&(n=s.querySelector(n));var o=lt(n)?n:s;return o[e]&&o[e](t)}}function g(e,t,n,o){void 0===e&&(e="div"),void 0===t&&(t={}),void 0===n&&(n={});var i=s.createElement(e);return Object.getOwnPropertyNames(t).forEach(function(e){var n=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(d.warn(`Setting attributes in the second argument of createEl()
has been deprecated. Use the third argument instead.
createEl(type, properties, attributes). Attempting to set `+e+" to "+n+"."),i.setAttribute(e,n)):"textContent"===e?ft(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)}),Object.getOwnPropertyNames(n).forEach(function(e){i.setAttribute(e,n[e])}),o&&Io(i,o),i}function ft(e,t){return"undefined"==typeof e.textContent?e.innerText=t:e.textContent=t,e}function Ns(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Ne(e,t){return rl(t),e.classList?e.classList.contains(t):function(e){return new RegExp("(^|\\s)"+e+"($|\\s)")}(t).test(e.className)}function re(e,t){return e.classList?e.classList.add(t):Ne(e,t)||(e.className=(e.className+" "+t).trim()),e}function kt(e,t){return e.classList?e.classList.remove(t):(rl(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function el(e,t,n){var s=Ne(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!s),n!==s)return n?re(e,t):kt(e,t),e}function Jc(e,t){Object.getOwnPropertyNames(t).forEach(function(n){var s=t[n];null===s||"undefined"==typeof s||!1===s?e.removeAttribute(n):e.setAttribute(n,!0===s?"":s)})}function ae(e){var t,n,s,o,i={},a=",autoplay,controls,playsinline,loop,muted,default,defaultMuted,";if(e&&e.attributes&&0<e.attributes.length)for(n=e.attributes,t=n.length-1;0<=t;t--)s=n[t].name,o=n[t].value,"boolean"!=typeof e[s]&&-1===a.indexOf(","+s+",")||(o=null!==o),i[s]=o;return i}function Zc(e,t){return e.getAttribute(t)}function Gt(e,t,n){e.setAttribute(t,n)}function gn(e,t){e.removeAttribute(t)}function Xc(){s.body.focus(),s.onselectstart=function(){return!1}}function qc(){s.onselectstart=function(){return!0}}function $o(e){if(e&&e.getBoundingClientRect&&e.parentNode){var n=e.getBoundingClientRect(),t={};return["bottom","height","left","right","top","width"].forEach(function(e){void 0!==n[e]&&(t[e]=n[e])}),t.height||(t.height=parseFloat(_t(e,"height"))),t.width||(t.width=parseFloat(_t(e,"width"))),t}}function zt(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};for(var o=e.offsetWidth,i=e.offsetHeight,t=0,n=0;e.offsetParent&&e!==s[un.fullscreenElement];)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:t,top:n,width:o,height:i}}function Ps(e,t){if(n={x:0,y:0},q)for(s=e;s&&"html"!==s.nodeName.toLowerCase();)i=_t(s,"transform"),/^matrix/.test(i)?(a=i.slice(7,-1).split(/,\s/).map(Number),n.x+=a[4],n.y+=a[5]):/^matrix3d/.test(i)&&(r=i.slice(9,-1).split(/,\s/).map(Number),n.x+=r[12],n.y+=r[13]),s=s.parentNode;var n,s,i,a,r,c={},u=zt(t.target),o=zt(e),h=o.width,m=o.height,l=t.offsetY-(o.top-u.top),d=t.offsetX-(o.left-u.left);return t.changedTouches&&(d=t.changedTouches[0].pageX-o.left,l=t.changedTouches[0].pageY+o.top,q&&(d-=n.x,l-=n.y)),c.y=1-Math.max(0,Math.min(1,l/m)),c.x=Math.max(0,Math.min(1,d/h)),c}function Bc(e){return pe(e)&&3===e.nodeType}function oo(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Ic(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),lt(e)||Bc(e)?e:"string"==typeof e&&/\S/.test(e)?s.createTextNode(e):void 0}).filter(function(e){return e})}function Io(e,t){return Ic(t).forEach(function(t){return e.appendChild(t)}),e}function Hc(e,t){return Io(oo(e),t)}function ht(e){return void 0===e.button&&void 0===e.buttons||0===e.button&&void 0===e.buttons||"mouseup"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}var Ms,je=nl("querySelector"),Rc=nl("querySelectorAll"),Lc=Object.freeze({__proto__:null,isReal:ot,isEl:lt,isInFrame:sl,createEl:g,textContent:ft,prependTo:Ns,hasClass:Ne,addClass:re,removeClass:kt,toggleClass:el,setAttributes:Jc,getAttributes:ae,getAttribute:Zc,setAttribute:Gt,removeAttribute:gn,blockTextSelection:Xc,unblockTextSelection:qc,getBoundingClientRect:$o,findPosition:zt,getPointerPosition:Ps,isTextNode:Bc,emptyEl:oo,normalizeContent:Ic,appendContent:Io,insertContent:Hc,isSingleLeftClick:ht,$:je,$$:Rc}),Tc=!1,d1=function(){if(ot()&&!1!==Ms.options.autoSetup){var e,n,o,i=Array.prototype.slice.call(s.getElementsByTagName("video")),a=Array.prototype.slice.call(s.getElementsByTagName("audio")),r=Array.prototype.slice.call(s.getElementsByTagName("video-js")),t=i.concat(a,r);if(t&&0<t.length)for(n=0,o=t.length;n<o;n++){if(e=t[n],!e||!e.getAttribute){Fs(1);break}void 0===e.player&&null!==e.getAttribute("data-setup")&&Ms(e)}else Tc||Fs(1)}};function Fs(e,n){n&&(Ms=n),t.setTimeout(d1,e)}function ks(){Tc=!0,t.removeEventListener("load",ks)}ot()&&("complete"===s.readyState?ks():t.addEventListener("load",ks));function Mc(e){var t=s.createElement("style");return t.className=e,t}function Sc(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t}kc=3;function ge(){return kc++}t.WeakMap||(Ac=function(){function n(){this.vdata="vdata"+Math.floor(t.performance&&t.performance.now()||Date.now()),this.data={}}var e=n.prototype;return e.set=function(e,t){var n=e[this.vdata]||ge();return e[this.vdata]||(e[this.vdata]=n),this.data[n]=t,this},e.get=function(e){var t=e[this.vdata];if(t)return this.data[t];d("We have no data for this element",e)},e.has=function(e){return e[this.vdata]in this.data},e.delete=function(e){var t=e[this.vdata];t&&(delete this.data[t],delete e[this.vdata])},n}()),M=t.WeakMap?new WeakMap:new Ac;function Ec(e,t){if(M.has(e)){var n=M.get(e);0===n.handlers[t].length&&(delete n.handlers[t],e.removeEventListener?e.removeEventListener(t,n.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,n.dispatcher)),Object.getOwnPropertyNames(n.handlers).length<=0&&(delete n.handlers,delete n.dispatcher,delete n.disabled),0===Object.getOwnPropertyNames(n).length&&M.delete(e)}}function pi(e,t,n,s){n.forEach(function(n){e(t,n,s)})}function an(e){if(e.fixed_)return e;function r(){return!0}function c(){return!1}if(!e||!e.isPropagationStopped){n=e||t.event;for(o in e={},n)"layerX"!==o&&"layerY"!==o&&"keyLocation"!==o&&"webkitMovementX"!==o&&"webkitMovementY"!==o&&("returnValue"===o&&n.preventDefault||(e[o]=n[o]));if(e.target||(e.target=e.srcElement||s),e.relatedTarget||(e.relatedTarget=e.fromElement===e.target?e.toElement:e.fromElement),e.preventDefault=function(){n.preventDefault&&n.preventDefault(),e.returnValue=!1,n.returnValue=!1,e.defaultPrevented=!0},e.defaultPrevented=!1,e.stopPropagation=function(){n.stopPropagation&&n.stopPropagation(),e.cancelBubble=!0,n.cancelBubble=!0,e.isPropagationStopped=r},e.isPropagationStopped=c,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=r,e.stopPropagation()},e.isImmediatePropagationStopped=c,null!==e.clientX&&void 0!==e.clientX){var n,o,i=s.documentElement,a=s.body;e.pageX=e.clientX+(i&&i.scrollLeft||a&&a.scrollLeft||0)-(i&&i.clientLeft||a&&a.clientLeft||0),e.pageY=e.clientY+(i&&i.scrollTop||a&&a.scrollTop||0)-(i&&i.clientTop||a&&a.clientTop||0)}e.which=e.charCode||e.keyCode,null!==e.button&&void 0!==e.button&&(e.button=1&e.button?0:4&e.button?1:2&e.button?2:0)}return e.fixed_=!0,e}Cc=function(){if("boolean"!=typeof Hn){Hn=!1;try{var e=Object.defineProperty({},"passive",{get:function(){Hn=!0}});t.addEventListener("test",null,e),t.removeEventListener("test",null,e)}catch{}}return Hn},Oc=["touchstart","touchmove"];function K(e,t,n){if(Array.isArray(t))return pi(K,e,t,n);M.has(e)||M.set(e,{});var o,s=M.get(e);s.handlers||(s.handlers={}),s.handlers[t]||(s.handlers[t]=[]),n.guid||(n.guid=ge()),s.handlers[t].push(n),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,n){if(!s.disabled&&(t=an(t),o=s.handlers[t.type],o))for(var o,a=o.slice(0),i=0,r=a.length;i<r&&!t.isImmediatePropagationStopped();i++)try{a[i].call(e,t,n)}catch(e){d.error(e)}}),1===s.handlers[t].length&&(e.addEventListener?(o=!1,Cc()&&-1<Oc.indexOf(t)&&(o={passive:!0}),e.addEventListener(t,s.dispatcher,o)):e.attachEvent&&e.attachEvent("on"+t,s.dispatcher))}function A(e,t,n){if(M.has(e)){var o,i,a,r,s=M.get(e);if(s.handlers){if(Array.isArray(t))return pi(A,e,t,n);if(a=function(e,t){s.handlers[t]=[],Ec(e,t)},void 0!==t){if(o=s.handlers[t],o)if(n){if(n.guid)for(i=0;i<o.length;i++)o[i].guid===n.guid&&o.splice(i--,1);Ec(e,t)}else a(e,t)}else for(r in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},r)&&a(e,r)}}}function Ye(e,t,n){var o,i=M.has(e)?M.get(e):{},s=e.parentNode||e.ownerDocument;return"string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=an(t),i.dispatcher&&i.dispatcher.call(e,t,n),s&&!t.isPropagationStopped()&&!0===t.bubbles?Ye.call(null,s,t,n):!s&&!t.defaultPrevented&&t.target&&t.target[t.type]&&(M.has(t.target)||M.set(t.target,{}),o=M.get(t.target),t.target[t.type]&&(o.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),o.disabled=!1)),!t.defaultPrevented}function _n(e,t,n){if(Array.isArray(t))return pi(_n,e,t,n);function s(){A(e,t,s),n.apply(this,arguments)}s.guid=n.guid=n.guid||ge(),K(e,t,s)}function wc(e,t,n){function s(){A(e,t,s),n.apply(this,arguments)}s.guid=n.guid=n.guid||ge(),K(e,t,s)}function u(e,t,n){t.guid||(t.guid=ge());var s=t.bind(e);return s.guid=n?n+"_"+t.guid:t.guid,s}function Re(e,n){var s=t.performance.now();return function(){var o=t.performance.now();n<=o-s&&(e.apply(void 0,arguments),s=o)}}function z(){}_c=Object.freeze({__proto__:null,fixEvent:an,on:K,off:A,trigger:Ye,one:_n,any:wc}),z.prototype.allowedEvents_={},z.prototype.addEventListener=z.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},K(this,e,t),this.addEventListener=n},z.prototype.removeEventListener=z.prototype.off=function(e,t){A(this,e,t)},z.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},_n(this,e,t),this.addEventListener=n},z.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},wc(this,e,t),this.addEventListener=n},z.prototype.dispatchEvent=z.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=an(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Ye(this,e)},z.prototype.queueTrigger=function(e){s=this,Nt=Nt||new Map;var s,i,a,o=e.type||e,n=Nt.get(this);n||(n=new Map,Nt.set(this,n)),i=n.get(o),n.delete(o),t.clearTimeout(i),a=t.setTimeout(function(){0===n.size&&(n=null,Nt.delete(s)),s.trigger(e)},0),n.set(o,a)};function Sn(e){return"function"==typeof e.name?e.name():"string"==typeof e.name?e.name:e.name_?e.name_:e.constructor&&e.constructor.name?e.constructor.name:typeof e}function Mo(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length}function Fn(e,t,n){if(!e||!e.nodeName&&!ee(e))throw new Error("Invalid target for "+Sn(t)+"#"+n+"; must be a DOM node or evented object.")}function yc(e,t,n){if(!Mo(e))throw new Error("Invalid event type for "+Sn(t)+"#"+n+"; must be a non-empty string or array.")}function jc(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+Sn(t)+"#"+n+"; must be a function.")}function ko(e,t,n){var s,o,i,a=t.length<3||t[0]===e||t[0]===e.eventBusEl_;return i=a?(s=e.eventBusEl_,3<=t.length&&t.shift(),o=t[0],t[1]):(s=t[0],o=t[1],t[2]),Fn(s,e,n),yc(o,e,n),jc(i,e,n),{isTargetingSelf:a,target:s,type:o,listener:i=u(e,i)}}function Le(e,t,n,s){Fn(e,e,t),e.nodeName?_c[t](e,n,s):e[t](n,s)}ee=function(e){return e instanceof z||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},pc={on:function(){for(var a=this,r=arguments.length,c=new Array(r),e=0;e<r;e++)c[e]=arguments[e];var s,i,t=ko(this,c,"on"),d=t.isTargetingSelf,o=t.target,l=t.type,n=t.listener;Le(o,"on",l,n),!d&&(s=function(){return a.off(o,l,n)},s.guid=n.guid,i=function(){return a.off("dispose",s)},i.guid=n.guid,Le(this,"on","dispose",s),Le(o,"on","dispose",i))},one:function(){for(var c=this,a=arguments.length,r=new Array(a),e=0;e<a;e++)r[e]=arguments[e];var i,t=ko(this,r,"one"),l=t.isTargetingSelf,n=t.target,s=t.type,o=t.listener;l?Le(n,"one",s,o):(i=function e(){c.off(n,s,e);for(var i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];o.apply(null,a)},i.guid=o.guid,Le(n,"one",s,i))},any:function(){for(var c=this,a=arguments.length,r=new Array(a),e=0;e<a;e++)r[e]=arguments[e];var i,t=ko(this,r,"any"),l=t.isTargetingSelf,n=t.target,s=t.type,o=t.listener;l?Le(n,"any",s,o):(i=function e(){c.off(n,s,e);for(var i=arguments.length,a=new Array(i),t=0;t<i;t++)a[t]=arguments[t];o.apply(null,a)},i.guid=o.guid,Le(n,"any",s,i))},off:function(e,t,n){if(!e||Mo(e))A(this.eventBusEl_,e,t);else{var s=e,o=t;Fn(s,this,"off"),yc(o,this,"off"),jc(n,this,"off"),n=u(this,n),this.off("dispose",n),s.nodeName?(A(s,o,n),A(s,"dispose",n)):ee(s)&&(s.off(o,n),s.off("dispose",n))}},trigger:function(e,t){Fn(this.eventBusEl_,this,"trigger");var n,s=e&&"string"!=typeof e?e.type:e;if(!Mo(s)){if(n="Invalid event type for "+Sn(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.",!e)throw new Error(n);(this.log||d).error(n)}return Ye(this.eventBusEl_,e,t)}};function _o(e,n){void 0===n&&(n={});var s=n.eventBusKey;if(s){if(!e[s].nodeName)throw new Error('The eventBusKey "'+s+'" does not refer to an element.');e.eventBusEl_=e[s]}else e.eventBusEl_=g("span",{className:"vjs-event-bus"});return p(e,pc),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on("dispose",function(){e.off(),t.setTimeout(function(){e.eventBusEl_=null},0)}),e}dc={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),He(e,function(e,s){n.state[s]!==e&&((t=t||{})[s]={from:n.state[s],to:e}),n.state[s]=e}),t&&ee(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function cc(e,t){return p(e,dc),e.state=p({},e.state,t),"function"==typeof e.handleStateChanged&&ee(e)&&e.on("statechanged",e.handleStateChanged),e}function $n(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toLowerCase()})}function b(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function f(){for(var e={},n=arguments.length,s=new Array(n),t=0;t<n;t++)s[t]=arguments[t];return s.forEach(function(t){t&&He(t,function(t,n){yt(t)?(yt(e[n])||(e[n]={}),e[n]=f(e[n],t)):e[n]=t})}),e}var r1=function(){function t(){this.map_={}}var e=t.prototype;return e.has=function(e){return e in this.map_},e.delete=function(e){var t=this.has(e);return delete this.map_[e],t},e.set=function(e,t){return this.map_[e]=t,this},e.forEach=function(e,t){for(var n in this.map_)e.call(t,this.map_[n],n,this)},t}(),n1=t.Map?t.Map:r1,t1=function(){function t(){this.set_={}}var e=t.prototype;return e.has=function(e){return e in this.set_},e.delete=function(e){var t=this.has(e);return delete this.set_[e],t},e.add=function(e){return this.set_[e]=1,this},e.forEach=function(e,t){for(var n in this.set_)e.call(t,n,n,this)},t}(),Os=t.Set?t.Set:t1,n=function(){function n(e,t,n){if(!e&&this.play?this.player_=e=this:this.player_=e,this.isDisposed_=!1,this.parentComponent_=null,this.options_=f({},this.options_),t=this.options_=f(this.options_,t),this.id_=t.id||t.el&&t.el.id,!this.id_){var s=e&&e.id&&e.id()||"no_player";this.id_=s+"_component_"+ge()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(_o(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),cc(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Os,this.setIntervalIds_=new Os,this.rafIds_=new Os,this.namedRafs_=new n1,(this.clearingTimersOnDispose_=!1)!==t.initChildren&&this.initChildren(),this.ready(n),!1!==t.reportTouchActivity&&this.enableTouchActivity()}var e=n.prototype;return e.dispose=function(){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(var e=this.children_.length-1;0<=e;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.parentComponent_=null,this.el_&&(this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),M.has(this.el_)&&M.delete(this.el_),this.el_=null),this.player_=null}},e.isDisposed=function(){return Boolean(this.isDisposed_)},e.player=function(){return this.player_},e.options=function(e){return e&&(this.options_=f(this.options_,e)),this.options_},e.el=function(){return this.el_},e.createEl=function(e,t,n){return g(e,t,n)},e.localize=function(e,t,n){void 0===n&&(n=e);var i=this.player_.language&&this.player_.language(),o=this.player_.languages&&this.player_.languages(),a=o&&o[i],c=i&&i.split("-")[0],r=o&&o[c],s=n;return a&&a[e]?s=a[e]:r&&r[e]&&(s=r[e]),t&&(s=s.replace(/\{(\d+)\}/g,function(e,n){var s=t[n-1],o=s;return"undefined"==typeof s&&(o=e),o})),s},e.handleLanguagechange=function(){},e.contentEl=function(){return this.contentEl_||this.el_},e.id=function(){return this.id_},e.name=function(){return this.name_},e.children=function(){return this.children_},e.getChildById=function(e){return this.childIndex_[e]},e.getChild=function(e){if(e)return this.childNameIndex_[e]},e.getDescendant=function(){for(var t,s,o=arguments.length,e=new Array(o),n=0;n<o;n++)e[n]=arguments[n];e=e.reduce(function(e,t){return e.concat(t)},[]);for(t=this,s=0;s<e.length;s++)if(!(t=t.getChild(e[s]))||!t.getChild)return;return t},e.addChild=function(e,t,s){if(void 0===t&&(t={}),void 0===s&&(s=this.children_.length),"string"==typeof e){i=b(e);var o,i,a,r,c=t.componentClass||i;if(t.name=i,a=n.getComponent(c),!a)throw new Error("Component "+c+" does not exist");if("function"!=typeof a)return null;o=new a(this.player_||this,t)}else o=e;return(o.parentComponent_&&o.parentComponent_.removeChild(o),this.children_.splice(s,0,o),o.parentComponent_=this,"function"==typeof o.id&&(this.childIndex_[o.id()]=o),(i=i||o.name&&b(o.name()))&&(this.childNameIndex_[i]=o,this.childNameIndex_[$n(i)]=o),"function"==typeof o.el&&o.el())&&(r=null,this.children_[s+1]&&(this.children_[s+1].el_?r=this.children_[s+1].el_:lt(this.children_[s+1])&&(r=this.children_[s+1])),this.contentEl().insertBefore(o.el(),r)),o},e.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var n,s=!1,t=this.children_.length-1;0<=t;t--)if(this.children_[t]===e){s=!0,this.children_.splice(t,1);break}s&&(e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[b(e.name())]=null,this.childNameIndex_[$n(e.name())]=null,n=e.el(),n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el()))}},e.initChildren=function(){var s,o,i,t=this,e=this.options_.children;e&&(s=this.options_,i=n.getComponent("Tech"),(o=Array.isArray(e)?e:Object.keys(e)).concat(Object.keys(this.options_).filter(function(e){return!o.some(function(t){return"string"==typeof t?e===t:e===t.name})})).map(function(n){var s,o;return o="string"==typeof n?e[s=n]||t.options_[s]||{}:(s=n.name,n),{name:s,opts:o}}).filter(function(e){var t=n.getComponent(e.opts.componentClass||b(e.name));return t&&!i.isTech(t)}).forEach(function(e){var i,o=e.name,n=e.opts;void 0!==s[o]&&(n=s[o]),!1!==n&&(!0===n&&(n={}),n.playerOptions=t.options_.playerOptions,i=t.addChild(o,n),i&&(t[o]=i))}))},e.buildCSSClass=function(){return""},e.ready=function(e,t){if(void 0===t&&(t=!1),e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))},e.triggerReady=function(){this.isReady_=!0,this.setTimeout(function(){var e=this.readyQueue_;this.readyQueue_=[],e&&0<e.length&&e.forEach(function(e){e.call(this)},this),this.trigger("ready")},1)},e.$=function(e,t){return je(e,t||this.contentEl())},e.$$=function(e,t){return Rc(e,t||this.contentEl())},e.hasClass=function(e){return Ne(this.el_,e)},e.addClass=function(e){re(this.el_,e)},e.removeClass=function(e){kt(this.el_,e)},e.toggleClass=function(e,t){el(this.el_,e,t)},e.show=function(){this.removeClass("vjs-hidden")},e.hide=function(){this.addClass("vjs-hidden")},e.lockShowing=function(){this.addClass("vjs-lock-showing")},e.unlockShowing=function(){this.removeClass("vjs-lock-showing")},e.getAttribute=function(e){return Zc(this.el_,e)},e.setAttribute=function(e,t){Gt(this.el_,e,t)},e.removeAttribute=function(e){gn(this.el_,e)},e.width=function(e,t){return this.dimension("width",e,t)},e.height=function(e,t){return this.dimension("height",e,t)},e.dimensions=function(e,t){this.width(e,!0),this.height(t)},e.dimension=function(e,t,n){if(void 0!==t)return null!==t&&t==t||(t=0),-1!==(""+t).indexOf("%")||-1!==(""+t).indexOf("px")?this.el_.style[e]=t:this.el_.style[e]="auto"===t?"":t+"px",void(n||this.trigger("componentresize"));if(!this.el_)return 0;var s=this.el_.style[e],o=s.indexOf("px");return-1!==o?parseInt(s.slice(0,o),10):parseInt(this.el_["offset"+b(e)],10)},e.currentDimension=function(e){var n,t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");return(t=_t(this.el_,e),0===(t=parseFloat(t))||isNaN(t))&&(n="offset"+b(e),t=this.el_[n]),t},e.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.currentWidth=function(){return this.currentDimension("width")},e.currentHeight=function(){return this.currentDimension("height")},e.focus=function(){this.el_.focus()},e.blur=function(){this.el_.blur()},e.handleKeyDown=function(e){this.player_&&(e.stopPropagation(),this.player_.handleKeyDown(e))},e.handleKeyPress=function(e){this.handleKeyDown(e)},e.emitTapEvents=function(){var e,s=0,n=null;this.on("touchstart",function(o){1===o.touches.length&&(n={pageX:o.touches[0].pageX,pageY:o.touches[0].pageY},s=t.performance.now(),e=!0)}),this.on("touchmove",function(t){if(1<t.touches.length)e=!1;else if(n){var s=t.touches[0].pageX-n.pageX,o=t.touches[0].pageY-n.pageY;10<Math.sqrt(s*s+o*o)&&(e=!1)}});function o(){e=!1}this.on("touchleave",o),this.on("touchcancel",o),this.on("touchend",function(o){!(n=null)===e&&t.performance.now()-s<200&&(o.preventDefault(),this.trigger("tap"))})},e.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var t,n,e=u(this.player(),this.player().reportUserActivity);this.on("touchstart",function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}),n=function(){e(),this.clearInterval(t)},this.on("touchmove",e),this.on("touchend",n),this.on("touchcancel",n)}},e.setTimeout=function(e,n){var s,o=this;return e=u(this,e),this.clearTimersOnDispose_(),s=t.setTimeout(function(){o.setTimeoutIds_.has(s)&&o.setTimeoutIds_.delete(s),e()},n),this.setTimeoutIds_.add(s),s},e.clearTimeout=function(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),t.clearTimeout(e)),e},e.setInterval=function(e,n){e=u(this,e),this.clearTimersOnDispose_();var s=t.setInterval(e,n);return this.setIntervalIds_.add(s),s},e.clearInterval=function(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),t.clearInterval(e)),e},e.requestAnimationFrame=function(e){var n,s=this;return this.supportsRaf_?(this.clearTimersOnDispose_(),e=u(this,e),n=t.requestAnimationFrame(function(){s.rafIds_.has(n)&&s.rafIds_.delete(n),e()}),this.rafIds_.add(n),n):this.setTimeout(e,1e3/60)},e.requestNamedAnimationFrame=function(e,t){var s,n=this;if(!this.namedRafs_.has(e))return this.clearTimersOnDispose_(),t=u(this,t),s=this.requestAnimationFrame(function(){t(),n.namedRafs_.has(e)&&n.namedRafs_.delete(e)}),this.namedRafs_.set(e,s),e},e.cancelNamedAnimationFrame=function(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))},e.cancelAnimationFrame=function(e){return this.supportsRaf_?(this.rafIds_.has(e)&&(this.rafIds_.delete(e),t.cancelAnimationFrame(e)),e):this.clearTimeout(e)},e.clearTimersOnDispose_=function(){var e=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(t){var n=t[0],s=t[1];e[n].forEach(function(t,n){return e[s](n)})}),e.clearingTimersOnDispose_=!1}))},n.registerComponent=function(e,t){if("string"!=typeof e||!e)throw new Error('Illegal component name, "'+e+'"; must be a non-empty string.');var s,o,i,a,r=n.getComponent("Tech"),c=r&&r.isTech(t),l=n===t||n.prototype.isPrototypeOf(t.prototype);if(c||!l)throw a=c?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error('Illegal component, "'+e+'"; '+a+".");if(e=b(e),n.components_||(n.components_={}),s=n.getComponent("Player"),"Player"===e&&s&&s.players&&(o=s.players,i=Object.keys(o),o&&0<i.length&&i.map(function(e){return o[e]}).every(Boolean)))throw new Error("Can not register Player component after player has been created.");return n.components_[e]=t,n.components_[$n(e)]=t},n.getComponent=function(e){if(e&&n.components_)return n.components_[e]},n}();n.prototype.supportsRaf_="function"==typeof t.requestAnimationFrame&&"function"==typeof t.cancelAnimationFrame,n.registerComponent("Component",n),l=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},k(function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t}),k(function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},t(n)}e.exports=t}),i=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t};function Zr(e,t,n,s){return function(e,t,n){if("number"!=typeof t||t<0||n<t)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is non-numeric or out of bounds (0-"+n+").")}(e,s,n.length-1),n[s][t]}function Ds(e){return void 0===e||0===e.length?{length:0,start:function(){throw new Error("This TimeRanges object is empty")},end:function(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Zr.bind(null,"start",0,e),end:Zr.bind(null,"end",1,e)}}function De(e,t){return Array.isArray(e)?Ds(e):void 0===e||void 0===t?Ds():Ds([[e,t]])}function Qr(e,t){var n,s,o,i=0;if(!t)return 0;e&&e.length||(e=De(0,0));for(n=0;n<e.length;n++)o=e.start(n),t<(s=e.end(n))&&(s=t),i+=s-o;return i/t}function T(e){if(e instanceof T)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:pe(e)&&("number"==typeof e.code&&(this.code=e.code),p(this,e)),this.message||(this.message=T.defaultMessages[this.code]||"")}T.prototype.code=0,T.prototype.message="",T.prototype.status=null,T.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],T.defaultMessages={1:"You aborted the media playback",2:"A network error caused the media download to fail part-way.",3:"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.",4:"The media could not be loaded, either because the server or network failed or because the format is not supported.",5:"The media is encrypted and we do not have the keys to decrypt it."};for(ze=0;ze<T.errorTypes.length;ze++)T[T.errorTypes[ze]]=ze,T.prototype[T.errorTypes[ze]]=ze;Yr=function(e,t){var n,s=null;try{n=JSON.parse(e,t)}catch(e){s=e}return[s,n]};function Ft(e){return e!=null&&"function"==typeof e.then}function Te(e){Ft(e)&&e.then(null,function(){})}function qr(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(function(t,n){return e[n]&&(t[n]=e[n]),t},{cues:e.cues&&Array.prototype.map.call(e.cues,function(e){return{startTime:e.startTime,endTime:e.endTime,text:e.text,id:e.id}})})}var Qu=function(e){var t=e.$$("track"),n=Array.prototype.map.call(t,function(e){return e.track});return Array.prototype.map.call(t,function(e){var t=qr(e.track);return e.src&&(t.src=e.src),t}).concat(Array.prototype.filter.call(e.textTracks(),function(e){return-1===n.indexOf(e)}).map(qr))},Gu=function(e,t){return e.forEach(function(e){var n=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(e){return n.addCue(e)})}),t.textTracks()},c=k(function(e,t){function a(e){if(e&&"object"==typeof e){var t,n,a=e.which||e.keyCode||e.charCode;a&&(e=a)}return"number"==typeof e?i[e]:(t=String(e),(n=s[t.toLowerCase()])||(n=o[t.toLowerCase()])||(1===t.length?t.charCodeAt(0):void 0))}a.isEventKey=function(e,t){if(e&&"object"==typeof e){var i,n=e.which||e.keyCode||e.charCode;if(n==null)return!1;if("string"==typeof t){{if(i=s[t.toLowerCase()])return i===n;if(i=o[t.toLowerCase()])return i===n}}else if("number"==typeof t)return t===n;return!1}};var n,i,r,s=(t=e.exports=a).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},o=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91};for(n=97;n<123;n++)s[String.fromCharCode(n)]=n-32;for(n=48;n<58;n++)s[n-48]=n;for(n=1;n<13;n++)s["f"+n]=n+111;for(n=0;n<10;n++)s["numpad "+n]=n+96;i=t.names=t.title={};for(n in s)i[s[n]]=n;for(r in o)s[r]=o[r]}),Ys=(c.code,c.codes,c.aliases,c.names,c.title,"vjs-modal-dialog"),Qe=function(e){function o(t,n){var s;return(s=e.call(this,t,n)||this).opened_=s.hasBeenOpened_=s.hasBeenFilled_=!1,s.closeable(!s.options_.uncloseable),s.content(s.options_.content),s.contentEl_=g("div",{className:Ys+"-content"},{role:"document"}),s.descEl_=g("p",{className:Ys+"-description vjs-control-text",id:s.el().getAttribute("aria-describedby")}),ft(s.descEl_,s.description()),s.el_.appendChild(s.descEl_),s.el_.appendChild(s.contentEl_),s}i(o,e);var n=o.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog"})},n.dispose=function(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,e.prototype.dispose.call(this)},n.buildCSSClass=function(){return Ys+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},n.label=function(){return this.localize(this.options_.label||"Modal Window")},n.description=function(){var e=this.options_.description||this.localize("This is a modal window.");return this.closeable()&&(e+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button.")),e},n.open=function(){if(!this.opened_){var e=this.player();this.trigger("beforemodalopen"),this.opened_=!0,!this.options_.fillAlways&&(this.hasBeenOpened_||this.hasBeenFilled_)||this.fill(),this.wasPlaying_=!e.paused(),this.options_.pauseOnOpen&&this.wasPlaying_&&e.pause(),this.on("keydown",this.handleKeyDown),this.hadControls_=e.controls(),e.controls(!1),this.show(),this.conditionalFocus_(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}},n.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},n.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.off("keydown",this.handleKeyDown),this.hadControls_&&e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}},n.closeable=function(e){if("boolean"==typeof e){var s,n=this.closeable_=!!e,t=this.getChild("closeButton");n&&!t&&(s=this.contentEl_,this.contentEl_=this.el_,t=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=s,this.on(t,"close",this.close)),!n&&t&&(this.off(t,"close",this.close),this.removeChild(t),t.dispose())}return this.closeable_},n.fill=function(){this.fillWith(this.content())},n.fillWith=function(e){var s,t=this.contentEl(),n=t.parentNode,o=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,n.removeChild(t),this.empty(),Hc(t,e),this.trigger("modalfill"),o?n.insertBefore(t,o):n.appendChild(t),s=this.getChild("closeButton"),s&&n.appendChild(s.el_)},n.empty=function(){this.trigger("beforemodalempty"),oo(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return"undefined"!=typeof e&&(this.content_=e),this.content_},n.conditionalFocus_=function(){var e=s.activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,!t.contains(e)&&t!==e||(this.previouslyActiveEl_=e,this.focus())},n.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)},n.handleKeyDown=function(e){if(e.stopPropagation(),c.isEventKey(e,"Escape")&&this.closeable())return e.preventDefault(),void this.close();if(c.isEventKey(e,"Tab")){for(var n,t=this.focusableEls_(),i=this.el_.querySelector(":focus"),o=0;o<t.length;o++)if(i===t[o]){n=o;break}s.activeElement===this.el_&&(n=0),e.shiftKey&&0===n?(t[t.length-1].focus(),e.preventDefault()):e.shiftKey||n!==t.length-1||(t[0].focus(),e.preventDefault())}},n.focusableEls_=function(){var e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,function(e){return(e instanceof t.HTMLAnchorElement||e instanceof t.HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof t.HTMLInputElement||e instanceof t.HTMLSelectElement||e instanceof t.HTMLTextAreaElement||e instanceof t.HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof t.HTMLIFrameElement||e instanceof t.HTMLObjectElement||e instanceof t.HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")})},o}(n);Qe.prototype.options_={pauseOnOpen:!0,temporary:!0},n.registerComponent("ModalDialog",Qe),Me=function(e){function t(t){void 0===t&&(t=[]),(n=e.call(this)||this).tracks_=[],Object.defineProperty(l(n),"length",{get:function(){return this.tracks_.length}});for(var n,s=0;s<t.length;s++)n.addTrack(t[s]);return n}i(t,e);var n=t.prototype;return n.addTrack=function(e){var n=this,t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=function(){n.trigger({track:e,type:"labelchange",target:n})},ee(e)&&e.addEventListener("labelchange",e.labelchange_)},n.removeTrack=function(e){for(var n,t=0,s=this.length;t<s;t++)if(this[t]===e){(n=this[t]).off&&n.off(),this.tracks_.splice(t,1);break}n&&this.trigger({track:n,type:"removetrack",target:this})},n.getTrackById=function(e){for(var n,s=null,t=0,o=this.length;t<o;t++)if(n=this[t],n.id===e){s=n;break}return s},t}(z);for(Yu in Me.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Me.prototype.allowedEvents_)Me.prototype["on"+Yu]=null;function mo(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].enabled=!1)}function bo(e,t){for(var n=0;n<e.length;n++)Object.keys(e[n]).length&&t.id!==e[n].id&&(e[n].selected=!1)}function So(e){var n,i,a,c,r=["protocol","hostname","port","pathname","search","hash","host"],o=s.createElement("a");o.href=e,c=""===o.host&&"file:"!==o.protocol,c&&((i=s.createElement("div")).innerHTML='<a href="'+e+'"></a>',o=i.firstChild,i.setAttribute("style","display:none; position:absolute;"),s.body.appendChild(i));for(n={},a=0;a<r.length;a++)n[r[a]]=o[r[a]];return"http:"===n.protocol&&(n.host=n.host.replace(/:80$/,"")),"https:"===n.protocol&&(n.host=n.host.replace(/:443$/,"")),n.protocol||(n.protocol=t.location.protocol),c&&s.body.removeChild(i),n}function Rr(e){if(!e.match(/^https?:\/\//)){var t=s.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e}function Lo(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^/]+?)(\.([^./?]+)))(?:[/]*|[?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""}function wn(e,n){void 0===n&&(n=t.location);var s=So(e);return(":"===s.protocol?n.protocol:s.protocol)+s.host!==n.protocol+n.host}var Bu=function(e){function t(t){void 0===t&&(t=[]);for(var s,n=t.length-1;0<=n;n--)if(t[n].enabled){mo(t,t[n]);break}return(s=e.call(this,t)||this).changing_=!1,s}i(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.enabled&&mo(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,mo(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("enabledchange",t.enabledChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.enabledChange_&&(t.removeEventListener("enabledchange",t.enabledChange_),t.enabledChange_=null)},t}(Me),Iu=function(e){function t(t){void 0===t&&(t=[]);for(var s,n=t.length-1;0<=n;n--)if(t[n].selected){bo(t,t[n]);break}return(s=e.call(this,t)||this).changing_=!1,Object.defineProperty(l(s),"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),s}i(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;t.selected&&bo(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,bo(n,t),n.changing_=!1,n.trigger("change"))},t.addEventListener("selectedchange",t.selectedChange_))},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&t.selectedChange_&&(t.removeEventListener("selectedchange",t.selectedChange_),t.selectedChange_=null)},t}(Me),Dr=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.addTrack=function(t){var n=this;e.prototype.addTrack.call(this,t),this.queueChange_||(this.queueChange_=function(){return n.queueTrigger("change")}),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return n.trigger("selectedlanguagechange")}),t.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(t.kind)&&t.addEventListener("modechange",this.triggerSelectedlanguagechange_)},n.removeTrack=function(t){e.prototype.removeTrack.call(this,t),t.removeEventListener&&(this.queueChange_&&t.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&t.removeEventListener("modechange",this.triggerSelectedlanguagechange_))},t}(Me),Hu=function(){function t(e){void 0===e&&(e=[]),this.trackElements_=[],Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var t=0,n=e.length;t<n;t++)this.addTrackElement_(e[t])}var e=t.prototype;return e.addTrackElement_=function(e){var t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get:function(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)},e.getTrackElementByTrack_=function(e){for(var n,t=0,s=this.trackElements_.length;t<s;t++)if(e===this.trackElements_[t].track){n=this.trackElements_[t];break}return n},e.removeTrackElement_=function(e){for(var t=0,n=this.trackElements_.length;t<n;t++)if(e===this.trackElements_[t]){this.trackElements_[t].track&&"function"==typeof this.trackElements_[t].track.off&&this.trackElements_[t].track.off(),"function"==typeof this.trackElements_[t].off&&this.trackElements_[t].off(),this.trackElements_.splice(t,1);break}},t}(),Tr=function(){function e(t){e.prototype.setCues_.call(this,t),Object.defineProperty(this,"length",{get:function(){return this.length_}})}var t=e.prototype;return t.setCues_=function(e){var n=this.length||0,t=0,s=e.length;this.cues_=e,this.length_=e.length;function o(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})}if(n<s)for(t=n;t<s;t++)o.call(this,t)},t.getCueById=function(e){for(var n,s=null,t=0,o=this.length;t<o;t++)if(n=this[t],n.id===e){s=n;break}return s},e}(),Lu={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Nu={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Tu={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Cr={disabled:"disabled",hidden:"hidden",showing:"showing"},yi=function(e){function t(t){void 0===t&&(t={}),n=e.call(this)||this;function i(e){Object.defineProperty(l(n),e,{get:function(){return o[e]},set:function(){}})}var n,a,o={id:t.id||"vjs_track_"+ge(),kind:t.kind||"",language:t.language||""},s=t.label||"";for(a in o)i(a);return Object.defineProperty(l(n),"label",{get:function(){return s},set:function(e){e!==s&&(s=e,this.trigger("labelchange"))}}),n}return i(t,e),t}(z),Fu=Object.freeze({__proto__:null,parseUrl:So,getAbsoluteURL:Rr,getFileExtension:Lo,isCrossOrigin:wn}),_r="undefined"!=typeof window?window:"undefined"!=typeof N?N:"undefined"!=typeof self?self:{},Su=function(e){var t=Au.call(e);return"[object Function]"===t||"function"==typeof e&&"[object RegExp]"!==t||"undefined"!=typeof window&&(e===window.setTimeout||e===window.alert||e===window.confirm||e===window.prompt)},Au=Object.prototype.toString,ku=function(e){var t={};return e&&e.trim().split(`
`).forEach(function(e){var o=e.indexOf(":"),n=e.slice(0,o).trim().toLowerCase(),s=e.slice(o+1).trim();"undefined"==typeof t[n]?t[n]=s:Array.isArray(t[n])?t[n].push(s):t[n]=[t[n],s]}),t},di=de,Eu=de;function gr(e,t,n){var s=e;return Su(t)?(n=t,"string"==typeof e&&(s={uri:e})):s=Mn({},t,{uri:e}),s.callback=n,s}function de(e,t,n){return mr(t=gr(e,t,n))}function mr(e){if("undefined"==typeof e.callback)throw new Error("callback argument missing");r=!1,u=function(t,n,s){r||(r=!0,e.callback(t,n,s))};function l(e){return clearTimeout(a),e instanceof Error||(e=new Error(""+(e||"Unknown XMLHttpRequest Error"))),e.statusCode=0,u(e,p)}function m(){if(!o){clearTimeout(a);var i=e.useXDR&&void 0===t.status?200:1223===t.status?204:t.status,n=p,r=null;return 0!==i?(n={body:function(){var e=void 0;if(e=t.response?t.response:t.responseText||function(e){try{if("document"===e.responseType)return e.responseXML;var t=e.responseXML&&"parsererror"===e.responseXML.documentElement.nodeName;if(""===e.responseType&&!t)return e.responseXML}catch{}return null}(t),f)try{e=JSON.parse(e)}catch{}return e}(),statusCode:i,method:s,headers:{},url:c,rawRequest:t},t.getAllResponseHeaders&&(n.headers=ku(t.getAllResponseHeaders()))):r=new Error("Internal XMLHttpRequest Error"),u(r,n,n.body)}}var o,i,a,r,u,t=e.xhr||null,c=(t=t||(e.cors||e.useXDR?new de.XDomainRequest:new de.XMLHttpRequest)).url=e.uri||e.url,s=t.method=e.method||"GET",d=e.body||e.data,n=t.headers=e.headers||{},h=!!e.sync,f=!1,p={body:void 0,headers:{},statusCode:0,method:s,url:c,rawRequest:t};if("json"in e&&!1!==e.json&&(f=!0,n.accept||n.Accept||(n.Accept="application/json"),"GET"!==s&&"HEAD"!==s&&(n["content-type"]||n["Content-Type"]||(n["Content-Type"]="application/json"),d=JSON.stringify(!0===e.json?d:e.json))),t.onreadystatechange=function(){4===t.readyState&&setTimeout(m,0)},t.onload=m,t.onerror=l,t.onprogress=function(){},t.onabort=function(){o=!0},t.ontimeout=l,t.open(s,c,!h,e.username,e.password),h||(t.withCredentials=!!e.withCredentials),!h&&0<e.timeout&&(a=setTimeout(function(){if(!o){o=!0,t.abort("timeout");var e=new Error("XMLHttpRequest timeout");e.code="ETIMEDOUT",l(e)}},e.timeout)),t.setRequestHeader)for(i in n)n.hasOwnProperty(i)&&t.setRequestHeader(i,n[i]);else if(e.headers&&!function(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}(e.headers))throw new Error("Headers cannot be set on an XDomainRequest object");return"responseType"in e&&(t.responseType=e.responseType),"beforeSend"in e&&"function"==typeof e.beforeSend&&e.beforeSend(t),t.send(d||null),t}de.XMLHttpRequest=_r.XMLHttpRequest||function(){},de.XDomainRequest="withCredentials"in new de.XMLHttpRequest?de.XMLHttpRequest:_r.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){de["delete"===e?"del":e]=function(t,n,s){return(n=gr(t,n,s)).method=e.toUpperCase(),mr(n)}}),di.default=Eu;function lr(e,n){var s=new t.WebVTT.Parser(t,t.vttjs,t.WebVTT.StringDecoder()),o=[];s.oncue=function(e){n.addCue(e)},s.onparsingerror=function(e){o.push(e)},s.onflush=function(){n.trigger({type:"loadeddata",target:n})},s.parse(e),0<o.length&&(t.console&&t.console.groupCollapsed&&t.console.groupCollapsed("Text Track parsing errors for "+n.src),o.forEach(function(e){return d.error(e)}),t.console&&t.console.groupEnd&&t.console.groupEnd()),s.flush()}function cr(e,n){var o,s={uri:e},i=wn(e);i&&(s.cors=i),o="use-credentials"===n.tech_.crossOrigin(),o&&(s.withCredentials=o),di(s,u(this,function(e,s,o){if(e)return d.error(e,s);n.loaded_=!0,"function"!=typeof t.WebVTT?n.tech_&&n.tech_.any(["vttjsloaded","vttjserror"],function(e){if("vttjserror"!==e.type)return lr(o,n);d.error("vttjs failed to load, stopping trying to process "+n.src)}):lr(o,n)}))}Ve=function(e){function n(t){if(void 0===t&&(t={}),!t.tech)throw new Error("A tech was not provided.");var s=f(t,{kind:Tu[t.kind]||"subtitles",language:t.language||t.srclang||""}),o=Cr[s.mode]||"disabled",c=s.default;"metadata"!==s.kind&&"chapters"!==s.kind||(o="hidden"),(n=e.call(this,s)||this).tech_=s.tech,n.cues_=[],n.activeCues_=[],n.preload_=!1!==n.tech_.preloadTextTracks;var n,d=new Tr(n.cues_),r=new Tr(n.activeCues_),i=!1,a=u(l(n),function(){this.tech_.isReady_&&!this.tech_.isDisposed()&&(this.activeCues=this.activeCues,i&&(this.trigger("cuechange"),i=!1))});return n.tech_.one("dispose",function(){n.tech_.off("timeupdate",a)}),"disabled"!==o&&n.tech_.on("timeupdate",a),Object.defineProperties(l(n),{default:{get:function(){return c},set:function(){}},mode:{get:function(){return o},set:function(e){Cr[e]&&o!==e&&(o=e,this.preload_||"disabled"===o||0!==this.cues.length||cr(this.src,this),this.tech_.off("timeupdate",a),"disabled"!==o&&this.tech_.on("timeupdate",a),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?d:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return r;for(var e,s,n=this.tech_.currentTime(),t=[],o=0,a=this.cues.length;o<a;o++)e=this.cues[o],e.startTime<=n&&e.endTime>=n?t.push(e):e.startTime===e.endTime&&e.startTime<=n&&e.startTime+.5>=n&&t.push(e);if(i=!1,t.length!==this.activeCues_.length)i=!0;else for(s=0;s<t.length;s++)-1===this.activeCues_.indexOf(t[s])&&(i=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set:function(){}}}),s.src?(n.src=s.src,n.preload_||(n.loaded_=!0),(n.preload_||"subtitles"!==s.kind&&"captions"!==s.kind)&&cr(n.src,l(n))):n.loaded_=!0,n}i(n,e);var s=n.prototype;return s.addCue=function(e){if(n=e,t.vttjs&&!(e instanceof t.vttjs.VTTCue)){for(o in n=new t.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)o in n||(n[o]=e[o]);n.id=e.id,n.originalCue_=e}for(var n,o,i=this.tech_.textTracks(),s=0;s<i.length;s++)i[s]!==this&&i[s].removeCue(n);this.cues_.push(n),this.cues.setCues_(this.cues_)},s.removeCue=function(e){for(var t,n=this.cues_.length;n--;)if(t=this.cues_[n],t===e||t.originalCue_&&t.originalCue_===e){this.cues_.splice(n,1),this.cues.setCues_(this.cues_);break}},n}(yi),Ve.prototype.allowedEvents_={cuechange:"cuechange"};var rr=function(e){function t(t){void 0===t&&(t={});var s=f(t,{kind:Nu[t.kind]||""}),n=e.call(this,s)||this,o=!1;return Object.defineProperty(l(n),"enabled",{get:function(){return o},set:function(e){"boolean"==typeof e&&e!==o&&(o=e,this.trigger("enabledchange"))}}),s.enabled&&(n.enabled=s.enabled),n.loaded_=!0,n}return i(t,e),t}(yi),or=function(e){function t(t){void 0===t&&(t={});var s=f(t,{kind:Lu[t.kind]||""}),n=e.call(this,s)||this,o=!1;return Object.defineProperty(l(n),"selected",{get:function(){return o},set:function(e){"boolean"==typeof e&&e!==o&&(o=e,this.trigger("selectedchange"))}}),s.selected&&(n.selected=s.selected),n}return i(t,e),t}(yi),qe=function(e){function t(t){void 0===t&&(t={});var o,n=e.call(this)||this,s=new Ve(t);return n.kind=s.kind,n.src=s.src,n.srclang=s.language,n.label=s.label,n.default=s.default,Object.defineProperties(l(n),{readyState:{get:function(){return o}},track:{get:function(){return s}}}),o=0,s.addEventListener("loadeddata",function(){o=2,n.trigger({type:"load",target:l(n)})}),n}return i(t,e),t}(z);qe.prototype.allowedEvents_={load:"load"},qe.NONE=0,qe.LOADING=1,qe.LOADED=2,qe.ERROR=3,$={audio:{ListClass:Bu,TrackClass:rr,capitalName:"Audio"},video:{ListClass:Iu,TrackClass:or,capitalName:"Video"},text:{ListClass:Dr,TrackClass:Ve,capitalName:"Text"}},Object.keys($).forEach(function(e){$[e].getterName=e+"Tracks",$[e].privateName=e+"Tracks_"}),Ae={remoteText:{ListClass:Dr,TrackClass:Ve,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Hu,TrackClass:qe,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},S=Mn({},$,Ae),Ae.names=Object.keys(Ae),$.names=Object.keys($),S.names=[].concat(Ae.names).concat($.names),On=Object.create||function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return sr.prototype=e,new sr};function sr(){}function X(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function qo(e){function n(e,t,n,s){return 3600*(0|e)+60*(0|t)+(0|n)+(0|s)/1e3}var t=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return t?t[3]?n(t[1],t[2],t[3].replace(":",""),t[4]):59<t[1]?n(t[1],t[2],0,t[4]):n(0,t[1],t[2],t[4]):null}function Ut(){this.values=On(null)}function Wt(e,t,n,s){var o,a,i=s?e.split(s):[e];for(a in i)"string"==typeof i[a]&&(o=i[a].split(n),2===o.length&&t(o[0],o[1]))}function Cu(e,t,n){var o=e;function i(){var t=qo(e);if(null===t)throw new X(X.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function s(){e=e.replace(/^\s+/,"")}if(s(),t.startTime=i(),s(),"-->"!==e.substr(0,3))throw new X(X.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '-->'): "+o);e=e.substr(3),s(),t.endTime=i(),s(),function(e,t){var s=new Ut;Wt(e,function(e,t){switch(e){case"region":for(i=n.length-1;0<=i;i--)if(n[i].id===t){s.set(e,n[i].region);break}break;case"vertical":s.alt(e,t,["rl","lr"]);break;case"line":var i,o=t.split(","),a=o[0];s.integer(e,a),s.percent(e,a)&&s.set("snapToLines",!1),s.alt(e,a,["auto"]),2===o.length&&s.alt("lineAlign",o[1],["start","center","end"]);break;case"position":o=t.split(","),s.percent(e,o[0]),2===o.length&&s.alt("positionAlign",o[1],["start","center","end"]);break;case"size":s.percent(e,t);break;case"align":s.alt(e,t,["start","center","end","left","right"])}},/:/,/\s/),t.region=s.get("region",null),t.vertical=s.get("vertical","");try{t.line=s.get("line","auto")}catch{}t.lineAlign=s.get("lineAlign","start"),t.snapToLines=s.get("snapToLines",!0),t.size=s.get("size",100);try{t.align=s.get("align","center")}catch{t.align=s.get("align","middle")}try{t.position=s.get("position","auto")}catch{t.position=s.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=s.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}((X.prototype=On(Error.prototype)).constructor=X).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},Ut.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var s=0;s<n.length;++s)if(t===n[s]){this.set(e,t);break}},integer:function(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return!!(t.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&0<=(t=parseFloat(t))&&t<=100)&&(this.set(e,t),!0)}};var Fo=s.createElement("textarea"),xu={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},tr={white:"rgba(255,255,255,1)",lime:"rgba(0,255,0,1)",cyan:"rgba(0,255,255,1)",red:"rgba(255,0,0,1)",yellow:"rgba(255,255,0,1)",magenta:"rgba(255,0,255,1)",blue:"rgba(0,0,255,1)",black:"rgba(0,0,0,1)"},Ou={v:"title",lang:"lang"},er={rt:"ruby"};function Ja(e,t){function m(){if(!t)return null;var e,n=t.match(/^([^<]*)(<[^>]*>?)?/);return e=n[1]?n[1]:n[2],t=t.substr(e.length),e}function f(t,n){if(s=xu[t],!s)return null;var s,o=e.document.createElement(s),i=Ou[t];return i&&n&&(o[i]=n.trim()),o}for(var n,s,i,r,c,l,u,h,d=e.document.createElement("div"),o=d,a=[];null!==(n=m());)if("<"!==n[0])o.appendChild(e.document.createTextNode((r=n,Fo.innerHTML=r,r=Fo.textContent,Fo.textContent="",r)));else{if("/"===n[1]){a.length&&a[a.length-1]===n.substr(2).replace(">","")&&(a.pop(),o=o.parentNode);continue}if(c=qo(n.substr(1,n.length-2)),c){s=e.document.createProcessingInstruction("timestamp",c),o.appendChild(s);continue}if(i=n.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/),!i)continue;if(!(s=f(i[1],i[3])))continue;if(h=o,er[(u=s).localName]&&er[u.localName]!==h.localName)continue;i[2]&&(l=i[2].split("."),l.forEach(function(e){var o,i,t=/^bg_/.test(e),n=t?e.slice(3):e;tr.hasOwnProperty(n)&&(o=t?"background-color":"color",i=tr[n],s.style[o]=i)}),s.className=l.join(" ")),a.push(i[1]),o.appendChild(s),o=s}return d}po=[[1470,1470],[1472,1472],[1475,1475],[1478,1478],[1488,1514],[1520,1524],[1544,1544],[1547,1547],[1549,1549],[1563,1563],[1566,1610],[1645,1647],[1649,1749],[1765,1766],[1774,1775],[1786,1805],[1807,1808],[1810,1839],[1869,1957],[1969,1969],[1984,2026],[2036,2037],[2042,2042],[2048,2069],[2074,2074],[2084,2084],[2088,2088],[2096,2110],[2112,2136],[2142,2142],[2208,2208],[2210,2220],[8207,8207],[64285,64285],[64287,64296],[64298,64310],[64312,64316],[64318,64318],[64320,64321],[64323,64324],[64326,64449],[64467,64829],[64848,64911],[64914,64967],[65008,65020],[65136,65140],[65142,65276],[67584,67589],[67592,67592],[67594,67637],[67639,67640],[67644,67644],[67647,67669],[67671,67679],[67840,67867],[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553,126553],[126555,126555],[126557,126557],[126559,126559],[126561,126562],[126564,126564],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126590,126590],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[1114109,1114109]];function wu(e){for(var n,t=0;t<po.length;t++)if(n=po[t],e>=n[0]&&e<=n[1])return!0;return!1}function Pn(){}function ho(e,t,n){Pn.call(this),this.cue=t,this.cueDiv=Ja(e,t.text);var s,o={color:"rgba(255, 255, 255, 1)",backgroundColor:"rgba(0, 0, 0, 0.8)",position:"relative",left:0,right:0,top:0,bottom:0,display:"inline",writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};switch(this.applyStyles(o,this.cueDiv),this.div=e.document.createElement("div"),o={direction:function(e){var t,o=[],n="";if(!e||!e.childNodes)return"ltr";function i(e,t){for(var n=t.childNodes.length-1;0<=n;n--)e.push(t.childNodes[n])}function s(e){if(!e||!e.length)return null;var o,t=e.pop(),n=t.textContent||t.innerText;return n?(o=n.match(/^.*(\n|\r)/),o?o[e.length=0]:n):"ruby"===t.tagName?s(e):t.childNodes?(i(e,t),s(e)):void 0}for(i(o,e);n=s(o);)for(t=0;t<n.length;t++)if(wu(n.charCodeAt(t)))return"rtl";return"ltr"}(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:n.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(o),this.div.appendChild(this.cueDiv),s=0,t.positionAlign){case"start":s=t.position;break;case"center":s=t.position-t.size/2;break;case"end":s=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(s,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(s,"%"),height:this.formatStyle(t.size,"%")}),this.move=function(e){this.applyStyles({top:this.formatStyle(e.top,"px"),bottom:this.formatStyle(e.bottom,"px"),left:this.formatStyle(e.left,"px"),right:this.formatStyle(e.right,"px"),height:this.formatStyle(e.height,"px"),width:this.formatStyle(e.width,"px")})}}function D(e){if(e.div){s=e.div.offsetHeight,i=e.div.offsetWidth,o=e.div.offsetTop;var n,s,o,i,t=(t=e.div.childNodes)&&(t=t[0])&&t.getClientRects&&t.getClientRects();e=e.div.getBoundingClientRect(),n=t?Math.max(t[0]&&t[0].height||0,e.height/t.length):0}this.left=e.left,this.right=e.right,this.top=e.top||o,this.height=e.height||s,this.bottom=e.bottom||o+(e.height||s),this.width=e.width||i,this.lineHeight=void 0!==n?n:e.lineHeight}function _u(e,t,n,s){var l,u,m,c=new D(t),a=t.cue,i=function(e){if("number"==typeof e.line&&(e.snapToLines||0<=e.line&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var s=e.track,n=s.textTrackList,o=0,t=0;t<n.length&&n[t]!==s;t++)"showing"===n[t].mode&&o++;return-1*++o}(a),o=[];if(a.snapToLines){switch(a.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var d=c.lineHeight,r=d*Math.round(i),h=n[l]+d,f=o[0];Math.abs(r)>h&&(r=r<0?-1:1,r*=Math.ceil(h/d)*d),i<0&&(r+=""===a.vertical?n.height:n.width,o=o.reverse()),c.move(f,r)}else{switch(u=c.lineHeight/n.height*100,a.lineAlign){case"center":i-=u/2;break;case"end":i-=u}switch(a.vertical){case"":t.applyStyles({top:t.formatStyle(i,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(i,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(i,"%")})}o=["+y","-x","+x","-y"],c=new D(t)}m=function(e,t){for(var i,a,r=new D(e),c=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(n,t[o])||e.within(n)&&e.overlapsAny(s);)e.move(t[o]);if(e.within(n))return e;i=e.intersectPercentage(n),i<c&&(a=new D(e),c=i),e=new D(r)}return a||r}(c,o),t.move(m.toCSSCompatValues(n))}function It(){}Pn.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},Pn.prototype.formatStyle=function(e,t){return 0===e?0:e+t},(ho.prototype=On(Pn.prototype)).constructor=ho,D.prototype.move=function(e,t){switch(t=void 0!==t?t:this.lineHeight,e){case"+x":this.left+=t,this.right+=t;break;case"-x":this.left-=t,this.right-=t;break;case"+y":this.top+=t,this.bottom+=t;break;case"-y":this.top-=t,this.bottom-=t}},D.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},D.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},D.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},D.prototype.overlapsOppositeAxis=function(e,t){switch(t){case"+x":return this.left<e.left;case"-x":return this.right>e.right;case"+y":return this.top<e.top;case"-y":return this.bottom>e.bottom}},D.prototype.intersectPercentage=function(e){return Math.max(0,Math.min(this.right,e.right)-Math.max(this.left,e.left))*Math.max(0,Math.min(this.bottom,e.bottom)-Math.max(this.top,e.top))/(this.height*this.width)},D.prototype.toCSSCompatValues=function(e){return{top:this.top-e.top,bottom:e.bottom-this.bottom,left:this.left-e.left,right:e.right-this.right,height:this.height,width:this.width}},D.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,s=e.div?e.div.offsetWidth:e.tagName?e.offsetWidth:0,n=e.div?e.div.offsetTop:e.tagName?e.offsetTop:0;return{left:(e=e.div?e.div.getBoundingClientRect():e.tagName?e.getBoundingClientRect():e).left,right:e.right,top:e.top||n,height:e.height||t,bottom:e.bottom||n+(e.height||t),width:e.width||s}},It.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},It.convertCueToDOMTree=function(e,t){return e&&t?Ja(e,t):null},It.processCues=function(e,t,n){if(!e||!t||!n)return null;for(;n.firstChild;)n.removeChild(n.firstChild);if(s=e.document.createElement("div"),s.style.position="absolute",s.style.left="0",s.style.right="0",s.style.top="0",s.style.bottom="0",s.style.margin="1.5%",n.appendChild(s),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var s,o,i=[],a=D.getSimpleBoxPosition(s),r={font:Math.round(.05*a.height*100)/100+"px sans-serif"};!function(){for(var n,o,c=0;c<t.length;c++)o=t[c],n=new ho(e,o,r),s.appendChild(n.div),_u(0,n,a,i),o.displayState=n.div,i.push(D.getSimpleBoxPosition(n))}()}else for(o=0;o<t.length;o++)s.appendChild(t[o].displayState)},(It.Parser=function(e,t,n){n||(n=t,t={}),t=t||{},this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=n||new TextDecoder("utf8"),this.regionList=[]}).prototype={reportOrThrowError:function(e){if(!(e instanceof X))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var n,s,o,a,t=this;function i(){for(var s,n=t.buffer,e=0;e<n.length&&`
`!==n[e]&&`
`!==n[e];)++e;return s=n.substr(0,e),`
`===n[e]&&++e,`
`===n[e]&&++e,t.buffer=n.substr(e),s}function r(e){e.match(/X-TIMESTAMP-MAP/)?Wt(e,function(e,n){switch(e){case"X-TIMESTAMP-MAP":!function(e){var n=new Ut;Wt(e,function(e,t){switch(e){case"MPEGT":n.integer(e+"S",t);break;case"LOCA":n.set(e+"L",qo(t))}},/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:n.get("MPEGTS"),LOCAL:n.get("LOCAL")})}(n)}},/=/):Wt(e,function(e,n){switch(e){case"Region":!function(e){var s,n=new Ut;Wt(e,function(e,t){switch(e){case"id":n.set(e,t);break;case"width":n.percent(e,t);break;case"lines":n.integer(e,t);break;case"regionanchor":case"viewportanchor":var s,o=t.split(",");if(2!==o.length)break;if(s=new Ut,s.percent("x",o[0]),s.percent("y",o[1]),!s.has("x")||!s.has("y"))break;n.set(e+"X",s.get("x")),n.set(e+"Y",s.get("y"));break;case"scroll":n.alt(e,t,["up"])}},/=/,/\s/),n.has("id")&&(s=new(t.vttjs.VTTRegion||t.window.VTTRegion),s.width=n.get("width",100),s.lines=n.get("lines",3),s.regionAnchorX=n.get("regionanchorX",0),s.regionAnchorY=n.get("regionanchorY",100),s.viewportAnchorX=n.get("viewportanchorX",0),s.viewportAnchorY=n.get("viewportanchorY",100),s.scroll=n.get("scroll",""),t.onregion&&t.onregion(s),t.regionList.push({id:n.get("id"),region:s}))}(n)}},/:/)}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;if(o=(n=i()).match(/^WEBVTT([ \t].*)?$/),!o||!o[0])throw new X(X.Errors.BadSignature);t.state="HEADER"}for(s=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:n=i(),t.state){case"HEADER":/:/.test(n)?r(n):n||(t.state="ID");continue;case"NOTE":n||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){t.state="NOTE";break}if(!n)continue;t.cue=new(t.vttjs.VTTCue||t.window.VTTCue)(0,0,"");try{t.cue.align="center"}catch{t.cue.align="middle"}if(t.state="CUE",-1===n.indexOf("-->")){t.cue.id=n;continue}case"CUE":try{Cu(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":if(a=-1!==n.indexOf("-->"),!n||a&&(s=!0)){t.oncue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}t.cue.text&&(t.cue.text+=`
`),t.cue.text+=n.replace(/\u2028/g,`
`).replace(/u2029/g,`
`);continue;case"BADCUE":n||(t.state="ID");continue}}}catch(e){t.reportOrThrowError(e),"CUETEXT"===t.state&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state="INITIAL"===t.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),!e.cue&&"HEADER"!==e.state||(e.buffer+=`

`,e.parse()),"INITIAL"===e.state)throw new X(X.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var yu=It,ju={"":1,lr:1,rl:1},vu={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function eo(e){return"string"==typeof e&&!!vu[e.toLowerCase()]&&e.toLowerCase()}function Ga(e,t,n){this.hasBeenReset=!1;var s="",o=!1,i=e,a=t,r=n,c=null,l="",d=!0,u="auto",h="start",m="auto",f="auto",p=100,g="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return s},set:function(e){s=""+e}},pauseOnExit:{enumerable:!0,get:function(){return o},set:function(e){o=!!e}},startTime:{enumerable:!0,get:function(){return i},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");i=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");a=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return r},set:function(e){r=""+e,this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return c},set:function(e){c=e,this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return l},set:function(e){var t=function(e){return"string"==typeof e&&!!ju[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===t)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");l=t,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");u=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return h},set:function(e){var t=eo(e);t&&(h=t,this.hasBeenReset=!0)}},position:{enumerable:!0,get:function(){return m},set:function(e){if(e<0||100<e)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=eo(e);t&&(f=t,this.hasBeenReset=!0)}},size:{enumerable:!0,get:function(){return p},set:function(e){if(e<0||100<e)throw new Error("Size must be between 0 and 100.");p=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return g},set:function(e){var t=eo(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");g=t,this.hasBeenReset=!0}}}),this.displayState=void 0}Ga.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},qa=Ga,Ka={"":!0,up:!0};function Lt(e){return"number"==typeof e&&0<=e&&e<=100}function gu(){var e=100,t=3,n=0,s=100,o=0,i=100,a="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!Lt(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return t},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");t=e}},regionAnchorY:{enumerable:!0,get:function(){return s},set:function(e){if(!Lt(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Lt(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return i},set:function(e){if(!Lt(e))throw new Error("ViewportAnchorY must be between 0 and 100.");i=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!Lt(e))throw new Error("ViewportAnchorX must be between 0 and 100.");o=e}},scroll:{enumerable:!0,get:function(){return a},set:function(e){var t=function(e){return"string"==typeof e&&!!Ka[e.toLowerCase()]&&e.toLowerCase()}(e);!1===t||(a=t)}}})}et=k(function(e){n=e.exports={WebVTT:yu,VTTCue:qa,VTTRegion:gu},t.vttjs=n,t.WebVTT=n.WebVTT;var n,s=n.VTTCue,o=n.VTTRegion,i=t.VTTCue,a=t.VTTRegion;n.shim=function(){t.VTTCue=s,t.VTTRegion=o},n.restore=function(){t.VTTCue=i,t.VTTRegion=a},t.VTTCue||n.shim()}),et.WebVTT,et.VTTCue,et.VTTRegion,m=function(e){function o(t,n){var s;return void 0===t&&(t={}),void 0===n&&(n=function(){}),t.reportTouchActivity=!1,(s=e.call(this,null,t,n)||this).hasStarted_=!1,s.on("playing",function(){this.hasStarted_=!0}),s.on("loadstart",function(){this.hasStarted_=!1}),S.names.forEach(function(e){var n=S[e];t&&t[n.getterName]&&(s[n.privateName]=t[n.getterName])}),s.featuresProgressEvents||s.manualProgressOn(),s.featuresTimeupdateEvents||s.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach(function(e){!1===t["native"+e+"Tracks"]&&(s["featuresNative"+e+"Tracks"]=!1)}),!1===t.nativeCaptions||!1===t.nativeTextTracks?s.featuresNativeTextTracks=!1:!0!==t.nativeCaptions&&!0!==t.nativeTextTracks||(s.featuresNativeTextTracks=!0),s.featuresNativeTextTracks||s.emulateTextTracks(),s.preloadTextTracks=!1!==t.preloadTextTracks,s.autoRemoteTextTracks_=new S.text.ListClass,s.initTrackListeners(),t.nativeControlsForTouch||s.emitTapEvents(),s.constructor&&(s.name_=s.constructor.name||"Unknown Tech"),s}i(o,e);var n=o.prototype;return n.triggerSourceset=function(e){var t=this;this.isReady_||this.one("ready",function(){return t.setTimeout(function(){return t.triggerSourceset(e)},1)}),this.trigger({src:e,type:"sourceset"})},n.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},n.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},n.trackProgress=function(){this.stopTrackingProgress(),this.progressInterval=this.setInterval(u(this,function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),1===(this.bufferedPercent_=e)&&this.stopTrackingProgress()}),500)},n.onDurationChange=function(){this.duration_=this.duration()},n.buffered=function(){return De(0,0)},n.bufferedPercent=function(){return Qr(this.buffered(),this.duration_)},n.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},n.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},n.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},n.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)},n.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.dispose=function(){this.clearTracks($.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},n.clearTracks=function(e){var t=this;(e=[].concat(e)).forEach(function(e){for(var s,n=t[e+"Tracks"]()||[],o=n.length;o--;)s=n[o],"text"===e&&t.removeRemoteTextTrack(s),n.removeTrack(s)})},n.cleanupAutoTextTracks=function(){for(var n,e=this.autoRemoteTextTracks_||[],t=e.length;t--;)n=e[t],this.removeRemoteTextTrack(n)},n.reset=function(){},n.crossOrigin=function(){},n.setCrossOrigin=function(){},n.error=function(e){return void 0!==e&&(this.error_=new T(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?De(0,0):De()},n.play=function(){},n.setScrubbing=function(){},n.scrubbing=function(){},n.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},n.initTrackListeners=function(){var e=this;$.names.forEach(function(t){function n(){e.trigger(t+"trackchange")}var o=$[t],s=e[o.getterName]();s.addEventListener("removetrack",n),s.addEventListener("addtrack",n),e.on("dispose",function(){s.removeEventListener("removetrack",n),s.removeEventListener("addtrack",n)})})},n.addWebVttScript_=function(){var e,n=this;if(!t.WebVTT)if(s.body.contains(this.el())){if(!this.options_["vtt.js"]&&yt(et)&&0<Object.keys(et).length)return void this.trigger("vttjsloaded");e=s.createElement("script"),e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=function(){n.trigger("vttjsloaded")},e.onerror=function(){n.trigger("vttjserror")},this.on("dispose",function(){e.onload=null,e.onerror=null}),t.WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)},n.emulateTextTracks=function(){function o(t){return e.addTrack(t.track)}function i(t){return e.removeTrack(t.track)}var a=this,e=this.textTracks(),n=this.remoteTextTracks();n.on("addtrack",o),n.on("removetrack",i),this.addWebVttScript_();function s(){return a.trigger("texttrackchange")}function t(){s();for(var t,n=0;n<e.length;n++)t=e[n],t.removeEventListener("cuechange",s),"showing"===t.mode&&t.addEventListener("cuechange",s)}t(),e.addEventListener("change",t),e.addEventListener("addtrack",t),e.addEventListener("removetrack",t),this.on("dispose",function(){n.off("addtrack",o),n.off("removetrack",i),e.removeEventListener("change",t),e.removeEventListener("addtrack",t),e.removeEventListener("removetrack",t);for(var a=0;a<e.length;a++)e[a].removeEventListener("cuechange",s)})},n.addTextTrack=function(e,t,n){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,n,s,o){void 0===o&&(o={});var i,a=e.textTracks();return o.kind=t,n&&(o.label=n),s&&(o.language=s),o.tech=e,i=new S.text.TrackClass(o),a.addTrack(i),i}(this,e,t,n)},n.createRemoteTextTrack=function(e){var t=f(e,{tech:this});return new Ae.remoteTextEl.TrackClass(t)},n.addRemoteTextTrack=function(e,t){var n,s=this;return void 0===e&&(e={}),n=this.createRemoteTextTrack(e),!0!==t&&!1!==t&&(d.warn('Calling addRemoteTextTrack without explicitly setting the "manualCleanup" parameter to `true` is deprecated and default to `false` in future version of video.js'),t=!0),this.remoteTextTrackEls().addTrackElement_(n),this.remoteTextTracks().addTrack(n.track),!0!==t&&this.ready(function(){return s.autoRemoteTextTracks_.addTrack(n.track)}),n},n.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)},n.getVideoPlaybackQuality=function(){return{}},n.requestPictureInPicture=function(){var e=this.options_.Promise||t.Promise;if(e)return e.reject()},n.disablePictureInPicture=function(){return!0},n.setDisablePictureInPicture=function(){},n.setPoster=function(){},n.playsinline=function(){},n.setPlaysinline=function(){},n.overrideNativeAudioTracks=function(){},n.overrideNativeVideoTracks=function(){},n.canPlayType=function(){return""},o.canPlayType=function(){return""},o.canPlaySource=function(e){return o.canPlayType(e.type)},o.isTech=function(e){return e.prototype instanceof o||e instanceof o||e===o},o.registerTech=function(e,t){if(o.techs_||(o.techs_={}),!o.isTech(t))throw new Error("Tech "+e+" must be a Tech");if(!o.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!o.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=b(e),o.techs_[e]=t,o.techs_[$n(e)]=t,"Tech"!==e&&o.defaultTechOrder_.push(e),t},o.getTech=function(e){if(e)return o.techs_&&o.techs_[e]?o.techs_[e]:(e=b(e),t&&t.videojs&&t.videojs[e]?(d.warn("The "+e+" tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),t.videojs[e]):void 0)},o}(n),S.names.forEach(function(e){var t=S[e];m.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}}),m.prototype.featuresVolumeControl=!0,m.prototype.featuresMuteControl=!0,m.prototype.featuresFullscreenResize=!1,m.prototype.featuresPlaybackRate=!1,m.prototype.featuresProgressEvents=!1,m.prototype.featuresSourceset=!1,m.prototype.featuresTimeupdateEvents=!1,m.prototype.featuresNativeTextTracks=!1,m.withSourceHandlers=function(e){e.registerSourceHandler=function(t,n){var s=e.sourceHandlers,s=s||(e.sourceHandlers=[]);void 0===n&&(n=s.length),s.splice(n,0,t)},e.canPlayType=function(t){for(var s,o=e.sourceHandlers||[],n=0;n<o.length;n++)if(s=o[n].canPlayType(t))return s;return""},e.selectSourceHandler=function(t,n){for(var o=e.sourceHandlers||[],s=0;s<o.length;s++)if(o[s].canHandleSource(t,n))return o[s];return null},e.canPlaySource=function(t,n){var s=e.selectSourceHandler(t,n);return s?s.canHandleSource(t,n):""},["seekable","seeking","duration"].forEach(function(e){var t=this[e];"function"==typeof t&&(this[e]=function(){return this.sourceHandler_&&this.sourceHandler_[e]?this.sourceHandler_[e].apply(this.sourceHandler_,arguments):t.apply(this,arguments)})},e.prototype),e.prototype.setSource=function(t){var n=e.selectSourceHandler(t,this.options_);n||(e.nativeSourceHandler?n=e.nativeSourceHandler:d.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),n!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=n.handleSource(t,this,this.options_),this.one("dispose",this.disposeSourceHandler)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},n.registerComponent("Tech",m),m.registerTech("Tech",m),m.defaultTechOrder_=[];var ke={},Gs={},hs={};function pu(e,t,n){e.setTimeout(function(){return function e(t,n,s,o,i,a){void 0===t&&(t={}),void 0===n&&(n=[]),void 0===i&&(i=[]),void 0===a&&(a=!1);var c,d=n,l=d[0],r=d.slice(1);if("string"==typeof l)e(t,ke[l],s,o,i,a);else if(l){if(c=du(o,l),!c.setSource)return i.push(c),e(t,r,s,o,i,a);c.setSource(p({},t),function(n,l){if(n)return e(t,r,s,o,i,a);i.push(c),e(l,t.type===l.type?r:ke[l.type],s,o,i,a)})}else r.length?e(t,r,s,o,i,a):a?s(t,i):e(t,ke["*"],s,o,i,!0)}(t,ke[t.type],n,e)},1)}function Wa(e,t,n,s){void 0===s&&(s=null);var r="call"+b(n),o=e.reduce(Cs(r),s),i=o===hs,a=i?null:t[n](o);return function(e,t,n,s){for(var i,o=e.length-1;0<=o;o--)i=e[o],i[t]&&i[t](s,n)}(e,n,a,i),a}var mu={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},hu={setCurrentTime:1,setMuted:1,setVolume:1},Ra={play:1,pause:1};function Cs(e){return function(t,n){return t===hs?hs:n[e]?n[e](t):t}}function du(e,t){if(s=Gs[e.id()],n=null,s==null)return n=t(e),Gs[e.id()]=[[t,n]],n;for(o=0;o<s.length;o++){var n,s,o,i=s[o],a=i[0],r=i[1];a===t&&(n=r)}return null===n&&(n=t(e),s.push([t,n])),n}function us(e){void 0===e&&(e="");var t=Lo(e);return La[t.toLowerCase()]||""}La={opus:"video/ogg",ogv:"video/ogg",mp4:"video/mp4",mov:"video/mp4",m4v:"video/mp4",mkv:"video/x-matroska",m4a:"audio/mp4",mp3:"audio/mpeg",aac:"audio/aac",caf:"audio/x-caf",flac:"audio/flac",oga:"audio/ogg",wav:"audio/wav",m3u8:"application/x-mpegURL",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"};function Na(e){if(!e.type){var t=us(e.src);t&&(e.type=t)}return e}za=function(e){function t(t,s,o){if(l=f({createEl:!1},s),c=e.call(this,t,l,o)||this,s.playerOptions.sources&&0!==s.playerOptions.sources.length)t.src(s.playerOptions.sources);else for(var i,a,c,l,r=0,d=s.playerOptions.techOrder;r<d.length;r++)if(i=b(d[r]),a=m.getTech(i),i||(a=n.getComponent(i)),a&&a.isSupported()){t.loadTech_(i);break}return c}return i(t,e),t}(n),n.registerComponent("MediaLoader",za),Ct=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).emitTapEvents(),s.enable(),s}i(n,e);var t=n.prototype;return t.createEl=function(t,n,s){void 0===t&&(t="div"),void 0===n&&(n={}),void 0===s&&(s={}),n=p({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass(),tabIndex:0},n),"button"===t&&d.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),s=p({role:"button"},s),this.tabIndex_=n.tabIndex;var o=e.prototype.createEl.call(this,t,n,s);return this.createControlTextEl(o),o},t.dispose=function(){this.controlTextEl_=null,e.prototype.dispose.call(this)},t.createControlTextEl=function(e){return this.controlTextEl_=g("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.controlText=function(e,t){if(void 0===t&&(t=this.el()),void 0===e)return this.controlText_||"Need Text";var n=this.localize(e);this.controlText_=e,ft(this.controlTextEl_,n),this.nonIconControl||t.setAttribute("title",n)},t.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),"undefined"!=typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick),this.on("keydown",this.handleKeyDown))},t.disable=function(){this.enabled_=!1,this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),"undefined"!=typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off("mouseover",this.handleMouseOver),this.off("mouseout",this.handleMouseOut),this.off(["tap","click"],this.handleClick),this.off("keydown",this.handleKeyDown)},t.handleLanguagechange=function(){this.controlText(this.controlText_)},t.handleClick=function(){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)},t.handleKeyDown=function(t){c.isEventKey(t,"Space")||c.isEventKey(t,"Enter")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},n}(n),n.registerComponent("ClickableComponent",Ct),Fa=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).update(),t.on("posterchange",u(l(s),s.update)),s}i(n,e);var t=n.prototype;return t.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.createEl=function(){return g("div",{className:"vjs-poster",tabIndex:-1})},t.update=function(){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.setSrc=function(e){var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t},t.handleClick=function(){if(this.player_.controls()){var t=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length;!this.player_.tech(!0)||(Zt||Kt)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Te(this.player_.play()):this.player_.pause()}},n}(Ct),n.registerComponent("PosterImage",Fa),xt="#222",Ma={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace',monospaceSerif:'"Courier New", monospace',proportionalSansSerif:"sans-serif",proportionalSerif:"serif",casual:'"Comic Sans MS", Impact, fantasy',script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function js(e,t){var n;if(4===e.length)n=e[1]+e[1]+e[2]+e[2]+e[3]+e[3];else{if(7!==e.length)throw new Error("Invalid color code provided, "+e+"; must be formatted as e.g. #f0e or #f604e2.");n=e.slice(1)}return"rgba("+parseInt(n.slice(0,2),16)+","+parseInt(n.slice(2,4),16)+","+parseInt(n.slice(4,6),16)+","+t+")"}function ys(e,t,n){try{e.style[t]=n}catch{return}}Sa=function(e){function s(n,s,o){var i=e.call(this,n,s,o)||this,a=u(l(i),i.updateDisplay);return n.on("loadstart",u(l(i),i.toggleDisplay)),n.on("texttrackchange",a),n.on("loadedmetadata",u(l(i),i.preselectTrack)),n.ready(u(l(i),function(){if(n.tech_&&n.tech_.featuresNativeTextTracks)this.hide();else{n.on("fullscreenchange",a),n.on("playerresize",a),t.addEventListener("orientationchange",a),n.on("dispose",function(){return t.removeEventListener("orientationchange",a)});for(var s=this.options_.playerOptions.tracks||[],e=0;e<s.length;e++)this.player_.addRemoteTextTrack(s[e],!0);this.preselectTrack()}})),i}i(s,e);var n=s.prototype;return n.preselectTrack=function(){for(var e,n,s,o,a={captions:1,subtitles:1},r=this.player_.textTracks(),t=this.player_.cache_.selectedLanguage,i=0;i<r.length;i++)e=r[i],t&&t.enabled&&t.language&&t.language===e.language&&e.kind in a?o=e.kind===t.kind?e:o||e:t&&!t.enabled?s=n=o=null:e.default&&("descriptions"!==e.kind||n?e.kind in a&&!s&&(s=e):n=e);o?o.mode="showing":s?s.mode="showing":n&&(n.mode="showing")},n.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},n.clearDisplay=function(){"function"==typeof t.WebVTT&&t.WebVTT.processCues(t,[],this.el_)},n.updateDisplay=function(){if(e=this.player_.textTracks(),r=this.options_.allowMultipleShowingTracks,this.clearDisplay(),r){for(s=[],n=0;n<e.length;++n)o=e[n],"showing"===o.mode&&s.push(o);this.updateForTrack(s)}else{for(var e,t,n,s,o,r,i=null,a=null,c=e.length;c--;)t=e[c],"showing"===t.mode&&("descriptions"===t.kind?i=t:a=t);a?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(a)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i))}},n.updateDisplayState=function(e){for(var s,o,r,n=this.player_.textTrackSettings.getValues(),i=e.activeCues,a=i.length;a--;)o=i[a],o&&(s=o.displayState,(n.color&&(s.firstChild.style.color=n.color),n.textOpacity&&ys(s.firstChild,"color",js(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(s.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&ys(s.firstChild,"backgroundColor",js(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?ys(s,"backgroundColor",js(n.windowColor,n.windowOpacity)):s.style.backgroundColor=n.windowColor),n.edgeStyle&&("dropshadow"===n.edgeStyle?s.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+xt:"raised"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+xt:"depressed"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+xt:"uniform"===n.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+xt)),n.fontPercent&&1!==n.fontPercent)&&(r=t.parseFloat(s.style.fontSize),s.style.fontSize=r*n.fontPercent+"px",s.style.height="auto",s.style.top="auto"),n.fontFamily&&"default"!==n.fontFamily&&("small-caps"===n.fontFamily?s.firstChild.style.fontVariant="small-caps":s.firstChild.style.fontFamily=Ma[n.fontFamily]))},n.updateForTrack=function(e){if(Array.isArray(e)||(e=[e]),"function"==typeof t.WebVTT&&!e.every(function(e){return!e.activeCues})){for(var n,s,o,i,r,c,l=[],a=0;a<e.length;++a)for(r=e[a],o=0;o<r.activeCues.length;++o)l.push(r.activeCues[o]);t.WebVTT.processCues(t,l,this.el_);for(s=0;s<e.length;++s){for(n=e[s],i=0;i<n.activeCues.length;++i)c=n.activeCues[i].displayState,re(c,"vjs-text-track-cue"),re(c,"vjs-text-track-cue-"+(n.language?n.language:s));this.player_.textTrackSettings&&this.updateDisplayState(n)}}},s}(n),n.registerComponent("TextTrackDisplay",Sa),Aa=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.createEl=function(){var n=this.player_.isAudio(),s=this.localize(n?"Audio Player":"Video Player"),o=g("span",{className:"vjs-control-text",innerHTML:this.localize("{1} is loading.",[s])}),t=e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});return t.appendChild(o),t},t}(n),n.registerComponent("LoadingSpinner",Aa),G=function(e){function s(){return e.apply(this,arguments)||this}i(s,e);var t=s.prototype;return t.createEl=function(e,t,s){void 0===t&&(t={}),void 0===s&&(s={}),t=p({innerHTML:'<span aria-hidden="true" class="vjs-icon-placeholder"></span>',className:this.buildCSSClass()},t),s=p({type:"button"},s);var o=n.prototype.createEl.call(this,"button",t,s);return this.createControlTextEl(o),o},t.addChild=function(e,t){void 0===t&&(t={});var s=this.constructor.name;return d.warn("Adding an actionable (user controllable) child to a Button ("+s+") is not supported; use a ClickableComponent instead."),n.prototype.addChild.call(this,e,t)},t.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.handleKeyDown=function(t){c.isEventKey(t,"Space")||c.isEventKey(t,"Enter")?t.stopPropagation():e.prototype.handleKeyDown.call(this,t)},s}(Ct),n.registerComponent("Button",G),xs=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).mouseused_=!1,s.on("mousedown",s.handleMouseDown),s}i(n,e);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-big-play-button"},t.handleClick=function(e){if(t=this.player_.play(),this.mouseused_&&e.clientX&&e.clientY)return s=this.player_.usingPlugin("eme")&&this.player_.eme.sessions&&0<this.player_.eme.sessions.length,Te(t),void(!this.player_.tech(!0)||(Zt||Kt)&&s||this.player_.tech(!0).focus());var t,n,s,o=this.player_.getChild("controlBar"),i=o&&o.getChild("playToggle");i?(n=function(){return i.focus()},Ft(t)?t.then(n,function(){}):this.setTimeout(n,1)):this.player_.tech(!0).focus()},t.handleKeyDown=function(t){this.mouseused_=!1,e.prototype.handleKeyDown.call(this,t)},t.handleMouseDown=function(){this.mouseused_=!0},n}(G),xs.prototype.controlText_="Play Video",n.registerComponent("BigPlayButton",xs),Oa=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).controlText(n&&n.controlText||s.localize("Close")),s}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},n.handleClick=function(){this.trigger({type:"close",bubbles:!1})},n.handleKeyDown=function(t){c.isEventKey(t,"Esc")?(t.preventDefault(),t.stopPropagation(),this.trigger("click")):e.prototype.handleKeyDown.call(this,t)},t}(G),n.registerComponent("CloseButton",Oa),Es=function(e){function n(t,n){var s;return void 0===n&&(n={}),s=e.call(this,t,n)||this,n.replay=void 0===n.replay||n.replay,s.on(t,"play",s.handlePlay),s.on(t,"pause",s.handlePause),n.replay&&s.on(t,"ended",s.handleEnded),s}i(n,e);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.handleClick=function(){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleSeeked=function(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)},t.handlePlay=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.handlePause=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t.handleEnded=function(){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.controlText("Replay"),this.one(this.player_,"seeked",this.handleSeeked)},n}(G),Es.prototype.controlText_="Play",n.registerComponent("PlayToggle",Es);function ya(e,t){e=e<0?0:e;var n=Math.floor(e%60),s=Math.floor(e/60%60),o=Math.floor(e/3600),i=Math.floor(t/60%60),a=Math.floor(t/3600);return!isNaN(e)&&e!==1/0||(o=s=n="-"),(o=0<o||0<a?o+":":"")+(s=((o||10<=i)&&s<10?"0"+s:s)+":")+(n=n<10?"0"+n:n)}rs=ya;function dt(e,t){return void 0===t&&(t=e),rs(e,t)}Ee=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).on(t,["timeupdate","ended"],s.updateContent),s.updateTextNode_(),s}i(n,e);var t=n.prototype;return t.createEl=function(){var t=this.buildCSSClass(),n=e.prototype.createEl.call(this,"div",{className:t+" vjs-time-control vjs-control",innerHTML:'<span class="vjs-control-text" role="presentation">'+this.localize(this.labelText_)+" </span>"});return this.contentEl_=g("span",{className:t+"-display"},{"aria-live":"off",role:"presentation"}),n.appendChild(this.contentEl_),n},t.dispose=function(){this.contentEl_=null,this.textNode_=null,e.prototype.dispose.call(this)},t.updateTextNode_=function(e){var t=this;void 0===e&&(e=0),e=dt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(t.contentEl_){var e=t.textNode_;e&&t.contentEl_.firstChild!==e&&(e=null,d.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),t.textNode_=s.createTextNode(t.formattedTime_),t.textNode_&&(e?t.contentEl_.replaceChild(t.textNode_,e):t.contentEl_.appendChild(t.textNode_))}}))},t.updateContent=function(){},n}(n),Ee.prototype.labelText_="Time",Ee.prototype.controlText_="Time",n.registerComponent("TimeDisplay",Ee),is=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-current-time"},n.updateContent=function(){var t=this.player_.ended()?this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateTextNode_(t)},t}(Ee),is.prototype.labelText_="Current Time",is.prototype.controlText_="Current Time",n.registerComponent("CurrentTimeDisplay",is),os=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).on(t,"durationchange",s.updateContent),s.on(t,"loadstart",s.updateContent),s.on(t,"loadedmetadata",s.updateContent),s}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-duration"},n.updateContent=function(){var t=this.player_.duration();this.updateTextNode_(t)},t}(Ee),os.prototype.labelText_="Duration",os.prototype.controlText_="Duration",n.registerComponent("DurationDisplay",os),ja=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"},{"aria-hidden":!0})},t}(n),n.registerComponent("TimeDivider",ja),ns=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).on(t,"durationchange",s.updateContent),s}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-remaining-time"},n.createEl=function(){var t=e.prototype.createEl.call(this);return t.insertBefore(g("span",{},{"aria-hidden":!0},"-"),this.contentEl_),t},n.updateContent=function(){var t;"number"==typeof this.player_.duration()&&(t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t))},t}(Ee),ns.prototype.labelText_="Remaining Time",ns.prototype.controlText_="Remaining Time",n.registerComponent("RemainingTimeDisplay",ns),ba=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).updateShowing(),s.on(s.player(),"durationchange",s.updateShowing),s}i(t,e);var n=t.prototype;return n.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=g("div",{className:"vjs-live-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Stream Type")+" </span>"+this.localize("LIVE")},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},n.dispose=function(){this.contentEl_=null,e.prototype.dispose.call(this)},n.updateShowing=function(){this.player().duration()===1/0?this.show():this.hide()},t}(n),n.registerComponent("LiveDisplay",ba),ms=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).updateLiveEdgeStatus(),s.player_.liveTracker&&s.on(s.player_.liveTracker,"liveedgechange",s.updateLiveEdgeStatus),s}i(n,e);var t=n.prototype;return t.createEl=function(){var t=e.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});return this.textEl_=g("span",{className:"vjs-seek-to-live-text",innerHTML:this.localize("LIVE")},{"aria-hidden":"true"}),t.appendChild(this.textEl_),t},t.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")):(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))},t.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()},t.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatus),this.textEl_=null,e.prototype.dispose.call(this)},n}(G),ms.prototype.controlText_="Seek to live, currently playing live",n.registerComponent("SeekToLive",ms);function Rs(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))}ts=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).bar=s.getChild(s.options_.barName),s.vertical(!!s.options_.vertical),s.enable(),s}i(n,e);var t=n.prototype;return t.enabled=function(){return this.enabled_},t.enable=function(){this.enabled()||(this.on("mousedown",this.handleMouseDown),this.on("touchstart",this.handleMouseDown),this.on("keydown",this.handleKeyDown),this.on("click",this.handleClick),this.on(this.player_,"controlsvisible",this.update),this.playerEvent&&this.on(this.player_,this.playerEvent,this.update),this.removeClass("disabled"),this.setAttribute("tabindex",0),this.enabled_=!0)},t.disable=function(){if(this.enabled()){var e=this.bar.el_.ownerDocument;this.off("mousedown",this.handleMouseDown),this.off("touchstart",this.handleMouseDown),this.off("keydown",this.handleKeyDown),this.off("click",this.handleClick),this.off(this.player_,"controlsvisible",this.update),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.removeAttribute("tabindex"),this.addClass("disabled"),this.playerEvent&&this.off(this.player_,this.playerEvent,this.update),this.enabled_=!1}},t.createEl=function(t,n,s){return void 0===n&&(n={}),void 0===s&&(s={}),n.className=n.className+" vjs-slider",n=p({tabIndex:0},n),s=p({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},s),e.prototype.createEl.call(this,t,n,s)},t.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||le||e.preventDefault(),Xc(),this.addClass("vjs-sliding"),this.trigger("slideractive"),this.on(t,"mousemove",this.handleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchmove",this.handleMouseMove),this.on(t,"touchend",this.handleMouseUp),this.handleMouseMove(e)},t.handleMouseMove=function(){},t.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;qc(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(e,"mousemove",this.handleMouseMove),this.off(e,"mouseup",this.handleMouseUp),this.off(e,"touchmove",this.handleMouseMove),this.off(e,"touchend",this.handleMouseUp),this.update()},t.update=function(){var e,t=this;if(this.el_&&this.bar)return e=this.getProgress(),e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",function(){var n=t.vertical()?"height":"width";t.bar.el().style[n]=(100*e).toFixed(2)+"%"})),e},t.getProgress=function(){return Number(Rs(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){var t=Ps(this.el_,e);return this.vertical()?t.y:t.x},t.handleKeyDown=function(t){c.isEventKey(t,"Left")||c.isEventKey(t,"Down")?(t.preventDefault(),t.stopPropagation(),this.stepBack()):c.isEventKey(t,"Right")||c.isEventKey(t,"Up")?(t.preventDefault(),t.stopPropagation(),this.stepForward()):e.prototype.handleKeyDown.call(this,t)},t.handleClick=function(e){e.stopPropagation(),e.preventDefault()},t.vertical=function(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")},n}(n),n.registerComponent("Slider",ts);function Hs(e,t){return Rs(e/t*100,0,100).toFixed(2)+"%"}va=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).partEls_=[],s.on(t,"progress",s.update),s}i(t,e);var n=t.prototype;return n.createEl=function(){var n=e.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),t=g("span",{className:"vjs-control-text"}),o=g("span",{textContent:this.localize("Loaded")}),i=s.createTextNode(": ");return this.percentageEl_=g("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),n.appendChild(t),t.appendChild(o),t.appendChild(i),t.appendChild(this.percentageEl_),n},n.dispose=function(){this.partEls_=null,this.percentageEl_=null,e.prototype.dispose.call(this)},n.update=function(){var t=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var n,r,c=t.player_.liveTracker,s=t.player_.buffered(),u=c&&c.isLive()?c.seekableEnd():t.player_.duration(),l=t.player_.bufferedEnd(),o=t.partEls_,i=Hs(l,u);t.percent_!==i&&(t.el_.style.width=i,ft(t.percentageEl_,i),t.percent_=i);for(n=0;n<s.length;n++){var a=s.start(n),d=s.end(n),e=o[n];e||(e=t.el_.appendChild(g()),o[n]=e),e.dataset.start===a&&e.dataset.end===d||(e.dataset.start=a,e.dataset.end=d,e.style.left=Hs(a,l),e.style.width=Hs(d-a,l))}for(r=o.length;r>s.length;r--)t.el_.removeChild(o[r-1]);o.length=s.length})},t}(n),n.registerComponent("LoadProgressBar",va),ga=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).update=Re(u(l(s),s.update),30),s}i(n,e);var t=n.prototype;return t.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})},t.update=function(e,t,n){var o=zt(this.el_),i=$o(this.player_.el()),a=e.width*t;if(i&&o){var r=e.left-i.left+a,c=e.width-a+(i.right-e.right),s=o.width/2;r<s?s+=s-r:c<s&&(s=c),s<0?s=0:s>o.width&&(s=o.width),s=Math.round(s),this.el_.style.right="-"+s+"px",this.write(n)}},t.write=function(e){ft(this.el_,e)},t.updateTime=function(e,t,n,s){var o=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){if(r=o.player_.duration(),o.player_.liveTracker&&o.player_.liveTracker.isLive()){var i,r,a=o.player_.liveTracker.liveWindow(),c=a-t*a;i=(c<1?"":"-")+dt(c,a)}else i=dt(n,r);o.update(e,t,i),s&&s()})},n}(n),n.registerComponent("TimeTooltip",ga),Zn=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).update=Re(u(l(s),s.update),30),s}i(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})},n.update=function(e,t){var s,n=this.getChild("timeTooltip");n&&(s=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),n.updateTime(e,t,s))},t}(n),Zn.prototype.options_={children:[]},q||ue||Zn.prototype.options_.children.push("timeTooltip"),n.registerComponent("PlayProgressBar",Zn),$s=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).update=Re(u(l(s),s.update),30),s}i(t,e);var n=t.prototype;return n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},n.update=function(e,t){var n=this,s=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,s,function(){n.el_.style.left=e.width*t+"px"})},t}(n),$s.prototype.options_={children:["timeTooltip"]},n.registerComponent("MouseTimeDisplay",$s),Qn=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).setEventHandlers_(),s}i(n,e);var t=n.prototype;return t.setEventHandlers_=function(){this.update_=u(this,this.update),this.update=Re(this.update_,30),this.on(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.on(this.player_,["playing"],this.enableInterval_),this.on(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in s&&"visibilityState"in s&&this.on(s,"visibilitychange",this.toggleVisibility_)},t.toggleVisibility_=function(e){"hidden"===s.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())},t.enableInterval_=function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))},t.disableInterval_=function(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)},t.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})},t.update=function(){var o,n=this;if("hidden"!==s.visibilityState)return o=e.prototype.update.call(this),this.requestNamedAnimationFrame("SeekBar#update",function(){var t=n.player_.ended()?n.player_.duration():n.getCurrentTime_(),s=n.player_.liveTracker,e=n.player_.duration();s&&s.isLive()&&(e=n.player_.liveTracker.liveCurrentTime()),n.percent_!==o&&(n.el_.setAttribute("aria-valuenow",(100*o).toFixed(2)),n.percent_=o),n.currentTime_===t&&n.duration_===e||(n.el_.setAttribute("aria-valuetext",n.localize("progress bar timing: currentTime={1} duration={2}",[dt(t,e),dt(e,e)],"{1} of {2}")),n.currentTime_=t,n.duration_=e),n.bar&&n.bar.update($o(n.el()),n.getProgress())}),o},t.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()},t.getPercent=function(){var t,n=this.getCurrentTime_(),e=this.player_.liveTracker;return e&&e.isLive()?(t=(n-e.seekableStart())/e.liveWindow(),e.atLiveEdge()&&(t=1)):t=n/this.player_.duration(),t},t.handleMouseDown=function(t){ht(t)&&(t.stopPropagation(),this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t))},t.handleMouseMove=function(e){if(ht(e)){var t,s,i,o=this.calculateDistance(e),n=this.player_.liveTracker;if(n&&n.isLive()){{if(.99<=o)return void n.seekToLiveEdge();if(s=n.seekableStart(),i=n.liveCurrentTime(),i<=(t=s+o*n.liveWindow())&&(t=i),t<=s&&(t=s+.1),t===1/0)return}}else(t=o*this.player_.duration())===this.player_.duration()&&(t-=.1);this.player_.currentTime(t)}},t.enable=function(){e.prototype.enable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.show()},t.disable=function(){e.prototype.disable.call(this);var t=this.getChild("mouseTimeDisplay");t&&t.hide()},t.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),t&&t.stopPropagation(),this.player_.scrubbing(!1),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Te(this.player_.play()):this.update_()},t.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t.handleAction=function(){this.player_.paused()?this.player_.play():this.player_.pause()},t.handleKeyDown=function(t){if(c.isEventKey(t,"Space")||c.isEventKey(t,"Enter"))t.preventDefault(),t.stopPropagation(),this.handleAction(t);else if(c.isEventKey(t,"Home"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(0);else if(c.isEventKey(t,"End"))t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.duration());else if(/^[0-9]$/.test(c(t))){t.preventDefault(),t.stopPropagation();var n=10*(c.codes[c(t)]-c.codes[0])/100;this.player_.currentTime(this.player_.duration()*n)}else c.isEventKey(t,"PgDn")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()-60)):c.isEventKey(t,"PgUp")?(t.preventDefault(),t.stopPropagation(),this.player_.currentTime(this.player_.currentTime()+60)):e.prototype.handleKeyDown.call(this,t)},t.dispose=function(){this.disableInterval_(),this.off(this.player_,["ended","durationchange","timeupdate"],this.update),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableInterval_),this.off(this.player_,["ended","pause","waiting"],this.disableInterval_),"hidden"in s&&"visibilityState"in s&&this.off(s,"visibilitychange",this.toggleVisibility_),e.prototype.dispose.call(this)},n}(ts),Qn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},q||ue||Qn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),n.registerComponent("SeekBar",Qn),Us=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).handleMouseMove=Re(u(l(s),s.handleMouseMove),30),s.throttledHandleMouseSeek=Re(u(l(s),s.handleMouseSeek),30),s.enable(),s}i(n,e);var t=n.prototype;return t.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t.handleMouseMove=function(e){if(t=this.getChild("seekBar"),t&&(n=t.getChild("playProgressBar"),s=t.getChild("mouseTimeDisplay"),n||s)){var t,n,s,i=t.el(),a=zt(i),o=Ps(i,e).x,o=Rs(o,0,1);s&&s.update(a,o),n&&n.update(a,t.getProgress())}},t.handleMouseSeek=function(e){var t=this.getChild("seekBar");t&&t.handleMouseMove(e)},t.enabled=function(){return this.enabled_},t.disable=function(){this.children().forEach(function(e){return e.disable&&e.disable()}),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDown),this.off(this.el_,"mousemove",this.handleMouseMove),this.handleMouseUp(),this.addClass("disabled"),this.enabled_=!1)},t.enable=function(){this.children().forEach(function(e){return e.enable&&e.enable()}),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDown),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)},t.handleMouseDown=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.handleMouseUp=function(e){var t=this.el_.ownerDocument,n=this.getChild("seekBar");n&&n.handleMouseUp(e),this.off(t,"mousemove",this.throttledHandleMouseSeek),this.off(t,"touchmove",this.throttledHandleMouseSeek),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},n}(n),Us.prototype.options_={children:["seekBar"]},n.registerComponent("ProgressControl",Us),Ks=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).on(t,["enterpictureinpicture","leavepictureinpicture"],s.handlePictureInPictureChange),s.on(t,["disablepictureinpicturechanged","loadedmetadata"],s.handlePictureInPictureEnabledChange),s.disable(),s}i(n,e);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-picture-in-picture-control "+e.prototype.buildCSSClass.call(this)},t.handlePictureInPictureEnabledChange=function(){s.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()?this.enable():this.disable()},t.handlePictureInPictureChange=function(){this.player_.isInPictureInPicture()?this.controlText("Exit Picture-in-Picture"):this.controlText("Picture-in-Picture"),this.handlePictureInPictureEnabledChange()},t.handleClick=function(){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()},n}(G),Ks.prototype.controlText_="Picture-in-Picture",n.registerComponent("PictureInPictureToggle",Ks),qs=function(e){function t(t,n){var o;return(o=e.call(this,t,n)||this).on(t,"fullscreenchange",o.handleFullscreenChange),!1===s[t.fsApi_.fullscreenEnabled]&&o.disable(),o}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},n.handleFullscreenChange=function(){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},n.handleClick=function(){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(G),qs.prototype.controlText_="Fullscreen",n.registerComponent("FullscreenToggle",qs),pa=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(n),n.registerComponent("VolumeLevel",pa),Yn=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).on("slideractive",s.updateLastVolume_),s.on(t,"volumechange",s.updateARIAAttributes),t.ready(function(){return s.updateARIAAttributes()}),s}i(n,e);var t=n.prototype;return t.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})},t.handleMouseDown=function(t){ht(t)&&e.prototype.handleMouseDown.call(this,t)},t.handleMouseMove=function(e){ht(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))},t.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.updateARIAAttributes=function(){var t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())},t.updateLastVolume_=function(){var e=this,t=this.player_.volume();this.one("sliderinactive",function(){0===e.player_.volume()&&e.player_.lastVolume_(t)})},n}(ts),Yn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Yn.prototype.playerEvent="volumechange",n.registerComponent("VolumeBar",Yn),Xs=function(e){function n(t,n){var s;return void 0===n&&(n={}),n.vertical=n.vertical||!1,"undefined"!=typeof n.volumeBar&&!yt(n.volumeBar)||(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),s=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})}(l(s),t),s.throttledHandleMouseMove=Re(u(l(s),s.handleMouseMove),30),s.on("mousedown",s.handleMouseDown),s.on("touchstart",s.handleMouseDown),s.on(s.volumeBar,["focus","slideractive"],function(){s.volumeBar.addClass("vjs-slider-active"),s.addClass("vjs-slider-active"),s.trigger("slideractive")}),s.on(s.volumeBar,["blur","sliderinactive"],function(){s.volumeBar.removeClass("vjs-slider-active"),s.removeClass("vjs-slider-active"),s.trigger("sliderinactive")}),s}i(n,e);var t=n.prototype;return t.createEl=function(){var t="vjs-volume-horizontal";return this.options_.vertical&&(t="vjs-volume-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+t})},t.handleMouseDown=function(){var t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUp),this.on(t,"touchend",this.handleMouseUp)},t.handleMouseUp=function(){var t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUp),this.off(t,"touchend",this.handleMouseUp)},t.handleMouseMove=function(e){this.volumeBar.handleMouseMove(e)},n}(n),Xs.prototype.options_={children:["volumeBar"]},n.registerComponent("VolumeControl",Xs),Qs=function(e){function n(t,n){var s;return s=e.call(this,t,n)||this,function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")})}(l(s),t),s.on(t,["loadstart","volumechange"],s.update),s}i(n,e);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.handleClick=function(){var n,s=this.player_.volume(),t=this.player_.lastVolume_();0===s?(n=t<.1?.1:t,this.player_.volume(n),this.player_.muted(!1)):this.player_.muted(!this.player_.muted())},t.update=function(){this.updateIcon_(),this.updateControlText_()},t.updateIcon_=function(){var t,n=this.player_.volume(),e=3;q&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===n||this.player_.muted()?e=0:n<.33?e=1:n<.67&&(e=2);for(t=0;t<4;t++)kt(this.el_,"vjs-vol-"+t);re(this.el_,"vjs-vol-"+e)},t.updateControlText_=function(){var e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)},n}(G),Qs.prototype.controlText_="Mute",n.registerComponent("MuteToggle",Qs),Zs=function(e){function n(t,n){var s;return void 0===n&&(n={}),"undefined"!=typeof n.inline?n.inline=n.inline:n.inline=!0,"undefined"!=typeof n.volumeControl&&!yt(n.volumeControl)||(n.volumeControl=n.volumeControl||{},n.volumeControl.vertical=!n.inline),(s=e.call(this,t,n)||this).on(t,["loadstart"],s.volumePanelState_),s.on(s.muteToggle,"keyup",s.handleKeyPress),s.on(s.volumeControl,"keyup",s.handleVolumeControlKeyUp),s.on("keydown",s.handleKeyPress),s.on("mouseover",s.handleMouseOver),s.on("mouseout",s.handleMouseOut),s.on(s.volumeControl,["slideractive"],s.sliderActive_),s.on(s.volumeControl,["sliderinactive"],s.sliderInactive_),s}i(n,e);var t=n.prototype;return t.sliderActive_=function(){this.addClass("vjs-slider-active")},t.sliderInactive_=function(){this.removeClass("vjs-slider-active")},t.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden"),this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")},t.createEl=function(){var t="vjs-volume-panel-horizontal";return this.options_.inline||(t="vjs-volume-panel-vertical"),e.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+t})},t.dispose=function(){this.handleMouseOut(),e.prototype.dispose.call(this)},t.handleVolumeControlKeyUp=function(e){c.isEventKey(e,"Esc")&&this.muteToggle.focus()},t.handleMouseOver=function(){this.addClass("vjs-hover"),K(s,"keyup",u(this,this.handleKeyPress))},t.handleMouseOut=function(){this.removeClass("vjs-hover"),A(s,"keyup",u(this,this.handleKeyPress))},t.handleKeyPress=function(e){c.isEventKey(e,"Esc")&&this.handleMouseOut()},n}(n),Zs.prototype.options_={children:["muteToggle","volumeControl"]},n.registerComponent("VolumePanel",Zs),qn=function(e){function o(t,n){var s;return s=e.call(this,t,n)||this,n&&(s.menuButton_=n.menuButton),s.focusedChild_=-1,s.on("keydown",s.handleKeyDown),s.boundHandleBlur_=u(l(s),s.handleBlur),s.boundHandleTapClick_=u(l(s),s.handleTapClick),s}i(o,e);var t=o.prototype;return t.addEventListenerForItem=function(e){e instanceof n&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))},t.removeEventListenerForItem=function(e){e instanceof n&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))},t.removeChild=function(t){"string"==typeof t&&(t=this.getChild(t)),this.removeEventListenerForItem(t),e.prototype.removeChild.call(this,t)},t.addItem=function(e){var t=this.addChild(e);t&&this.addEventListenerForItem(t)},t.createEl=function(){var t,n=this.options_.contentElType||"ul";return this.contentEl_=g(n,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu"),t=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"}),t.appendChild(this.contentEl_),K(t,"click",function(e){e.preventDefault(),e.stopImmediatePropagation()}),t},t.dispose=function(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,e.prototype.dispose.call(this)},t.handleBlur=function(e){var t,n=e.relatedTarget||s.activeElement;this.children().some(function(e){return e.el()===n})||(t=this.menuButton_,t&&t.buttonPressed_&&n!==t.el().firstChild&&t.unpressButton())},t.handleTapClick=function(e){if(this.menuButton_){this.menuButton_.unpressButton();var t,n=this.children();if(!Array.isArray(n))return;if(t=n.filter(function(t){return t.el()===e.target})[0],!t)return;"CaptionSettingsMenuItem"!==t.name()&&this.menuButton_.focus()}},t.handleKeyDown=function(e){c.isEventKey(e,"Left")||c.isEventKey(e,"Down")?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(c.isEventKey(e,"Right")||c.isEventKey(e,"Up"))&&(e.preventDefault(),e.stopPropagation(),this.stepBack())},t.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.focus=function(e){void 0===e&&(e=0);var t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),0<t.length&&(e<0?e=0:e>=t.length&&(e=t.length-1),t[this.focusedChild_=e].el_.focus())},o}(n),n.registerComponent("Menu",qn),Kn=function(e){function o(t,n){void 0===n&&(n={}),(o=e.call(this,t,n)||this).menuButton_=new G(t,n),o.menuButton_.controlText(o.controlText_),o.menuButton_.el_.setAttribute("aria-haspopup","true");var o,i=G.prototype.buildCSSClass();return o.menuButton_.el_.className=o.buildCSSClass()+" "+i,o.menuButton_.removeClass("vjs-control"),o.addChild(o.menuButton_),o.update(),o.enabled_=!0,o.on(o.menuButton_,"tap",o.handleClick),o.on(o.menuButton_,"click",o.handleClick),o.on(o.menuButton_,"keydown",o.handleKeyDown),o.on(o.menuButton_,"mouseenter",function(){o.addClass("vjs-hover"),o.menu.show(),K(s,"keyup",u(l(o),o.handleMenuKeyUp))}),o.on("mouseleave",o.handleMouseLeave),o.on("keydown",o.handleSubmenuKeyDown),o}i(o,e);var t=o.prototype;return t.update=function(){var e=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu)),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.menuButton_.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.createMenu=function(){var e,s,o,t=new qn(this.player_,{menuButton:this});if((this.hideThreshold_=0,this.options_.title)&&(s=g("li",{className:"vjs-menu-title",innerHTML:b(this.options_.title),tabIndex:-1}),this.hideThreshold_+=1,o=new n(this.player_,{el:s}),t.addItem(o)),this.items=this.createItems(),this.items)for(e=0;e<this.items.length;e++)t.addItem(this.items[e]);return t},t.createItems=function(){},t.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})},t.buildWrapperCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+G.prototype.buildCSSClass()+" "+e.prototype.buildCSSClass.call(this)},t.buildCSSClass=function(){var t="vjs-menu-button";return!0===this.options_.inline?t+="-inline":t+="-popup","vjs-menu-button "+t+" "+e.prototype.buildCSSClass.call(this)},t.controlText=function(e,t){return void 0===t&&(t=this.menuButton_.el()),this.menuButton_.controlText(e,t)},t.dispose=function(){this.handleMouseLeave(),e.prototype.dispose.call(this)},t.handleClick=function(){this.buttonPressed_?this.unpressButton():this.pressButton()},t.handleMouseLeave=function(){this.removeClass("vjs-hover"),A(s,"keyup",u(this,this.handleMenuKeyUp))},t.focus=function(){this.menuButton_.focus()},t.blur=function(){this.menuButton_.blur()},t.handleKeyDown=function(e){c.isEventKey(e,"Esc")||c.isEventKey(e,"Tab")?(this.buttonPressed_&&this.unpressButton(),c.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus())):(c.isEventKey(e,"Up")||c.isEventKey(e,"Down"))&&(this.buttonPressed_||(e.preventDefault(),this.pressButton()))},t.handleMenuKeyUp=function(e){(c.isEventKey(e,"Esc")||c.isEventKey(e,"Tab"))&&this.removeClass("vjs-hover")},t.handleSubmenuKeyPress=function(e){this.handleSubmenuKeyDown(e)},t.handleSubmenuKeyDown=function(e){(c.isEventKey(e,"Esc")||c.isEventKey(e,"Tab"))&&(this.buttonPressed_&&this.unpressButton(),c.isEventKey(e,"Tab")||(e.preventDefault(),this.menuButton_.focus()))},t.pressButton=function(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),q&&sl())return;this.menu.focus()}},t.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))},t.disable=function(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()},t.enable=function(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()},o}(n),n.registerComponent("MenuButton",Kn),Un=function(e){function t(t,n){var s,o,i=n.tracks;return(s=e.call(this,t,n)||this).items.length<=1&&s.hide(),i?(o=u(l(s),s.update),i.addEventListener("removetrack",o),i.addEventListener("addtrack",o),i.addEventListener("labelchange",o),s.player_.on("ready",o),s.player_.on("dispose",function(){i.removeEventListener("removetrack",o),i.removeEventListener("addtrack",o),i.removeEventListener("labelchange",o)}),s):l(s)}return i(t,e),t}(Kn),n.registerComponent("TrackButton",Un),fa=["Tab","Esc","Up","Down","Right","Left"],mt=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).selectable=n.selectable,s.isSelected_=n.selected||!1,s.multiSelectable=n.multiSelectable,s.selected(s.isSelected_),s.selectable?s.multiSelectable?s.el_.setAttribute("role","menuitemcheckbox"):s.el_.setAttribute("role","menuitemradio"):s.el_.setAttribute("role","menuitem"),s}i(n,e);var t=n.prototype;return t.createEl=function(t,n,s){return this.nonIconControl=!0,e.prototype.createEl.call(this,"li",p({className:"vjs-menu-item",innerHTML:'<span class="vjs-menu-item-text">'+this.localize(this.options_.label)+"</span>",tabIndex:-1},n),s)},t.handleKeyDown=function(t){fa.some(function(e){return c.isEventKey(t,e)})||e.prototype.handleKeyDown.call(this,t)},t.handleClick=function(){this.selected(!0)},t.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))},n}(Ct),n.registerComponent("MenuItem",mt),Pe=function(e){function o(n,o){var i,d,r=o.track,a=n.textTracks();o.label=r.label||r.language||"Unknown",o.selected="showing"===r.mode,(i=e.call(this,n,o)||this).track=r,i.kinds=(o.kinds||[o.kind||i.track.kind]).filter(Boolean);function c(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];i.handleTracksChange.apply(l(i),n)}function u(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];i.handleSelectedLanguageChange.apply(l(i),n)}return n.on(["loadstart","texttrackchange"],c),a.addEventListener("change",c),a.addEventListener("selectedlanguagechange",u),i.on("dispose",function(){n.off(["loadstart","texttrackchange"],c),a.removeEventListener("change",c),a.removeEventListener("selectedlanguagechange",u)}),void 0===a.onchange&&i.on(["tap","click"],function(){if("object"!=typeof t.Event)try{d=new t.Event("change")}catch{}d||(d=s.createEvent("Event")).initEvent("change",!0,!0),a.dispatchEvent(d)}),i.handleTracksChange(),i}i(o,e);var n=o.prototype;return n.handleClick=function(t){var n,s,i=this.track,o=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),o)for(s=0;s<o.length;s++)n=o[s],-1!==this.kinds.indexOf(n.kind)&&(n===i?"showing"!==n.mode&&(n.mode="showing"):"disabled"!==n.mode&&(n.mode="disabled"))},n.handleTracksChange=function(){var t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(){if("showing"===this.track.mode){var t=this.player_.cache_.selectedLanguage;if(t&&t.enabled&&t.language===this.track.language&&t.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}},n.dispose=function(){this.track=null,e.prototype.dispose.call(this)},o}(mt),n.registerComponent("TextTrackMenuItem",Pe),io=function(e){function t(t,n){return n.track={player:t,kind:n.kind,kinds:n.kinds,default:!1,mode:"disabled"},n.kinds||(n.kinds=[n.kind]),n.label?n.track.label=n.label:n.track.label=n.kinds.join(" and ")+" off",n.selectable=!0,n.multiSelectable=!1,e.call(this,t,n)||this}i(t,e);var n=t.prototype;return n.handleTracksChange=function(){for(var s,o=this.player().textTracks(),t=!0,n=0,i=o.length;n<i;n++)if(s=o[n],-1<this.options_.kinds.indexOf(s.kind)&&"showing"===s.mode){t=!1;break}t!==this.isSelected_&&this.selected(t)},n.handleSelectedLanguageChange=function(){for(var n,s=this.player().textTracks(),o=!0,t=0,i=s.length;t<i;t++)if(n=s[t],-1<["captions","descriptions","subtitles"].indexOf(n.kind)&&"showing"===n.mode){o=!1;break}o&&(this.player_.cache_.selectedLanguage={enabled:!1})},t}(Pe),n.registerComponent("OffTextTrackMenuItem",io),Ce=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.textTracks(),e.call(this,t,n)||this}return i(t,e),t.prototype.createItems=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=Pe),this.label_&&(i=this.label_+" off"),e.push(new io(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;var n,s,o,i,a=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(n=0;n<a.length;n++)s=a[n],-1<this.kinds_.indexOf(s.kind)&&(o=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1}),o.addClass("vjs-"+s.kind+"-menu-item"),e.push(o));return e},t}(Un),n.registerComponent("TextTrackButton",Ce),ro=function(e){function t(t,n){var s,i=n.track,o=n.cue,a=t.currentTime();return n.selectable=!0,n.multiSelectable=!1,n.label=o.text,n.selected=o.startTime<=a&&a<o.endTime,(s=e.call(this,t,n)||this).track=i,s.cue=o,i.addEventListener("cuechange",u(l(s),s.update)),s}i(t,e);var n=t.prototype;return n.handleClick=function(){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},n.update=function(){var t=this.cue,n=this.player_.currentTime();this.selected(t.startTime<=n&&n<t.endTime)},t}(mt),n.registerComponent("ChaptersTrackMenuItem",ro),Vn=function(e){function n(t,n,s){return e.call(this,t,n,s)||this}i(n,e);var t=n.prototype;return t.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildWrapperCSSClass.call(this)},t.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t,n=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);n&&n.removeEventListener("load",this.updateHandler_),this.track_=null}this.track_=e,this.track_&&(this.track_.mode="hidden",t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_),t&&t.addEventListener("load",this.updateHandler_))}},t.findChaptersTrack=function(){for(var t,n=this.player_.textTracks()||[],e=n.length-1;0<=e;e--)if(t=n[e],t.kind===this.kind_)return t},t.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(b(this.kind_))},t.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.createItems=function(){if(e=[],!this.track_)return e;if(t=this.track_.cues,!t)return e;for(var e,t,s,o,n=0,i=t.length;n<i;n++)s=t[n],o=new ro(this.player_,{track:this.track_,cue:s}),e.push(o);return e},n}(Ce),Vn.prototype.kind_="chapters",Vn.prototype.controlText_="Chapters",n.registerComponent("ChaptersButton",Vn),Bn=function(e){function t(t,n,s){var o=e.call(this,t,n,s)||this,i=t.textTracks(),a=u(l(o),o.handleTracksChange);return i.addEventListener("change",a),o.on("dispose",function(){i.removeEventListener("change",a)}),o}i(t,e);var n=t.prototype;return n.handleTracksChange=function(){for(var n,s=this.player().textTracks(),o=!1,t=0,i=s.length;t<i;t++)if(n=s[t],n.kind!==this.kind_&&"showing"===n.mode){o=!0;break}o?this.disable():this.enable()},n.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Ce),Bn.prototype.kind_="descriptions",Bn.prototype.controlText_="Descriptions",n.registerComponent("DescriptionsButton",Bn),In=function(e){function t(t,n,s){return e.call(this,t,n,s)||this}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildWrapperCSSClass.call(this)},t}(Ce),In.prototype.kind_="subtitles",In.prototype.controlText_="Subtitles",n.registerComponent("SubtitlesButton",In),en=function(e){function t(t,n){var s;return n.track={player:t,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="CaptionSettingsMenuItem",(s=e.call(this,t,n)||this).addClass("vjs-texttrack-settings"),s.controlText(", opens "+n.kind+" settings dialog"),s}return i(t,e),t.prototype.handleClick=function(){this.player().getChild("textTrackSettings").open()},t}(Pe),n.registerComponent("CaptionSettingsMenuItem",en),Rn=function(e){function t(t,n,s){return e.call(this,t,n,s)||this}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-captions-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new en(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Ce),Rn.prototype.kind_="captions",Rn.prototype.controlText_="Captions",n.registerComponent("CaptionsButton",Rn),fo=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.createEl=function(t,n,s){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"captions"===this.options_.track.kind&&(o+=`
        <span aria-hidden="true" class="vjs-icon-placeholder"></span>
        <span class="vjs-control-text"> `+this.localize("Captions")+`</span>
      `),o+="</span>",e.prototype.createEl.call(this,t,p({innerHTML:o},n),s)},t}(Pe),n.registerComponent("SubsCapsMenuItem",fo),Ln=function(e){function t(t,n){var s;return void 0===n&&(n={}),(s=e.call(this,t,n)||this).label_="subtitles",-1<["en","en-us","en-ca","fr-ca"].indexOf(s.player_.language_)&&(s.label_="captions"),s.menuButton_.controlText(b(s.label_)),s}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(t.push(new en(this.player_,{kind:this.label_})),this.hideThreshold_+=1),t=e.prototype.createItems.call(this,t,fo)},t}(Ce),Ln.prototype.kinds_=["captions","subtitles"],Ln.prototype.controlText_="Subtitles",n.registerComponent("SubsCapsButton",Ln),go=function(e){function t(t,n){var s,o=n.track,i=t.audioTracks();n.label=o.label||o.language||"Unknown",n.selected=o.enabled,(s=e.call(this,t,n)||this).track=o,s.addClass("vjs-"+o.kind+"-menu-item");function a(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];s.handleTracksChange.apply(l(s),n)}return i.addEventListener("change",a),s.on("dispose",function(){i.removeEventListener("change",a)}),s}i(t,e);var n=t.prototype;return n.createEl=function(t,n,s){var o='<span class="vjs-menu-item-text">'+this.localize(this.options_.label);return"main-desc"===this.options_.track.kind&&(o+=`
        <span aria-hidden="true" class="vjs-icon-placeholder"></span>
        <span class="vjs-control-text"> `+this.localize("Descriptions")+`</span>
      `),o+="</span>",e.prototype.createEl.call(this,t,p({innerHTML:o},n),s)},n.handleClick=function(t){var n,s,o=this.player_.audioTracks();e.prototype.handleClick.call(this,t);for(n=0;n<o.length;n++)s=o[n],s.enabled=s===this.track},n.handleTracksChange=function(){this.selected(this.track.enabled)},t}(mt),n.registerComponent("AudioTrackMenuItem",go),fs=function(e){function t(t,n){return void 0===n&&(n={}),n.tracks=t.audioTracks(),e.call(this,t,n)||this}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},n.buildWrapperCSSClass=function(){return"vjs-audio-button "+e.prototype.buildWrapperCSSClass.call(this)},n.createItems=function(e){void 0===e&&(e=[]),this.hideThreshold_=1;for(var s,n=this.player_.audioTracks(),t=0;t<n.length;t++)s=n[t],e.push(new go(this.player_,{track:s,selectable:!0,multiSelectable:!1}));return e},t}(Un),fs.prototype.controlText_="Audio Track",n.registerComponent("AudioTrackButton",fs),Dn=function(e){function t(t,n){var s,o=n.rate,i=parseFloat(o,10);return n.label=o,n.selected=1===i,n.selectable=!0,n.multiSelectable=!1,(s=e.call(this,t,n)||this).label=o,s.rate=i,s.on(t,"ratechange",s.update),s}i(t,e);var n=t.prototype;return n.handleClick=function(){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},n.update=function(){this.selected(this.player().playbackRate()===this.rate)},t}(mt),Dn.prototype.contentElType="button",n.registerComponent("PlaybackRateMenuItem",Dn),jo=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).updateVisibility(),s.updateLabel(),s.on(t,"loadstart",s.updateVisibility),s.on(t,"ratechange",s.updateLabel),s}i(n,e);var t=n.prototype;return t.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=g("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_),t},t.dispose=function(){this.labelEl_=null,e.prototype.dispose.call(this)},t.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.buildWrapperCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildWrapperCSSClass.call(this)},t.createMenu=function(){var e,n=new qn(this.player()),t=this.playbackRates();if(t)for(e=t.length-1;0<=e;e--)n.addChild(new Dn(this.player(),{rate:t[e]+"x"}));return n},t.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.handleClick=function(){for(var o=this.player().playbackRate(),t=this.playbackRates(),s=t[0],n=0;n<t.length;n++)if(t[n]>o){s=t[n];break}this.player().playbackRate(s)},t.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length},t.updateVisibility=function(){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.updateLabel=function(){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},n}(Kn),jo.prototype.controlText_="Playback Rate",n.registerComponent("PlaybackRateMenuButton",jo),yo=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(n),n.registerComponent("Spacer",yo),ca=function(e){function t(){return e.apply(this,arguments)||this}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},n.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML=" ",t},t}(yo),n.registerComponent("CustomControlSpacer",ca),bt=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})},t}(n),bt.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in s&&bt.prototype.options_.children.splice(bt.prototype.options_.children.length-1,0,"pictureInPictureToggle"),n.registerComponent("ControlBar",bt),Oo=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).on(t,"error",s.open),s}i(t,e);var n=t.prototype;return n.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},n.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(Qe),Oo.prototype.options_=Mn({},Qe.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),n.registerComponent("ErrorDisplay",Oo);var xo="vjs-text-track-settings",na=["#000","Black"],ta=["#00F","Blue"],ea=["#0FF","Cyan"],Ji=["#0F0","Green"],Zi=["#F0F","Magenta"],Qi=["#F00","Red"],Xi=["#FFF","White"],Gi=["#FF0","Yellow"],zo=["1","Opaque"],Do=["0.5","Semi-Transparent"],Ki=["0","Transparent"],xe={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[na,Xi,Qi,Ji,ta,Gi,Zi,ea]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[zo,Do,Ki]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[Xi,na,Qi,Ji,ta,Gi,Zi,ea]},edgeStyle:{selector:".vjs-edge-style > select",id:"%s",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Dropshadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"captions-font-family-%s",label:"Font Family",options:[["proportionalSansSerif","Proportional Sans-Serif"],["monospaceSansSerif","Monospace Sans-Serif"],["proportionalSerif","Proportional Serif"],["monospaceSerif","Monospace Serif"],["casual","Casual"],["script","Script"],["small-caps","Small Caps"]]},fontPercent:{selector:".vjs-font-percent > select",id:"captions-font-size-%s",label:"Font Size",options:[["0.50","50%"],["0.75","75%"],["1.00","100%"],["1.25","125%"],["1.50","150%"],["1.75","175%"],["2.00","200%"],["3.00","300%"],["4.00","400%"]],default:2,parser:function(e){return"1.00"===e?null:Number(e)}},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[zo,Do]},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Transparency",options:[Ki,Do,zo]}};function Vi(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}xe.windowColor.options=xe.backgroundColor.options,Hi=function(e){function s(t,n){var s;return n.temporary=!1,(s=e.call(this,t,n)||this).updateDisplay=u(l(s),s.updateDisplay),s.fill(),s.hasBeenOpened_=s.hasBeenFilled_=!0,s.endDialog=g("p",{className:"vjs-control-text",textContent:s.localize("End of dialog window.")}),s.el().appendChild(s.endDialog),s.setDefaults(),void 0===n.persistTextTrackSettings&&(s.options_.persistTextTrackSettings=s.options_.playerOptions.persistTextTrackSettings),s.on(s.$(".vjs-done-button"),"click",function(){s.saveSettings(),s.close()}),s.on(s.$(".vjs-default-button"),"click",function(){s.setDefaults(),s.updateDisplay()}),He(xe,function(e){s.on(s.$(e.selector),"change",s.updateDisplay)}),s.options_.persistTextTrackSettings&&s.restoreSettings(),s}i(s,e);var n=s.prototype;return n.dispose=function(){this.endDialog=null,e.prototype.dispose.call(this)},n.createElSelect_=function(e,t,n){i=this,void 0===t&&(t=""),void 0===n&&(n="label");var i,s=xe[e],o=s.id.replace("%s",this.id_),a=[t,o].join(" ").trim();return["<"+n+' id="'+o+'" class="'+("label"===n?"vjs-label":"")+'">',this.localize(s.label),"</"+n+">",'<select aria-labelledby="'+a+'">'].concat(s.options.map(function(e){var t=o+"-"+e[1].replace(/\W+/g,"");return['<option id="'+t+'" value="'+e[0]+'" ','aria-labelledby="'+a+" "+t+'">',i.localize(e[1]),"</option>"].join("")})).concat("</select>").join("")},n.createElFgColor_=function(){var e="captions-text-legend-"+this.id_;return['<fieldset class="vjs-fg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Text"),"</legend>",this.createElSelect_("color",e),'<span class="vjs-text-opacity vjs-opacity">',this.createElSelect_("textOpacity",e),"</span>","</fieldset>"].join("")},n.createElBgColor_=function(){var e="captions-background-"+this.id_;return['<fieldset class="vjs-bg-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Background"),"</legend>",this.createElSelect_("backgroundColor",e),'<span class="vjs-bg-opacity vjs-opacity">',this.createElSelect_("backgroundOpacity",e),"</span>","</fieldset>"].join("")},n.createElWinColor_=function(){var e="captions-window-"+this.id_;return['<fieldset class="vjs-window-color vjs-track-setting">','<legend id="'+e+'">',this.localize("Window"),"</legend>",this.createElSelect_("windowColor",e),'<span class="vjs-window-opacity vjs-opacity">',this.createElSelect_("windowOpacity",e),"</span>","</fieldset>"].join("")},n.createElColors_=function(){return g("div",{className:"vjs-track-settings-colors",innerHTML:[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()].join("")})},n.createElFont_=function(){return g("div",{className:"vjs-track-settings-font",innerHTML:['<fieldset class="vjs-font-percent vjs-track-setting">',this.createElSelect_("fontPercent","","legend"),"</fieldset>",'<fieldset class="vjs-edge-style vjs-track-setting">',this.createElSelect_("edgeStyle","","legend"),"</fieldset>",'<fieldset class="vjs-font-family vjs-track-setting">',this.createElSelect_("fontFamily","","legend"),"</fieldset>"].join("")})},n.createElControls_=function(){var e=this.localize("restore all settings to the default values");return g("div",{className:"vjs-track-settings-controls",innerHTML:['<button type="button" class="vjs-default-button" title="'+e+'">',this.localize("Reset"),'<span class="vjs-control-text"> '+e+"</span>","</button>",'<button type="button" class="vjs-done-button">'+this.localize("Done")+"</button>"].join("")})},n.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},n.label=function(){return this.localize("Caption Settings Dialog")},n.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},n.buildCSSClass=function(){return e.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},n.getValues=function(){var e=this;return function(e,t,n){return void 0===n&&(n=0),Cl(e).reduce(function(n,s){return t(n,e[s],s)},n)}(xe,function(t,n,s){var o=function(e,t){return Vi(e.options[e.options.selectedIndex].value,t)}(e.$(n.selector),n.parser);return void 0!==o&&(t[s]=o),t},{})},n.setValues=function(e){var t=this;He(xe,function(n,s){!function(e,t,n){if(t)for(var s=0;s<e.options.length;s++)if(Vi(e.options[s].value,n)===t){e.selectedIndex=s;break}}(t.$(n.selector),e[s],n.parser)})},n.setDefaults=function(){var e=this;He(xe,function(t){var n=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=n})},n.restoreSettings=function(){var e;try{e=JSON.parse(t.localStorage.getItem(xo))}catch(e){d.warn(e)}e&&this.setValues(e)},n.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?t.localStorage.setItem(xo,JSON.stringify(e)):t.localStorage.removeItem(xo)}catch(e){d.warn(e)}}},n.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},n.conditionalBlur_=function(){this.previouslyActiveEl_=null;var e=this.player_.controlBar,t=e&&e.subsCapsButton,n=e&&e.captionsButton;t?t.focus():n&&n.focus()},s}(Qe),n.registerComponent("TextTrackSettings",Hi),Ri=function(e){function n(n,s){var o,a,i=s.ResizeObserver||t.ResizeObserver;return null===s.ResizeObserver&&(i=!1),a=f({createEl:!i,reportTouchActivity:!1},s),(o=e.call(this,n,a)||this).ResizeObserver=s.ResizeObserver||t.ResizeObserver,o.loadListener_=null,o.resizeObserver_=null,o.debouncedHandler_=function(e,n,s,o){var i;void 0===o&&(o=t);function a(){var t=this,a=arguments,r=function(){r=i=null,s||e.apply(t,a)};!i&&s&&e.apply(t,a),o.clearTimeout(i),i=o.setTimeout(r,n)}return a.cancel=function(){o.clearTimeout(i),i=null},a}(function(){o.resizeHandler()},100,!1,l(o)),i?(o.resizeObserver_=new o.ResizeObserver(o.debouncedHandler_),o.resizeObserver_.observe(n.el())):(o.loadListener_=function(){if(o.el_&&o.el_.contentWindow){var t=o.debouncedHandler_,e=o.unloadListener_=function(){A(this,"resize",t),A(this,"unload",e),e=null};K(o.el_.contentWindow,"unload",e),K(o.el_.contentWindow,"resize",t)}},o.one("load",o.loadListener_)),o}i(n,e);var s=n.prototype;return s.createEl=function(){return e.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1},{"aria-hidden":"true"})},s.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")},s.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel(),this.resizeObserver_&&(this.player_.el()&&this.resizeObserver_.unobserve(this.player_.el()),this.resizeObserver_.disconnect()),this.loadListener_&&this.off("load",this.loadListener_),this.el_&&this.el_.contentWindow&&this.unloadListener_&&this.unloadListener_.call(this.el_.contentWindow),this.ResizeObserver=null,this.resizeObserver=null,this.debouncedHandler_=null,this.loadListener_=null,e.prototype.dispose.call(this)},n}(n),n.registerComponent("ResizeManager",Ri),Ni={trackingThreshold:30,liveTolerance:15},Di=function(e){function o(t,n){var o,i=f(Ni,n,{createEl:!1});return(o=e.call(this,t,i)||this).reset_(),o.on(o.player_,"durationchange",o.handleDurationchange),o.one(o.player_,"canplay",function(){return o.toggleTracking()}),Zt&&"hidden"in s&&"visibilityState"in s&&o.on(s,"visibilitychange",o.handleVisibilityChange),o}i(o,e);var n=o.prototype;return n.handleVisibilityChange=function(){this.player_.duration()===1/0&&(s.hidden?this.stopTracking():this.startTracking())},n.trackLive_=function(){if(e=this.player_.seekable(),e&&e.length){n=Number(t.performance.now().toFixed(4)),o=-1===this.lastTime_?0:(n-this.lastTime_)/1e3,this.lastTime_=n,this.pastSeekEnd_=this.pastSeekEnd()+o;var e,n,o,i=this.liveCurrentTime(),a=this.player_.currentTime(),s=this.player_.paused()||this.seekedBehindLive_||Math.abs(i-a)>this.options_.liveTolerance;this.timeupdateSeen_&&i!==1/0||(s=!1),s!==this.behindLiveEdge_&&(this.behindLiveEdge_=s,this.trigger("liveedgechange"))}},n.handleDurationchange=function(){this.toggleTracking()},n.toggleTracking=function(){this.player_.duration()===1/0&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())},n.startTracking=function(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLive_,30),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLive_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked):(this.one(this.player_,"play",this.handlePlay),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate)))},n.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked)},n.handleSeeked=function(){var e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=!this.skipNextSeeked_&&2<e,this.skipNextSeeked_=!1,this.trackLive_()},n.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge)},n.reset_=function(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.skipNextSeeked_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLive_),this.off(this.player_,"seeked",this.handleSeeked),this.off(this.player_,"play",this.handlePlay),this.off(this.player_,"timeupdate",this.handleFirstTimeupdate),this.off(this.player_,"timeupdate",this.seekToLiveEdge)},n.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))},n.seekableEnd=function(){for(var t=this.player_.seekable(),e=[],n=t?t.length:0;n--;)e.push(t.end(n));return e.length?e.sort()[e.length-1]:1/0},n.seekableStart=function(){for(var e=this.player_.seekable(),t=[],n=e?e.length:0;n--;)t.push(e.start(n));return t.length?t.sort()[0]:0},n.liveWindow=function(){var e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()},n.isLive=function(){return this.isTracking()},n.atLiveEdge=function(){return!this.behindLiveEdge()},n.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()},n.pastSeekEnd=function(){var e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_},n.behindLiveEdge=function(){return this.behindLiveEdge_},n.isTracking=function(){return"number"==typeof this.trackingInterval_},n.seekToLiveEdge=function(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.skipNextSeeked_=!0,this.player_.currentTime(this.liveCurrentTime()))},n.dispose=function(){this.off(s,"visibilitychange",this.handleVisibilityChange),this.stopTracking(),e.prototype.dispose.call(this)},o}(n),n.registerComponent("LiveTracker",Di);function Vo(e){if(o=e.el(),o.hasAttribute("src"))return e.triggerSourceset(o.src),!0;var n,s,o,i=e.$$("source"),t=[],a="";if(!i.length)return!1;for(n=0;n<i.length;n++)s=i[n].src,s&&-1===t.indexOf(s)&&t.push(s);return!!t.length&&(1===t.length&&(a=t[0]),e.triggerSourceset(a),!0)}function zi(e,t){for(var n={},s=0;s<e.length&&!((n=Object.getOwnPropertyDescriptor(e[s],t))&&n.set&&n.get);s++);return n.enumerable=!0,n.configurable=!0,n}function Ti(e){if(n=e.el(),!n.resetSourceWatch_){var n,s={},o=function(e){return zi([e.el(),t.HTMLMediaElement.prototype,t.Element.prototype,cu],"innerHTML")}(e),i=function(t){return function(){for(var a,o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return a=t.apply(n,i),Vo(e),a}};["append","appendChild","insertAdjacentHTML"].forEach(function(e){n[e]&&(s[e]=n[e],n[e]=i(s[e]))}),Object.defineProperty(n,"innerHTML",f(o,{set:i(o.set)})),n.resetSourceWatch_=function(){n.resetSourceWatch_=null,Object.keys(s).forEach(function(e){n[e]=s[e]}),Object.defineProperty(n,"innerHTML",o)},e.one("sourceset",n.resetSourceWatch_)}}function lu(e){if(e.featuresSourceset&&(n=e.el(),!n.resetSourceset_)){var n,s=function(e){return zi([e.el(),t.HTMLMediaElement.prototype,ou],"src")}(e),o=n.setAttribute,i=n.load;Object.defineProperty(n,"src",f(s,{set:function(t){var o=s.set.call(n,t);return e.triggerSourceset(n.src),o}})),n.setAttribute=function(t,s){var i=o.call(n,t,s);return/src/i.test(t)&&e.triggerSourceset(n.src),i},n.load=function(){var t=i.call(n);return Vo(e)||(e.triggerSourceset(""),Ti(e)),t},n.currentSrc?e.triggerSourceset(n.currentSrc):Vo(e)||Ti(e),n.resetSourceset_=function(){n.resetSourceset_=null,n.load=i,n.setAttribute=o,Object.defineProperty(n,"src",s),n.resetSourceWatch_&&n.resetSourceWatch_()}}}function Ko(e,t,n,s){function o(n){return Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0})}void 0===s&&(s=!0);var i={configurable:!0,enumerable:!0,get:function(){var e=n();return o(e),e}};return s&&(i.set=o),Object.defineProperty(e,t,i)}var En,cu=Object.defineProperty({},"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(e){var o,n=s.createElement(this.nodeName.toLowerCase());n.innerHTML=e;for(o=s.createDocumentFragment();n.childNodes.length;)o.appendChild(n.childNodes[0]);return this.innerText="",t.Element.prototype.appendChild.call(this,o),this.innerHTML}}),ou=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?Rr(t.Element.prototype.getAttribute.call(this,"src")):""},set:function(e){return t.Element.prototype.setAttribute.call(this,"src",e),e}}),a=function(e){function o(t,n){if(s=e.call(this,t,n)||this,i=t.source,a=!1,i&&(s.el_.currentSrc!==i.src||t.tag&&3===t.tag.initNetworkState_)?s.setSource(i):s.handleLateInit_(s.el_),t.enableSourceset&&s.setupSourcesetHandling_(),s.isScrubbing_=!1,s.el_.hasChildNodes()){for(var s,o,i,a,r,l=s.el_.childNodes,u=l.length,c=[];u--;)o=l[u],"track"===o.nodeName.toLowerCase()&&(s.featuresNativeTextTracks?(s.remoteTextTrackEls().addTrackElement_(o),s.remoteTextTracks().addTrack(o.track),s.textTracks().addTrack(o.track),a||s.el_.hasAttribute("crossorigin")||!wn(o.src)||(a=!0)):c.push(o));for(r=0;r<c.length;r++)s.el_.removeChild(c[r])}return s.proxyNativeTracks_(),s.featuresNativeTextTracks&&a&&d.warn(`Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.
This may prevent text tracks from loading.`),s.restoreMetadataTracksInIOSNativePlayer_(),(Ie||Qo||jl)&&!0===t.nativeControlsForTouch&&s.setControls(!0),s.proxyWebkitFullscreen_(),s.triggerReady(),s}i(o,e);var n=o.prototype;return n.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),o.disposeMediaElement(this.el_),this.options_=null,e.prototype.dispose.call(this)},n.setupSourcesetHandling_=function(){lu(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){function t(){n=[];for(var t,s=0;s<e.length;s++)t=e[s],"metadata"===t.kind&&n.push({track:t,storedMode:t.mode})}var n,e=this.textTracks();t(),e.addEventListener("change",t),this.on("dispose",function(){return e.removeEventListener("change",t)});function s(){for(var t,o=0;o<n.length;o++)t=n[o],"disabled"===t.track.mode&&t.track.mode!==t.storedMode&&(t.track.mode=t.storedMode);e.removeEventListener("change",s)}this.on("webkitbeginfullscreen",function(){e.removeEventListener("change",t),e.removeEventListener("change",s),e.addEventListener("change",s)}),this.on("webkitendfullscreen",function(){e.removeEventListener("change",t),e.addEventListener("change",t),e.removeEventListener("change",s)})},n.overrideNative_=function(e,t){var n,s=this;t===this["featuresNative"+e+"Tracks"]&&(n=e.toLowerCase(),this[n+"TracksListeners_"]&&Object.keys(this[n+"TracksListeners_"]).forEach(function(e){s.el()[n+"Tracks"].removeEventListener(e,s[n+"TracksListeners_"][e])}),this["featuresNative"+e+"Tracks"]=!t,this[n+"TracksListeners_"]=null,this.proxyNativeTracksForType_(n))},n.overrideNativeAudioTracks=function(e){this.overrideNative_("Audio",e)},n.overrideNativeVideoTracks=function(e){this.overrideNative_("Video",e)},n.proxyNativeTracksForType_=function(e){var o,a,i=this,s=$[e],n=this.el()[s.getterName],t=this[s.getterName]();this["featuresNative"+s.capitalName+"Tracks"]&&n&&n.addEventListener&&(o={change:function(){var s={type:"change",target:t,currentTarget:t,srcElement:t};t.trigger(s),"text"===e&&i[Ae.remoteText.getterName]().trigger(s)},addtrack:function(e){t.addTrack(e.track)},removetrack:function(e){t.removeTrack(e.track)}},a=function(){for(var s,i,o=[],e=0;e<t.length;e++){for(i=!1,s=0;s<n.length;s++)if(n[s]===t[e]){i=!0;break}i||o.push(t[e])}for(;o.length;)t.removeTrack(o.shift())},this[s.getterName+"Listeners_"]=o,Object.keys(o).forEach(function(e){var t=o[e];n.addEventListener(e,t),i.on("dispose",function(){return n.removeEventListener(e,t)})}),this.on("loadstart",a),this.on("dispose",function(){return i.off("loadstart",a)}))},n.proxyNativeTracks_=function(){var e=this;$.names.forEach(function(t){e.proxyNativeTracksForType_(t)})},n.createEl=function(){e=this.options_.tag,(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM)&&(e?(i=e.cloneNode(!0),e.parentNode&&e.parentNode.insertBefore(i,e),o.disposeMediaElement(e),e=i):(e=s.createElement("video"),a=f({},this.options_.tag&&ae(this.options_.tag)),Ie&&!0===this.options_.nativeControlsForTouch||delete a.controls,Jc(e,p(a,{id:this.options_.techId,class:"vjs-tech"}))),e.playerId=this.options_.playerId),"undefined"!=typeof this.options_.preload&&Gt(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);for(var e,t,n,i,a,c=["loop","muted","playsinline","autoplay"],r=0;r<c.length;r++)t=c[r],n=this.options_[t],"undefined"!=typeof n&&(n?Gt(e,t,t):gn(e,t),e[t]=n);return e},n.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t,s,n=!1,o=function(){n=!0};return this.on("loadstart",o),s=function(){n||this.trigger("loadstart")},this.on("loadedmetadata",s),void this.ready(function(){this.off("loadstart",o),this.off("loadedmetadata",s),n||this.trigger("loadstart")})}t=["loadstart"],t.push("loadedmetadata"),2<=e.readyState&&t.push("loadeddata"),3<=e.readyState&&t.push("canplay"),4<=e.readyState&&t.push("canplaythrough"),this.ready(function(){t.forEach(function(e){this.trigger(e)},this)})}},n.setScrubbing=function(e){this.isScrubbing_=e},n.scrubbing=function(){return this.isScrubbing_},n.setCurrentTime=function(e){try{this.isScrubbing_&&this.el_.fastSeek&&Xn?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){d(e,"Video is not ready. (Video.js)")}},n.duration=function(){var e=this;return this.el_.duration===1/0&&ue&&le&&0===this.el_.currentTime?(this.on("timeupdate",function t(){0<e.el_.currentTime&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))}),NaN):this.el_.duration||NaN},n.width=function(){return this.el_.offsetWidth},n.height=function(){return this.el_.offsetHeight},n.proxyWebkitFullscreen_=function(){if(e=this,"webkitDisplayingFullscreen"in this.el_){var e,t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},n=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",n),this.on("dispose",function(){e.off("webkitbeginfullscreen",n),e.off("webkitendfullscreen",t)})}},n.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=t.navigator&&t.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},n.enterFullScreen=function(){var e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Te(this.el_.play()),this.setTimeout(function(){e.pause();try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},0);else try{e.webkitEnterFullScreen()}catch(e){this.trigger("fullscreenerror",e)}},n.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))},n.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()},n.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},n.reset=function(){o.resetMediaElement(this.el_)},n.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},n.setControls=function(e){this.el_.controls=!!e},n.addTextTrack=function(t,n,s){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,n,s):e.prototype.addTextTrack.call(this,t,n,s)},n.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var n=s.createElement("track");return t.kind&&(n.kind=t.kind),t.label&&(n.label=t.label),(t.language||t.srclang)&&(n.srclang=t.language||t.srclang),t.default&&(n.default=t.default),t.id&&(n.id=t.id),t.src&&(n.src=t.src),n},n.addRemoteTextTrack=function(t,n){var s=e.prototype.addRemoteTextTrack.call(this,t,n);return this.featuresNativeTextTracks&&this.el().appendChild(s),s},n.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var n=this.$$("track"),s=n.length;s--;)t!==n[s]&&t!==n[s].track||this.el().removeChild(n[s])},n.getVideoPlaybackQuality=function(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();var e={};return"undefined"!=typeof this.el().webkitDroppedFrameCount&&"undefined"!=typeof this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),t.performance&&"function"==typeof t.performance.now?e.creationTime=t.performance.now():t.performance&&t.performance.timing&&"number"==typeof t.performance.timing.navigationStart&&(e.creationTime=t.Date.now()-t.performance.timing.navigationStart),e},o}(m);Ko(a,"TEST_VID",function(){if(ot()){var t=s.createElement("video"),e=s.createElement("track");return e.kind="captions",e.srclang="en",e.label="English",t.appendChild(e),t}}),a.isSupported=function(){try{a.TEST_VID.volume=.5}catch{return!1}return!!a.TEST_VID&&!!a.TEST_VID.canPlayType},a.canPlayType=function(e){return a.TEST_VID.canPlayType(e)},a.canPlaySource=function(e){return a.canPlayType(e.type)},a.canControlVolume=function(){try{var e=a.TEST_VID.volume;return a.TEST_VID.volume=e/2+.1,e!==a.TEST_VID.volume}catch{return!1}},a.canMuteVolume=function(){try{var e=a.TEST_VID.muted;return a.TEST_VID.muted=!e,a.TEST_VID.muted?Gt(a.TEST_VID,"muted","muted"):gn(a.TEST_VID,"muted"),e!==a.TEST_VID.muted}catch{return!1}},a.canControlPlaybackRate=function(){if(ue&&le&&ul<58)return!1;try{var e=a.TEST_VID.playbackRate;return a.TEST_VID.playbackRate=e/2+.1,e!==a.TEST_VID.playbackRate}catch{return!1}},a.canOverrideAttributes=function(){try{var e=function(){};Object.defineProperty(s.createElement("video"),"src",{get:e,set:e}),Object.defineProperty(s.createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(s.createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(s.createElement("audio"),"innerHTML",{get:e,set:e})}catch{return!1}return!0},a.supportsNativeTextTracks=function(){return Xn||q&&le},a.supportsNativeVideoTracks=function(){return!!a.TEST_VID&&!!a.TEST_VID.videoTracks},a.supportsNativeAudioTracks=function(){return!!a.TEST_VID&&!!a.TEST_VID.audioTracks},a.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresVolumeControl","canControlVolume"],["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach(function(e){var t=e[0],n=e[1];Ko(a.prototype,t,function(){return a[n]()},!0)}),a.prototype.movingMediaElementInDOM=!q,a.prototype.featuresFullscreenResize=!0,a.prototype.featuresProgressEvents=!0,a.prototype.featuresTimeupdateEvents=!0,a.patchCanPlayType=function(){4<=uo&&!ml&&!le&&(En=a.TEST_VID&&a.TEST_VID.constructor.prototype.canPlayType,a.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&/^application\/(?:x-|vnd\.apple\.)mpegurl/i.test(e)?"maybe":En.call(this,e)})},a.unpatchCanPlayType=function(){var e=a.TEST_VID.constructor.prototype.canPlayType;return En&&(a.TEST_VID.constructor.prototype.canPlayType=En),e},a.patchCanPlayType(),a.disposeMediaElement=function(e){if(e){for(e.parentNode&&e.parentNode.removeChild(e);e.hasChildNodes();)e.removeChild(e.firstChild);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch{}}()}},a.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),n=t.length;n--;)e.removeChild(t[n]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch{}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach(function(e){a.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}}),["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(e){a.prototype["set"+b(e)]=function(t){(this.el_[e]=t)?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}}),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","defaultPlaybackRate","disablePictureInPicture","played","networkState","readyState","videoWidth","videoHeight","crossOrigin"].forEach(function(e){a.prototype[e]=function(){return this.el_[e]}}),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach(function(e){a.prototype["set"+b(e)]=function(t){this.el_[e]=t}}),["pause","load","play"].forEach(function(e){a.prototype[e]=function(){return this.el_[e]()}}),m.withSourceHandlers(a),a.nativeSourceHandler={},a.nativeSourceHandler.canPlayType=function(e){try{return a.TEST_VID.canPlayType(e)}catch{return""}},a.nativeSourceHandler.canHandleSource=function(e){if(e.type)return a.nativeSourceHandler.canPlayType(e.type);if(e.src){var n=Lo(e.src);return a.nativeSourceHandler.canPlayType("video/"+n)}return""},a.nativeSourceHandler.handleSource=function(e,t){t.setSrc(e.src)},a.nativeSourceHandler.dispose=function(){},a.registerSourceHandler(a.nativeSourceHandler),m.registerTech("Html5",a);var Si=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Zo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Jo=["tiny","xsmall","small","medium","large","xlarge","huge"],jn={};Jo.forEach(function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;jn[e]="vjs-layout-"+t}),ki={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0},j=function(e){function a(t,n,o){if(t.id=t.id||n.id||"vjs_video_"+ge(),(n=p(a.getTagSettings(t),n)).initChildren=!1,n.createEl=!1,n.evented=!1,n.reportTouchActivity=!1,!n.language)if("function"==typeof t.closest){var i,r,d,u,h,c=t.closest("[lang]");c&&c.getAttribute&&(n.language=c.getAttribute("lang"))}else for(r=t;r&&1===r.nodeType;){if(ae(r).hasOwnProperty("lang")){n.language=r.getAttribute("lang");break}r=r.parentNode}if((i=e.call(this,null,n,o)||this).boundDocumentFullscreenChange_=function(e){return i.documentFullscreenChange_(e)},i.boundFullWindowOnEscKey_=function(e){return i.fullWindowOnEscKey(e)},i.isFullscreen_=!1,i.log=El(i.id_),i.fsApi_=un,i.isPosterFromTech_=!1,i.queuedCallbacks_=[],i.isReady_=!1,i.hasStarted_=!1,i.userActive_=!1,i.debugEnabled_=!1,!i.options_||!i.options_.techOrder||!i.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");return i.tag=t,i.tagAttributes=t&&ae(t),i.language(i.options_.language),n.languages?(d={},Object.getOwnPropertyNames(n.languages).forEach(function(e){d[e.toLowerCase()]=n.languages[e]}),i.languages_=d):i.languages_=a.prototype.options_.languages,i.resetCache_(),i.poster_=n.poster||"",i.controls_=!!n.controls,t.controls=!1,t.removeAttribute("controls"),i.changingSrc_=!1,i.playCallbacks_=[],i.playTerminatedQueue_=[],t.hasAttribute("autoplay")?i.autoplay(!0):i.autoplay(i.options_.autoplay),n.plugins&&Object.keys(n.plugins).forEach(function(e){if("function"!=typeof i[e])throw new Error('plugin "'+e+'" does not exist')}),i.scrubbing_=!1,i.el_=i.createEl(),_o(l(i),{eventBusKey:"el_"}),i.fsApi_.requestFullscreen&&(K(s,i.fsApi_.fullscreenchange,i.boundDocumentFullscreenChange_),i.on(i.fsApi_.fullscreenchange,i.boundDocumentFullscreenChange_)),i.fluid_&&i.on(["playerreset","resize"],i.updateStyleEl_),u=f(i.options_),n.plugins&&Object.keys(n.plugins).forEach(function(e){i[e](n.plugins[e])}),n.debug&&i.debug(!0),i.options_.playerOptions=u,i.middleware_=[],i.initChildren(),i.isAudio("audio"===t.nodeName.toLowerCase()),i.controls()?i.addClass("vjs-controls-enabled"):i.addClass("vjs-controls-disabled"),i.el_.setAttribute("role","region"),i.isAudio()?i.el_.setAttribute("aria-label",i.localize("Audio Player")):i.el_.setAttribute("aria-label",i.localize("Video Player")),i.isAudio()&&i.addClass("vjs-audio"),i.flexNotSupported_()&&i.addClass("vjs-no-flex"),Ie&&i.addClass("vjs-touch-enabled"),q||i.addClass("vjs-workinghover"),a.players[i.id_]=l(i),h=Po.split(".")[0],i.addClass("vjs-v"+h),i.userActive(!0),i.reportUserActivity(),i.one("play",i.listenForUserActivity_),i.on("stageclick",i.handleStageClick_),i.on("keydown",i.handleKeyDown),i.on("languagechange",i.handleLanguagechange),i.breakpoints(i.options_.breakpoints),i.responsive(i.options_.responsive),i}i(a,e);var o=a.prototype;return o.dispose=function(){var t=this;this.trigger("dispose"),this.off("dispose"),A(s,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),A(s,"keydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),a.players[this.id_]=null,this.tag&&this.tag.player&&(this.tag.player=null),this.el_&&this.el_.player&&(this.el_.player=null),this.tech_&&(this.tech_.dispose(),this.isPosterFromTech_=!1,this.poster_=""),this.playerElIngest_&&(this.playerElIngest_=null),this.tag&&(this.tag=null),function(e){Gs[e.id()]=null}(this),S.names.forEach(function(e){var s=S[e],n=t[s.getterName]();n&&n.off&&n.off()}),e.prototype.dispose.call(this)},o.createEl=function(){var o,i,r,l,d,u,h,n=this.tag,c=this.playerElIngest_=n.parentNode&&n.parentNode.hasAttribute&&n.parentNode.hasAttribute("data-vjs-player"),a="video-js"===this.tag.tagName.toLowerCase();if(c?o=this.el_=n.parentNode:a||(o=this.el_=e.prototype.createEl.call(this,"div")),i=ae(n),a){for(o=this.el_=n,n=this.tag=s.createElement("video");o.children.length;)n.appendChild(o.firstChild);Ne(o,"video-js")||re(o,"video-js"),o.appendChild(n),c=this.playerElIngest_=o,Object.keys(o).forEach(function(e){try{n[e]=o[e]}catch{}})}(n.setAttribute("tabindex","-1"),i.tabindex="-1",(Zt||le&&dl)&&(n.setAttribute("role","application"),i.role="application"),n.removeAttribute("width"),n.removeAttribute("height"),"width"in i&&delete i.width,"height"in i&&delete i.height,Object.getOwnPropertyNames(i).forEach(function(e){a&&"class"===e||o.setAttribute(e,i[e]),a&&n.setAttribute(e,i[e])}),n.playerId=n.id,n.id+="_html5_api",n.className="vjs-tech",n.player=o.player=this,this.addClass("vjs-paused"),!0!==t.VIDEOJS_NO_DYNAMIC_STYLE)&&(this.styleEl_=Mc("vjs-styles-dimensions"),l=je(".vjs-styles-defaults"),d=je("head"),d.insertBefore(this.styleEl_,l?l.nextSibling:d.firstChild)),this.fill_=!1,this.fluid_=!1,this.width(this.options_.width),this.height(this.options_.height),this.fill(this.options_.fill),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio),this.crossOrigin(this.options_.crossOrigin||this.options_.crossorigin);for(u=n.getElementsByTagName("a"),r=0;r<u.length;r++)h=u.item(r),re(h,"vjs-hidden"),h.setAttribute("hidden","hidden");return n.initNetworkState_=n.networkState,n.parentNode&&!c&&n.parentNode.insertBefore(o,n),Ns(n,o),this.children_.unshift(n),this.el_.setAttribute("lang",this.language_),this.el_=o},o.crossOrigin=function(e){if(!e)return this.techGet_("crossOrigin");"anonymous"===e||"use-credentials"===e?this.techCall_("setCrossOrigin",e):d.warn('crossOrigin must be "anonymous" or "use-credentials", given "'+e+'"')},o.width=function(e){return this.dimension("width",e)},o.height=function(e){return this.dimension("height",e)},o.dimension=function(e,t){var s,n=e+"_";if(void 0===t)return this[n]||0;if(""===t||"auto"===t)return this[n]=void 0,void this.updateStyleEl_();s=parseFloat(t),isNaN(s)?d.error('Improper value "'+t+'" supplied for for '+e):(this[n]=s,this.updateStyleEl_())},o.fluid=function(e){var t=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,ee(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),function(e,t){ee(e)?t():(e.eventedCallbacks||(e.eventedCallbacks=[]),e.eventedCallbacks.push(t))}(this,function(){t.on(["playerreset","resize"],t.updateStyleEl_)})):this.removeClass("vjs-fluid"),this.updateStyleEl_()},o.fill=function(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")},o.aspectRatio=function(e){if(void 0===e)return this.aspectRatio_;if(!/^\d+:\d+$/.test(e))throw new Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=e,this.fluid(!0),this.updateStyleEl_()},o.updateStyleEl_=function(){if(!0!==t.VIDEOJS_NO_DYNAMIC_STYLE)o=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),n=o[1]/o[0],s=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/n:this.videoWidth()||300,a=void 0!==this.height_?this.height_:s*n,e=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(e),Sc(this.styleEl_,`
      .`+e+` {
        width: `+s+`px;
        height: `+a+`px;
      }

      .`+e+`.vjs-fluid {
        padding-top: `+100*n+`%;
      }
    `);else{var e,n,s,o,a,r="number"==typeof this.width_?this.width_:this.options_.width,c="number"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();i&&(0<=r&&(i.width=r),0<=c&&(i.height=c))}},o.loadTech_=function(e,t){n=this,this.tech_&&this.unloadTech_();var n,s,i,o=b(e),a=e.charAt(0).toLowerCase()+e.slice(1);if("Html5"!==o&&this.tag&&(m.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=o,this.isReady_=!1,s={source:t,autoplay:"string"!=typeof this.autoplay()&&this.autoplay(),nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+a+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"],canOverridePoster:!!this.options_.techCanOverridePoster,enableSourceset:this.options_.enableSourceset,Promise:this.options_.Promise},S.names.forEach(function(e){var t=S[e];s[t.getterName]=n[t.privateName]}),p(s,this.options_[o]),p(s,this.options_[a]),p(s,this.options_[e.toLowerCase()]),this.tag&&(s.tag=this.tag),t&&t.src===this.cache_.src&&0<this.cache_.currentTime&&(s.startTime=this.cache_.currentTime),i=m.getTech(e),!i)throw new Error("No Tech named '"+o+"' exists! '"+o+"' should be registered using videojs.registerTech()'");this.tech_=new i(s),this.tech_.ready(u(this,this.handleTechReady_),!0),Gu(this.textTracksJson_||[],this.tech_),Si.forEach(function(e){n.on(n.tech_,e,n["handleTech"+b(e)+"_"])}),Object.keys(Zo).forEach(function(e){n.on(n.tech_,e,function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Zo[e]+"_"].bind(n),event:t}):n["handleTech"+Zo[e]+"_"](t)})}),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"sourceset",this.handleTechSourceset_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"play",this.handleTechPlay_),this.on(this.tech_,"firstplay",this.handleTechFirstPlay_),this.on(this.tech_,"pause",this.handleTechPause_),this.on(this.tech_,"durationchange",this.handleTechDurationChange_),this.on(this.tech_,"fullscreenchange",this.handleTechFullscreenChange_),this.on(this.tech_,"fullscreenerror",this.handleTechFullscreenError_),this.on(this.tech_,"enterpictureinpicture",this.handleTechEnterPictureInPicture_),this.on(this.tech_,"leavepictureinpicture",this.handleTechLeavePictureInPicture_),this.on(this.tech_,"error",this.handleTechError_),this.on(this.tech_,"loadedmetadata",this.updateStyleEl_),this.on(this.tech_,"posterchange",this.handleTechPosterChange_),this.on(this.tech_,"textdata",this.handleTechTextData_),this.on(this.tech_,"ratechange",this.handleTechRateChange_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===o&&this.tag||Ns(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},o.unloadTech_=function(){var e=this;S.names.forEach(function(t){var n=S[t];e[n.privateName]=e[n.getterName]()}),this.textTracksJson_=Qu(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1},o.tech=function(e){return void 0===e&&d.warn(`Using the tech directly can be dangerous. I hope you know what you're doing.
See https://github.com/videojs/video.js/issues/2617 for more info.
`),this.tech_},o.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mouseup",this.handleTechClick_),this.on(this.tech_,"dblclick",this.handleTechDoubleClick_),this.on(this.tech_,"touchstart",this.handleTechTouchStart_),this.on(this.tech_,"touchmove",this.handleTechTouchMove_),this.on(this.tech_,"touchend",this.handleTechTouchEnd_),this.on(this.tech_,"tap",this.handleTechTap_)},o.removeTechControlsListeners_=function(){this.off(this.tech_,"tap",this.handleTechTap_),this.off(this.tech_,"touchstart",this.handleTechTouchStart_),this.off(this.tech_,"touchmove",this.handleTechTouchMove_),this.off(this.tech_,"touchend",this.handleTechTouchEnd_),this.off(this.tech_,"mouseup",this.handleTechClick_),this.off(this.tech_,"dblclick",this.handleTechDoubleClick_)},o.handleTechReady_=function(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()},o.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay")),this.manualAutoplay_(this.autoplay())},o.manualAutoplay_=function(e){var n,s,t=this;if(this.tech_&&"string"==typeof e&&(s=function(){var e,s=t.muted();t.muted(!0);function n(){t.muted(s)}if(t.playTerminatedQueue_.push(n),e=t.play(),Ft(e))return e.catch(n)},"any"===e&&!0!==this.muted()?Ft(n=this.play())&&(n=n.catch(s)):n="muted"===e&&!0!==this.muted()?s():this.play(),Ft(n)))return n.then(function(){t.trigger({type:"autoplay-success",autoplay:e})}).catch(function(){t.trigger({type:"autoplay-failure",autoplay:e})})},o.updateSourceCaches_=function(e){void 0===e&&(e=""),t=e,n="","string"!=typeof t&&(t=e.src,n=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!n&&(n=function(e,t){if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;if(s=e.cache_.sources.filter(function(e){return e.src===t}),s.length)return s[0].type;for(var n,s,i=e.$$("source"),o=0;o<i.length;o++)if(n=i[o],n.type&&n.src&&n.src===t)return n.type;return us(t)}(this,t)),this.cache_.source=f({},e,{src:t,type:n});for(var t,n,s,i=this.cache_.sources.filter(function(e){return e.src&&e.src===t}),a=[],r=this.$$("source"),c=[],o=0;o<r.length;o++)s=ae(r[o]),a.push(s),s.src&&s.src===t&&c.push(s.src);c.length&&!i.length?this.cache_.sources=a:i.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t},o.handleTechSourceset_=function(e){if(t=this,!this.changingSrc_){var t,o=function(e){return t.updateSourceCaches_(e)},n=this.currentSource().src,s=e.src;n&&!/^blob:/.test(n)&&/^blob:/.test(s)&&(this.lastSource_&&(this.lastSource_.tech===s||this.lastSource_.player===n)||(o=function(){})),o(s),e.src||this.tech_.any(["sourceset","loadstart"],function(e){if("sourceset"!==e.type){var n=t.techGet("currentSrc");t.lastSource_.tech=n,t.updateSourceCaches_(n)}})}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})},o.hasStarted=function(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started"))},o.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},o.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach(function(e){return e.callback(e.event)}),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")},o.handleTechWaiting_=function(){var t,e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),t=this.currentTime(),this.on("timeupdate",function n(){t!==e.currentTime()&&(e.removeClass("vjs-waiting"),e.off("timeupdate",n))})},o.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},o.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},o.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},o.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},o.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.removeClass("vjs-ended"),this.trigger("seeked")},o.handleTechFirstPlay_=function(){this.options_.starttime&&(d.warn("Passing the `starttime` option to the player will be deprecated in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},o.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},o.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},o.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},o.handleTechClick_=function(e){ht(e)&&this.controls_&&(this.paused()?Te(this.play()):this.pause())},o.handleTechDoubleClick_=function(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(t){return t.contains(e.target)})||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,e):this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))},o.handleTechTap_=function(){this.userActive(!this.userActive())},o.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},o.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},o.handleTechTouchEnd_=function(e){e.cancelable&&e.preventDefault()},o.handleStageClick_=function(){this.reportUserActivity()},o.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},o.documentFullscreenChange_=function(e){if(o=e.target.player,!o||o===this){var o,t=this.el(),n=s[this.fsApi_.fullscreenElement]===t;!n&&t.matches?n=t.matches(":"+this.fsApi_.fullscreen):!n&&t.msMatchesSelector&&(n=t.msMatchesSelector(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}},o.handleTechFullscreenChange_=function(e,t){t&&(t.nativeIOSFullscreen&&this.toggleClass("vjs-ios-native-fs"),this.isFullscreen(t.isFullscreen))},o.handleTechFullscreenError_=function(e,t){this.trigger("fullscreenerror",t)},o.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")},o.handleTechEnterPictureInPicture_=function(){this.isInPictureInPicture(!0)},o.handleTechLeavePictureInPicture_=function(){this.isInPictureInPicture(!1)},o.handleTechError_=function(){var e=this.tech_.error();this.error(e)},o.handleTechTextData_=function(e,t){var n=null;1<arguments.length&&(n=t),this.trigger("textdata",n)},o.getCache=function(){return this.cache_},o.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],volume:1}},o.techCall_=function(e,t){this.ready(function(){if(e in hu)return function(e,t,n,s){return t[n](e.reduce(Cs(n),s))}(this.middleware_,this.tech_,e,t);if(e in Ra)return Wa(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw d(e),e}},!0)},o.techGet_=function(e){if(this.tech_&&this.tech_.isReady_){if(e in mu)return function(e,t,n){return e.reduceRight(Cs(n),t[n]())}(this.middleware_,this.tech_,e);if(e in Ra)return Wa(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){throw void 0===this.tech_[e]?(d("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t),t):"TypeError"===t.name?(d("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1,t):(d(t),t)}}},o.play=function(){var n=this,e=this.options_.Promise||t.Promise;return e?new e(function(e){n.play_(e)}):this.play_()},o.play_=function(e){var t,n,s=this;if(void 0===e&&(e=Te),this.playCallbacks_.push(e),t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=function(){s.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(t||!Xn&&!q||this.load());n=this.techGet_("play"),null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)},o.runPlayTerminatedQueue_=function(){var e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach(function(e){e()})},o.runPlayCallbacks_=function(e){var t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach(function(t){t(e)})},o.pause=function(){this.techCall_("pause")},o.paused=function(){return!1!==this.techGet_("paused")},o.played=function(){return this.techGet_("played")||De(0,0)},o.scrubbing=function(e){if("undefined"==typeof e)return this.scrubbing_;this.scrubbing_=!!e,this.techCall_("setScrubbing",this.scrubbing_),e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")},o.currentTime=function(e){return"undefined"!=typeof e?(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),void(this.cache_.initTime=0)):(this.cache_.initTime=e,this.off("canplay",this.applyInitTime_),void this.one("canplay",this.applyInitTime_))):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},o.applyInitTime_=function(){this.currentTime(this.cache_.initTime)},o.duration=function(e){if(void 0===e)return void 0!==this.cache_.duration?this.cache_.duration:NaN;(e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&((this.cache_.duration=e)===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))},o.remainingTime=function(){return this.duration()-this.currentTime()},o.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())},o.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=De(0,0)),e},o.bufferedPercent=function(){return Qr(this.buffered(),this.duration())},o.bufferedEnd=function(){var t=this.buffered(),n=this.duration(),e=t.end(t.length-1);return n<e&&(e=n),e},o.volume=function(e){var t;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),void(0<t&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},o.muted=function(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)},o.defaultMuted=function(e){return void 0!==e?this.techCall_("setDefaultMuted",e):this.techGet_("defaultMuted")||!1},o.lastVolume_=function(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e},o.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},o.isFullscreen=function(e){if(void 0===e)return this.isFullscreen_;var t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()},o.requestFullscreen=function(e){var n,s=this.options_.Promise||t.Promise;return s?(n=this,new s(function(t,s){function o(){n.off("fullscreenerror",r),n.off("fullscreenchange",a)}function a(){o(),t()}function r(e,t){o(),s(t)}n.one("fullscreenchange",a),n.one("fullscreenerror",r);var i=n.requestFullscreenHelper_(e);if(i)return i.then(o,o),i})):this.requestFullscreenHelper_()},o.requestFullscreenHelper_=function(e){var t,n,s=this;if(this.fsApi_.prefixed||(n=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(n=e)),this.fsApi_.requestFullscreen)return t=this.el_[this.fsApi_.requestFullscreen](n),t&&t.then(function(){return s.isFullscreen(!0)},function(){return s.isFullscreen(!1)}),t;this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):this.enterFullWindow()},o.exitFullscreen=function(){var e,n=this.options_.Promise||t.Promise;return n?(e=this,new n(function(t,n){function s(){e.off("fullscreenerror",a),e.off("fullscreenchange",i)}function i(){s(),t()}function a(e,t){s(),n(t)}e.one("fullscreenchange",i),e.one("fullscreenerror",a);var o=e.exitFullscreenHelper_();if(o)return o.then(s,s),o})):this.exitFullscreenHelper_()},o.exitFullscreenHelper_=function(){var e,t=this;if(this.fsApi_.requestFullscreen)return e=s[this.fsApi_.exitFullscreen](),e&&e.then(function(){return t.isFullscreen(!1)}),e;this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):this.exitFullWindow()},o.enterFullWindow=function(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=s.documentElement.style.overflow,K(s,"keydown",this.boundFullWindowOnEscKey_),s.documentElement.style.overflow="hidden",re(s.body,"vjs-full-window"),this.trigger("enterFullWindow")},o.fullWindowOnEscKey=function(e){c.isEventKey(e,"Esc")&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},o.exitFullWindow=function(){this.isFullscreen(!1),this.isFullWindow=!1,A(s,"keydown",this.boundFullWindowOnEscKey_),s.documentElement.style.overflow=this.docOrigOverflow,kt(s.body,"vjs-full-window"),this.trigger("exitFullWindow")},o.disablePictureInPicture=function(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")},o.isInPictureInPicture=function(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_},o.requestPictureInPicture=function(){if("pictureInPictureEnabled"in s&&!1===this.disablePictureInPicture())return this.techGet_("requestPictureInPicture")},o.exitPictureInPicture=function(){if("pictureInPictureEnabled"in s)return s.exitPictureInPicture()},o.handleKeyDown=function(e){var t=this.options_.userActions;t&&t.hotkeys&&!function(e){var t=e.tagName.toLowerCase();return!!e.isContentEditable||("input"===t?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type):-1!==["textarea"].indexOf(t))}(this.el_.ownerDocument.activeElement)&&("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e))},o.handleHotkeys=function(e){var r,t=this.options_.userActions?this.options_.userActions.hotkeys:{},o=t.fullscreenKey,l=void 0===o?function(e){return c.isEventKey(e,"f")}:o,i=t.muteKey,d=void 0===i?function(e){return c.isEventKey(e,"m")}:i,a=t.playPauseKey,u=void 0===a?function(e){return c.isEventKey(e,"k")||c.isEventKey(e,"Space")}:a;l.call(this,e)?(e.preventDefault(),e.stopPropagation(),r=n.getComponent("FullscreenToggle"),!1!==s[this.fsApi_.fullscreenEnabled]&&r.prototype.handleClick.call(this,e)):d.call(this,e)?(e.preventDefault(),e.stopPropagation(),n.getComponent("MuteToggle").prototype.handleClick.call(this,e)):u.call(this,e)&&(e.preventDefault(),e.stopPropagation(),n.getComponent("PlayToggle").prototype.handleClick.call(this,e))},o.canPlayType=function(e){for(var t,s,i,o=0,a=this.options_.techOrder;o<a.length;o++)if(s=a[o],t=m.getTech(s),t=t||n.getComponent(s)){if(t.isSupported()&&(i=t.canPlayType(e)))return i}else d.error('The "'+s+'" tech is undefined. Skipped browser support check for that tech.');return""},o.selectSource=function(e){function t(e,t,n){var s;return e.some(function(e){return t.some(function(t){if(s=n(e,t))return!0})}),s}function n(e,t){var n=e[0];if(e[1].canPlaySource(t,i.options_[n.toLowerCase()]))return{source:t,tech:n}}var s,i=this,o=this.options_.techOrder.map(function(e){return[e,m.getTech(e)]}).filter(function(e){var n=e[0],t=e[1];return t?t.isSupported():(d.error('The "'+n+'" tech is undefined. Skipped browser support check for that tech.'),!1)});return(this.options_.sourceOrder?t(e,o,(s=n,function(e,t){return s(t,e)})):t(o,e,n))||!1},o.src=function(e){var n,t=this;if("undefined"==typeof e)return this.cache_.src||"";n=function e(t){if(Array.isArray(t)){var n=[];t.forEach(function(t){t=e(t),Array.isArray(t)?n=n.concat(t):pe(t)&&n.push(t)}),t=n}else t="string"==typeof t&&t.trim()?[Na({src:t})]:pe(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Na(t)]:[];return t}(e),n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),pu(this,n[0],function(e,s){if(t.middleware_=s,t.cache_.sources=n,t.updateSourceCaches_(e),t.src_(e))return 1<n.length?t.src(n.slice(1)):(t.changingSrc_=!1,t.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0),void t.triggerReady());!function(e,t){e.forEach(function(e){return e.setTech&&e.setTech(t)})}(s,t.tech_)})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},o.src_=function(e){var n=this,t=this.selectSource([e]);return!t||(function(e,t){return b(e)===b(t)}(t.tech,this.techName_)?this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1},!0):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready(function(){n.changingSrc_=!1})),!1)},o.load=function(){this.techCall_("load")},o.reset=function(){var e=this,n=this.options_.Promise||t.Promise;this.paused()||!n?this.doReset_():Te(this.play().then(function(){return e.doReset_()}))},o.doReset_=function(){this.tech_&&this.tech_.clearTracks("text"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),ee(this)&&this.trigger("playerreset")},o.resetControlBarUI_=function(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()},o.resetProgressBar_=function(){this.currentTime(0);var e=this.controlBar,t=e.durationDisplay,n=e.remainingTimeDisplay;t&&t.updateContent(),n&&n.updateContent()},o.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()},o.resetVolumeBar_=function(){this.volume(1),this.trigger("volumechange")},o.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},o.currentSource=function(){return this.cache_.source||{}},o.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""},o.currentType=function(){return this.currentSource()&&this.currentSource().type||""},o.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")},o.autoplay=function(e){if(void 0===e)return this.options_.autoplay||!1;var t;"string"==typeof e&&/(any|play|muted)/.test(e)?(this.options_.autoplay=e,this.manualAutoplay_(e),t=!1):this.options_.autoplay=!!e,t="undefined"==typeof t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)},o.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},o.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")},o.poster=function(e){if(void 0===e)return this.poster_;(e=e||"")!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))},o.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}},o.controls=function(e){if(void 0===e)return!!this.controls_;e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))},o.usingNativeControls=function(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))},o.error=function(e){if(void 0===e)return this.error_||null;if(this.options_.suppressNotSupportedError&&e&&4===e.code){var t=function(){this.error(e)};return this.options_.suppressNotSupportedError=!1,this.any(["click","touchstart"],t),void this.one("loadstart",function(){this.off(["click","touchstart"],t)})}if(null===e)return this.error_=e,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new T(e),this.addClass("vjs-error"),d.error("(CODE:"+this.error_.code+" "+T.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error")},o.reportUserActivity=function(){this.userActivity_=!0},o.userActive=function(e){if(void 0===e)return this.userActive_;if((e=!!e)!==this.userActive_){if(this.userActive_=e,this.userActive_)return this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),void this.trigger("useractive");this.tech_&&this.tech_.one("mousemove",function(e){e.stopPropagation(),e.preventDefault()}),this.userActivity_=!1,this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive")}},o.listenForUserActivity_=function(){function s(){e(),this.clearInterval(n)}var t,n,o,i,a,e=u(this,this.reportUserActivity);this.on("mousedown",function(){e(),this.clearInterval(n),n=this.setInterval(e,250)}),this.on("mousemove",function(t){t.screenX===o&&t.screenY===i||(o=t.screenX,i=t.screenY,e())}),this.on("mouseup",s),this.on("mouseleave",s),t=this.getChild("controlBar"),!t||q||ue||(t.on("mouseenter",function(){this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout,this.player().options_.inactivityTimeout=0}),t.on("mouseleave",function(){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout})),this.on("keydown",e),this.on("keyup",e),this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);var e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},e))}},250)},o.playbackRate=function(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)},o.defaultPlaybackRate=function(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1},o.isAudio=function(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e},o.addTextTrack=function(e,t,n){if(this.tech_)return this.tech_.addTextTrack(e,t,n)},o.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},o.removeRemoteTextTrack=function(e){void 0===e&&(e={});var t=e.track;if(t=t||e,this.tech_)return this.tech_.removeRemoteTextTrack(t)},o.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},o.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},o.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},o.language=function(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),ee(this)&&this.trigger("languagechange"))},o.languages=function(){return f(a.prototype.options_.languages,this.languages_)},o.toJSON=function(){var e,n,t=f(this.options_),s=t.tracks;t.tracks=[];for(e=0;e<s.length;e++)n=s[e],(n=f(n)).player=void 0,t.tracks[e]=n;return t},o.createModal=function(e,t){var n,s=this;return(t=t||{}).content=e||"",n=new Qe(this,t),this.addChild(n),n.on("dispose",function(){s.removeChild(n)}),n.open(),n},o.updateCurrentBreakpoint_=function(){if(this.responsive())for(var e,t=this.currentBreakpoint(),s=this.currentWidth(),n=0;n<Jo.length;n++)if(e=Jo[n],s<=this.breakpoints_[e]){if(t===e)return;t&&this.removeClass(jn[t]),this.addClass(jn[e]),this.breakpoint_=e;break}},o.removeCurrentBreakpoint_=function(){var e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)},o.breakpoints=function(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=p({},ki,e),this.updateCurrentBreakpoint_()),p(this.breakpoints_)},o.responsive=function(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?((this.responsive_=e)?(this.on("playerresize",this.updateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.updateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0},o.currentBreakpoint=function(){return this.breakpoint_},o.currentBreakpointClass=function(){return jn[this.breakpoint_]||""},o.loadMedia=function(e,t){if(o=this,e&&"object"==typeof e){this.reset(),this.cache_.media=f(e);var o,s=this.cache_.media,r=s.artwork,n=s.poster,i=s.src,a=s.textTracks;!r&&n&&(this.cache_.media.artwork=[{src:n,type:us(n)}]),i&&this.src(i),n&&this.poster(n),Array.isArray(a)&&a.forEach(function(e){return o.addRemoteTextTrack(e,!1)}),this.ready(t)}},o.getMedia=function(){if(this.cache_.media)return f(this.cache_.media);var t=this.poster(),e={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),function(e){return{kind:e.kind,label:e.label,language:e.language,src:e.src}})};return t&&(e.poster=t,e.artwork=[{src:e.poster,type:us(e.poster)}]),e},a.getTagSettings=function(e){var s,i,n={sources:[],tracks:[]},t=ae(e),a=t["data-setup"];if(Ne(e,"vjs-fill")&&(t.fill=!0),Ne(e,"vjs-fluid")&&(t.fluid=!0),null!==a){var r=Yr(a||"{}"),c=r[0],u=r[1];c&&d.error(c),p(t,u)}if(p(n,t),e.hasChildNodes())for(var l=e.childNodes,o=0,h=l.length;o<h;o++)s=l[o],i=s.nodeName.toLowerCase(),"source"===i?n.sources.push(ae(s)):"track"===i&&n.tracks.push(ae(s));return n},o.flexNotSupported_=function(){var e=s.createElement("i");return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},o.debug=function(e){if(void 0===e)return this.debugEnabled_;e?(this.trigger("debugon"),this.previousLogLevel_=this.log.level,this.log.level("debug"),this.debugEnabled_=!0):(this.trigger("debugoff"),this.log.level(this.previousLogLevel_),this.previousLogLevel_=void 0,this.debugEnabled_=!1)},a}(n),S.names.forEach(function(e){var t=S[e];j.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}}),j.prototype.crossorigin=j.prototype.crossOrigin,j.players={},Ke=t.navigator,j.prototype.options_={techOrder:m.defaultTechOrder_,html5:{},inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:Ke&&(Ke.languages&&Ke.languages[0]||Ke.userLanguage||Ke.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1},["ended","seeking","seekable","networkState","readyState"].forEach(function(e){j.prototype[e]=function(){return this.techGet_(e)}}),Si.forEach(function(e){j.prototype["handleTech"+b(e)+"_"]=function(){return this.trigger(e)}}),n.registerComponent("Player",j),oi=k(function(e){function t(n,s){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(n,s)}e.exports=t});function fn(e){return $e.hasOwnProperty(e)}function mn(e){return fn(e)?$e[e]:void 0}function Ei(e,t){e[We]=e[We]||{},e[We][t]=!0}function dn(e,t,n){var s=(n?"before":"")+"pluginsetup";e.trigger(s,t),e.trigger(s+":"+t.name,t)}function xi(e,t){return t.prototype.name=e,function(){dn(this,{name:e,plugin:t,instance:null},!0);for(var s,o=arguments.length,i=new Array(o),n=0;n<o;n++)i[n]=arguments[n];return s=nu(t,[this].concat(i)),this[e]=function(){return s},dn(this,s.getEventHash()),s}}var su=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}},nu=k(function(e){function t(){return su()?e.exports=t=Reflect.construct:e.exports=t=function(e,t,n){var o,s=[null];return s.push.apply(s,t),o=new(Function.bind.apply(e,s)),n&&oi(o,n.prototype),o},t.apply(null,arguments)}e.exports=t}),cn="plugin",We="activePlugins_",$e={},te=function(){function e(t){if(this.constructor===e)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=t,this.log||(this.log=this.player.log.createLogger(this.name)),_o(this),delete this.trigger,cc(this,this.constructor.defaultState),Ei(t,this.name),this.dispose=u(this,this.dispose),t.on("dispose",this.dispose)}var t=e.prototype;return t.version=function(){return this.constructor.VERSION},t.getEventHash=function(e){return void 0===e&&(e={}),e.name=this.name,e.plugin=this.constructor,e.instance=this,e},t.trigger=function(e,t){return void 0===t&&(t={}),Ye(this.eventBusEl_,e,this.getEventHash(t))},t.handleStateChanged=function(){},t.dispose=function(){var e=this.name,t=this.player;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[We][e]=!1,this.player=this.state=null,t[e]=xi(e,$e[e])},e.isBasic=function(t){var n="string"==typeof t?mn(t):t;return"function"==typeof n&&!e.prototype.isPrototypeOf(n.prototype)},e.registerPlugin=function(t,n){if("string"!=typeof t)throw new Error('Illegal plugin name, "'+t+'", must be a string, was '+typeof t+".");if(fn(t))d.warn('A plugin named "'+t+'" already exists. You may want to avoid re-registering plugins!');else if(j.prototype.hasOwnProperty(t))throw new Error('Illegal plugin name, "'+t+'", cannot share a name with an existing player method!');if("function"!=typeof n)throw new Error('Illegal plugin for "'+t+'", must be a function, was '+typeof n+".");return $e[t]=n,t!==cn&&(e.isBasic(n)?j.prototype[t]=function(e,t){function n(){dn(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Ei(this,e),dn(this,{name:e,plugin:t,instance:n}),n}return Object.keys(t).forEach(function(e){n[e]=t[e]}),n}(t,n):j.prototype[t]=xi(t,n)),n},e.deregisterPlugin=function(e){if(e===cn)throw new Error("Cannot de-register base plugin.");fn(e)&&(delete $e[e],delete j.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys($e)),e.forEach(function(e){var n=mn(e);n&&((t=t||{})[e]=n)}),t},e.getPluginVersion=function(e){var t=mn(e);return t&&t.VERSION||""},e}();te.getPlugin=mn,te.BASE_PLUGIN_NAME=cn,te.registerPlugin(cn,te),j.prototype.usingPlugin=function(e){return!!this[We]&&!0===this[We][e]},j.prototype.hasPlugin=function(e){return!!fn(e)},wi=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oi(e,t)},vi=function(e){return 0===e.indexOf("#")?e.slice(1):e};function e(t,s,o){var i,r,a=e.getPlayer(t);if(a)return s&&d.warn('Player "'+t+'" is already initialised. Options will not be applied.'),o&&a.ready(o),a;if(i="string"==typeof t?je("#"+vi(t)):t,!lt(i))throw new TypeError("The element or ID supplied is not valid. (videojs)");return i.ownerDocument.defaultView&&i.ownerDocument.body.contains(i)||d.warn("The element supplied is not included in the DOM"),s=s||{},e.hooks("beforesetup").forEach(function(e){var t=e(i,f(s));pe(t)&&!Array.isArray(t)?s=f(s,t):d.error("please return an object in beforesetup hooks")}),r=n.getComponent("Player"),a=new r(i,s,o),e.hooks("setup").forEach(function(e){return e(a)}),a}(e.hooks_={},e.hooks=function(t,n){return e.hooks_[t]=e.hooks_[t]||[],n&&(e.hooks_[t]=e.hooks_[t].concat(n)),e.hooks_[t]},e.hook=function(t,n){e.hooks(t,n)},e.hookOnce=function(t,n){e.hooks(t,[].concat(n).map(function(n){return function s(){return e.removeHook(t,s),n.apply(void 0,arguments)}}))},e.removeHook=function(t,n){var s=e.hooks(t).indexOf(n);return!(s<=-1)&&(e.hooks_[t]=e.hooks_[t].slice(),e.hooks_[t].splice(s,1),!0)},!0!==t.VIDEOJS_NO_DYNAMIC_STYLE&&ot())&&(Qt=je(".vjs-styles-defaults"),Qt||(Qt=Mc("vjs-styles-defaults"),nn=je("head"),nn&&nn.insertBefore(Qt,nn.firstChild),Sc(Qt,`
      .video-js {
        width: 300px;
        height: 150px;
      }

      .vjs-fluid {
        padding-top: 56.25%
      }
    `))),Fs(1,e),e.VERSION=Po,e.options=j.prototype.options_,e.getPlayers=function(){return j.players},e.getPlayer=function(e){if(n=j.players,"string"==typeof e){if(s=vi(e),o=n[s],o)return o;t=je("#"+s)}else t=e;if(lt(t)){var t,n,s,o,i=t,a=i.player,r=i.playerId;if(a||n[r])return a||n[r]}},e.getAllPlayers=function(){return Object.keys(j.players).map(function(e){return j.players[e]}).filter(Boolean)},e.players=j.players,e.getComponent=n.getComponent,e.registerComponent=function(e,t){m.isTech(t)&&d.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),n.registerComponent.call(n,e,t)},e.getTech=m.getTech,e.registerTech=m.registerTech,e.use=function(e,t){ke[e]=ke[e]||[],ke[e].push(t)},Object.defineProperty(e,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(e.middleware,"TERMINATOR",{value:hs,writeable:!1,enumerable:!0}),e.browser=u1,e.TOUCH_ENABLED=Ie,e.extend=function(e,t){void 0===t&&(t={});var o,n=function(){e.apply(this,arguments)},s={};for(o in"object"==typeof t?(t.constructor!==Object.prototype.constructor&&(n=t.constructor),s=t):"function"==typeof t&&(n=t),wi(n,e),e&&(n.super_=e),s)s.hasOwnProperty(o)&&(n.prototype[o]=s[o]);return n},e.mergeOptions=f,e.bind=u,e.registerPlugin=te.registerPlugin,e.deregisterPlugin=te.deregisterPlugin,e.plugin=function(e,t){return d.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),te.registerPlugin(e,t)},e.getPlugins=te.getPlugins,e.getPlugin=te.getPlugin,e.getPluginVersion=te.getPluginVersion,e.addLanguage=function(t,n){var s;return t=(""+t).toLowerCase(),e.options.languages=f(e.options.languages,((s={})[t]=n,s)),e.options.languages[t]},e.log=d,e.createLogger=El,e.createTimeRange=e.createTimeRanges=De,e.formatTime=dt,e.setFormatTime=function(e){rs=e},e.resetFormatTime=function(){rs=ya},e.parseUrl=So,e.isCrossOrigin=wn,e.EventTarget=z,e.on=K,e.one=_n,e.off=A,e.trigger=Ye,e.xhr=di,e.TextTrack=Ve,e.AudioTrack=rr,e.VideoTrack=or,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach(function(t){e[t]=function(){return d.warn("videojs."+t+"() is deprecated; use videojs.dom."+t+"() instead"),Lc[t].apply(null,arguments)}}),e.computedStyle=_t,e.dom=Lc,e.url=Fu,e.defineLazyProperty=Ko,Y=we(k(function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),gi=k(function(e){function t(n,s){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,s)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0}),we(gi);function ln(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=Ai.buildAbsoluteURL(fe.location&&fe.location.href||"",e)),Ai.buildAbsoluteURL(e,t))}var ie=we(k(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,gi(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Ci="undefined"!=typeof N?N:"undefined"!=typeof window?window:{},Z="undefined"!=typeof document?document:Ci["__GLOBAL_DOCUMENT_CACHE@4"]||(Ci["__GLOBAL_DOCUMENT_CACHE@4"]=Sl),o="undefined"!=typeof window?window:"undefined"!=typeof N?N:"undefined"!=typeof self?self:{},Ai=k(function(e){var s=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^/?#]*)?((?:[^/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,o=/^([^/?#]*)(.*)$/,i=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^/]*(?=\/)/g,n={buildAbsoluteURL:function(e,t,s){if(s=s||{},e=e.trim(),!(t=t.trim())){if(!s.alwaysNormalize)return e;if(c=n.parseURL(e),!c)throw new Error("Error trying to parse base URL.");return c.path=n.normalizePath(c.path),n.buildURLFromParts(c)}if(i=n.parseURL(t),!i)throw new Error("Error trying to parse relative URL.");if(i.scheme)return s.alwaysNormalize?(i.path=n.normalizePath(i.path),n.buildURLFromParts(i)):t;if(a=n.parseURL(e),!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]&&(l=o.exec(a.path),a.netLoc=l[1],a.path=l[2]),a.netLoc&&!a.path&&(a.path="/"),r={scheme:a.scheme,netLoc:i.netLoc,path:null,params:i.params,query:i.query,fragment:i.fragment},!i.netLoc&&(r.netLoc=a.netLoc,"/"!==i.path[0]))if(i.path){var i,a,r,c,l,d=a.path,u=d.substring(0,d.lastIndexOf("/")+1)+i.path;r.path=n.normalizePath(u)}else r.path=a.path,i.params||(r.params=a.params,i.query||(r.query=a.query));return null===r.path&&(r.path=s.alwaysNormalize?n.normalizePath(i.path):i.path),n.buildURLFromParts(r)},parseURL:function(e){var t=s.exec(e);return t?{scheme:t[1]||"",netLoc:t[2]||"",path:t[3]||"",params:t[4]||"",query:t[5]||"",fragment:t[6]||""}:null},normalizePath:function(e){for(e=e.split("").reverse().join("").replace(i,"");e.length!==(e=e.replace(a,"")).length;);return e.split("").reverse().join("")},buildURLFromParts:function(e){return e.scheme+e.netLoc+e.path+e.params+e.query+e.fragment}};e.exports=n}),fe="undefined"!=typeof window?window:"undefined"!=typeof N?N:"undefined"!=typeof self?self:{},Mi=k(function(e){function t(n,s){return e.exports=t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,t(n,s)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0});we(Mi);var Yo=we(k(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Mi(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),Wo=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),-1<n},e.trigger=function(e,t){if(n=this.listeners[e],n)if(2===arguments.length)for(i=n.length,s=0;s<i;++s)n[s].call(this,t);else for(var n,s,i,a=Array.prototype.slice.call(arguments,1),r=n.length,o=0;o<r;++o)n[o].apply(this,a)},e.dispose=function(){this.listeners={}},e.pipe=function(e){this.on("data",function(t){e.push(t)})},t}(),tu=we(k(function(e){function t(){return e.exports=t=Object.assign||function(e){for(var t,s,n=1;n<arguments.length;n++){t=arguments[n];for(s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},e.exports.default=e.exports,e.exports.__esModule=!0,t.apply(this,arguments)}e.exports=t,e.exports.default=e.exports,e.exports.__esModule=!0})),eu=we(k(function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0})),Zd=function(e){return fe.atob?fe.atob(e):Buffer.from(e,"base64").toString("binary")};function Li(e){for(var n=Zd(e),s=new Uint8Array(n.length),t=0;t<n.length;t++)s[t]=n.charCodeAt(t);return s}function Mt(e){for(var t,n=e.split(new RegExp('(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))')),o={},s=n.length;s--;)""!==n[s]&&((t=/([^=]*)=(.*)/.exec(n[s]).slice(1))[0]=t[0].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^\s+|\s+$/g,""),t[1]=t[1].replace(/^['"](.*)['"]$/g,"$1"),o[t[0]]=t[1]);return o}function Pi(e){return Yd.test(e)?"hls":Wd.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}var Fl=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return Yo(t,e),t.prototype.push=function(e){var t;for(this.buffer+=e,t=this.buffer.indexOf(`
`);-1<t;t=this.buffer.indexOf(`
`))this.trigger("data",this.buffer.substring(0,t)),this.buffer=this.buffer.substring(t+1)},t}(Wo),Qd=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}Yo(t,e);var n=t.prototype;return n.push=function(e){var t,n,s=this;0!==(e=e.trim()).length&&("#"===e[0]?this.tagMappers.reduce(function(t,n){var s=n(e);return s===e?t:t.concat([s])},[e]).forEach(function(e){for(a=0;a<s.customParsers.length;a++)if(s.customParsers[a].call(s,e))return;if(0===e.indexOf("#EXT"))if(e=e.replace(`
`,""),n=/^#EXTM3U/.exec(e))s.trigger("data",{type:"tag",tagType:"m3u"});else{if(n=/^#EXTINF:?([0-9.]*)?,?(.*)?$/.exec(e))return t={type:"tag",tagType:"inf"},n[1]&&(t.duration=parseFloat(n[1])),n[2]&&(t.title=n[2]),void s.trigger("data",t);if(n=/^#EXT-X-TARGETDURATION:?([0-9.]*)?/.exec(e))return t={type:"tag",tagType:"targetduration"},n[1]&&(t.duration=parseInt(n[1],10)),void s.trigger("data",t);if(n=/^#ZEN-TOTAL-DURATION:?([0-9.]*)?/.exec(e))return t={type:"tag",tagType:"totalduration"},n[1]&&(t.duration=parseInt(n[1],10)),void s.trigger("data",t);if(n=/^#EXT-X-VERSION:?([0-9.]*)?/.exec(e))return t={type:"tag",tagType:"version"},n[1]&&(t.version=parseInt(n[1],10)),void s.trigger("data",t);if(n=/^#EXT-X-MEDIA-SEQUENCE:?(-?[0-9.]*)?/.exec(e))return t={type:"tag",tagType:"media-sequence"},n[1]&&(t.number=parseInt(n[1],10)),void s.trigger("data",t);if(n=/^#EXT-X-DISCONTINUITY-SEQUENCE:?(-?[0-9.]*)?/.exec(e))return t={type:"tag",tagType:"discontinuity-sequence"},n[1]&&(t.number=parseInt(n[1],10)),void s.trigger("data",t);if(n=/^#EXT-X-PLAYLIST-TYPE:?(.*)?$/.exec(e))return t={type:"tag",tagType:"playlist-type"},n[1]&&(t.playlistType=n[1]),void s.trigger("data",t);if(n=/^#EXT-X-BYTERANGE:?([0-9.]*)?@?([0-9.]*)?/.exec(e))return t={type:"tag",tagType:"byterange"},n[1]&&(t.length=parseInt(n[1],10)),n[2]&&(t.offset=parseInt(n[2],10)),void s.trigger("data",t);if(n=/^#EXT-X-ALLOW-CACHE:?(YES|NO)?/.exec(e))return t={type:"tag",tagType:"allow-cache"},n[1]&&(t.allowed=!/NO/.test(n[1])),void s.trigger("data",t);if(n=/^#EXT-X-MAP:?(.*)$/.exec(e)){if(t={type:"tag",tagType:"map"},n[1]&&(o=Mt(n[1]),o.URI&&(t.uri=o.URI),o.BYTERANGE)){var o,i,a,r,c=o.BYTERANGE.split("@"),l=c[0],d=c[1];t.byterange={},l&&(t.byterange.length=parseInt(l,10)),d&&(t.byterange.offset=parseInt(d,10))}s.trigger("data",t)}else if(n=/^#EXT-X-STREAM-INF:?(.*)$/.exec(e))(t={type:"tag",tagType:"stream-inf"},n[1])&&((t.attributes=Mt(n[1]),t.attributes.RESOLUTION)&&(i=t.attributes.RESOLUTION.split("x"),r={},i[0]&&(r.width=parseInt(i[0],10)),i[1]&&(r.height=parseInt(i[1],10)),t.attributes.RESOLUTION=r),t.attributes.BANDWIDTH&&(t.attributes.BANDWIDTH=parseInt(t.attributes.BANDWIDTH,10)),t.attributes["PROGRAM-ID"]&&(t.attributes["PROGRAM-ID"]=parseInt(t.attributes["PROGRAM-ID"],10))),s.trigger("data",t);else{if(n=/^#EXT-X-MEDIA:?(.*)$/.exec(e))return t={type:"tag",tagType:"media"},n[1]&&(t.attributes=Mt(n[1])),void s.trigger("data",t);if(n=/^#EXT-X-ENDLIST/.exec(e))s.trigger("data",{type:"tag",tagType:"endlist"});else if(n=/^#EXT-X-DISCONTINUITY/.exec(e))s.trigger("data",{type:"tag",tagType:"discontinuity"});else{if(n=/^#EXT-X-PROGRAM-DATE-TIME:?(.*)$/.exec(e))return t={type:"tag",tagType:"program-date-time"},n[1]&&(t.dateTimeString=n[1],t.dateTimeObject=new Date(n[1])),void s.trigger("data",t);if(n=/^#EXT-X-KEY:?(.*)$/.exec(e))return t={type:"tag",tagType:"key"},n[1]&&(t.attributes=Mt(n[1]),t.attributes.IV&&("0x"===t.attributes.IV.substring(0,2).toLowerCase()&&(t.attributes.IV=t.attributes.IV.substring(2)),t.attributes.IV=t.attributes.IV.match(/.{8}/g),t.attributes.IV[0]=parseInt(t.attributes.IV[0],16),t.attributes.IV[1]=parseInt(t.attributes.IV[1],16),t.attributes.IV[2]=parseInt(t.attributes.IV[2],16),t.attributes.IV[3]=parseInt(t.attributes.IV[3],16),t.attributes.IV=new Uint32Array(t.attributes.IV))),void s.trigger("data",t);if(n=/^#EXT-X-START:?(.*)$/.exec(e))return t={type:"tag",tagType:"start"},n[1]&&(t.attributes=Mt(n[1]),t.attributes["TIME-OFFSET"]=parseFloat(t.attributes["TIME-OFFSET"]),t.attributes.PRECISE=/YES/.test(t.attributes.PRECISE)),void s.trigger("data",t);if(n=/^#EXT-X-CUE-OUT-CONT:?(.*)?$/.exec(e))return t={type:"tag",tagType:"cue-out-cont"},n[1]?t.data=n[1]:t.data="",void s.trigger("data",t);if(n=/^#EXT-X-CUE-OUT:?(.*)?$/.exec(e))return t={type:"tag",tagType:"cue-out"},n[1]?t.data=n[1]:t.data="",void s.trigger("data",t);if(n=/^#EXT-X-CUE-IN:?(.*)?$/.exec(e))return t={type:"tag",tagType:"cue-in"},n[1]?t.data=n[1]:t.data="",void s.trigger("data",t);s.trigger("data",{type:"tag",data:e.slice(4)})}}}else s.trigger("data",{type:"comment",text:e.slice(1)})}):this.trigger("data",{type:"uri",uri:e}))},n.addParser=function(e){var n=this,s=e.expression,o=e.customType,t=e.dataParser,i=e.segment;"function"!=typeof t&&(t=function(e){return e}),this.customParsers.push(function(e){if(s.exec(e))return n.trigger("data",{type:"custom",data:t(e),customType:o,segment:i}),!0})},n.addTagMapper=function(e){var t=e.expression,n=e.map;this.tagMappers.push(function(e){return t.test(e)?n(e):e})},t}(Wo),Xd=function(e){function n(){(n=e.call(this)||this).lineStream=new Fl,n.parseStream=new Qd,n.lineStream.pipe(n.parseStream);var n,s,o,r,c=eu(n),i=[],t={},l={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},a=0;return n.manifest={allowCache:!0,discontinuityStarts:[],segments:[]},r=0,n.parseStream.on("data",function(e){var n,d;({tag:function(){({"allow-cache":function(){this.manifest.allowCache=e.allowed,"allowed"in e||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},byterange:function(){var n={};"length"in e&&((t.byterange=n).length=e.length,"offset"in e||(e.offset=r)),"offset"in e&&((t.byterange=n).offset=e.offset),r=n.offset+n.length},endlist:function(){this.manifest.endList=!0},inf:function(){"mediaSequence"in this.manifest||(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"})),"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"})),0<e.duration&&(t.duration=e.duration),0===e.duration&&(t.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"})),this.manifest.segments=i},key:function(){if(e.attributes)if("NONE"!==e.attributes.METHOD)if(e.attributes.URI){if("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===e.attributes.KEYFORMAT)return-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(e.attributes.METHOD)?void this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===e.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==e.attributes.URI.substring(0,23)?void this.trigger("warn",{message:"invalid key URI provided for Widevine"}):e.attributes.KEYID&&"0x"===e.attributes.KEYID.substring(0,2)?void(this.manifest.contentProtection={"com.widevine.alpha":{attributes:{schemeIdUri:e.attributes.KEYFORMAT,keyId:e.attributes.KEYID.substring(2)},pssh:Li(e.attributes.URI.split(",")[1])}}):void this.trigger("warn",{message:"invalid key ID provided for Widevine"}));e.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),o={method:e.attributes.METHOD||"AES-128",uri:e.attributes.URI},"undefined"!=typeof e.attributes.IV&&(o.iv=e.attributes.IV)}else this.trigger("warn",{message:"ignoring key declaration without URI"});else o=null;else this.trigger("warn",{message:"ignoring key declaration without attribute list"})},"media-sequence":function(){isFinite(e.number)?this.manifest.mediaSequence=e.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+e.number})},"discontinuity-sequence":function(){isFinite(e.number)?(this.manifest.discontinuitySequence=e.number,a=e.number):this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+e.number})},"playlist-type":function(){/VOD|EVENT/.test(e.playlistType)?this.manifest.playlistType=e.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+e.playlist})},map:function(){s={},e.uri&&(s.uri=e.uri),e.byterange&&(s.byterange=e.byterange)},"stream-inf":function(){this.manifest.playlists=i,this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes?(t.attributes||(t.attributes={}),tu(t.attributes,e.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})},media:function(){if(this.manifest.mediaGroups=this.manifest.mediaGroups||l,e.attributes&&e.attributes.TYPE&&e.attributes["GROUP-ID"]&&e.attributes.NAME){var t=this.manifest.mediaGroups[e.attributes.TYPE];t[e.attributes["GROUP-ID"]]=t[e.attributes["GROUP-ID"]]||{},d=t[e.attributes["GROUP-ID"]],(n={default:/yes/i.test(e.attributes.DEFAULT)}).default?n.autoselect=!0:n.autoselect=/yes/i.test(e.attributes.AUTOSELECT),e.attributes.LANGUAGE&&(n.language=e.attributes.LANGUAGE),e.attributes.URI&&(n.uri=e.attributes.URI),e.attributes["INSTREAM-ID"]&&(n.instreamId=e.attributes["INSTREAM-ID"]),e.attributes.CHARACTERISTICS&&(n.characteristics=e.attributes.CHARACTERISTICS),e.attributes.FORCED&&(n.forced=/yes/i.test(e.attributes.FORCED)),d[e.attributes.NAME]=n}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},discontinuity:function(){a+=1,t.discontinuity=!0,this.manifest.discontinuityStarts.push(i.length)},"program-date-time":function(){"undefined"==typeof this.manifest.dateTimeString&&(this.manifest.dateTimeString=e.dateTimeString,this.manifest.dateTimeObject=e.dateTimeObject),t.dateTimeString=e.dateTimeString,t.dateTimeObject=e.dateTimeObject},targetduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid target duration: "+e.duration}):this.manifest.targetDuration=e.duration},totalduration:function(){!isFinite(e.duration)||e.duration<0?this.trigger("warn",{message:"ignoring invalid total duration: "+e.duration}):this.manifest.totalDuration=e.duration},start:function(){e.attributes&&!isNaN(e.attributes["TIME-OFFSET"])?this.manifest.start={timeOffset:e.attributes["TIME-OFFSET"],precise:e.attributes.PRECISE}:this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"})},"cue-out":function(){t.cueOut=e.data},"cue-out-cont":function(){t.cueOutCont=e.data},"cue-in":function(){t.cueIn=e.data}}[e.tagType]||function(){}).call(c)},uri:function(){t.uri=e.uri,i.push(t),!this.manifest.targetDuration||"duration"in t||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),t.duration=this.manifest.targetDuration),o&&(t.key=o),t.timeline=a,s&&(t.map=s),t={}},comment:function(){},custom:function(){e.segment?(t.custom=t.custom||{},t.custom[e.customType]=e.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[e.customType]=e.data)}}[e.type].call(c))}),n}Yo(n,e);var t=n.prototype;return t.push=function(e){this.lineStream.push(e)},t.end=function(){this.lineStream.push(`
`)},t.addParser=function(e){this.parseStream.addParser(e)},t.addTagMapper=function(e){this.parseStream.addTagMapper(e)},n}(Wo),Yd=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,Wd=/^application\/dash\+xml/i,$d="undefined"!=typeof window?window:"undefined"!=typeof N?N:"undefined"!=typeof self?self:{},Vd={entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",times:"×",divide:"÷",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",euro:"€",trade:"™",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},No=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,qi=new RegExp("[\\-\\.0-9"+No.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Yi=new RegExp("^"+No.source+qi.source+"*(?::"+No.source+qi.source+"*)?$"),St=0,he=1,st=2,At=3,it=4,rt=5,Ot=6,Tn=7;function sa(){}function oa(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Bd(e,t,n,s,o,i){for(var c,l,d,r=++t,a=St;;){switch(d=e.charAt(r),d){case"=":if(a===he)l=e.slice(t,r),a=At;else{if(a!==st)throw new Error("attribute equal must after attrName");a=At}break;case"'":case'"':if(a===At||a===he){if(a===he&&(i.warning('attribute value must after "="'),l=e.slice(t,r)),t=r+1,!(0<(r=e.indexOf(d,t))))throw new Error("attribute value no end '"+d+"' match");c=e.slice(t,r).replace(/&#?\w+;/g,o),n.add(l,c,t-1),a=rt}else{if(a!=it)throw new Error('attribute value must after "="');c=e.slice(t,r).replace(/&#?\w+;/g,o),n.add(l,c,t),i.warning('attribute "'+l+'" missed start quot('+d+")!!"),t=r+1,a=rt}break;case"/":switch(a){case St:n.setTagName(e.slice(t,r));case rt:case Ot:case Tn:a=Tn,n.closed=!0;case it:case he:case st:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),a==St&&n.setTagName(e.slice(t,r)),r;case">":switch(a){case St:n.setTagName(e.slice(t,r));case rt:case Ot:case Tn:break;case it:case he:"/"===(c=e.slice(t,r)).slice(-1)&&(n.closed=!0,c=c.slice(0,-1));case st:a===st&&(c=l),a==it?(i.warning('attribute "'+c+'" missed quot(")!!'),n.add(l,c.replace(/&#?\w+;/g,o),t)):("http://www.w3.org/1999/xhtml"===s[""]&&c.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+c+'" missed value!! "'+c+'" instead!!'),n.add(c,c,t));break;case At:throw new Error("attribute value missed!!")}return r;case"€":d=" ";default:if(d<=" ")switch(a){case St:n.setTagName(e.slice(t,r)),a=Ot;break;case he:l=e.slice(t,r),a=st;break;case it:c=e.slice(t,r).replace(/&#?\w+;/g,o),i.warning('attribute "'+c+'" missed quot(")!!'),n.add(l,c,t);case rt:a=Ot}else switch(a){case st:n.tagName,"http://www.w3.org/1999/xhtml"===s[""]&&l.match(/^(?:disabled|checked|selected)$/i)||i.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),n.add(l,l,t),t=r,a=he;break;case rt:i.warning('attribute space is required"'+l+'"!!');case Ot:a=he,t=r;break;case At:a=it,t=r;break;case Tn:throw new Error("elements closed character '/' and '>' must be connected to")}}r++}}function aa(e,t,n){for(var c,h,i=e.tagName,a=null,l=e.length;l--;){var o=e[l],u=o.qName,m=o.value;if(0<(c=u.indexOf(":")))var s=o.prefix=u.slice(0,c),r=u.slice(c+1),d="xmlns"===s&&r;else s=null,d="xmlns"===(r=u)&&"";o.localName=r,!1!==d&&(a==null&&(a={},la(n,n={})),n[d]=a[d]=m,o.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(d,m))}for(l=e.length;l--;)(s=(o=e[l]).prefix)&&("xml"===s&&(o.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==s&&(o.uri=n[s||""]));if(r=0<(c=i.indexOf(":"))?(s=e.prefix=i.slice(0,c),e.localName=i.slice(c+1)):(s=null,e.localName=i),h=e.uri=n[s||""],t.startElement(h,r,i,e),!e.closed)return e.currentNSMap=n,e.localNSMap=a,!0;if(t.endElement(h,r,i),a)for(s in a)t.endPrefixMapping(s)}function Id(e,t,n,s,o){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf("</"+n+">",t),i=e.substring(t+1,a);if(/[&<]/.test(i))return/^script$/i.test(n)||(i=i.replace(/&#?\w+;/g,s)),o.characters(i,0,i.length),a}return t+1}function Hd(e,t,n,s){var o=s[n];return o==null&&((o=e.lastIndexOf("</"+n+">"))<t&&(o=e.lastIndexOf("</"+n)),s[n]=o),o<t}function la(e,t){for(var n in e)t[n]=e[n]}function Rd(e,t,n,s){switch(e.charAt(t+2)){case"-":return"-"!==e.charAt(t+3)?-1:t<(i=e.indexOf("-->",t+4))?(n.comment(e,t+4,i-t-4),i+3):(s.error("Unclosed comment"),-1);default:if("CDATA["==e.substr(t+3,6))return i=e.indexOf("]]>",t+9),n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3;if(o=function(e,t){var n,o=[],s=/'[^']+'|"[^"]+"|[^\s<>/=]+=?|(\/?\s*>|<)/g;for(s.lastIndex=t,s.exec(e);n=s.exec(e);)if(o.push(n),n[1])return o}(e,t),a=o.length,1<a&&/!doctype/i.test(o[0][0])){var o,i,a,l,d=o[1][0],c=!1,r=!1;return 3<a&&(/^public$/i.test(o[2][0])?(c=o[3][0],r=4<a&&o[4][0]):/^system$/i.test(o[2][0])&&(r=o[3][0])),l=o[a-1],n.startDTD(d,c&&c.replace(/^(['"])(.*?)\1$/,"$2"),r&&r.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),l.index+l[0].length}}return-1}function Ld(e,t,n){var s,o=e.indexOf("?>",t);return o?(s=e.substring(t,o).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/),s?(s[0].length,n.processingInstruction(s[1],s[2]),o+2):-1):-1}function ha(){}sa.prototype={parse:function(e,t,n){var s=this.domBuilder;s.startDocument(),la(t,t={}),function(e,t,n,s,o){function v(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(65535<e){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(o.error("entity not found:"+e),e)}function E(t){if(l<t){var n=e.substring(l,t).replace(/&#?\w+;/g,v);d&&m(l),s.characters(n,0,t-l),l=t}}function m(t,n){for(;O<=t&&(n=A.exec(e));)y=n.index,O=y+n[0].length,d.lineNumber++;d.columnNumber=t-y+1}for(var i,f,p,b,j,_,w,C,k,y=0,O=0,A=/.*(?:\r\n?|\n)|.*$/g,d=s.locator,h=[{currentNSMap:t}],S={},l=0;;){try{if(i=e.indexOf("<",l),i<0){e.substr(l).match(/^\s*$/)||(j=s.doc,p=j.createTextNode(e.substr(l)),j.appendChild(p),s.currentElement=p);return}switch(l<i&&E(i),e.charAt(i+1)){case"/":var a=e.indexOf(">",i+3),c=e.substring(i+2,a),u=h.pop();if(a<0?(c=e.substring(i+2).replace(/[\s<].*/,""),o.error("end tag name: "+c+" is not complete:"+u.tagName),a=i+1+c.length):c.match(/\s</)&&(c=c.replace(/[\s<].*/,""),o.error("end tag name: "+c+" maybe not complete"),a=i+1+c.length),_=u.localNSMap,w=u.tagName==c,w||u.tagName&&u.tagName.toLowerCase()==c.toLowerCase()){if(s.endElement(u.uri,u.localName,c),_)for(k in _)s.endPrefixMapping(k);w||o.fatalError("end tag name: "+c+" is not match the current start tagName:"+u.tagName)}else h.push(u);a++;break;case"?":d&&m(i),a=Ld(e,i,s);break;case"!":d&&m(i),a=Rd(e,i,s,o);break;default:d&&m(i);var r=new ha,g=h[h.length-1].currentNSMap,x=(a=Bd(e,i,r,g,v,o),r.length);if(!r.closed&&Hd(e,a,r.tagName,S)&&(r.closed=!0,n.nbsp||o.warning("unclosed xml attribute")),d&&x){for(C=oa(d,{}),f=0;f<x;f++)b=r[f],m(b.offset),b.locator=oa(d,{});s.locator=C,aa(r,s,g)&&h.push(r),s.locator=d}else aa(r,s,g)&&h.push(r);"http://www.w3.org/1999/xhtml"!==r.uri||r.closed?a++:a=Id(e,a,r.tagName,v,s)}}catch(e){o.error("element parse error: "+e),a=-1}l<a?l=a:E(Math.max(i,l)+1)}}(e,t,n,s,this.errorHandler),s.endDocument()}},ha.prototype={setTagName:function(e){if(!Yi.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!Yi.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},ma={XMLReader:sa};function Dt(e,t){for(var n in e)t[n]=e[n]}function I(e,t){var s,n=e.prototype;n instanceof t||(s=function(){},s.prototype=t.prototype,Dt(n,s=new s),e.prototype=n=s),n.constructor!=e&&(n.constructor=e)}var Nd="http://www.w3.org/1999/xhtml",H={},Q=H.ELEMENT_NODE=1,ut=H.ATTRIBUTE_NODE=2,cs=H.TEXT_NODE=3,_a=H.CDATA_SECTION_NODE=4,wa=H.ENTITY_REFERENCE_NODE=5,Dd=H.ENTITY_NODE=6,xa=H.PROCESSING_INSTRUCTION_NODE=7,Ca=H.COMMENT_NODE=8,Ea=H.DOCUMENT_NODE=9,ka=H.DOCUMENT_TYPE_NODE=10,ce=H.DOCUMENT_FRAGMENT_NODE=11,zd=H.NOTATION_NODE=12,E={},_={},Td=(E.INDEX_SIZE_ERR=(_[1]="Index size error",1),E.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2),E.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3)),Fd=(E.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),E.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),E.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),E.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7),E.NOT_FOUND_ERR=(_[8]="Not found",8)),Da=(E.NOT_SUPPORTED_ERR=(_[9]="Not supported",9),E.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10));E.INVALID_STATE_ERR=(_[11]="Invalid state",11),E.SYNTAX_ERR=(_[12]="Syntax error",12),E.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),E.NAMESPACE_ERR=(_[14]="Invalid namespace",14),E.INVALID_ACCESS_ERR=(_[15]="Invalid access",15);function at(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,_[e]),this.message=_[e],Error.captureStackTrace&&Error.captureStackTrace(this,at);return n.code=e,t&&(this.message=this.message+": "+t),n}function ve(){}function nt(e,t){this._node=e,this._refresh=t,As(this)}function As(e){var t,n=e._node._inc||e._node.ownerDocument._inc;e._inc!=n&&(t=e._refresh(e._node),fr(e,"length",t.length),Dt(t,e),e._inc=n)}function ss(){}function Ia(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function Ba(e,t,n,s){if(s?t[Ia(t,s)]=n:t[t.length++]=n,e){var o=(n.ownerElement=e).ownerDocument;o&&(s&&Ya(o,e,s),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(o,e,n))}}function Va(e,t,n){var o,i,s=Ia(t,n);if(!(0<=s))throw at(Fd,new Error(e.tagName+"@"+n));for(o=t.length-1;s<o;)t[s]=t[++s];t.length=o,e&&(i=e.ownerDocument,i&&(Ya(i,e,n),n.ownerElement=null))}function $a(e){if(this._features={},e)for(var t in e)this._features=e[t]}function F(){}function Ua(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function Rt(e,t){if(t(e))return!0;if(e=e.firstChild)do if(Rt(e,t))return!0;while(e=e.nextSibling)}function Ht(){}function Ya(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function Js(e,t,n){if(e&&e._inc)if(e._inc++,s=t.childNodes,n)s[s.length++]=n;else{for(var s,o=t.firstChild,i=0;o;)o=(s[i++]=o).nextSibling;s.length=i}}function Xa(e,t){var n=t.previousSibling,s=t.nextSibling;return n?n.nextSibling=s:e.firstChild=s,s?s.previousSibling=n:e.lastChild=n,Js(e.ownerDocument,e),t}function Qa(e,t,n){var s,o,i,a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===ce){if(s=t.firstChild,s==null)return t;o=t.lastChild}else s=o=t;i=n?n.previousSibling:e.lastChild;for(s.previousSibling=i,o.nextSibling=n,i?i.nextSibling=s:e.firstChild=s,n==null?e.lastChild=o:n.previousSibling=o;s.parentNode=e,s!==o&&(s=s.nextSibling););return Js(e.ownerDocument||e,e),t.nodeType==ce&&(t.firstChild=t.lastChild=null),t}function Bt(){this._nsMap={}}function Nn(){}function Vt(){}function Co(){}function To(){}function Go(){}function ti(){}function ir(){}function ar(){}function ni(){}function pn(){}function ii(){}function dr(){}function ur(e,t){var a,o=[],n=9==this.nodeType&&this.documentElement||this,i=n.prefix,s=n.namespaceURI;return s&&i==null&&null==(i=n.lookupPrefix(s))&&(a=[{namespace:s,prefix:null}]),Be(this,o,e,t,a),o.join("")}function hr(e,t,n){var i,a,o=e.prefix||"",s=e.namespaceURI;if(!o&&!s)return!1;if("xml"===o&&"http://www.w3.org/XML/1998/namespace"===s||"http://www.w3.org/2000/xmlns/"==s)return!1;for(i=n.length;i--;)if(a=n[i],a.prefix==o)return a.namespace!=s;return!0}function Be(e,t,n,s,o){if(s){if(!(e=s(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Q:o=o||[];var a,r,l,f,p,h=e.attributes,g=h.length,i=e.firstChild,u=e.tagName;n=Nd===e.namespaceURI||n,t.push("<",u);for(r=0;r<g;r++)"xmlns"==(a=h.item(r)).prefix?o.push({prefix:a.localName,namespace:a.value}):"xmlns"==a.nodeName&&o.push({prefix:"",namespace:a.value});for(r=0;r<g;r++){if(hr(a=h.item(r),0,o)){var c=a.prefix||"",d=a.namespaceURI,m=c?" xmlns:"+c:" xmlns";t.push(m,'="',d,'"'),o.push({prefix:c,namespace:d})}Be(a,t,n,s,o)}if(hr(e,0,o)&&(c=e.prefix||"",d=e.namespaceURI,m=c?" xmlns:"+c:" xmlns",t.push(m,'="',d,'"'),o.push({prefix:c,namespace:d})),i||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(">"),n&&/^script$/i.test(u))for(;i;)i.data?t.push(i.data):Be(i,t,n,s,o),i=i.nextSibling;else for(;i;)Be(i,t,n,s,o),i=i.nextSibling;t.push("</",u,">")}else t.push("/>");return;case Ea:case ce:for(i=e.firstChild;i;)Be(i,t,n,s,o),i=i.nextSibling;return;case ut:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,Ua),'"');case cs:return t.push(e.data.replace(/[<&]/g,Ua));case _a:return t.push("<![CDATA[",e.data,"]]>");case Ca:return t.push("<!--",e.data,"-->");case ka:f=e.publicId,l=e.systemId,t.push("<!DOCTYPE ",e.name),f?(t.push(' PUBLIC "',f),l&&"."!=l&&t.push('" "',l),t.push('">')):l&&"."!=l?t.push(' SYSTEM "',l,'">'):(p=e.internalSubset,p&&t.push(" [",p,"]"),t.push(">"));return;case xa:return t.push("<?",e.target," ",e.data,"?>");case wa:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function fr(e,t,n){e[t]=n}at.prototype=Error.prototype,Dt(E,at),ve.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var s=[],n=0;n<this.length;n++)Be(this[n],s,e,t);return s.join("")}},nt.prototype.item=function(e){return As(this),this[e]},I(nt,ve),ss.prototype={length:0,item:ve.prototype.item,getNamedItem:function(e){for(var t,n=this.length;n--;)if(t=this[n],t.nodeName==e)return t},setNamedItem:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new at(Da);return t=this.getNamedItem(e.nodeName),Ba(this._ownerElement,this,e,t),t},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new at(Da);return t=this.getNamedItemNS(e.namespaceURI,e.localName),Ba(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return Va(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return Va(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n,s=this.length;s--;)if(n=this[s],n.localName==t&&n.namespaceURI==e)return n;return null}},$a.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var o,s=new Ht;return(s.implementation=this,s.childNodes=new ve,(s.doctype=n)&&s.appendChild(n),t)&&(o=s.createElementNS(e,t),s.appendChild(o)),s},createDocumentType:function(e,t,n){var s=new ti;return s.name=e,s.nodeName=e,s.publicId=t,s.systemId=n,s}},F.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return Qa(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Xa(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,s){o=new n.constructor;for(c in n)a=n[c],"object"!=typeof a&&a!=o[c]&&(o[c]=a);switch(n.childNodes&&(o.childNodes=new ve),o.ownerDocument=t,o.nodeType){case Q:var o,i,a,r,c,l=n.attributes,d=o.attributes=new ss,u=l.length;d._ownerElement=o;for(r=0;r<u;r++)o.setAttributeNode(e(t,l.item(r),!0));break;case ut:s=!0}if(s)for(i=n.firstChild;i;)o.appendChild(e(t,i,s)),i=i.nextSibling;return o}(this.ownerDocument||this,this,e)},normalize:function(){for(var t,e=this.firstChild;e;)t=e.nextSibling,t&&t.nodeType==cs&&e.nodeType==cs?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return 0<this.attributes.length},lookupPrefix:function(e){for(var n,s,t=this;t;){if(n=t._nsMap,n)for(s in n)if(n[s]==e)return s;t=t.nodeType==ut?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var n,t=this;t;){if(n=t._nsMap,n&&e in n)return n[e];t=t.nodeType==ut?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},Dt(H,F),Dt(H,F.prototype),Ht.prototype={nodeName:"#document",nodeType:Ea,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType!=ce)return null==this.documentElement&&e.nodeType==Q&&(this.documentElement=e),Qa(this,e,t),e.ownerDocument=this,e;for(var s,n=e.firstChild;n;)s=n.nextSibling,this.insertBefore(n,t),n=s;return e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),Xa(this,e)},importNode:function(e,t){return function e(t,n,s){switch(n.nodeType){case Q:(o=n.cloneNode(!1)).ownerDocument=t;case ce:break;case ut:s=!0}if(o=o||n.cloneNode(!1),o.ownerDocument=t,o.parentNode=null,s)for(var o,i=n.firstChild;i;)o.appendChild(e(t,i,s)),i=i.nextSibling;return o}(this,e,t)},getElementById:function(e){var t=null;return Rt(this.documentElement,function(n){if(n.nodeType==Q&&n.getAttribute("id")==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new nt(this,function(e){var n=[];return Rt(e.documentElement,function(s){s!==e&&s.nodeType==Q&&t.test(s.getAttribute("class"))&&n.push(s)}),n})},createElement:function(e){var t=new Bt;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new ve,(t.attributes=new ss)._ownerElement=t},createDocumentFragment:function(){var e=new pn;return e.ownerDocument=this,e.childNodes=new ve,e},createTextNode:function(e){var t=new Co;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new To;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Go;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new ii;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new Nn;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new ni;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new Bt,s=t.split(":"),o=n.attributes=new ss;return n.childNodes=new ve,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==s.length?(n.prefix=s[0],n.localName=s[1]):n.localName=t,o._ownerElement=n},createAttributeNS:function(e,t){var n=new Nn,s=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==s.length?(n.prefix=s[0],n.localName=s[1]):n.localName=t,n}},I(Ht,F),Ht.prototype.getElementsByTagName=(Bt.prototype={nodeType:Q,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===ce?this.insertBefore(e,null):function(e,t){var n,s=t.parentNode;return s&&(n=e.lastChild,s.removeChild(t),n=e.lastChild),n=e.lastChild,t.parentNode=e,t.previousSibling=n,t.nextSibling=null,n?n.nextSibling=t:e.firstChild=t,e.lastChild=t,Js(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var s=this.ownerDocument.createAttributeNS(e,t);s.value=s.nodeValue=""+n,this.setAttributeNode(s)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new nt(this,function(t){var n=[];return Rt(t,function(s){s===t||s.nodeType!=Q||"*"!==e&&s.tagName!=e||n.push(s)}),n})},getElementsByTagNameNS:function(e,t){return new nt(this,function(n){var s=[];return Rt(n,function(o){o===n||o.nodeType!==Q||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||s.push(o)}),s})}}).getElementsByTagName,Ht.prototype.getElementsByTagNameNS=Bt.prototype.getElementsByTagNameNS,I(Bt,F),Nn.prototype.nodeType=ut,I(Nn,F),Vt.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(){throw new Error(_[Td])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},I(Vt,F),Co.prototype={nodeName:"#text",nodeType:cs,splitText:function(e){var n,t=this.data,s=t.substring(e),t=t.substring(0,e);return this.data=this.nodeValue=t,this.length=t.length,n=this.ownerDocument.createTextNode(s),this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}},I(Co,Vt),To.prototype={nodeName:"#comment",nodeType:Ca},I(To,Vt),Go.prototype={nodeName:"#cdata-section",nodeType:_a},I(Go,Vt),ti.prototype.nodeType=ka,I(ti,F),ir.prototype.nodeType=zd,I(ir,F),ar.prototype.nodeType=Dd,I(ar,F),ni.prototype.nodeType=wa,I(ni,F),pn.prototype.nodeName="#document-fragment",pn.prototype.nodeType=ce,I(pn,F),ii.prototype.nodeType=xa,I(ii,F),dr.prototype.serializeToString=function(e,t,n){return ur.call(e,t,n)},F.prototype.toString=ur;try{Object.defineProperty&&(Object.defineProperty(nt.prototype,"length",{get:function(){return As(this),this.$$length}}),Object.defineProperty(F.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case Q:case ce:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case Q:case ce:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),fr=function(e,t,n){e["$$"+t]=n})}catch{}function pr(e){return!!e&&"object"==typeof e}function P(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return n.reduce(function(e,t){return"object"!=typeof t||Object.keys(t).forEach(function(n){Array.isArray(e[n])&&Array.isArray(t[n])?e[n]=e[n].concat(t[n]):pr(e[n])&&pr(t[n])?e[n]=P(e[n],t[n]):e[n]=t[n]}),e},{})}function rn(e){return e.reduce(function(e,t){return e.concat(t)},[])}function br(e){if(!e.length)return[];for(var n=[],t=0;t<e.length;t++)n.push(e[t]);return n}function jt(e){var t=e.baseUrl,u=void 0===t?"":t,n=e.source,s=void 0===n?"":n,o=e.range,i=void 0===o?"":o,a=e.indexRange,r=void 0===a?"":a,c={uri:s,resolvedUri:ln(u||"",s)};if(i||r){var l=(i||r).split("-"),d=parseInt(l[0],10),h=parseInt(l[1],10);c.byterange={length:h-d+1,offset:d}}return c}function yr(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e}function bi(e){var n,s=e.type,o=void 0===s?"static":s,r=e.duration,i=e.timescale,c=void 0===i?1:i,l=e.sourceDuration,a=od[o](e),t=function(e,t){for(var s=[],n=e;n<t;n++)s.push(n);return s}(a.start,a.end).map(function(e){return function(t,n){var s=e.duration,o=e.timescale,a=void 0===o?1:o,r=e.periodIndex,i=e.startNumber;return{number:(void 0===i?1:i)+t,duration:s/a,timeline:r,time:n*s}}}(e));return"static"===o&&(n=t.length-1,t[n].duration=l-r/c*n),t}function wr(e){var t,s,c,n=e.baseUrl,o=e.initialization,i=void 0===o?{}:o,a=e.sourceDuration,r=e.indexRange,l=void 0===r?"":r,d=e.duration;if(!n)throw new Error(ld);return c=jt({baseUrl:n,source:i.sourceURL,range:i.range}),t=jt({baseUrl:n,source:n,indexRange:l}),t.map=c,d?(s=bi(e),s.length&&(t.duration=s[0].duration,t.timeline=s[0].timeline)):a&&(t.duration=a,t.timeline=0),t.number=0,[t]}function Or(e,t,n){for(var a=e.sidx.map?e.sidx.map:null,p=e.sidx.duration,c=e.timeline||0,i=e.sidx.byterange,h=i.offset+i.length,m=t.timescale,f=t.references.filter(function(e){return 1!==e.referenceType}),r=[],s=h+t.firstOffset,o=0;o<f.length;o++){var l=t.references[o],d=l.referencedSize,g=l.subsegmentDuration,u=wr({baseUrl:n,timescale:m,timeline:c,periodIndex:c,duration:g,sourceDuration:p,indexRange:s+"-"+(s+d-1)})[0];a&&(u.map=a),r.push(u),s+=d}return e.segments=r,e}function xr(e){return function(e){return Object.keys(e).map(function(t){return e[t]})}(e.reduce(function(e,t){var s,n=t.attributes.id+(t.attributes.lang||"");return e[n]?(t.segments[0]&&(t.segments[0].discontinuity=!0),(s=e[n].segments).push.apply(s,t.segments),t.attributes.contentProtection&&(e[n].attributes.contentProtection=t.attributes.contentProtection)):e[n]=t,e},{})).map(function(e){return e.discontinuityStarts=function(e,t){return e.reduce(function(e,n,s){return n[t]&&e.push(s),e},[])}(e.segments,"discontinuity"),e})}function Ls(e,t){if(void 0===t&&(t={}),!Object.keys(t).length)return e;for(r in e)if(n=e[r],n.sidx){var n,s,a,r,o=n.sidx.uri+"-"+(s=n.sidx.byterange,void 0,a=s.offset+s.length-1,s.offset+"-"+a),i=t[o]&&t[o].sidx;n.sidx&&i&&Or(n,i,n.sidx.resolvedUri)}return e}function Md(e){var n,t=e.attributes,s=e.segments,i=e.sidx,o={attributes:(n={NAME:t.id,AUDIO:"audio",SUBTITLES:"subs",RESOLUTION:{width:t.width,height:t.height},CODECS:t.codecs,BANDWIDTH:t.bandwidth},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(t.type||"static"),timeline:t.periodIndex,resolvedUri:"",targetDuration:t.duration,segments:s,mediaSequence:s.length?s[0].number:1};return t.contentProtection&&(o.contentProtection=t.contentProtection),i&&(o.sidx=i),o}function Sd(e,t,n){if(void 0===n&&(n={}),!e.length)return{};var o,i=e[0].attributes,d=i.sourceDuration,a=i.type,u=void 0===a?"static":a,h=i.suggestedPresentationDelay,r=i.minimumUpdatePeriod,m=xr(e.filter(function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType})).map(Md),c=xr(e.filter(function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType})),l=e.filter(function(e){var t=e.attributes;return"text/vtt"===t.mimeType||"text"===t.contentType}),s={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(o={AUDIO:{},VIDEO:{}},o["CLOSED-CAPTIONS"]={},o.SUBTITLES={},o),uri:"",duration:d,playlists:Ls(m,n)};return 0<=r&&(s.minimumUpdatePeriod=1e3*r),t&&(s.locations=t),"dynamic"===u&&(s.suggestedPresentationDelay=h),c.length&&(s.mediaGroups.AUDIO.audio=function(e,t){void 0===t&&(t={});var n,s=e.reduce(function(e,s){var r,o=s.attributes.role&&s.attributes.role.value||"",a=s.attributes.lang||"",i="main";return a&&(r=o?" ("+o+")":"",i=s.attributes.lang+r),e[i]&&e[i].playlists[0].attributes.BANDWIDTH>s.attributes.bandwidth||(e[i]={language:a,autoselect:!0,default:"main"===o,playlists:Ls([function(e){var n,t=e.attributes,s=e.segments,i=e.sidx,o={attributes:(n={NAME:t.id,BANDWIDTH:t.bandwidth,CODECS:t.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(t.type||"static"),timeline:t.periodIndex,resolvedUri:"",targetDuration:t.duration,segments:s,mediaSequence:s.length?s[0].number:1};return t.contentProtection&&(o.contentProtection=t.contentProtection),i&&(o.sidx=i),o}(s)],t),uri:""},"undefined"==typeof n&&"main"===o&&((n=s).default=!0)),e},{});return n||(s[Object.keys(s)[0]].default=!0),s}(c,n)),l.length&&(s.mediaGroups.SUBTITLES.subs=function(e,t){return void 0===t&&(t={}),e.reduce(function(e,n){var s=n.attributes.lang||"text";return e[s]||(e[s]={language:s,default:!1,autoselect:!1,playlists:Ls([function(e){var s,o,t=e.attributes,n=e.segments;return"undefined"==typeof n&&(n=[{uri:t.baseUrl,timeline:t.periodIndex,resolvedUri:t.baseUrl||"",duration:t.sourceDuration,number:0}],t.duration=t.sourceDuration),s=((o={NAME:t.id,BANDWIDTH:t.bandwidth})["PROGRAM-ID"]=1,o),t.codecs&&(s.CODECS=t.codecs),{attributes:s,uri:"",endList:"static"===(t.type||"static"),timeline:t.periodIndex,resolvedUri:t.baseUrl||"",targetDuration:t.duration,segments:n,mediaSequence:n.length?n[0].number:1}}(n)],t),uri:""}),e},{})}(l,n)),s}function Ar(e,t){for(var s,i,a,d,u,h,m,g,v,j,y,O,C,k,A,M,S=e.type,T=void 0===S?"static":S,E=e.minimumUpdatePeriod,L=void 0===E?0:E,b=e.media,N=void 0===b?"":b,D=e.sourceDuration,_=e.timescale,w=void 0===_?1:_,p=e.startNumber,x=void 0===p?1:p,z=e.periodIndex,l=[],n=-1,c=0;c<t.length;c++){var f=t[c],o=f.d,F=f.r||0,r=f.t||0;n<0&&(n=r),r&&n<r&&(n=r),a=void 0,F<0?(m=c+1,a=m===t.length?"dynamic"===T&&0<L&&0<N.indexOf("$Number$")?(v=n,C=o,void 0,k=(s=e).NOW,M=s.clientOffset,A=s.availabilityStartTime,u=s.timescale,g=void 0===u?1:u,d=s.start,O=void 0===d?0:d,h=s.minimumUpdatePeriod,y=(k+M)/1e3+(void 0===h?0:h)-(A+O),Math.ceil((y*g-v)/C)):(D*w-n)/o:(t[m].t-n)/o):a=F+1;for(j=x+l.length+a,i=x+l.length;i<j;)l.push({number:i,duration:o/w,time:n,timeline:z}),n+=o,i++}return l}function Sr(e,t){return e.replace(sd,function(e){return function(t,n,s,o){if("$$"===t)return"$";if("undefined"==typeof e[n])return t;var i=""+e[n];return"RepresentationID"===n?i:(o=s?parseInt(o,10):1)<=i.length?i:new Array(o-i.length+1).join("0")+i}}(t))}function Ad(e,t){var n={RepresentationID:e.id,Bandwidth:e.bandwidth||0},s=e.initialization,o=void 0===s?{sourceURL:"",range:""}:s,i=jt({baseUrl:e.baseUrl,source:Sr(o.sourceURL,n),range:o.range});return function(e,t){return e.duration||t?e.duration?bi(e):Ar(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]}(e,t).map(function(t){n.Number=t.number,n.Time=t.time;var s=Sr(e.media||"",n);return{uri:s,timeline:t.timeline,duration:t.duration,resolvedUri:ln(e.baseUrl||"",s),map:i,number:t.number}})}function xd(e,t){var s,o,n=e.duration,i=e.segmentUrls,a=void 0===i?[]:i;if(!n&&!t||n&&t)throw new Error(rd);return o=a.map(function(t){return function(e,t){var n=e.baseUrl,s=e.initialization,o=void 0===s?{}:s,a=jt({baseUrl:n,source:o.sourceURL,range:o.range}),i=jt({baseUrl:n,source:t.media,range:t.mediaRange});return i.map=a,i}(e,t)}),n&&(s=bi(e)),t&&(s=Ar(e,t)),s.map(function(e,t){if(o[t]){var n=o[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}}).filter(function(e){return e})}function wd(e){if(i=e.attributes,n=e.segmentInfo,n.template?(o=Ad,t=P(i,n.template)):n.base?(o=wr,t=P(i,n.base)):n.list&&(o=xd,t=P(i,n.list)),s={attributes:i},!o)return s;if(a=o(t,n.timeline),t.duration){var t,n,s,o,i,a,r=t,l=r.duration,c=r.timescale,d=void 0===c?1:c;t.duration=l/d}else a.length?t.duration=a.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0;return s.attributes=t,s.segments=a,n.base&&t.indexRange&&(s.sidx=a[0],s.segments=[]),s}function y(e,t){return br(e.childNodes).filter(function(e){return e.tagName===t})}function ei(e){return e.textContent.trim()}function Ge(e){if(n=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(e),!n)return 0;var n,t=n.slice(1),s=t[0],o=t[1],i=t[2],a=t[3],r=t[4],c=t[5];return 31536e3*parseFloat(s||0)+2592e3*parseFloat(o||0)+86400*parseFloat(i||0)+3600*parseFloat(a||0)+60*parseFloat(r||0)+parseFloat(c||0)}function L(e){return e&&e.attributes?br(e.attributes).reduce(function(e,t){var n=fc[t.name]||fc.DEFAULT;return e[t.name]=n(t.value),e},{}):{}}function An(e,t){return t.length?rn(e.map(function(e){return t.map(function(t){return ln(e,ei(t))})})):e}function co(e){var o,i=y(e,"SegmentTemplate")[0],n=y(e,"SegmentList")[0],d=n&&y(n,"SegmentURL").map(function(e){return P({tag:"SegmentURL"},L(e))}),a=y(e,"SegmentBase")[0],r=n||i,c=r&&y(r,"SegmentTimeline")[0],l=n||a||i,s=l&&y(l,"Initialization")[0],t=i&&L(i);return t&&s?t.initialization=s&&L(s):t&&t.initialization&&(t.initialization={sourceURL:t.initialization}),o={template:t,timeline:c&&y(c,"S").map(function(e){return L(e)}),list:n&&P(L(n),{segmentUrls:d,initialization:L(s)}),base:a&&P(L(a),{initialization:L(s)})},Object.keys(o).forEach(function(e){o[e]||delete o[e]}),o}function _d(e,t,n){return function(s){var a=L(s),r=An(t,y(s,"BaseURL")),c=y(s,"Role")[0],l={role:L(c)},o=P(e,a,l),i=function(e){return e.reduce(function(e,t){var s,o,a,i=L(t),n=nd[i.schemeIdUri];return n&&(e[n]={attributes:i},s=y(t,"cenc:pssh")[0],s&&(o=ei(s),a=o&&Li(o),e[n].pssh=a)),e},{})}(y(s,"ContentProtection"));Object.keys(i).length&&(o=P(o,{contentProtection:i}));var d=co(s),u=y(s,"Representation"),h=P(n,d);return rn(u.map(function(e,t,n){return function(s){var o=y(s,"BaseURL"),i=An(t,o),a=P(e,L(s)),r=co(s);return i.map(function(e){return{segmentInfo:P(n,r),attributes:P(a,{baseUrl:e})}})}}(o,r,h)))}}function bd(e,t){void 0===t&&(t={});var s=t,o=s.manifestUri,l=void 0===o?"":o,i=s.NOW,d=void 0===i?Date.now():i,a=s.clientOffset,u=void 0===a?0:a,r=y(e,"Period");if(!r.length)throw new Error(hd);var c=y(e,"Location"),n=L(e),h=An([l],y(e,"BaseURL"));return n.sourceDuration=n.mediaPresentationDuration||0,n.NOW=d,n.clientOffset=u,c.length&&(n.locations=c.map(ei)),{locations:n.locations,representationInfo:rn(r.map(function(e,t){return function(n,s){var i=An(t,y(n,"BaseURL")),a=L(n),o=parseInt(a.id,10),r=$d.isNaN(o)?s:o,c=P(e,{periodIndex:r}),l=y(n,"AdaptationSet"),d=co(n);return rn(l.map(_d(c,i,d)))}}(n,h)))}}function Br(e){if(""===e)throw new Error(ud);var t,n,s=new md;try{t=(n=s.parseFromString(e,"application/xml"))&&"MPD"===n.documentElement.tagName?n.documentElement:null}catch{}if(!t||t&&0<t.getElementsByTagName("parsererror").length)throw new Error(dd);return t}function vd(e,t){void 0===t&&(t={});var n=bd(Br(e),t),s=function(e){return e.map(wd)}(n.representationInfo);return Sd(s,n.locations,t.sidxMapping)}function gd(e){return function(e){var t,n=y(e,"UTCTiming")[0];if(!n)return null;switch(t=L(n),t.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":t.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":t.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":t.method="DIRECT",t.value=Date.parse(t.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(ad)}return t}(Br(e))}function r(e){return e instanceof Uint8Array?e:(Array.isArray(e)||function(e){return ArrayBuffer.isView(e)}(e)||e instanceof ArrayBuffer||(e="number"!=typeof e||"number"==typeof e&&e!=e?0:[e]),new Uint8Array(e&&e.buffer||e,e&&e.byteOffset||0,e&&e.byteLength||0))}function pd(e,t){i=(void 0===t?{}:t).le,a=void 0!==i&&i,("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0);for(var o,i,a,r=function(e){return Math.ceil(function(e){return e.toString(2).length}(e)/8)}(e=x(e)),n=new Uint8Array(new ArrayBuffer(r)),s=0;s<r;s++)o=a?s:Math.abs(s+1-n.length),n[o]=Number(e/Ao[s]&x(255)),e<0&&(n[o]=Math.abs(~n[o]),n[o]-=0===s?1:2);return n}function Kr(e,t){if("string"!=typeof e&&e&&"function"==typeof e.toString&&(e=e.toString()),"string"!=typeof e)return new Uint8Array;t||(e=unescape(encodeURIComponent(e)));for(var s=new Uint8Array(e.length),n=0;n<e.length;n++)s[n]=e.charCodeAt(n);return s}function v(e,t,n){var l,o=void 0===n?{}:n,i=o.offset,s=void 0===i?0:i,a=o.mask,c=void 0===a?[]:a;return e=r(e),l=(t=r(t)).every?t.every:Array.prototype.every,t.length&&e.length-s>=t.length&&l.call(t,function(t,n){return t===(c[n]?c[n]&e[s+n]:e[s+n])})}function tt(e,t){return void 0===t&&(t=0),(e=r(e)).length-t<10||!v(e,Zl,{offset:t})?t:tt(e,t+=function(e,t){void 0===t&&(t=0);var s=(e=r(e))[t+5],n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return(16&s)>>4?20+n:10+n}(e,t))}function Gr(e){return"string"==typeof e?Kr(e):e}function Xr(e,t,n){if(void 0===n&&(n=!1),t=function(e){return Array.isArray(e)?e.map(function(e){return Gr(e)}):[Gr(e)]}(t),e=r(e),o=[],!t.length)return o;for(s=0;s<e.length;){var s,o,i,a,c=(e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3])>>>0,l=e.subarray(s+4,s+8);if(0==c)break;if(i=s+c,i>e.length){if(n)break;i=e.length}a=e.subarray(s+8,i),v(l,t[0])&&(1===t.length?o.push(a):o.push.apply(o,Xr(a,t.slice(1),n))),s=i}return o}function tn(e,t,n,s){void 0===n&&(n=!0),void 0===s&&(s=!1);var o=function(e){for(var n=1,t=0;t<ui.length&&!(e&ui[t]);t++)n++;return n}(e[t]),i=e.subarray(t,t+o);return n&&((i=Array.prototype.slice.call(e,t,t+o))[0]^=ui[o-1]),{length:o,value:function(e,t){var n,s,o,i=void 0===t?{}:t,a=i.signed,d=void 0!==a&&a,c=i.le,l=void 0!==c&&c;return e=r(e),s=l?"reduce":"reduceRight",n=(e[s]?e[s]:Array.prototype[s]).call(e,function(t,n,s){var o=l?s:Math.abs(s+1-e.length);return t+x(n)*Ao[o]},x(0)),d&&(o=Ao[e.length]/x(2)-x(1),o<(n=x(n))&&(n-=o,n-=o,n-=x(2))),Number(n)}(i,{signed:s}),bytes:i}}function vs(e){return"string"==typeof e?e.match(/.{1,2}/g).map(function(e){return vs(e)}):"number"==typeof e?pd(e):e}function Jr(e,t,n){if(n>=t.length)return t.length;var o,s=tn(t,n,!1);return v(e.bytes,s.bytes)?n:(o=tn(t,n+s.length),Jr(e,t,n+o.length+o.value+s.length))}function Ss(e,t){if(t=function(e){return Array.isArray(e)?e.map(function(e){return vs(e)}):[vs(e)]}(t),e=r(e),s=[],!t.length)return s;for(o=0;o<e.length;){var s,o,c,l,i=tn(e,o,!1),n=tn(e,o+i.length),a=o+i.length+n.length;127===n.value&&(n.value=Jr(i,e,a),n.value!==e.length&&(n.value-=a)),l=a+n.value>e.length?e.length:a+n.value,c=e.subarray(a,l),v(t[0],i.bytes)&&(1===t.length?s.push(c):s=s.concat(Ss(c,t.slice(1)))),o+=i.length+n.length+c.length}return s}function fd(e){for(n=[],t=1;t<e.length-2;)v(e.subarray(t,t+3),Gl)&&(n.push(t+2),t++),t++;if(0===n.length)return e;var t,n,o=e.length-n.length,i=new Uint8Array(o),s=0;for(t=0;t<o;s++,t++)s===n[0]&&(s++,n.shift()),i[t]=e[s];return i}function nc(e,t,n,s){void 0===s&&(s=1/0),e=r(e),n=[].concat(n);for(var i,a,c,o=0,l=0;o<e.length&&(l<s||a);)if(i=void 0,v(e.subarray(o),Ql)?i=4:v(e.subarray(o),Xl)&&(i=3),i){if(l++,a)return fd(e.subarray(a,o));c=void 0,"h264"===t?c=31&e[o+i]:"h265"===t&&(c=e[o+i]>>1&63),-1!==n.indexOf(c)&&(a=o+i),o+=i+("h264"===t?1:2)}else o++;return e.subarray(0,0)}var sc={Node:F,DOMImplementation:$a,XMLSerializer:dr},zs=k(function(e,t){function i(e){this.options=e||{locator:{}}}function s(){this.cdata=!1}function n(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function r(e){if(e)return`
@`+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function a(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function o(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}i.prototype.parseFromString=function(e,t){var n=this.options,o=new c,i=n.domBuilder||new s,u=n.errorHandler,l=n.locator,a=n.xmlns||{},d=/\/x?html?$/.test(t),h=d?Vd.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return l&&i.setDocumentLocator(l),o.errorHandler=function(e,t,n){if(!e){if(t instanceof s)return t;e=t}var i={},a=e instanceof Function;function o(t){var s=e[t];!s&&a&&(s=2==e.length?function(n){e(t,n)}:e),i[t]=s&&function(e){s("[xmldom "+t+"]	"+e+r(n))}||function(){}}return n=n||{},o("warning"),o("error"),o("fatalError"),i}(u,i,l),o.domBuilder=n.domBuilder||i,d&&(a[""]="http://www.w3.org/1999/xhtml"),a.xml=a.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?o.parse(e,a,h):o.errorHandler.error("invalid doc source"),i.doc},s.prototype={startDocument:function(){this.doc=(new l).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,s,i){var a,r,d,l=this.doc,c=l.createElementNS(e,s||t),u=i.length;o(this,c),this.currentElement=c,this.locator&&n(this.locator,c);for(a=0;a<u;a++)e=i.getURI(a),d=i.getValue(a),r=(s=i.getQName(a),l.createAttributeNS(e,s)),this.locator&&n(i.getLocator(a),r),r.value=r.nodeValue=d,c.setAttributeNode(r)},endElement:function(){var s=this.currentElement;s.tagName,this.currentElement=s.parentNode},startPrefixMapping:function(){},endPrefixMapping:function(){},processingInstruction:function(e,t){var s=this.doc.createProcessingInstruction(e,t);this.locator&&n(this.locator,s),o(this,s)},ignorableWhitespace:function(){},characters:function(e){if(e=a.apply(this,arguments)){if(this.cdata)var o=this.doc.createCDATASection(e);else o=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(o):/^\s*$/.test(e)&&this.doc.appendChild(o),this.locator&&n(this.locator,o)}},skippedEntity:function(){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e){e=a.apply(this,arguments);var i=this.doc.createComment(e);this.locator&&n(this.locator,i),o(this,i)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,s){var a,i=this.doc.implementation;i&&i.createDocumentType&&(a=i.createDocumentType(e,t,s),this.locator&&n(this.locator,a),o(this,a))},warning:function(){},error:function(){},fatalError:function(e){throw e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){s.prototype[e]=function(){return null}});var c=ma.XMLReader,l=t.DOMImplementation=sc.DOMImplementation;t.XMLSerializer=sc.XMLSerializer,t.DOMParser=i}),md=(zs.DOMImplementation,zs.XMLSerializer,zs.DOMParser),hd="INVALID_NUMBER_OF_PERIOD",ud="DASH_EMPTY_MANIFEST",dd="DASH_INVALID_XML",ld="NO_BASE_URL",rd="SEGMENT_TIME_UNSPECIFIED",ad="UNSUPPORTED_UTC_TIMING_SCHEME",od={static:function(e){var s=e.duration,t=e.timescale,o=void 0===t?1:t,i=e.sourceDuration,n=yr(e.endNumber);return{start:0,end:"number"==typeof n?n:Math.ceil(i/(s/o))}},dynamic:function(e){var h=e.NOW,p=e.clientOffset,f=e.availabilityStartTime,l=e.timescale,t=void 0===l?1:l,o=e.duration,r=e.start,m=void 0===r?0:r,i=e.minimumUpdatePeriod,u=void 0===i?0:i,a=e.timeShiftBufferDepth,d=void 0===a?1/0:a,c=yr(e.endNumber),s=(h+p)/1e3,n=f+m,g=s+u-n,v=Math.ceil(g*t/o),b=Math.floor((s-n-d)*t/o),j=Math.floor((s-n)*t/o);return{start:Math.max(0,b),end:"number"==typeof c?c:Math.min(v,j)}}},sd=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,fc={mediaPresentationDuration:function(e){return Ge(e)},availabilityStartTime:function(e){return function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),Date.parse(e)}(e)/1e3},minimumUpdatePeriod:function(e){return Ge(e)},suggestedPresentationDelay:function(e){return Ge(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Ge(e)},start:function(e){return Ge(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Ge(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},nd={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},gc=Or,vc=Math.pow(2,32),td=function(e){var o,n=new DataView(e.buffer,e.byteOffset,e.byteLength),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},t=12;0===s.version?(s.earliestPresentationTime=n.getUint32(t),s.firstOffset=n.getUint32(t+4),t+=8):(s.earliestPresentationTime=n.getUint32(t)*vc+n.getUint32(t+4),s.firstOffset=n.getUint32(t+8)*vc+n.getUint32(t+12),t+=16),t+=2,o=n.getUint16(t);for(t+=2;0<o;t+=12,o--)s.references.push({referenceType:(128&e[t])>>>7,referencedSize:2147483647&n.getUint32(t),subsegmentDuration:n.getUint32(t+4),startsWithSap:!!(128&e[t+8]),sapType:(112&e[t+8])>>>4,sapDeltaTime:268435455&n.getUint32(t+8)});return s},x=fe.BigInt||Number,Ao=[x("0x1"),x("0x100"),x("0x10000"),x("0x1000000"),x("0x100000000"),x("0x10000000000"),x("0x1000000000000"),x("0x100000000000000"),x("0x10000000000000000")],Zl=r([73,68,51]),xn={EBML:r([26,69,223,163]),DocType:r([66,130]),Segment:r([24,83,128,103]),SegmentInfo:r([21,73,169,102]),Tracks:r([22,84,174,107]),Track:r([174]),TrackNumber:r([215]),DefaultDuration:r([35,227,131]),TrackEntry:r([174]),TrackType:r([131]),FlagDefault:r([136]),CodecID:r([134]),CodecPrivate:r([99,162]),VideoTrack:r([224]),AudioTrack:r([225]),Cluster:r([31,67,182,117]),Timestamp:r([231]),TimestampScale:r([42,215,177]),BlockGroup:r([160]),BlockDuration:r([155]),Block:r([161]),SimpleBlock:r([163])},ui=[128,64,32,16,8,4,2,1],Ql=r([0,0,0,1]),Xl=r([0,0,1]),Gl=r([0,0,3]),W={webm:r([119,101,98,109]),matroska:r([109,97,116,114,111,115,107,97]),flac:r([102,76,97,67]),ogg:r([79,103,103,83]),ac3:r([11,119]),riff:r([82,73,70,70]),avi:r([65,86,73]),wav:r([87,65,86,69]),"3gp":r([102,116,121,112,51,103]),mp4:r([102,116,121,112]),fmp4:r([115,116,121,112]),mov:r([102,116,121,112,113,116])},ct={aac:function(e){var t=tt(e);return v(e,[255,16],{offset:t,mask:[255,22]})},mp3:function(e){var t=tt(e);return v(e,[255,2],{offset:t,mask:[255,6]})},webm:function(e){var t=Ss(e,[xn.EBML,xn.DocType])[0];return v(t,W.webm)},mkv:function(e){var t=Ss(e,[xn.EBML,xn.DocType])[0];return v(t,W.matroska)},mp4:function(e){return!ct["3gp"](e)&&!ct.mov(e)&&(v(e,W.mp4,{offset:4})||v(e,W.fmp4,{offset:4}))},mov:function(e){return v(e,W.mov,{offset:4})},"3gp":function(e){return v(e,W["3gp"],{offset:4})},ac3:function(e){var t=tt(e);return v(e,W.ac3,{offset:t})},ts:function(e){if(e.length<189&&1<=e.length)return 71===e[0];for(var t=0;t+188<e.length&&t<188;){if(71===e[t]&&71===e[t+188])return!0;t+=1}return!1},flac:function(e){var t=tt(e);return v(e,W.flac,{offset:t})},ogg:function(e){return v(e,W.ogg)},avi:function(e){return v(e,W.riff)&&v(e,W.avi,{offset:8})},wav:function(e){return v(e,W.riff)&&v(e,W.wav,{offset:8})},h264:function(e){return function(e,t,n){return nc(e,"h264",t,n)}(e,7,3).length},h265:function(e){return function(e,t,n){return nc(e,"h265",t,n)}(e,[32,33],3).length}},Eo=Object.keys(ct).filter(function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e}).concat(["ts","h264","h265"]);Eo.forEach(function(e){var t=ct[e];ct[e]=function(e){return t(r(e))}});function vo(e){e=r(e);for(var n,t=0;t<Eo.length;t++)if(n=Eo[t],Yl[n](e))return n;return""}function Fc(e){return 0<Xr(e,["moof"]).length}function ye(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var s;return!!e[t]&&(s=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(s,1),-1<s)},this.trigger=function(t){var n,s,o,i;if(s=e[t])if(2===arguments.length)for(o=s.length,n=0;n<o;++n)s[n].call(this,arguments[1]);else{for(i=[],n=arguments.length,n=1;n<arguments.length;++n)i.push(arguments[n]);for(o=s.length,n=0;n<o;++n)s[n].apply(this,i)}},this.dispose=function(){e={}}}}var Yl=ct,Dc=27,Nc=15,ql=21;ye.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),this.on("partialdone",function(t){e.partialFlush(t)}),this.on("endedtimeline",function(t){e.endTimeline(t)}),this.on("reset",function(t){e.reset(t)}),e},ye.prototype.push=function(e){this.trigger("data",e)},ye.prototype.flush=function(e){this.trigger("done",e)},ye.prototype.partialFlush=function(e){this.trigger("partialdone",e)},ye.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},ye.prototype.reset=function(e){this.trigger("reset",e)};function Kl(e,t){var n=1;for(t<e&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}new ye;function Pc(e){var t=31&e[1];return t<<=8,t|=e[2]}function kn(e){return!!(64&e[1])}function on(e){var t=0;return 1<(48&e[3])>>>4&&(t+=e[4]+1),t}function Is(e){switch(e){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}}function Vc(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=0<=n?n:0,(16&e[t+5])>>4?n+20:n+10}function $c(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}var Ul,Wl,$l,Vl,Bl={parseType:function(e,t){var n=Pc(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var n=kn(e),t=4+on(e);return n&&(t+=e[t]+1),(31&e[t+10])<<8|e[t+11]},parsePmt:function(e){var n,s,i,o={},a=kn(e),t=4+on(e);if(a&&(t+=e[t]+1),1&e[t+5]){i=3+((15&e[t+1])<<8|e[t+2])-4;for(s=12+((15&e[t+10])<<8|e[t+11]);s<i;)n=t+s,o[(31&e[n+1])<<8|e[n+2]]=e[n],s+=5+((15&e[n+3])<<8|e[n+4]);return o}},parsePayloadUnitStartIndicator:kn,parsePesType:function(e,t){switch(t[Pc(e)]){case Dc:return"video";case Nc:return"audio";case ql:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!kn(e))return null;var n,s,t=4+on(e);return t>=e.byteLength?null:(n=null,192&(s=e[t+7])&&((n={}).pts=(14&e[t+9])<<27|(255&e[t+10])<<20|(254&e[t+11])<<12|(255&e[t+12])<<5|(254&e[t+13])>>>3,n.pts*=4,n.pts+=(6&e[t+13])>>>1,n.dts=n.pts,64&s&&(n.dts=(14&e[t+14])<<27|(255&e[t+15])<<20|(254&e[t+16])<<12|(255&e[t+17])<<5|(254&e[t+18])>>>3,n.dts*=4,n.dts+=(6&e[t+18])>>>1)),n)},videoPacketContainsKeyFrame:function(e){for(var i=4+on(e),n=e.subarray(i),t=0,s=0,o=!1;s<n.byteLength-3;s++)if(1===n[s+2]){t=s+5;break}for(;t<n.byteLength;)switch(n[t]){case 0:if(0!==n[t-1]){t+=2;break}if(0!==n[t-2]){t++;break}for(s+3!==t-2&&"slice_layer_without_partitioning_rbsp_idr"===Is(31&n[s+3])&&(o=!0);1!==n[++t]&&t<n.length;);s=t-2,t+=3;break;case 1:if(0!==n[t-1]||0!==n[t-2]){t+=3;break}"slice_layer_without_partitioning_rbsp_idr"===Is(31&n[s+3])&&(o=!0),s=t-2,t+=3;break;default:t+=3}return n=n.subarray(s),t-=s,s=0,n&&3<n.byteLength&&"slice_layer_without_partitioning_rbsp_idr"===Is(31&n[s+3])&&(o=!0),o}},Il=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Hl={isLikelyAacData:function(e){var t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=Vc(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:Vc,parseAdtsSize:function(e,t){var n=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|n},parseType:function(e,t){return e[t]==="I".charCodeAt(0)&&e[t+1]==="D".charCodeAt(0)&&e[t+2]==="3".charCodeAt(0)?"timed-metadata":!0&e[t]&&240==(240&e[t+1])?"audio":null},parseSampleRate:function(e){for(var t=0;t+5<e.length;){if(255===e[t]&&240==(246&e[t+1]))return Il[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){t=10,64&e[5]&&(t+=4,t+=$c(e.subarray(10,14)));do{if((i=$c(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){o=e.subarray(t+10,t+i+10);for(n=0;n<o.byteLength;n++)if(0===o[n]){if("com.apple.streaming.transportStreamTimestamp"!==unescape(function(e,t,n){var s,o="";for(s=t;s<n;s++)o+="%"+("00"+e[s].toString(16)).slice(-2);return o}(o,0,n)))break;var t,n,o,i,s=o.subarray(n+1),a=(1&s[3])<<30|s[4]<<22|s[5]<<14|s[6]<<6|s[7]>>>2;return a*=4,a+=3&s[7]}}t+=10,t+=i}while(t<e.byteLength)return null}},Qc=9e4,Pt=(Ul=function(e){return 9e4*e},Wl=function(e,t){return e*t},$l=function(e){return e/9e4},Vl=function(e,t){return e/t},Qc),Je=Kl,h={};h.ts=Bl,h.aac=Hl;function Pl(e,t,n){for(var o,a,c,l,i=0,s=R,r=!1;s<=e.byteLength;)if(71!==e[i]||71!==e[s]&&s!==e.byteLength)i++,s++;else{switch(o=e.subarray(i,s),h.ts.parseType(o,t.pid)){case"pes":c=h.ts.parsePesType(o,t.table),l=h.ts.parsePayloadUnitStartIndicator(o),"audio"===c&&l&&(a=h.ts.parsePesTime(o))&&(a.type="audio",n.audio.push(a),r=!0)}if(r)break;i+=R,s+=R}for(i=(s=e.byteLength)-R,r=!1;0<=i;)if(71!==e[i]||71!==e[s]&&s!==e.byteLength)i--,s--;else{switch(o=e.subarray(i,s),h.ts.parseType(o,t.pid)){case"pes":c=h.ts.parsePesType(o,t.table),l=h.ts.parsePayloadUnitStartIndicator(o),"audio"===c&&l&&(a=h.ts.parsePesTime(o))&&(a.type="audio",n.audio.push(a),r=!0)}if(r)break;i-=R,s-=R}}function Rl(e,t,n){for(var s,r,l,d,u,m,f,p,o=0,i=R,c=!1,a={data:[],size:0};i<e.byteLength;)if(71!==e[o]||71!==e[i])o++,i++;else{switch(s=e.subarray(o,i),h.ts.parseType(s,t.pid)){case"pes":if(d=h.ts.parsePesType(s,t.table),l=h.ts.parsePayloadUnitStartIndicator(s),"video"===d&&(l&&!c&&(r=h.ts.parsePesTime(s))&&(r.type="video",n.video.push(r),c=!0),!n.firstKeyFrame)){if(l&&0!==a.size){for(u=new Uint8Array(a.size),m=0;a.data.length;)f=a.data.shift(),u.set(f,m),m+=f.byteLength;h.ts.videoPacketContainsKeyFrame(u)&&(p=h.ts.parsePesTime(u),p&&(n.firstKeyFrame=p,n.firstKeyFrame.type="video")),a.size=0}a.data.push(s),a.size+=s.byteLength}}if(c&&n.firstKeyFrame)break;o+=R,i+=R}for(o=(i=e.byteLength)-R,c=!1;0<=o;)if(71!==e[o]||71!==e[i])o--,i--;else{switch(s=e.subarray(o,i),h.ts.parseType(s,t.pid)){case"pes":d=h.ts.parsePesType(s,t.table),l=h.ts.parsePayloadUnitStartIndicator(s),"video"===d&&l&&(r=h.ts.parsePesTime(s))&&(r.type="video",n.video.push(r),c=!0)}if(c)break;o-=R,i-=R}}function Ll(e){var s,n={pid:null,table:null},t={};for(s in function(e,t){for(var s,o=0,n=R;n<e.byteLength;)if(71!==e[o]||71!==e[n])o++,n++;else{switch(s=e.subarray(o,n),h.ts.parseType(s,t.pid)){case"pat":t.pid||(t.pid=h.ts.parsePat(s));break;case"pmt":t.table||(t.table=h.ts.parsePmt(s))}if(t.pid&&t.table)return;o+=R,n+=R}}(e,n),n.table)if(n.table.hasOwnProperty(s))switch(n.table[s]){case Dc:t.video=[],Rl(e,n,t),0===t.video.length&&delete t.video;break;case Nc:t.audio=[],Pl(e,n,t),0===t.audio.length&&delete t.audio}return t}var al,Fe=Qc,R=188,zl=function(e,t){var n;return(n=h.aac.isLikelyAacData(e)?function(e){for(var i,c,o=!1,r=0,a=null,n=null,s=0,t=0;3<=e.length-t;){switch(h.aac.parseType(e,t)){case"timed-metadata":if(e.length-t<10){o=!0;break}if((s=h.aac.parseId3TagSize(e,t))>e.length){o=!0;break}null===n&&(i=e.subarray(t,t+s),n=h.aac.parseAacTimestamp(i)),t+=s;break;case"audio":if(e.length-t<7){o=!0;break}if((s=h.aac.parseAdtsSize(e,t))>e.length){o=!0;break}null===a&&(i=e.subarray(t,t+s),a=h.aac.parseSampleRate(i)),r++,t+=s;break;default:t++}if(o)return null}return null===a||null===n?null:(c=Fe/a,{audio:[{type:"audio",dts:n,pts:n},{type:"audio",dts:n+1024*r*c,pts:n+1024*r*c}]})}(e):Ll(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n,s,o=t;"undefined"!=typeof o&&!isNaN(o)||(o=e.audio[0].dts),e.audio.forEach(function(e){e.dts=Je(e.dts,o),e.pts=Je(e.pts,o),e.dtsTime=e.dts/Fe,e.ptsTime=e.pts/Fe})}e.video&&e.video.length&&(s=t,("undefined"!=typeof s&&!isNaN(s)||(s=e.video[0].dts),e.video.forEach(function(e){e.dts=Je(e.dts,s),e.pts=Je(e.pts,s),e.dtsTime=e.dts/Fe,e.ptsTime=e.pts/Fe}),e.firstKeyFrame)&&(n=e.firstKeyFrame,n.dts=Je(n.dts,s),n.pts=Je(n.pts,s),n.dtsTime=n.dts/Fe,n.ptsTime=n.pts/Fe))}(n,t),n):null},ci=function(e){return e>>>0},qt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Tl=ci,se=function e(t,n){var s,o,a,r,c,i=[];if(!n.length)return null;for(s=0;s<t.byteLength;)a=Tl(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]),r=qt(t.subarray(s+4,s+8)),o=1<a?s+a:t.byteLength,r===n[0]&&(1===n.length?i.push(t.subarray(s+8,o)):(c=e(t.subarray(s+8,o),n.slice(1))).length&&(i=i.concat(c))),s=o;return i},y1=function(e){var n,s=new DataView(e.buffer,e.byteOffset,e.byteLength),t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:s.getUint32(4)},o=1&t.flags[2],i=2&t.flags[2],a=8&t.flags[2],r=16&t.flags[2],c=32&t.flags[2],l=65536&t.flags[0],d=131072&t.flags[0];return n=8,o&&(n+=4,t.baseDataOffset=s.getUint32(12),n+=4),i&&(t.sampleDescriptionIndex=s.getUint32(n),n+=4),a&&(t.defaultSampleDuration=s.getUint32(n),n+=4),r&&(t.defaultSampleSize=s.getUint32(n),n+=4),c&&(t.defaultSampleFlags=s.getUint32(n)),l&&(t.durationIsEmpty=!0),!o&&d&&(t.baseDataOffsetIsMoof=!0),t},pl=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},j1=function(e){var n,s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},o=new DataView(e.buffer,e.byteOffset,e.byteLength),l=1&s.flags[2],d=4&s.flags[2],a=1&s.flags[1],r=2&s.flags[1],u=4&s.flags[1],c=8&s.flags[1],i=o.getUint32(4),t=8;for(l&&(s.dataOffset=o.getInt32(t),t+=4),d&&i&&(n={flags:pl(e.subarray(t,t+4))},t+=4,a&&(n.duration=o.getUint32(t),t+=4),r&&(n.size=o.getUint32(t),t+=4),c&&(1===s.version?n.compositionTimeOffset=o.getInt32(t):n.compositionTimeOffset=o.getUint32(t),t+=4),s.samples.push(n),i--);i--;)n={},a&&(n.duration=o.getUint32(t),t+=4),r&&(n.size=o.getUint32(t),t+=4),u&&(n.flags=pl(e.subarray(t,t+4)),t+=4),c&&(1===s.version?n.compositionTimeOffset=o.getInt32(t):n.compositionTimeOffset=o.getUint32(t),t+=4),s.samples.push(n);return s},vl=ci,b1=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:vl(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=vl(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},Cn=ci,gt=function(e){return("00"+e.toString(16)).slice(-2)},Nl=function(e,t){var n,s,o;return s=se(t,["moof","traf"]),o=[].concat.apply([],s.map(function(t){return se(t,["tfhd"]).map(function(n){var s,o,i;return o=Cn(n[4]<<24|n[5]<<16|n[6]<<8|n[7]),i=e[o]||9e4,(s="number"!=typeof(s=se(t,["tfdt"]).map(function(e){var t,n;return n=e[0],t=Cn(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===n&&(t*=Math.pow(2,32),t+=Cn(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t})[0])||isNaN(s)?1/0:s)/i})})),n=Math.min.apply(null,o),isFinite(n)?n:0},Dl=function(e){var n=se(e,["moov","trak"]),t=[];return n.forEach(function(e){var s,i,a,r,c,l,d,u,h,n={},o=se(e,["tkhd"])[0];o&&(h=(r=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0),n.id=0===h?r.getUint32(12):r.getUint32(20)),c=se(e,["mdia","hdlr"])[0],c&&(i=qt(c.subarray(8,12)),n.type="vide"===i?"video":"soun"===i?"audio":i),l=se(e,["mdia","minf","stbl","stsd"])[0],l&&(d=l.subarray(8),n.codec=qt(d.subarray(4,8)),a=se(d,[n.codec])[0],a&&(/^[a-z]vc[1-9]$/i.test(n.codec)?(s=a.subarray(78),"avcC"===qt(s.subarray(4,8))&&11<s.length?(n.codec+=".",n.codec+=gt(s[9]),n.codec+=gt(s[10]),n.codec+=gt(s[11])):n.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(n.codec)?(s=a.subarray(28),"esds"===qt(s.subarray(4,8))&&20<s.length&&0!==s[19]?(n.codec+="."+gt(s[19]),n.codec+="."+gt(s[20]>>>2&63).replace(/^0/,"")):n.codec="mp4a.40.2"):n.codec=n.codec.toLowerCase())),u=se(e,["mdia","mdhd"])[0],u&&(n.timescale=al(u)),t.push(n)}),t};function _l(e){return e&&e.replace(/avc1\.(\d+)\.(\d+)/i,function(e,t,n){return"avc1."+("00"+Number(t).toString(16)).slice(-2)+"00"+("00"+Number(n).toString(16)).slice(-2)})}function oe(e){void 0===e&&(e="");var n=e.split(","),t=[];return n.forEach(function(e){var n;e=e.trim(),Gd.forEach(function(s){if(o=me[s].exec(e.toLowerCase()),o&&!(o.length<=1)){n=s;var o,i=e.substring(0,o[1].length),a=e.replace(i,"");t.push({type:i,details:a,mediaType:s})}}),n||t.push({type:e,details:"",mediaType:"unknown"})}),t}function Ol(e){return void 0===e&&(e=""),me.audio.test(e.trim().toLowerCase())}function Ts(e){if(e&&"string"==typeof e){var n,t=e.toLowerCase().split(",").map(function(e){return _l(e.trim())}),s="video";return 1===t.length&&Ol(t[0])?s="audio":1===t.length&&function(e){return void 0===e&&(e=""),me.text.test(e.trim().toLowerCase())}(t[0])&&(s="application"),n="mp4",t.every(function(e){return me.mp4.test(e)})?n="mp4":t.every(function(e){return me.webm.test(e)})?n="webm":t.every(function(e){return me.ogg.test(e)})&&(n="ogg"),s+"/"+n+';codecs="'+e+'"'}}function es(e){return void 0===e&&(e=""),fe.MediaSource&&fe.MediaSource.isTypeSupported&&fe.MediaSource.isTypeSupported(Ts(e))||!1}function Ro(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every(function(e){e=e.trim();for(var t=0;t<Bi.length;t++)if(me["muxer"+Bi[t]].test(e))return!0;return!1})}function bn(e,t,n){return e&&n&&n.responseURL&&t!==n.responseURL?n.responseURL:t}function J(t){return e.log.debug?e.log.debug.bind(e,"VHS:",t+" >"):function(){}}function li(e,t){return e+"-"+t}function Ml(e){var n=e.onwarn,s=e.oninfo,a=e.manifestString,o=e.customTagParsers,r=void 0===o?[]:o,i=e.customTagMappers,c=void 0===i?[]:i,t=new Xd;return n&&t.on("warn",n),s&&t.on("info",s),r.forEach(function(e){return t.addParser(e)}),c.forEach(function(e){return t.addTagMapper(e)}),t.push(a),t.end(),t.manifest}function Jn(e,t){["AUDIO","SUBTITLES"].forEach(function(n){for(s in e.mediaGroups[n])for(o in e.mediaGroups[n][s]){var s,o,i=e.mediaGroups[n][s][o];t(i,n,s,o)}})}function bl(e){var t=e.playlist,n=e.uri,s=e.id;t.id=s,n&&(t.uri=n),t.attributes=t.attributes||{}}function gl(e,t){e.uri=t;for(var s,n=0;n<e.playlists.length;n++)e.playlists[n].uri||(s="placeholder-uri-"+n,e.playlists[n].uri=s);Jn(e,function(t,n,s,o){if(t.playlists&&t.playlists.length&&!t.playlists[0].uri){var i="placeholder-uri-"+n+"-"+s+"-"+o,a=li(0,i);t.playlists[0].uri=i,t.playlists[0].id=a,e.playlists[a]=t.playlists[0],e.playlists[i]=t.playlists[0]}}),function(e){for(var t,n=e.playlists.length;n--;)t=e.playlists[n],bl({playlist:t,id:li(n,t.uri)}),t.resolvedUri=Oe(e.uri,t.uri),e.playlists[t.id]=t,(e.playlists[t.uri]=t).attributes.BANDWIDTH||Jd.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}(e),function(e){Jn(e,function(t){t.uri&&(t.resolvedUri=Oe(e.uri,t.uri))})}(e)}function fl(e,t){e.resolvedUri||(e.resolvedUri=Oe(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=Oe(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=Oe(t,e.map.uri))}function hl(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence}function Vs(e,t,n){void 0===n&&(n=hl);var o,a,s=Bo(e,{}),i=s.playlists[t.id];if(!i)return null;if(n(i,t))return null;o=Bo(i,t),i.segments&&(o.segments=function(e,t,n){o=t.slice(),n=n||0;for(var o,i=Math.min(e.length,t.length+n),s=n;s<i;s++)o[s-n]=Bo(e[s],o[s-n]);return o}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),o.segments.forEach(function(e){fl(e,o.resolvedUri)});for(a=0;a<s.playlists.length;a++)s.playlists[a].id===t.id&&(s.playlists[a]=o);return s.playlists[t.id]=o,s.playlists[t.uri]=o,s}function il(e,t){var n=e.segments[e.segments.length-1];return t&&n&&n.duration?1e3*n.duration:500*(e.targetDuration||10)}function ol(t,n){var s,o=[];if(t&&t.length)for(s=0;s<t.length;s++)n(t.start(s),t.end(s))&&o.push([t.start(s),t.end(s)]);return e.createTimeRanges(o)}function wt(e,t){return ol(e,function(e,n){return e-.1<=t&&t<=n+.1})}function ws(e,t){return ol(e,function(e){return t<=e-Ue})}function tl(e){var t,n=[];if(!e||!e.length)return"";for(t=0;t<e.length;t++)n.push(e.start(t)+" => "+e.end(t));return n.join(", ")}function _e(e){for(var n=[],t=0;t<e.length;t++)n.push({start:e.start(t),end:e.end(t)});return n}function Gc(e,t,n){if("undefined"==typeof t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var o,s=function(e,t){var s=0,o=t-e.mediaSequence,n=e.segments[o];if(n){if("undefined"!=typeof n.start)return{result:n.start,precise:!0};if("undefined"!=typeof n.end)return{result:n.end-n.duration,precise:!0}}for(;o--;){if("undefined"!=typeof(n=e.segments[o]).end)return{result:s+n.end,precise:!0};if(s+=n.duration,"undefined"!=typeof n.start)return{result:s+n.start,precise:!0}}return{result:s,precise:!1}}(e,t);return s.precise?s.result:(o=function(e,t){for(var n,s=0,o=t-e.mediaSequence;o<e.segments.length;o++){if("undefined"!=typeof(n=e.segments[o]).start)return{result:n.start-s,precise:!0};if(s+=n.duration,"undefined"!=typeof n.end)return{result:n.end-s,precise:!0}}return{result:-1,precise:!1}}(e,t),o.precise?o.result:s.result+n)}function Yc(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),"undefined"==typeof t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return o.Infinity}return Gc(e,t,n)}function Jt(e,t,n){var s,i,a,o=0;if(n<t&&(i=[n,t],t=i[0],n=i[1]),t<0){for(a=t;a<Math.min(0,n);a++)o+=e.targetDuration;t=0}for(s=t;s<n;s++)o+=e.segments[s].duration;return o}function Kc(e,t){if(!e.segments.length)return 0;var o,n=e.segments.length,i=e.segments[n-1].duration||e.targetDuration,s="number"==typeof t?t:i+2*e.targetDuration;if(0===s)return n;for(o=0;n--&&!(s<=(o+=e.segments[n].duration)););return Math.max(0,n)}function Uc(e,t,n,s){if(!e||!e.segments)return null;if(e.endList)return Yc(e);if(null===t)return null;t=t||0;var o=n?Kc(e,s):e.segments.length;return Gc(e,e.mediaSequence+o,t)}function Wc(e){return e.excludeUntil&&e.excludeUntil>Date.now()}function Xo(e){return e.excludeUntil&&e.excludeUntil===1/0}function hn(e){var t=Wc(e);return!e.disabled&&!t}function zc(e,t){return t.attributes&&t.attributes[e]}function ji(e,t){if(1===e.playlists.length)return!0;var n=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter(function(e){return!!hn(e)&&(e.attributes.BANDWIDTH||0)<n}).length}function mi(e,t,n,s){var o="arraybuffer"===e.responseType?e.response:e.responseText;!t&&o&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=o.byteLength||o.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),n.headers&&(e.responseHeaders=n.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===n.statusCode||206===n.statusCode||0===n.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(o||e.responseText)))),s(t,e)}function xc(){function t(n,s){n=au({timeout:45e3},n),i=t.beforeRequest||e.Vhs.xhr.beforeRequest,i&&"function"==typeof i&&(a=i(n),a&&(n=a));var i,a,o=(!0===e.Vhs.xhr.original?iu:e.Vhs.xhr)(n,function(e,t){return mi(o,e,t,s)}),r=o.abort;return o.abort=function(){return o.aborted=!0,r.apply(o,arguments)},o.uri=n.uri,o.requestTime=Date.now(),o}return t.original=!0,t}function Ho(e){var t={};return e.byterange&&(t.Range=function(e){var t=e.offset+e.length-1;return"bytes="+e.offset+"-"+t}(e.byterange)),t}function Jl(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")}function ed(e){return 32<=e&&e<126?String.fromCharCode(e):"."}function bc(e){var t={};return Object.keys(e).forEach(function(n){var s=e[n];ArrayBuffer.isView(s)?t[n]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[n]=s}),t}function zn(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")}function mc(e){return e.resolvedUri}function hc(e){for(var n=Array.prototype.slice.call(e),s="",t=0;t<n.length/16;t++)s+=n.slice(16*t,16*t+16).map(Jl).join("")+" "+n.slice(16*t,16*t+16).map(ed).join("")+`
`;return s}function id(e){var n,o,i,a=e.playlist,r=e.time,s=void 0===r?void 0:r,t=e.callback;if(!t)throw new Error("getProgramTime: callback must be provided");return!a||void 0===s?t({message:"getProgramTime: playlist and time must be provided"}):(n=function(e,t){if(!t||!t.segments||0===t.segments.length)return null;for(var n,o,s=0,i=0;i<t.segments.length&&!(e<=(s=(n=t.segments[i]).videoTimingInfo?n.videoTimingInfo.transmuxedPresentationEnd:s+n.duration));i++);if(o=t.segments[t.segments.length-1],o.videoTimingInfo&&o.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(s<e){if(e>s+.25*o.duration)return null;n=o}return{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:s-n.duration,type:n.videoTimingInfo?"accurate":"estimate"}}(s,a),n?"estimate"===n.type?t({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart}):(o={mediaSeconds:s},i=function(e,t){if(!t.dateTimeObject)return null;var n=t.videoTimingInfo.transmuxerPrependedSeconds,s=e-(t.videoTimingInfo.transmuxedPresentationStart+n);return new Date(t.dateTimeObject.getTime()+1e3*s)}(s,n.segment),i&&(o.programDateTime=i.toISOString()),t(null,o)):t({message:"valid programTime was not found"}))}function uc(e){var i,r,c,m,s=e.programTime,n=e.playlist,h=e.retryCount,l=void 0===h?2:h,a=e.seekTo,u=e.pauseAfterSeek,d=void 0===u||u,o=e.tech,t=e.callback;if(!t)throw new Error("seekToProgramTime: callback must be provided");if("undefined"==typeof s||!n||!a)return t({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!n.endList&&!o.hasStarted_)return t({message:"player must be playing a live stream to start buffering"});if(!function(e){if(!e.segments||0===e.segments.length)return!1;for(var t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0}(n))return t({message:"programDateTime tags must be provided in the manifest "+n.resolvedUri});if(i=function(e,t){try{o=new Date(e)}catch{return null}if(!t||!t.segments||0===t.segments.length)return null;if(n=t.segments[0],o<n.dateTimeObject)return null;for(i=0;i<t.segments.length-1;i++)if(n=t.segments[i],o<t.segments[i+1].dateTimeObject)break;var n,o,i,s=t.segments[t.segments.length-1],a=s.dateTimeObject,r=s.videoTimingInfo?function(e){return e.transmuxedPresentationEnd-e.transmuxedPresentationStart-e.transmuxerPrependedSeconds}(s.videoTimingInfo):s.duration+.25*s.duration;return new Date(a.getTime()+1e3*r)<o?null:(a<o&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:B.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})}(s,n),!i)return t({message:s+" was not found in the stream"});if(c=i.segment,r=function(e,t){try{n=new Date(e),s=new Date(t)}catch{}var n,s,o=n.getTime();return(s.getTime()-o)/1e3}(c.dateTimeObject,s),"estimate"===i.type)return 0===l?t({message:s+" is not buffered yet. Try again"}):(a(i.estimatedStart+r),void o.one("seeked",function(){uc({programTime:s,playlist:n,retryCount:l-1,seekTo:a,pauseAfterSeek:d,tech:o,callback:t})}));m=c.start+r,o.one("seeked",function(){return t(null,o.currentTime())}),d&&o.pause(),a(m)}function ao(e,t){if(4===e.readyState)return t()}function cd(e,t,n){function o(e,t,s,o){return t.abort(),c=!0,n(e,t,s,o)}function a(e,t){if(!c){if(e)return o(e,t,"",s);var n,a=t.responseText.substring(s&&s.byteLength||0,t.responseText.length);return s=function(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];if((e=e.filter(function(e){return e&&(e.byteLength||e.length)&&"string"!=typeof e})).length<=1)return r(e[0]);var i=e.reduce(function(e,t){return e+(t.byteLength||t.length)},0),s=new Uint8Array(i),o=0;return e.forEach(function(e){e=r(e),s.set(e,o),o+=e.byteLength}),s}(s,Kr(a,!0)),i=i||tt(s),s.length<10||i&&s.length<i+2?ao(t,function(){return o(e,t,"",s)}):(n=vo(s),"ts"===n&&s.length<188?ao(t,function(){return o(e,t,"",s)}):!n&&s.length<376?ao(t,function(){return o(e,t,"",s)}):o(null,t,n,s))}}var i,s=[],c=!1,l=t({uri:e,beforeSend:function(e){e.overrideMimeType("text/plain; charset=x-user-defined"),e.addEventListener("progress",function(t){return t.total,t.loaded,mi(e,null,{statusCode:e.status},a)})}},function(e,t){return mi(l,e,t,a)});return l}function lc(e,t){if(!hl(e,t))return!1;if(e.sidx&&t.sidx&&(e.sidx.offset!==t.sidx.offset||e.sidx.length!==t.sidx.length))return!1;if(!e.sidx&&t.sidx||e.sidx&&!t.sidx)return!1;if(e.segments&&!t.segments||!e.segments&&t.segments)return!1;if(!e.segments&&!t.segments)return!0;for(n=0;n<e.segments.length;n++){var n,s,o,i=e.segments[n],a=t.segments[n];if(i.uri!==a.uri)return!1;if(i.byterange||a.byterange){if(s=i.byterange,o=a.byterange,s&&!o||!s&&o)return!1;if(s.offset!==o.offset||s.length!==o.length)return!1}}return!0}function so(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t}function rc(e,t){var n,s,o,i,r,c,a={};for(c in e)if(i=e[c].sidx,i){if(o=so(i),!t[o])break;r=t[o].sidxInfo,n=r,s=i,(Boolean(!n.map&&!s.map)||Boolean(n.map&&s.map&&n.map.byterange.offset===s.map.byterange.offset&&n.map.byterange.length===s.map.byterange.length))&&n.uri===s.uri&&n.byterange.offset===s.byterange.offset&&n.byterange.length===s.byterange.length&&(a[o]=t[o])}return a}function ac(e){for(var n=new Uint8Array(new ArrayBuffer(e.length)),t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return n.buffer}function ic(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e}function tc(e){return function(){var s,n=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch{var t=new BlobBuilder;return t.append(e),URL.createObjectURL(t.getBlob())}}(e),t=ic(new Worker(n));return t.objURL=n,s=t.terminate,t.on=t.addEventListener,t.off=t.removeEventListener,t.terminate=function(){return URL.revokeObjectURL(n),s.call(this)},t}}function Ur(e){return"var browserWorkerPolyFill = "+ic.toString()+`;
browserWorkerPolyFill(self);
`+e}function $r(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)}function Vr(e){var s,d,t=e.transmuxer,n=e.bytes,a=e.audioAppendStart,r=e.gopsToAlignWith,c=e.isPartial,l=e.remux,_=e.onData,y=e.onTrackInfo,j=e.onAudioTimingInfo,b=e.onVideoTimingInfo,h=e.onVideoSegmentTimingInfo,v=e.onAudioSegmentTimingInfo,m=e.onId3,f=e.onCaptions,p=e.onDone,g=e.onEndedTimeline,i=e.isEndOfTimeline,o={isPartial:c,buffer:[]},u=i;(t.onmessage=function(n){t.currentTransmux===e&&("data"===n.data.action&&function(e,t,n){var o,i,s=e.data.segment,l=s.type,a=s.initSegment,d=s.captions,u=s.captionStreams,h=s.metadata,r=s.videoFrameDtsTime,c=s.videoFramePtsTime;t.buffer.push({captions:d,captionStreams:u,metadata:h}),o=e.data.segment.boxes||{data:e.data.segment.data},i={type:l,data:new Uint8Array(o.data,o.data.byteOffset,o.data.byteLength),initSegment:new Uint8Array(a.data,a.byteOffset,a.byteLength)},"undefined"!=typeof r&&(i.videoFrameDtsTime=r),"undefined"!=typeof c&&(i.videoFramePtsTime=c),n(i)}(n,o,_),"trackinfo"===n.data.action&&y(n.data.trackInfo),"gopInfo"===n.data.action&&function(e,t){t.gopInfo=e.data.gopInfo}(n,o),"audioTimingInfo"===n.data.action&&j(n.data.audioTimingInfo),"videoTimingInfo"===n.data.action&&b(n.data.videoTimingInfo),"videoSegmentTimingInfo"===n.data.action&&h(n.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===n.data.action&&v(n.data.audioSegmentTimingInfo),"id3Frame"===n.data.action&&m([n.data.id3Frame],n.data.id3Frame.dispatchType),"caption"===n.data.action&&f(n.data.caption),"endedtimeline"===n.data.action&&(u=!1,g()),"transmuxed"===n.data.type&&(u||(t.onmessage=null,function(e){var t=e.transmuxedData,n=e.callback;t.buffer=[],n(t)}({transmuxedData:o,callback:p}),Pa(t))))},a&&t.postMessage({action:"setAudioAppendStart",appendStart:a}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),"undefined"!=typeof l&&t.postMessage({action:"setRemux",remux:l}),n.byteLength)&&(s=n instanceof ArrayBuffer?n:n.buffer,d=n instanceof ArrayBuffer?0:n.byteOffset,t.postMessage({action:"push",data:s,byteOffset:d,byteLength:n.byteLength},[s])),t.postMessage({action:c?"partialFlush":"flush"}),i&&t.postMessage({action:"endTimeline"})}function Ir(e,t){e.postMessage({action:t}),Pa(e)}function jd(e,t){if(!t.currentTransmux)return t.currentTransmux=e,void Ir(t,e);t.transmuxQueue.push(Ir.bind(null,t,e))}function yd(e){if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void Vr(e);e.transmuxer.transmuxQueue.push(e)}function Hr(e){e.forEach(function(e){e.abort()})}function ai(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Ws,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:to,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Tt,xhr:t}:null}function Od(e){var n,t=e.segment,h=e.bytes,r=e.isPartial,i=e.trackInfoFn,a=e.timingInfoFn,f=e.videoSegmentTimingInfoFn,y=e.audioSegmentTimingInfoFn,j=e.id3Fn,b=e.captionsFn,v=e.isEndOfTimeline,g=e.endedTimelineFn,p=e.dataFn,m=e.doneFn,l=t.map&&t.map.tracks||{},c=Boolean(l.audio&&l.video),s=a.bind(null,t,"audio","start"),u=a.bind(null,t,"audio","end"),o=a.bind(null,t,"video","start"),d=a.bind(null,t,"video","end");!r&&!t.lastReachedChar&&(n=function(e,t){var s,o="number"!=typeof t||isNaN(t)?void 0:t*Pt,n=zl(e,o);return n?(s={hasVideo:n.video&&2===n.video.length||!1,hasAudio:n.audio&&2===n.audio.length||!1},s.hasVideo&&(s.videoStart=n.video[0].ptsTime),s.hasAudio&&(s.audioStart=n.audio[0].ptsTime),s):null}(h,t.baseStartTime),n&&(i(t,{hasAudio:n.hasAudio,hasVideo:n.hasVideo,isMuxed:c}),i=null,n.hasAudio&&!c&&s(n.audioStart),n.hasVideo&&o(n.videoStart),o=s=null)),yd({bytes:h,transmuxer:t.transmuxer,audioAppendStart:t.audioAppendStart,gopsToAlignWith:t.gopsToAlignWith,isPartial:r,remux:c,onData:function(e){e.type="combined"===e.type?"video":e.type,p(t,e)},onTrackInfo:function(e){i&&(c&&(e.isMuxed=!0),i(t,e))},onAudioTimingInfo:function(e){s&&"undefined"!=typeof e.start&&(s(e.start),s=null),u&&"undefined"!=typeof e.end&&u(e.end)},onVideoTimingInfo:function(e){o&&"undefined"!=typeof e.start&&(o(e.start),o=null),d&&"undefined"!=typeof e.end&&d(e.end)},onVideoSegmentTimingInfo:function(e){f(e)},onAudioSegmentTimingInfo:function(e){y(e)},onId3:function(e,n){j(t,e,n)},onCaptions:function(e){b(t,[e])},isEndOfTimeline:v&&!r,onEndedTimeline:function(){g()},onDone:function(e){m&&!r&&(e.type="combined"===e.type?"video":e.type,m(null,t,e))}})}function hi(e){var n,o,a,c,l,f,t=e.segment,s=e.bytes,y=e.isPartial,d=e.trackInfoFn,r=e.timingInfoFn,p=e.videoSegmentTimingInfoFn,j=e.audioSegmentTimingInfoFn,b=e.id3Fn,h=e.captionsFn,v=e.isEndOfTimeline,g=e.endedTimelineFn,m=e.dataFn,i=e.doneFn,u=new Uint8Array(s);if(Fc(u))return t.isFmp4=!0,n=t.map.tracks,o={isFmp4:!0,hasVideo:!!n.video,hasAudio:!!n.audio},n.audio&&n.audio.codec&&"enca"!==n.audio.codec&&(o.audioCodec=n.audio.codec),n.video&&n.video.codec&&"encv"!==n.video.codec&&(o.videoCodec=n.video.codec),n.video&&n.audio&&(o.isMuxed=!0),d(t,o),l=Kd(t.map.timescales,u),o.hasAudio&&!o.isMuxed&&r(t,"audio","start",l),o.hasVideo&&r(t,"video","start",l),c=function(e){m(t,{data:s,type:o.hasAudio&&!o.isMuxed?"audio":"video"}),e&&e.length&&h(t,e),i(null,t,{})},!n.video||!s.byteLength||!t.transmuxer?void c():(a=s instanceof ArrayBuffer?s:s.buffer,f=s instanceof ArrayBuffer?0:s.byteOffset,t.transmuxer.addEventListener("message",function e(n){if("mp4Captions"===n.data.action){t.transmuxer.removeEventListener("message",e);var o=n.data.data;t.bytes=s=new Uint8Array(o,o.byteOffset||0,o.byteLength),c(n.data.captions)}}),void t.transmuxer.postMessage({action:"pushMp4Captions",timescales:t.map.timescales,trackIds:[n.video.id],data:a,byteOffset:f,byteLength:s.byteLength},[a]));if(t.transmuxer){if("undefined"==typeof t.container&&(t.container=vo(u)),"ts"!==t.container&&"aac"!==t.container)return d(t,{hasAudio:!1,hasVideo:!1}),void i(null,t,{});Od({segment:t,bytes:s,isPartial:y,trackInfoFn:d,timingInfoFn:r,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:j,id3Fn:b,captionsFn:h,isEndOfTimeline:v,endedTimelineFn:g,dataFn:m,doneFn:i})}else i(null,t,{})}function Cd(e){var r=e.activeXhrs,m=e.decryptionWorker,s=e.trackInfoFn,o=e.timingInfoFn,i=e.videoSegmentTimingInfoFn,a=e.audioSegmentTimingInfoFn,n=e.id3Fn,c=e.captionsFn,l=e.isEndOfTimeline,d=e.endedTimelineFn,u=e.dataFn,t=e.doneFn,f=0,h=!1;return function(e,p){if(!h){if(e)return h=!0,Hr(r),t(e,p);if((f+=1)===r.length){if(p.endOfAllRequests=Date.now(),p.encryptedBytes)return function(e){var n,s=e.decryptionWorker,t=e.segment,r=e.trackInfoFn,i=e.timingInfoFn,a=e.videoSegmentTimingInfoFn,o=e.audioSegmentTimingInfoFn,c=e.id3Fn,l=e.captionsFn,d=e.isEndOfTimeline,u=e.endedTimelineFn,h=e.dataFn,m=e.doneFn;s.addEventListener("message",function e(n){if(n.data.source===t.requestId){s.removeEventListener("message",e);var f=n.data.decrypted;t.bytes=new Uint8Array(f.bytes,f.byteOffset,f.byteLength),hi({segment:t,bytes:t.bytes,isPartial:!1,trackInfoFn:r,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:o,id3Fn:c,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:u,dataFn:h,doneFn:m})}}),n=t.key.bytes.slice?t.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.key.bytes)),s.postMessage(bc({source:t.requestId,encrypted:t.encryptedBytes,key:n,iv:t.key.iv}),[t.encryptedBytes.buffer,n.buffer])}({decryptionWorker:m,segment:p,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:a,id3Fn:n,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:t});hi({segment:p,bytes:p.bytes,isPartial:!1,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:a,id3Fn:n,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:t})}}}}function Ed(t){var n=t.segment,s=t.progressFn,o=t.trackInfoFn,i=t.timingInfoFn,a=t.videoSegmentTimingInfoFn,r=t.audioSegmentTimingInfoFn,c=t.id3Fn,l=t.captionsFn,d=t.isEndOfTimeline,u=t.endedTimelineFn,h=t.dataFn,m=t.handlePartialData;return function(t){var p,f=t.target;if(!f.aborted)return m&&!n.key&&f.responseText&&8<=f.responseText.length&&(p=ac(f.responseText.substring(n.lastReachedChar||0)),!n.lastReachedChar&&Fc(new Uint8Array(p))||(n.lastReachedChar=f.responseText.length,hi({segment:n,bytes:p,isPartial:!0,trackInfoFn:o,timingInfoFn:i,videoSegmentTimingInfoFn:a,audioSegmentTimingInfoFn:r,id3Fn:c,captionsFn:l,isEndOfTimeline:d,endedTimelineFn:u,dataFn:h}))),n.stats=e.mergeOptions(n.stats,function(e){var n=e.target,t={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-n.requestTime||0};return t.bytesReceived=e.loaded,t.bandwidth=Math.floor(t.bytesReceived/t.roundTripTime*8*1e3),t}(t)),!n.stats.firstBytesReceivedAt&&n.stats.bytesReceived&&(n.stats.firstBytesReceivedAt=Date.now()),s(t,n)}}function kd(t){var o,a,v,y,_,c=t.xhr,i=t.xhrOptions,x=t.decryptionWorker,n=t.segment,O=t.abortFn,w=t.progressFn,l=t.trackInfoFn,j=t.timingInfoFn,b=t.videoSegmentTimingInfoFn,u=t.audioSegmentTimingInfoFn,h=t.id3Fn,m=t.captionsFn,f=t.isEndOfTimeline,p=t.endedTimelineFn,g=t.dataFn,C=t.doneFn,d=t.handlePartialData,s=[],r=Cd({activeXhrs:s,decryptionWorker:x,trackInfoFn:l,timingInfoFn:j,videoSegmentTimingInfoFn:b,audioSegmentTimingInfoFn:u,id3Fn:h,captionsFn:m,isEndOfTimeline:f,endedTimelineFn:p,dataFn:g,doneFn:C});return n.key&&!n.key.bytes&&(_=c(e.mergeOptions(i,{uri:n.key.resolvedUri,responseType:"arraybuffer"}),function(e,t){return function(n,s){var o,i=s.response,a=ai(n,s);return a?t(a,e):16!==i.byteLength?t({status:s.status,message:"Invalid HLS key at URL: "+s.uri,code:Tt,xhr:s},e):(o=new DataView(i),e.key.bytes=new Uint32Array([o.getUint32(0),o.getUint32(4),o.getUint32(8),o.getUint32(12)]),t(null,e))}}(n,r)),s.push(_)),n.map&&!n.map.bytes&&(y=c(e.mergeOptions(i,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Ho(n.map)}),function(e){var t=e.segment,n=e.finishProcessingFn;return function(e,s){var o,a=s.response,i=ai(e,s);return i?n(i,t):0===a.byteLength?n({status:s.status,message:"Empty HLS segment content at URL: "+s.uri,code:Tt,xhr:s},t):(t.map.bytes=new Uint8Array(s.response),o=vo(t.map.bytes),"mp4"!==o?n({status:s.status,message:"Found unsupported "+(o||"unknown")+" container for initialization segment at URL: "+s.uri,code:Tt,internal:!0,xhr:s},t):(qd(t.map.bytes).forEach(function(e){t.map.tracks=t.map.tracks||{},t.map.tracks[e.type]||"number"==typeof(t.map.tracks[e.type]=e).id&&e.timescale&&(t.map.timescales=t.map.timescales||{},t.map.timescales[e.id]=e.timescale)}),n(null,t)))}}({segment:n,finishProcessingFn:r})),s.push(y)),o=e.mergeOptions(i,{uri:n.resolvedUri,responseType:"arraybuffer",headers:Ho(n)}),d&&(o.responseType="text",o.beforeSend=function(e){e.overrideMimeType("text/plain; charset=x-user-defined")}),a=c(o,function(e){var t=e.segment,n=e.finishProcessingFn,s=e.responseType;return function(e,o){var i,r=o.response,a=ai(e,o);return a?n(a,t):(i="arraybuffer"!==s&&o.responseText?ac(o.responseText.substring(t.lastReachedChar||0)):o.response,0===r.byteLength?n({status:o.status,message:"Empty HLS segment content at URL: "+o.uri,code:Tt,xhr:o},t):(t.stats=function(e){return{bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}}(o),t.key?t.encryptedBytes=new Uint8Array(i):t.bytes=new Uint8Array(i),n(null,t)))}}({segment:n,finishProcessingFn:r,responseType:o.responseType})),a.addEventListener("progress",Ed({segment:n,progressFn:w,trackInfoFn:l,timingInfoFn:j,videoSegmentTimingInfoFn:b,audioSegmentTimingInfoFn:u,id3Fn:h,captionsFn:m,isEndOfTimeline:f,endedTimelineFn:p,dataFn:g,handlePartialData:d})),s.push(a),v={},s.forEach(function(e){e.addEventListener("loadend",function(e){var t=e.loadendState,n=e.abortFn;return function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}}({loadendState:v,abortFn:O}))}),function(){return Hr(s)}}function Mr(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]}function fi(e){var t={};return e.forEach(function(e){var n=e.mediaType,s=e.type,o=e.details;t[n]=t[n]||[],t[n].push(_l(""+s+o))}),Object.keys(t).forEach(function(e){if(1<t[e].length)return bu("multiple "+e+" codecs found as attributes: "+t[e].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),void(t[e]=null);t[e]=t[e][0]}),t}function Er(e){var t=0;return e.audio&&t++,e.video&&t++,t}function Et(e,t){var s,o=t.attributes||{},n=fi(function(e){var t=e.attributes||{};if(t.CODECS)return oe(t.CODECS)}(t)||[]);return Mr(e,t)&&!n.audio&&!function(e,t){if(!Mr(e,t))return!0;var s,o=t.attributes||{},n=e.mediaGroups.AUDIO[o.AUDIO];for(s in n)if(!n[s].uri&&!n[s].playlists)return!0;return!1}(e,t)&&(s=fi(function(e,t){if(!e.mediaGroups.AUDIO||!t)return null;var n,o,s=e.mediaGroups.AUDIO[t];if(!s)return null;for(o in s)if(n=s[o],n.default&&n.playlists)return oe(n.playlists[0].attributes.CODECS);return null}(e,o.AUDIO)||[]),s.audio&&(n.audio=s.audio)),n}function Ta(e){if(e&&e.playlist){var t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})}}function ds(e,t){if(!e)return"";var n=o.getComputedStyle(e);return n?n[t]:""}function pt(e,t){var n=e.slice();e.sort(function(e,s){var o=t(e,s);return 0===o?n.indexOf(e)-n.indexOf(s):o})}function Bs(e,t){var n,s;return e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),n=n||o.Number.MAX_VALUE,t.attributes.BANDWIDTH&&(s=t.attributes.BANDWIDTH),n-(s=s||o.Number.MAX_VALUE)}function ua(e,t,n,s,i){if(e){l={bandwidth:t,width:n,height:s,limitRenditionByPlayerDimensions:i},r=e.playlists.map(function(e){var t=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return{bandwidth:e.attributes.BANDWIDTH||o.Number.MAX_VALUE,width:t,height:n,playlist:e}}),pt(r,function(e,t){return e.bandwidth-t.bandwidth}),a=(r=r.filter(function(e){return!B.isIncompatible(e.playlist)})).filter(function(e){return B.isEnabled(e.playlist)}),a.length||(a=r.filter(function(e){return!B.isDisabled(e.playlist)}));var a,r,c,l,u,h,m,f,p,g,v,y,_,j=a.filter(function(e){return e.bandwidth*w.BANDWIDTH_VARIANCE<t}),d=j[j.length-1],b=j.filter(function(e){return e.bandwidth===d.bandwidth})[0];return!1===i?(h=b||a[0]||r[0],h&&h.playlist?(f="sortedPlaylistReps",b&&(f="bandwidthBestRep"),a[0]&&(f="enabledPlaylistReps"),Wn("choosing "+Ta(h)+" using "+f+" with options",l),h.playlist):(Wn("could not choose a playlist with options",l),null)):(m=j.filter(function(e){return e.width&&e.height}),pt(m,function(e,t){return e.width-t.width}),p=m.filter(function(e){return e.width===n&&e.height===s}),d=p[p.length-1],v=p.filter(function(e){return e.bandwidth===d.bandwidth})[0],v||(g=(y=m.filter(function(e){return e.width>n||e.height>s})).filter(function(e){return e.width===y[0].width&&e.height===y[0].height}),d=g[g.length-1],_=g.filter(function(e){return e.bandwidth===d.bandwidth})[0]),u=_||v||b||a[0]||r[0],u&&u.playlist?(c="sortedPlaylistReps",_?c="resolutionPlusOneRep":v?c="resolutionBestRep":b?c="bandwidthBestRep":a[0]&&(c="enabledPlaylistReps"),Wn("choosing "+Ta(u)+" using "+c+" with options",l),u.playlist):(Wn("could not choose a playlist with options",l),null))}}function da(){var e=this.useDevicePixelRatio&&o.devicePixelRatio||1;return ua(this.playlists.master,this.systemBandwidth,parseInt(ds(this.tech_.el(),"width"),10)*e,parseInt(ds(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)}function Pd(t){var n,a,r,l,u=t.inbandTextTracks,c=t.metadataArray,h=t.timestampOffset,m=t.videoDuration;if(c&&(l=o.WebKitDataCue||o.VTTCue,n=u.metadataTrack_,n&&(c.forEach(function(t){var s=t.cueTime+h;!("number"!=typeof s||o.isNaN(s)||s<0)&&s<1/0&&t.frames.forEach(function(t){var o=new l(s,s,t.value||t.url||t.data||"");o.frame=t,o.value=t,function(t){Object.defineProperties(t.frame,{id:{get:function(){return e.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),t.value.key}},value:{get:function(){return e.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),t.value.data}},privateData:{get:function(){return e.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),t.value.data}}})}(o),n.addCue(o)})}),n.cues&&n.cues.length))){for(var i=n.cues,d=[],s=0;s<i.length;s++)i[s]&&d.push(i[s]);a=d.reduce(function(e,t){var n=e[t.startTime]||[];return n.push(t),e[t.startTime]=n,e},{}),r=Object.keys(a).sort(function(e,t){return Number(e)-Number(t)}),r.forEach(function(e,t){var n=a[e],s=Number(r[t+1])||m;n.forEach(function(e){e.endTime=s})})}}function vt(e,t,n){var s,o;if(n&&n.cues)for(s=n.cues.length;s--;)(o=n.cues[s]).startTime>=e&&o.endTime<=t&&n.removeCue(o)}function ra(e){return"number"==typeof e&&isFinite(e)}function ia(e){return e+"TimingInfo"}function Ui(e){var n=e.segmentTimeline,s=e.currentTimeline,o=e.startOfSegment,t=e.buffered;return e.overrideCheck||n!==s?n<s?o:t.length?t.end(t.length-1):o:null}function Wi(e){var n,s,o=e.timelineChangeController,a=e.currentTimeline,t=e.segmentTimeline,i=e.loaderType,r=e.audioDisabled;return a!==t&&("audio"===i?(n=o.lastTimelineChange({type:"main"}),!n||n.to!==t):!!("main"===i&&r)&&(s=o.pendingTimelineChange({type:"audio"}),!s||s.to!==t))}function $i(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+Ue}function Ud(e,t){if("hls"!==t)return null;if(n=function(e,t){var n=e&&"number"==typeof e.start&&"number"==typeof e.end?e.end-e.start:0,s=t&&"number"==typeof t.start&&"number"==typeof t.end?t.end-t.start:0;return Math.max(n,s)}(e.audioTimingInfo,e.videoTimingInfo),!n)return null;var n,s=e.playlist.targetDuration,o=$i({segmentDuration:n,maxDuration:2*s}),i=$i({segmentDuration:n,maxDuration:s}),a="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+n+" when the reported duration is "+e.duration+" and the target duration is "+s+". For HLS content, a duration in excess of the target duration may result in playback issues. See the HLS specification section on EXT-X-TARGETDURATION for more details: https://tools.ietf.org/html/draft-pantos-http-live-streaming-23#section-4.3.3.1";return o||i?{severity:o?"warn":"info",message:a}:null}var i,l,m,j,S,M,N,$,Y,G,Po,Yt,Ac,kc,Hn,Cc,Oc,Nt,_c,ee,pc,dc,ze,Yr,Me,Yu,Ve,Ae,On,po,qa,Ka,et,La,za,Ct,Fa,xt,Ma,Sa,Aa,xs,Oa,Es,rs,Ee,is,os,ja,ns,ba,ms,ts,va,ga,Zn,$s,Qn,Us,Ks,qs,pa,Yn,Xs,Qs,Zs,qn,Kn,Un,fa,mt,Pe,io,Ce,ro,Vn,Bn,In,en,Rn,fo,Ln,go,fs,Dn,jo,yo,ca,bt,Oo,Hi,Ri,Ni,Di,ki,Ke,oi,wi,vi,Qt,nn,gi,ma,Kd=Nl,qd=Dl,me=(al=function(e){var t=0===e[0]?12:20;return Cn(e[t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])},{mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/,video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/}),Gd=["video","audio","text"],Bi=["Video","Audio","Text"],Ii="mp4a.40.2",Oe=ln,Jd=e.log,Bo=e.mergeOptions,Ze=function(e){function n(t,n,s){if(void 0===s&&(s={}),o=e.call(this)||this,!t)throw new Error("A non-empty playlist URL or object is required");o.logger_=J("PlaylistLoader");var o,i,a=s,r=a.withCredentials,l=void 0!==r&&r,c=a.handleManifestRedirects,d=void 0!==c&&c;return o.src=t,o.vhs_=n,o.withCredentials=l,o.handleManifestRedirects=d,i=n.options_,o.customTagParsers=i&&i.customTagParsers||[],o.customTagMappers=i&&i.customTagMappers||[],o.state="HAVE_NOTHING",o.on("mediaupdatetimeout",function(){"HAVE_METADATA"===o.state&&(o.state="HAVE_CURRENT_METADATA",o.request=o.vhs_.xhr({uri:Oe(o.master.uri,o.media().uri),withCredentials:o.withCredentials},function(e){if(o.request)return e?o.playlistRequestError(o.request,o.media(),"HAVE_METADATA"):void o.haveMetadata({playlistString:o.request.responseText,url:o.media().uri,id:o.media().id})}))}),o}ie(n,e);var t=n.prototype;return t.playlistRequestError=function(e,t,n){var s=t.uri,o=t.id;this.request=null,n&&(this.state=n),this.error={playlist:this.master.playlists[o],status:e.status,message:"HLS playlist request error at URL: "+s+".",responseText:e.responseText,code:500<=e.status?4:2},this.trigger("error")},t.haveMetadata=function(e){var t,s,i=this,a=e.playlistString,r=e.playlistObject,c=e.url,n=e.id;this.request=null,this.state="HAVE_METADATA",t=r||Ml({onwarn:function(e){var t=e.message;return i.logger_("m3u8-parser warn for "+n+": "+t)},oninfo:function(e){var t=e.message;return i.logger_("m3u8-parser info for "+n+": "+t)},manifestString:a,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers}),t.lastRequest=Date.now(),bl({playlist:t,uri:c,id:n}),s=Vs(this.master,t),this.targetDuration=t.targetDuration,s?(this.master=s,this.media_=this.master.playlists[n]):this.trigger("playlistunchanged"),this.media().endList||(o.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=o.setTimeout(function(){i.trigger("mediaupdatetimeout")},il(this.media(),!!s))),this.trigger("loadedplaylist")},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),o.clearTimeout(this.mediaUpdateTimeout),o.clearTimeout(this.finalRenditionTimeout),this.off()},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e,t){if(n=this,!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if("string"==typeof e){if(!this.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.master.playlists[e]}if(o.clearTimeout(this.finalRenditionTimeout),t)i=e.targetDuration/2*1e3||5e3,this.finalRenditionTimeout=o.setTimeout(this.media.bind(this,e,!1),i);else{var n,i,s=this.state,a=!this.media_||e.id!==this.media_.id;if(this.master.playlists[e.id].endList||e.endList&&e.segments.length)return this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=e,void(a&&(this.trigger("mediachanging"),"HAVE_MASTER"===s?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(a){if(this.state="SWITCHING_MEDIA",this.request){if(e.resolvedUri===this.request.url)return;this.request.onreadystatechange=null,this.request.abort(),this.request=null}this.media_&&this.trigger("mediachanging"),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials},function(t,o){if(n.request){if(e.lastRequest=Date.now(),e.resolvedUri=bn(n.handleManifestRedirects,e.resolvedUri,o),t)return n.playlistRequestError(n.request,e,s);n.haveMetadata({playlistString:o.responseText,url:e.uri,id:e.id}),"HAVE_MASTER"===s?n.trigger("loadedmetadata"):n.trigger("mediachange")}})}}},t.pause=function(){this.stopRequest(),o.clearTimeout(this.mediaUpdateTimeout),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MASTER":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")},t.load=function(e){var t,n,s=this;o.clearTimeout(this.mediaUpdateTimeout),t=this.media(),e?(n=t?t.targetDuration/2*1e3:5e3,this.mediaUpdateTimeout=o.setTimeout(function(){return s.load()},n)):this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},t.start=function(){var e=this;if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=o.location.href),this.src.resolvedUri=this.src.uri,void setTimeout(function(){e.setupInitialPlaylist(e.src)},0);this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials},function(t,n){if(e.request){if(e.request=null,t)return e.error={status:n.status,message:"HLS playlist request error at URL: "+e.src+".",responseText:n.responseText,code:2},"HAVE_NOTHING"===e.state&&(e.started=!1),e.trigger("error");e.src=bn(e.handleManifestRedirects,e.src,n);var s=Ml({manifestString:n.responseText,customTagParsers:e.customTagParsers,customTagMappers:e.customTagMappers});e.setupInitialPlaylist(s)}})},t.srcUri=function(){return"string"==typeof this.src?this.src:this.src.uri},t.setupInitialPlaylist=function(e){if(this.state="HAVE_MASTER",e.playlists)return this.master=e,gl(this.master,this.srcUri()),e.playlists.forEach(function(e){e.segments&&e.segments.forEach(function(t){fl(t,e.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t=this.srcUri()||o.location.href;this.master=function(e,t){var s=li(0,t),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:o.location.href,resolvedUri:o.location.href,playlists:[{uri:t,id:s,resolvedUri:t,attributes:{}}]};return n.playlists[s]=n.playlists[0],n.playlists[t]=n.playlists[0],n}(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},n}(e.EventTarget),Ue=1/30,Oi=e.createTimeRange,B={duration:Yc,seekable:function(e,t,n){var o=t||0,s=Uc(e,t,!0,n);return null===s?Oi():Oi(o,s)},safeLiveIndex:Kc,getMediaInfoForTime:function(e,t,n,s){var o,a=e.segments.length,i=t-s;if(i<0){if(0<n)for(o=n-1;0<=o;o--)if(0<(i+=e.segments[o].duration+Ue))return{mediaIndex:o,startTime:s-Jt(e,n,o)};return{mediaIndex:0,startTime:t}}if(n<0){for(o=n;o<0;o++)if((i-=e.targetDuration)<0)return{mediaIndex:0,startTime:t};n=0}for(o=n;o<a;o++)if((i-=e.segments[o].duration+Ue)<0)return{mediaIndex:o,startTime:s+Jt(e,n,o)};return{mediaIndex:a-1,startTime:t}},isEnabled:hn,isDisabled:function(e){return e.disabled},isBlacklisted:Wc,isIncompatible:Xo,playlistEnd:Uc,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:zc,estimateSegmentRequestTime:function(e,t,n,s){return void 0===s&&(s=0),zc("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*s)/t:NaN},isLowestEnabledRendition:ji},iu=e.xhr,au=e.mergeOptions,ru=Object.freeze({__proto__:null,createTransferableMessage:bc,initSegmentId:zn,segmentKeyId:mc,hexDump:hc,tagDump:function(e){var t=e.bytes;return hc(t)},textRanges:function(e){var t,n,s,o="";for(t=0;t<e.length;t++)o+=(n=t,(s=e).start(n)+"-"+s.end(n)+" ");return o}}),Fi=e.mergeOptions,Uo=function(e){function n(t,n,s,o){void 0===s&&(s={}),(i=e.call(this)||this).masterPlaylistLoader_=o||Y(i),o||(i.isMaster_=!0);var i,a=s,r=a.withCredentials,l=void 0!==r&&r,c=a.handleManifestRedirects,d=void 0!==c&&c;if(i.vhs_=n,i.withCredentials=l,i.handleManifestRedirects=d,!t)throw new Error("A non-empty playlist URL or object is required");return i.on("minimumUpdatePeriod",function(){i.refreshXml_()}),i.on("mediaupdatetimeout",function(){i.refreshMedia_(i.media().id)}),i.state="HAVE_NOTHING",i.loadedPlaylists_={},i.logger_=J("DashPlaylistLoader"),i.isMaster_?(i.masterPlaylistLoader_.srcUrl=t,i.masterPlaylistLoader_.sidxMapping_={}):i.childPlaylist_=t,i}ie(n,e);var t=n.prototype;return t.requestErrored_=function(e,t,n){return!this.request||(this.request=null,e?(this.error="object"!=typeof e||e instanceof Error?{status:t.status,message:"DASH request error at URL: "+t.uri,response:t.response,code:2}:e,n&&(this.state=n),this.trigger("error"),!0):void 0)},t.addSidxSegments_=function(e,t,n){var s,a,l,c=this,i=e.sidx&&so(e.sidx);e.sidx&&i&&!this.masterPlaylistLoader_.sidxMapping_[i]?(a=bn(this.handleManifestRedirects,e.sidx.resolvedUri),l=this.masterPlaylistLoader_.sidxMapping_,l[i]={sidxInfo:e.sidx},s=function(s,o){if(!c.requestErrored_(s,o,t)){var a=td(r(o.response).subarray(8));return l[i].sidx=a,gc(e,a,e.sidx.resolvedUri),n(!0)}},this.request=cd(a,this.vhs_.xhr,function(t,n,o,i){if(t)return s(t,n);if(!o||"mp4"!==o)return s({status:n.status,message:"Unsupported "+(o||"unknown")+" container type for sidx segment at URL: "+a,response:"",playlist:e,internal:!0,blacklistDuration:1/0,code:2},n);var l=e.sidx.byterange,r=l.offset,d=l.length;if(i.length>=d+r)return s(t,{response:i.subarray(r,r+d),status:n.status,uri:n.uri});c.request=c.vhs_.xhr({uri:a,responseType:"arraybuffer",headers:Ho({byterange:e.sidx.byterange})},s)})):this.mediaRequest_=o.setTimeout(function(){return n(!1)},0)},t.dispose=function(){this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},o.clearTimeout(this.minimumUpdatePeriodTimeout_),o.clearTimeout(this.mediaRequest_),o.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.off()},t.hasPendingRequest=function(){return this.request||this.mediaRequest_},t.stopRequest=function(){if(this.request){var e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}},t.media=function(e){var t,n,s=this;if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);if(n=this.state,"string"==typeof e){if(!this.masterPlaylistLoader_.master.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.masterPlaylistLoader_.master.playlists[e]}if(t=!this.media_||e.id!==this.media_.id,t&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(t&&(this.trigger("mediachanging"),this.trigger("mediachange")));t&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,n,function(){s.haveMetadata({startingState:n,playlist:e})}))},t.haveMetadata=function(e){var n=e.startingState,t=e.playlist;this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MASTER"===n?this.trigger("loadedmetadata"):this.trigger("mediachange")},t.pause=function(){this.masterPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.masterPlaylistLoader_.createMupOnMedia_),this.masterPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),o.clearTimeout(this.mediaUpdateTimeout),o.clearTimeout(this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_),this.masterPlaylistLoader_.minimumUpdatePeriodTimeout_=null,this.mediaUpdateTimeout=null,"HAVE_NOTHING"===this.state&&(this.started=!1)},t.load=function(e){var t,n,s=this;o.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,t=this.media(),e?(n=t?t.targetDuration/2*1e3:5e3,this.mediaUpdateTimeout=o.setTimeout(function(){return s.load()},n)):this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()},t.start=function(){var e=this;this.started=!0,this.isMaster_?this.requestMaster_(function(){e.haveMaster_(),e.hasPendingRequest()||e.media_||e.media(e.masterPlaylistLoader_.master.playlists[0])}):this.mediaRequest_=o.setTimeout(function(){return e.haveMaster_()},0)},t.requestMaster_=function(e){var t=this;this.request=this.vhs_.xhr({uri:this.masterPlaylistLoader_.srcUrl,withCredentials:this.withCredentials},function(n,s){if(!t.requestErrored_(n,s)){var o=s.responseText!==t.masterPlaylistLoader_.masterXml_;return t.masterPlaylistLoader_.masterXml_=s.responseText,s.responseHeaders&&s.responseHeaders.date?t.masterLoaded_=Date.parse(s.responseHeaders.date):t.masterLoaded_=Date.now(),t.masterPlaylistLoader_.srcUrl=bn(t.handleManifestRedirects,t.masterPlaylistLoader_.srcUrl,s),o?(t.handleMaster_(),void t.syncClientServerClock_(function(){return e(s,o)})):e(s,o)}"HAVE_NOTHING"===t.state&&(t.started=!1)})},t.syncClientServerClock_=function(e){var n=this,t=gd(this.masterPlaylistLoader_.masterXml_);return null===t?(this.masterPlaylistLoader_.clientOffset_=this.masterLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.masterPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:Oe(this.masterPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials},function(s,o){if(n.request){if(s)return n.masterPlaylistLoader_.clientOffset_=n.masterLoaded_-Date.now(),e();var i="HEAD"===t.method?o.responseHeaders&&o.responseHeaders.date?Date.parse(o.responseHeaders.date):n.masterLoaded_:Date.parse(o.responseText);n.masterPlaylistLoader_.clientOffset_=i-Date.now(),e()}}))},t.haveMaster_=function(){this.state="HAVE_MASTER",this.isMaster_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)},t.handleMaster_=function(){this.mediaRequest_=null;var n,e=function(e){var s=e.masterXml,t=e.srcUrl,o=e.clientOffset,i=e.sidxMapping,n=vd(s,{manifestUri:t,clientOffset:o,sidxMapping:i});return gl(n,t),n}({masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_}),t=this.masterPlaylistLoader_.master;return t&&(e=function(e,t,n){for(var o,r,c,i=!0,s=Fi(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),a=0;a<t.playlists.length;a++)o=t.playlists[a],o.sidx&&(r=so(o.sidx),n&&n[r]&&gc(o,n[r].sidx,o.sidx.resolvedUri)),c=Vs(s,o,lc),c&&(s=c,i=!1);return Jn(t,function(e,t,n,o){if(e.playlists&&e.playlists.length){var r=e.playlists[0].id,a=Vs(s,e.playlists[0],lc);a&&((s=a).mediaGroups[t][n][o].playlists[0]=s.playlists[r],i=!1)}}),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(i=!1),i?null:s}(t,e,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=e||t,n=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0],n&&n!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=n),(!t||e&&e.minimumUpdatePeriod!==t.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),Boolean(e)},t.updateMinimumUpdatePeriodTimeout_=function(){var t,e=this.masterPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(o.clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null),t=e.master&&e.master.minimumUpdatePeriod,0===t&&(e.media()?t=1e3*e.media().targetDuration:(e.createMupOnMedia_=e.updateMinimumUpdatePeriodTimeout_,e.one("loadedmetadata",e.createMupOnMedia_))),"number"!=typeof t||t<=0?t<0&&this.logger_("found invalid minimumUpdatePeriod of "+t+", not setting a timeout"):this.createMUPTimeout_(t)},t.createMUPTimeout_=function(e){var t=this.masterPlaylistLoader_;t.minimumUpdatePeriodTimeout_=o.setTimeout(function(){t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)},e)},t.refreshXml_=function(){var e=this;this.requestMaster_(function(t,n){n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=function(e,t){var n=rc(e.playlists,t);return Jn(e,function(e){if(e.playlists&&e.playlists.length){var a=e.playlists;n=Fi(n,rc(a,t))}}),n}(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.sidxMapping_),e.addSidxSegments_(e.media(),e.state,function(){e.refreshMedia_(e.media().id)}))})},t.refreshMedia_=function(e){if(t=this,!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMaster_&&this.handleMaster_();var t,n=this.masterPlaylistLoader_.master.playlists,s=!this.media_||this.media_!==n[e];(s?this.media_=n[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout)&&!function e(){t.media().endList||(t.mediaUpdateTimeout=o.setTimeout(function(){t.trigger("mediaupdatetimeout"),e()},il(t.media(),Boolean(s))))}(),this.trigger("loadedplaylist")},n}(e.EventTarget),w={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,BACK_BUFFER_LENGTH:30,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:16,BUFFER_LOW_WATER_LINE_RATE:1,BUFFER_HIGH_WATER_LINE:30},uu=tc(Ur($r(function(){function f(){this.init=function(){var e={};this.on=function(t,n){e[t]||(e[t]=[]),e[t]=e[t].concat(n)},this.off=function(t,n){var s;return!!e[t]&&(s=e[t].indexOf(n),e[t]=e[t].slice(),e[t].splice(s,1),-1<s)},this.trigger=function(t){var n,s,o,i;if(s=e[t])if(2===arguments.length)for(o=s.length,n=0;n<o;++n)s[n].call(this,arguments[1]);else{for(i=[],n=arguments.length,n=1;n<arguments.length;++n)i.push(arguments[n]);for(o=s.length,n=0;n<o;++n)s[n].apply(this,i)}},this.dispose=function(){e={}}}}f.prototype.pipe=function(e){return this.on("data",function(t){e.push(t)}),this.on("done",function(t){e.flush(t)}),this.on("partialdone",function(t){e.partialFlush(t)}),this.on("endedtimeline",function(t){e.endTimeline(t)}),this.on("reset",function(t){e.reset(t)}),e},f.prototype.push=function(e){this.trigger("data",e)},f.prototype.flush=function(e){this.trigger("done",e)},f.prototype.partialFlush=function(e){this.trigger("partialdone",e)},f.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},f.prototype.reset=function(e){this.trigger("reset",e)},a=f,V=Math.pow(2,32)-1,!function(){var t;if(e={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],pasp:[],sdtp:[],smhd:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],styp:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[]},"undefined"!=typeof Uint8Array){for(t in e)e.hasOwnProperty(t)&&(e[t]=[t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2),t.charCodeAt(3)]);$=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),Ue=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Ke=new Uint8Array([0,0,0,1]),We=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),ce=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Be={video:We,audio:ce},Re=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Pe=new Uint8Array([0,0,0,0,0,0,0,0]),T=new Uint8Array([0,0,0,0,0,0,0,0]),re=T,Le=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ne=T,Ie=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),t=function(e){var t,n,s=[],o=0;for(t=1;t<arguments.length;t++)s.push(arguments[t]);for(t=s.length;t--;)o+=s[t].byteLength;for(n=new Uint8Array(o+8),new DataView(n.buffer,n.byteOffset,n.byteLength).setUint32(0,n.byteLength),n.set(e,4),t=0,o=8;t<s.length;t++)n.set(s[t],o),o+=s[t].byteLength;return n},wt=function(){return t(e.dinf,t(e.dref,Re))},_t=function(n){return t(e.esds,new Uint8Array([0,0,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,n.audioobjecttype<<3|n.samplingfrequencyindex>>>1,n.samplingfrequencyindex<<7|n.channelcount<<3,6,1,2]))},tt=function(n){return t(e.hdlr,Be[n])},nt=function(n){var s=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,n.duration>>>24&255,n.duration>>>16&255,n.duration>>>8&255,255&n.duration,85,196,0,0]);return n.samplerate&&(s[12]=n.samplerate>>>24&255,s[13]=n.samplerate>>>16&255,s[14]=n.samplerate>>>8&255,s[15]=255&n.samplerate),t(e.mdhd,s)},st=function(n){return t(e.mdia,nt(n),tt(n.type),bt(n))},jt=function(n){return t(e.mfhd,new Uint8Array([0,0,0,0,(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n]))},bt=function(n){return t(e.minf,"video"===n.type?t(e.vmhd,Ie):t(e.smhd,Pe),wt(),Qe(n))},gt=function(n,s){for(var i=[],o=s.length;o--;)i[o]=Ge(s[o]);return t.apply(null,[e.moof,jt(n)].concat(i))},pt=function(n){for(var s=n.length,o=[];s--;)o[s]=rt(n[s]);return t.apply(null,[e.moov,lt(4294967295)].concat(o).concat(ht(n)))},ht=function(n){for(var s=n.length,o=[];s--;)o[s]=Ye(n[s]);return t.apply(null,[e.mvex].concat(o))},lt=function(n){var s=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t(e.mvhd,s)},et=function(n){var s,o,i=n.samples||[],a=new Uint8Array(4+i.length);for(s=0;s<i.length;s++)o=i[s].flags,a[s+4]=o.dependsOn<<4|o.isDependedOn<<2|o.hasRedundancy;return t(e.sdtp,a)},Qe=function(n){return t(e.stbl,Xe(n),t(e.stts,Ne),t(e.stsc,re),t(e.stsz,Le),t(e.stco,T))},Xe=function(n){return t(e.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?De(n):ze(n))},De=function(n){var s,c,l,d,o=n.sps||[],i=n.pps||[],a=[],r=[];for(s=0;s<o.length;s++)a.push((65280&o[s].byteLength)>>>8),a.push(255&o[s].byteLength),a=a.concat(Array.prototype.slice.call(o[s]));for(s=0;s<i.length;s++)r.push((65280&i[s].byteLength)>>>8),r.push(255&i[s].byteLength),r=r.concat(Array.prototype.slice.call(i[s]));return(d=[e.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,(65280&n.width)>>8,255&n.width,(65280&n.height)>>8,255&n.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),t(e.avcC,new Uint8Array([1,n.profileIdc,n.profileCompatibility,n.levelIdc,255].concat([o.length],a,[i.length],r))),t(e.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],n.sarRatio)&&(c=n.sarRatio[0],l=n.sarRatio[1],d.push(t(e.pasp,new Uint8Array([(4278190080&c)>>24,(16711680&c)>>16,(65280&c)>>8,255&c,(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l])))),t.apply(null,d)},ze=function(n){return t(e.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&n.channelcount)>>8,255&n.channelcount,(65280&n.samplesize)>>8,255&n.samplesize,0,0,0,0,(65280&n.samplerate)>>8,255&n.samplerate,0,0]),_t(n))},at=function(n){var s=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,0,(4278190080&n.duration)>>24,(16711680&n.duration)>>16,(65280&n.duration)>>8,255&n.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,(65280&n.width)>>8,255&n.width,0,0,(65280&n.height)>>8,255&n.height,0,0]);return t(e.tkhd,s)},Ge=function(n){var s,o,i,a,r,c;return a=t(e.tfhd,new Uint8Array([0,0,0,58,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),s=Math.floor(n.baseMediaDecodeTime/(1+V)),o=Math.floor(n.baseMediaDecodeTime%(1+V)),r=t(e.tfdt,new Uint8Array([1,0,0,0,s>>>24&255,s>>>16&255,s>>>8&255,255&s,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),92,"audio"===n.type?(i=W(n,92),t(e.traf,a,r,i)):(c=et(n),i=W(n,c.length+92),t(e.traf,a,r,i,c))},rt=function(n){return n.duration=n.duration||4294967295,t(e.trak,at(n),st(n))},Ye=function(n){var s=new Uint8Array([0,0,0,0,(4278190080&n.id)>>24,(16711680&n.id)>>16,(65280&n.id)>>8,255&n.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==n.type&&(s[s.length-1]=0),t(e.trex,s)},I=function(e,t){var n=0,s=0,o=0,i=0;return e.length&&(void 0!==e[0].duration&&(n=1),void 0!==e[0].size&&(s=2),void 0!==e[0].flags&&(o=4),void 0!==e[0].compositionTimeOffset&&(i=8)),[0,0,n|s|o|i,1,(4278190080&e.length)>>>24,(16711680&e.length)>>>16,(65280&e.length)>>>8,255&e.length,(4278190080&t)>>>24,(16711680&t)>>>16,(65280&t)>>>8,255&t]},Me=function(n,s){var o,i,a,r,c,l;for(s+=20+16*(r=n.samples||[]).length,c=I(r,s),(i=new Uint8Array(c.length+16*r.length)).set(c),a=c.length,l=0;l<r.length;l++)o=r[l],i[a++]=(4278190080&o.duration)>>>24,i[a++]=(16711680&o.duration)>>>16,i[a++]=(65280&o.duration)>>>8,i[a++]=255&o.duration,i[a++]=(4278190080&o.size)>>>24,i[a++]=(16711680&o.size)>>>16,i[a++]=(65280&o.size)>>>8,i[a++]=255&o.size,i[a++]=o.flags.isLeading<<2|o.flags.dependsOn,i[a++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,i[a++]=61440&o.flags.degradationPriority,i[a++]=15&o.flags.degradationPriority,i[a++]=(4278190080&o.compositionTimeOffset)>>>24,i[a++]=(16711680&o.compositionTimeOffset)>>>16,i[a++]=(65280&o.compositionTimeOffset)>>>8,i[a++]=255&o.compositionTimeOffset;return t(e.trun,i)},Te=function(n,s){var o,i,a,r,c,l;for(s+=20+8*(r=n.samples||[]).length,c=I(r,s),(o=new Uint8Array(c.length+8*r.length)).set(c),i=c.length,l=0;l<r.length;l++)a=r[l],o[i++]=(4278190080&a.duration)>>>24,o[i++]=(16711680&a.duration)>>>16,o[i++]=(65280&a.duration)>>>8,o[i++]=255&a.duration,o[i++]=(4278190080&a.size)>>>24,o[i++]=(16711680&a.size)>>>16,o[i++]=(65280&a.size)>>>8,o[i++]=255&a.size;return t(e.trun,o)},W=function(e,t){return"audio"===e.type?Te(e,t):Me(e,t)},yt=function(){return t(e.ftyp,$,Ke,$,Ue)};function ke(e,t){var n={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return n.dataOffset=t,n.compositionTimeOffset=e.pts-e.dts,n.duration=e.duration,n.size=4*e.length,n.size+=e.byteLength,e.keyFrame&&(n.flags.dependsOn=2,n.flags.isNonSyncSample=0),n}function n(e){for(var t=[];e--;)t.push(0);return t}function nn(){if(!q){var e={96e3:[h,[227,64],n(154),[56]],88200:[h,[231],n(170),[56]],64e3:[h,[248,192],n(240),[56]],48e3:[h,[255,192],n(268),[55,148,128],n(54),[112]],44100:[h,[255,192],n(268),[55,163,128],n(84),[112]],32e3:[h,[255,192],n(268),[55,234],n(226),[112]],24e3:[h,[255,192],n(268),[55,255,128],n(268),[111,112],n(126),[224]],16e3:[h,[255,192],n(268),[55,255,128],n(268),[111,255],n(269),[223,108],n(195),[1,192]],12e3:[ie,n(268),[3,127,248],n(268),[6,255,240],n(268),[13,255,224],n(268),[27,253,128],n(259),[56]],11025:[ie,n(268),[3,127,248],n(268),[6,255,240],n(268),[13,255,224],n(268),[27,255,192],n(268),[55,175,128],n(108),[112]],8e3:[ie,n(268),[3,121,16],n(47),[7]]};q=function(e){return Object.keys(e).reduce(function(t,n){return t[n]=new Uint8Array(e[n].reduce(function(e,t){return e.concat(t)},[])),t},{})}(e)}return q}function c(e){e=e||{},c.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new i(0,0),new i(0,1),new i(1,0),new i(1,1)],this.parse708captions_&&(this.cc708Stream_=new s),this.reset(),this.ccStreams_.forEach(function(e){e.on("data",this.trigger.bind(this,"data")),e.on("partialdone",this.trigger.bind(this,"partialdone")),e.on("done",this.trigger.bind(this,"done"))},this),this.parse708captions_&&(this.cc708Stream_.on("data",this.trigger.bind(this,"data")),this.cc708Stream_.on("partialdone",this.trigger.bind(this,"partialdone")),this.cc708Stream_.on("done",this.trigger.bind(this,"done")))}var e,t,s,a,l,j,y,k,F,T,N,L,I,B,V,$,W,K,q,Y,G,X,Q,J,wt,_t,yt,jt,bt,gt,pt,ht,lt,rt,at,st,nt,tt,et,Qe,Xe,Ge,Ye,Ke,Ue,We,ce,Be,Ie,Pe,Re,re,Le,Ne,De,ze,Te,Me,Oe,we,_e,O=function(n){return t(e.mdat,n)},M=gt,ee=function(e){var t,n=yt(),s=pt(e);return(t=new Uint8Array(n.byteLength+s.byteLength)).set(n),t.set(s,n.byteLength),t},pe=function(e){var s,o,t=[],n=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,o=t.byteLength=0;o<e.length;o++)"access_unit_delimiter_rbsp"===(s=e[o]).nalUnitType?(t.length&&(t.duration=s.dts-t.dts,n.byteLength+=t.byteLength,n.nalCount+=t.length,n.duration+=t.duration,n.push(t)),(t=[s]).byteLength=s.data.byteLength,t.pts=s.pts,t.dts=s.dts):("slice_layer_without_partitioning_rbsp_idr"===s.nalUnitType&&(t.keyFrame=!0),t.duration=s.dts-t.dts,t.byteLength+=s.data.byteLength,t.push(s));return n.length&&(!t.duration||t.duration<=0)&&(t.duration=n[n.length-1].duration),n.byteLength+=t.byteLength,n.nalCount+=t.length,n.duration+=t.duration,n.push(t),n},fe=function(e){var s,o,t=[],n=[];for(t.byteLength=0,t.nalCount=0,t.duration=0,t.pts=e[0].pts,t.dts=e[0].dts,n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,o=0;o<e.length;o++)(s=e[o]).keyFrame?(t.length&&(n.push(t),n.byteLength+=t.byteLength,n.nalCount+=t.nalCount,n.duration+=t.duration),(t=[s]).nalCount=s.length,t.byteLength=s.byteLength,t.pts=s.pts,t.dts=s.dts,t.duration=s.duration):(t.duration+=s.duration,t.nalCount+=s.length,t.byteLength+=s.byteLength,t.push(s));return n.length&&t.duration<=0&&(t.duration=n[n.length-1].duration),n.byteLength+=t.byteLength,n.nalCount+=t.nalCount,n.duration+=t.duration,n.push(t),n},he=function(e){var t;return!e[0][0].keyFrame&&1<e.length&&(t=e.shift(),e.byteLength-=t.byteLength,e.nalCount-=t.nalCount,e[0][0].dts=t.dts,e[0][0].pts=t.pts,e[0][0].duration+=t.duration),e},Xt=function(e,t){var n,s,o,i,a,r=t||0,c=[];for(n=0;n<e.length;n++)for(o=e[n],s=0;s<o.length;s++)a=o[s],r+=(i=ke(a,r)).size,c.push(i);return c},Yt=function(e){var t,n,s,o,a,r,i=0,l=e.byteLength,d=e.nalCount,c=new Uint8Array(l+4*d),u=new DataView(c.buffer);for(t=0;t<e.length;t++)for(a=e[t],n=0;n<a.length;n++)for(r=a[n],s=0;s<r.length;s++)o=r[s],u.setUint32(i,o.data.byteLength),i+=4,c.set(o.data,i),i+=o.data.byteLength;return c},qt=function(e,t){var n,s=[];return n=ke(e,t||0),s.push(n),s},Wt=function(e){var t,n,s=0,i=e.byteLength,a=e.length,o=new Uint8Array(i+4*a),r=new DataView(o.buffer);for(t=0;t<e.length;t++)n=e[t],r.setUint32(s,n.data.byteLength),s+=4,o.set(n.data,s),s+=n.data.byteLength;return o},h=[33,16,5,32,164,27],ie=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],v=9e4,ue=Oe=function(e){return 9e4*e},o=(we=function(e,t){return e*t},X=function(e){return e/9e4}),me=(_e=function(e,t){return e/t},function(e,t){return Oe(_e(e,t))}),Vt=function(e,t){return we(X(e),t)},_=function(e,t,n){return X(n?e:e-t)},ge=function(e,t,n,s){var o,a,r,c,d,u=0,l=0,i=0;if(t.length&&(d=me(e.baseMediaDecodeTime,e.samplerate),o=Math.ceil(v/(e.samplerate/1024)),n&&s&&(u=d-Math.max(n,s),i=(l=Math.floor(u/o))*o),!(l<1||v/2<i))){for(a=(a=nn()[e.samplerate])||t[0].data,r=0;r<l;r++)c=t[0],t.splice(0,0,{data:a,dts:c.dts-o,pts:c.pts-o});return e.baseMediaDecodeTime-=Math.floor(Vt(i,e.samplerate)),i}},ve=function(e,t,n){return t.minSegmentDts>=n?e:(t.minSegmentDts=1/0,e.filter(function(e){return e.dts>=n&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)}))},be=function(e){var t,n,s=[];for(t=0;t<e.length;t++)n=e[t],s.push({size:n.data.byteLength,duration:1024});return s},je=function(e){var t,n,s=0,o=new Uint8Array(function(e){var t,n=0;for(t=0;t<e.length;t++)n+=e[t].data.byteLength;return n}(e));for(t=0;t<e.length;t++)n=e[t],o.set(n.data,s),s+=n.data.byteLength;return o},Ht=v,d=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},A=function(e,t){var n,s=e.minSegmentDts;return t||(s-=e.timelineStartInfo.dts),n=e.timelineStartInfo.baseMediaDecodeTime,n+=s,n=Math.max(0,n),"audio"===e.type&&(n*=e.samplerate/Ht,n=Math.floor(n)),n},g=function(e,t){"number"==typeof t.pts&&(void 0===e.timelineStartInfo.pts&&(e.timelineStartInfo.pts=t.pts),void 0===e.minSegmentPts?e.minSegmentPts=t.pts:e.minSegmentPts=Math.min(e.minSegmentPts,t.pts),void 0===e.maxSegmentPts?e.maxSegmentPts=t.pts:e.maxSegmentPts=Math.max(e.maxSegmentPts,t.pts)),"number"==typeof t.dts&&(void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),void 0===e.minSegmentDts?e.minSegmentDts=t.dts:e.minSegmentDts=Math.min(e.minSegmentDts,t.dts),void 0===e.maxSegmentDts?e.maxSegmentDts=t.dts:e.maxSegmentDts=Math.max(e.maxSegmentDts,t.dts))},Pt=function(e){for(var t=0,n={payloadType:-1,payloadSize:0},o=0,s=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)o+=255,t++;for(o+=e[t++];255===e[t];)s+=255,t++;if(s+=e[t++],!n.payload&&4===o){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){n.payloadType=o,n.payloadSize=s,n.payload=e.subarray(t,t+s);break}n.payload=void 0}t+=s,s=o=0}return n},Rt=function(e){return 181!==e.payload[0]?null:49!=(e.payload[1]<<8|e.payload[2])?null:"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])?null:3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},Lt=function(e,t){var n,s,o,a,i=[];if(!(64&t[0]))return i;for(a=31&t[0],n=0;n<a;n++)o={type:3&t[2+(s=3*n)],pts:e},4&t[2+s]&&(o.ccData=t[3+s]<<8|t[4+s],i.push(o));return i},xt=function(e){for(var s,o,i,a=e.byteLength,n=[],t=1;t<a-2;)0===e[t]&&0===e[t+1]&&3===e[t+2]?(n.push(t+2),t+=2):t++;if(0===n.length)return e;o=a-n.length,i=new Uint8Array(o),s=0;for(t=0;t<o;s++,t++)s===n[0]&&(s++,n.shift()),i[t]=e[s];return i},Nt=4,Fe,qe,Ze,Je,ct,dt,xe,ye;(c.prototype=new a).push=function(e){var t,n,s;if("sei_rbsp"===e.nalUnitType&&(t=Pt(e.escapedRBSP)).payload&&t.payloadType===Nt&&(n=Rt(t)))if(e.dts<this.latestDts_)this.ignoreNextEqualDts_=!0;else{if(e.dts===this.latestDts_&&this.ignoreNextEqualDts_)return this.numSameDts_--,void(this.numSameDts_||(this.ignoreNextEqualDts_=!1));s=Lt(e.pts,n),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},c.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return"flush"===e?t.flush():t.partialFlush()},this)},c.prototype.flushStream=function(e){this.captionPackets_.length&&(this.captionPackets_.forEach(function(e,t){e.presortIndex=t}),this.captionPackets_.sort(function(e,t){return e.pts===t.pts?e.presortIndex-t.presortIndex:e.pts-t.pts}),this.captionPackets_.forEach(function(e){e.type<2?this.dispatchCea608Packet(e):this.dispatchCea708Packet(e)},this),this.captionPackets_.length=0),this.flushCCStreams(e)},c.prototype.flush=function(){return this.flushStream("flush")},c.prototype.partialFlush=function(){return this.flushStream("partialFlush")},c.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},c.prototype.dispatchCea608Packet=function(e){this.setsTextOrXDSActive(e)?this.activeCea608Channel_[e.type]=null:this.setsChannel1Active(e)?this.activeCea608Channel_[e.type]=0:this.setsChannel2Active(e)&&(this.activeCea608Channel_[e.type]=1),null!==this.activeCea608Channel_[e.type]&&this.ccStreams_[(e.type<<1)+this.activeCea608Channel_[e.type]].push(e)},c.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},c.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},c.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},c.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};function Se(e){return 32<=e&&e<=127||160<=e&&e<=255}function u(e){this.windowNum=e,this.reset()}Fe={127:9834,4128:32,4129:160,4133:8230,4138:352,4140:338,4144:9608,4145:8216,4146:8217,4147:8220,4148:8221,4149:8226,4153:8482,4154:353,4156:339,4157:8480,4159:376,4214:8539,4215:8540,4216:8541,4217:8542,4218:9168,4219:9124,4220:9123,4221:9135,4222:9126,4223:9121,4256:12600},u.prototype.reset=function(){this.clearText(),this.pendingNewLine=!1,this.winAttr={},this.penAttr={},this.penLoc={},this.penColor={},this.visible=0,this.rowLock=0,this.columnLock=0,this.priority=0,this.relativePositioning=0,this.anchorVertical=0,this.anchorHorizontal=0,this.anchorPoint=0,this.rowCount=1,this.virtualRowCount=this.rowCount+1,this.columnCount=41,this.windowStyle=0,this.penStyle=0},u.prototype.getText=function(){return this.rows.join(`
`)},u.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},u.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),0<this.rows.length&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},u.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},u.prototype.addText=function(e){this.rows[this.rowIdx]+=e},u.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};function P(e){this.serviceNum=e,this.text="",this.currentWindow=new u(-1),this.windows=[]}P.prototype.init=function(e,t){this.startPts=e;for(var n=0;n<8;n++)this.windows[n]=new u(n),"function"==typeof t&&(this.windows[n].beforeRowOverflow=t)},P.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},s=function e(){e.prototype.init.call(this);var t=this;this.current708Packet=null,this.services={},this.push=function(e){3===e.type?t.new708Packet():null===t.current708Packet&&t.new708Packet(),t.add708Bytes(e)}},s.prototype=new a,s.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},s.prototype.add708Bytes=function(e){var t=e.ccData,n=t>>>8,s=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(n),this.current708Packet.data.push(s)},s.prototype.push708Packet=function(){var o=this.current708Packet,s=o.data,i=null,t=null,e=0,n=s[e++];for(o.seq=n>>6,o.sizeCode=63&n;e<s.length;e++)t=31&(n=s[e++]),7===(i=n>>5)&&0<t&&(i=n=s[e++]),this.pushServiceBlock(i,e,t),0<t&&(e+=t-1)},s.prototype.pushServiceBlock=function(e,t,n){var o,s=t,a=this.current708Packet.data,i=this.services[e];for(i=i||this.initService(e,s);s<t+n&&s<a.length;s++)o=a[s],Se(o)?s=this.handleText(s,i):16===o?s=this.extendedCommands(s,i):128<=o&&o<=135?s=this.setCurrentWindow(s,i):152<=o&&o<=159?s=this.defineWindow(s,i):136===o?s=this.clearWindows(s,i):140===o?s=this.deleteWindows(s,i):137===o?s=this.displayWindows(s,i):138===o?s=this.hideWindows(s,i):139===o?s=this.toggleWindows(s,i):151===o?s=this.setWindowAttributes(s,i):144===o?s=this.setPenAttributes(s,i):145===o?s=this.setPenColor(s,i):146===o?s=this.setPenLocation(s,i):143===o?i=this.reset(s,i):8===o?i.currentWindow.backspace():12===o?i.currentWindow.clearText():13===o?i.currentWindow.pendingNewLine=!0:14===o?i.currentWindow.clearText():141===o&&s++},s.prototype.extendedCommands=function(e,t){var n=this.current708Packet.data[++e];return Se(n)&&(e=this.handleText(e,t,!0)),e},s.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},s.prototype.initService=function(e,t){var n=this;return this.services[e]=new P(e),this.services[e].init(this.getPts(t),function(t){n.flushDisplayed(t,n.services[e])}),this.services[e]},s.prototype.handleText=function(e,t,n){var o=function(e){var t=Fe[e]||e;return 4096&e&&e===t?"":String.fromCharCode(t)}((n?4096:0)|this.current708Packet.data[e]),s=t.currentWindow;return s.pendingNewLine&&!s.isEmpty()&&s.newLine(this.getPts(e)),s.pendingNewLine=!1,s.addText(o),e},s.prototype.setCurrentWindow=function(e,t){var n=7&this.current708Packet.data[e];return t.setCurrentWindow(n),e},s.prototype.defineWindow=function(e,t){var s,o=this.current708Packet.data,n=o[e],i=7&n;return t.setCurrentWindow(i),s=t.currentWindow,n=o[++e],s.visible=(32&n)>>5,s.rowLock=(16&n)>>4,s.columnLock=(8&n)>>3,s.priority=7&n,n=o[++e],s.relativePositioning=(128&n)>>7,s.anchorVertical=127&n,n=o[++e],s.anchorHorizontal=n,n=o[++e],s.anchorPoint=(240&n)>>4,s.rowCount=15&n,n=o[++e],s.columnCount=63&n,n=o[++e],s.windowStyle=(56&n)>>3,s.penStyle=7&n,s.virtualRowCount=s.rowCount+1,e},s.prototype.setWindowAttributes=function(e,t){var o=this.current708Packet.data,n=o[e],s=t.currentWindow.winAttr;return n=o[++e],s.fillOpacity=(192&n)>>6,s.fillRed=(48&n)>>4,s.fillGreen=(12&n)>>2,s.fillBlue=3&n,n=o[++e],s.borderType=(192&n)>>6,s.borderRed=(48&n)>>4,s.borderGreen=(12&n)>>2,s.borderBlue=3&n,n=o[++e],s.borderType+=(128&n)>>5,s.wordWrap=(64&n)>>6,s.printDirection=(48&n)>>4,s.scrollDirection=(12&n)>>2,s.justify=3&n,n=o[++e],s.effectSpeed=(240&n)>>4,s.effectDirection=(12&n)>>2,s.displayEffect=3&n,e},s.prototype.flushDisplayed=function(e,t){for(var s=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&s.push(t.windows[n].getText());t.endPts=e,t.text=s.join(`

`),this.pushCaption(t),t.startPts=e},s.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},s.prototype.displayWindows=function(e,t){var n,s=this.current708Packet.data[++e],o=this.getPts(e);this.flushDisplayed(o,t);for(n=0;n<8;n++)s&1<<n&&(t.windows[n].visible=1);return e},s.prototype.hideWindows=function(e,t){var n,s=this.current708Packet.data[++e],o=this.getPts(e);this.flushDisplayed(o,t);for(n=0;n<8;n++)s&1<<n&&(t.windows[n].visible=0);return e},s.prototype.toggleWindows=function(e,t){var n,s=this.current708Packet.data[++e],o=this.getPts(e);this.flushDisplayed(o,t);for(n=0;n<8;n++)s&1<<n&&(t.windows[n].visible^=1);return e},s.prototype.clearWindows=function(e,t){var n,s=this.current708Packet.data[++e],o=this.getPts(e);this.flushDisplayed(o,t);for(n=0;n<8;n++)s&1<<n&&t.windows[n].clearText();return e},s.prototype.deleteWindows=function(e,t){var n,s=this.current708Packet.data[++e],o=this.getPts(e);this.flushDisplayed(o,t);for(n=0;n<8;n++)s&1<<n&&t.windows[n].reset();return e},s.prototype.setPenAttributes=function(e,t){var o=this.current708Packet.data,n=o[e],s=t.currentWindow.penAttr;return n=o[++e],s.textTag=(240&n)>>4,s.offset=(12&n)>>2,s.penSize=3&n,n=o[++e],s.italics=(128&n)>>7,s.underline=(64&n)>>6,s.edgeType=(56&n)>>3,s.fontStyle=7&n,e},s.prototype.setPenColor=function(e,t){var o=this.current708Packet.data,n=o[e],s=t.currentWindow.penColor;return n=o[++e],s.fgOpacity=(192&n)>>6,s.fgRed=(48&n)>>4,s.fgGreen=(12&n)>>2,s.fgBlue=3&n,n=o[++e],s.bgOpacity=(192&n)>>6,s.bgRed=(48&n)>>4,s.bgGreen=(12&n)>>2,s.bgBlue=3&n,n=o[++e],s.edgeRed=(48&n)>>4,s.edgeGreen=(12&n)>>2,s.edgeBlue=3&n,e},s.prototype.setPenLocation=function(e,t){var s=this.current708Packet.data,n=s[e],o=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=s[++e],o.row=15&n,n=s[++e],o.column=63&n,e},s.prototype.reset=function(e,t){var n=this.getPts(e);return this.flushDisplayed(n,t),this.initService(t.serviceNum,e)};function D(e){return null===e?"":(e=Dt[e]||e,String.fromCharCode(e))}function m(){for(var e=[],t=15;t--;)e.push("");return e}var Dt={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,304:174,305:176,306:189,307:191,308:8482,309:162,310:163,311:9834,312:224,313:160,314:232,315:226,316:234,317:238,318:244,319:251,544:193,545:201,546:211,547:218,548:220,549:252,550:8216,551:161,552:42,553:39,554:8212,555:169,556:8480,557:8226,558:8220,559:8221,560:192,561:194,562:199,563:200,564:202,565:203,566:235,567:206,568:207,569:239,570:212,571:217,572:249,573:219,574:171,575:187,800:195,801:227,802:205,803:204,804:236,805:210,806:242,807:213,808:245,809:123,810:125,811:92,812:94,813:95,814:124,815:126,816:196,817:228,818:214,819:246,820:223,821:165,822:164,823:9474,824:197,825:229,826:216,827:248,828:9484,829:9488,830:9492,831:9496},zt=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],i=function e(t,n){e.prototype.init.call(this),this.field_=t||0,this.dataChannel_=n||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),s=t>>>8,n=255&t,t!==this.PADDING_)if(t===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(t===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(e.pts),this.flushDisplayed(e.pts),a=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=a,this.startPts_=e.pts;else if(t===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(e.pts);else if(t===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(e.pts);else if(t===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(e.pts);else if(t===this.CARRIAGE_RETURN_)this.clearFormatting(e.pts),this.flushDisplayed(e.pts),this.shiftRowsUp_(),this.startPts_=e.pts;else if(t===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=m();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=m();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=m()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))o=D((s=(3&s)<<8)|n),this[this.mode_](e.pts,o),this.column_++;else if(this.isExtCharacter(s,n))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),o=D((s=(3&s)<<8)|n),this[this.mode_](e.pts,o),this.column_++;else if(this.isMidRowCode(s,n))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&n)&&this.addFormatting(e.pts,["i"]),1==(1&n)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(s,n))this.column_+=3&n;else if(this.isPAC(s,n)){var t,n,s,o,a,i=zt.indexOf(7968&t);"rollUp"===this.mode_&&(i-this.rollUpRows_+1<0&&(i=this.rollUpRows_-1),this.setRollUp(e.pts,i)),i!==this.row_&&(this.clearFormatting(e.pts),this.row_=i),1&n&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)&&(this.column_=4*((14&t)>>1)),this.isColorPAC(n)&&14==(14&n)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(s)&&(0===n&&(n=null),o=D(s),o+=D(n),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};i.prototype=new a,i.prototype.flushDisplayed=function(e){var t=this.displayed_.map(function(e){try{return e.trim()}catch{return""}}).join(`
`).replace(/^\n+|\n+$/g,"");t.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,text:t,stream:this.name_})},i.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=m(),this.nonDisplayed_=m(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},i.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},i.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&48<=t&&t<=63},i.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&32<=t&&t<=63},i.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&32<=t&&t<=47},i.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&33<=t&&t<=35},i.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&64<=t&&t<=127},i.prototype.isColorPAC=function(e){return 64<=e&&e<=79||96<=e&&e<=127},i.prototype.isNormalChar=function(e){return 32<=e&&e<=127},i.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=m(),this.displayed_=m()),void 0!==t&&t!==this.row_)for(var n=0;n<this.rollUpRows_;n++)this.displayed_[t-n]=this.displayed_[this.row_-n],this.displayed_[this.row_-n]="";void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},i.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var n=t.reduce(function(e,t){return e+"<"+t+">"},"");this[this.mode_](e,n)},i.prototype.clearFormatting=function(e){if(this.formatting_.length){var t=this.formatting_.reverse().reduce(function(e,t){return e+"</"+t+">"},"");this.formatting_=[],this[this.mode_](e,t)}},i.prototype.popOn=function(e,t){var n=this.nonDisplayed_[this.row_];n+=t,this.nonDisplayed_[this.row_]=n},i.prototype.rollUp=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n},i.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]="";for(e=this.row_+1;e<15;e++)this.displayed_[e]="";for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]=""},i.prototype.paintOn=function(e,t){var n=this.displayed_[this.row_];n+=t,this.displayed_[this.row_]=n};function He(e,t){var n=1;for(t<e&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function H(e){var t,n;H.prototype.init.call(this),this.type_=e||"shared",this.push=function(e){"shared"!==this.type_&&e.type!==this.type_||(void 0===t&&(t=e.dts),e.dts=He(e.dts,t),e.pts=He(e.pts,t),n=e.dts,this.trigger("data",e))},this.flush=function(){t=n,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){n=t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}}j={CaptionStream:c,Cea608Stream:i,Cea708Stream:s},l={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},H.prototype=new a;function $e(e,t,n){var s,o="";for(s=t;s<n;s++)o+="%"+("00"+e[s].toString(16)).slice(-2);return o}function E(e,t,n){return decodeURIComponent($e(e,t,n))}function C(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}qe=H,K={TXXX:function(e){var t;if(3===e.data[0]){for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=E(e.data,1,t),e.value=E(e.data,t+1,e.data.length).replace(/\0*$/,"");break}e.data=e.value}},WXXX:function(e){var t;if(3===e.data[0])for(t=1;t<e.data.length;t++)if(0===e.data[t]){e.description=E(e.data,1,t),e.url=E(e.data,t+1,e.data.length);break}},PRIV:function(e){var t,n;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=(n=e.data,unescape($e(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},(B=function(e){var s,o={debug:!!e&&!!e.debug,descriptor:e&&e.descriptor},n=0,t=[],i=0;if(B.prototype.init.call(this),this.dispatchType=l.METADATA_STREAM_TYPE.toString(16),o.descriptor)for(s=0;s<o.descriptor.length;s++)this.dispatchType+=("00"+o.descriptor[s].toString(16)).slice(-2);this.push=function(e){if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(i=0,t.length=0),0===t.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))o.debug;else if(t.push(e),i+=e.data.byteLength,1===t.length&&(n=C(e.data.subarray(6,10)),n+=10),!(i<n)){for(s={data:new Uint8Array(n),frames:[],pts:t[0].pts,dts:t[0].dts},l=0;l<n;)s.data.set(t[0].data.subarray(0,n-l),l),l+=t[0].data.byteLength,i-=t[0].data.byteLength,t.shift();a=10,64&s.data[5]&&(a+=4,a+=C(s.data.subarray(10,14)),n-=C(s.data.subarray(16,20)));do{if((d=C(s.data.subarray(a+4,a+8)))<1)return;if((r={id:String.fromCharCode(s.data[a],s.data[a+1],s.data[a+2],s.data[a+3]),data:s.data.subarray(a+10,a+d+10)}).key=r.id,K[r.id]&&(K[r.id](r),"com.apple.streaming.transportStreamTimestamp"===r.owner)){var s,a,r,l,d,c=r.data,u=(1&c[3])<<30|c[4]<<22|c[5]<<14|c[6]<<6|c[7]>>>2;u*=4,u+=3&c[7],r.timeStamp=u,void 0===s.pts&&void 0===s.dts&&(s.pts=r.timeStamp,s.dts=r.timeStamp),this.trigger("timestamp",r)}s.frames.push(r),a+=10,a+=d}while(a<n)this.trigger("data",s)}}}).prototype=new a,Ze=B,Je=qe,(Y=function(){var t=new Uint8Array(188),e=0;Y.prototype.init.call(this),this.push=function(n){var s,o=0,i=188;for(e?((s=new Uint8Array(n.byteLength+e)).set(t.subarray(0,e)),s.set(n,e),e=0):s=n;i<s.byteLength;)71!==s[o]||71!==s[i]?(o++,i++):(this.trigger("data",s.subarray(o,i)),o+=188,i+=188);o<s.byteLength&&(t.set(s.subarray(o),0),e=s.byteLength-o)},this.flush=function(){188===e&&71===t[0]&&(this.trigger("data",t),e=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){e=0,this.trigger("reset")}}).prototype=new a,(k=function(){var e,t,n,s;k.prototype.init.call(this),(e=this).packetsWaitingForPmt=[],this.programMapTable=void 0,t=function(e,t){var o=0;t.payloadUnitStartIndicator&&(o+=e[o]+1),"pat"===t.type?n(e.subarray(o),t):s(e.subarray(o),t)},n=function(t,n){n.section_number=t[7],n.last_section_number=t[8],e.pmtPid=(31&t[10])<<8|t[11],n.pmtPid=e.pmtPid},s=function(t,n){if(1&t[5]){for(e.programMapTable={video:null,audio:null,"timed-metadata":{}},a=3+((15&t[1])<<8|t[2])-4,s=12+((15&t[10])<<8|t[11]);s<a;){var s,a,o=t[s],i=(31&t[s+1])<<8|t[s+2];o===l.H264_STREAM_TYPE&&null===e.programMapTable.video?e.programMapTable.video=i:o===l.ADTS_STREAM_TYPE&&null===e.programMapTable.audio?e.programMapTable.audio=i:o===l.METADATA_STREAM_TYPE&&(e.programMapTable["timed-metadata"][i]=o),s+=5+((15&t[s+3])<<8|t[s+4])}n.programMapTable=e.programMapTable}},this.push=function(e){var n={},s=4;if(n.payloadUnitStartIndicator=!!(64&e[1]),n.pid=31&e[1],n.pid<<=8,n.pid|=e[2],1<(48&e[3])>>>4&&(s+=e[s]+1),0===n.pid)n.type="pat",t(e.subarray(s),n),this.trigger("data",n);else if(n.pid===this.pmtPid)for(n.type="pmt",t(e.subarray(s),n),this.trigger("data",n);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([e,s,n]):this.processPes_(e,s,n)},this.processPes_=function(e,t,n){n.pid===this.programMapTable.video?n.streamType=l.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=l.ADTS_STREAM_TYPE:n.streamType=this.programMapTable["timed-metadata"][n.pid],n.type="pes",n.data=e.subarray(t),this.trigger("data",n)}}).prototype=new a,k.STREAM_TYPES={h264:27,adts:15},(G=function(){function e(e,t,n){var a,r,c=new Uint8Array(e.size),s={type:t},i=0,l=0;if(e.data.length&&!(e.size<9)){for(s.trackId=e.data[0].pid,i=0;i<e.data.length;i++)r=e.data[i],c.set(r.data,l),l+=r.data.byteLength;!function(e,t){var n,s=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1==s&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!=(4&e[6]),192&(n=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&n&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(c,s),a="video"===t||s.packetLength<=e.size,(n||a)&&(e.size=0,e.data.length=0),a&&o.trigger("data",s)}}var t,o=this,n={data:[],size:0},s={data:[],size:0},i={data:[],size:0};G.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var t,o;switch(a.streamType){case l.H264_STREAM_TYPE:t=n,o="video";break;case l.ADTS_STREAM_TYPE:t=s,o="audio";break;case l.METADATA_STREAM_TYPE:t=i,o="timed-metadata";break;default:return}a.payloadUnitStartIndicator&&e(t,o,!0),t.data.push(a),t.size+=a.data.byteLength},pmt:function(){var e={type:"metadata",tracks:[]};null!==(t=a.programMapTable).video&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.video,codec:"avc",type:"video"}),null!==t.audio&&e.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+t.audio,codec:"adts",type:"audio"}),o.trigger("data",e)}}[a.type]())},this.reset=function(){n.size=0,n.data.length=0,s.size=0,s.data.length=0,this.trigger("reset")},this.flushStreams_=function(){e(n,"video"),e(s,"audio"),e(i,"timed-metadata")},this.flush=function(){this.flushStreams_(),this.trigger("done")}}).prototype=new a,Q={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Y,TransportParseStream:k,ElementaryStream:G,TimestampRolloverStream:Je,CaptionStream:j.CaptionStream,Cea608Stream:j.Cea608Stream,Cea708Stream:j.Cea708Stream,MetadataStream:Ze};for(N in l)l.hasOwnProperty(N)&&(Q[N]=l[N]);var Z,r=Q,Ft=v,it=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(Z=function(e){var t,n=0;Z.prototype.init.call(this),this.push=function(s){var i,a,r,c,l,d,o=0;if(e||(n=0),"audio"===s.type)for(t?(a=t,(t=new Uint8Array(a.byteLength+s.data.byteLength)).set(a),t.set(s.data,a.byteLength)):t=s.data;o+5<t.length;)if(255===t[o]&&240==(246&t[o+1])){if(l=2*(1&~t[o+1]),c=(3&t[o+3])<<11|t[o+4]<<3|(224&t[o+5])>>5,r=(d=1024*(1+(3&t[o+6])))*Ft/it[(60&t[o+2])>>>2],i=o+c,t.byteLength<i)return;if(this.trigger("data",{pts:s.pts+n*r,dts:s.dts+n*r,sampleCount:d,audioobjecttype:1+(t[o+2]>>>6&3),channelcount:(1&t[o+2])<<2|(192&t[o+3])>>>6,samplerate:it[(60&t[o+2])>>>2],samplingfrequencyindex:(60&t[o+2])>>>2,samplesize:16,data:t.subarray(o+7+l,i)}),n++,t.byteLength===i)return void(t=void 0);t=t.subarray(i)}else o++},this.flush=function(){n=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new a,y=Z,dt=function(e){var n=e.byteLength,s=0,t=0;this.length=function(){return 8*n},this.bitsAvailable=function(){return 8*n+t},this.loadWord=function(){var i=e.byteLength-n,a=new Uint8Array(4),o=Math.min(4,n);if(0===o)throw new Error("no bytes available");a.set(e.subarray(i,i+o)),s=new DataView(a.buffer).getUint32(0),t=8*o,n-=o},this.skipBits=function(e){var o;e<t||(e-=t,e-=8*(o=Math.floor(e/8)),n-=o,this.loadWord()),s<<=e,t-=e},this.readBits=function(e){var o=Math.min(t,e),i=s>>>32-o;return 0<(t-=o)?s<<=o:0<n&&this.loadWord(),0<(o=e-o)?i<<o|this.readBits(o):i},this.skipLeadingZeros=function(){var e;for(e=0;e<t;++e)if(0!=(s&2147483648>>>e))return s<<=e,t-=e,e;return this.loadWord(),e+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var e=this.skipLeadingZeros();return this.readBits(e+1)-1},this.readExpGolomb=function(){var e=this.readUnsignedExpGolomb();return 1&e?1+e>>>1:-1*(e>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()},(F=function(){var e,t,n=0;F.prototype.init.call(this),this.push=function(s){for(var o,i=(t=t?((o=new Uint8Array(t.byteLength+s.data.byteLength)).set(t),o.set(s.data,t.byteLength),o):s.data).byteLength;n<i-3;n++)if(1===t[n+2]){e=n+5;break}for(;e<i;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}for(n+3!==e-2&&this.trigger("data",t.subarray(n+3,e-2));1!==t[++e]&&e<i;);n=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(n+3,e-2)),n=e-2,e+=3;break;default:e+=3}t=t.subarray(n),e-=n,n=0},this.reset=function(){t=null,n=0,this.trigger("reset")},this.flush=function(){t&&3<t.byteLength&&this.trigger("data",t.subarray(n+3)),t=null,n=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new a,ct={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(J=function(){var t,n,s,o,i,a,r,e=new F;J.prototype.init.call(this),(t=this).push=function(t){"video"===t.type&&(s=t.trackId,o=t.pts,i=t.dts,e.push(t))},e.on("data",function(e){var r={trackId:s,pts:o,dts:i,data:e};switch(31&e[0]){case 5:r.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:r.nalUnitType="sei_rbsp",r.escapedRBSP=n(e.subarray(1));break;case 7:r.nalUnitType="seq_parameter_set_rbsp",r.escapedRBSP=n(e.subarray(1)),r.config=a(r.escapedRBSP);break;case 8:r.nalUnitType="pic_parameter_set_rbsp";break;case 9:r.nalUnitType="access_unit_delimiter_rbsp"}t.trigger("data",r)}),e.on("done",function(){t.trigger("done")}),e.on("partialdone",function(){t.trigger("partialdone")}),e.on("reset",function(){t.trigger("reset")}),e.on("endedtimeline",function(){t.trigger("endedtimeline")}),this.flush=function(){e.flush()},this.partialFlush=function(){e.partialFlush()},this.reset=function(){e.reset()},this.endTimeline=function(){e.endTimeline()},r=function(e,t){var s,o=8,n=8;for(s=0;s<e;s++)0!==n&&(n=(o+t.readExpGolomb()+256)%256),o=0===n?o:n},n=function(e){for(var s,o,i,a=e.byteLength,n=[],t=1;t<a-2;)0===e[t]&&0===e[t+1]&&3===e[t+2]?(n.push(t+2),t+=2):t++;if(0===n.length)return e;o=a-n.length,i=new Uint8Array(o),s=0;for(t=0;t<o;s++,t++)s===n[0]&&(s++,n.shift()),i[t]=e[s];return i},a=function(e){var t,n,s,o,i,a,c,l,d,u,h,m,f,p=0,g=0,v=0,b=0,j=1;if(o=(t=new dt(e)).readUnsignedByte(),a=t.readUnsignedByte(),f=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ct[o]&&(3===(i=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(h=3!==i?8:12,s=0;s<h;s++)t.readBoolean()&&r(s<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(m=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===m)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),c=t.readUnsignedExpGolomb(),s=0;s<c;s++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),l=t.readUnsignedExpGolomb(),d=t.readUnsignedExpGolomb(),0===(u=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(p=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),v=t.readUnsignedExpGolomb(),b=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:n=[1,1];break;case 2:n=[12,11];break;case 3:n=[10,11];break;case 4:n=[16,11];break;case 5:n=[40,33];break;case 6:n=[24,11];break;case 7:n=[20,11];break;case 8:n=[32,11];break;case 9:n=[80,33];break;case 10:n=[18,11];break;case 11:n=[15,11];break;case 12:n=[64,33];break;case 13:n=[160,99];break;case 14:n=[4,3];break;case 15:n=[3,2];break;case 16:n=[2,1];break;case 255:n=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}n&&(j=n[0]/n[1])}return{profileIdc:o,levelIdc:f,profileCompatibility:a,width:Math.ceil((16*(l+1)-2*p-2*g)*j),height:(2-u)*(d+1)*16-2*v-2*b,sarRatio:n}}}).prototype=new a;function ut(e,t){var n=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return n=0<=n?n:0,(16&e[t+5])>>4?n+20:n+10}var te,mt={H264Stream:J,NalByteStream:F},ft=function(e){var t=function e(t,n){return t.length-n<10||t[n]!=="I".charCodeAt(0)||t[n+1]!=="D".charCodeAt(0)||t[n+2]!=="3".charCodeAt(0)?n:e(t,n+=ut(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},St=ut,Ct=function(e,t){var n=(224&e[t+5])>>5,s=e[t+4]<<3;return 6144&e[t+3]|s|n};(te=function(){var e=new Uint8Array,t=0;te.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,a,r,c,o=0,s=0;for(e.length?(i=e.length,(e=new Uint8Array(n.byteLength+i)).set(e.subarray(0,i)),e.set(n,i)):e=n;3<=e.length-s;)if(e[s]!=="I".charCodeAt(0)||e[s+1]!=="D".charCodeAt(0)||e[s+2]!=="3".charCodeAt(0))if(255!=(255&e[s])||240!=(240&e[s+1]))s++;else{if(e.length-s<7)break;if(s+(o=Ct(e,s))>e.length)break;c={type:"audio",data:e.subarray(s,s+o),pts:t,dts:t},this.trigger("data",c),s+=o}else{if(e.length-s<10)break;if(s+(o=St(e,s))>e.length)break;r={type:"timed-metadata",data:e.subarray(s,s+o)},this.trigger("data",r),s+=o}a=e.length-s,e=0<a?e.subarray(s):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new a;function vt(e,t){var n;if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function oe(e,t,n,s,o,i){return{start:{dts:e,pts:e+(n-t)},end:{dts:e+(s-t),pts:e+(o-n)},prependedContentDuration:i,baseMediaDecodeTime:e}}var p,w,x,ae,Ot=te,z=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],S=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Et=mt.H264Stream,kt=ft,At=v;(w=function(e,t){var n=[],s=0,o=0,i=0,a=1/0;t=t||{},w.prototype.init.call(this),this.push=function(t){g(e,t),e&&z.forEach(function(n){e[n]=t[n]}),n.push(t)},this.setEarliestDts=function(e){o=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){i=e},this.flush=function(){var r,c,l,u,h,m,f;0!==n.length&&(r=ve(n,e,o),e.baseMediaDecodeTime=A(e,t.keepOriginalTimestamps),f=ge(e,r,i,a),e.samples=be(r),h=O(je(r)),n=[],c=M(s,[e]),l=new Uint8Array(c.byteLength+h.byteLength),s++,l.set(c),l.set(h,c.byteLength),d(e),m=Math.ceil(1024*At/e.samplerate),r.length&&(u=r.length*m,this.trigger("segmentTimingInfo",oe(me(e.baseMediaDecodeTime,e.samplerate),r[0].dts,r[0].pts,r[0].dts+u,r[0].pts+u,f||0)),this.trigger("timingInfo",{start:r[0].pts,end:r[0].pts+u})),this.trigger("data",{track:e,boxes:l})),this.trigger("done","AudioSegmentStream")},this.reset=function(){d(e),n=[],this.trigger("reset")}}).prototype=new a,(x=function(e,t){var o,i,a=0,n=[],s=[];t=t||{},x.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){g(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||o||(o=t.config,e.sps=[t.data],S.forEach(function(t){e[t]=o[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||i||(i=t.data,e.pps=[t.data]),n.push(t)},this.flush=function(){for(var o,i,r,c,l,u,h,m,p,f=0;n.length&&"access_unit_delimiter_rbsp"!==n[0].nalUnitType;)n.shift();if(0===n.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(m=pe(n),(o=fe(m))[0][0].keyFrame||((i=this.getGopForFusion_(n[0],e))?(f=i.duration,o.unshift(i),o.byteLength+=i.byteLength,o.nalCount+=i.nalCount,o.pts=i.pts,o.dts=i.dts,o.duration+=i.duration):o=he(o)),s.length){if(!(p=t.alignGopsAtEnd?this.alignGopsAtEnd_(o):this.alignGopsAtStart_(o)))return this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),n=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");d(e),o=p}g(e,o),e.samples=Xt(o),u=O(Yt(o)),e.baseMediaDecodeTime=A(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map(function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}})),h=o[0],r=o[o.length-1],this.trigger("segmentTimingInfo",oe(e.baseMediaDecodeTime,h.dts,h.pts,r.dts+r.duration,r.pts+r.duration,f)),this.trigger("timingInfo",{start:o[0].pts,end:o[o.length-1].pts+o[o.length-1].duration}),this.gopCache_.unshift({gop:o.pop(),pps:e.pps,sps:e.sps}),this.gopCache_.length=Math.min(6,this.gopCache_.length),n=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),c=M(a,[e]),l=new Uint8Array(c.byteLength+u.byteLength),a++,l.set(c),l.set(u,c.byteLength),this.trigger("data",{track:e,boxes:l}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),n=[],this.gopCache_.length=0,s.length=0,this.trigger("reset")},this.resetStream_=function(){d(e),i=o=void 0},this.getGopForFusion_=function(t){var n,s,o,i,a,r=1/0;for(a=0;a<this.gopCache_.length;a++)o=(i=this.gopCache_[a]).gop,e.pps&&vt(e.pps[0],i.pps[0])&&e.sps&&vt(e.sps[0],i.sps[0])&&(o.dts<e.timelineStartInfo.dts||-1e4<=(n=t.dts-o.dts-o.duration)&&n<=45e3&&(!s||n<r)&&(s=i,r=n));return s?s.gop:null},this.alignGopsAtStart_=function(e){var t,n,o,i,a,r,c,l;for(r=e.byteLength,c=e.nalCount,l=e.duration,i=n=0;i<s.length&&n<e.length&&(a=s[i],o=e[n],a.pts!==o.pts);)o.pts>a.pts?i++:(n++,r-=o.byteLength,c-=o.nalCount,l-=o.duration);return 0===n?e:n===e.length?null:((t=e.slice(n)).byteLength=r,t.duration=l,t.nalCount=c,t.pts=t[0].pts,t.dts=t[0].dts,t)},this.alignGopsAtEnd_=function(e){for(o=s.length-1,n=e.length-1,i=null,a=!1;0<=o&&0<=n;){if(r=s[o],c=e[n],r.pts===c.pts){a=!0;break}r.pts>c.pts?o--:(o===s.length-1&&(i=n),n--)}if(!a&&null===i)return null;if(0===(d=a?n:i))return e;var n,o,i,a,r,c,d,t=e.slice(d),l=t.reduce(function(e,t){return e.byteLength+=t.byteLength,e.duration+=t.duration,e.nalCount+=t.nalCount,e},{byteLength:0,duration:0,nalCount:0});return t.byteLength=l.byteLength,t.duration=l.duration,t.nalCount=l.nalCount,t.pts=t[0].pts,t.dts=t[0].dts,t},this.alignGopsWith=function(e){s=e}}).prototype=new a,(p=function(e,t){this.numberOfTracks=0,this.metadataStream=t,"undefined"!=typeof(e=e||{}).remux?this.remuxTracks=!!e.remux:this.remuxTracks=!0,"boolean"==typeof e.keepOriginalTimestamps?this.keepOriginalTimestamps=e.keepOriginalTimestamps:this.keepOriginalTimestamps=!1,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,p.prototype.init.call(this),this.push=function(e){return e.text?this.pendingCaptions.push(e):e.frames?this.pendingMetadata.push(e):(this.pendingTracks.push(e.track),this.pendingBytes+=e.boxes.byteLength,"video"===e.track.type&&(this.videoTrack=e.track,this.pendingBoxes.push(e.boxes)),void("audio"===e.track.type&&(this.audioTrack=e.track,this.pendingBoxes.unshift(e.boxes))))}}).prototype=new a,p.prototype.flush=function(e){var t,s,o,a,r=0,n={captions:[],captionStreams:{},metadata:[],info:{}},i=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==e&&"AudioSegmentStream"!==e)return;if(this.remuxTracks)return;if(0===this.pendingTracks.length)return this.emittedTracks++,void(this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}if(this.videoTrack?(i=this.videoTrack.timelineStartInfo.pts,S.forEach(function(e){n.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(i=this.audioTrack.timelineStartInfo.pts,z.forEach(function(e){n.info[e]=this.audioTrack[e]},this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?n.type=this.pendingTracks[0].type:n.type="combined",this.emittedTracks+=this.pendingTracks.length,a=ee(this.pendingTracks),n.initSegment=new Uint8Array(a.byteLength),n.initSegment.set(a),n.data=new Uint8Array(this.pendingBytes),t=0;t<this.pendingBoxes.length;t++)n.data.set(this.pendingBoxes[t],r),r+=this.pendingBoxes[t].byteLength;for(t=0;t<this.pendingCaptions.length;t++)(s=this.pendingCaptions[t]).startTime=_(s.startPts,i,this.keepOriginalTimestamps),s.endTime=_(s.endPts,i,this.keepOriginalTimestamps),n.captionStreams[s.stream]=!0,n.captions.push(s);for(t=0;t<this.pendingMetadata.length;t++)(o=this.pendingMetadata[t]).cueTime=_(o.pts,i,this.keepOriginalTimestamps),n.metadata.push(o);for(n.metadata.dispatchType=this.metadataStream.dispatchType,this.pendingTracks.length=0,this.videoTrack=null,this.pendingBoxes.length=0,this.pendingCaptions.length=0,this.pendingBytes=0,this.pendingMetadata.length=0,this.trigger("data",n),t=0;t<n.captions.length;t++)s=n.captions[t],this.trigger("caption",s);for(t=0;t<n.metadata.length;t++)o=n.metadata[t],this.trigger("id3Frame",o)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},p.prototype.setRemux=function(e){this.remuxTracks=e},(ae=function(e){var n,s,t=this,o=!0;ae.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var o={};(this.transmuxPipeline_=o).type="aac",o.metadataStream=new r.MetadataStream,o.aacStream=new Ot,o.audioTimestampRolloverStream=new r.TimestampRolloverStream("audio"),o.timedMetadataTimestampRolloverStream=new r.TimestampRolloverStream("timed-metadata"),o.adtsStream=new y,o.coalesceStream=new p(e,o.metadataStream),o.headOfPipeline=o.aacStream,o.aacStream.pipe(o.audioTimestampRolloverStream).pipe(o.adtsStream),o.aacStream.pipe(o.timedMetadataTimestampRolloverStream).pipe(o.metadataStream).pipe(o.coalesceStream),o.metadataStream.on("timestamp",function(e){o.aacStream.setTimestamp(e.timeStamp)}),o.aacStream.on("data",function(i){"timed-metadata"!==i.type&&"audio"!==i.type||o.audioSegmentStream||(n=n||{timelineStartInfo:{baseMediaDecodeTime:t.baseMediaDecodeTime},codec:"adts",type:"audio"},o.coalesceStream.numberOfTracks++,o.audioSegmentStream=new w(n,e),o.audioSegmentStream.on("timingInfo",t.trigger.bind(t,"audioTimingInfo")),o.adtsStream.pipe(o.audioSegmentStream).pipe(o.coalesceStream),t.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!s}))}),o.coalesceStream.on("data",this.trigger.bind(this,"data")),o.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var o={};(this.transmuxPipeline_=o).type="ts",o.metadataStream=new r.MetadataStream,o.packetStream=new r.TransportPacketStream,o.parseStream=new r.TransportParseStream,o.elementaryStream=new r.ElementaryStream,o.timestampRolloverStream=new r.TimestampRolloverStream,o.adtsStream=new y,o.h264Stream=new Et,o.captionStream=new r.CaptionStream(e),o.coalesceStream=new p(e,o.metadataStream),o.headOfPipeline=o.packetStream,o.packetStream.pipe(o.parseStream).pipe(o.elementaryStream).pipe(o.timestampRolloverStream),o.timestampRolloverStream.pipe(o.h264Stream),o.timestampRolloverStream.pipe(o.adtsStream),o.timestampRolloverStream.pipe(o.metadataStream).pipe(o.coalesceStream),o.h264Stream.pipe(o.captionStream).pipe(o.coalesceStream),o.elementaryStream.on("data",function(i){var a;if("metadata"===i.type){for(a=i.tracks.length;a--;)s||"video"!==i.tracks[a].type?n||"audio"!==i.tracks[a].type||((n=i.tracks[a]).timelineStartInfo.baseMediaDecodeTime=t.baseMediaDecodeTime):(s=i.tracks[a]).timelineStartInfo.baseMediaDecodeTime=t.baseMediaDecodeTime;s&&!o.videoSegmentStream&&(o.coalesceStream.numberOfTracks++,o.videoSegmentStream=new x(s,e),o.videoSegmentStream.on("timelineStartInfo",function(s){n&&!e.keepOriginalTimestamps&&(n.timelineStartInfo=s,o.audioSegmentStream.setEarliestDts(s.dts-t.baseMediaDecodeTime))}),o.videoSegmentStream.on("processedGopsInfo",t.trigger.bind(t,"gopInfo")),o.videoSegmentStream.on("segmentTimingInfo",t.trigger.bind(t,"videoSegmentTimingInfo")),o.videoSegmentStream.on("baseMediaDecodeTime",function(e){n&&o.audioSegmentStream.setVideoBaseMediaDecodeTime(e)}),o.videoSegmentStream.on("timingInfo",t.trigger.bind(t,"videoTimingInfo")),o.h264Stream.pipe(o.videoSegmentStream).pipe(o.coalesceStream)),n&&!o.audioSegmentStream&&(o.coalesceStream.numberOfTracks++,o.audioSegmentStream=new w(n,e),o.audioSegmentStream.on("timingInfo",t.trigger.bind(t,"audioTimingInfo")),o.audioSegmentStream.on("segmentTimingInfo",t.trigger.bind(t,"audioSegmentTimingInfo")),o.adtsStream.pipe(o.audioSegmentStream).pipe(o.coalesceStream)),t.trigger("trackinfo",{hasAudio:!!n,hasVideo:!!s})}}),o.coalesceStream.on("data",this.trigger.bind(this,"data")),o.coalesceStream.on("id3Frame",function(e){e.dispatchType=o.metadataStream.dispatchType,t.trigger("id3Frame",e)}),o.coalesceStream.on("caption",this.trigger.bind(this,"caption")),o.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var o=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=t),n&&(n.timelineStartInfo.dts=void 0,n.timelineStartInfo.pts=void 0,d(n),o.audioTimestampRolloverStream&&o.audioTimestampRolloverStream.discontinuity()),s&&(o.videoSegmentStream&&(o.videoSegmentStream.gopCache_=[]),s.timelineStartInfo.dts=void 0,s.timelineStartInfo.pts=void 0,d(s),o.captionStream.reset()),o.timestampRolloverStream&&o.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){n&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var n=this.transmuxPipeline_;e.remux=t,n&&n.coalesceStream&&n.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){s&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.push=function(e){if(o){var t=kt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),o=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){o=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()},this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new a;function se(e,t){var n=[],i=0,a=0,r=0,c=1/0,s=null,o=null;t=t||{},se.prototype.init.call(this),this.push=function(t){g(e,t),e&&z.forEach(function(n){e[n]=t[n]}),n.push(t)},this.setEarliestDts=function(e){a=e},this.setVideoBaseMediaDecodeTime=function(e){c=e},this.setAudioAppendStart=function(e){r=e},this.processFrames_=function(){var l,u,h,m,f;0!==n.length&&0!==(l=ve(n,e,a)).length&&(e.baseMediaDecodeTime=A(e,t.keepOriginalTimestamps),ge(e,l,r,c),e.samples=be(l),h=O(je(l)),n=[],u=M(i,[e]),i++,e.initSegment=ee([e]),(m=new Uint8Array(u.byteLength+h.byteLength)).set(u),m.set(h,u.byteLength),d(e),null===s&&(o=s=l[0].pts),o+=l.length*(1024*Tt/e.samplerate),f={start:s},this.trigger("timingInfo",f),this.trigger("data",{track:e,boxes:m}))},this.flush=function(){this.processFrames_(),this.trigger("timingInfo",{start:s,end:o}),this.resetTiming_(),this.trigger("done","AudioSegmentStream")},this.partialFlush=function(){this.processFrames_(),this.trigger("partialdone","AudioSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","AudioSegmentStream")},this.resetTiming_=function(){d(e),o=s=null},this.reset=function(){this.resetTiming_(),n=[],this.trigger("reset")}}var Mt={Transmuxer:ae,VideoSegmentStream:x,AudioSegmentStream:w,AUDIO_PROPERTIES:z,VIDEO_PROPERTIES:S,generateSegmentTimingInfo:oe},ot={Adts:y,h264:mt},Tt=v;se.prototype=new a;function R(e,t){var o,a,c,l=0,n=[],s=[],i=null,r=null,u=!0;t=t||{},R.prototype.init.call(this),this.push=function(t){g(e,t),"undefined"==typeof e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),"seq_parameter_set_rbsp"!==t.nalUnitType||a||(a=t.config,e.sps=[t.data],S.forEach(function(t){e[t]=a[t]},this)),"pic_parameter_set_rbsp"!==t.nalUnitType||c||(c=t.data,e.pps=[t.data]),n.push(t)},this.processNals_=function(a){for(n=s.concat(n);n.length&&"access_unit_delimiter_rbsp"!==n[0].nalUnitType;)n.shift();if(0!==n.length){var h,m,f,p,v,c=pe(n);if(c.length)if(s=c[c.length-1],a&&(c.pop(),c.duration-=s.duration,c.nalCount-=s.length,c.byteLength-=s.byteLength),c.length){if(this.trigger("timelineStartInfo",e.timelineStartInfo),u){if(!(o=fe(c))[0][0].keyFrame){if(!(o=he(o))[0][0].keyFrame)return n=[].concat.apply([],c).concat(s),void(s=[]);(c=[].concat.apply([],o)).duration=o.duration}u=!1}for(null===i&&(i=c[0].pts,r=i),r+=c.duration,this.trigger("timingInfo",{start:i,end:r}),m=0;m<c.length;m++)h=c[m],e.samples=qt(h),v=O(Wt(h)),d(e),g(e,h),e.baseMediaDecodeTime=A(e,t.keepOriginalTimestamps),f=M(l,[e]),l++,e.initSegment=ee([e]),p=new Uint8Array(f.byteLength+v.byteLength),p.set(f),p.set(v,f.byteLength),this.trigger("data",{track:e,boxes:p,sequence:l,videoFrameDts:h.dts,videoFramePts:h.pts});n=[]}else n=[]}},this.resetTimingAndConfig_=function(){c=a=void 0,r=i=null},this.partialFlush=function(){this.processNals_(!0),this.trigger("partialdone","VideoSegmentStream")},this.flush=function(){this.processNals_(!1),this.resetTimingAndConfig_(),this.trigger("done","VideoSegmentStream")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline","VideoSegmentStream")},this.reset=function(){this.resetTimingAndConfig_(),s=[],n=[],u=!0,this.trigger("reset")}}L=se,R.prototype=new a;function Ae(e){return e.prototype=new a,e.prototype.init.call(e),e}function Ee(e,t){e.on("data",t.trigger.bind(t,"data")),e.on("done",t.trigger.bind(t,"done")),e.on("partialdone",t.trigger.bind(t,"partialdone")),e.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),e.on("audioTimingInfo",t.trigger.bind(t,"audioTimingInfo")),e.on("videoTimingInfo",t.trigger.bind(t,"videoTimingInfo")),e.on("trackinfo",t.trigger.bind(t,"trackinfo")),e.on("id3Frame",function(n){n.dispatchType=e.metadataStream.dispatchType,n.cueTime=o(n.pts),t.trigger("id3Frame",n)}),e.on("caption",function(e){t.trigger("caption",e)})}function U(e){var t=null,n=!0;e=e||{},U.prototype.init.call(this),e.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.push=function(s){if(n){var o=ye(s);!o||t&&"aac"===t.type?o||t&&"ts"===t.type||(t=function(e){var t={type:"ts",tracks:{audio:null,video:null},packet:new r.TransportPacketStream,parse:new r.TransportParseStream,elementary:new r.ElementaryStream,timestampRollover:new r.TimestampRolloverStream,adts:new ot.Adts,h264:new ot.h264.H264Stream,captionStream:new r.CaptionStream(e),metadataStream:new r.MetadataStream};return t.headOfPipeline=t.packet,t.packet.pipe(t.parse).pipe(t.elementary).pipe(t.timestampRollover),t.timestampRollover.pipe(t.h264),t.h264.pipe(t.captionStream),t.timestampRollover.pipe(t.metadataStream),t.timestampRollover.pipe(t.adts),t.elementary.on("data",function(n){if("metadata"===n.type){for(var s=0;s<n.tracks.length;s++)t.tracks[n.tracks[s].type]||(t.tracks[n.tracks[s].type]=n.tracks[s],t.tracks[n.tracks[s].type].timelineStartInfo.baseMediaDecodeTime=e.baseMediaDecodeTime);t.tracks.video&&!t.videoSegmentStream&&(t.videoSegmentStream=new xe(t.tracks.video,e),t.videoSegmentStream.on("timelineStartInfo",function(n){t.tracks.audio&&!e.keepOriginalTimestamps&&t.audioSegmentStream.setEarliestDts(n.dts-e.baseMediaDecodeTime)}),t.videoSegmentStream.on("timingInfo",t.trigger.bind(t,"videoTimingInfo")),t.videoSegmentStream.on("data",function(e){t.trigger("data",{type:"video",data:e})}),t.videoSegmentStream.on("done",t.trigger.bind(t,"done")),t.videoSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.videoSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.h264.pipe(t.videoSegmentStream)),t.tracks.audio&&!t.audioSegmentStream&&(t.audioSegmentStream=new L(t.tracks.audio,e),t.audioSegmentStream.on("data",function(e){t.trigger("data",{type:"audio",data:e})}),t.audioSegmentStream.on("done",t.trigger.bind(t,"done")),t.audioSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.audioSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.audioSegmentStream.on("timingInfo",t.trigger.bind(t,"audioTimingInfo")),t.adts.pipe(t.audioSegmentStream)),t.trigger("trackinfo",{hasAudio:!!t.tracks.audio,hasVideo:!!t.tracks.video})}}),t.captionStream.on("data",function(n){var s=t.tracks.video&&t.tracks.video.timelineStartInfo.pts||0;n.startTime=_(n.startPts,s,e.keepOriginalTimestamps),n.endTime=_(n.endPts,s,e.keepOriginalTimestamps),t.trigger("caption",n)}),(t=Ae(t)).metadataStream.on("data",t.trigger.bind(t,"id3Frame")),t}(e),Ee(t,this)):(t=function(e){var t={type:"aac",tracks:{audio:null},metadataStream:new r.MetadataStream,aacStream:new Ot,audioRollover:new r.TimestampRolloverStream("audio"),timedMetadataRollover:new r.TimestampRolloverStream("timed-metadata"),adtsStream:new y(!0)};return t.headOfPipeline=t.aacStream,t.aacStream.pipe(t.audioRollover).pipe(t.adtsStream),t.aacStream.pipe(t.timedMetadataRollover).pipe(t.metadataStream),t.metadataStream.on("timestamp",function(e){t.aacStream.setTimestamp(e.timeStamp)}),t.aacStream.on("data",function(n){"timed-metadata"!==n.type&&"audio"!==n.type||t.audioSegmentStream||(t.tracks.audio=t.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:e.baseMediaDecodeTime},codec:"adts",type:"audio"},t.audioSegmentStream=new L(t.tracks.audio,e),t.audioSegmentStream.on("data",function(e){t.trigger("data",{type:"audio",data:e})}),t.audioSegmentStream.on("partialdone",t.trigger.bind(t,"partialdone")),t.audioSegmentStream.on("done",t.trigger.bind(t,"done")),t.audioSegmentStream.on("endedtimeline",t.trigger.bind(t,"endedtimeline")),t.audioSegmentStream.on("timingInfo",t.trigger.bind(t,"audioTimingInfo")),t.adtsStream.pipe(t.audioSegmentStream),t.trigger("trackinfo",{hasAudio:!!t.tracks.audio,hasVideo:!!t.tracks.video}))}),(t=Ae(t)).metadataStream.on("data",t.trigger.bind(t,"id3Frame")),t}(e),Ee(t,this)),n=!1}t.headOfPipeline.push(s)},this.flush=function(){t&&(n=!0,t.headOfPipeline.flush())},this.partialFlush=function(){t&&t.headOfPipeline.partialFlush()},this.endTimeline=function(){t&&t.headOfPipeline.endTimeline()},this.reset=function(){t&&t.headOfPipeline.reset()},this.setBaseMediaDecodeTime=function(n){e.keepOriginalTimestamps||(e.baseMediaDecodeTime=n),t&&(t.tracks.audio&&(t.tracks.audio.timelineStartInfo.dts=void 0,t.tracks.audio.timelineStartInfo.pts=void 0,d(t.tracks.audio),t.audioRollover&&t.audioRollover.discontinuity()),t.tracks.video&&(t.videoSegmentStream&&(t.videoSegmentStream.gopCache_=[]),t.tracks.video.timelineStartInfo.dts=void 0,t.tracks.video.timelineStartInfo.pts=void 0,d(t.tracks.video)),t.timestampRollover&&t.timestampRollover.discontinuity())},this.setRemux=function(n){e.remux=n,t&&t.coalesceStream&&t.coalesceStream.setRemux(n)},this.setAudioAppendStart=function(e){t&&t.tracks.audio&&t.audioSegmentStream&&t.audioSegmentStream.setAudioAppendStart(e)},this.alignGopsWith=function(){}}xe=R,ye=ft,U.prototype=new a;function It(e,t){for(var n,o=e,s=0;s<t.length;s++){if(n=t[s],o<n.size)return n;o-=n.size}return null}function Bt(e,t){var o=b(e,["moof","traf"]),i=b(e,["mdat"]),n={},s=[];return i.forEach(function(e,t){var n=o[t];s.push({mdat:e,traf:n})}),s.forEach(function(e){var i,l=e.mdat,o=e.traf,d=b(o,["tfhd"]),a=Zt(d[0]),s=a.trackId,r=b(o,["tfdt"]),u=0<r.length?Gt(r[0]).baseMediaDecodeTime:0,c=b(o,["trun"]);t===s&&0<c.length&&(i=function(e,t,n){var s,o,i,a,r,c,d=new DataView(e.buffer,e.byteOffset,e.byteLength),l=[];for(s=0;s+4<e.length;s+=i)if(i=d.getUint32(s),s+=4,!(i<=0))switch(31&e[s]){case 6:if(c=e.subarray(s+1,s+1+i),a=It(s,t),o={nalUnitType:"sei_rbsp",size:i,data:c,escapedRBSP:Jt(c),trackId:n},a)o.pts=a.pts,o.dts=a.dts,r=a;else{if(!r)break;o.pts=r.pts,o.dts=r.dts}l.push(o)}return l}(l,function(e,t,n){var s=t,i=n.defaultSampleDuration||0,a=n.defaultSampleSize||0,r=n.trackId,o=[];return e.forEach(function(e){var t=Qt(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=i),void 0===e.size&&(e.size=a),e.trackId=r,e.dts=s,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=s+e.compositionTimeOffset,s+=e.duration}),o=o.concat(t)}),o}(c,u,a),s),n[s]||(n[s]=[]),n[s]=n[s].concat(i))}),n}function ne(e){return"AudioSegmentStream"===e?"audio":"VideoSegmentStream"===e?"video":""}var $t=U,Ve=function(e){return e>>>0},Ut=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),t+=String.fromCharCode(e[2]),t+=String.fromCharCode(e[3])},Kt=Ve,b=function e(t,n){var s,o,a,r,c,i=[];if(!n.length)return null;for(s=0;s<t.byteLength;)a=Kt(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]),r=Ut(t.subarray(s+4,s+8)),o=1<a?s+a:t.byteLength,r===n[0]&&(1===n.length?i.push(t.subarray(s+8,o)):(c=e(t.subarray(s+8,o),n.slice(1))).length&&(i=i.concat(c))),s=o;return i},le=Ve,Gt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:le(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=le(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t},de=function(e){return{isLeading:(12&e[0])>>>2,dependsOn:3&e[0],isDependedOn:(192&e[1])>>>6,hasRedundancy:(48&e[1])>>>4,paddingValue:(14&e[1])>>>1,isNonSyncSample:1&e[1],degradationPriority:e[2]<<8|e[3]}},Qt=function(e){var n,s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},o=new DataView(e.buffer,e.byteOffset,e.byteLength),l=1&s.flags[2],d=4&s.flags[2],a=1&s.flags[1],r=2&s.flags[1],u=4&s.flags[1],c=8&s.flags[1],i=o.getUint32(4),t=8;for(l&&(s.dataOffset=o.getInt32(t),t+=4),d&&i&&(n={flags:de(e.subarray(t,t+4))},t+=4,a&&(n.duration=o.getUint32(t),t+=4),r&&(n.size=o.getUint32(t),t+=4),c&&(1===s.version?n.compositionTimeOffset=o.getInt32(t):n.compositionTimeOffset=o.getUint32(t),t+=4),s.samples.push(n),i--);i--;)n={},a&&(n.duration=o.getUint32(t),t+=4),r&&(n.size=o.getUint32(t),t+=4),u&&(n.flags=de(e.subarray(t,t+4)),t+=4),c&&(1===s.version?n.compositionTimeOffset=o.getInt32(t):n.compositionTimeOffset=o.getUint32(t),t+=4),s.samples.push(n);return s},Zt=function(e){var n,s=new DataView(e.buffer,e.byteOffset,e.byteLength),t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:s.getUint32(4)},o=1&t.flags[2],i=2&t.flags[2],a=8&t.flags[2],r=16&t.flags[2],c=32&t.flags[2],l=65536&t.flags[0],d=131072&t.flags[0];return n=8,o&&(n+=4,t.baseDataOffset=s.getUint32(12),n+=4),i&&(t.sampleDescriptionIndex=s.getUint32(n),n+=4),a&&(t.defaultSampleDuration=s.getUint32(n),n+=4),r&&(t.defaultSampleSize=s.getUint32(n),n+=4),c&&(t.defaultSampleFlags=s.getUint32(n)),l&&(t.durationIsEmpty=!0),!o&&d&&(t.baseDataOffsetIsMoof=!0),t},Jt=xt,en=j.CaptionStream,tn=function(){var e,t,n,s,o,i,a=!1;this.isInitialized=function(){return a},this.init=function(e){s=new en,a=!0,i=!!e&&e.isPartial,s.on("data",function(e){e.startTime=e.startPts/t,e.endTime=e.endPts/t,n.captions.push(e),n.captionStreams[e.stream]=!0})},this.isNewInit=function(n,s){return!(n&&0===n.length||s&&"object"==typeof s&&0===Object.keys(s).length)&&(e!==n[0]||t!==s[e])},this.parse=function(s,i,a){if(!this.isInitialized())return null;if(!i||!a)return null;if(this.isNewInit(i,a))e=i[0],t=a[e];else if(null===e||!t)return o.push(s),null;for(;0<o.length;){var r,c=o.shift();this.parse(c,i,a)}return null!==(r=function(e,t,n){return null===t?null:{seiNals:Bt(e,t)[t],timescale:n}}(s,e,t))&&r.seiNals?(this.pushNals(r.seiNals),this.flushStream(),n):null},this.pushNals=function(e){if(!this.isInitialized()||!e||0===e.length)return null;e.forEach(function(e){s.push(e)})},this.flushStream=function(){if(!this.isInitialized())return null;i?s.partialFlush():s.flush()},this.clearParsedCaptions=function(){n.captions=[],n.captionStreams={}},this.resetCaptionStream=function(){if(!this.isInitialized())return null;s.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){o=[],t=e=null,n?this.clearParsedCaptions():n={captions:[],captionStreams:{}},this.resetCaptionStream()},this.reset()},Ce=function(){function t(e,t){this.options=t||{},this.self=e,this.init()}var e=t.prototype;return e.init=function(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=this.options.handlePartialData?new $t(this.options):new Mt.Transmuxer(this.options),this.options.handlePartialData?function(e,t){t.on("data",function(t){var s={data:t.data.track.initSegment.buffer,byteOffset:t.data.track.initSegment.byteOffset,byteLength:t.data.track.initSegment.byteLength},n={boxes:{data:t.data.boxes.buffer,byteOffset:t.data.boxes.byteOffset,byteLength:t.data.boxes.byteLength},initSegment:s,type:t.type,sequence:t.data.sequence};"undefined"!=typeof t.data.videoFrameDts&&(n.videoFrameDtsTime=o(t.data.videoFrameDts)),"undefined"!=typeof t.data.videoFramePts&&(n.videoFramePtsTime=o(t.data.videoFramePts)),e.postMessage({action:"data",segment:n},[n.boxes.data,n.initSegment.data])}),t.on("id3Frame",function(t){e.postMessage({action:"id3Frame",id3Frame:t})}),t.on("caption",function(t){e.postMessage({action:"caption",caption:t})}),t.on("done",function(t){e.postMessage({action:"done",type:ne(t)})}),t.on("partialdone",function(t){e.postMessage({action:"partialdone",type:ne(t)})}),t.on("endedsegment",function(t){e.postMessage({action:"endedSegment",type:ne(t)})}),t.on("trackinfo",function(t){e.postMessage({action:"trackinfo",trackInfo:t})}),t.on("audioTimingInfo",function(t){if(null!==t.start){var n={start:o(t.start)};t.end&&(n.end=o(t.end)),e.postMessage({action:"audioTimingInfo",audioTimingInfo:n})}else e.postMessage({action:"audioTimingInfo",audioTimingInfo:t})}),t.on("videoTimingInfo",function(t){var n={start:o(t.start)};t.end&&(n.end=o(t.end)),e.postMessage({action:"videoTimingInfo",videoTimingInfo:n})})}(this.self,this.transmuxer):function(e,t){t.on("data",function(t){var n,s=t.initSegment;t.initSegment={data:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength},n=t.data,t.data=n.buffer,e.postMessage({action:"data",segment:t,byteOffset:n.byteOffset,byteLength:n.byteLength},[t.data])}),t.on("done",function(){e.postMessage({action:"done"})}),t.on("gopInfo",function(t){e.postMessage({action:"gopInfo",gopInfo:t})}),t.on("videoSegmentTimingInfo",function(t){var n={start:{decode:o(t.start.dts),presentation:o(t.start.pts)},end:{decode:o(t.end.dts),presentation:o(t.end.pts)},baseMediaDecodeTime:o(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=o(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:n})}),t.on("audioSegmentTimingInfo",function(t){var n={start:{decode:o(t.start.dts),presentation:o(t.start.pts)},end:{decode:o(t.end.dts),presentation:o(t.end.pts)},baseMediaDecodeTime:o(t.baseMediaDecodeTime)};t.prependedContentDuration&&(n.prependedContentDuration=o(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:n})}),t.on("id3Frame",function(t){e.postMessage({action:"id3Frame",id3Frame:t})}),t.on("caption",function(t){e.postMessage({action:"caption",caption:t})}),t.on("trackinfo",function(t){e.postMessage({action:"trackinfo",trackInfo:t})}),t.on("audioTimingInfo",function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:o(t.start),end:o(t.end)}})}),t.on("videoTimingInfo",function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:o(t.start),end:o(t.end)}})})}(this.self,this.transmuxer)},e.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new tn,this.captionParser.init());var t=new Uint8Array(e.data,e.byteOffset,e.byteLength),n=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:n&&n.captions||[],data:t.buffer},[t.buffer])},e.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()},e.clearParsedMp4Captions=function(){this.captionParser&&this.captionParser.clearParsedCaptions()},e.push=function(e){var t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)},e.reset=function(){this.transmuxer.reset()},e.setTimestampOffset=function(e){var t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(ue(t)))},e.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(ue(e.appendStart)))},e.setRemux=function(e){this.transmuxer.setRemux(e.remux)},e.flush=function(){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})},e.partialFlush=function(){this.transmuxer.partialFlush(),self.postMessage({action:"partialdone",type:"transmuxed"})},e.endTimeline=function(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})},e.alignGopsWith=function(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())},t}();self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new Ce(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new Ce(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}}))),Pa=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():Vr(e.currentTransmux))},Ha=function(e){jd("reset",e)},fu=function(e){var n,t=new uu;return t.currentTransmux=null,t.transmuxQueue=[],n=t.terminate,t.terminate=function(){return t.currentTransmux=null,t.transmuxQueue.length=0,n.call(t)},t.postMessage({action:"init",options:e}),t},Tt=2,Ws=-101,to=-102,bu=J("CodecUtils"),Wn=J("PlaylistSelector"),no=function(t){function s(n){var o;if(o=t.call(this)||this,!n)throw new TypeError("Initialization settings are required");if("function"!=typeof n.currentTime)throw new TypeError("No currentTime getter specified");if(!n.mediaSource)throw new TypeError("No MediaSource specified");return o.bandwidth=n.bandwidth,o.throughput={rate:0,count:0},o.roundTrip=NaN,o.resetStats_(),o.mediaIndex=null,o.hasPlayed_=n.hasPlayed,o.currentTime_=n.currentTime,o.seekable_=n.seekable,o.seeking_=n.seeking,o.duration_=n.duration,o.mediaSource_=n.mediaSource,o.vhs_=n.vhs,o.loaderType_=n.loaderType,o.currentMediaInfo_=void 0,o.startingMediaInfo_=void 0,o.segmentMetadataTrack_=n.segmentMetadataTrack,o.goalBufferLength_=n.goalBufferLength,o.sourceType_=n.sourceType,o.sourceUpdater_=n.sourceUpdater,o.inbandTextTracks_=n.inbandTextTracks,o.state_="INIT",o.handlePartialData_=n.handlePartialData,o.timelineChangeController_=n.timelineChangeController,o.shouldSaveSegmentTimingInfo_=!0,o.parse708captions_=n.parse708captions,o.checkBufferTimeout_=null,o.error_=void 0,o.currentTimeline_=-1,o.pendingSegment_=null,o.xhrOptions_=null,o.pendingSegments_=[],o.audioDisabled_=!1,o.isPendingTimestampOffset_=!1,o.gopBuffer_=[],o.timeMapping_=0,o.safeAppend_=11<=e.browser.IE_VERSION,o.appendInitSegment_={audio:!0,video:!0},o.playlistOfLastInitSegment_={audio:null,video:null},o.callQueue_=[],o.loadQueue_=[],o.metadataQueue_={id3:[],caption:[]},o.waitingOnRemove_=!1,o.quotaExceededErrorRetryTimeout_=null,o.activeInitSegmentId_=null,o.initSegments_={},o.cacheEncryptionKeys_=n.cacheEncryptionKeys,o.keyCache_={},o.decrypter_=n.decrypter,o.syncController_=n.syncController,o.syncPoint_={segmentIndex:0,time:0},o.transmuxer_=o.createTransmuxer_(),o.triggerSyncInfoUpdate_=function(){return o.trigger("syncinfoupdate")},o.syncController_.on("syncinfoupdate",o.triggerSyncInfoUpdate_),o.mediaSource_.addEventListener("sourceopen",function(){o.isEndOfStream_()||(o.ended_=!1)}),o.fetchAtBuffer_=!1,o.logger_=J("SegmentLoader["+o.loaderType_+"]"),Object.defineProperty(Y(o),"state",{get:function(){return this.state_},set:function(e){e!==this.state_&&(this.logger_(this.state_+" -> "+e),this.state_=e,this.trigger("statechange"))}}),o.sourceUpdater_.on("ready",function(){o.hasEnoughInfoToAppend_()&&o.processCallQueue_()}),"main"===o.loaderType_&&o.timelineChangeController_.on("pendingtimelinechange",function(){o.hasEnoughInfoToAppend_()&&o.processCallQueue_()}),"audio"===o.loaderType_&&o.timelineChangeController_.on("timelinechange",function(){o.hasEnoughInfoToLoad_()&&o.processLoadQueue_(),o.hasEnoughInfoToAppend_()&&o.processCallQueue_()}),o}ie(s,t);var n=s.prototype;return n.createTransmuxer_=function(){return fu({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,handlePartialData:this.handlePartialData_,parse708captions:this.parse708captions_})},n.resetStats_=function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0},n.dispose=function(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&o.clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()},n.setAudio=function(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())},n.abort=function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)},n.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_),this.waitingOnRemove_=!1,o.clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null},n.checkForAbort_=function(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)},n.error=function(e){return"undefined"!=typeof e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Ha(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")},n.buffered_=function(){if(!this.sourceUpdater_||!this.startingMediaInfo_)return e.createTimeRanges();if("main"===this.loaderType_){var t=this.startingMediaInfo_,s=t.hasAudio,n=t.hasVideo,o=t.isMuxed;if(n&&s&&!this.audioDisabled_&&!o)return this.sourceUpdater_.buffered();if(n)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var s=zn(e),n=this.initSegments_[s];return t&&!n&&e.bytes&&(this.initSegments_[s]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e},n.segmentKey=function(e,t){if(void 0===t&&(t=!1),!e)return null;var s,o=mc(e),n=this.keyCache_[o];return this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[o]=n={resolvedUri:e.resolvedUri,bytes:e.bytes}),s={resolvedUri:(n||e).resolvedUri},n&&(s.bytes=n.bytes),s},n.couldBeginLoading_=function(){return this.playlist_&&!this.paused()},n.load=function(){if(this.monitorBuffer_(),this.playlist_)return"INIT"===this.state&&this.couldBeginLoading_()?this.init_():void(!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY"))},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.playlist=function(e,t){if(void 0===t&&(t={}),e){var o,i,n=this.playlist_,s=this.pendingSegment_;if(this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e)),o=null,n&&(n.id?o=n.id:n.uri&&(o=n.uri)),this.logger_("playlist update ["+o+" => "+(e.id||e.uri)+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!n||n.uri!==e.uri)return null===this.mediaIndex&&!this.handlePartialData_||this.resyncLoader(),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");i=e.mediaSequence-n.mediaSequence,this.logger_("live window shift ["+i+"]"),null!==this.mediaIndex&&(this.mediaIndex-=i),s&&(s.mediaIndex-=i,0<=s.mediaIndex&&(s.segment=e.segments[s.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(n,e)}},n.pause=function(){this.checkBufferTimeout_&&(o.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)},n.paused=function(){return null===this.checkBufferTimeout_},n.resetEverything=function(e){this.ended_=!1,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"})},n.resetLoader=function(){this.fetchAtBuffer_=!1,this.resyncLoader()},n.resyncLoader=function(){this.transmuxer_&&Ha(this.transmuxer_),this.mediaIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1,this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})},n.remove=function(e,t,n){if(void 0===n&&(n=function(){}),t===1/0&&(t=this.duration_()),this.sourceUpdater_&&this.startingMediaInfo_){var i,s=1,o=function(){0===--s&&n()};for(i in this.audioDisabled_||(s++,this.sourceUpdater_.removeAudio(e,t,o)),"main"===this.loaderType_&&(this.gopBuffer_=function(e,t,n,s){for(var o,r=Math.ceil((t-s)*Pt),c=Math.ceil((n-s)*Pt),a=e.slice(),i=e.length;i--&&!(e[i].pts<=c););if(-1===i)return a;for(o=i+1;o--&&!(e[o].pts<=r););return o=Math.max(o,0),a.splice(o,i-o+1),a}(this.gopBuffer_,e,t,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(e,t,o)),this.inbandTextTracks_)vt(e,t,this.inbandTextTracks_[i]);vt(e,t,this.segmentMetadataTrack_),o()}else this.logger_("skipping remove because no source updater or starting media info")},n.monitorBuffer_=function(){this.checkBufferTimeout_&&o.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=o.setTimeout(this.monitorBufferTick_.bind(this),1)},n.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&o.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=o.setTimeout(this.monitorBufferTick_.bind(this),500)},n.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.buffered_(),e=this.checkBuffer_(t,this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);e&&(e.timestampOffset=Ui({segmentTimeline:e.timeline,currentTimeline:this.currentTimeline_,startOfSegment:e.startOfSegment,buffered:t,overrideCheck:this.isPendingTimestampOffset_}),this.isPendingTimestampOffset_=!1,"number"==typeof e.timestampOffset&&this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),this.loadSegment_(e))}},n.isEndOfStream_=function(e,t){if(void 0===e&&(e=this.mediaIndex),void 0===t&&(t=this.playlist_),!t||!this.mediaSource_)return!1;var n=e+1===t.segments.length;return t.endList&&"open"===this.mediaSource_.readyState&&n},n.checkBuffer_=function(e,t,n,s,o,i){if(c=0,e.length&&(c=e.end(e.length-1)),u=Math.max(0,c-o),!t.segments.length)return null;if(u>=this.goalBufferLength_())return null;if(!s&&1<=u)return null;var r,c,l,d,u,m,f,a=null,h=!1;return null===i?(a=this.getSyncSegmentCandidate_(t),h=!0):null!==n?(d=t.segments[n],l=d&&d.end?d.end:c,a=n+1):this.fetchAtBuffer_?(m=B.getMediaInfoForTime(t,c,i.segmentIndex,i.time),a=m.mediaIndex,l=m.startTime):(f=B.getMediaInfoForTime(t,o,i.segmentIndex,i.time),a=f.mediaIndex,l=f.startTime),r=this.generateSegmentInfo_(t,a,l,h),!r||this.mediaSource_&&this.playlist_&&r.mediaIndex===this.playlist_.segments.length-1&&"ended"===this.mediaSource_.readyState&&!this.seeking_()?void 0:(this.logger_("checkBuffer_ returning "+r.uri,{segmentInfo:r,playlist:t,currentMediaIndex:n,nextMediaIndex:a,startOfSegment:l,isSyncRequest:h}),r)},n.getSyncSegmentCandidate_=function(e){var t,n=this;return-1===this.currentTimeline_?0:(t=e.segments.map(function(e,t){return{timeline:e.timeline,segmentIndex:t}}).filter(function(e){return e.timeline===n.currentTimeline_}),t.length?t[Math.min(t.length-1,1)].segmentIndex:Math.max(e.segments.length-1,0))},n.generateSegmentInfo_=function(e,t,n,s){if(t<0||t>=e.segments.length)return null;var a,r,o=e.segments[t],i=this.sourceUpdater_.audioBuffered(),c=this.sourceUpdater_.videoBuffered();return i.length&&(a=i.end(i.length-1)-this.sourceUpdater_.audioTimestampOffset()),c.length&&(r=function(e,t,n){if("undefined"==typeof t||null===t||!e.length)return[];var s,o=Math.ceil((t-n+3)*Pt);for(s=0;s<e.length&&!(e[s].pts>o);s++);return e.slice(s)}(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),{requestId:"segment-loader-"+Math.random(),uri:o.resolvedUri,mediaIndex:t,isSyncRequest:s,startOfSegment:n,playlist:e,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:o.timeline,duration:o.duration,segment:o,byteLength:0,transmuxer:this.transmuxer_,audioAppendStart:a,gopsToAlignWith:r}},n.earlyAbortWhenNeeded_=function(e){if(!this.vhs_.tech_.paused()&&this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)){var t,s,c,o=this.currentTime_(),i=e.bandwidth,a=this.pendingSegment_.duration,r=B.estimateSegmentRequestTime(a,i,this.playlist_,e.bytesReceived),n=function(e,t,n){return void 0===n&&(n=1),((e.length?e.end(e.length-1):0)-t)/n}(this.buffered_(),o,this.vhs_.tech_.playbackRate())-1;r<=n||(t=function(e){var t,n,i=e.master,a=e.currentTime,r=e.bandwidth,c=e.duration,l=e.segmentDuration,d=e.timeUntilRebuffer,u=e.currentTimeline,h=e.syncController,o=i.playlists.filter(function(e){return!B.isIncompatible(e)}),s=o.filter(B.isEnabled);return s.length||(s=o.filter(function(e){return!B.isDisabled(e)})),t=s.filter(B.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){var t=h.getSyncPoint(e,c,u,a)?1:2;return{playlist:e,rebufferingImpact:B.estimateSegmentRequestTime(l,r,e)*t-d}}),n=t.filter(function(e){return e.rebufferingImpact<=0}),pt(n,function(e,t){return Bs(t.playlist,e.playlist)}),n.length?n[0]:(pt(t,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),t[0]||null)}({master:this.vhs_.playlists.master,currentTime:o,bandwidth:i,duration:this.duration_(),segmentDuration:a,timeUntilRebuffer:n,currentTimeline:this.currentTimeline_,syncController:this.syncController_}),t&&(c=r-n-t.rebufferingImpact,s=.5,n<=Ue&&(s=1),!t.playlist||t.playlist.uri===this.playlist_.uri||c<s||(this.bandwidth=t.playlist.attributes.BANDWIDTH*w.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))))}},n.handleAbort_=function(){this.mediaRequestsAborted+=1},n.handleProgress_=function(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")},n.handleTrackInfo_=function(e,t){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||this.checkForIllegalMediaSwitch(t)||(t=t||{},function(e,t){if(!e&&!t||!e&&t||e&&!t)return!1;if(e===t)return!0;var n,s,o=Object.keys(e).sort(),i=Object.keys(t).sort();if(o.length!==i.length)return!1;for(n=0;n<o.length;n++){if(s=o[n],s!==i[n])return!1;if(e[s]!==t[s])return!1}return!0}(this.currentMediaInfo_,t)||(this.appendInitSegment_={audio:!0,video:!0},this.startingMediaInfo_=t,this.currentMediaInfo_=t,this.logger_("trackinfo update",t),this.trigger("trackinfo")),this.checkForAbort_(e.requestId)||(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()&&this.processCallQueue_()))},n.handleTimingInfo_=function(e,t,n,s){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId)){var o=this.pendingSegment_,i=ia(t);o[i]=o[i]||{},o[i][n]=s,this.logger_("timinginfo: "+t+" - "+n+" - "+s),this.hasEnoughInfoToAppend_()&&this.processCallQueue_()}},n.handleCaptions_=function(e,t){if(s=this,this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(0!==t.length)if(this.pendingSegment_.hasAppendedData_){var s,i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),n={};t.forEach(function(e){n[e.stream]=n[e.stream]||{startTime:1/0,captions:[],endTime:0};var t=n[e.stream];t.startTime=Math.min(t.startTime,e.startTime+i),t.endTime=Math.max(t.endTime,e.endTime+i),t.captions.push(e)}),Object.keys(n).forEach(function(e){var t=n[e],r=t.startTime,c=t.endTime,l=t.captions,a=s.inbandTextTracks_;s.logger_("adding cues from "+r+" -> "+c+" for "+e),function(e,t,n){if(!e[n]){t.trigger({type:"usage",name:"vhs-608"}),t.trigger({type:"usage",name:"hls-608"});var s=t.textTracks().getTrackById(n);e[n]=s||t.addRemoteTextTrack({kind:"captions",id:n,label:n},!1).track}}(a,s.vhs_.tech_,e),vt(r,c,a[e]),function(e){var s,i=e.inbandTextTracks,t=e.captionArray,n=e.timestampOffset;t&&(s=o.WebKitDataCue||o.VTTCue,t.forEach(function(e){var t=e.stream;i[t].addCue(new s(e.startTime+n,e.endTime+n,e.text))}))}({captionArray:l,inbandTextTracks:a,timestampOffset:i})}),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));else this.logger_("SegmentLoader received no captions from a caption event")},n.handleId3_=function(e,t,n){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(this.pendingSegment_.hasAppendedData_){var s=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();!function(e,t,n){e.metadataTrack_||(e.metadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,e.metadataTrack_.inBandMetadataTrackDispatchType=t)}(this.inbandTextTracks_,n,this.vhs_.tech_),Pd({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:s,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,n))},n.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(e){return e()}),this.metadataQueue_.caption.forEach(function(e){return e()}),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]},n.processCallQueue_=function(){var e=this.callQueue_;this.callQueue_=[],e.forEach(function(e){return e()})},n.processLoadQueue_=function(){var e=this.loadQueue_;this.loadQueue_=[],e.forEach(function(e){return e()})},n.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var e=this.pendingSegment_;return!!e&&(!this.currentMediaInfo_||!Wi({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))},n.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;if(e=this.pendingSegment_,!e||!e.trackInfo)return!1;if(!this.handlePartialData_){var e,t=this.currentMediaInfo_,n=t.hasAudio,s=t.hasVideo,o=t.isMuxed;if(s&&!e.videoTimingInfo)return!1;if(n&&!this.audioDisabled_&&!o&&!e.audioTimingInfo)return!1}return!Wi({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})},n.handleData_=function(e,t){if(this.earlyAbortWhenNeeded_(e.stats),!this.checkForAbort_(e.requestId))if(!this.callQueue_.length&&this.hasEnoughInfoToAppend_()){var s,o,n=this.pendingSegment_;this.setTimeMapping_(n.timeline),this.updateMediaSecondsLoaded_(n.segment),"closed"!==this.mediaSource_.readyState&&(e.map&&(e.map=this.initSegmentForMap(e.map,!0),n.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),n.isFmp4=e.isFmp4,n.timingInfo=n.timingInfo||{},n.isFmp4?(this.trigger("fmp4"),n.timingInfo.start=n[ia(t.type)].start):(s="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo,s&&(o=this.handlePartialData_?t.videoFramePtsTime:n.videoTimingInfo.start),n.timingInfo.start=this.trueSegmentStart_({currentStart:n.timingInfo.start,playlist:n.playlist,mediaIndex:n.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:s,firstVideoFrameTimeForData:o,videoTimingInfo:n.videoTimingInfo,audioTimingInfo:n.audioTimingInfo})),this.updateAppendInitSegmentStatus(n,t.type),this.updateSourceBufferTimestampOffset_(n),n.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(n,t))}else this.callQueue_.push(this.handleData_.bind(this,e,t))},n.updateAppendInitSegmentStatus=function(e,t){"main"!==this.loaderType_||"number"!=typeof e.timestampOffset||e.changedTimestampOffset||(this.appendInitSegment_={audio:!0,video:!0}),this.playlistOfLastInitSegment_[t]!==e.playlist&&(this.appendInitSegment_[t]=!0)},n.getInitSegmentAndUpdateState_=function(e){var o,n=e.type,s=e.initSegment,t=e.map,i=e.playlist;if(t){if(o=zn(t),this.activeInitSegmentId_===o)return null;s=this.initSegmentForMap(t,!0).bytes,this.activeInitSegmentId_=o}return s&&this.appendInitSegment_[n]?(this.playlistOfLastInitSegment_[n]=i,this.appendInitSegment_[n]=!!t,this.activeInitSegmentId_=null,s):null},n.handleQuotaExceededError_=function(e){var a,n=this,c=e.segmentInfo,l=e.type,r=e.bytes,s=this.sourceUpdater_.audioBuffered(),i=this.sourceUpdater_.videoBuffered();1<s.length&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+_e(s).join(", ")),1<i.length&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+_e(i).join(", "));var d=s.length?s.start(0):0,u=s.length?s.end(s.length-1):0,h=i.length?i.start(0):0,m=i.length?i.end(i.length-1):0;if(u-d<=1&&m-h<=1)return this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+r.byteLength+", audio buffer: "+_e(s).join(", ")+", video buffer: "+_e(i).join(", ")+", "),this.error({message:"Quota exceeded error with append of a single segment of content",blacklistDuration:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:c,type:l,bytes:r})),a=this.currentTime_()-1,this.logger_("On QUOTA_EXCEEDED_ERR, removing video from 0 to "+a),this.sourceUpdater_.removeVideo(0,a,function(){n.logger_("On QUOTA_EXCEEDED_ERR, removing audio from 0 to "+a),n.sourceUpdater_.removeAudio(0,a,function(){n.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),n.waitingOnRemove_=!1,n.quotaExceededErrorRetryTimeout_=o.setTimeout(function(){n.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),n.quotaExceededErrorRetryTimeout_=null,n.processCallQueue_()},1e3)})})},n.handleAppendError_=function(e,t){var n=e.segmentInfo,s=e.type,o=e.bytes;t&&(22!==t.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",t),this.error(s+" append of "+o.length+"b failed for segment #"+n.mediaIndex+" in playlist "+n.playlist.id),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:n,type:s,bytes:o}))},n.appendToSourceBuffer_=function(e){var s,o,i=e.segmentInfo,a=e.type,n=e.initSegment,r=e.data,t=e.bytes;t||(s=[r],o=r.byteLength,n&&(s.unshift(n),o+=n.byteLength),t=function(e){var t,n=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach(function(e){t.set(e,n),n+=e.byteLength})),t}({bytes:o,segments:s})),this.sourceUpdater_.appendBuffer({segmentInfo:i,type:a,bytes:t},this.handleAppendError_.bind(this,{segmentInfo:i,type:a,bytes:t}))},n.handleSegmentTimingInfo_=function(e,t,n){if(this.pendingSegment_&&t===this.pendingSegment_.requestId){var s=this.pendingSegment_.segment,o=e+"TimingInfo";s[o]||(s[o]={}),s[o].transmuxerPrependedSeconds=n.prependedContentDuration||0,s[o].transmuxedPresentationStart=n.start.presentation,s[o].transmuxedDecodeStart=n.start.decode,s[o].transmuxedPresentationEnd=n.end.presentation,s[o].transmuxedDecodeEnd=n.end.decode,s[o].baseMediaDecodeTime=n.baseMediaDecodeTime}},n.appendData_=function(e,t){var o,n=t.type,s=t.data;s&&s.byteLength&&("audio"!==n||!this.audioDisabled_)&&(o=this.getInitSegmentAndUpdateState_({type:n,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null}),this.appendToSourceBuffer_({segmentInfo:e,type:n,initSegment:o,data:s}))},n.loadSegment_=function(e){var t=this;this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(e):this.loadQueue_.push(function(){var n,s=t.buffered_();"number"==typeof e.timestampOffset&&(e.timestampOffset=Ui({segmentTimeline:e.timeline,currentTimeline:t.currentTimeline_,startOfSegment:e.startOfSegment,buffered:s,overrideCheck:!0})),delete e.audioAppendStart,n=t.sourceUpdater_.audioBuffered(),n.length&&(e.audioAppendStart=n.end(n.length-1)-t.sourceUpdater_.audioTimestampOffset()),t.updateTransmuxerAndRequestSegment_(e)})},n.updateTransmuxerAndRequestSegment_=function(e){t=this,this.shouldUpdateTransmuxerTimestampOffset_(e.timestampOffset)&&(this.gopBuffer_.length=0,e.gopsToAlignWith=[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:e.timestampOffset}));var t,n=this.createSimplifiedSegmentObj_(e),s=this.isEndOfStream_(e.mediaIndex,e.playlist),o=null!==this.mediaIndex,i=e.timeline!==this.currentTimeline_&&0<e.timeline,a=s||o&&i;e.abortRequests=kd({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:n,handlePartialData:this.handlePartialData_,abortFn:this.handleAbort_.bind(this),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.bind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",e.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",e.requestId),captionsFn:this.handleCaptions_.bind(this),isEndOfTimeline:a,endedTimelineFn:function(){t.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this)})},n.trimBackBuffer_=function(){var t=function(e,t,n){var o,s=t-w.BACK_BUFFER_LENGTH;return e.length&&(s=Math.max(s,e.start(0))),o=t-n,Math.min(o,s)}(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);0<t&&this.remove(0,t)},n.createSimplifiedSegmentObj_=function(e){var o,t=e.segment,n={resolvedUri:t.resolvedUri,byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith},s=e.playlist.segments[e.mediaIndex-1];return(s&&s.timeline===t.timeline&&(s.videoTimingInfo?n.baseStartTime=s.videoTimingInfo.transmuxedDecodeEnd:s.audioTimingInfo&&(n.baseStartTime=s.audioTimingInfo.transmuxedDecodeEnd)),t.key)&&(o=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]),n.key=this.segmentKey(t.key),n.key.iv=o),t.map&&(n.map=this.initSegmentForMap(t.map)),n},n.saveTransferStats_=function(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)},n.saveBandwidthRelatedStats_=function(e,t){this.pendingSegment_.byteLength=t.bytesReceived,e<1/60?this.logger_("Ignoring segment's bandwidth because its duration of "+e+" is less than the min to record "+1/60):(this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime)},n.handleTimeout_=function(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate")},n.segmentRequestFinished_=function(e,t,n){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,n));else if(this.saveTransferStats_(t.stats),this.pendingSegment_&&t.requestId===this.pendingSegment_.requestId){if(e){if(this.pendingSegment_=null,this.state="READY",e.code===to)return;return this.pause(),e.code===Ws?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}var s=this.pendingSegment_;this.saveBandwidthRelatedStats_(s.duration,t.stats),s.endOfAllRequests=t.endOfAllRequests,n.gopInfo&&(this.gopBuffer_=function(e,t,n){if(!t.length)return e;if(n)return t.slice();for(var o=t[0].pts,s=0;s<e.length&&!(e[s].pts>=o);s++);return e.slice(0,s).concat(t)}(this.gopBuffer_,n.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(s)}},n.setTimeMapping_=function(e){var t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)},n.updateMediaSecondsLoaded_=function(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration},n.shouldUpdateTransmuxerTimestampOffset_=function(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())},n.trueSegmentStart_=function(e){var t,n=e.currentStart,i=e.playlist,s=e.mediaIndex,o=e.firstVideoFrameTimeForData,a=e.currentVideoTimestampOffset,r=e.useVideoTimingInfo,c=e.videoTimingInfo,l=e.audioTimingInfo;return"undefined"!=typeof n?n:r?(t=i.segments[s-1],0!==s&&t&&"undefined"!=typeof t.start&&t.end===o+a?c.start:o):l.start},n.waitForAppendsToComplete_=function(e){if(!this.currentMediaInfo_)return this.error({message:"No starting media returned, likely due to an unsupported media format.",blacklistDuration:1/0}),void this.trigger("error");var t=this.currentMediaInfo_,o=t.hasAudio,i=t.hasVideo,a=t.isMuxed,n="main"===this.loaderType_&&i,s=!this.audioDisabled_&&o&&!a;if(e.waitingOnAppends=0,!e.hasAppendedData_)return e.timingInfo||"number"!=typeof e.timestampOffset||(this.isPendingTimestampOffset_=!0),e.timingInfo={start:0},e.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(e),this.processMetadataQueue_()),void this.checkAppendsDone_(e);n&&e.waitingOnAppends++,s&&e.waitingOnAppends++,n&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),s&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))},n.checkAppendsDone_=function(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())},n.checkForIllegalMediaSwitch=function(e){var t=function(e,t,n){return"main"===e&&t&&n?n.hasAudio||n.hasVideo?t.hasVideo&&!n.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&n.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null}(this.loaderType_,this.currentMediaInfo_,e);return!!t&&(this.error({message:t,blacklistDuration:1/0}),this.trigger("error"),!0)},n.updateSourceBufferTimestampOffset_=function(e){if(null!==e.timestampOffset&&"number"==typeof e.timingInfo.start&&!e.changedTimestampOffset&&"main"===this.loaderType_){var t=!1;e.timestampOffset-=e.timingInfo.start,e.changedTimestampOffset=!0,e.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(e.timestampOffset),t=!0),e.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(e.timestampOffset),t=!0),t&&this.trigger("timestampoffset")}},n.updateTimingInfoEnd_=function(e){e.timingInfo=e.timingInfo||{};var t="main"===this.loaderType_&&this.currentMediaInfo_.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;t&&(e.timingInfo.end="number"==typeof t.end?t.end:t.start+e.duration)},n.handleAppendsDone_=function(){if(this.pendingSegment_&&this.trigger("appendsdone"),!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var n,s,t=this.pendingSegment_;this.updateTimingInfoEnd_(t),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_(function(e){var n=e.segment,i=n.start,a=n.end,t=e.playlist,s=t.mediaSequence,r=t.id,o=t.segments,c=void 0===o?[]:o,l=e.mediaIndex,d=e.timeline;return["appending ["+l+"] of ["+s+", "+(s+c.length)+"] from playlist ["+r+"]","["+i+" => "+a+"] in timeline ["+d+"]"].join(" ")}(t)),n=Ud(t,this.sourceType_),n&&("warn"===n.severity?e.log.warn(n.message):this.logger_(n.message)),this.recordThroughput_(t),this.pendingSegment_=null,this.state="READY",t.isSyncRequest?this.trigger("syncinfoupdate"):(this.addSegmentMetadataCue_(t),this.fetchAtBuffer_=!0,this.currentTimeline_!==t.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:t.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:t.timeline})),this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate"),s=t.segment,s.end&&this.currentTime_()-s.end>3*t.playlist.targetDuration?this.resetEverything():(null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=t.mediaIndex,this.isEndOfStream_(t.mediaIndex,t.playlist)&&this.endOfStream(),this.trigger("appended"),this.paused()||this.monitorBuffer_()))},n.recordThroughput_=function(e){if(e.duration<1/60)this.logger_("Ignoring segment's throughput because its duration of "+e.duration+" is less than the min to record "+1/60);else{var t=this.throughput.rate,n=Date.now()-e.endOfAllRequests+1,s=Math.floor(e.byteLength/n*8*1e3);this.throughput.rate+=(s-t)/++this.throughput.count}},n.addSegmentMetadataCue_=function(e){if(this.segmentMetadataTrack_){var t=e.segment,n=t.start,s=t.end;if(ra(n)&&ra(s)){vt(n,s,this.segmentMetadataTrack_);var r=o.WebKitDataCue||o.VTTCue,i={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,bandwidth:e.playlist.attributes.BANDWIDTH,resolution:e.playlist.attributes.RESOLUTION,codecs:e.playlist.attributes.CODECS,byteLength:e.byteLength,uri:e.uri,timeline:e.timeline,playlist:e.playlist.id,start:n,end:s},a=new r(n,s,JSON.stringify(i));a.value=i,this.segmentMetadataTrack_.addCue(a)}}},s}(e.EventTarget),lo,Gn,$t;function be(){}function Za(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function wo(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]}function Xe(e,t){if(0!==t.queue.length){var s=0,n=t.queue[s];if("mediaSource"!==n.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!wo(e,t)){if(n.type!==e){if(null===(s=function(e,t){for(var s,n=0;n<t.length;n++){if(s=t[n],"mediaSource"===s.type)return null;if(s.type===e)return n}return null}(e,t.queue)))return;n=t.queue[s]}return t.queue.splice(s,1),(t.queuePending[e]=n).action(e,t),n.doneFn?void 0:(t.queuePending[e]=null,void Xe(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),n.action(t),n.doneFn&&n.doneFn(),Xe("audio",t),Xe("video",t))}}function nr(e,t){var n=t[e+"Buffer"],s=Za(e);n&&(n.removeEventListener("updateend",t["on"+s+"UpdateEnd_"]),n.removeEventListener("error",t["on"+s+"Error_"]),t.codecs[e]=null,t[e+"Buffer"]=null)}function ne(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)}function U(e){var t=e.type,n=e.sourceUpdater,s=e.action,o=e.doneFn,i=e.name;n.queue.push({type:t,action:s,doneFn:o,name:i}),Xe(t,n)}function vr(e,t){return function(){if(t.queuePending[e]){var s=t.queuePending[e].doneFn;t.queuePending[e]=null,s&&s(t[e+"Error_"])}Xe(e,t)}}function jr(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))}function Mu(e,t){for(var n,o=e.cues,s=0;s<o.length;s++)if(n=o[s],t>=n.adStartTime&&t<=n.adEndTime)return n;return null}function sn(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)}function kr(e,t){(t.activePlaylistLoader=e).load()}function zu(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){s1[t](t,e)});var s,i,c,t=e.mediaTypes,o=e.masterPlaylistLoader,n=e.tech,r=e.vhs;["AUDIO","SUBTITLES"].forEach(function(n){t[n].activeGroup=function(e,t){return function(n){var s,a=t.masterPlaylistLoader,i=t.mediaTypes[e].groups,o=a.media();return o?(s=null,o.attributes[e]&&(s=i[o.attributes[e]]),s=s||i.main,"undefined"==typeof n?s:null===n?null:s.filter(function(e){return e.id===n.id})[0]||null):null}}(n,e),t[n].activeTrack=o1[n](n,e),t[n].onGroupChanged=function(e,t){return function(){var o=t.segmentLoaders,i=o[e],a=o.main,n=t.mediaTypes[e],r=n.activeTrack(),s=n.activeGroup(r),c=n.activePlaylistLoader;sn(i,n),s&&(s.playlistLoader?(i.resyncLoader(),kr(s.playlistLoader,n)):c&&a.resetEverything())}}(n,e),t[n].onGroupChanging=function(e,t){return function(){var n=t.segmentLoaders[e];n.abort(),n.pause()}}(n,e),t[n].onTrackChanged=function(e,t){return function(){var a=t.segmentLoaders,n=a[e],i=a.main,s=t.mediaTypes[e],r=s.activeTrack(),o=s.activeGroup(r),c=s.activePlaylistLoader;if(sn(n,s),o){if("AUDIO"===e){if(!o.playlistLoader)return i.setAudio(!0),void i.resetEverything();n.setAudio(!0),i.setAudio(!1)}c!==o.playlistLoader&&(n.track&&n.track(r),n.resetEverything()),kr(o.playlistLoader,s)}}}(n,e)}),s=t.AUDIO.activeGroup(),s&&(i=(s.filter(function(e){return e.default})[0]||s[0]).id,t.AUDIO.tracks[i].enabled=!0,t.AUDIO.onTrackChanged());function a(){t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"}),n.trigger({type:"usage",name:"hls-audio-change"})}for(c in o.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(e){return t[e].onGroupChanged()})}),o.on("mediachanging",function(){["AUDIO","SUBTITLES"].forEach(function(e){return t[e].onGroupChanging()})}),n.audioTracks().addEventListener("change",a),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),r.on("dispose",function(){n.audioTracks().removeEventListener("change",a),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)}),n.clearTracks("audio"),t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[c])}function Du(e,t,n){var o,s=e.masterPlaylistController_,i=s[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(s);t.attributes.RESOLUTION&&(o=t.attributes.RESOLUTION,this.width=o.width,this.height=o.height),this.bandwidth=t.attributes.BANDWIDTH,this.codecs=Et(s.master(),t),this.playlist=t,this.id=n,this.enabled=function(e,t,n){return function(s){var o=e.master.playlists[t],a=Xo(o),i=hn(o);return"undefined"==typeof s?i:(s?delete o.disabled:o.disabled=!0,s===i||a||(n(),s?e.trigger("renditionenabled"):e.trigger("renditiondisabled")),s)}}(e.playlists,t.id,i)}function Fr(t){!function t(n,s){var r=0,i=0,o=e.mergeOptions(l1,s);n.ready(function(){n.trigger({type:"usage",name:"vhs-error-reload-initialized"}),n.trigger({type:"usage",name:"hls-error-reload-initialized"})});function c(){i&&n.currentTime(i)}function d(e){e!=null&&(i=n.duration()!==1/0&&n.currentTime()||0,n.one("loadedmetadata",c),n.src(e),n.trigger({type:"usage",name:"vhs-error-reload"}),n.trigger({type:"usage",name:"hls-error-reload"}),n.play())}function l(){return Date.now()-r<1e3*o.errorInterval?(n.trigger({type:"usage",name:"vhs-error-reload-canceled"}),void n.trigger({type:"usage",name:"hls-error-reload-canceled"})):o.getSource&&"function"==typeof o.getSource?(r=Date.now(),o.getSource.call(n,d)):void e.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}function a(){n.off("loadedmetadata",c),n.off("error",l),n.off("dispose",a)}n.on("error",l),n.on("dispose",a),n.reloadSourceOnError=function(e){a(),t(n,e)}}(this,t)}var Se,Ru=["video","audio"],Pu=function(e,t,n){return function(s,o){var i=o[s+"Buffer"];if(ne(o.mediaSource,i)){o.logger_("Appending segment "+t.mediaIndex+"'s "+e.length+" bytes to "+s+"Buffer");try{i.appendBuffer(e)}catch(e){o.logger_("Error with code "+e.code+" "+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+"when appending segment "+t.mediaIndex+" to "+s+"Buffer"),o.queuePending[s]=null,n(e)}}}},zr=function(e,t){return function(n,s){var o=s[n+"Buffer"];ne(s.mediaSource,o)&&(s.logger_("Removing "+e+" to "+t+" from "+n+"Buffer"),o.remove(e,t))}},Nr=function(e){return function(t,n){var s=n[t+"Buffer"];ne(n.mediaSource,s)&&(n.logger_("Setting "+t+"timestampOffset to "+e),s.timestampOffset=e)}},Lr=function(e){return function(){e()}},Vu=function(t){return function(n){if("open"===n.mediaSource.readyState){n.logger_("Calling mediaSource endOfStream("+(t||"")+")");try{n.mediaSource.endOfStream(t)}catch(t){e.log.warn("Failed to call media source endOfStream",t)}}}},$u=function(t){return function(n){n.logger_("Setting mediaSource duration to "+t);try{n.mediaSource.duration=t}catch(t){e.log.warn("Failed to set media source duration",t)}}},Wu=function(){return function(t,n){if("open"===n.mediaSource.readyState){var s=n[t+"Buffer"];if(ne(n.mediaSource,s)){n.logger_("calling abort on "+t+"Buffer");try{s.abort()}catch(n){e.log.warn("Failed to abort on "+t+"Buffer",n)}}}}},Uu=function(e,t){return function(n){var s,o=Za(e),i=Ts(t);n.logger_("Adding "+e+"Buffer with codec "+t+" to mediaSource"),s=n.mediaSource.addSourceBuffer(i),s.addEventListener("updateend",n["on"+o+"UpdateEnd_"]),s.addEventListener("error",n["on"+o+"Error_"]),n.codecs[e]=t,n[e+"Buffer"]=s}},Ku=function(t){return function(n){var s=n[t+"Buffer"];if(nr(t,n),ne(n.mediaSource,s)){n.logger_("Removing "+t+"Buffer with codec "+n.codecs[t]+" from mediaSource");try{n.mediaSource.removeSourceBuffer(s)}catch(n){e.log.warn("Failed to removeSourceBuffer "+t+"Buffer",n)}}}},qu=function(e){return function(t,n){var s=n[t+"Buffer"],o=Ts(e);ne(n.mediaSource,s)&&n.codecs[t]!==e&&(n.logger_("changing "+t+"Buffer codec from "+n.codecs[t]+" to "+e),s.changeType(o),n.codecs[t]=e)}},Pr=function(t){function s(e){var n;return(n=t.call(this)||this).mediaSource=e,n.sourceopenListener_=function(){return Xe("mediaSource",Y(n))},n.mediaSource.addEventListener("sourceopen",n.sourceopenListener_),n.logger_=J("SourceUpdater"),n.audioTimestampOffset_=0,n.videoTimestampOffset_=0,n.queue=[],n.queuePending={audio:null,video:null},n.delayedAudioAppendQueue_=[],n.videoAppendQueued_=!1,n.codecs={},n.onVideoUpdateEnd_=vr("video",Y(n)),n.onAudioUpdateEnd_=vr("audio",Y(n)),n.onVideoError_=function(e){n.videoError_=e},n.onAudioError_=function(e){n.audioError_=e},n.createdSourceBuffers_=!1,n.initializedEme_=!1,n.triggeredReady_=!1,n}ie(s,t);var n=s.prototype;return n.initializedEme=function(){this.initializedEme_=!0,this.triggerReady()},n.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_},n.hasInitializedAnyEme=function(){return this.initializedEme_},n.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()},n.createSourceBuffers=function(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())},n.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))},n.addSourceBuffer=function(e,t){U({type:"mediaSource",sourceUpdater:this,action:Uu(e,t),name:"addSourceBuffer"})},n.abort=function(e){U({type:e,sourceUpdater:this,action:Wu(e),name:"abort"})},n.removeSourceBuffer=function(t){this.canRemoveSourceBuffer()?U({type:"mediaSource",sourceUpdater:this,action:Ku(t),name:"removeSourceBuffer"}):e.log.error("removeSourceBuffer is not supported!")},n.canRemoveSourceBuffer=function(){return!e.browser.IE_VERSION&&!e.browser.IS_FIREFOX&&o.MediaSource&&o.MediaSource.prototype&&"function"==typeof o.MediaSource.prototype.removeSourceBuffer},s.canChangeType=function(){return o.SourceBuffer&&o.SourceBuffer.prototype&&"function"==typeof o.SourceBuffer.prototype.changeType},n.canChangeType=function(){return this.constructor.canChangeType()},n.changeType=function(t,n){this.canChangeType()?U({type:t,sourceUpdater:this,action:qu(n),name:"changeType"}):e.log.error("changeType is not supported!")},n.addOrChangeSourceBuffers=function(e){var t=this;if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach(function(n){var s=e[n];if(!t.hasCreatedSourceBuffers())return t.addSourceBuffer(n,s);t.canChangeType()&&t.changeType(n,s)})},n.appendBuffer=function(e,t){var s,o=this,a=e.segmentInfo,n=e.type,i=e.bytes;if(this.processedAppend_=!0,"audio"===n&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_("delayed audio append of "+i.length+" until video append");if(U({type:n,sourceUpdater:this,action:Pu(i,a||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===n){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;s=this.delayedAudioAppendQueue_.slice(),this.logger_("queuing delayed audio "+s.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,s.forEach(function(e){o.appendBuffer.apply(o,e)})}},n.audioBuffered=function(){return ne(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:e.createTimeRange()},n.videoBuffered=function(){return ne(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:e.createTimeRange()},n.buffered=function(){var t=ne(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,n=ne(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return n&&!t?this.audioBuffered():t&&!n?this.videoBuffered():function(t,n){var s,i=null,a=null,r=0,o=[],c=[];if(!(t&&t.length&&n&&n.length))return e.createTimeRange();for(s=t.length;s--;)o.push({time:t.start(s),type:"start"}),o.push({time:t.end(s),type:"end"});for(s=n.length;s--;)o.push({time:n.start(s),type:"start"}),o.push({time:n.end(s),type:"end"});for(o.sort(function(e,t){return e.time-t.time}),s=0;s<o.length;s++)"start"===o[s].type?2===++r&&(i=o[s].time):"end"===o[s].type&&1===--r&&(a=o[s].time),null!==i&&null!==a&&(c.push([i,a]),a=i=null);return e.createTimeRanges(c)}(this.audioBuffered(),this.videoBuffered())},n.setDuration=function(e,t){void 0===t&&(t=be),U({type:"mediaSource",sourceUpdater:this,action:$u(e),name:"duration",doneFn:t})},n.endOfStream=function(e,t){void 0===e&&(e=null),void 0===t&&(t=be),"string"!=typeof e&&(e=void 0),U({type:"mediaSource",sourceUpdater:this,action:Vu(e),name:"endOfStream",doneFn:t})},n.removeAudio=function(e,t,n){void 0===n&&(n=be),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?U({type:"audio",sourceUpdater:this,action:zr(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=be),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?U({type:"video",sourceUpdater:this,action:zr(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!!wo("audio",this)||!!wo("video",this)},n.audioTimestampOffset=function(e){return"undefined"!=typeof e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(U({type:"audio",sourceUpdater:this,action:Nr(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return"undefined"!=typeof e&&this.videoBuffer&&this.videoTimestampOffset!==e&&(U({type:"video",sourceUpdater:this,action:Nr(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&U({type:"audio",sourceUpdater:this,action:Lr(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&U({type:"video",sourceUpdater:this,action:Lr(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Ru.forEach(function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"](function(){return nr(t,e)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},s}(e.EventTarget),Wr=new Uint8Array(`

`.split("").map(function(e){return e.charCodeAt(0)})),Xu=function(t){function s(e,n){var s;return void 0===n&&(n={}),(s=t.call(this,e,n)||this).handlePartialData_=!1,s.mediaSource_=null,s.subtitlesTrack_=null,s.loaderType_="subtitle",s.featuresNativeTextTracks_=e.featuresNativeTextTracks,s.shouldSaveSegmentTimingInfo_=!1,s}ie(s,t);var n=s.prototype;return n.createTransmuxer_=function(){return null},n.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return e.createTimeRanges();var t=this.subtitlesTrack_.cues,n=t[0].startTime,s=t[t.length-1].startTime;return e.createTimeRanges([[n,s]])},n.initSegmentForMap=function(e,t){if(void 0===t&&(t=!1),!e)return null;var n,i,o=zn(e),s=this.initSegments_[o];return t&&!s&&e.bytes&&(i=Wr.byteLength+e.bytes.byteLength,n=new Uint8Array(i),n.set(e.bytes),n.set(Wr,e.bytes.byteLength),this.initSegments_[o]=s={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:n}),s||e},n.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()},n.init_=function(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()},n.track=function(e){return"undefined"==typeof e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){vt(e,t,this.subtitlesTrack_)},n.fillBuffer_=function(){var e,t=this;if(this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_())),e=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_),e=this.skipEmptySegments_(e)){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline))return this.syncController_.one("timestampoffset",function(){t.state="READY",t.paused()||t.monitorBuffer_()}),void(this.state="WAITING_ON_TIMELINE");this.loadSegment_(e)}},n.skipEmptySegments_=function(e){for(;e&&e.segment.empty;)e=this.generateSegmentInfo_(e.playlist,e.mediaIndex+1,e.startOfSegment+e.duration,e.isSyncRequest);return e},n.stopForError=function(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")},n.segmentRequestFinished_=function(e,t,n){var s,a,r,c,i=this;if(this.subtitlesTrack_){if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Ws&&this.handleTimeout_(),e.code===to?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);if(s=this.pendingSegment_,this.saveBandwidthRelatedStats_(s.duration,t.stats),this.state="APPENDING",this.trigger("appending"),a=s.segment,a.map&&(a.map.bytes=t.map.bytes),s.bytes=t.bytes,"function"!=typeof o.WebVTT&&this.subtitlesTrack_&&this.subtitlesTrack_.tech_)return c=function(){i.subtitlesTrack_.tech_.off("vttjsloaded",r),i.stopForError({message:"Error loading vtt.js"})},r=function(){i.subtitlesTrack_.tech_.off("vttjserror",c),i.segmentRequestFinished_(e,t,n)},this.state="WAITING_ON_VTTJS",this.subtitlesTrack_.tech_.one("vttjsloaded",r),void this.subtitlesTrack_.tech_.one("vttjserror",c);a.requested=!0;try{this.parseVTTCues_(s)}catch(e){return void this.stopForError({message:e.message})}if(this.updateTimeMapping_(s,this.syncController_.timelines[s.timeline],this.playlist_),s.cues.length?s.timingInfo={start:s.cues[0].startTime,end:s.cues[s.cues.length-1].endTime}:s.timingInfo={start:s.startOfSegment,end:s.startOfSegment+s.duration},s.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");s.byteLength=s.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,s.cues.forEach(function(e){i.subtitlesTrack_.addCue(i.featuresNativeTextTracks_?new o.VTTCue(e.startTime,e.endTime,e.text):e)}),function(e){if(t=e.cues,t)for(n=0;n<t.length;n++){for(var t,n,o=[],i=0,s=0;s<t.length;s++)t[n].startTime===t[s].startTime&&t[n].endTime===t[s].endTime&&t[n].text===t[s].text&&1<++i&&o.push(t[s]);o.length&&o.forEach(function(t){return e.removeCue(t)})}}(this.subtitlesTrack_),this.handleAppendsDone_()}else this.state="READY"},n.handleData_=function(){},n.updateTimingInfoEnd_=function(){},n.parseVTTCues_=function(t){var n,s,i,a,r=!1;"function"==typeof o.TextDecoder?a=new o.TextDecoder("utf8"):(a=o.WebVTT.StringDecoder(),r=!0),n=new o.WebVTT.Parser(o,o.vttjs,a),(t.cues=[],t.timestampmap={MPEGTS:0,LOCAL:0},n.oncue=t.cues.push.bind(t.cues),n.ontimestampmap=function(e){t.timestampmap=e},n.onparsingerror=function(t){e.log.warn("Error encountered when parsing cues: "+t.message)},t.segment.map)&&(s=t.segment.map.bytes,r&&(s=jr(s)),n.parse(s)),i=t.bytes,r&&(i=jr(i)),n.parse(i),n.flush()},n.updateTimeMapping_=function(e,t,n){if(s=e.segment,t)if(e.cues.length){var s,a,r,o=e.timestampmap,i=o.MPEGTS/Pt-o.LOCAL+t.mapping;e.cues.forEach(function(e){e.startTime+=i,e.endTime+=i}),!n.syncInfo&&(a=e.cues[0].startTime,r=e.cues[e.cues.length-1].startTime,n.syncInfo={mediaSequence:n.mediaSequence+e.mediaIndex,time:Math.min(a,r-s.duration)})}else s.empty=!0},s}(no),_i=[{name:"VOD",run:function(e,t,n){return n===1/0?null:{time:0,segmentIndex:0}}},{name:"ProgramDateTime",run:function(e,t,n,s,o){if(!Object.keys(e.timelineToDatetimeMappings).length)return null;var i,a,r,l,d,u=t.segments||[],h=null,c=null;o=o||0;for(i=0;i<u.length;i++)if(a=u[i],l=e.timelineToDatetimeMappings[a.timeline],l&&a.dateTimeObject){if(d=a.dateTimeObject.getTime()/1e3+l,r=Math.abs(o-d),null!==c&&(0===r||c<r))break;c=r,h={time:d,segmentIndex:i}}return h}},{name:"Segment",run:function(e,t,n,s,o){var a,r,c,d=t.segments||[],l=null,i=null;o=o||0;for(a=0;a<d.length;a++)if(r=d[a],r.timeline===s&&"undefined"!=typeof r.start){if(c=Math.abs(o-r.start),null!==i&&i<c)break;(!l||null===i||c<=i)&&(i=c,l={time:r.start,segmentIndex:a})}return l}},{name:"Discontinuity",run:function(e,t,n,s,o){if(r=null,o=o||0,t.discontinuityStarts&&t.discontinuityStarts.length)for(i=null,a=0;a<t.discontinuityStarts.length;a++){var i,a,r,c,d=t.discontinuityStarts[a],u=t.discontinuitySequence+a+1,l=e.discontinuities[u];if(l){if(c=Math.abs(o-l.time),null!==i&&i<c)break;(!r||null===i||c<=i)&&(i=c,r={time:l.time,segmentIndex:d})}}return r}},{name:"Playlist",run:function(e,t){return t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence}:null}}],Zu=function(e){function n(){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=J("SyncController"),n}ie(n,e);var t=n.prototype;return t.getSyncPoint=function(e,t,n,s){var o=this.runStrategies_(e,t,n,s);return o.length?this.selectSyncPoint_(o,{key:"time",value:s}):null},t.getExpiredTime=function(e,t){if(!e||!e.segments)return null;var n,s=this.runStrategies_(e,t,e.discontinuitySequence,0);return s.length?(n=this.selectSyncPoint_(s,{key:"segmentIndex",value:0}),0<n.segmentIndex&&(n.time*=-1),Math.abs(n.time+Jt(e,n.segmentIndex,0))):null},t.runStrategies_=function(e,t,n,s){for(var o,i,r=[],a=0;a<_i.length;a++)o=_i[a],i=o.run(this,e,t,n,s),i&&(i.strategy=o.name,r.push({strategy:o.name,syncPoint:i}));return r},t.selectSyncPoint_=function(e,t){for(var o,s=e[0].syncPoint,i=Math.abs(e[0].syncPoint[t.key]-t.value),a=e[0].strategy,n=1;n<e.length;n++)o=Math.abs(e[n].syncPoint[t.key]-t.value),o<i&&(i=o,s=e[n].syncPoint,a=e[n].strategy);return this.logger_("syncPoint for ["+t.key+": "+t.value+"] chosen with strategy ["+a+"]: [time:"+s.time+", segmentIndex:"+s.segmentIndex+"]"),s},t.saveExpiredSegmentInfo=function(e,t){for(var s,n=t.mediaSequence-e.mediaSequence-1;0<=n;n--)if(s=e.segments[n],s&&"undefined"!=typeof s.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:s.start},this.logger_("playlist refresh sync: [time:"+t.syncInfo.time+", mediaSequence: "+t.syncInfo.mediaSequence+"]"),this.trigger("syncinfoupdate");break}},t.setDateTimeMappingForStart=function(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){var t=e.segments[0],n=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-n}},t.saveSegmentTimingInfo=function(e){var s,t=e.segmentInfo,o=e.shouldSaveTimelineMapping,i=this.calculateSegmentTimeMapping_(t,t.timingInfo,o),n=t.segment;i&&(this.saveDiscontinuitySyncInfo_(t),t.playlist.syncInfo||(t.playlist.syncInfo={mediaSequence:t.playlist.mediaSequence+t.mediaIndex,time:n.start})),s=n.dateTimeObject,n.discontinuity&&o&&s&&(this.timelineToDatetimeMappings[n.timeline]=-s.getTime()/1e3)},t.timestampOffsetForTimeline=function(e){return"undefined"==typeof this.timelines[e]?null:this.timelines[e].time},t.mappingForTimeline=function(e){return"undefined"==typeof this.timelines[e]?null:this.timelines[e].mapping},t.calculateSegmentTimeMapping_=function(e,t,n){var o=e.segment,s=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)s={time:e.startOfSegment,mapping:e.startOfSegment-t.start},n&&(this.timelines[e.timeline]=s,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+e.timeline+": [time: "+s.time+"] [mapping: "+s.mapping+"]")),o.start=e.startOfSegment,o.end=t.end+s.mapping;else{if(!s)return!1;o.start=t.start+s.mapping,o.end=t.end+s.mapping}return!0},t.saveDiscontinuitySyncInfo_=function(e){if(t=e.playlist,n=e.segment,n.discontinuity)this.discontinuities[n.timeline]={time:n.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(s=0;s<t.discontinuityStarts.length;s++){var t,n,s,a,o=t.discontinuityStarts[s],i=t.discontinuitySequence+s+1,r=o-e.mediaIndex,c=Math.abs(r);(!this.discontinuities[i]||this.discontinuities[i].accuracy>c)&&(a=void 0,a=r<0?n.start-Jt(t,e.mediaIndex,o):n.end+Jt(t,e.mediaIndex+1,o),this.discontinuities[i]={time:a,accuracy:c})}},t.dispose=function(){this.trigger("dispose"),this.off()},n}(e.EventTarget),Ju=function(e){function n(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}ie(n,e);var t=n.prototype;return t.clearPendingTimelineChange=function(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")},t.pendingTimelineChange=function(e){var t=e.type,n=e.from,s=e.to;return"number"==typeof n&&"number"==typeof s&&(this.pendingTimelineChanges_[t]={type:t,from:n,to:s},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[t]},t.lastTimelineChange=function(e){var t=e.type,n=e.from,s=e.to;return"number"==typeof n&&"number"==typeof s&&(this.lastTimelineChanges_[t]={type:t,from:n,to:s},delete this.pendingTimelineChanges_[t],this.trigger("timelinechange")),this.lastTimelineChanges_[t]},t.dispose=function(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()},n}(e.EventTarget),e1=tc(Ur($r(function(){function s(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}o=function(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e},i=function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t},n=function(){function t(){this.listeners={}}var e=t.prototype;return e.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},e.off=function(e,t){if(!this.listeners[e])return!1;var n=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(n,1),-1<n},e.trigger=function(e,t){if(n=this.listeners[e],n)if(2===arguments.length)for(i=n.length,s=0;s<i;++s)n[s].call(this,t);else for(var n,s,i,a=Array.prototype.slice.call(arguments,1),r=n.length,o=0;o<r;++o)n[o].apply(this,a)},e.dispose=function(){this.listeners={}},e.pipe=function(e){this.on("data",function(t){e.push(t)})},t}();function e(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24}var n,o,i,t=null,a=function(){function e(e){t=t||function(){var e,t,n,s,a,r,d,u,l=[[[],[],[],[],[]],[[],[],[],[],[]]],i=l[0],c=l[1],h=i[4],f=c[4],o=[],m=[];for(e=0;e<256;e++)m[(o[e]=e<<1^283*(e>>7))^e]=e;for(s=t=0;!h[s];s^=d||1,t=m[t]||1)for(n=(n=t^t<<1^t<<2^t<<3^t<<4)>>8^255&n^99,r=16843009*o[u=o[d=o[f[h[s]=n]=s]]]^65537*u^257*d^16843008*s,a=257*o[n]^16843008*n,e=0;e<4;e++)i[e][s]=a=a<<24^a>>>8,c[e][n]=r=r<<24^r>>>8;for(e=0;e<5;e++)i[e]=i[e].slice(0),c[e]=c[e].slice(0);return l}(),this._tables=[[t[0][0].slice(),t[0][1].slice(),t[0][2].slice(),t[0][3].slice(),t[0][4].slice()],[t[1][0].slice(),t[1][1].slice(),t[1][2].slice(),t[1][3].slice(),t[1][4].slice()]];var n,s,a,r,d,i=this._tables[0][4],c=this._tables[1],o=e.length,l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");a=e.slice(0),d=[];for(this._key=[a,d],s=o;s<4*o+28;s++)n=a[s-1],(s%o==0||8===o&&s%o==4)&&(n=i[n>>>24]<<24^i[n>>16&255]<<16^i[n>>8&255]<<8^i[255&n],s%o==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),a[s]=a[s-o]^n;for(r=0;s;r++,s--)n=a[3&r?s:s-4],d[r]=s<=4||r<4?n:c[0][i[n>>>24]]^c[1][i[n>>16&255]]^c[2][i[n>>8&255]]^c[3][i[255&n]]}return e.prototype.decrypt=function(e,t,n,s,o,i){var u,f,y,_,a=this._key[1],l=e^a[0],d=s^a[1],c=n^a[2],r=t^a[3],w=a.length/4-2,h=4,m=this._tables[1],p=m[0],g=m[1],v=m[2],b=m[3],j=m[4];for(u=0;u<w;u++)f=p[l>>>24]^g[d>>16&255]^v[c>>8&255]^b[255&r]^a[h],_=p[d>>>24]^g[c>>16&255]^v[r>>8&255]^b[255&l]^a[h+1],y=p[c>>>24]^g[r>>16&255]^v[l>>8&255]^b[255&d]^a[h+2],r=p[r>>>24]^g[l>>16&255]^v[d>>8&255]^b[255&c]^a[h+3],h+=4,l=f,d=_,c=y;for(u=0;u<4;u++)o[(3&-u)+i]=j[l>>>24]<<24^j[d>>16&255]<<16^j[c>>8&255]<<8^j[255&r]^a[h++],f=l,l=d,d=c,c=r,r=f},e}(),r=function(e){function t(){var t;return(t=e.call(this,n)||this).jobs=[],t.delay=1,t.timeout_=null,t}i(t,e);var s=t.prototype;return s.processJob_=function(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null},s.push=function(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))},t}(n),c=function(){function t(n,s,o,i){var l=t.STEP,c=new Int32Array(n.buffer),d=new Uint8Array(n.byteLength),a=0;for(this.asyncStream_=new r,this.asyncStream_.push(this.decryptChunk_(c.subarray(a,a+l),s,o,d)),a=l;a<c.length;a+=l)o=new Uint32Array([e(c[a-4]),e(c[a-3]),e(c[a-2]),e(c[a-1])]),this.asyncStream_.push(this.decryptChunk_(c.subarray(a,a+l),s,o,d));this.asyncStream_.push(function(){i(null,function(e){return e.subarray(0,e.byteLength-e[e.byteLength-1])}(d))})}return t.prototype.decryptChunk_=function(t,n,s,o){return function(){var i=function(t,n,s){var o,c,l,d,u,h,m,f,p,r=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),v=new a(Array.prototype.slice.call(n)),g=new Uint8Array(t.byteLength),i=new Int32Array(g.buffer);for(m=s[0],p=s[1],f=s[2],c=s[3],o=0;o<r.length;o+=4)l=e(r[o]),d=e(r[o+1]),u=e(r[o+2]),h=e(r[o+3]),v.decrypt(l,d,u,h,i,o),i[o]=e(i[o]^m),i[o+1]=e(i[o+1]^p),i[o+2]=e(i[o+2]^f),i[o+3]=e(i[o+3]^c),m=l,p=d,f=u,c=h;return g}(t,n,s);o.set(i,t.byteOffset)}},o(t,null,[{key:"STEP",get:function(){return 32e3}}]),t}();self.onmessage=function(e){var t=e.data,n=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),s=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),o=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new c(n,s,o,function(e,n){self.postMessage(function(e){var t={};return Object.keys(e).forEach(function(n){var s=e[n];ArrayBuffer.isView(s)?t[n]={bytes:s.buffer,byteOffset:s.byteOffset,byteLength:s.byteLength}:t[n]=s}),t}({source:t.source,decrypted:n}),[n.buffer])})}}))),ls={AUDIO:function(t,n){return function(){var r=n.segmentLoaders[t],s=n.mediaTypes[t],c=n.blacklistCurrentPlaylist;sn(r,s);var a,l=s.activeTrack(),o=s.activeGroup(),d=(o.filter(function(e){return e.default})[0]||o[0]).id,i=s.tracks[d];if(l!==i){for(a in e.log.warn("Problem encountered loading the alternate audio track.Switching back to default."),s.tracks)s.tracks[a].enabled=s.tracks[a]===i;s.onTrackChanged()}else c({message:"Problem encountered loading the default audio track."})}},SUBTITLES:function(t,n){return function(){var o,i=n.segmentLoaders[t],s=n.mediaTypes[t];e.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track."),sn(i,s),o=s.activeTrack(),o&&(o.mode="disabled"),s.onTrackChanged()}}},ec={AUDIO:function(e,t,n){if(t){var o=n.tech,i=n.requestOptions,s=n.segmentLoaders[e];t.on("loadedmetadata",function(){var e=t.media();s.playlist(e,i),(!o.paused()||e.endList&&"none"!==o.preload())&&s.load()}),t.on("loadedplaylist",function(){s.playlist(t.media(),i),o.paused()||s.load()}),t.on("error",ls[e](e,n))}},SUBTITLES:function(e,t,n){var o=n.tech,i=n.requestOptions,s=n.segmentLoaders[e],a=n.mediaTypes[e];t.on("loadedmetadata",function(){var e=t.media();s.playlist(e,i),s.track(a.activeTrack()),(!o.paused()||e.endList&&"none"!==o.preload())&&s.load()}),t.on("loadedplaylist",function(){s.playlist(t.media(),i),o.paused()||s.load()}),t.on("error",ls[e](e,n))}},s1={AUDIO:function(t,n){var p,o=n.vhs,d=n.sourceType,h=n.segmentLoaders[t],a=n.requestOptions,c=n.master,s=c.mediaGroups,u=c.playlists,l=n.mediaTypes[t],i=l.groups,r=l.tracks,m=n.masterPlaylistLoader;s[t]&&0!==Object.keys(s[t]).length||(s[t]={main:{default:{default:!0}}});function f(c){function h(u){var f,p,h=s[t][c][u];!l.filter(function(e){return e.resolvedUri!==h.resolvedUri}).length&&l.length&&delete h.resolvedUri,f=void 0,(f="vhs-json"===d&&h.playlists?new Ze(h.playlists[0],o,a):h.resolvedUri?new Ze(h.resolvedUri,o,a):h.playlists&&"dash"===d?new Uo(h.playlists[0],o,a,m):null,h=e.mergeOptions({id:u,playlistLoader:f},h),ec[t](t,h.playlistLoader,n),i[c].push(h),"undefined"==typeof r[u])&&(p=new e.AudioTrack({id:u,kind:function(e){var t=e.default?"main":"alternative";return e.characteristics&&0<=e.characteristics.indexOf("public.accessibility.describes-video")&&(t="main-desc"),t}(h),enabled:!1,language:h.language,default:h.default,label:u}),r[u]=p)}i[c]||(i[c]=[]);var f,l=u.filter(function(e){return e.attributes[t]===c});for(f in s[t][c])h(f)}for(p in s[t])f(p);h.on("error",ls[t](t,n))},SUBTITLES:function(t,n){var s,o,i,a,h,v=n.tech,c=n.vhs,l=n.sourceType,p=n.segmentLoaders[t],d=n.requestOptions,r=n.master.mediaGroups,m=n.mediaTypes[t],u=m.groups,f=m.tracks,g=n.masterPlaylistLoader;for(i in r[t])for(o in u[i]||(u[i]=[]),r[t][i])if(!r[t][i][o].forced){if(s=r[t][i][o],a=void 0,"hls"===l)a=new Ze(s.resolvedUri,c,d);else if("dash"===l){if(!s.playlists.filter(function(e){return e.excludeUntil!==1/0}).length)return;a=new Uo(s.playlists[0],c,d,g)}else"vhs-json"===l&&(a=new Ze(s.playlists?s.playlists[0]:s.resolvedUri,c,d));s=e.mergeOptions({id:o,playlistLoader:a},s),ec[t](t,s.playlistLoader,n),u[i].push(s),"undefined"==typeof f[o]&&(h=v.addRemoteTextTrack({id:o,kind:"subtitles",default:s.default&&s.autoselect,language:s.language,label:o},!1).track,f[o]=h)}p.on("error",ls[t](t,n))},"CLOSED-CAPTIONS":function(t,n){var s,o,i,d,u=n.tech,a=n.master.mediaGroups,c=n.mediaTypes[t],r=c.groups,l=c.tracks;for(o in a[t])for(i in r[o]||(r[o]=[]),a[t][o])s=a[t][o][i],s.instreamId.match(/CC\d/)&&(r[o].push(e.mergeOptions({id:i},s)),"undefined"==typeof l[i])&&(d=u.addRemoteTextTrack({id:s.instreamId,kind:"captions",default:s.default&&s.autoselect,language:s.language,label:i},!1).track,l[i]=d)}},o1={AUDIO:function(e,t){return function(){var s,n=t.mediaTypes[e].tracks;for(s in n)if(n[s].enabled)return n[s];return null}},SUBTITLES:function(e,t){return function(){var s,n=t.mediaTypes[e].tracks;for(s in n)if("showing"===n[s].mode||"hidden"===n[s].mode)return n[s];return null}}},i1=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],a1=function(t){function s(n){var i,s=t.call(this)||this,a=n.src,b=n.handleManifestRedirects,c=n.withCredentials,r=n.tech,d=n.bandwidth,l=n.externVhs,u=n.useCueTags,h=n.blacklistDuration,m=n.enableLowInitialPlaylist,f=n.sourceType,p=n.cacheEncryptionKeys,g=n.handlePartialData,v=n.experimentalBufferBasedABR;if(!a)throw new Error("A non-empty playlist URL or JSON manifest string is required");return Se=l,s.experimentalBufferBasedABR=Boolean(v),s.withCredentials=c,s.tech_=r,s.vhs_=r.vhs,s.sourceType_=f,s.useCueTags_=u,s.blacklistDuration=h,s.enableLowInitialPlaylist=m,s.useCueTags_&&(s.cueTagsTrack_=s.tech_.addTextTrack("metadata","ad-cues"),s.cueTagsTrack_.inBandMetadataTrackDispatchType=""),s.requestOptions_={withCredentials:c,handleManifestRedirects:b,timeout:null},s.on("error",s.pauseLoading),s.mediaTypes_=function(){var e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:be,activeTrack:be,onGroupChanged:be,onTrackChanged:be}}),e}(),s.mediaSource=new o.MediaSource,s.handleDurationChange_=s.handleDurationChange_.bind(Y(s)),s.handleSourceOpen_=s.handleSourceOpen_.bind(Y(s)),s.handleSourceEnded_=s.handleSourceEnded_.bind(Y(s)),s.mediaSource.addEventListener("durationchange",s.handleDurationChange_),s.mediaSource.addEventListener("sourceopen",s.handleSourceOpen_),s.mediaSource.addEventListener("sourceended",s.handleSourceEnded_),s.seekable_=e.createTimeRanges(),s.hasPlayed_=!1,s.syncController_=new Zu(n),s.segmentMetadataTrack_=r.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,s.decrypter_=new e1,s.sourceUpdater_=new Pr(s.mediaSource),s.inbandTextTracks_={},s.timelineChangeController_=new Ju,i={vhs:s.vhs_,parse708captions:n.parse708captions,mediaSource:s.mediaSource,currentTime:s.tech_.currentTime.bind(s.tech_),seekable:function(){return s.seekable()},seeking:function(){return s.tech_.seeking()},duration:function(){return s.duration()},hasPlayed:function(){return s.hasPlayed_},goalBufferLength:function(){return s.goalBufferLength()},bandwidth:d,syncController:s.syncController_,decrypter:s.decrypter_,sourceType:s.sourceType_,inbandTextTracks:s.inbandTextTracks_,cacheEncryptionKeys:p,handlePartialData:g,sourceUpdater:s.sourceUpdater_,timelineChangeController:s.timelineChangeController_},s.masterPlaylistLoader_="dash"===s.sourceType_?new Uo(a,s.vhs_,s.requestOptions_):new Ze(a,s.vhs_,s.requestOptions_),s.setupMasterPlaylistLoaderListeners_(),s.mainSegmentLoader_=new no(e.mergeOptions(i,{segmentMetadataTrack:s.segmentMetadataTrack_,loaderType:"main"}),n),s.audioSegmentLoader_=new no(e.mergeOptions(i,{loaderType:"audio"}),n),s.subtitleSegmentLoader_=new Xu(e.mergeOptions(i,{loaderType:"vtt",featuresNativeTextTracks:s.tech_.featuresNativeTextTracks}),n),s.setupSegmentLoaderListeners_(),s.experimentalBufferBasedABR&&(s.masterPlaylistLoader_.one("loadedplaylist",function(){return s.startABRTimer_()}),s.tech_.on("pause",function(){return s.stopABRTimer_()}),s.tech_.on("play",function(){return s.startABRTimer_()})),i1.forEach(function(e){s[e+"_"]=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]}.bind(Y(s),e)}),s.logger_=J("MPC"),s.triggeredFmp4Usage=!1,"none"===s.tech_.preload()?(s.loadOnPlay_=function(){s.loadOnPlay_=null,s.masterPlaylistLoader_.load()},s.tech_.one("play",s.loadOnPlay_)):s.masterPlaylistLoader_.load(),s}ie(s,t);var n=s.prototype;return n.checkABR_=function(){var e=this.selectPlaylist();this.shouldSwitchToMedia_(e)&&this.masterPlaylistLoader_.media(e)},n.startABRTimer_=function(){var e=this;this.stopABRTimer_(),this.abrTimer_=o.setInterval(function(){return e.checkABR_()},250)},n.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(o.clearInterval(this.abrTimer_),this.abrTimer_=null)},n.setupMasterPlaylistLoaderListeners_=function(){var e=this;this.masterPlaylistLoader_.on("loadedmetadata",function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;ji(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,t.endList&&"none"!==e.tech_.preload()&&(e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load()),zu({sourceType:e.sourceType_,segmentLoaders:{AUDIO:e.audioSegmentLoader_,SUBTITLES:e.subtitleSegmentLoader_,main:e.mainSegmentLoader_},tech:e.tech_,requestOptions:e.requestOptions_,masterPlaylistLoader:e.masterPlaylistLoader_,vhs:e.vhs_,master:e.master(),mediaTypes:e.mediaTypes_,blacklistCurrentPlaylist:e.blacklistCurrentPlaylist.bind(e)}),e.triggerPresenceUsage_(e.master(),t),e.setupFirstPlay(),!e.mediaTypes_.AUDIO.activePlaylistLoader||e.mediaTypes_.AUDIO.activePlaylistLoader.media()?e.trigger("selectedinitialmedia"):e.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){e.trigger("selectedinitialmedia")})}),this.masterPlaylistLoader_.on("loadedplaylist",function(){e.loadOnPlay_&&e.tech_.off("play",e.loadOnPlay_);var t,n=e.masterPlaylistLoader_.media();if(!n){if(e.excludeUnsupportedVariants_(),e.enableLowInitialPlaylist&&(t=e.selectInitialPlaylist()),!(t=t||e.selectPlaylist())||!e.shouldSwitchToMedia_(t))return;if(e.initialMedia_=t,e.masterPlaylistLoader_.media(e.initialMedia_),"vhs-json"!==e.sourceType_||!e.initialMedia_.segments)return;n=e.initialMedia_}e.handleUpdatedMediaPlaylist(n)}),this.masterPlaylistLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.masterPlaylistLoader_.error)}),this.masterPlaylistLoader_.on("mediachanging",function(){e.mainSegmentLoader_.abort(),e.mainSegmentLoader_.pause()}),this.masterPlaylistLoader_.on("mediachange",function(){var t=e.masterPlaylistLoader_.media(),n=1.5*t.targetDuration*1e3;ji(e.masterPlaylistLoader_.master,e.masterPlaylistLoader_.media())?e.requestOptions_.timeout=0:e.requestOptions_.timeout=n,e.mainSegmentLoader_.playlist(t,e.requestOptions_),e.mainSegmentLoader_.load(),e.tech_.trigger({type:"mediachange",bubbles:!0})}),this.masterPlaylistLoader_.on("playlistunchanged",function(){var t=e.masterPlaylistLoader_.media();"playlist-unchanged"!==t.lastExcludeReason_&&e.stuckAtPlaylistEnd_(t)&&(e.blacklistCurrentPlaylist({message:"Playlist no longer updating.",reason:"playlist-unchanged"}),e.tech_.trigger("playliststuck"))}),this.masterPlaylistLoader_.on("renditiondisabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-disabled"})}),this.masterPlaylistLoader_.on("renditionenabled",function(){e.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"}),e.tech_.trigger({type:"usage",name:"hls-rendition-enabled"})})},n.handleUpdatedMediaPlaylist=function(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())},n.triggerPresenceUsage_=function(e,t){var i,a,n=e.mediaGroups||{},s=!0,o=Object.keys(n.AUDIO);for(i in n.AUDIO)for(a in n.AUDIO[i])n.AUDIO[i][a].uri||(s=!1);s&&(this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),this.tech_.trigger({type:"usage",name:"hls-demuxed"})),Object.keys(n.SUBTITLES).length&&(this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),this.tech_.trigger({type:"usage",name:"hls-webvtt"})),Se.Playlist.isAes(t)&&(this.tech_.trigger({type:"usage",name:"vhs-aes"}),this.tech_.trigger({type:"usage",name:"hls-aes"})),o.length&&1<Object.keys(n.AUDIO[o[0]]).length&&(this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.tech_.trigger({type:"usage",name:"hls-alternate-audio"})),this.useCueTags_&&(this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"}),this.tech_.trigger({type:"usage",name:"hls-playlist-cue-tags"}))},n.shouldSwitchToMedia_=function(t){var s=this.masterPlaylistLoader_.media(),n=this.tech_.buffered();return function(t){var s,o,i,d,u,h,n=t.currentPlaylist,c=t.nextPlaylist,l=t.forwardBuffer,p=t.bufferLowWaterLine,f=t.bufferHighWaterLine,m=t.duration,a=t.experimentalBufferBasedABR,r=t.log;return c?(s="allowing switch "+(n&&n.id||"null")+" -> "+c.id,!n||!n.endList?(r(s+" as current playlist "+(n?"is live":"is not set")),!0):c.id!==n.id&&(d=a?w.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:w.MAX_BUFFER_LOW_WATER_LINE,m<d?(r(s+" as duration < max low water line ("+m+" < "+d+")"),!0):(i=c.attributes.BANDWIDTH,o=n.attributes.BANDWIDTH,i<o&&(!a||l<f)?(u=s+" as next bandwidth < current bandwidth ("+i+" < "+o+")",a&&(u+=" and forwardBuffer < bufferHighWaterLine ("+l+" < "+f+")"),r(u),!0):(!a||o<i)&&p<=l?(h=s+" as forwardBuffer >= bufferLowWaterLine ("+l+" >= "+p+")",a&&(h+=" and next bandwidth > current bandwidth ("+i+" > "+o+")"),r(h),!0):(r("not "+s+" as no switching criteria met"),!1)))):(e.log.warn("We received no playlist to switch to. Please check your stream."),!1)}({currentPlaylist:s,nextPlaylist:t,forwardBuffer:n.length?n.end(n.length-1)-this.tech_.currentTime():0,bufferLowWaterLine:this.bufferLowWaterLine(),bufferHighWaterLine:this.bufferHighWaterLine(),duration:this.duration(),experimentalBufferBasedABR:this.experimentalBufferBasedABR,log:this.logger_})},n.setupSegmentLoaderListeners_=function(){var e=this;this.experimentalBufferBasedABR||(this.mainSegmentLoader_.on("bandwidthupdate",function(){var t=e.selectPlaylist();e.shouldSwitchToMedia_(t)&&e.masterPlaylistLoader_.media(t),e.tech_.trigger("bandwidthupdate")}),this.mainSegmentLoader_.on("progress",function(){e.trigger("progress")})),this.mainSegmentLoader_.on("error",function(){e.blacklistCurrentPlaylist(e.mainSegmentLoader_.error())}),this.mainSegmentLoader_.on("appenderror",function(){e.error=e.mainSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.mainSegmentLoader_.on("timestampoffset",function(){e.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"}),e.tech_.trigger({type:"usage",name:"hls-timestamp-offset"})}),this.audioSegmentLoader_.on("syncinfoupdate",function(){e.onSyncInfoUpdate_()}),this.audioSegmentLoader_.on("appenderror",function(){e.error=e.audioSegmentLoader_.error_,e.trigger("error")}),this.mainSegmentLoader_.on("ended",function(){e.logger_("main segment loader ended"),e.onEndOfStream()}),this.mainSegmentLoader_.on("earlyabort",function(){e.experimentalBufferBasedABR||(e.delegateLoaders_("all",["abort"]),e.blacklistCurrentPlaylist({message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},120))});function t(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)}this.mainSegmentLoader_.on("trackinfo",t),this.audioSegmentLoader_.on("trackinfo",t),this.mainSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("fmp4",function(){e.triggeredFmp4Usage||(e.tech_.trigger({type:"usage",name:"vhs-fmp4"}),e.tech_.trigger({type:"usage",name:"hls-fmp4"}),e.triggeredFmp4Usage=!0)}),this.audioSegmentLoader_.on("ended",function(){e.logger_("audioSegmentLoader ended"),e.onEndOfStream()})},n.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)},n.load=function(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()},n.smoothQualityChange_=function(e){void 0===e&&(e=this.selectPlaylist()),e!==this.masterPlaylistLoader_.media()&&(this.masterPlaylistLoader_.media(e),this.mainSegmentLoader_.resetLoader())},n.fastQualityChange_=function(t){var n=this;void 0===t&&(t=this.selectPlaylist()),t!==this.masterPlaylistLoader_.media()?(this.masterPlaylistLoader_.media(t),this.mainSegmentLoader_.resetEverything(function(){e.browser.IE_VERSION||e.browser.IS_EDGE?n.tech_.setCurrentTime(n.tech_.currentTime()+.04):n.tech_.setCurrentTime(n.tech_.currentTime())})):this.logger_("skipping fastQualityChange because new media is same as old")},n.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();var e=this.tech_.seekable();return this.tech_.duration()===1/0&&this.tech_.currentTime()<e.start(0)?this.tech_.setCurrentTime(e.end(e.length-1)):void 0}},n.setupFirstPlay=function(){var t,n=this,s=this.masterPlaylistLoader_.media();if(!s||this.tech_.paused()||this.hasPlayed_)return!1;if(!s.endList){if(t=this.seekable(),!t.length)return!1;if(e.browser.IE_VERSION&&0===this.tech_.readyState())return this.tech_.one("loadedmetadata",function(){n.trigger("firstplay"),n.tech_.setCurrentTime(t.end(0)),n.hasPlayed_=!0}),!1;this.trigger("firstplay"),this.tech_.setCurrentTime(t.end(0))}return this.hasPlayed_=!0,this.load(),!0},n.handleSourceOpen_=function(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){var e=this.tech_.play();"undefined"!=typeof e&&"function"==typeof e.then&&e.then(null,function(){})}this.trigger("sourceopen")},n.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var t,e=this.inbandTextTracks_.metadataTrack_.cues;e&&e.length&&(t=this.duration(),e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t)}},n.handleDurationChange_=function(){this.tech_.trigger("durationchange")},n.onEndOfStream=function(){var e=this.mainSegmentLoader_.ended_;this.mediaTypes_.AUDIO.activePlaylistLoader&&(e=!this.mainSegmentLoader_.currentMediaInfo_||this.mainSegmentLoader_.currentMediaInfo_.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_),e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())},n.stuckAtPlaylistEnd_=function(e){if(!this.seekable().length)return!1;if(t=this.syncController_.getExpiredTime(e,this.duration()),null===t)return!1;var t,s,o=Se.Playlist.playlistEnd(e,t),i=this.tech_.currentTime(),n=this.tech_.buffered();return n.length?(s=n.end(n.length-1),s-i<=.1&&o-s<=.1):o-i<=.1},n.blacklistCurrentPlaylist=function(t,n){if(void 0===t&&(t={}),s=t.playlist||this.masterPlaylistLoader_.media(),n=n||t.blacklistDuration||this.blacklistDuration,!s)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));var s,o,r,l,d,u,h,i=this.masterPlaylistLoader_.master.playlists,c=i.filter(hn),a=1===c.length&&c[0]===s;return 1===i.length&&n!==1/0?(e.log.warn("Problem encountered with playlist "+s.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.masterPlaylistLoader_.load(a)):(a&&(r=!1,i.forEach(function(e){if(e!==s){var t=e.excludeUntil;"undefined"!=typeof t&&t!==1/0&&(r=!0,delete e.excludeUntil)}}),r&&(e.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))),s.excludeUntil=Date.now()+1e3*n,t.reason&&(s.lastExcludeReason_=t.reason),this.tech_.trigger("blacklistplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-blacklisted"}),this.tech_.trigger({type:"usage",name:"hls-rendition-blacklisted"}),o=this.selectPlaylist(),o?(l=t.internal?this.logger_:e.log.warn,d=t.message?" "+t.message:"",l((t.internal?"Internal problem":"Problem")+" encountered with playlist "+s.id+"."+d+" Switching to playlist "+o.id+"."),o.attributes.AUDIO!==s.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==s.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]),u=o.targetDuration/2*1e3||5e3,h="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=u,this.masterPlaylistLoader_.media(o,a||h)):(this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error")))},n.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()},n.delegateLoaders_=function(e,t){var n,o=this,s=[],i="all"===e;!i&&"main"!==e||s.push(this.masterPlaylistLoader_),n=[],!i&&"audio"!==e||n.push("AUDIO"),!i&&"subtitle"!==e||(n.push("CLOSED-CAPTIONS"),n.push("SUBTITLES")),n.forEach(function(e){var t=o.mediaTypes_[e]&&o.mediaTypes_[e].activePlaylistLoader;t&&s.push(t)}),["main","audio","subtitle"].forEach(function(t){var n=o[t+"SegmentLoader_"];!n||e!==t&&"all"!==e||s.push(n)}),s.forEach(function(e){return t.forEach(function(t){"function"==typeof e[t]&&e[t]()})})},n.setCurrentTime=function(e){var t=wt(this.tech_.buffered(),e);return this.masterPlaylistLoader_&&this.masterPlaylistLoader_.media()&&this.masterPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.resetEverything(),this.mainSegmentLoader_.abort(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.resetEverything(),this.audioSegmentLoader_.abort()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.resetEverything(),this.subtitleSegmentLoader_.abort()),void this.load()):0},n.duration=function(){if(!this.masterPlaylistLoader_)return 0;var e=this.masterPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:Se.Playlist.duration(e):1/0:0},n.seekable=function(){return this.seekable_},n.onSyncInfoUpdate_=function(){if(this.masterPlaylistLoader_&&(s=this.masterPlaylistLoader_.media(),s&&(o=this.syncController_.getExpiredTime(s,this.duration()),null!==o))){var n,s,o,a,r,i=this.masterPlaylistLoader_.master.suggestedPresentationDelay,t=Se.Playlist.seekable(s,o,i);if(0!==t.length){if(this.mediaTypes_.AUDIO.activePlaylistLoader){if(s=this.mediaTypes_.AUDIO.activePlaylistLoader.media(),null===(o=this.syncController_.getExpiredTime(s,this.duration())))return;if(0===(n=Se.Playlist.seekable(s,o,i)).length)return}this.seekable_&&this.seekable_.length&&(a=this.seekable_.end(0),r=this.seekable_.start(0)),n?n.start(0)>t.end(0)||t.start(0)>n.end(0)?this.seekable_=t:this.seekable_=e.createTimeRanges([[n.start(0)>t.start(0)?n.start(0):t.start(0),n.end(0)<t.end(0)?n.end(0):t.end(0)]]):this.seekable_=t,this.seekable_&&this.seekable_.length&&this.seekable_.end(0)===a&&this.seekable_.start(0)===r||(this.logger_("seekable updated ["+tl(this.seekable_)+"]"),this.tech_.trigger("seekablechanged"))}}},n.updateDuration=function(e){if(this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null),"open"!==this.mediaSource.readyState)return this.updateDuration_=this.updateDuration.bind(this,e),void this.mediaSource.addEventListener("sourceopen",this.updateDuration_);if(e){if(t=this.seekable(),!t.length)return;(isNaN(this.mediaSource.duration)||this.mediaSource.duration<t.end(t.length-1))&&this.sourceUpdater_.setDuration(t.end(t.length-1))}else{var t,s=this.tech_.buffered(),n=Se.Playlist.duration(this.masterPlaylistLoader_.media());0<s.length&&(n=Math.max(n,s.end(s.length-1))),this.mediaSource.duration!==n&&this.sourceUpdater_.setDuration(n)}},n.dispose=function(){var e=this;this.trigger("dispose"),this.decrypter_.terminate(),this.masterPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach(function(t){var s,n=e.mediaTypes_[t].groups;for(s in n)n[s].forEach(function(e){e.playlistLoader&&e.playlistLoader.dispose()})}),this.audioSegmentLoader_.dispose(),this.subtitleSegmentLoader_.dispose(),this.sourceUpdater_.dispose(),this.timelineChangeController_.dispose(),this.stopABRTimer_(),this.updateDuration_&&this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.mediaSource.removeEventListener("durationchange",this.handleDurationChange_),this.mediaSource.removeEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_),this.off()},n.master=function(){return this.masterPlaylistLoader_.master},n.media=function(){return this.masterPlaylistLoader_.media()||this.initialMedia_},n.areMediaTypesKnown_=function(){var e=!!this.mediaTypes_.AUDIO.activePlaylistLoader;return!(!this.mainSegmentLoader_.currentMediaInfo_||e&&!this.audioSegmentLoader_.currentMediaInfo_)},n.getCodecsOrExclude_=function(){s=this,e={main:this.mainSegmentLoader_.currentMediaInfo_||{},audio:this.audioSegmentLoader_.currentMediaInfo_||{}},e.video=e.main;var e,n,s,o,a,r,l,i=Et(this.master(),this.media()),t={},c=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(t.video=i.video||e.main.videoCodec||"avc1.4d400d"),e.main.isMuxed&&(t.video+=","+(i.audio||e.main.audioCodec||Ii)),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||c)&&(t.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||Ii,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),t.audio||t.video){if(n={},(["video","audio"].forEach(function(s){if(t.hasOwnProperty(s)&&!function(e,t){return e?es(t):Ro(t)}(e[s].isFmp4,t[s])){var o=e[s].isFmp4?"browser":"muxer";n[o]=n[o]||[],n[o].push(t[s]),"audio"===s&&(a=o)}}),c&&a&&this.media().attributes.AUDIO)&&(r=this.media().attributes.AUDIO,this.master().playlists.forEach(function(e){(e.attributes&&e.attributes.AUDIO)===r&&e!==s.media()&&(e.excludeUntil=1/0)}),this.logger_("excluding audio group "+r+" as "+a+' does not support codec(s): "'+t.audio+'"')),!Object.keys(n).length)return this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()&&(o=[],["video","audio"].forEach(function(e){var n=(oe(s.sourceUpdater_.codecs[e]||"")[0]||{}).type,i=(oe(t[e]||"")[0]||{}).type;n&&i&&n.toLowerCase()!==i.toLowerCase()&&o.push('"'+s.sourceUpdater_.codecs[e]+'" -> "'+t[e]+'"')}),o.length)?void this.blacklistCurrentPlaylist({playlist:this.media(),message:"Codec switching not supported: "+o.join(", ")+".",blacklistDuration:1/0,internal:!0}):t;l=Object.keys(n).reduce(function(e,t){return e&&(e+=", "),e+=t+' does not support codec(s): "'+n[t].join(",")+'"'},"")+".",this.blacklistCurrentPlaylist({playlist:this.media(),internal:!0,message:l,blacklistDuration:1/0})}else this.blacklistCurrentPlaylist({playlist:this.media(),message:"Could not determine codecs for playlist.",blacklistDuration:1/0})},n.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var t,e=this.getCodecsOrExclude_();e&&(this.sourceUpdater_.createSourceBuffers(e),t=[e.video,e.audio].filter(Boolean).join(","),this.excludeIncompatibleVariants_(t))}},n.excludeUnsupportedVariants_=function(){var e=this,t=this.master().playlists,n=[];Object.keys(t).forEach(function(s){if(i=t[s],-1===n.indexOf(i.id)){n.push(i.id);var i,o=Et(e.master,i),a=[];!o.audio||Ro(o.audio)||es(o.audio)||a.push("audio codec "+o.audio),!o.video||Ro(o.video)||es(o.video)||a.push("video codec "+o.video),o.text&&"stpp.ttml.im1t"===o.text&&a.push("text codec "+o.text),a.length&&(i.excludeUntil=1/0,e.logger_("excluding "+i.id+" for unsupported: "+a.join(", ")))}})},n.excludeIncompatibleVariants_=function(e){var n=this,i=[],a=this.master().playlists,t=fi(oe(e)),r=Er(t),s=t.video&&oe(t.video)[0]||null,o=t.audio&&oe(t.audio)[0]||null;Object.keys(a).forEach(function(e){if(t=a[e],-1===i.indexOf(t.id)&&t.excludeUntil!==1/0){i.push(t.id);var t,d,u,l=[],c=Et(n.masterPlaylistLoader_.master,t),h=Er(c);(c.audio||c.video)&&((h!==r&&l.push('codec count "'+h+'" !== "'+r+'"'),!n.sourceUpdater_.canChangeType())&&(d=c.video&&oe(c.video)[0]||null,u=c.audio&&oe(c.audio)[0]||null,d&&s&&d.type.toLowerCase()!==s.type.toLowerCase()&&l.push('video codec "'+d.type+'" !== "'+s.type+'"'),u&&o&&u.type.toLowerCase()!==o.type.toLowerCase()&&l.push('audio codec "'+u.type+'" !== "'+o.type+'"')),l.length&&(t.excludeUntil=1/0,n.logger_("blacklisting "+t.id+": "+l.join(" && "))))}})},n.updateAdCues_=function(e){var t=0,n=this.seekable();n.length&&(t=n.start(0)),function(e,t,n){if(void 0===n&&(n=0),e.segments)for(s=n,r=0;r<e.segments.length;r++){if(a=e.segments[r],i=i||Mu(t,s+a.duration/2)){if("cueIn"in a){i.endTime=s,i.adEndTime=s,s+=a.duration,i=null;continue}if(s<i.endTime){s+=a.duration;continue}i.endTime+=a.duration}else if("cueOut"in a&&((i=new o.VTTCue(s,s+a.duration,a.cueOut)).adStartTime=s,i.adEndTime=s+parseFloat(a.cueOut),t.addCue(i)),"cueOutCont"in a){var s,i,a,r,c=a.cueOutCont.split("/").map(parseFloat),l=c[0],d=c[1];(i=new o.VTTCue(s,s+a.duration,"")).adStartTime=s-l,i.adEndTime=i.adStartTime+d,t.addCue(i)}s+=a.duration}}(e,this.cueTagsTrack_,t)},n.goalBufferLength=function(){var t=this.tech_.currentTime(),e=w.GOAL_BUFFER_LENGTH,n=w.GOAL_BUFFER_LENGTH_RATE,s=Math.max(e,w.MAX_GOAL_BUFFER_LENGTH);return Math.min(e+t*n,s)},n.bufferLowWaterLine=function(){var t=this.tech_.currentTime(),e=w.BUFFER_LOW_WATER_LINE,n=w.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(e,w.MAX_BUFFER_LOW_WATER_LINE),o=Math.max(e,w.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(e+t*n,this.experimentalBufferBasedABR?o:s)},n.bufferHighWaterLine=function(){return w.BUFFER_HIGH_WATER_LINE},s}(e.EventTarget),oc=["seeking","seeked","pause","playing","error"],c1=function(){function n(e){t=this,this.masterPlaylistController_=e.masterPlaylistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.consecutiveUpdates=0,this.lastRecordedTime=null,this.timer_=null,this.checkCurrentTimeTimeout_=null,this.logger_=J("PlaybackWatcher"),this.logger_("initialize");function i(){return t.monitorCurrentTime_()}function a(){return t.monitorCurrentTime_()}function r(){return t.techWaiting_()}function c(){return t.cancelTimer_()}function l(){return t.fixesBadSeeks_()}var t,s=this.masterPlaylistController_,d=["main","subtitle","audio"],n={};d.forEach(function(e){n[e]={reset:function(){return t.resetSegmentDownloads_(e)},updateend:function(){return t.checkSegmentDownloads_(e)}},s[e+"SegmentLoader_"].on("appendsdone",n[e].updateend),s[e+"SegmentLoader_"].on("playlistupdate",n[e].reset),t.tech_.on(["seeked","seeking"],n[e].reset)}),this.tech_.on("seekablechanged",l),this.tech_.on("waiting",r),this.tech_.on(oc,c),this.tech_.on("canplay",a),this.tech_.one("play",i),this.dispose=function(){t.logger_("dispose"),t.tech_.off("seekablechanged",l),t.tech_.off("waiting",r),t.tech_.off(oc,c),t.tech_.off("canplay",a),t.tech_.off("play",i),d.forEach(function(e){s[e+"SegmentLoader_"].off("appendsdone",n[e].updateend),s[e+"SegmentLoader_"].off("playlistupdate",n[e].reset),t.tech_.off(["seeked","seeking"],n[e].reset)}),t.checkCurrentTimeTimeout_&&o.clearTimeout(t.checkCurrentTimeTimeout_),t.cancelTimer_()}}var t=n.prototype;return t.monitorCurrentTime_=function(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&o.clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=o.setTimeout(this.monitorCurrentTime_.bind(this),250)},t.resetSegmentDownloads_=function(e){var t=this.masterPlaylistController_[e+"SegmentLoader_"];0<this[e+"StalledDownloads_"]&&this.logger_("resetting possible stalled download count for "+e+" loader"),this[e+"StalledDownloads_"]=0,this[e+"Buffered_"]=t.buffered_()},t.checkSegmentDownloads_=function(e){var s=this.masterPlaylistController_,t=s[e+"SegmentLoader_"],n=t.buffered_(),o=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(var n=0;n<e.length;n++)if(e.start(n)!==t.start(n)||e.end(n)!==t.end(n))return!0;return!1}(this[e+"Buffered_"],n);this[e+"Buffered_"]=n,o?this.resetSegmentDownloads_(e):(this[e+"StalledDownloads_"]++,this.logger_("found #"+this[e+"StalledDownloads_"]+" "+e+" appends that did not increase buffer (possible stalled download)",{playlistId:t.playlist_&&t.playlist_.id,buffered:_e(n)}),this[e+"StalledDownloads_"]<10||(this.logger_(e+" loader stalled download exclusion"),this.resetSegmentDownloads_(e),this.tech_.trigger({type:"usage",name:"vhs-"+e+"-download-exclusion"}),"subtitle"!==e&&s.blacklistCurrentPlaylist({message:"Excessive "+e+" segment downloading detected."},1/0)))},t.checkCurrentTime_=function(){if(this.tech_.seeking()&&this.fixesBadSeeks_())return this.consecutiveUpdates=0,void(this.lastRecordedTime=this.tech_.currentTime());if(!this.tech_.paused()&&!this.tech_.seeking()){var e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+.1>=t.end(t.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&e===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):e===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=e)}},t.cancelTimer_=function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null},t.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1;var e,s,o,t=this.seekable(),n=this.tech_.currentTime();return this.afterSeekableWindow_(t,n,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(e=t.end(t.length-1)),this.beforeSeekableWindow_(t,n)&&(o=t.start(0),e=o+(o===t.end(0)?0:.1)),"undefined"!=typeof e?(this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+tl(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0):(s=this.tech_.buffered(),!!function(e){var t=e.buffered,n=e.targetDuration,s=e.currentTime;return!!t.length&&!(t.end(0)-t.start(0)<2*n)&&!(s>t.start(0))&&t.start(0)-s<n}({buffered:s,targetDuration:this.media().targetDuration,currentTime:n})&&(e=s.start(0)+.1,this.logger_("Buffered region starts ("+s.start(0)+")  just beyond seek point ("+n+"). Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0))},t.waiting_=function(){if(!this.techWaiting_()){var e=this.tech_.currentTime(),n=this.tech_.buffered(),t=wt(n,e);return t.length&&e+3<=t.end(0)?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.logger_("Stopped at "+e+" while inside a buffered region ["+t.start(0)+" -> "+t.end(0)+"]. Attempting to resume playback by seeking to the current time."),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}},t.techWaiting_=function(){var t,s,o,i,a,n=this.seekable(),e=this.tech_.currentTime();return!!(this.tech_.seeking()&&this.fixesBadSeeks_())||!!(this.tech_.seeking()||null!==this.timer_)||(this.beforeSeekableWindow_(n,e)?(s=n.end(n.length-1),this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+s),this.cancelTimer_(),this.tech_.setCurrentTime(s),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0):(o=this.tech_.vhs.masterPlaylistController_.sourceUpdater_,a=this.tech_.buffered(),this.videoUnderflow_({audioBuffered:o.audioBuffered(),videoBuffered:o.videoBuffered(),currentTime:e})?(this.cancelTimer_(),this.tech_.setCurrentTime(e),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0):(t=ws(a,e),0<t.length&&(i=t.start(0)-e,this.logger_("Stopped at "+e+", setting timer for "+i+", seeking to "+t.start(0)),this.cancelTimer_(),this.timer_=setTimeout(this.skipTheGap_.bind(this),1e3*i,e),!0))))},t.afterSeekableWindow_=function(e,t,n,s){if(void 0===s&&(s=!1),!e.length)return!1;var o=e.end(e.length-1)+.1;return!n.endList&&s&&(o=e.end(e.length-1)+3*n.targetDuration),o<t},t.beforeSeekableWindow_=function(e,t){return!!(e.length&&0<e.start(0)&&t<e.start(0)-this.liveRangeSafeTimeDelta)},t.videoUnderflow_=function(e){var s,t=e.videoBuffered,o=e.audioBuffered,n=e.currentTime;if(t){if(t.length&&o.length){var i=wt(t,n-3),r=wt(t,n),a=wt(o,n);a.length&&!r.length&&i.length&&(s={start:i.end(0),end:a.end(0)})}else ws(t,n).length||(s=this.gapFromVideoUnderflow_(t,n));return!!s&&(this.logger_("Encountered a gap in video from "+s.start+" to "+s.end+". Seeking to current time "+n),!0)}},t.skipTheGap_=function(e){var s=this.tech_.buffered(),t=this.tech_.currentTime(),n=ws(s,t);this.cancelTimer_(),0!==n.length&&t===e&&(this.logger_("skipTheGap_:","currentTime:",t,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+Ue),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}),this.tech_.trigger({type:"usage",name:"hls-gap-skip"}))},t.gapFromVideoUnderflow_=function(t,n){for(var o,a,i=function(t){if(t.length<2)return e.createTimeRanges();for(var o,i,s=[],n=1;n<t.length;n++)o=t.end(n-1),i=t.start(n),s.push([o,i]);return e.createTimeRanges(s)}(t),s=0;s<i.length;s++)if(o=i.start(s),a=i.end(s),n-o<4&&2<n-o)return{start:o,end:a};return null},n}(),l1={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},C={PlaylistLoader:Ze,Playlist:B,utils:ru,STANDARD_PLAYLIST_SELECTOR:da,INITIAL_PLAYLIST_SELECTOR:function(){var t=this,e=this.playlists.master.playlists.filter(B.isEnabled);return pt(e,function(e,t){return Bs(e,t)}),e.filter(function(e){return!!Et(t.playlists.master,e).video})[0]||null},lastBandwidthSelector:da,movingAverageBandwidthSelector:function(e){var t=-1;if(e<0||1<e)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var n=this.useDevicePixelRatio&&o.devicePixelRatio||1;return t<0&&(t=this.systemBandwidth),t=e*this.systemBandwidth+(1-e)*t,ua(this.playlists.master,t,parseInt(ds(this.tech_.el(),"width"),10)*n,parseInt(ds(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Bs,comparePlaylistResolution:function(e,t){var n,s;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),n=n||o.Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(s=t.attributes.RESOLUTION.width),n===(s=s||o.Number.MAX_VALUE)&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:n-s},xhr:xc()};Object.keys(w).forEach(function(t){Object.defineProperty(C,t,{get:function(){return e.log.warn("using Vhs."+t+" is UNSAFE be sure you know what you are doing"),w[t]},set:function(n){e.log.warn("using Vhs."+t+" is UNSAFE be sure you know what you are doing"),"number"!=typeof n||n<0?e.log.warn("value of Vhs."+t+" must be greater than or equal to 0"):w[t]=n}})});function ll(e,t){for(var o=t.media(),s=-1,n=0;n<e.length;n++)if(e[n].id===o.id){s=n;break}e.selectedIndex_=s,e.trigger({selectedIndex:s,type:"change"})}lo="videojs-vhs",C.canPlaySource=function(){return e.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")};function m1(t,n,s){if(!t)return t;o={video:n&&n.attributes&&n.attributes.CODECS,audio:s&&s.attributes&&s.attributes.CODECS},!o.audio&&o.video&&1<o.video.split(",").length&&o.video.split(",").forEach(function(e){e=e.trim(),Ol(e)?o.audio=e:function(e){return void 0===e&&(e=""),me.video.test(e.trim().toLowerCase())}(e)&&(o.video=e)});var o,i,r=o.video?'video/mp4;codecs="'+o.video+'"':null,c=o.audio?'audio/mp4;codecs="'+o.audio+'"':null,a={};for(i in t)a[i]={audioContentType:c,videoContentType:r},n.contentProtection&&n.contentProtection[i]&&n.contentProtection[i].pssh&&(a[i].pssh=n.contentProtection[i].pssh),"string"==typeof t[i]&&(a[i].url=t[i]);return e.mergeOptions(t,a)}function f1(e){var t=e.player,a=e.sourceKeySystems,n=e.audioMedia,s=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var r=function(e,t){return e.reduce(function(e,n){if(!n.contentProtection)return e;var s=t.reduce(function(e,t){var s=n.contentProtection[t];return s&&s.pssh&&(e[t]={pssh:s.pssh}),e},{});return Object.keys(s).length&&e.push(s),e},[])}(n?s.concat([n]):s,Object.keys(a)),o=[],i=[];return r.forEach(function(e){i.push(new Promise(function(e){t.tech_.one("keysessioncreated",e)})),o.push(new Promise(function(n,s){t.eme.initializeMediaKeys({keySystems:e},function(e){e?s(e):n()})}))}),Promise.race([Promise.all(o),Promise.race(i)])}function wl(){if(!o.localStorage)return null;var e=o.localStorage.getItem(lo);if(!e)return null;try{return JSON.parse(e)}catch{return null}}return C.supportsNativeHls=function(){if(!Z||!Z.createElement)return!1;var t=Z.createElement("video");return!!e.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some(function(e){return/maybe|probably/i.test(t.canPlayType(e))})}(),C.supportsNativeDash=!!(Z&&Z.createElement&&e.getTech("Html5").isSupported())&&/maybe|probably/i.test(Z.createElement("video").canPlayType("application/dash+xml")),C.supportsTypeNatively=function(e){return"hls"===e?C.supportsNativeHls:"dash"===e&&C.supportsNativeDash},C.isSupported=function(){return e.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")},Gn=function(t){function s(n,s,o){if(i=t.call(this,s,e.mergeOptions(o.hls,o.vhs))||this,o.hls&&Object.keys(o.hls).length&&e.log.warn("Using hls options is deprecated. Use vhs instead."),i.logger_=J("VhsHandler"),s.options_&&s.options_.playerId){var i,a=e(s.options_.playerId);a.hasOwnProperty("hls")||Object.defineProperty(a,"hls",{get:function(){return e.log.warn("player.hls is deprecated. Use player.tech().vhs instead."),s.trigger({type:"usage",name:"hls-player-access"}),Y(i)},configurable:!0}),a.hasOwnProperty("vhs")||Object.defineProperty(a,"vhs",{get:function(){return e.log.warn("player.vhs is deprecated. Use player.tech().vhs instead."),s.trigger({type:"usage",name:"vhs-player-access"}),Y(i)},configurable:!0}),a.hasOwnProperty("dash")||Object.defineProperty(a,"dash",{get:function(){return e.log.warn("player.dash is deprecated. Use player.tech().vhs instead."),Y(i)},configurable:!0}),i.player_=a}if(i.tech_=s,i.source_=n,i.stats={},i.ignoreNextSeekingEvent_=!1,i.setOptions_(),i.options_.overrideNative&&s.overrideNativeAudioTracks&&s.overrideNativeVideoTracks)s.overrideNativeAudioTracks(!0),s.overrideNativeVideoTracks(!0);else if(i.options_.overrideNative&&(s.featuresNativeVideoTracks||s.featuresNativeAudioTracks))throw new Error("Overriding native HLS requires emulated tracks. See https://git.io/vMpjB");return i.on(Z,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],function(){var t=Z.fullscreenElement||Z.webkitFullscreenElement||Z.mozFullScreenElement||Z.msFullscreenElement;t&&t.contains(i.tech_.el())&&i.masterPlaylistController_.smoothQualityChange_()}),i.on(i.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())}),i.on(i.tech_,"error",function(){this.tech_.error()&&this.masterPlaylistController_&&this.masterPlaylistController_.pauseLoading()}),i.on(i.tech_,"play",i.play),i}ie(s,t);var n=s.prototype;return n.setOptions_=function(){var e,t=this;(this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.handleManifestRedirects=!1!==this.options_.handleManifestRedirects,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.smoothQualityChange=this.options_.smoothQualityChange||!1,this.options_.useBandwidthFromLocalStorage="undefined"!=typeof this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.handlePartialData=this.options_.handlePartialData||!1,"number"!=typeof this.options_.blacklistDuration&&(this.options_.blacklistDuration=300),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage)&&(e=wl(),e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}),this.tech_.trigger({type:"usage",name:"hls-throughput-from-local-storage"}))),"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=w.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===w.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta"].forEach(function(e){"undefined"!=typeof t.source_[e]&&(t.options_[e]=t.source_[e])}),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio},n.src=function(t,n){var i,a,s=this;t&&(this.setOptions_(),this.options_.src=function(e){return 0===e.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(e.substring(e.indexOf(",")+1)):e}(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs=C,this.options_.sourceType=Pi(n),this.options_.seekTo=function(e){s.tech_.setCurrentTime(e)},this.masterPlaylistController_=new a1(this.options_),i=e.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return s.seekable()},media:function(){return s.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_}),this.playbackWatcher_=new c1(i),this.masterPlaylistController_.on("error",function(){var n=e.players[s.tech_.options_.playerId],t=s.masterPlaylistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,n.error(t)}),a=this.options_.experimentalBufferBasedABR?C.movingAverageBandwidthSelector(.55):C.STANDARD_PLAYLIST_SELECTOR,this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):a.bind(this),this.masterPlaylistController_.selectInitialPlaylist=C.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.masterPlaylistController_.masterPlaylistLoader_,this.mediaSource=this.masterPlaylistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get:function(){return this.masterPlaylistController_.selectPlaylist},set:function(e){this.masterPlaylistController_.selectPlaylist=e.bind(this)}},throughput:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.throughput.rate},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.throughput.rate=e,this.masterPlaylistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){return this.masterPlaylistController_.mainSegmentLoader_.bandwidth},set:function(e){this.masterPlaylistController_.mainSegmentLoader_.bandwidth=e,this.masterPlaylistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){var e,t=1/(this.bandwidth||1);return e=0<this.throughput?1/this.throughput:0,Math.floor(1/(t+e))},set:function(){e.log.error('The "systemBandwidth" property is read-only')}}}),this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return s.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return s.masterPlaylistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return s.masterPlaylistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return s.masterPlaylistController_.mediaRequestsTimedout_()||0},enumerable:!0},mediaRequestsErrored:{get:function(){return s.masterPlaylistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return s.masterPlaylistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return s.masterPlaylistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return s.masterPlaylistController_.mediaSecondsLoaded_()||0},enumerable:!0},buffered:{get:function(){return _e(s.tech_.buffered())},enumerable:!0},currentTime:{get:function(){return s.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return s.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return s.tech_.name_},enumerable:!0},duration:{get:function(){return s.tech_.duration()},enumerable:!0},master:{get:function(){return s.playlists.master},enumerable:!0},playerDimensions:{get:function(){return s.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return _e(s.tech_.seekable())},enumerable:!0},timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return s.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.masterPlaylistController_.setupFirstPlay.bind(this.masterPlaylistController_)),this.tech_.on("bandwidthupdate",function(){s.options_.useBandwidthFromLocalStorage&&function(t){if(!o.localStorage)return;var n=wl(),n=n?e.mergeOptions(n,t):t;try{o.localStorage.setItem(lo,JSON.stringify(n))}catch{return}}({bandwidth:s.bandwidth,throughput:Math.round(s.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(e){var t=e.playlists;e.representations=function(){return t&&t.master&&t.master.playlists?t.master.playlists.filter(function(e){return!Xo(e)}).map(function(t){return new Du(e,t,t.id)}):[]}}(s)}),this.masterPlaylistController_.sourceUpdater_.on("createdsourcebuffers",function(){s.setupEme_()}),this.on(this.masterPlaylistController_,"progress",function(){this.tech_.trigger("progress")}),this.on(this.masterPlaylistController_,"firstplay",function(){this.ignoreNextSeekingEvent_=!0}),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=o.URL.createObjectURL(this.masterPlaylistController_.mediaSource),this.tech_.src(this.mediaSourceUrl_)))},n.setupEme_=function(){var t=this,n=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,s=function(t){var n=t.player,o=t.sourceKeySystems,i=t.media,a=t.audioMedia,s=m1(o,i,a);return!!s&&(!(n.currentSource().keySystems=s)||!!n.eme||(e.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1))}({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:n&&n.media()});11!==e.browser.IE_VERSION&&s?(this.logger_("waiting for EME key session creation"),f1({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:n&&n.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){t.logger_("created EME key session"),t.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(e){t.logger_("error while creating EME key session",e),t.player_.error({message:"Failed to initialize media keys for EME",code:3})})):this.masterPlaylistController_.sourceUpdater_.initializedEme()},n.setupQualityLevels_=function(){var t=this,n=e.players[this.tech_.options_.playerId];n&&n.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=n.qualityLevels(),this.masterPlaylistController_.on("selectedinitialmedia",function(){!function(e,t){t.representations().forEach(function(t){e.addQualityLevel(t)}),ll(e,t.playlists)}(t.qualityLevels_,t)}),this.playlists.on("mediachange",function(){ll(t.qualityLevels_,t.playlists)}))},s.version=function(){return{"@videojs/http-streaming":"2.6.4","mux.js":"5.10.0","mpd-parser":"0.15.4","m3u8-parser":"4.5.2","aes-decrypter":"3.1.2"}},n.version=function(){return this.constructor.version()},n.canChangeType=function(){return Pr.canChangeType()},n.play=function(){this.masterPlaylistController_.play()},n.setCurrentTime=function(e){this.masterPlaylistController_.setCurrentTime(e)},n.duration=function(){return this.masterPlaylistController_.duration()},n.seekable=function(){return this.masterPlaylistController_.seekable()},n.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.masterPlaylistController_&&this.masterPlaylistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.player_&&(delete this.player_.vhs,delete this.player_.dash,delete this.player_.hls),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.tech_&&delete this.tech_.hls,this.mediaSourceUrl_&&o.URL.revokeObjectURL&&(o.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),t.prototype.dispose.call(this)},n.convertToProgramTime=function(e,t){return id({playlist:this.masterPlaylistController_.media(),time:e,callback:t})},n.seekToProgramTime=function(e,t,n,s){return void 0===n&&(n=!0),void 0===s&&(s=2),uc({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:s,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},s}(e.getComponent("Component")),$t={name:"videojs-http-streaming",VERSION:"2.6.4",canHandleSource:function(t,n){void 0===n&&(n={});var s=e.mergeOptions(e.options,n);return $t.canPlayType(t.type,s)},handleSource:function(t,n,s){void 0===s&&(s={});var o=e.mergeOptions(e.options,s);return n.vhs=new Gn(t,n,o),e.hasOwnProperty("hls")||Object.defineProperty(n,"hls",{get:function(){return e.log.warn("player.tech().hls is deprecated. Use player.tech().vhs instead."),n.vhs},configurable:!0}),n.vhs.xhr=xc(),n.vhs.src(t.src,t.type),n.vhs},canPlayType:function(t,n){void 0===n&&(n={});var s=e.mergeOptions(e.options,n).vhs.overrideNative,i=void 0===s?!e.browser.IS_ANY_SAFARI:s,o=Pi(t);return o&&(!C.supportsTypeNatively(o)||i)?"maybe":""}},es("avc1.4d400d,mp4a.40.2")&&e.getTech("Html5").registerSourceHandler($t,0),e.VhsHandler=Gn,Object.defineProperty(e,"HlsHandler",{get:function(){return e.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Gn},configurable:!0}),e.VhsSourceHandler=$t,Object.defineProperty(e,"HlsSourceHandler",{get:function(){return e.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),$t},configurable:!0}),e.Vhs=C,Object.defineProperty(e,"Hls",{get:function(){return e.log.warn("videojs.Hls is deprecated. Use videojs.Vhs instead."),C},configurable:!0}),e.use||(e.registerComponent("Hls",C),e.registerComponent("Vhs",C)),e.options.vhs=e.options.vhs||{},e.options.hls=e.options.hls||{},e.registerPlugin?e.registerPlugin("reloadSourceOnError",Fr):e.plugin("reloadSourceOnError",Fr),e})},function(){(function e(t,n,s){function o(i,r){if(!n[i]){if(!t[i]){var c,l,d=typeof require=="function"&&require;if(!r&&d)return d(i,!0);if(a)return a(i,!0);throw l=new Error("Cannot find module '"+i+"'"),l.code="MODULE_NOT_FOUND",l}c=n[i]={exports:{}},t[i][0].call(c.exports,function(e){var n=t[i][1][e];return o(n||e)},c,c.exports,e,t,n,s)}return n[i].exports}for(var a=typeof require=="function"&&require,i=0;i<s.length;i++)o(s[i]);return o})({1:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s,o=function(){function e(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}s=n.IVPAIDAdUnit=function(){function e(){i(this,e)}return o(e,[{key:"handshakeVersion",value:function e(){var t=arguments.length<=0||arguments[0]===void 0?"2.0":arguments[0],e=arguments.length<=1||arguments[1]===void 0?void 0:arguments[1]}},{key:"initAd",value:function(){var i=arguments.length<=4||arguments[4]===void 0?{AdParameters:""}:arguments[4],a=arguments.length<=5||arguments[5]===void 0?{flashVars:""}:arguments[5],r=arguments.length<=6||arguments[6]===void 0?void 0:arguments[6]}},{key:"resizeAd",value:function(){var o=arguments.length<=3||arguments[3]===void 0?void 0:arguments[3]}},{key:"startAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0]}},{key:"stopAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0]}},{key:"pauseAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0]}},{key:"resumeAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0]}},{key:"expandAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0]}},{key:"collapseAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0]}},{key:"skipAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0]}},{key:"getAdLinear",value:function(){}},{key:"getAdWidth",value:function(){}},{key:"getAdHeight",value:function(){}},{key:"getAdExpanded",value:function(){}},{key:"getAdSkippableState",value:function(){}},{key:"getAdRemainingTime",value:function(){}},{key:"getAdDuration",value:function(){}},{key:"setAdVolume",value:function(){var n=arguments.length<=1||arguments[1]===void 0?void 0:arguments[1]}},{key:"getAdVolume",value:function(){}},{key:"getAdCompanions",value:function(){}},{key:"getAdIcons",value:function(){}}]),e}(),Object.defineProperty(s,"EVENTS",{writable:!1,configurable:!1,value:["AdLoaded","AdStarted","AdStopped","AdSkipped","AdSkippableStateChange","AdSizeChange","AdLinearChange","AdDurationChange","AdExpandedChange","AdRemainingTimeChange","AdVolumeChange","AdImpression","AdVideoStart","AdVideoFirstQuartile","AdVideoMidpoint","AdVideoThirdQuartile","AdVideoComplete","AdClickThru","AdInteraction","AdUserAcceptInvitation","AdUserMinimize","AdUserClose","AdPaused","AdPlaying","AdLog","AdError"]})},{}],2:[function(e,t,n){"use strict";var s,i,a,d,o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(n,"__esModule",{value:!0}),i=function(){function e(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&((typeof t=="undefined"?"undefined":o(t))==="object"||typeof t=="function")?t:e}function l(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+(typeof t=="undefined"?"undefined":o(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}s=e("./IVPAIDAdUnit").IVPAIDAdUnit,a=Object.getOwnPropertyNames(s.prototype).filter(function(e){return["constructor"].indexOf(e)===-1}),d=n.VPAIDAdUnit=function(e){l(t,e);function t(e){r(this,t);var n=c(this,Object.getPrototypeOf(t).call(this));return n._destroyed=!1,n._flash=e,n}return i(t,[{key:"_destroy",value:function(){var t=this;this._destroyed=!0,a.forEach(function(e){t._flash.removeCallbackByMethodName(e)}),s.EVENTS.forEach(function(e){t._flash.offEvent(e)}),this._flash=null}},{key:"isDestroyed",value:function(){return this._destroyed}},{key:"on",value:function(t,n){this._flash.on(t,n)}},{key:"off",value:function(t,n){this._flash.off(t,n)}},{key:"handshakeVersion",value:function(){var t=arguments.length<=0||arguments[0]===void 0?"2.0":arguments[0],n=arguments.length<=1||arguments[1]===void 0?void 0:arguments[1];this._flash.callFlashMethod("handshakeVersion",[t],n)}},{key:"initAd",value:function(t,n,s,o){var i=arguments.length<=4||arguments[4]===void 0?{AdParameters:""}:arguments[4],a=arguments.length<=5||arguments[5]===void 0?{flashVars:""}:arguments[5],r=arguments.length<=6||arguments[6]===void 0?void 0:arguments[6];this._flash.setSize(t,n),i=i||{AdParameters:""},a=a||{flashVars:""},this._flash.callFlashMethod("initAd",[this._flash.getWidth(),this._flash.getHeight(),s,o,i.AdParameters||"",a.flashVars||""],r)}},{key:"resizeAd",value:function(t,n,s){var o=arguments.length<=3||arguments[3]===void 0?void 0:arguments[3];this._flash.setSize(t,n),this._flash.callFlashMethod("resizeAd",[this._flash.getWidth(),this._flash.getHeight(),s],o)}},{key:"startAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0];this._flash.callFlashMethod("startAd",[],t)}},{key:"stopAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0];this._flash.callFlashMethod("stopAd",[],t)}},{key:"pauseAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0];this._flash.callFlashMethod("pauseAd",[],t)}},{key:"resumeAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0];this._flash.callFlashMethod("resumeAd",[],t)}},{key:"expandAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0];this._flash.callFlashMethod("expandAd",[],t)}},{key:"collapseAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0];this._flash.callFlashMethod("collapseAd",[],t)}},{key:"skipAd",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0];this._flash.callFlashMethod("skipAd",[],t)}},{key:"getAdLinear",value:function(t){this._flash.callFlashMethod("getAdLinear",[],t)}},{key:"getAdWidth",value:function(t){this._flash.callFlashMethod("getAdWidth",[],t)}},{key:"getAdHeight",value:function(t){this._flash.callFlashMethod("getAdHeight",[],t)}},{key:"getAdExpanded",value:function(t){this._flash.callFlashMethod("getAdExpanded",[],t)}},{key:"getAdSkippableState",value:function(t){this._flash.callFlashMethod("getAdSkippableState",[],t)}},{key:"getAdRemainingTime",value:function(t){this._flash.callFlashMethod("getAdRemainingTime",[],t)}},{key:"getAdDuration",value:function(t){this._flash.callFlashMethod("getAdDuration",[],t)}},{key:"setAdVolume",value:function(t){var n=arguments.length<=1||arguments[1]===void 0?void 0:arguments[1];this._flash.callFlashMethod("setAdVolume",[t],n)}},{key:"getAdVolume",value:function(t){this._flash.callFlashMethod("getAdVolume",[],t)}},{key:"getAdCompanions",value:function(t){this._flash.callFlashMethod("getAdCompanions",[],t)}},{key:"getAdIcons",value:function(t){this._flash.callFlashMethod("getAdIcons",[],t)}}]),t}(s)},{"./IVPAIDAdUnit":1}],3:[function(e,t){"use strict";var o,i,a,r,c,l,d,u,h,m,f,p,v,b=function(){function e(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();function j(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}o=e("swfobject"),r=e("./jsFlashBridge").JSFlashBridge,d=e("./VPAIDAdUnit").VPAIDAdUnit,p=e("./utils").noop,f=e("./utils").callbackTimeout,a=e("./utils").isPositiveInt,u=e("./utils").createElementWithID,h=e("./utils").unique("vpaid"),m=e("./flashTester.js").createFlashTester,v="error",l="10.1.0",c={isSupported:function(){return!0}},i=function(){function e(t,n){var d,m,s=arguments.length<=2||arguments[2]===void 0?{data:"VPAIDFlash.swf",width:800,height:400}:arguments[2],v=this,i=arguments.length<=3||arguments[3]===void 0?{wmode:"transparent",salign:"tl",align:"left",allowScriptAccess:"always",scale:"noScale",allowFullScreen:"true",quality:"high"}:arguments[3],c=arguments.length<=4||arguments[4]===void 0?{debug:!1,timeout:1e4}:arguments[4];if(j(this,e),d=this,this._vpaidParentEl=t,this._flashID=h(),this._destroyed=!1,n=n||p,s.width=a(s.width,800),s.height=a(s.height,400),u(t,this._flashID,!0),i.movie=s.data,i.FlashVars="flashid="+this._flashID+"&handler="+r.VPAID_FLASH_HANDLER+"&debug="+c.debug+"&salign="+i.salign,!e.isSupported())return g("user don't support flash or doesn't have the minimum required version of flash "+l);if(this.el=o.createSWF(s,i,this._flashID),!this.el)return g("swfobject failed to create object in element");m=f(c.timeout,function(e,t){y.call(v),n(e,t)},function(){n("vpaid flash load timeout "+c.timeout)}),this._flash=new r(this.el,s.data,this._flashID,s.width,s.height,m);function g(e){return setTimeout(function(){n(new Error(e))},0),d}}return b(e,[{key:"destroy",value:function(){this._destroyAdUnit(),this._flash&&(this._flash.destroy(),this._flash=null),this.el=null,this._destroyed=!0}},{key:"isDestroyed",value:function(){return this._destroyed}},{key:"_destroyAdUnit",value:function(){delete this._loadLater,this._adUnitLoad&&(this._adUnitLoad=null,this._flash.removeCallback(this._adUnitLoad)),this._adUnit&&(this._adUnit._destroy(),this._adUnit=null)}},{key:"loadAdUnit",value:function(t,n){var o=this;s.call(this),this._adUnit&&this._destroyAdUnit(),this._flash.isReady()?(this._adUnitLoad=function(e){e||(o._adUnit=new d(o._flash)),o._adUnitLoad=null,n(e,o._adUnit)},this._flash.callFlashMethod("loadAdUnit",[t],this._adUnitLoad)):this._loadLater={url:t,callback:n}}},{key:"unloadAdUnit",value:function(){var t=arguments.length<=0||arguments[0]===void 0?void 0:arguments[0];s.call(this),this._destroyAdUnit(),this._flash.callFlashMethod("unloadAdUnit",[],t)}},{key:"getFlashID",value:function(){return s.call(this),this._flash.getFlashID()}},{key:"getFlashURL",value:function(){return s.call(this),this._flash.getFlashURL()}}]),e}(),g("isSupported",function(){return o.hasFlashPlayerVersion(l)&&c.isSupported()},!0),g("runFlashTest",function(e){c=m(document.body,e)});function s(){if(this._destroyed)throw new Error("VPAIDFlashToJS is destroyed!")}function y(){this._loadLater&&(this.loadAdUnit(this._loadLater.url,this._loadLater.callback),delete this._loadLater)}function g(e,t){var n=!(arguments.length<=2||arguments[2]===void 0)&&arguments[2];Object.defineProperty(i,e,{writable:n,configurable:!1,value:t})}i.swfobject=o,t.exports=i},{"./VPAIDAdUnit":2,"./flashTester.js":4,"./jsFlashBridge":5,"./utils":8,swfobject:14}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s,o,i,a,r,c,l,h,d=function(){function e(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r=e("swfobject"),o="vpaid_video_flash_tester",s="vpaid_video_flash_tester_el",a=e("./jsFlashBridge").JSFlashBridge,i=e("./utils"),c=e("./registry").MultipleValuesRegistry,l=function(){function e(t){var o,l=this,n=arguments.length<=1||arguments[1]===void 0?{data:"VPAIDFlash.swf",width:800,height:400}:arguments[1];u(this,e),this.parentEl=i.createElementWithID(t,s),i.hideFlashEl(this.parentEl),o={},o.movie=n.data,o.FlashVars="flashid="+s+"&handler="+a.VPAID_FLASH_HANDLER,o.allowScriptAccess="always",this.el=r.createSWF(n,o,s),this._handlers=new c,this._isSupported=!1,this.el&&(i.hideFlashEl(this.el),this._flash=new a(this.el,n.data,s,n.width,n.height,function(){var e=!0;l._isSupported=e,l._handlers.get("change").forEach(function(t){setTimeout(function(){t("change",e)},0)})}))}return d(e,[{key:"isSupported",value:function(){return this._isSupported}},{key:"on",value:function(t,n){this._handlers.add(t,n)}}]),e}(),h=n.createFlashTester=function(t,n){return window[o]||(window[o]=new l(t,n)),window[o]}},{"./jsFlashBridge":5,"./registry":7,"./utils":8,swfobject:14}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var s,o,i,a,r,c,l,d,u,m=function(){function e(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r=e("./utils").unique,o=e("./utils").isPositiveInt,c=e("./utils").stringEndsWith,l=e("./registry").SingleValueRegistry,d=e("./registry").MultipleValuesRegistry,s=e("./jsFlashBridgeRegistry"),i="vpaid_video_flash_handler",a="AdError",u=n.JSFlashBridge=function(){function e(t,n,o,i,a,c){f(this,e),this._el=t,this._flashID=o,this._flashURL=n,this._width=i,this._height=a,this._handlers=new d,this._callbacks=new l,this._uniqueMethodIdentifier=r(this._flashID),this._ready=!1,this._handShakeHandler=c,s.addInstance(this._flashID,this)}return m(e,[{key:"on",value:function(t,n){this._handlers.add(t,n)}},{key:"off",value:function(t,n){return this._handlers.remove(t,n)}},{key:"offEvent",value:function(t){return this._handlers.removeByKey(t)}},{key:"offAll",value:function(){return this._handlers.removeAll()}},{key:"callFlashMethod",value:function(t){var o=arguments.length<=1||arguments[1]===void 0?[]:arguments[1],s=arguments.length<=2||arguments[2]===void 0?void 0:arguments[2],n="";s&&(n=this._uniqueMethodIdentifier()+"_"+t,this._callbacks.add(n,s));try{this._el[t]([n].concat(o))}catch(e){s?h.call(this,n,e):this._trigger(a,e)}}},{key:"removeCallback",value:function(t){return this._callbacks.removeByValue(t)}},{key:"removeCallbackByMethodName",value:function(t){var n=this;this._callbacks.filterKeys(function(e){return c(e,t)}).forEach(function(e){n._callbacks.remove(e)})}},{key:"removeAllCallbacks",value:function(){return this._callbacks.removeAll()}},{key:"_trigger",value:function(t,n){var s=this;this._handlers.get(t).forEach(function(e){t==="AdClickThru"?e(n):setTimeout(function(){s._handlers.get(t).length>0&&e(n)},0)})}},{key:"_callCallback",value:function(t,n,s,o){var i=this._callbacks.get(n);if(!i){s&&n===""&&this.trigger(a,s);return}h.call(this,n,s,o)}},{key:"_handShake",value:function(t,n){this._ready=!0,this._handShakeHandler&&(this._handShakeHandler(t,n),delete this._handShakeHandler)}},{key:"getSize",value:function(){return{width:this._width,height:this._height}}},{key:"setSize",value:function(t,n){this._width=o(t,this._width),this._height=o(n,this._height),this._el.setAttribute("width",this._width),this._el.setAttribute("height",this._height)}},{key:"getWidth",value:function(){return this._width}},{key:"setWidth",value:function(t){this.setSize(t,this._height)}},{key:"getHeight",value:function(){return this._height}},{key:"setHeight",value:function(t){this.setSize(this._width,t)}},{key:"getFlashID",value:function(){return this._flashID}},{key:"getFlashURL",value:function(){return this._flashURL}},{key:"isReady",value:function(){return this._ready}},{key:"destroy",value:function(){this.offAll(),this.removeAllCallbacks(),s.removeInstanceByID(this._flashID),this._el.parentElement&&this._el.parentElement.removeChild(this._el)}}]),e}();function h(e,t,n){var s=this;setTimeout(function(){var o=s._callbacks.get(e);o&&(s._callbacks.remove(e),o(t,n))},0)}Object.defineProperty(u,"VPAID_FLASH_HANDLER",{writable:!1,configurable:!1,value:i}),window[i]=function(e,t,n,o,i,a){var r=s.getInstanceByID(e);if(!r)return;n==="handShake"?r._handShake(i,a):t!=="event"?r._callCallback(n,o,i,a):r._trigger(n,a)}},{"./jsFlashBridgeRegistry":6,"./registry":7,"./utils":8}],6:[function(e,t){"use strict";var i=e("./registry").SingleValueRegistry,o=new i,s={};Object.defineProperty(s,"addInstance",{writable:!1,configurable:!1,value:function(t,n){o.add(t,n)}}),Object.defineProperty(s,"getInstanceByID",{writable:!1,configurable:!1,value:function(t){return o.get(t)}}),Object.defineProperty(s,"removeInstanceByID",{writable:!1,configurable:!1,value:function(t){return o.remove(t)}}),t.exports=s},{"./registry":7}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var i,a,s=function(){function e(e,t){for(var n,s=0;s<t.length;s++)n=t[s],n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}return function(t,n,s){return n&&e(t.prototype,n),s&&e(t,s),t}}();function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}i=n.MultipleValuesRegistry=function(){function e(){o(this,e),this._registries={}}return s(e,[{key:"add",value:function(t,n){this._registries[t]||(this._registries[t]=[]),this._registries[t].indexOf(n)===-1&&this._registries[t].push(n)}},{key:"get",value:function(t){return this._registries[t]||[]}},{key:"filterKeys",value:function(t){return Object.keys(this._registries).filter(t)}},{key:"findByValue",value:function(t){var n=this,s=Object.keys(this._registries).filter(function(e){return n._registries[e].indexOf(t)!==-1});return s}},{key:"remove",value:function(t,n){if(!this._registries[t])return;var s=this._registries[t].indexOf(n);if(s<0)return;return this._registries[t].splice(s,1)}},{key:"removeByKey",value:function(t){var n=this._registries[t];return delete this._registries[t],n}},{key:"removeByValue",value:function(t){var n=this,s=this.findByValue(t);return s.map(function(e){return n.remove(e,t)})}},{key:"removeAll",value:function(){var t=this._registries;return this._registries={},t}},{key:"size",value:function(){return Object.keys(this._registries).length}}]),e}(),a=n.SingleValueRegistry=function(){function e(){o(this,e),this._registries={}}return s(e,[{key:"add",value:function(t,n){this._registries[t]=n}},{key:"get",value:function(t){return this._registries[t]}},{key:"filterKeys",value:function(t){return Object.keys(this._registries).filter(t)}},{key:"findByValue",value:function(t){var n=this,s=Object.keys(this._registries).filter(function(e){return n._registries[e]===t});return s}},{key:"remove",value:function(t){var n=this._registries[t];return delete this._registries[t],n}},{key:"removeByValue",value:function(t){var n=this,s=this.findByValue(t);return s.map(function(e){return n.remove(e)})}},{key:"removeAll",value:function(){var t=this._registries;return this._registries={},t}},{key:"size",value:function(){return Object.keys(this._registries).length}}]),e}()},{}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.unique=o,n.noop=s,n.callbackTimeout=i,n.createElementWithID=a,n.isPositiveInt=r,n.stringEndsWith=l,n.hideFlashEl=d;function o(e){var t=-1;return function(){return e+"_"+ ++t}}function s(){}function i(e,t,n){var o=setTimeout(function(){t=s,n()},e);return function(){clearTimeout(o),t.apply(this,arguments)}}function a(e,t){var s=!(arguments.length<=2||arguments[2]===void 0)&&arguments[2],n=document.createElement("div");return n.id=t,s&&(e.innerHTML=""),e.appendChild(n),n}function r(e,t){return!isNaN(parseFloat(e))&&isFinite(e)&&e>0?e:t}var c=function(){return String.prototype.endsWith?String.prototype.endsWith:function(t,n){var o,s=this.toString();return(n===void 0||n>s.length)&&(n=s.length),n-=t.length,o=s.indexOf(t,n),o!==-1&&o===n}}();function l(e,t){return c.call(e,t)}function d(e){e.style.position="absolute",e.style.left="-1px",e.style.top="-1px",e.style.width="1px",e.style.height="1px"}},{}],9:[function(e,t){"use strict";var a,i=["handshakeVersion","initAd","startAd","stopAd","skipAd","resizeAd","pauseAd","resumeAd","expandAd","collapseAd","subscribe","unsubscribe"],r=["AdLoaded","AdStarted","AdStopped","AdSkipped","AdSkippableStateChange","AdSizeChange","AdLinearChange","AdDurationChange","AdExpandedChange","AdRemainingTimeChange","AdVolumeChange","AdImpression","AdVideoStart","AdVideoFirstQuartile","AdVideoMidpoint","AdVideoThirdQuartile","AdVideoComplete","AdClickThru","AdInteraction","AdUserAcceptInvitation","AdUserMinimize","AdUserClose","AdPaused","AdPlaying","AdLog","AdError"],c=["getAdLinear","getAdWidth","getAdHeight","getAdExpanded","getAdSkippableState","getAdRemainingTime","getAdDuration","getAdVolume","getAdCompanions","getAdIcons"],l=["setAdVolume"];function s(){}s.prototype.handshakeVersion=function(){},s.prototype.initAd=function(){},s.prototype.startAd=function(){},s.prototype.stopAd=function(){},s.prototype.skipAd=function(){},s.prototype.resizeAd=function(){},s.prototype.pauseAd=function(){},s.prototype.resumeAd=function(){},s.prototype.expandAd=function(){},s.prototype.collapseAd=function(){},s.prototype.subscribe=function(){},s.prototype.unsubscribe=function(){},s.prototype.getAdLinear=function(){},s.prototype.getAdWidth=function(){},s.prototype.getAdHeight=function(){},s.prototype.getAdExpanded=function(){},s.prototype.getAdSkippableState=function(){},s.prototype.getAdRemainingTime=function(){},s.prototype.getAdDuration=function(){},s.prototype.getAdVolume=function(){},s.prototype.getAdCompanions=function(){},s.prototype.getAdIcons=function(){},s.prototype.setAdVolume=function(){},o(s,"METHODS",i),o(s,"GETTERS",c),o(s,"SETTERS",l),o(s,"EVENTS",r),a=i.filter(function(e){return["skipAd"].indexOf(e)===-1}),o(s,"checkVPAIDInterface",function(t){var n=a.every(function(e){return typeof t[e]=="function"});return n}),t.exports=s;function o(e,t,n){Object.defineProperty(e,t,{writable:!1,configurable:!1,value:n})}},{}],10:[function(e,t){"use strict";var o=e("./IVPAIDAdUnit"),f=e("./subscriber"),d=o.checkVPAIDInterface,r=e("./utils"),p=o.METHODS,c="AdError",a="AdClickThru",l=o.EVENTS.filter(function(e){return e!=a});function s(e,t,n,s){this._isValid=d(e),this._isValid&&(this._creative=e,this._el=t,this._videoEl=n,this._iframe=s,this._subscribers=new f,u.call(this))}s.prototype=Object.create(o.prototype),s.prototype.isValidVPAIDAd=function(){return this._isValid},o.METHODS.forEach(function(e){var t=["subscribe","unsubscribe","initAd"];if(t.indexOf(e)!==-1)return;s.prototype[e]=function(){var n=o.prototype[e].length,t=Array.prototype.slice.call(arguments),s=n===t.length?t.pop():void 0;setTimeout(function(){var n,o=null;try{n=this._creative[e].apply(this._creative,t)}catch(e){o=e}i(s,this._subscribers,o,n)}.bind(this),0)}}),s.prototype.initAd=function(t,n,s,o,a,c,l){a=a||{},c=r.extend({slot:this._el,videoSlot:this._videoEl},c||{}),setTimeout(function(){var e;try{this._creative.initAd(t,n,s,o,a,c)}catch(t){e=t}i(l,this._subscribers,e)}.bind(this),0)},s.prototype.subscribe=function(t,n,s){this._subscribers.subscribe(n,t,s)},s.prototype.unsubscribe=function(t,n){this._subscribers.unsubscribe(n,t)},s.prototype.on=s.prototype.subscribe,s.prototype.off=s.prototype.unsubscribe,o.GETTERS.forEach(function(e){s.prototype[e]=function(t){setTimeout(function(){var n,s=null;try{n=this._creative[e]()}catch(e){s=e}i(t,this._subscribers,s,n)}.bind(this),0)}}),s.prototype.setAdVolume=function(t,n){setTimeout(function(){var s,e=null;try{this._creative.setAdVolume(t),s=this._creative.getAdVolume()}catch(t){e=t}e||(e=r.validate(s===t,"failed to apply volume: "+t)),i(n,this._subscribers,e,s)}.bind(this),0)},s.prototype._destroy=function(){this.stopAd(),this._subscribers.unsubscribeAll()};function u(){if(l.forEach(function(e){this._creative.subscribe(m.bind(this,e),e)}.bind(this)),this._creative.subscribe(h.bind(this),a),this._videoEl){var e=this._iframe.contentDocument.documentElement,t=this._videoEl;e.addEventListener("click",function(n){n.target===e&&t.click()})}}function h(e,t,n){this._subscribers.triggerSync(a,{url:e,id:t,playerHandles:n})}function m(e){this._subscribers.trigger(e,Array.prototype.slice(arguments,1))}function i(e,t,n,s){e?e(n,s):n&&t.trigger(c,n)}t.exports=s},{"./IVPAIDAdUnit":9,"./subscriber":12,"./utils":13}],11:[function(e,t){"use strict";var s=e("./utils"),g=s.unique("vpaidIframe"),m=e("./VPAIDAdUnit"),l=`<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"></head><body style="margin:0;padding:0"><div class="da-element"></div><script type="text/javascript" src="{{iframeURL_JS}}"><\/script><script type="text/javascript">window.parent.postMessage('{"event": "ready", "id": "{{iframeID}}"}', '{{origin}}');<\/script></body></html>`,h="AdStopped";function o(e,t,n,o){n=n||{},this._id=g(),this._destroyed=!1,this._frameContainer=s.createElementInEl(e,"div"),this._videoEl=t,this._vpaidOptions=o||{timeout:1e4},this._templateConfig={template:n.template||l,extraOptions:n.extraOptions||{}}}o.prototype.destroy=function(){if(this._destroyed)return;this._destroyed=!0,i.call(this)},o.prototype.isDestroyed=function(){return this._destroyed},o.prototype.loadAdUnit=function(t,n){p.call(this),i.call(this);var o=this,c=s.createIframeWithContent(this._frameContainer,this._templateConfig.template,s.extend({iframeURL_JS:t,iframeID:this.getID(),origin:a()},this._templateConfig.extraOptions));this._frame=c,this._onLoad=s.callbackTimeout(this._vpaidOptions.timeout,l.bind(this),u.bind(this)),window.addEventListener("message",this._onLoad);function l(e){if(e.origin!==a())return;var t,i,c,l,u=JSON.parse(e.data);if(u.id!==o.getID())return;return o._frame.contentWindow?(c=o._frame.contentWindow.getVPAIDAd,t=s.validate(typeof c=="function","the ad didn't return a function to create an ad")):t="the iframe is not anymore in the DOM tree",t||(l=o._frame.contentWindow.document.querySelector(".da-element"),i=new m(c(),l,o._videoEl,o._frame),i.subscribe(h,d.bind(o)),t=s.validate(i.isValidVPAIDAd(),"the add is not fully complaint with VPAID specification")),o._adUnit=i,r.call(o),n(t,t?null:i),!0}function u(){n("timeout",null)}},o.prototype.unloadAdUnit=function(){i.call(this)},o.prototype.getID=function(){return this._id};function u(e){var t=this[e];t&&(t.remove(),delete this[e])}function d(){c.call(this),delete this._adUnit}function i(){c.call(this),f.call(this)}function c(){u.call(this,"_frame"),r.call(this)}function r(){this._onLoad&&(window.removeEventListener("message",this._onLoad),s.clearCallbackTimeout(this._onLoad),delete this._onLoad)}function f(){this._adUnit&&(this._adUnit.stopAd(),delete this._adUnit)}function p(){if(this._destroyed)throw new Error("VPAIDHTML5Client already destroyed!")}function a(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}t.exports=o,window.VPAIDHTML5Client=o},{"./VPAIDAdUnit":10,"./utils":13}],12:[function(e,t){"use strict";function s(){this._subscribers={}}s.prototype.subscribe=function(t,n,s){this.isHandlerAttached(t,n)||this.get(n).push({handler:t,context:s,eventName:n})},s.prototype.unsubscribe=function(t,n){this._subscribers[n]=this.get(n).filter(function(e){return t!==e.handler})},s.prototype.unsubscribeAll=function(){this._subscribers={}},s.prototype.trigger=function(e,t){var n=this,s=this.get(e).concat(this.get("*"));s.forEach(function(e){setTimeout(function(){n.isHandlerAttached(e.handler,e.eventName)&&e.handler.call(e.context,t)},0)})},s.prototype.triggerSync=function(e,t){var n=this.get(e).concat(this.get("*"));n.forEach(function(e){e.handler.call(e.context,t)})},s.prototype.get=function(t){return this._subscribers[t]||(this._subscribers[t]=[]),this._subscribers[t]},s.prototype.isHandlerAttached=function(t,n){return this.get(n).some(function(e){return t===e.handler})},t.exports=s},{}],13:[function(e,t){"use strict";function o(){}function l(e,t){return e?null:new Error(t)}var s={};function i(e){var t=s[e];t&&(clearTimeout(t),delete s[e])}function d(e,t,n){var r=setTimeout(function(){t=o,delete r[a],n()},e),a=function(){t.apply(this,arguments)&&i(a)};return s[a]=r,a}function u(e,t,n){var s=document.createElement(t);return n&&(s.id=n),e.appendChild(s),s}function h(e,t,n){var s=a(e,null,n.zIndex);if(!c(s,r(t,n)))return;return s}function a(e,t,n){var s=document.createElement("iframe");return s.src=t||"about:blank",s.marginWidth="0",s.marginHeight="0",s.frameBorder="0",s.width="100%",s.height="100%",s.style.position="absolute",s.style.left="0",s.style.top="0",s.style.margin="0px",s.style.padding="0px",s.style.border="none",n&&(s.style.zIndex=n),s.setAttribute("SCROLLING","NO"),e.innerHTML="",e.appendChild(s),s}function r(e,t){return Object.keys(t).forEach(function(n){var s=typeof s=="object"?JSON.stringify(t[n]):t[n];e=e.replace(new RegExp("{{"+n+"}}","g"),s)}),e}function c(e,t){var n=e.contentWindow&&e.contentWindow.document;return!!n&&(n.write(t),!0)}function m(e,t){return Object.keys(t).forEach(function(n){e[n]=t[n]}),e}function f(e){var t=-1;return function(){return e+"_"+ ++t}}t.exports={noop:o,validate:l,clearCallbackTimeout:i,callbackTimeout:d,createElementInEl:u,createIframeWithContent:h,createIframe:a,simpleTemplate:r,setIframeContent:c,extend:m,unique:f}},{}],14:[function(e,t){(function(e,n){typeof define=="function"&&define.amd?define(n):typeof t=="object"&&t.exports?t.exports=n():e.swfobject=n()})(this,function(){var c,p,v,C,k,V,X,n="undefined",r="object",N="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",j="application/x-shockwave-flash",z="SWFObjectExprInst",I="onreadystatechange",o=window,t=document,a=navigator,H=!1,g=[],l=[],y=[],m=[],h=!1,_=!1,R=!0,A=!1,e=function(){var u,h=typeof t.getElementById!==n&&typeof t.getElementsByTagName!==n&&typeof t.createElement!==n,c=a.userAgent.toLowerCase(),l=a.platform.toLowerCase(),m=l?/win/.test(l):/win/.test(c),f=l?/mac/.test(l):/mac/.test(c),p=!!/webkit/.test(c)&&parseFloat(c.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),d=a.appName==="Microsoft Internet Explorer",i=[0,0,0],e=null;if(typeof a.plugins!==n&&typeof a.plugins[N]===r)e=a.plugins[N].description,e&&typeof a.mimeTypes!==n&&a.mimeTypes[j]&&a.mimeTypes[j].enabledPlugin&&(H=!0,d=!1,e=e.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),i[0]=s(e.replace(/^(.*)\..*$/,"$1")),i[1]=s(e.replace(/^.*\.(.*)\s.*$/,"$1")),i[2]=/[a-zA-Z]/.test(e)?s(e.replace(/^.*[a-zA-Z]+(.*)$/,"$1")):0);else if(typeof o.ActiveXObject!==n)try{u=new ActiveXObject(W),u&&(e=u.GetVariable("$version"),e&&(d=!0,e=e.split(" ")[1].split(","),i=[s(e[0]),s(e[1]),s(e[2])]))}catch{}return{w3:h,pv:i,wk:p,ie:d,win:m,mac:f}}(),Q=function(){if(!e.w3)return;(typeof t.readyState!==n&&(t.readyState==="complete"||t.readyState==="interactive")||typeof t.readyState===n&&(t.getElementsByTagName("body")[0]||t.body))&&f(),h||(typeof t.addEventListener!==n&&t.addEventListener("DOMContentLoaded",f,!1),e.ie&&(t.attachEvent(I,function e(){t.readyState==="complete"&&(t.detachEvent(I,e),f())}),o==top&&function e(){if(h)return;try{t.documentElement.doScroll("left")}catch{setTimeout(e,0);return}f()}()),e.wk&&function e(){if(h)return;if(!/loaded|complete/.test(t.readyState)){setTimeout(e,0);return}f()}())}();function f(){if(h||!document.getElementsByTagName("body")[0])return;try{var e,n,o,s=i("span");s.style.display="none",e=t.getElementsByTagName("body")[0].appendChild(s),e.parentNode.removeChild(e),e=null,s=null}catch{return}h=!0,o=g.length;for(n=0;n<o;n++)g[n]()}function P(e){h?e():g[g.length]=e}function q(e){if(typeof o.addEventListener!==n)o.addEventListener("load",e,!1);else if(typeof t.addEventListener!==n)t.addEventListener("load",e,!1);else if(typeof o.attachEvent!==n)U(o,"onload",e);else if(typeof o.onload=="function"){var s=o.onload;o.onload=function(){s(),e()}}else o.onload=e}function G(){var o,c,l=t.getElementsByTagName("body")[0],a=i(r);a.setAttribute("style","visibility: hidden;"),a.setAttribute("type",j),o=l.appendChild(a),o?(c=0,function t(){if(typeof o.GetVariable!==n)try{var i=o.GetVariable("$version");i&&(i=i.split(" ")[1].split(","),e.pv=[s(i[0]),s(i[1]),s(i[2])])}catch{e.pv=[8,0,0]}else if(c<10){c++,setTimeout(t,10);return}l.removeChild(a),o=null,F()}()):F()}function F(){var t,s,o,i,a,r,c,h,m,f,g,p=l.length;if(p>0)for(i=0;i<p;i++)if(o=l[i].id,a=l[i].callbackFn,t={success:!1,id:o},e.pv[0]>0){if(s=d(o),s)if(b(l[i].swfVersion)&&!(e.wk&&e.wk<312))u(o,!0),a&&(t.success=!0,t.ref=T(o),t.id=o,a(t));else if(l[i].expressInstall&&O()){r={},r.data=l[i].expressInstall,r.width=s.getAttribute("width")||"0",r.height=s.getAttribute("height")||"0",s.getAttribute("class")&&(r.styleclass=s.getAttribute("class")),s.getAttribute("align")&&(r.align=s.getAttribute("align")),f={},h=s.getElementsByTagName("param"),g=h.length;for(c=0;c<g;c++)h[c].getAttribute("name").toLowerCase()!=="movie"&&(f[h[c].getAttribute("name")]=h[c].getAttribute("value"));M(r,f,o,a)}else Y(s),a&&a(t)}else u(o,!0),a&&(m=T(o),m&&typeof m.SetVariable!==n&&(t.success=!0,t.ref=m,t.id=m.id),a(t))}g[0]=function(){H?G():F()};function T(e){var s=null,t=d(e);return t&&t.nodeName.toUpperCase()==="OBJECT"&&(typeof t.SetVariable!==n?s=t:s=t.getElementsByTagName(r)[0]||t),s}function O(){return!_&&b("6.0.65")&&(e.win||e.mac)&&!(e.wk&&e.wk<312)}function M(a,r,c,l){if(u=d(c),c=E(c),_=!0,C=l||null,V={success:!1,id:c},u){u.nodeName.toUpperCase()==="OBJECT"?(p=S(u),v=null):(p=u,v=c),a.id=z,(typeof a.width===n||!/%$/.test(a.width)&&s(a.width)<310)&&(a.width="310"),(typeof a.height===n||!/%$/.test(a.height)&&s(a.height)<137)&&(a.height="137");var u,h,f=e.ie?"ActiveX":"PlugIn",m="MMredirectURL="+encodeURIComponent(o.location.toString().replace(/&/g,"%26"))+"&MMplayerType="+f+"&MMdoctitle="+encodeURIComponent(t.title.slice(0,47)+" - Flash Player Installation");typeof r.flashvars!==n?r.flashvars+="&"+m:r.flashvars=m,e.ie&&u.readyState!=4&&(h=i("div"),c+="SWFObjectNew",h.setAttribute("id",c),u.parentNode.insertBefore(h,u),u.style.display="none",w(u)),x(a,r,c)}}function Y(t){if(e.ie&&t.readyState!=4){t.style.display="none";var n=i("div");t.parentNode.insertBefore(n,t),n.parentNode.replaceChild(S(t),n),w(t)}else t.parentNode.replaceChild(S(t),t)}function S(t){var n,s,a,c,o=i("div");if(e.win&&e.ie)o.innerHTML=t.innerHTML;else if(a=t.getElementsByTagName(r)[0],a&&(n=a.childNodes,n)){c=n.length;for(s=0;s<c;s++)(n[s].nodeType!=1||n[s].nodeName!=="PARAM")&&n[s].nodeType!=8&&o.appendChild(n[s].cloneNode(!0))}return o}function $(e,t){var n=i("div");return n.innerHTML="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'><param name='movie' value='"+e+"'>"+t+"</object>",n.firstChild}function x(t,s,o){var a,c,l,u,h,m=d(o);if(o=E(o),e.wk&&e.wk<312)return h;if(m){a=i(e.ie?"div":r),typeof t.id===n&&(t.id=o);for(l in s)s.hasOwnProperty(l)&&l.toLowerCase()!=="movie"&&K(a,l,s[l]);e.ie&&(a=$(t.data,a.innerHTML));for(c in t)t.hasOwnProperty(c)&&(u=c.toLowerCase(),u==="styleclass"?a.setAttribute("class",t[c]):u!=="classid"&&u!=="data"&&a.setAttribute(c,t[c]));e.ie?y[y.length]=t.id:(a.setAttribute("type",j),a.setAttribute("data",t.data)),m.parentNode.replaceChild(a,m),h=a}return h}function K(e,t,n){var s=i("param");s.setAttribute("name",t),s.setAttribute("value",n),e.appendChild(s)}function w(t){var n=d(t);n&&n.nodeName.toUpperCase()==="OBJECT"&&(e.ie?(n.style.display="none",function e(){if(n.readyState==4){for(var t in n)typeof n[t]=="function"&&(n[t]=null);n.parentNode.removeChild(n)}else setTimeout(e,10)}()):n.parentNode.removeChild(n))}function B(e){return e&&e.nodeType&&e.nodeType===1}function E(e){return B(e)?e.id:e}function d(e){if(B(e))return e;var n=null;try{n=t.getElementById(e)}catch{}return n}function i(e){return t.createElement(e)}function s(e){return parseInt(e,10)}function U(e,t,n){e.attachEvent(t,n),m[m.length]=[e,t,n]}function b(t){t+="";var o=e.pv,n=t.split(".");return n[0]=s(n[0]),n[1]=s(n[1])||0,n[2]=s(n[2])||0,o[0]>n[0]||o[0]==n[0]&&o[1]>n[1]||o[0]==n[0]&&o[1]==n[1]&&o[2]>=n[2]}function L(s,o,a,r){var l,d,u=t.getElementsByTagName("head")[0];if(!u)return;l=typeof a=="string"?a:"screen",r&&(c=null,k=null),(!c||k!=l)&&(d=i("style"),d.setAttribute("type","text/css"),d.setAttribute("media",l),c=u.appendChild(d),e.ie&&typeof t.styleSheets!==n&&t.styleSheets.length>0&&(c=t.styleSheets[t.styleSheets.length-1]),k=l),c&&(typeof c.addRule!==n?c.addRule(s,o):typeof t.createTextNode!==n&&c.appendChild(t.createTextNode(s+" {"+o+"}")))}function u(e,t){if(!R)return;var n=t?"visible":"hidden",s=d(e);h&&s?s.style.visibility=n:typeof e=="string"&&L("#"+e,"visibility:"+n)}function D(e){var t=/[\\"<>.;]/,s=t.exec(e)!==null;return s&&typeof encodeURIComponent!==n?encodeURIComponent(e):e}return X=function(){e.ie&&window.attachEvent("onunload",function(){for(var n,s,i,a,o=m.length,t=0;t<o;t++)m[t][0].detachEvent(m[t][1],m[t][2]);s=y.length;for(n=0;n<s;n++)w(y[n]);for(i in e)e[i]=null;e=null;for(a in swfobject)swfobject[a]=null;swfobject=null})}(),{registerObject:function(t,n,s,o){if(e.w3&&t&&n){var i={};i.id=t,i.swfVersion=n,i.expressInstall=s,i.callbackFn=o,l[l.length]=i,u(t,!1)}else o&&o({success:!1,id:t})},getObjectById:function(t){if(e.w3)return T(t)},embedSWF:function(t,s,o,i,a,c,l,d,h,m){var f=E(s),p={success:!1,id:f};e.w3&&!(e.wk&&e.wk<312)&&t&&s&&o&&i&&a?(u(f,!1),P(function(){if(o+="",i+="",e={},h&&typeof h===r)for(y in h)e[y]=h[y];if(e.data=t,e.width=o,e.height=i,g={},d&&typeof d===r)for(_ in d)g[_]=d[_];if(l&&typeof l===r)for(v in l)if(l.hasOwnProperty(v)){var e,g,v,j,y,_,w=A?encodeURIComponent(v):v,C=A?encodeURIComponent(l[v]):l[v];typeof g.flashvars!==n?g.flashvars+="&"+w+"="+C:g.flashvars=w+"="+C}if(b(a))j=x(e,g,s),e.id==f&&u(f,!0),p.success=!0,p.ref=j,p.id=j.id;else if(c&&O()){e.data=c,M(e,g,s,m);return}else u(f,!0);m&&m(p)})):m&&m(p)},switchOffAutoHideShow:function(){R=!1},enableUriEncoding:function(e){A=typeof e===n||e},ua:e,getFlashPlayerVersion:function(){return{major:e.pv[0],minor:e.pv[1],release:e.pv[2]}},hasFlashPlayerVersion:b,createSWF:function(t,n,s){return e.w3?x(t,n,s):void 0},showExpressInstall:function(t,n,s,o){e.w3&&O()&&M(t,n,s,o)},removeSWF:function(t){e.w3&&w(t)},createCSS:function(t,n,s,o){e.w3&&L(t,n,s,o)},addDomLoadEvent:P,addLoadEvent:q,getQueryParamValue:function(e){var n,o,s=t.location.search||t.location.hash;if(s){if(/\?/.test(s)&&(s=s.split("?")[1]),!e)return D(s);o=s.split("&");for(n=0;n<o.length;n++)if(o[n].substring(0,o[n].indexOf("="))==e)return D(o[n].substring(o[n].indexOf("=")+1))}return""},expressInstallCallback:function(){if(_){var t=d(z);t&&p&&(t.parentNode.replaceChild(p,t),v&&(u(v,!0),e.ie&&(p.style.display="block")),C&&C(V)),_=!1}},version:"2.3"}})},{}],15:[function(e,t){"use strict";var o=e("./InLine"),i=e("./Wrapper");function s(e){if(!(this instanceof s))return new s(e);this.initialize(e)}s.prototype.initialize=function(e){this.id=e.attr("id"),this.sequence=e.attr("sequence"),e.inLine&&(this.inLine=new o(e.inLine)),e.wrapper&&(this.wrapper=new i(e.wrapper))},t.exports=s},{"./InLine":18,"./Wrapper":28}],16:[function(e,t){"use strict";var r=e("./TrackingEvent"),a=e("../../utils/utilityFunctions"),s=e("../../utils/xml"),o=e("../../utils/consoleLogger");function i(e){if(!(this instanceof i))return new i(e);o.info("<Companion> found companion ad"),o.debug("<Companion>  companionJTree:",e),this.creativeType=s.attr(e.staticResource,"creativeType"),this.staticResource=s.keyValue(e.staticResource),o.info("<Companion>  creativeType: "+this.creativeType),o.info("<Companion>  staticResource: "+this.staticResource);var t,n=null;s.keyValue(e.HTMLResource)?n=s.keyValue(e.HTMLResource):s.keyValue(e.hTMLResource)&&(n=s.keyValue(e.hTMLResource)),n!==null&&o.info("<Companion> found html resource",n),this.htmlResource=n,t=null,s.keyValue(e.IFrameResource)?t=s.keyValue(e.IFrameResource):s.keyValue(e.iFrameresource)&&(t=s.keyValue(e.iFrameresource)),t!==null&&o.info("<Companion> found iframe resource",t),this.iframeResource=t,this.id=s.attr(e,"id"),this.width=s.attr(e,"width"),this.height=s.attr(e,"height"),this.expandedWidth=s.attr(e,"expandedWidth"),this.expandedHeight=s.attr(e,"expandedHeight"),this.scalable=s.attr(e,"scalable"),this.maintainAspectRatio=s.attr(e,"maintainAspectRatio"),this.minSuggestedDuration=s.attr(e,"minSuggestedDuration"),this.apiFramework=s.attr(e,"apiFramework"),this.companionClickThrough=s.keyValue(e.companionClickThrough),this.trackingEvents=c(e.trackingEvents&&e.trackingEvents.tracking),o.info("<Companion>  companionClickThrough: "+this.companionClickThrough);function c(e){var t=[];return a.isDefined(e)&&(e=a.isArray(e)?e:[e],e.forEach(function(e){t.push(new r(e))})),t}}t.exports=i},{"../../utils/consoleLogger":41,"../../utils/utilityFunctions":47,"../../utils/xml":48,"./TrackingEvent":21}],17:[function(e,t){"use strict";var i=e("./Linear"),a=e("./Companion"),o=e("../../utils/utilityFunctions");function s(e){if(!(this instanceof s))return new s(e);if(this.id=e.attr("id"),this.sequence=e.attr("sequence"),this.adId=e.attr("adId"),this.apiFramework=e.attr("apiFramework"),e.linear&&(this.linear=new i(e.linear)),e.companionAds){var n=[],t=e.companionAds&&e.companionAds.companion;o.isDefined(t)&&(t=o.isArray(t)?t:[t],t.forEach(function(e){n.push(new a(e))})),this.companionAds=n}}s.prototype.isSupported=function(){return!this.linear||this.linear.isSupported()},s.parseCreatives=function(t){var i,n=[];return o.isDefined(t)&&o.isDefined(t.creative)&&(i=o.isArray(t.creative)?t.creative:[t.creative],i.forEach(function(e){n.push(new s(e))})),n},t.exports=s},{"../../utils/utilityFunctions":47,"./Companion":16,"./Linear":19}],18:[function(e,t){"use strict";var a=e("./vastUtil"),r=e("./Creative"),i=e("../../utils/utilityFunctions"),s=e("../../utils/xml");function o(e){if(!(this instanceof o))return new o(e);this.adTitle=s.keyValue(e.adTitle),this.adSystem=s.keyValue(e.adSystem),this.impressions=a.parseImpressions(e.impression),this.creatives=r.parseCreatives(e.creatives),this.description=s.keyValue(e.description),this.advertiser=s.keyValue(e.advertiser),this.surveys=t(e.survey),this.error=s.keyValue(e.error),this.pricing=s.keyValue(e.pricing),this.extensions=e.extensions;function t(e){return e?i.transformArray(i.isArray(e)?e:[e],function(e){return i.isNotEmptyString(e.keyValue)?{uri:e.keyValue,type:e.attr("type")}:void 0}):[]}}o.prototype.isSupported=function(){var e,t;if(this.creatives.length===0)return!1;for(e=0,t=this.creatives.length;e<t;e+=1)if(!this.creatives[e].isSupported())return!1;return!0},t.exports=o},{"../../utils/utilityFunctions":47,"../../utils/xml":48,"./Creative":17,"./vastUtil":30}],19:[function(e,t){"use strict";var r=e("./TrackingEvent"),c=e("./MediaFile"),l=e("./VideoClicks"),o=e("../../utils/utilityFunctions"),a=e("./parsers"),s=e("../../utils/xml");function i(e){if(!(this instanceof i))return new i(e);this.duration=a.duration(s.keyValue(e.duration)),this.mediaFiles=n(e.mediaFiles&&e.mediaFiles.mediaFile),this.trackingEvents=t(e.trackingEvents&&e.trackingEvents.tracking,this.duration),this.skipoffset=a.offset(s.attr(e,"skipoffset"),this.duration),e.videoClicks&&(this.videoClicks=new l(e.videoClicks)),e.adParameters&&(this.adParameters=s.keyValue(e.adParameters),s.attr(e.adParameters,"xmlEncoded")&&(this.adParameters=s.decode(this.adParameters)));function t(e,t){var n=[];return o.isDefined(e)&&(e=o.isArray(e)?e:[e],e.forEach(function(e){n.push(new r(e,t))})),n}function n(e){var t=[];return o.isDefined(e)&&(e=o.isArray(e)?e:[e],e.forEach(function(e){t.push(new c(e))})),t}}i.prototype.isSupported=function(){var e,t;for(e=0,t=this.mediaFiles.length;e<t;e+=1)if(this.mediaFiles[e].isSupported())return!0;return!1},t.exports=i},{"../../utils/utilityFunctions":47,"../../utils/xml":48,"./MediaFile":20,"./TrackingEvent":21,"./VideoClicks":27,"./parsers":29}],20:[function(e,t){"use strict";var a=e("../../utils/xml"),o=e("./vastUtil"),i=["delivery","type","width","height","codec","id","bitrate","minBitrate","maxBitrate","scalable","maintainAspectRatio","apiFramework"];function s(e){if(!(this instanceof s))return new s(e);this.src=a.keyValue(e);for(var n,t=0;t<i.length;t++)n=i[t],this[n]=e.attr(n)}s.prototype.isSupported=function(){return o.isVPAID(this)?!!o.findSupportedVPAIDTech(this.type):this.type!=="video/x-flv"||o.isFlashSupported()},t.exports=s},{"../../utils/xml":48,"./vastUtil":30}],21:[function(e,t){"use strict";var o=e("./parsers"),i=e("../../utils/xml");function s(e,t){if(!(this instanceof s))return new s(e,t);this.name=e.attr("event"),this.uri=i.keyValue(e),"progress"===this.name&&(this.offset=o.offset(e.attr("offset"),t))}t.exports=s},{"../../utils/xml":48,"./parsers":29}],22:[function(e,t){"use strict";var l=e("./Ad"),s=e("./VASTError"),d=e("./VASTResponse"),u=e("./vastUtil"),a=e("../../utils/async"),h=e("../../utils/http").http,o=e("../../utils/utilityFunctions"),r=e("../../utils/xml"),c=e("../../utils/consoleLogger");function i(e){if(!(this instanceof i))return new i(e);var t={WRAPPER_LIMIT:5};e=e||{},this.settings=o.extend({},e,t),this.errorURLMacros=[]}i.prototype.getVASTResponse=function(t,n){var r=this,i=l(t,n);if(i){if(o.isFunction(n))return n(i);throw i}a.waterfall([this._getVASTAd.bind(this,t),c],n);function c(e,t){try{var n=r._buildVASTResponse(e);t(null,n)}catch(e){t(e)}}function l(e,t){if(!e)return new s("on VASTClient.getVASTResponse, missing ad tag URL");if(!o.isFunction(t))return new s("on VASTClient.getVASTResponse, missing callback function")}},i.prototype._getVASTAd=function(e,t){var n=this;u(e,function(e,s){var a=s&&o.isArray(s.ads)?s.ads:null;if(e)return n._trackError(e,a),t(e,a);i(a.shift(),[],r);function r(e,s){e?(n._trackError(e,s),a.length>0?i(a.shift(),[],r):t(e,s)):t(null,s)}});function u(e,t){var s=n._requestVASTXml.bind(n,e);a.waterfall([s,h],t)}function h(e,t){var n;try{n=r.toJXONTree(e),c.debug("built JXONTree from VAST response:",n),o.isArray(n.ad)?n.ads=n.ad:n.ad?n.ads=[n.ad]:n.ads=[],t(d(n),n)}catch{t(new s("on VASTClient.getVASTAd.buildVastWaterfall, error parsing xml",100),null)}}function d(e){var t=r.attr(e,"version");return e.ad?t&&t!=3&&t!=2?new s('on VASTClient.getVASTAd.validateVASTTree, not supported VAST version "'+t+'"',102):null:new s("on VASTClient.getVASTAd.validateVASTTree, no Ad in VAST tree",303)}function i(e,t,r){if(t.length>=n.WRAPPER_LIMIT)return r(new s("on VASTClient.getVASTAd.getAd, players wrapper limit reached (the limit is "+n.WRAPPER_LIMIT+")",302),t);a.waterfall([function(t){o.isString(e)?p(e,t):t(null,e)},m],function(e,n){return n&&t.push(n),e?r(e,t):n.wrapper?i(n.wrapper.VASTAdTagURI,t,r):r(null,t)})}function m(e,t){try{var n=new l(e);t(f(n),n)}catch{t(new s("on VASTClient.getVASTAd.buildAd, error parsing xml",100),null)}}function f(e){var t=e.wrapper,n=e.inLine,o="on VASTClient.getVASTAd.validateAd, ";return n&&t?new s(o+"InLine and Wrapper both found on the same Ad",101):!n&&!t?new s(o+"nor wrapper nor inline elements found on the Ad",101):n&&!n.isSupported()?new s(o+"could not find MediaFile that is supported by this video player",403):t&&!t.VASTAdTagURI?new s(o+"missing 'VASTAdTagURI' in wrapper",101):null}function p(e,t){n._requestVASTXml(e,function(e,n){if(e)return t(e);try{var o=r.toJXONTree(n);t(d(o),o.ad)}catch{t(new s("on VASTClient.getVASTAd.requestVASTAd, error parsing xml",100))}})}},i.prototype._requestVASTXml=function(t,n){try{o.isFunction(t)?t(i):(c.info("requesting adTagUrl: "+t),h.get(t,i,{withCredentials:!0}))}catch(e){n(e)}function i(e,t,i){if(e){var a=o.isDefined(i)?"on VASTClient.requestVastXML, HTTP request error with status '"+i+"'":"on VASTClient.requestVastXML, Error getting the the VAST XML with he passed adTagXML fn";return n(new s(a,301),null)}n(null,t)}},i.prototype._buildVASTResponse=function(t){var n=new d;return i(n,t),a(n),n;function i(e,t){t.forEach(function(t){e.addAd(t)})}function a(e){var t=e.trackingEvents.progress;if(!e.hasLinear())throw new s("on VASTClient._buildVASTResponse, Received an Ad type that is not supported",200);if(e.duration===void 0)throw new s("on VASTClient._buildVASTResponse, Missing duration field in VAST response",101);t&&t.forEach(function(e){if(!o.isNumber(e.offset))throw new s("on VASTClient._buildVASTResponse, missing or wrong offset attribute on progress tracking event",101)})}},i.prototype._trackError=function(e,t){if(!o.isArray(t)||t.length===0)return;var n=[];t.forEach(s),u.track(n,{ERRORCODE:e.code||900});function s(e){e.wrapper&&e.wrapper.error&&n.push(e.wrapper.error),e.inLine&&e.inLine.error&&n.push(e.inLine.error)}},t.exports=i},{"../../utils/async":40,"../../utils/consoleLogger":41,"../../utils/http":43,"../../utils/utilityFunctions":47,"../../utils/xml":48,"./Ad":15,"./VASTError":23,"./VASTResponse":25,"./vastUtil":30}],23:[function(e,t){"use strict";function s(e,t){this.message="VAST Error: "+(e||""),t&&(this.code=t)}s.prototype=new Error,s.prototype.name="VAST Error",t.exports=s},{}],24:[function(e,t){"use strict";var d=e("./VASTResponse"),c=e("./VASTError"),u=e("./VASTTracker"),l=e("./vastUtil"),h=e("../../utils/async"),o=e("../../utils/dom"),i=e("../../utils/playerUtils"),r=e("../../utils/utilityFunctions"),a=e("../../utils/consoleLogger");function s(e){if(!(this instanceof s))return new s(e);this.player=e}s.prototype.playAd=function(t,n){var s=this;return n=n||r.noop,t instanceof d?(h.waterfall([function(e){e(null,t)},this._selectAdSource.bind(this),this._createVASTTracker.bind(this),this._addClickThrough.bind(this),this._addSkipButton.bind(this),this._setupEvents.bind(this),this._playSelectedAd.bind(this)],function(e,t){e&&t&&s._trackError(e,t),n(e,t)}),this._adUnit={_src:null,type:"VAST",pauseAd:function(){s.player.pause(!0)},resumeAd:function(){s.player.play(!0)},isPaused:function(){return s.player.paused(!0)},getSrc:function(){return this._src}},this._adUnit):n(new c("On VASTIntegrator, missing required VASTResponse"))},s.prototype._selectAdSource=function(t,n){var s,i=o.getDimension(this.player.el()).width;if(t.mediaFiles.sort(function(t,n){var s=Math.abs(i-t.width),o=Math.abs(i-n.width);return s-o}),s=this.player.selectSource(t.mediaFiles).source,s)return a.info("selected source: ",s),this._adUnit&&(this._adUnit._src=s),n(null,s,t);n(new c("Could not find Ad mediafile supported by this player",403),t)},s.prototype._createVASTTracker=function(t,n,s){try{s(null,t,new u(t.src,n),n)}catch(e){s(e,n)}},s.prototype._setupEvents=function(t,n,s,o){var r,a=this.player;return a.on("fullscreenchange",c),a.on("vast.adStart",u),a.on("pause",l),a.on("timeupdate",d),a.on("volumechange",h),i.once(a,["vast.adEnd","vast.adsCancel"],m),i.once(a,["vast.adEnd","vast.adsCancel","vast.adSkip"],function(e){e.type==="vast.adEnd"&&n.trackComplete()}),o(null,t,s);function m(){a.off("fullscreenchange",c),a.off("vast.adStart",u),a.off("pause",l),a.off("timeupdate",d),a.off("volumechange",h)}function c(){a.isFullscreen()?n.trackFullscreen():n.trackExitFullscreen()}function l(){if(Math.abs(a.duration()-a.currentTime())<2)return;n.trackPause(),i.once(a,["play","vast.adEnd","vast.adsCancel"],function(e){e.type==="play"&&n.trackResume()})}function d(){var e=a.currentTime()*1e3;n.trackProgress(e)}function u(){n.trackImpressions(),n.trackCreativeView()}function h(){var e=a.muted();e?n.trackMute():r&&n.trackUnmute(),r=e}},s.prototype._addSkipButton=function(t,n,s,a){var c,l=this;r.isNumber(s.skipoffset)&&(c=s.skipoffset/1e3,d(this.player,c)),a(null,t,n,s);function d(e,t){var n=u(e),s=h.bind(l,n,t,e);e.el().appendChild(n),e.on("timeupdate",s),i.once(e,["vast.adEnd","vast.adsCancel"],a);function a(){e.off("timeupdate",s),o.remove(n)}}function u(e){var t=window.document.createElement("div");return o.addClass(t,"vast-skip-button"),t.onclick=function(s){if(o.hasClass(t,"enabled")&&(n.trackSkip(),e.trigger("vast.adSkip")),window.Event.prototype.stopPropagation!==void 0)s.stopPropagation();else return!1},t}function h(e,t,n){var s=Math.ceil(t-n.currentTime());s>0?e.innerHTML="Skip in "+r.toFixedDigits(s,2)+"...":o.hasClass(e,"enabled")||(o.addClass(e,"enabled"),e.innerHTML="Skip ad")}},s.prototype._addClickThrough=function(t,n,s,a){var c=this.player,d=m(c,n,s),u=f.bind(this,d,s,c);return c.el().insertBefore(d,c.controlBar.el()),c.on("timeupdate",u),i.once(c,["vast.adEnd","vast.adsCancel"],p),a(null,t,n,s);function m(e,t,n){var s=window.document.createElement("a"),i=n.clickThrough;return o.addClass(s,"vast-blocker"),s.href=h(i,e),r.isString(i)&&(s.target="_blank"),s.onclick=function(n){if(e.paused())return e.play(),window.Event.prototype.stopPropagation!==void 0&&n.stopPropagation(),!1;e.pause(),t.trackClick()},s}function f(e,t,n){e.href=h(t.clickThrough,n)}function h(e,n){var s={ASSETURI:t.src,CONTENTPLAYHEAD:l.formatProgress(n.currentTime()*1e3)};return e?l.parseURLMacro(e,s):"#"}function p(){c.off("timeupdate",u),o.remove(d)}},s.prototype._playSelectedAd=function(t,n,s){var o=this.player;o.preload("auto"),o.src(t),a.debug("<VASTIntegrator._playSelectedAd> waiting for durationchange to play the ad..."),i.once(o,["durationchange","error","vast.adsCancel"],function(e){e.type==="durationchange"?(a.debug("<VASTIntegrator._playSelectedAd> got durationchange; calling playAd()"),r()):e.type==="error"&&s(new c("on VASTIntegrator, Player is unable to play the Ad",400),n)});function r(){i.once(o,["playing","vast.adsCancel"],function(e){if(e.type==="vast.adsCancel")return;a.debug("<VASTIntegrator._playSelectedAd/playAd> got playing event; triggering vast.adStart..."),o.trigger("vast.adStart"),o.on("ended",t),o.on("vast.adsCancel",t),o.on("vast.adSkip",t);function t(e){if(e.type==="ended"&&o.duration()-o.currentTime()>3)return;o.off("ended",t),o.off("vast.adsCancel",t),o.off("vast.adSkip",t),(e.type==="ended"||e.type==="vast.adSkip")&&s(null,n)}}),a.debug("<VASTIntegrator._playSelectedAd/playAd> calling player.play()..."),o.play()}},s.prototype._trackError=function(t,n){l.track(n.errorURLMacros,{ERRORCODE:t.code||900})},t.exports=s},{"../../utils/async":40,"../../utils/consoleLogger":41,"../../utils/dom":42,"../../utils/playerUtils":45,"../../utils/utilityFunctions":47,"./VASTError":23,"./VASTResponse":25,"./VASTTracker":26,"./vastUtil":30}],25:[function(e,t){"use strict";var c=e("./Ad"),l=e("./VideoClicks"),d=e("./Linear"),a=e("./InLine"),u=e("./Wrapper"),o=e("../../utils/utilityFunctions"),r=e("../../utils/xml");window.InLine__A=a;function s(){if(!(this instanceof s))return new s;this._linearAdded=!1,this.ads=[],this.errorURLMacros=[],this.impressions=[],this.clickTrackings=[],this.customClicks=[],this.trackingEvents={},this.mediaFiles=[],this.clickThrough=void 0,this.adTitle="",this.duration=void 0,this.skipoffset=void 0}s.prototype.addAd=function(e){var t,n;e instanceof c&&(t=e.inLine,n=e.wrapper,this.ads.push(e),t&&this._addInLine(t),n&&this._addWrapper(n))},s.prototype._addErrorTrackUrl=function(e){var t=e instanceof r.JXONTree?r.keyValue(e):e;t&&this.errorURLMacros.push(t)},s.prototype._addImpressions=function(e){o.isArray(e)&&i(this.impressions,e)},s.prototype._addClickThrough=function(e){o.isNotEmptyString(e)&&(this.clickThrough=e)},s.prototype._addClickTrackings=function(e){o.isArray(e)&&i(this.clickTrackings,e)},s.prototype._addCustomClicks=function(e){o.isArray(e)&&i(this.customClicks,e)},s.prototype._addTrackingEvents=function(e){var t=this.trackingEvents;e&&(e=o.isArray(e)?e:[e],e.forEach(function(e){t[e.name]||(t[e.name]=[]),t[e.name].push(e)}))},s.prototype._addTitle=function(e){o.isNotEmptyString(e)&&(this.adTitle=e)},s.prototype._addDuration=function(e){o.isNumber(e)&&(this.duration=e)},s.prototype._addVideoClicks=function(e){e instanceof l&&(this._addClickThrough(e.clickThrough),this._addClickTrackings(e.clickTrackings),this._addCustomClicks(e.customClicks))},s.prototype._addMediaFiles=function(e){o.isArray(e)&&i(this.mediaFiles,e)},s.prototype._addSkipoffset=function(e){e&&(this.skipoffset=e)},s.prototype._addAdParameters=function(e){e&&(this.adParameters=e)},s.prototype._addLinear=function(e){e instanceof d&&(this._addDuration(e.duration),this._addTrackingEvents(e.trackingEvents),this._addVideoClicks(e.videoClicks),this._addMediaFiles(e.mediaFiles),this._addSkipoffset(e.skipoffset),this._addAdParameters(e.adParameters),this._linearAdded=!0)},s.prototype._addInLine=function(e){var t=this;e instanceof a&&(this._addTitle(e.adTitle),this._addErrorTrackUrl(e.error),this._addImpressions(e.impressions),e.creatives.forEach(function(e){e.linear&&t._addLinear(e.linear)}))},s.prototype._addWrapper=function(e){var t=this;e instanceof u&&(this._addErrorTrackUrl(e.error),this._addImpressions(e.impressions),e.creatives.forEach(function(e){var n=e.linear;n&&(t._addVideoClicks(n.videoClicks),t.clickThrough=void 0,t._addTrackingEvents(n.trackingEvents))}))},s.prototype.hasLinear=function(){return this._linearAdded};function i(e,t){t.forEach(function(t){e.push(t)})}t.exports=s},{"../../utils/utilityFunctions":47,"../../utils/xml":48,"./Ad":15,"./InLine":18,"./Linear":19,"./VideoClicks":27,"./Wrapper":28}],26:[function(e,t){"use strict";var i=e("./VASTError"),r=e("./VASTResponse"),a=e("./vastUtil"),o=e("../../utils/utilityFunctions");function s(e,t){if(!(this instanceof s))return new s(e,t);this.sanityCheck(e,t),this.initialize(e,t)}s.prototype.initialize=function(e,t){this.response=t,this.assetURI=e,this.progress=0,this.quartiles={firstQuartile:{tracked:!1,time:Math.round(25*t.duration)/100},midpoint:{tracked:!1,time:Math.round(50*t.duration)/100},thirdQuartile:{tracked:!1,time:Math.round(75*t.duration)/100}}},s.prototype.sanityCheck=function(e,t){if(!o.isString(e)||o.isEmptyString(e))throw new i("on VASTTracker constructor, missing required the URI of the ad asset being played");if(!(t instanceof r))throw new i("on VASTTracker constructor, missing required VAST response")},s.prototype.trackURLs=function(t,n){o.isArray(t)&&t.length>0&&(n=o.extend({ASSETURI:this.assetURI,CONTENTPLAYHEAD:a.formatProgress(this.progress)},n||{}),a.track(t,n))},s.prototype.trackEvent=function(t,n){this.trackURLs(s(this.response.trackingEvents[t])),n&&(this.response.trackingEvents[t]=void 0);function s(e){var t;return e&&(t=[],e.forEach(function(e){t.push(e.uri)})),t}},s.prototype.trackProgress=function e(t){var n=this,a=[],r=!0,c=!1,s=this.response.trackingEvents;o.isNumber(t)&&(i("start",r,t>0),i("rewind",c,l(this.progress,t)),d(t),u(t),h(),this.progress=t);function l(e,n){var s=3e3;return e>t&&Math.abs(n-e)>s}function i(e,t,n){s[e]&&n&&a.push({name:e,trackOnce:!!t})}function d(t){var o=n.quartiles,a=n.quartiles.firstQuartile,c=n.quartiles.midpoint,l=n.quartiles.thirdQuartile;a.tracked?c.tracked?l.tracked||s("thirdQuartile",t):s("midpoint",t):s("firstQuartile",t);function s(t,n){var s=o[t];e(s,n)&&(s.tracked=!0,i(t,r,!0))}}function e(e,t){var n=e.time;return t>=n&&t<=n+5e3}function u(e){if(!o.isArray(s.progress))return;var t=[];s.progress.forEach(function(s){s.offset<=e?n.trackURLs([s.uri]):t.push(s)}),s.progress=t}function h(){a.forEach(function(e){n.trackEvent(e.name,e.trackOnce)})}},["rewind","fullscreen","exitFullscreen","pause","resume","mute","unmute","acceptInvitation","acceptInvitationLinear","collapse","expand"].forEach(function(e){s.prototype["track"+o.capitalize(e)]=function(){this.trackEvent(e)}}),["start","skip","close","closeLinear"].forEach(function(e){s.prototype["track"+o.capitalize(e)]=function(){this.trackEvent(e,!0)}}),["firstQuartile","midpoint","thirdQuartile"].forEach(function(e){s.prototype["track"+o.capitalize(e)]=function(){this.quartiles[e].tracked=!0,this.trackEvent(e,!0)}}),s.prototype.trackComplete=function(){this.quartiles.thirdQuartile.tracked&&this.trackEvent("complete",!0)},s.prototype.trackErrorWithCode=function(t){o.isNumber(t)&&this.trackURLs(this.response.errorURLMacros,{ERRORCODE:t})},s.prototype.trackImpressions=function(){this.trackURLs(this.response.impressions)},s.prototype.trackCreativeView=function(){this.trackEvent("creativeView")},s.prototype.trackClick=function(){this.trackURLs(this.response.clickTrackings)},t.exports=s},{"../../utils/utilityFunctions":47,"./VASTError":23,"./VASTResponse":25,"./vastUtil":30}],27:[function(e,t){"use strict";var i=e("../../utils/utilityFunctions"),o=e("../../utils/xml");function s(e){if(!(this instanceof s))return new s(e);this.clickThrough=o.keyValue(e.clickThrough),this.clickTrackings=t(e.clickTracking),this.customClicks=t(e.customClick);function t(e){var t=[];return e&&(e=i.isArray(e)?e:[e],e.forEach(function(e){t.push(o.keyValue(e))})),t}}t.exports=s},{"../../utils/utilityFunctions":47,"../../utils/xml":48}],28:[function(e,t){"use strict";var i=e("./vastUtil"),a=e("./Creative"),r=e("../../utils/utilityFunctions"),s=e("../../utils/xml");function o(e){if(!(this instanceof o))return new o(e);this.adSystem=s.keyValue(e.adSystem),this.impressions=i.parseImpressions(e.impression),this.VASTAdTagURI=s.keyValue(e.vASTAdTagURI),this.creatives=a.parseCreatives(e.creatives),this.error=s.keyValue(e.error),this.extensions=e.extensions,this.followAdditionalWrappers=!r.isDefined(s.attr(e,"followAdditionalWrappers"))||s.attr(e,"followAdditionalWrappers"),this.allowMultipleAds=s.attr(e,"allowMultipleAds"),this.fallbackOnNoAd=s.attr(e,"fallbackOnNoAd")}t.exports=o},{"../../utils/utilityFunctions":47,"../../utils/xml":48,"./Creative":17,"./vastUtil":30}],29:[function(e,t){"use strict";var o=e("../../utils/utilityFunctions"),i=/(\d\d):(\d\d):(\d\d)(\.(\d\d\d))?/,s={duration:function e(t){var n,s;return o.isString(t)&&(n=t.match(i),n&&(s=a(n[1])+e(n[2])+r(n[3])+parseInt(n[5]||0))),isNaN(s)?null:s;function a(e){return parseInt(e,10)*60*60*1e3}function e(e){return parseInt(e,10)*60*1e3}function r(e){return parseInt(e,10)*1e3}},offset:function(t,n){return o(t)?i(t,n):s.duration(t);function o(e){var t=/^\d+(\.\d+)?%$/g;return t.test(e)}function i(e,t){return t?a(t,parseFloat(e.replace("%",""))):null}function a(e,t){return e*t/100}}};t.exports=s},{"../../utils/utilityFunctions":47}],30:[function(e,t){"use strict";var s=e("../../utils/utilityFunctions"),a=e("../vpaid/VPAIDHTML5Tech"),r=e("../vpaid/VPAIDFlashTech"),i=e("VPAIDFLASHClient/js/VPAIDFLASHClient"),o={track:function(t,n){var i=o.parseURLMacros(t,n),s=[];return i.forEach(function(e){var t=new Image;t.src=e,s.push(t)}),s},parseURLMacros:function(t,n){var s=[];return n=n||{},n.CACHEBUSTING||(n.CACHEBUSTING=Math.round(Math.random()*1e10)),t.forEach(function(e){s.push(o._parseURLMacro(e,n))}),s},parseURLMacro:function(t,n){return n=n||{},n.CACHEBUSTING||(n.CACHEBUSTING=Math.round(Math.random()*1e10)),o._parseURLMacro(t,n)},_parseURLMacro:function(t,n){return n=n||{},s.forEach(n,function(e,n){t=t.replace(new RegExp("\\["+n+"\\]","gm"),e)}),t},parseDuration:function(t){var n,o,i=/(\d\d):(\d\d):(\d\d)(\.(\d\d\d))?/;return s.isString(t)&&(n=t.match(i),n&&(o=a(n[1])+r(n[2])+c(n[3])+parseInt(n[5]||0))),isNaN(o)?null:o;function a(e){return parseInt(e,10)*60*60*1e3}function r(e){return parseInt(e,10)*60*1e3}function c(e){return parseInt(e,10)*1e3}},parseImpressions:function(t){return t?(t=s.isArray(t)?t:[t],s.transformArray(t,function(e){return s.isNotEmptyString(e.keyValue)?e.keyValue:void 0})):[]},formatProgress:function(t){var n=t/(60*60*1e3),n=Math.floor(n),o=t/(60*1e3)%60,o=Math.floor(o),i=t/1e3%60,i=Math.floor(i),a=t%1e3;return s.toFixedDigits(n,2)+":"+s.toFixedDigits(o,2)+":"+s.toFixedDigits(i,2)+"."+s.toFixedDigits(a,3)},parseOffset:function(t,n){return s(t)?i(t,n):o.parseDuration(t);function s(e){var t=/^\d+(\.\d+)?%$/g;return t.test(e)}function i(e,t){return t?a(t,parseFloat(e.replace("%",""))):null}function a(e,t){return e*t/100}},VPAID_techs:[r,a],isVPAID:function(t){return!!t&&t.apiFramework==="VPAID"},findSupportedVPAIDTech:function(t){var n,s,o;for(n=0,o=this.VPAID_techs.length;n<o;n+=1)if(s=this.VPAID_techs[n],s.supports(t))return s;return null},isFlashSupported:function(){return i.isSupported()},runFlashSupportCheck:function(t){i.runFlashTest({data:t})}};t.exports=o},{"../../utils/utilityFunctions":47,"../vpaid/VPAIDFlashTech":32,"../vpaid/VPAIDHTML5Tech":33,"VPAIDFLASHClient/js/VPAIDFLASHClient":3}],31:[function(e,t){"use strict";var i=e("../vast/VASTError"),o=e("../../utils/utilityFunctions");function s(e,t){if(!(this instanceof s))return new s(e,t);n(e,t),this.options=o.extend({},t),this._adUnit=e;function n(e,t){if(!e||!s.checkVPAIDInterface(e))throw new i("on VPAIDAdUnitWrapper, the passed VPAID adUnit does not fully implement the VPAID interface");if(!o.isObject(t))throw new i("on VPAIDAdUnitWrapper, expected options hash  but got '"+t+"'");if(!("responseTimeout"in t)||!o.isNumber(t.responseTimeout))throw new i("on VPAIDAdUnitWrapper, expected responseTimeout in options")}}s.checkVPAIDInterface=function e(t){n=["handshakeVersion","initAd","startAd","stopAd","resizeAd","pauseAd","expandAd","collapseAd"];for(var n,s=0,i=n.length;s<i;s++)if(!t||!o.isFunction(t[n[s]]))return!1;return a(t)&&e(t);function a(e){return o.isFunction(e.subscribe)||o.isFunction(e.addEventListener)||o.isFunction(e.on)}function e(e){return o.isFunction(e.unsubscribe)||o.isFunction(e.removeEventListener)||o.isFunction(e.off)}},s.prototype.adUnitAsyncCall=function(){var n,e=o.arrayLikeObjToArray(arguments),s=e.shift(),t=e.pop();a(s,t,this._adUnit),e.push(r()),this._adUnit[s].apply(this._adUnit,e),n=setTimeout(function(){n=null,t(new i("on VPAIDAdUnitWrapper, timeout while waiting for a response on call '"+s+"'")),t=o.noop},this.options.responseTimeout);function a(e,t,n){if(!o.isString(e)||!o.isFunction(n[e]))throw new i("on VPAIDAdUnitWrapper.adUnitAsyncCall, invalid method name");if(!o.isFunction(t))throw new i("on VPAIDAdUnitWrapper.adUnitAsyncCall, missing callback")}function r(){return function(){n&&clearTimeout(n),t.apply(this,arguments)}}},s.prototype.on=function(e,t){var n=this._adUnit.addEventListener||this._adUnit.subscribe||this._adUnit.on;n.call(this._adUnit,e,t)},s.prototype.off=function(e,t){var n=this._adUnit.removeEventListener||this._adUnit.unsubscribe||this._adUnit.off;n.call(this._adUnit,e,t)},s.prototype.waitForEvent=function(e,t,n){var s;a(e,t),n=n||null,this.on(e,r),s=setTimeout(function(){t(new i("on VPAIDAdUnitWrapper.waitForEvent, timeout while waiting for event '"+e+"'")),s=null,t=o.noop},this.options.responseTimeout);function a(e,t){if(!o.isString(e))throw new i("on VPAIDAdUnitWrapper.waitForEvent, missing evt name");if(!o.isFunction(t))throw new i("on VPAIDAdUnitWrapper.waitForEvent, missing callback")}function r(){var e=o.arrayLikeObjToArray(arguments);s&&(clearTimeout(s),s=null),e.unshift(null),t.apply(n,e)}},s.prototype.handshakeVersion=function(e,t){this.adUnitAsyncCall("handshakeVersion",e,t)},s.prototype.initAd=function(e,t,n,s,o,i){this.waitForEvent("AdLoaded",i),this._adUnit.initAd(e,t,n,s,o)},s.prototype.resizeAd=function(e,t,n,s){this.adUnitAsyncCall("resizeAd",e,t,n,s)},s.prototype.startAd=function(e){this.waitForEvent("AdStarted",e),this._adUnit.startAd()},s.prototype.stopAd=function(e){this.waitForEvent("AdStopped",e),this._adUnit.stopAd()},s.prototype.pauseAd=function(e){this.waitForEvent("AdPaused",e),this._adUnit.pauseAd()},s.prototype.resumeAd=function(e){this.waitForEvent("AdPlaying",e),this._adUnit.resumeAd()},s.prototype.expandAd=function(e){this.waitForEvent("AdExpandedChange",e),this._adUnit.expandAd()},s.prototype.collapseAd=function(e){this.waitForEvent("AdExpandedChange",e),this._adUnit.collapseAd()},s.prototype.skipAd=function(e){this.waitForEvent("AdSkipped",e),this._adUnit.skipAd()},["adLinear","adWidth","adHeight","adExpanded","adSkippableState","adRemainingTime","adDuration","adVolume","adCompanions","adIcons"].forEach(function(e){var t="get"+o.capitalize(e);s.prototype[t]=function(e){this.adUnitAsyncCall(t,e)}}),s.prototype.setAdVolume=function(e,t){this.adUnitAsyncCall("setAdVolume",e,t)},t.exports=s},{"../../utils/utilityFunctions":47,"../vast/VASTError":23}],32:[function(e,t){"use strict";var c=e("../../utils/mimetypes"),o=e("../vast/VASTError"),l=e("VPAIDFLASHClient/js/VPAIDFLASHClient"),a=e("../../utils/utilityFunctions"),r=e("../../utils/dom"),i=e("../../utils/consoleLogger");function s(e,t){if(!(this instanceof s))return new s(e);n(e),this.name="vpaid-flash",this.mediaFile=e,this.containerEl=null,this.vpaidFlashClient=null,this.settings=t;function n(e){if(!e||!a.isString(e.src))throw new o("on VPAIDFlashTech, invalid MediaFile")}}s.VPAIDFLASHClient=l,s.supports=function(e){return c.flash.indexOf(e)>-1&&s.VPAIDFLASHClient.isSupported()},s.prototype.loadAdUnit=function e(t,n,c){var l=this,d=this.settings&&this.settings.vpaidFlashLoaderPath?{data:this.settings.vpaidFlashLoaderPath}:void 0;e(t,c),this.containerEl=t,i.debug("<VPAIDFlashTech.loadAdUnit> loading VPAIDFLASHClient with opts:",d),this.vpaidFlashClient=new s.VPAIDFLASHClient(t,function(e){if(e)return c(e);i.info("<VPAIDFlashTech.loadAdUnit> calling VPAIDFLASHClient.loadAdUnit(); that.mediaFile:",l.mediaFile),l.vpaidFlashClient.loadAdUnit(l.mediaFile.src,c)},d);function e(e,t){if(!r.isDomElement(e))throw new o("on VPAIDFlashTech.loadAdUnit, invalid dom container element");if(!a.isFunction(t))throw new o("on VPAIDFlashTech.loadAdUnit, missing valid callback")}},s.prototype.unloadAdUnit=function(){if(this.vpaidFlashClient){try{this.vpaidFlashClient.destroy()}catch{i.error("VAST ERROR: trying to unload the VPAID adunit")}this.vpaidFlashClient=null}this.containerEl&&(r.remove(this.containerEl),this.containerEl=null)},t.exports=s},{"../../utils/consoleLogger":41,"../../utils/dom":42,"../../utils/mimetypes":44,"../../utils/utilityFunctions":47,"../vast/VASTError":23,"VPAIDFLASHClient/js/VPAIDFLASHClient":3}],33:[function(e,t){"use strict";var o,c=e("../../utils/mimetypes"),i=e("../vast/VASTError"),l=e("VPAIDHTML5Client/js/VPAIDHTML5Client"),a=e("../../utils/utilityFunctions"),r=e("../../utils/dom"),d=e("../../utils/consoleLogger");function s(e){if(!(this instanceof s))return new s(e);t(e),this.name="vpaid-html5",this.containerEl=null,this.videoEl=null,this.vpaidHTMLClient=null,this.mediaFile=e;function t(e){if(!e||!a.isString(e.src))throw new i(s.INVALID_MEDIA_FILE)}}s.VPAIDHTML5Client=l,s.supports=function(e){return!a.isOldIE()&&c.html5.indexOf(e)>-1},s.prototype.loadAdUnit=function(t,n,o){c(t,n,o),this.containerEl=t,this.videoEl=n,this.vpaidHTMLClient=new s.VPAIDHTML5Client(t,n,{}),this.vpaidHTMLClient.loadAdUnit(this.mediaFile.src,o);function c(e,t,n){if(!r.isDomElement(e))throw new i(s.INVALID_DOM_CONTAINER_EL);if(!r.isDomElement(t)||t.tagName.toLowerCase()!=="video")throw new i(s.INVALID_DOM_CONTAINER_EL);if(!a.isFunction(n))throw new i(s.MISSING_CALLBACK)}},s.prototype.unloadAdUnit=function(){if(this.vpaidHTMLClient){try{this.vpaidHTMLClient.destroy()}catch{d.error("VAST ERROR: trying to unload the VPAID adunit")}this.vpaidHTMLClient=null}this.containerEl&&(r.remove(this.containerEl),this.containerEl=null)},o="on VPAIDHTML5Tech",s.INVALID_MEDIA_FILE=o+", invalid MediaFile",s.INVALID_DOM_CONTAINER_EL=o+", invalid container HtmlElement",s.INVALID_DOM_VIDEO_EL=o+", invalid HTMLVideoElement",s.MISSING_CALLBACK=o+", missing valid callback",t.exports=s},{"../../utils/consoleLogger":41,"../../utils/dom":42,"../../utils/mimetypes":44,"../../utils/utilityFunctions":47,"../vast/VASTError":23,"VPAIDHTML5Client/js/VPAIDHTML5Client":11}],34:[function(e,t){"use strict";var u=e("../../utils/mimetypes"),a=e("../vast/VASTError"),m=e("../vast/VASTResponse"),g=e("../vast/VASTTracker"),r=e("../vast/vastUtil"),p=e("./VPAIDAdUnitWrapper"),d=e("../../utils/async"),o=e("../../utils/dom"),f=e("../../utils/playerUtils"),i=e("../../utils/utilityFunctions"),c=e("../../utils/consoleLogger");function s(e,t){if(!(this instanceof s))return new s(e);this.VIEW_MODE={NORMAL:"normal",FULLSCREEN:"fullscreen",THUMBNAIL:"thumbnail"},this.player=e,this.containerEl=n(e),this.options={responseTimeout:5e3,VPAID_VERSION:"2.0"},this.settings=t;function n(){var t=document.createElement("div");return o.addClass(t,"VPAID-container"),e.el().insertBefore(t,e.controlBar.el()),t}}s.prototype.playAd=function(t,n){if(!(t instanceof m))return n(new a("on VASTIntegrator.playAd, missing required VASTResponse"));var r,l,f=this,s=this.player;return c.debug("<VPAIDIntegrator.playAd> looking for supported tech..."),r=this._findSupportedTech(t,this.settings),n=n||i.noop,this._adUnit=null,o.addClass(s.el(),"vjs-vpaid-ad"),s.on("vast.adsCancel",h),s.one("vpaid.adEnd",function(){s.off("vast.adsCancel",h),p()}),r?(c.info("<VPAIDIntegrator.playAd> found tech: ",r),d.waterfall([function(e){e(null,r,t)},this._loadAdUnit.bind(this),this._playAdUnit.bind(this),this._finishPlaying.bind(this)],u),this._adUnit={_paused:!0,type:"VPAID",pauseAd:function(){s.trigger("vpaid.pauseAd"),s.pause(!0)},resumeAd:function(){s.trigger("vpaid.resumeAd")},isPaused:function(){return this._paused},getSrc:function(){return r.mediaFile}}):(c.debug("<VPAIDIntegrator.playAd> could not find suitable tech"),l=new a("on VPAIDIntegrator.playAd, could not find a supported mediaFile",403),u(l,this._adUnit,t)),this._adUnit;function u(e,t,o){e&&o&&f._trackError(o,e.code),s.trigger("vpaid.adEnd"),n(e,o)}function h(){s.trigger("vpaid.adEnd")}function p(){r&&r.unloadAdUnit(),o.removeClass(s.el(),"vjs-vpaid-ad")}},s.prototype._findSupportedTech=function(e,t){if(!(e instanceof m))return null;var n,o,i,c,d,h,l=e.mediaFiles.filter(r.isVPAID),s=t&&t.preferredTech,a=[];for(o=0,d=l.length;o<d;o+=1){if(n=l[o],i=r.findSupportedVPAIDTech(n.type),!i)continue;if(h=!!s&&(n.type===s||u[s]&&u[s].indexOf(n.type)>-1),h)return new i(n,t);a.push({mediaFile:n,tech:i})}return a.length?(c=a[0],new c.tech(c.mediaFile,t)):null},s.prototype._createVPAIDAdUnitWrapper=function(e,t,n){return new p(e,{src:t,responseTimeout:n})},s.prototype._loadAdUnit=function(e,t,n){var i=this,s=this.player,a=s.el().querySelector(".vjs-tech"),r=this.settings.responseTimeout||this.options.responseTimeout;e.loadAdUnit(this.containerEl,a,function(a,c){if(a)return n(a,c,t);try{var d=i._createVPAIDAdUnitWrapper(c,e.mediaFile.src,r),l="vjs-"+e.name+"-ad";o.addClass(s.el(),l),s.one("vpaid.adEnd",function(){o.removeClass(s.el(),l)}),n(null,d,t)}catch(e){n(e,c,t)}})},s.prototype._playAdUnit=function(e,t,n){d.waterfall([function(n){n(null,e,t)},this._handshake.bind(this),this._initAd.bind(this),this._setupEvents.bind(this),this._addSkipButton.bind(this),this._linkPlayerControls.bind(this),this._startAd.bind(this)],n)},s.prototype._handshake=function(t,n,s){t.handshakeVersion(this.options.VPAID_VERSION,function(e,i){return e?s(e,t,n):i&&o(i)?s(null,t,n):s(new a('on VPAIDIntegrator._handshake, unsupported version "'+i+'"'),t,n)});function o(e){var t=i(e);return t>=1&&t<=2}function i(e){var t=e.split(".");return parseInt(t[0],10)}},s.prototype._initAd=function(e,t,n){var i=this.player.el().querySelector(".vjs-tech"),s=o.getDimension(i);e.initAd(s.width,s.height,this.VIEW_MODE.NORMAL,-1,{AdParameters:t.adParameters||""},function(s){n(s,e,t)})},s.prototype._createVASTTracker=function(e,t){return new g(e,t)},s.prototype._setupEvents=function(e,t,n){var l,d,m,g=e.options.src,a=this._createVASTTracker(g,t),s=this.player,c=this;e.on("AdSkipped",function(){s.trigger("vpaid.AdSkipped"),a.trackSkip()}),e.on("AdImpression",function(){s.trigger("vpaid.AdImpression"),a.trackImpressions()}),e.on("AdStarted",function(){s.trigger("vpaid.AdStarted"),a.trackCreativeView(),u()}),e.on("AdVideoStart",function(){s.trigger("vpaid.AdVideoStart"),a.trackStart(),u()}),e.on("AdPlaying",function(){s.trigger("vpaid.AdPlaying"),a.trackResume(),u()}),e.on("AdPaused",function(){s.trigger("vpaid.AdPaused"),a.trackPause(),v()});function u(){c._adUnit&&c._adUnit.isPaused()&&(c._adUnit._paused=!1),s.trigger("play")}function v(){c._adUnit&&(c._adUnit._paused=!0),s.trigger("pause")}e.on("AdVideoFirstQuartile",function(){s.trigger("vpaid.AdVideoFirstQuartile"),a.trackFirstQuartile()}),e.on("AdVideoMidpoint",function(){s.trigger("vpaid.AdVideoMidpoint"),a.trackMidpoint()}),e.on("AdVideoThirdQuartile",function(){s.trigger("vpaid.AdVideoThirdQuartile"),a.trackThirdQuartile()}),e.on("AdVideoComplete",function(){s.trigger("vpaid.AdVideoComplete"),a.trackComplete()}),e.on("AdClickThru",function(n){s.trigger("vpaid.AdClickThru");var o=n.url,l=n.playerHandles,c=i.isNotEmptyString(o)?o:d(t.clickThrough);a.trackClick(),l&&c&&window.open(c,"_blank");function d(t){var n={ASSETURI:e.options.src,CONTENTPLAYHEAD:0};return t?r.parseURLMacro(t,n):null}}),e.on("AdUserAcceptInvitation",function(){s.trigger("vpaid.AdUserAcceptInvitation"),a.trackAcceptInvitation(),a.trackAcceptInvitationLinear()}),e.on("AdUserClose",function(){s.trigger("vpaid.AdUserClose"),a.trackClose(),a.trackCloseLinear()}),e.on("AdUserMinimize",function(){s.trigger("vpaid.AdUserMinimize"),a.trackCollapse()}),e.on("AdError",function(){s.trigger("vpaid.AdError"),a.trackErrorWithCode(901)}),e.on("AdVolumeChange",function(){s.trigger("vpaid.AdVolumeChange");var t=s.volume();e.getAdVolume(function(e,n){t!==n&&(n===0&&t>0&&a.trackMute(),n>0&&t===0&&a.trackUnmute(),s.volume(n))})}),d=h.bind(this,s,e,this.VIEW_MODE),l=i.throttle(d,100),m=this.settings.autoResize,m&&(o.addEventListener(window,"resize",l),o.addEventListener(window,"orientationchange",l)),s.on("vast.resize",d),s.on("vpaid.pauseAd",f),s.on("vpaid.resumeAd",p),s.one("vpaid.adEnd",function(){s.off("vast.resize",d),s.off("vpaid.pauseAd",f),s.off("vpaid.resumeAd",p),m&&(o.removeEventListener(window,"resize",l),o.removeEventListener(window,"orientationchange",l))}),n(null,e,t);function f(){e.pauseAd(i.noop)}function p(){e.resumeAd(i.noop)}},s.prototype._addSkipButton=function(e,t,n){var s,a=this.player;e.on("AdSkippableStateChange",c),f.once(a,["vast.adEnd","vast.adsCancel"],r),n(null,e,t);function c(){a.trigger("vpaid.AdSkippableStateChange"),e.getAdSkippableState(function(e,t){t?s||l(a):r(a)})}function l(e){s=d(e),e.el().appendChild(s)}function r(){o.remove(s),s=null}function d(){var t=window.document.createElement("div");return o.addClass(t,"vast-skip-button"),o.addClass(t,"enabled"),t.innerHTML="Skip ad",t.onclick=function(t){if(e.skipAd(i.noop),window.Event.prototype.stopPropagation!==void 0)t.stopPropagation();else return!1},t}},s.prototype._linkPlayerControls=function(e,t,n){var s=this;o(this.player,e),i(this.player,e,this.VIEW_MODE),n(null,e,t);function o(e,t){e.on("volumechange",n),t.on("AdVolumeChange",s),e.one("vpaid.adEnd",function(){e.off("volumechange",n)});function n(){var n=e.muted()?0:e.volume();t.setAdVolume(n,l)}function s(){e.trigger("vpaid.AdVolumeChange");var n=e.volume();t.getAdVolume(function(t,s){t?l(t):n!==s&&e.volume(s)})}}function i(e,t,n){var o=h.bind(s,e,t,n);e.on("fullscreenchange",o),e.one("vpaid.adEnd",function(){e.off("fullscreenchange",o)})}},s.prototype._startAd=function(e,t,n){var s=this.player;e.startAd(function(o){o||s.trigger("vast.adStart"),n(o,e,t)})},s.prototype._finishPlaying=function(e,t,n){var o=this.player;e.on("AdStopped",function(){o.trigger("vpaid.AdStopped"),s(null)}),e.on("AdError",function(e){var t=e?e.message:"on VPAIDIntegrator, error while waiting for the adUnit to finish playing";s(new a(t))});function s(s){n(s,e,t)}},s.prototype._trackError=function(t,n){r.track(t.errorURLMacros,{ERRORCODE:n||901})};function h(e,t,n){var i=e.el().querySelector(".vjs-tech"),s=o.getDimension(i),a=e.isFullscreen()?n.FULLSCREEN:n.NORMAL;t.resizeAd(s.width,s.height,a,l)}function l(e){e&&c.error("ERROR: "+e.message,e)}t.exports=s},{"../../utils/async":40,"../../utils/consoleLogger":41,"../../utils/dom":42,"../../utils/mimetypes":44,"../../utils/playerUtils":45,"../../utils/utilityFunctions":47,"../vast/VASTError":23,"../vast/VASTResponse":25,"../vast/VASTTracker":26,"../vast/vastUtil":30,"./VPAIDAdUnitWrapper":31}],35:[function(e,t){"use strict";var o,i=e("../../utils/dom"),s=document.createElement("div");s.className="vjs-ads-label vjs-control vjs-label-hidden",s.innerHTML="Advertisement",o=function(e){return{init:function(n,o){o.el=s,e.call(this,n,o),setTimeout(function(){var e=n.controlBar&&(n.controlBar.getChild("timerControls")||n.controlBar.getChild("currentTimeDisplay"));e&&n.controlBar.el().insertBefore(s,e.el()),i.removeClass(s,"vjs-label-hidden")},0)},el:function(){return s}}},t.exports=o},{"../../utils/dom":42}],36:[function(e){"use strict";var s=videojs.getComponent("Component"),o=e("./ads-label")(s);videojs.registerComponent("AdsLabel",videojs.extend(s,o))},{"./ads-label":35}],37:[function(e,t){"use strict";var s=document.createElement("div"),o=function(e){return{init:function(n,o){o.el=s,s.className="vjs-black-poster",e.call(this,n,o);var i=n.getChild("posterImage");setTimeout(function(){i&&n&&n.el()&&n.el().insertBefore(s,i.el())},0)},el:function(){return s}}};t.exports=o},{}],38:[function(e){"use strict";var s=videojs.getComponent("Component"),o=e("./black-poster")(s);videojs.registerComponent("BlackPoster",videojs.extend(s,o))},{"./black-poster":37}],39:[function(e,t){"use strict";var d=e("../ads/vast/VASTClient"),i=e("../ads/vast/VASTError"),r=e("../ads/vast/vastUtil"),u=e("../ads/vast/VASTIntegrator"),h=e("../ads/vpaid/VPAIDIntegrator"),c=e("../utils/async"),l=e("../utils/dom"),s=e("../utils/playerUtils"),o=e("../utils/utilityFunctions"),a=e("../utils/consoleLogger");t.exports=function e(t){var f,n=this,e=new d,g=!1,b={timeout:500,iosPrerollCancelTimeout:2e3,adCancelTimeout:3e3,playAdAlways:!1,adsEnabled:!0,autoResize:!0,vpaidFlashLoaderPath:"/VPAIDFlash.swf",verbosity:0},m=o.extend({},b,t||{});return o.isUndefined(m.adTagUrl)&&o.isDefined(m.url)&&(m.adTagUrl=m.url),o.isString(m.adTagUrl)&&(m.adTagUrl=o.echoFn(m.adTagUrl)),o.isDefined(m.adTagXML)&&!o.isFunction(m.adTagXML)?p(new i("on VideoJS VAST plugin, the passed adTagXML option does not contain a function")):!o.isDefined(m.adTagUrl)&&!o.isFunction(m.adTagXML)?p(new i("on VideoJS VAST plugin, missing adTagUrl on options object")):(a.setVerbosity(m.verbosity),r.runFlashSupportCheck(m.vpaidFlashLoaderPath),s.prepareForAds(n),m.playAdAlways&&n.on("vast.contentEnd",function(){setTimeout(function(){n.trigger("vast.reset")},0)}),n.on("vast.firstPlay",j),n.on("vast.reset",function(){f=null,v()}),n.vast={isEnabled:function(){return m.adsEnabled},enable:function(){m.adsEnabled=!0},disable:function(){m.adsEnabled=!1}},n.vast);function j(){s.removeNativePoster(n),s.once(n,["vast.adsCancel","vast.adEnd"],function(){e(),t()}),c.waterfall([r,d,h,y],function(e,t){e?p(e,t):n.trigger("vast.adEnd")});function e(){n.vast&&n.vast.adUnit&&(n.vast.adUnit=null)}function t(){a(),f&&(s.restorePlayerSnapshot(n,f),f=null)}function a(){s.once(n,["playing","vast.reset","vast.firstPlay"],function(e){if(e.type!=="playing")return;n.trigger("vast.contentStart"),s.once(n,["ended","vast.reset","vast.firstPlay"],function(e){e.type==="ended"&&n.trigger("vast.contentEnd")})})}function r(e){if(m.adsEnabled)return e(null);e(new i("Ads are not enabled"))}function d(e){u()?(f=s.getPlayerSnapshot(n),n.pause(),v(),n.paused()?e(null):s.once(n,["playing"],function(){n.pause(),e(null)})):e(new i("video content has been playing before preroll ad"))}function u(){return!o.isIPhone()||n.currentTime()<=m.iosPrerollCancelTimeout}function h(e){var t;g=!1,t=setTimeout(function(){p(new i("timeout while waiting for the video to start playing",402))},m.adCancelTimeout),s.once(n,["vast.adStart","vast.adsCancel"],o);function o(){t&&(clearTimeout(t),t=null)}e(null)}function v(){l.addClass(n.el(),"vjs-vast-ad-loading"),s.once(n,["vast.adStart","vast.adsCancel"],b)}function b(){setTimeout(function(){l.removeClass(n.el(),"vjs-vast-ad-loading")},100)}}function v(){n.trigger("vast.adsCancel"),g=!0}function y(e){c.waterfall([_,w],e)}function _(t){e.getVASTResponse(m.adTagUrl?m.adTagUrl():m.adTagXML,t)}function w(e,t){if(g)return;var r=O(e)?new h(n,m):new u(n),i=!1;s.once(n,["vast.adStart","vast.adsCancel"],function(e){e.type==="vast.adStart"&&c()}),s.once(n,["vast.adEnd","vast.adsCancel"],l),o.isIDevice()&&d(),n.vast.vastResponse=e,a.debug("calling adIntegrator.playAd() with vastResponse:",e),n.vast.adUnit=r.playAd(e,t);function c(){if(i||n.controlBar.getChild("AdsLabel"))return;n.controlBar.addChild("AdsLabel")}function l(){n.controlBar.removeChild("AdsLabel"),i=!0}function d(){var t=3,e=0,o=0;n.on("timeupdate",a),n.on("ended",i),s.once(n,["vast.adEnd","vast.adsCancel","vast.adError"],r);function i(){n.duration()-e>t&&(n.pause(!0),n.play(!0),n.currentTime(e))}function a(){var s=n.currentTime(),i=Math.abs(s-e);i>t?(o+=1,o>=2&&n.pause(!0),n.currentTime(e)):e=s}function r(){n.off("timeupdate",a),n.off("ended",i)}}}function p(e,t){n.trigger({type:"vast.adError",error:e}),v(),a.error("AD ERROR:",e.message,e,t)}function O(e){var t,n,s=e.mediaFiles;for(t=0,n=s.length;t<n;t++)if(r.isVPAID(s[t]))return!0;return!1}}},{"../ads/vast/VASTClient":22,"../ads/vast/VASTError":23,"../ads/vast/VASTIntegrator":24,"../ads/vast/vastUtil":30,"../ads/vpaid/VPAIDIntegrator":34,"../utils/async":40,"../utils/consoleLogger":41,"../utils/dom":42,"../utils/playerUtils":45,"../utils/utilityFunctions":47}],40:[function(e,t){var o=e("./utilityFunctions"),s={};s.setImmediate=function(e){setTimeout(e,0)},s.iterator=function(e){var t=function(n){var s=function(){return e.length&&e[n].apply(null,arguments),s.next()};return s.next=function(){return n<e.length-1?t(n+1):null},s};return t(0)},s.waterfall=function(e,t){if(t=t||function(){},!o.isArray(e)){var n,i=new Error("First argument to waterfall must be an array of functions");return t(i)}if(!e.length)return t();n=function(e){return function(o){if(o)t.apply(null,arguments),t=function(){};else{var i=Array.prototype.slice.call(arguments,1),a=e.next();a?i.push(n(a)):i.push(t),s.setImmediate(function(){e.apply(null,i)})}}},n(s.iterator(e))()},s.when=function(e,t){if(!o.isFunction(t))throw new Error("async.when error: missing callback argument");var n=o.isFunction(e)?e:function(){return!!e};return function(){var e=o.arrayLikeObjToArray(arguments),s=e.pop();return n.apply(null,e)?t.apply(this,arguments):(e.unshift(null),s.apply(null,e))}},t.exports=s},{"./utilityFunctions":47}],41:[function(e,t){"use strict";var s,i=0,a="[videojs-vast-vpaid] ";function r(e){i=e}function o(e,t){t.length>0&&typeof t[0]=="string"&&(t[0]=a+t[0]),e.apply?e.apply(console,Array.prototype.slice.call(t)):e(Array.prototype.slice.call(t))}function c(){if(i<4)return;typeof console.debug=="undefined"?o(console.log,arguments):o(console.debug,arguments)}function l(){if(i<3)return;o(console.log,arguments)}function d(){if(i<2)return;o(console.info,arguments)}function u(){if(i<1)return;o(console.warn,arguments)}function h(){o(console.error,arguments)}s={setVerbosity:r,debug:c,log:l,info:d,warn:u,error:h},(typeof console=="undefined"||!console.log)&&(s.debug=function(){},s.log=function(){},s.info=function(){},s.warn=function(){},s.error=function(){}),t.exports=s},{}],42:[function(e,t){"use strict";var o=e("./utilityFunctions"),s={};s.isVisible=function(t){var n=window.getComputedStyle(t);return n.visibility!=="hidden"},s.isHidden=function(t){var n=window.getComputedStyle(t);return n.display==="none"},s.isShown=function(t){return!s.isHidden(t)},s.hide=function(t){t.__prev_style_display_=t.style.display,t.style.display="none"},s.show=function(t){s.isHidden(t)&&(t.style.display=t.__prev_style_display_),t.__prev_style_display_=void 0},s.hasClass=function(t,n){var s,i,a;if(o.isNotEmptyString(n)){if(t.classList)return t.classList.contains(n);i=o.isString(t.getAttribute("class"))?t.getAttribute("class").split(/\s+/):[],n=n||"";for(s=0,a=i.length;s<a;s+=1)if(i[s]===n)return!0}return!1},s.addClass=function(e,t){var n;if(o.isNotEmptyString(t)){if(e.classList)return e.classList.add(t);n=o.isString(e.getAttribute("class"))?e.getAttribute("class").split(/\s+/):[],o.isString(t)&&o.isNotEmptyString(t.replace(/\s+/,""))&&(n.push(t),e.setAttribute("class",n.join(" ")))}},s.removeClass=function(e,t){if(o.isNotEmptyString(t)){if(e.classList)return e.classList.remove(t);s=o.isString(e.getAttribute("class"))?e.getAttribute("class").split(/\s+/):[];var n,s,a,i=[];if(o.isString(t)&&o.isNotEmptyString(t.replace(/\s+/,""))){for(n=0,a=s.length;n<a;n+=1)t!==s[n]&&i.push(s[n]);e.setAttribute("class",i.join(" "))}}},s.addEventListener=function(t,n,i){if(o.isArray(t)){o.forEach(t,function(e){s.addEventListener(e,n,i)});return}if(o.isArray(n)){o.forEach(n,function(e){s.addEventListener(t,e,i)});return}t.addEventListener?t.addEventListener(n,i,!1):t.attachEvent&&t.attachEvent("on"+n,i)},s.removeEventListener=function(t,n,i){if(o.isArray(t)){o.forEach(t,function(e){s.removeEventListener(e,n,i)});return}if(o.isArray(n)){o.forEach(n,function(e){s.removeEventListener(t,e,i)});return}t.removeEventListener?t.removeEventListener(n,i,!1):t.detachEvent?t.detachEvent("on"+n,i):t["on"+n]=null},s.dispatchEvent=function(t,n){t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("on"+n.eventType,n)},s.isDescendant=function(t,n){for(var s=n.parentNode;s!==null;){if(s===t)return!0;s=s.parentNode}return!1},s.getTextContent=function(t){return t.textContent||t.text},s.prependChild=function(t,n){return n.parentNode&&n.parentNode.removeChild(n),t.insertBefore(n,t.firstChild)},s.remove=function(t){t&&t.parentNode&&t.parentNode.removeChild(t)},s.isDomElement=function(t){return t instanceof Element},s.click=function(e,t){s.addEventListener(e,"click",t)},s.once=function(e,t,n){function o(){n.apply(null,arguments),s.removeEventListener(e,t,o)}s.addEventListener(e,t,o)},s.getDimension=function(t){var n;return!o.isOldIE()&&t.getBoundingClientRect?(n=t.getBoundingClientRect(),{width:n.width,height:n.height}):{width:t.offsetWidth,height:t.offsetHeight}},t.exports=s},{"./utilityFunctions":47}],43:[function(e,t){"use strict";var r,c=e("./urlUtils"),s=e("./utilityFunctions");function o(e){this.message="HttpRequest Error: "+(e||"")}o.prototype=new Error,o.prototype.name="HttpRequest Error";function i(e){if(!s.isFunction(e))throw new o("Missing XMLHttpRequest factory method");this.createXhr=e}i.prototype.run=function(e,t,n,i){u(t,n,i);var r,l,a=this.createXhr();i=i||{},l=s.isNumber(i.timeout)?i.timeout:0,a.open(e,c.urlParts(t).href,!0),i.headers&&h(a,i.headers),i.withCredentials&&(a.withCredentials=!0),a.onload=function(){var e,t,o;a.getAllResponseHeaders||(a.getAllResponseHeaders=function(){return null}),a.status||(a.status=200),s.isDefined(r)&&(clearTimeout(r),r=void 0),e=a.statusText||"",t="response"in a?a.response:a.responseText,o=a.status===1223?204:a.status,n(o,t,a.getAllResponseHeaders(),e)},a.onerror=d,a.onabort=d,a.send(),l>0&&(r=setTimeout(function(){a&&a.abort()},l));function u(e,t,n){if(!s.isString(e)||s.isEmptyString(e))throw new o("Invalid url '"+e+"'");if(!s.isFunction(t))throw new o("Invalid handler '"+t+"' for the http request");if(s.isDefined(n)&&!s.isObject(n))throw new o("Invalid options map '"+n+"'")}function h(e,t){s.forEach(t,function(t,n){s.isDefined(t)&&e.setRequestHeader(n,t)})}function d(){n(-1,null,null,"")}},i.prototype.get=function(e,t,n){this.run("GET",e,s,n);function s(e,n,s,a){i(e)?t(null,n,e,s,a):t(new o(a),n,e,s,a)}function i(e){return 200<=e&&e<300}};function a(){var e=new XMLHttpRequest;return"withCredentials"in e||(e=new XDomainRequest),e}r=new i(a),t.exports={http:r,HttpRequest:i,HttpRequestError:o,createXhr:a}},{"./urlUtils":46,"./utilityFunctions":47}],44:[function(e,t){"use strict";t.exports={html5:["text/javascript","text/javascript1.0","text/javascript1.2","text/javascript1.4","text/jscript","application/javascript","application/x-javascript","text/ecmascript","text/ecmascript1.0","text/ecmascript1.2","text/ecmascript1.4","text/livescript","application/ecmascript","application/x-ecmascript"],flash:["application/x-shockwave-flash"]}},{}],45:[function(e,t){"use strict";var i=e("./dom"),o=e("./utilityFunctions"),s={};s.getPlayerSnapshot=function(t){var n=t.el().querySelector(".vjs-tech"),s={ended:t.ended(),src:t.currentSrc(),currentTime:t.currentTime(),type:t.currentType(),playing:!t.paused(),suppressedTracks:i(t)};return n&&(s.nativePoster=n.poster,s.style=n.getAttribute("style")),s;function i(e){var n,t=e.remoteTextTracks?e.remoteTextTracks():[];return t&&o.isArray(t.tracks_)&&(t=t.tracks_),o.isArray(t)||(t=[]),n=[],t.forEach(function(e){n.push({track:e,mode:e.mode}),e.mode="disabled"}),n}},s.restorePlayerSnapshot=function e(t,n){var o=t.el().querySelector(".vjs-tech"),a=20;n.nativePoster&&(o.poster=n.nativePoster),"style"in n&&o.setAttribute("style",n.style||""),c(t,n)?(t.one("contentloadedmetadata",e),t.one("canplay",i),r(),t.src({src:n.src,type:n.type}),t.load()):(e(),n.playing&&t.play());function r(){var e=setTimeout(function(){t.trigger("canplay")},1e3);t.one("canplay",function(){clearTimeout(e)})}function c(e,t){return e.src()?e.src()!==t.src:e.currentSrc()!==t.src}function e(){var e=n.suppressedTracks;e.forEach(function(e){e.track.mode=e.mode})}function i(){if(!s.isReadyToResume(t)&&a--)setTimeout(i,50);else try{t.currentTime()!==n.currentTime?(n.playing&&t.one("seeked",function(){t.play()}),t.currentTime(n.currentTime)):n.playing&&t.play()}catch(e){videojs.log.warn("Failed to resume the content after an advertisement",e)}}},s.isReadyToResume=function(e){return e.readyState()>1||e.seekable()===void 0||e.seekable().length>0},s.prepareForAds=function(e){var t,a=e.addChild("blackPoster"),s=!0;u(),e.on("play",g),e.on("vast.reset",f),e.on("vast.firstPlay",c),e.on("error",n),e.on("vast.adStart",n),e.on("vast.adsCancel",n),e.on("vast.adError",n),e.on("vast.adStart",p),e.on("vast.adEnd",l),e.on("vast.adsCancel",l);function u(){var s,i,n=e.play;e.play=function(s){var i=this;return d()?a():c(s),this;function a(){o.isIPhone()||(t=h(),e.muted(!0)),n.apply(i,arguments)}function c(t){r()&&!t?e.vast.adUnit.resumeAd():n.apply(i,arguments)}},s=e.pause,e.pause=function(t){return r()&&!t?e.vast.adUnit.pauseAd():s.apply(this,arguments),this},i=e.paused,e.paused=function(t){return r()&&!t?e.vast.adUnit.isPaused():i.apply(this,arguments)}}function r(){return e.vast&&e.vast.adUnit}function g(){d()&&(s=!1,e.trigger("vast.firstPlay"))}function f(){s=!0,a.show(),c()}function d(){return s}function h(){return{muted:e.muted(),volume:e.volume()}}function c(){t&&(e.currentTime(0),m(t),t=null)}function m(t){o.isObject(t)&&(e.volume(t.volume),e.muted(t.muted))}function n(){i.hasClass(a.el(),"vjs-hidden")||a.hide()}function p(){i.addClass(e.el(),"vjs-ad-playing")}function l(){i.removeClass(e.el(),"vjs-ad-playing")}},s.removeNativePoster=function(e){var t=e.el().querySelector(".vjs-tech");t&&t.removeAttribute("poster")},s.once=function(t,n,s){function o(){s.apply(null,arguments),n.forEach(function(e){t.off(e,o)})}n.forEach(function(e){t.on(e,o)})},t.exports=s},{"./dom":42,"./utilityFunctions":47}],46:[function(e,t){"use strict";var o=e("./utilityFunctions"),s=document.createElement("a"),i=document.documentMode;function a(e){var t=e;return i&&(s.setAttribute("href",t),t=s.href),s.setAttribute("href",t),{href:s.href,protocol:s.protocol?s.protocol.replace(/:$/,""):"",host:s.host,search:s.search?s.search.replace(/^\?/,""):"",hash:s.hash?s.hash.replace(/^#/,""):"",hostname:s.hostname,port:o.isNotEmptyString(s.port)?s.port:80,pathname:s.pathname.charAt(0)==="/"?s.pathname:"/"+s.pathname}}function r(e,t){var n,s;return t=o.isFunction(t)?t:function(){return!0},e=e.trim().replace(/^\?/,""),s=e.split("&"),n={},o.forEach(s,function(e){var s,o,i;e!==""&&(s=e.split("="),o=s[0],i=s[1],t(o,i)&&(n[o]=i))}),n}function c(e){var t=[];return o.forEach(e,function(e,n){t.push(n+"="+e)}),t.join("&")}t.exports={urlParts:a,queryStringToObj:r,objToQueryString:c}},{"./utilityFunctions":47}],47:[function(e,t){"use strict";var s,F=1,I=/[A-Z]/g,E=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,O=/^([+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([.,]\d+(?!:))?)?(\17[0-5]\d([.,]\d+)?)?([zZ]|([+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;function _(){}function l(e){return e===null}function w(e){return e!==void 0}function p(e){return e===void 0}function o(e){return typeof e=="object"}function a(e){return typeof e=="function"}function m(e){return typeof e=="number"}function u(e){return s.isObject(e)&&e.window===e}function d(e){return Object.prototype.toString.call(e)==="[object Array]"}function g(e){if(e===null||s.isWindow(e)||s.isFunction(e)||s.isUndefined(e))return!1;var t=e.length;return!!(e.nodeType===F&&t)||s.isString(e)||s.isArray(e)||t===0||typeof t=="number"&&t>0&&t-1 in e}function v(e){return typeof e=="string"}function b(e){return s.isString(e)&&e.length===0}function j(e){return s.isString(e)&&e.length!==0}function y(e){return Array.prototype.slice.call(e)}function i(e,t,n){if(e)if(a(e))for(s in e)s!=="prototype"&&s!=="length"&&s!=="name"&&(!e.hasOwnProperty||e.hasOwnProperty(s))&&t.call(n,e[s],s,e);else if(d(e)){var s,o,r=typeof e!="object";for(s=0,o=e.length;s<o;s++)(r||s in e)&&t.call(n,e[s],s,e)}else if(e.forEach&&e.forEach!==i)e.forEach(t,n,e);else for(s in e)e.hasOwnProperty(s)&&t.call(n,e[s],s,e);return e}function x(e,t){return t=t||"_",e.replace(I,function(e,n){return(n?t:"")+e.toLowerCase()})}function f(e){return!!s.isString(e)&&E.test(e.trim())}function c(e){var t,n,s;for(s=1;s<arguments.length;s++){n=arguments[s];for(t in n)n.hasOwnProperty(t)&&(o(e[t])&&!l(e[t])&&o(n[t])?e[t]=c({},e[t],n[t]):e[t]=n[t])}return e}function C(e){return e.charAt(0).toUpperCase()+e.slice(1)}function h(e){return e.charAt(0).toLowerCase()+e.slice(1)}function k(e,t){var n=[];return e.forEach(function(e,o){var i=t(e,o);s.isDefined(i)&&n.push(i)}),n}function A(e,t){var n=e+"";if(t=s.isNumber(t)?t:0,e=s.isNumber(e)?e:parseInt(e,10),s.isNumber(e)&&!isNaN(e)){for(n=e+"";n.length<t;)n="0"+n;return n}return NaN+""}function S(e,t){var n=(new Date).getTime()-(t+1);return function(){var s=(new Date).getTime();s-n>=t&&(n=s,e.apply(this,arguments))}}function M(e,t){var n;return function(){n&&clearTimeout(n),n=setTimeout(function(){e.apply(this,arguments),n=void 0},t)}}function r(e,t,n){for(var i,o=t(e),s=0;s<o.length;s++){if(n(o[s]))return o[s];if(i=r(o[s],t,n),i)return i}}function T(e){return function(){return e}}function z(e){return s.isNumber(e)&&(e=e+""),!!s.isString(e)&&O.test(e.trim())}function D(){var e=s.getInternetExplorerVersion(navigator);return e!==-1&&e<10}function N(e){var t,s,o,n=-1;return e.appName=="Microsoft Internet Explorer"&&(s=e.userAgent,o=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})"),t=o.exec(s),t!==null&&(n=parseFloat(t[1]))),n}function L(){return/iP(hone|ad)/.test(s._UA)}function R(){return/iP(hone|ad|od)|Android|Windows Phone/.test(s._UA)}function P(){return/iP(hone|od)/.test(s._UA)}function H(){return/Android/.test(s._UA)}s={_UA:navigator.userAgent,noop:_,isNull:l,isDefined:w,isUndefined:p,isObject:o,isFunction:a,isNumber:m,isWindow:u,isArray:d,isArrayLike:g,isString:v,isEmptyString:b,isNotEmptyString:j,arrayLikeObjToArray:y,forEach:i,snake_case:x,isValidEmail:f,extend:c,capitalize:C,decapitalize:h,transformArray:k,toFixedDigits:A,throttle:S,debounce:M,treeSearch:r,echoFn:T,isISO8601:z,isOldIE:D,getInternetExplorerVersion:N,isIDevice:L,isMobile:R,isIPhone:P,isAndroid:H},t.exports=s},{}],48:[function(e,t){"use strict";var o=e("./utilityFunctions"),s={};s.strToXMLDoc=function(t){if(typeof window.DOMParser=="undefined"){var n=new ActiveXObject("Microsoft.XMLDOM");return n.async=!1,n.loadXML(t),n}return s(t);function s(e){var t,n=new DOMParser;try{if(t=n.parseFromString(e,"application/xml"),i(t)||o.isEmptyString(e))throw new Error}catch{throw new Error("xml.strToXMLDOC: Error parsing the string: '"+e+"'")}return t}function i(e){try{var n=new DOMParser,s=n.parseFromString("INVALID","text/xml"),t=s.getElementsByTagName("parsererror")[0].namespaceURI;return t==="http://www.w3.org/1999/xhtml"?e.getElementsByTagName("parsererror").length>0:e.getElementsByTagNameNS(t,"parsererror").length>0}catch{}}},s.parseText=function(t){return/^\s*$/.test(t)?null:/^(?:true|false)$/i.test(t)?t.toLowerCase()==="true":isFinite(t)?parseFloat(t):o.isISO8601(t)?new Date(t):t.trim()},s.JXONTree=function e(t){var e,n,i,a,r,c,l,u,d=s.parseText;if(t.documentElement)return new s.JXONTree(t.documentElement);if(t.hasChildNodes()){a="";for(r=0;r<t.childNodes.length;r++)n=t.childNodes.item(r),(n.nodeType-1|1)===3?a+=n.nodeType===3?n.nodeValue.trim():n.nodeValue:n.nodeType===1&&!n.prefix&&(i=o.decapitalize(n.nodeName),e=new s.JXONTree(n),this.hasOwnProperty(i)?(this[i].constructor!==Array&&(this[i]=[this[i]]),this[i].push(e)):this[i]=e);a&&(this.keyValue=d(a))}if(u=typeof t.hasAttributes=="undefined"?t.attributes.length>0:t.hasAttributes(),u)for(c=0;c<t.attributes.length;c++)l=t.attributes.item(c),this["@"+o.decapitalize(l.name)]=d(l.value.trim())},s.JXONTree.prototype.attr=function(e){return this["@"+o.decapitalize(e)]},s.toJXONTree=function(t){var n=s.strToXMLDoc(t);return new s.JXONTree(n)},s.keyValue=function(t){return t?t.keyValue:void 0},s.attr=function(t,n){return t?t["@"+o.decapitalize(n)]:void 0},s.encode=function(t){return o.isString(t)?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;"):void 0},s.decode=function(t){return o.isString(t)?t.replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&"):void 0},t.exports=s},{"./utilityFunctions":47}],49:[function(e){"use strict";e("./plugin/components/ads-label_5"),e("./plugin/components/black-poster_5");var s=e("./plugin/videojs.vast.vpaid");videojs.plugin("vastClient",s)},{"./plugin/components/ads-label_5":36,"./plugin/components/black-poster_5":38,"./plugin/videojs.vast.vpaid":39}]},{},[49])}],assetsCss:['@font-face{font-family:VideoJS;src:url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAABBIAAsAAAAAGoQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPgAAAFZRiV3RY21hcAAAAYQAAADQAAADIjn098ZnbHlmAAACVAAACv4AABEIAwnSw2hlYWQAAA1UAAAAKwAAADYV1OgpaGhlYQAADYAAAAAbAAAAJA4DByFobXR4AAANnAAAAA8AAACE4AAAAGxvY2EAAA2sAAAARAAAAEQ9NEHGbWF4cAAADfAAAAAfAAAAIAEyAIFuYW1lAAAOEAAAASUAAAIK1cf1oHBvc3QAAA84AAABDwAAAZ5AAl/0eJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGQ7xTiBgZWBgaWQ5RkDA8MvCM0cwxDOeI6BgYmBlZkBKwhIc01hcPjI+FGBHcRdyA4RZgQRAC4HCwEAAHic7dFprsIgAEXhg8U61XmeWcBb1FuQP4w7ZQXK5boMm3yclFDSANAHmuKviBBeBPQ8ymyo8w3jOh/5r2ui5nN6v8sYNJb3WMdeWRvLji0DhozKdxM6psyYs2DJijUbtuzYc+DIiTMXrty4k8oGLb+n0xCe37ekM7Z66j1DbUy3l6PpHnLfdLO5NdSBoQ4NdWSoY9ON54mhdqa/y1NDnRnq3FAXhro01JWhrg11Y6hbQ90Z6t5QD4Z6NNSToZ4N9WKoV0O9GerdUJORPqkhTd54nJ1YDXBU1RV+576/JBs2bPYPkrDZt5vsJrv53V/I5mclhGDCTwgGBQQSTEji4hCkYIAGd4TGIWFAhV0RQTpWmQp1xv6hA4OTOlNr2zFANbHUYbq2OtNCpViRqsk+e+7bTQAhzti8vPfuPffcc88959zznbcMMPjHD/KDDGEY0ABpYX384NhlomIYlo4JISGEY9mMh2FSidYiqkEUphtNYDSY/dXg9023l4DdxlqUl0chuZRhncJKrsCQHIwcGuwfnhMIzBnuH4Sym+1D2zaGjheXlhYfD238z80mKYMmvJ5XeOTzd8z9eujbMxJNhu4C9xPE/bCMiDuSNIWgkTQwBE55hLSAE7ZwhrHLnAHZOGV/kmBGTiNjZxzI77Hb7Hqjz68TjT6vh+5JT/cCIkqS0D6CqPf5jX4Qjdx5j6vlDfZM4aZFdbVXIxtOlJaP/WottMnH6CJQ3bTiue3PrY23HjnChtuamxwvvzFjxkPrNj3z0tG9T561HDYf6OgmRWvlY3JQHoQb8ltV2Yet7YfWctEjR1AtxS/cSX6U4alf6NJEBQ7YKg9wrXQKd0IeZCb2ux75Uhh1Un+Nz+9LTOE7PK777nN5xqdTneTBhCbx446mZrhnUkrCz2YhA9dSMxaG0SYmT8hi9ZPu1E94PJYQSH6LRmhxec7Q7ZeXntgQuVpbh+a4qWNsckVyTdn0P7o7DpgPW84+uRcq0BITflBikGdUjAZ9wYBVI3mtrNvr9kpg1UsaK6t3690aoorC1lg0GpMH2HAMtkZjsSi5Ig9ESVosOh7GQfLjKNLvKpMKkLSKNFAka710GdgSi8oDMSoNhqjkKBXTgn3swtaxyzGkUzIzae9RtLdWkSlZ1KDX6EzgllzV4NV4SoDFSOGD4+HCeQUF8wrZ5Hs8zIb5EaVxy8DYFTbMCJPnLIWZxugZE2NlivC0gc1qEQUR8jEKgZcAXeH18BiCgl5nlHh0CrjB4Hb5fX4gb0J7c9PuHVsfgkx2n/vTY/JV8kn8PGxf7faOZ8qX8JVByuIf4whk9sqXli2hvPJV9hrp0hY7l8r2x37ydaVsb4xvXv/47v2NjfCl8m5oRDJclFMoE1yk0Uh1Te4/m8lFXe9qBZD0EkheicebXvzI2PLCuoKCukLuhPIeKwaHPEouxw3kMqaIUXDQ1p0mip+MyCORSCQaoUsnY1VZ38nUTrG21WvVo4f1OsEJFhvSfAFwGfT8VHRMeAVUpwLOoLzjT/REIj3O3FhuURE+nERF+0pTId5Fyxv5sfwGyg4O+my4vZv0sZm7oeQlFZORiB+tG0MweVNraeitl7yxiPIHTk4/diVxs94o5lEYishB2iAtkchEnsActoEpx44Fo8XnsQMaA22BlqC20RmhBKzYojZyYaxg+JggMc4HHY2m+L9EkWSYljirOisrO7d3VorxzyZ6Vc4lJqITAu1b2wOBdrLElAP+bFc2eGaZFVbkmJktv5uT6Jlz5D/MnBFor6ig/JPnRViBsV3LNKGGqB1ChJ0tgQywlVLFJIuQgTFttwkiKxhyQdAZMdMYtSaoAewqfvXVYPAbDT6/1mez85YS8FSDywQ6NfAnef6FNEGMilnppyvn5rB6tTyq1pOceRWnp2WJEZFXHeX5oyoem1nTTgdqc4heDY7bOeKz63vnz+/dRx+s31Ht2JGanQ5seirfWJL9tjozU/12TnEjn5oux9OzU3ckGbBzBwNOyk69JykKH0n/0LM9A72tuwM3zQpIRu4AxiToseEpgPOmbROyFe9/X2yeUvoUsCyEvjcgs7fpWP3/aKlFN0+6HFUe6D9HFz/XPwBlN9tTqNyZjFJ8UO2RUT5/h4CptCctEyeisnOyXjALEp7dXKaQKf6O7IMnGjNNACRMLxqdYJX8eMLvmmd68D+ayBLyKKYZwYxDt/GNhzETDJ05Qxlyi3pi3/Z93ndYVSumgj0V/KkIFlO6+1K3fF2+3g0q+YtuSIf0bvmLqV09nnobI6hwcjIP8aPCKayjsF5JBY3LaKAeRLSyYB1h81oTwe9SlPMkXB7G0mfL9q71gaqqwPqu67QRKS1+ObTx+sbQy9QV2OQHEScGkdFBeT7v7qisqqrs6N52i78/R+6S0qQONVj26agOVoswCyQWIV5D86vH53bxNUeXV0K+XZaHv/nm/KsHhOvylwsWnJX/HE8l/4WCv5x+l5n08z6UU8bUMa3MBpSmM7F63AxntdC9eBCKEZW9Hr+ABNqtxgAQrSbMtmrW7lKQuoSgBhSrTazWVU2QAKWY8wiiuhqFmQgWJBgoXiuWIm42N7hqZbBsgXz52O5P5uSvaNgFGnOuvsRw8I8Laha91wMvDuxqWFheN7/8GVtTltdS83DQsXRmqc5ZtcJXEVrlV2doTWk5+Yunm71dG5f55m/qY0MjI93vv9/NfpxXV9sUXrxy2fbNy1or65cOlDRnOoKFeeXcbw42H/bNDT5Qs3flgs31gWC1lD1nfUV/X7NdCnSUdHY2e8afzfKsqZ5ZljfDqjLOmk3UebNXB+aHArPYDRs+/HDDxeT5DiP+sFg7OpRaVQMGBV89PpeBdj22hCE0Uub0UqwLrNWsG0cuyadgLXTeR5rbO4+3c/vl15cur2nRq+TXCQDcS3SO+s6ak+e5/eMS+1dw3btu3YG2tvFL8XdIZvdjdW6TO/4B7IdrZWVPmctm5/59AgsPItTSbCiIBr2OqIGzmu20SMKAS7yqwGBUfGfgjDYlLLDeF0SfcLB2LSx8flT+08/kzz6yOj96rft4rpTjdPQcmLd47uKibbDq7ZSz/XtbH2nN717Nd62rU+c8Icevvv7I09wA6WvjVcafb+FsbNG+ZQ80Rn6ZZsvrP7teP2dzTdoETvNhjCmsr8FID2sJ69VYvdUcxk4AzYRlKcaE38eXNRlfW9H1as9i6acLHp1XpuNB5K7DIvkX08y1ZYvh3KfWaiCzH+ztrSDmD7LuX73x/mJelB8Yj39t8nhNQJJ2CAthpoFGLsGgtSOCJooCGoaJAMTjSWHVZ08YAa1Fg9lPI5U6DOsGVjDasJeZZ+YyhfCwfOzCxlBA69M9XLXtza7H/rav+9Tjq5xNi0wpKQIRNO4Lrzz7yp5QVYM6Jd/oc1Uvn/mQhhuWh6ENXoS2YTZ8QT42bF5d/559zp5r0Uff2VnR2tdf2/WCOd2cO0Mw6qpWPnvxpV0nrt5fZd2yItc199GWe8vlNfNDq+CH/7yAAnB9hn7T4QO4c1g9ScxsZgmzntnE/IDGndtHMw69lFwoCnYsMGx+rBp8JSBqdLzBr9QRPq/PbhWMWFtQZp1xguy/haw3TEHm3TWAnxFWQQWgt7M5OV0lCz1VRYucpWliy7z6Zd4urwPIyeZQqli2Lgg7szJV09PysATbOQtYIrB2YzbkJYkGgJ0m4AjPUap1pvYu1K9qr97z0Yl3p332b2LYB78ncYIlRkau/8GObSsOlZancACE5d5ily+c2+7h5Yj4lqhVmXXB+iXLfvdqSgqfKtQvfHDV0OnvQR1qhw42XS/vkvsh/hXcrDFP0a+SJNIomEfD1nsrYGO+1bgTOJhM8Hv6ek+7vVglxuSRwoKn17S937bm6YJCeSSG0Op1n+7tE37tcZ/p7dsTv4EUrGpDbWueKigsLHhqTVsoEj+JU0kaSjnj9tz8/gryQWwJ9BcJXBC/7smO+I/IFURJetFPrdt5WcoL6DbEJaygI8CTHfQTjf40ofD+DwalTqIAAHicY2BkYGAA4gDud4bx/DZfGbjZGUDg+q1z05BpdkawOAcDE4gCAB45CXEAeJxjYGRgYGcAARD5/z87IwMjAypQBAAtgwI4AHicY2BgYGAfYAwAOkQA4QAAAAAAAA4AaAB+AMwA4AECAUIBbAGYAcICGAJYArQC4AMwA7AD3gQwBJYE3AUkBWYFigYgBmYGtAbqB1gIEghYCG4IhHicY2BkYGBQZChlYGcAASYg5gJCBob/YD4DABfTAbQAeJxdkE1qg0AYhl8Tk9AIoVDaVSmzahcF87PMARLIMoFAl0ZHY1BHdBJIT9AT9AQ9RQ9Qeqy+yteNMzDzfM+88w0K4BY/cNAMB6N2bUaPPBLukybCLvleeAAPj8JD+hfhMV7hC3u4wxs7OO4NzQSZcI/8Ltwnfwi75E/hAR7wJTyk/xYeY49fYQ/PztM+jbTZ7LY6OWdBJdX/pqs6NYWa+zMxa13oKrA6Uoerqi/JwtpYxZXJ1coUVmeZUWVlTjq0/tHacjmdxuL90OR8O0UEDYMNdtiSEpz5XQGqzlm30kzUdAYFFOb8R7NOZk0q2lwAyz1i7oAr1xoXvrOgtYhZx8wY5KRV269JZ5yGpmzPTjQhvY9je6vEElPOuJP3mWKnP5M3V+YAAAB4nG2PyXLCMBBE3YCNDWEL2ffk7o8S8oCnkCVHC5C/jzBQlUP6IHVPzYyekl5y0iL5X5/ooY8BUmQYIkeBEca4wgRTzDDHAtdY4ga3uMM9HvCIJzzjBa94wzs+8ImvZNAq8TM+HqVkKxWlrQiOxjujQkNlEzyNzl6Z/cU2XF06at7U83VQyklLpEvSnuzsb+HAPnPfQVgaupa1Jlu4sPLsFblcitaz0dHU0ZF1qatjZ1+aTXYCmp6u0gSvWNPyHLtFZ+ZeXWVSaEkqs3T8S74WklbGbNNNq4LL4+CWKtZDv2cfX8l8aFbKFhEnJnJ+IULFpqwoQnNHlHaVQtPBl+ypmbSWdmyC61KS/AKZC3Y+AA==") format("woff");font-weight:400;font-style:normal}body.vjs-full-window{padding:0;margin:0;height:100%}#QQuniqueIDWW{position:fixed;bottom:0;left:100%;max-width:100%;height:280px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif;opacity:0;transition:all .35s ease-in-out;box-sizing:border-box;z-index:2147483647}@media only screen and (max-width:480px){#QQuniqueIDWW{height:240px}}@media only screen and (max-height:480px) and (orientation:landscape),only screen and (max-width:480px) and (orientation:landscape){#QQuniqueIDWW{width:44.5vw;height:25vw}}@media only screen and (max-device-width:480px){#QQuniqueIDWW{width:44.5vh;height:25vh}}#QQuniqueIDWW.started{opacity:1;transform:translateX(-100%)}#QQuniqueIDWW.skipped{transform:none}#QQuniqueIDWW .video-js .vjs-play-progress:before,#QQuniqueIDWW .video-js .vjs-time-tooltip,#QQuniqueIDWW .vjs-fullscreen-control,#QQuniqueIDWW .vjs-play-control,#QQuniqueIDWW .vjs-remaining-time,#QQuniqueIDWW .vjs-volume-control{display:none!important}#QQuniqueIDWW .video-js .vjs-modal-dialog,#QQuniqueIDWW .vjs-button>.vjs-icon-placeholder:before,#QQuniqueIDWW .vjs-modal-dialog .vjs-modal-dialog-content{position:absolute;top:0;left:0;width:100%;height:100%}#QQuniqueIDWW .video-js .vjs-big-play-button .vjs-icon-placeholder:before,#QQuniqueIDWW .vjs-button>.vjs-icon-placeholder:before{text-align:center!important}#QQuniqueIDWW .vjs-icon-placeholder{font-size:inherit}#QQuniqueIDWW .video-js .vjs-big-play-button:before{content:none!important}#QQuniqueIDWW .video-js .vjs-big-play-button .vjs-icon-placeholder:before,#QQuniqueIDWW .video-js .vjs-play-control .vjs-icon-placeholder:before{font-family:VideoJS,sans-serif!important;font-weight:400!important;font-style:normal!important;font-size:inherit!important;content:"\\f101"}#QQuniqueIDWW .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-play-control.vjs-playing .vjs-icon-placeholder:before{content:"\\f103"}#QQuniqueIDWW .video-js .vjs-mute-control:before,#QQuniqueIDWW .video-js .vjs-volume-menu-button:before{content:none!important}#QQuniqueIDWW .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-mute-control.vjs-vol-0 .vjs-icon-placeholder:before{content:"\\f104"}#QQuniqueIDWW .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-mute-control.vjs-vol-1 .vjs-icon-placeholder:before{content:"\\f105"}#QQuniqueIDWW .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-mute-control.vjs-vol-2 .vjs-icon-placeholder:before{content:"\\f106"}#QQuniqueIDWW .video-js .vjs-mute-control .vjs-icon-placeholder{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-mute-control .vjs-icon-placeholder:before{content:"\\f107"}#QQuniqueIDWW .video-js .vjs-fullscreen-control .vjs-icon-placeholder,#QQuniqueIDWW .video-js .vjs-icon-fullscreen-enter{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-fullscreen-control .vjs-icon-placeholder:before,#QQuniqueIDWW .video-js .vjs-icon-fullscreen-enter:before{content:"\\f108"}#QQuniqueIDWW .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder,#QQuniqueIDWW .vjs-icon-fullscreen-exit{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js.vjs-fullscreen .vjs-fullscreen-control .vjs-icon-placeholder:before,#QQuniqueIDWW .vjs-icon-fullscreen-exit:before{content:"\\f109"}#QQuniqueIDWW .vjs-icon-square{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .vjs-icon-square:before{content:"\\f10a"}#QQuniqueIDWW .vjs-icon-spinner{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .vjs-icon-spinner:before{content:"\\f10b"}#QQuniqueIDWW .video-js .vjs-play-progress,#QQuniqueIDWW .video-js .vjs-volume-level,#QQuniqueIDWW .vjs-icon-circle,#QQuniqueIDWW .vjs-seek-to-live-control .vjs-icon-placeholder{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-play-progress:before,#QQuniqueIDWW .video-js .vjs-volume-level:before,#QQuniqueIDWW .vjs-icon-circle:before,#QQuniqueIDWW .vjs-seek-to-live-control .vjs-icon-placeholder:before{content:"\\f111"}#QQuniqueIDWW .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder,#QQuniqueIDWW .vjs-icon-cancel{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-control.vjs-close-button .vjs-icon-placeholder:before,#QQuniqueIDWW .vjs-icon-cancel:before{content:"\\f115"}#QQuniqueIDWW .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder,#QQuniqueIDWW .vjs-icon-replay{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-play-control.vjs-ended .vjs-icon-placeholder:before,#QQuniqueIDWW .vjs-icon-replay:before{content:"\\f116"}#QQuniqueIDWW .video-js .vjs-descriptions-button .vjs-icon-placeholder,#QQuniqueIDWW .vjs-icon-audio-description{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-descriptions-button .vjs-icon-placeholder:before,#QQuniqueIDWW .vjs-icon-audio-description:before{content:"\\f11d"}#QQuniqueIDWW .video-js .vjs-audio-button .vjs-icon-placeholder,#QQuniqueIDWW .vjs-icon-audio{font-family:VideoJS,sans-serif;font-weight:400;font-style:normal}#QQuniqueIDWW .video-js .vjs-audio-button .vjs-icon-placeholder:before,#QQuniqueIDWW .vjs-icon-audio:before{content:"\\f11e"}#QQuniqueIDWW .video-js{display:block!important;vertical-align:top!important;box-sizing:border-box!important;color:#fff!important;background-color:#000!important;position:relative!important;padding:0!important;font-size:10px!important;line-height:1!important;font-weight:400!important;font-style:normal!important;font-family:Arial,Helvetica,sans-serif!important;word-break:normal!important}#QQuniqueIDWW .video-js:-moz-full-screen{position:absolute!important}#QQuniqueIDWW .video-js:-webkit-full-screen{width:100%!important;height:100%!important}#QQuniqueIDWW .video-js ul{font-family:inherit!important;font-size:inherit!important;line-height:inherit!important;list-style-position:outside!important;margin:0!important}#QQuniqueIDWW .video-js.vjs-16-9{padding-top:56.25%!important}#QQuniqueIDWW .video-js.vjs-4-3{padding-top:75%!important}#QQuniqueIDWW .video-js.vjs-fill,#QQuniqueIDWW .video-js .vjs-tech{width:100%!important;height:100%!important}#QQuniqueIDWW .video-js .vjs-tech{position:absolute!important;top:0!important;left:0!important}#QQuniqueIDWW .video-js.vjs-fullscreen{width:100%!important;height:100%!important;padding-top:0!important}#QQuniqueIDWW .video-js.vjs-fullscreen.vjs-user-inactive{cursor:none!important}#QQuniqueIDWW .video-js .vjs-offscreen{height:1px!important;left:-9999px!important;position:absolute!important;top:0!important;width:1px!important}#QQuniqueIDWW .video-js .vjs-big-play-button{position:absolute!important;top:10px!important;left:10px!important;height:1.63332em!important;width:3em!important;display:block!important;margin:0!important;padding:0!important;font-size:3em!important;line-height:1.5em!important;border:.06666em solid #fff!important;background-color:#2b333f;background-color:rgba(43,51,63,.7)!important;border-radius:.2em!important;transition:all .4s!important;cursor:pointer!important;opacity:1!important}#QQuniqueIDWW .video-js button{background:0 0;border:none;color:inherit;display:inline-block;font-size:inherit;line-height:inherit;text-transform:none;text-decoration:none;transition:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}#QQuniqueIDWW .video-js .vjs-control{position:relative;text-align:center;margin:0;padding:0;height:100%;width:4em;flex:none}#QQuniqueIDWW .video-js .vjs-control.vjs-close-button{cursor:pointer!important;height:3em!important;position:absolute!important;right:0!important;top:.5em!important;z-index:2!important}#QQuniqueIDWW .video-js .vjs-modal-dialog{background:rgba(0,0,0,.8)!important;background:linear-gradient(180deg,rgba(0,0,0,.8),hsla(0,0%,100%,0))!important;overflow:auto!important}#QQuniqueIDWW .video-js .vjs-modal-dialog>*{box-sizing:border-box!important}#QQuniqueIDWW .video-js .vjs-menu-button-inline{transition:all .4s!important;overflow:hidden!important}#QQuniqueIDWW .video-js .vjs-menu-button-inline:before{width:2.222222222em!important}#QQuniqueIDWW .video-js .vjs-control-text{border:0!important;clip:rect(0 0 0 0)!important;height:1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important}#QQuniqueIDWW .video-js .vjs-custom-control-spacer{display:none!important}#QQuniqueIDWW .video-js .vjs-progress-control{cursor:pointer!important;flex:auto!important;display:flex!important;align-items:center!important;min-width:4em!important;touch-action:none!important}#QQuniqueIDWW .video-js .vjs-progress-control.disabled{cursor:default!important}#QQuniqueIDWW .video-js .vjs-progress-control.disabled:hover .vjs-time-tooltip{font-size:1em!important}#QQuniqueIDWW .video-js .vjs-progress-control .vjs-progress-holder{margin:0 10px!important}#QQuniqueIDWW .video-js .vjs-progress-control:hover .vjs-progress-holder{font-size:1.666666666666667em!important}#QQuniqueIDWW .video-js .vjs-progress-control:hover .vjs-progress-holder.disabled{font-size:1em!important}#QQuniqueIDWW .video-js .vjs-progress-control:hover .vjs-mouse-display{display:block!important}#QQuniqueIDWW .video-js .vjs-progress-control .vjs-mouse-display{display:none!important;position:absolute!important;width:1px!important;height:100%!important;background-color:#000!important;z-index:1!important}#QQuniqueIDWW .video-js .vjs-progress-holder{flex:auto!important;transition:all .2s!important;height:.3em!important}#QQuniqueIDWW .video-js .vjs-progress-holder:focus .vjs-time-tooltip{display:none!important}#QQuniqueIDWW .video-js .vjs-play-progress{background-color:#fff!important}#QQuniqueIDWW .video-js .vjs-play-progress:before{font-size:.9em!important;position:absolute!important;right:-.5em!important;top:-.333333333333333em!important;z-index:1!important}#QQuniqueIDWW .video-js .vjs-load-progress{background:rgba(115,133,159,.5)!important}#QQuniqueIDWW .video-js .vjs-load-progress div{background:rgba(115,133,159,.75)!important}#QQuniqueIDWW .video-js .vjs-time-tooltip{background-color:#fff!important;background-color:hsla(0,0%,100%,.8)!important;border-radius:.3em!important;color:#000!important;float:right!important;font-family:Arial,Helvetica,sans-serif!important;font-size:1em!important;padding:6px 8px 8px!important;pointer-events:none!important;position:absolute!important;top:-3.4em!important;visibility:hidden!important;z-index:1!important}#QQuniqueIDWW .video-js.vjs-user-inactive .vjs-progress-control .vjs-mouse-display{visibility:hidden!important;opacity:0!important;transition:visibility 1s,opacity 1s!important}#QQuniqueIDWW .video-js.vjs-user-inactive.vjs-no-flex .vjs-progress-control .vjs-mouse-display{display:none!important}#QQuniqueIDWW .video-js.vjs-user-inactive.vjs-playing .vjs-text-track-display{bottom:1em!important}#QQuniqueIDWW .video-js.vjs-user-inactive.vjs-playing video::-webkit-media-text-track-display{transform:translateY(-1.5em)!important}#QQuniqueIDWW .video-js .vjs-slider{position:relative!important;cursor:pointer!important;padding:0!important;margin:0 .45em!important;-webkit-touch-callout:none!important;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;background-color:#73859f!important;background-color:rgba(115,133,159,.5)!important}#QQuniqueIDWW .video-js .vjs-slider.disabled{cursor:default!important}#QQuniqueIDWW .video-js .vjs-slider:focus{text-shadow:0 0 1em #fff!important;box-shadow:0 0 1em #fff!important}#QQuniqueIDWW .video-js .vjs-mute-control{cursor:pointer!important;flex:none!important}#QQuniqueIDWW .video-js .vjs-volume-control{cursor:pointer!important;margin-right:1em!important;display:flex}#QQuniqueIDWW .video-js .vjs-volume-control.vjs-volume-horizontal{width:5em!important}#QQuniqueIDWW .video-js .vjs-volume-panel{transition:width 1s!important;display:flex!important}#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control{visibility:visible!important;opacity:0!important;width:1px!important;height:1px!important;margin-left:-1px!important}#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{height:8em!important;width:3em!important;left:-3000em!important;transition:visibility 1s,opacity 1s,height 1s 1s,width 1s 1s,left 1s 1s,top 1s 1s!important}#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{transition:visibility 1s,opacity 1s,height 1s 1s,width 1s,left 1s 1s,top 1s 1s!important}#QQuniqueIDWW .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-mute-toggle-only,#QQuniqueIDWW .video-js .vjs-volume-panel.vjs-volume-panel-vertical{width:4em!important}#QQuniqueIDWW .video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal{width:5em!important;height:3em!important;visibility:visible!important;opacity:1!important;position:relative!important;transition:none!important}#QQuniqueIDWW .video-js .vjs-volume-bar{margin:1.35em .45em!important}#QQuniqueIDWW .video-js .vjs-volume-level{position:absolute!important;bottom:0!important;left:0!important;background-color:#fff!important}#QQuniqueIDWW .video-js .vjs-volume-level:before{position:absolute!important;font-size:.9em!important}#QQuniqueIDWW .video-js .vjs-volume-vertical{width:3em!important;height:8em!important;bottom:8em!important;background-color:#2b333f!important;background-color:rgba(43,51,63,.7)!important}#QQuniqueIDWW .video-js .vjs-volume-horizontal .vjs-menu{left:-2em!important}#QQuniqueIDWW .video-js .vjs-live-control{display:flex!important;align-items:flex-start!important;flex:auto!important;font-size:1em!important;line-height:3em!important}#QQuniqueIDWW .video-js .vjs-seek-to-live-control{cursor:pointer!important;flex:none!important;display:inline-flex!important;height:100%!important;padding-left:.5em!important;padding-right:.5em!important;font-size:1em!important;line-height:3em!important;width:auto!important;min-width:4em!important}#QQuniqueIDWW .video-js .vjs-time-control{flex:none!important;font-size:1em!important;line-height:3em!important;min-width:2em!important;width:auto!important;padding-left:1em!important;padding-right:1em!important}#QQuniqueIDWW .video-js .vjs-play-control{cursor:pointer!important}#QQuniqueIDWW .video-js .vjs-play-control .vjs-icon-placeholder{flex:none!important}#QQuniqueIDWW .video-js .vjs-text-track{font-size:1.4em!important;text-align:center!important;margin-bottom:.1em!important}#QQuniqueIDWW .video-js .vjs-fullscreen-control{cursor:pointer!important;flex:none!important}#QQuniqueIDWW .video-js .vjs-subs-caps-button+.vjs-menu.vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle!important;display:inline-block!important;margin-bottom:-.1em!important}#QQuniqueIDWW .video-js .vjs-subs-caps-button+.vjs-menu.vjs-captions-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS,sans-serif;content:"\\f10d";font-size:1.5em;line-height:inherit}#QQuniqueIDWW .video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder{vertical-align:middle!important;display:inline-block!important;margin-bottom:-.1em!important}#QQuniqueIDWW .video-js .vjs-audio-button+.vjs-menu .vjs-main-desc-menu-item .vjs-menu-item-text .vjs-icon-placeholder:before{font-family:VideoJS,sans-serif;content:" \\\\f11d";font-size:1.5em;line-height:inherit}#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-custom-control-spacer{flex:auto!important;display:block!important}#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen).vjs-no-flex .vjs-custom-control-spacer{width:auto!important}#QQuniqueIDWW .video-js[tabindex="-1"]{outline:0!important}#QQuniqueIDWW .video-js *,#QQuniqueIDWW .video-js :after,#QQuniqueIDWW .video-js :before{box-sizing:inherit!important}#QQuniqueIDWW .video-js.vjs-4-3,#QQuniqueIDWW .video-js.vjs-16-9,#QQuniqueIDWW .video-js.vjs-fluid{width:100%!important;max-width:100%!important;height:0!important}#QQuniqueIDWW .vjs-full-window .video-js.vjs-fullscreen{position:fixed!important;overflow:hidden!important;z-index:1000!important;left:0!important;top:0!important;bottom:0!important;right:0!important}#QQuniqueIDWW .vjs-hidden{display:none!important}#QQuniqueIDWW .vjs-disabled{opacity:.5!important;cursor:default!important}#QQuniqueIDWW .vjs-lock-showing{display:block!important;opacity:1!important;visibility:visible!important}#QQuniqueIDWW .vjs-no-js{padding:20px!important;color:#fff!important;background-color:#000!important;font-size:18px!important;font-family:Arial,Helvetica,sans-serif!important;text-align:center!important;width:300px!important;height:150px!important;margin:0 auto!important}#QQuniqueIDWW .vjs-no-js a,#QQuniqueIDWW .vjs-no-js a:visited{color:#66a8cc!important}#QQuniqueIDWW .vjs-big-play-centered .vjs-big-play-button{top:50%!important;left:50%!important;margin-top:-.81666em!important;margin-left:-1.5em!important}#QQuniqueIDWW .video-js .vjs-big-play-button:focus,#QQuniqueIDWW .video-js:hover .vjs-big-play-button{border-color:#fff!important;background-color:#73859f!important;background-color:rgba(115,133,159,.5)!important;transition:all 0s!important}#QQuniqueIDWW .skipped .vjs-big-play-button,#QQuniqueIDWW .vjs-controls-disabled .vjs-big-play-button,#QQuniqueIDWW .vjs-error .vjs-big-play-button,#QQuniqueIDWW .vjs-has-started:not(.vjs-paused) .vjs-big-play-button,#QQuniqueIDWW .vjs-using-native-controls .vjs-big-play-button{display:none!important}#QQuniqueIDWW .vjs-has-started.vjs-paused.vjs-show-big-play-button-on-pause .vjs-big-play-button{display:block!important}#QQuniqueIDWW .vjs-has-started .vjs-control-bar{display:flex!important;visibility:visible!important;opacity:1!important;transition:visibility .1s,opacity .1s!important}#QQuniqueIDWW .vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{visibility:visible!important;opacity:0!important;transition:visibility 1s,opacity 1s!important}#QQuniqueIDWW .vjs-has-started.vjs-no-flex .vjs-control-bar{display:table!important}#QQuniqueIDWW .vjs-has-started .vjs-poster{display:none!important}#QQuniqueIDWW .vjs-control .vjs-button{width:100%!important;height:100%!important}#QQuniqueIDWW .vjs-modal-dialog .vjs-modal-dialog-content{font-size:1.2em!important;line-height:1.5!important;padding:20px 24px!important;z-index:1!important}#QQuniqueIDWW .vjs-modal-dialog.vjs-text-track-settings{height:70%!important;background-color:#2b333f!important;background-color:rgba(43,51,63,.75)!important;color:#fff!important}#QQuniqueIDWW .vjs-menu-button{cursor:pointer!important}#QQuniqueIDWW .vjs-menu-button.vjs-disabled{cursor:default!important}#QQuniqueIDWW .vjs-workinghover .vjs-menu-button.vjs-disabled:hover .vjs-menu{display:none!important}#QQuniqueIDWW .vjs-menu .vjs-menu-content{display:block!important;padding:0!important;margin:0!important;font-family:Arial,Helvetica,sans-serif!important;overflow:auto!important}#QQuniqueIDWW .vjs-menu .vjs-menu-content>*{box-sizing:border-box}#QQuniqueIDWW .vjs-menu li{list-style:none;margin:0;padding:.2em 0;line-height:1.4em;font-size:1.2em;text-align:center;text-transform:lowercase}#QQuniqueIDWW .vjs-menu li.vjs-menu-title{text-align:center;text-transform:uppercase;font-size:1em;line-height:2em;padding:0;margin:0 0 .3em;font-weight:700;cursor:default}#QQuniqueIDWW .vjs-scrubbing .vjs-control.vjs-menu-button:hover .vjs-menu{display:none}#QQuniqueIDWW .js-focus-visible .vjs-menu li.vjs-menu-item:hover,#QQuniqueIDWW .vjs-menu li.vjs-menu-item:focus,#QQuniqueIDWW .vjs-menu li.vjs-menu-item:hover{background-color:#73859f;background-color:rgba(115,133,159,.5)}#QQuniqueIDWW .js-focus-visible .vjs-menu li.vjs-selected:hover,#QQuniqueIDWW .vjs-menu li.vjs-selected,#QQuniqueIDWW .vjs-menu li.vjs-selected:focus,#QQuniqueIDWW .vjs-menu li.vjs-selected:hover{background-color:#fff;color:#2b333f}#QQuniqueIDWW .vjs-menu-button-popup .vjs-menu{display:none;position:absolute;bottom:0;width:10em;left:-3em;height:0;margin-bottom:1.5em;border-top-color:rgba(43,51,63,.7)}#QQuniqueIDWW .vjs-menu-button-popup .vjs-menu .vjs-menu-content{background-color:#2b333f;background-color:rgba(43,51,63,.7);position:absolute;width:100%;bottom:1.5em;max-height:15em}#QQuniqueIDWW .vjs-layout-tiny .vjs-menu-button-popup .vjs-menu .vjs-menu-content,#QQuniqueIDWW .vjs-layout-x-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:5em}#QQuniqueIDWW .vjs-layout-small .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:10em}#QQuniqueIDWW .vjs-layout-medium .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:14em}#QQuniqueIDWW .vjs-layout-huge .vjs-menu-button-popup .vjs-menu .vjs-menu-content,#QQuniqueIDWW .vjs-layout-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content,#QQuniqueIDWW .vjs-layout-x-large .vjs-menu-button-popup .vjs-menu .vjs-menu-content{max-height:25em}#QQuniqueIDWW .vjs-menu-button-popup .vjs-menu.vjs-lock-showing,#QQuniqueIDWW .vjs-workinghover .vjs-menu-button-popup:hover .vjs-menu{display:block}#QQuniqueIDWW .video-js .vjs-menu-button-inline.vjs-slider-active,#QQuniqueIDWW .video-js .vjs-menu-button-inline:focus,#QQuniqueIDWW .video-js .vjs-menu-button-inline:hover,#QQuniqueIDWW .video-js.vjs-no-flex .vjs-menu-button-inline{width:12em!important}#QQuniqueIDWW .vjs-menu-button-inline .vjs-menu{opacity:0;height:100%;width:auto;position:absolute;left:4em;top:0;padding:0;margin:0;transition:all .4s}#QQuniqueIDWW .vjs-menu-button-inline .vjs-menu-content{width:auto;height:100%;margin:0;overflow:hidden}#QQuniqueIDWW .vjs-menu-button-inline.vjs-slider-active .vjs-menu,#QQuniqueIDWW .vjs-menu-button-inline:focus .vjs-menu,#QQuniqueIDWW .vjs-menu-button-inline:hover .vjs-menu{display:block;opacity:1}#QQuniqueIDWW .vjs-no-flex .vjs-menu-button-inline .vjs-menu{display:block;opacity:1;position:relative;width:auto}#QQuniqueIDWW .vjs-no-flex .vjs-control{display:table-cell;vertical-align:middle}#QQuniqueIDWW .vjs-no-flex .vjs-progress-control{width:auto}#QQuniqueIDWW .vjs-no-flex .vjs-progress-control .vjs-mouse-display{z-index:0}#QQuniqueIDWW .vjs-no-flex .vjs-live-control,#QQuniqueIDWW .vjs-no-flex .vjs-seek-to-live-control{display:table-cell;width:auto;text-align:left}#QQuniqueIDWW .vjs-no-flex .vjs-menu-button-inline.vjs-slider-active .vjs-menu,#QQuniqueIDWW .vjs-no-flex .vjs-menu-button-inline:focus .vjs-menu,#QQuniqueIDWW .vjs-no-flex .vjs-menu-button-inline:hover .vjs-menu{width:auto}#QQuniqueIDWW .vjs-controls-disabled .vjs-control-bar,#QQuniqueIDWW .vjs-error .vjs-control-bar,#QQuniqueIDWW .vjs-using-native-controls .vjs-control-bar{display:none!important}#QQuniqueIDWW .vjs-audio.vjs-has-started.vjs-user-inactive.vjs-playing .vjs-control-bar{opacity:1;visibility:visible}#QQuniqueIDWW .vjs-audio.vjs-has-started .vjs-poster{display:block}#QQuniqueIDWW .vjs-button>.vjs-icon-placeholder:before{font-size:1.8em;line-height:1.67}#QQuniqueIDWW .video-js .vjs-control:focus,#QQuniqueIDWW .video-js .vjs-control:focus:before,#QQuniqueIDWW .video-js .vjs-control:hover:before{text-shadow:0 0 1em #fff!important}#QQuniqueIDWW .vjs-live .vjs-progress-control,#QQuniqueIDWW .vjs-live .vjs-time-control,#QQuniqueIDWW .vjs-live .vjs-time-divider{display:none}#QQuniqueIDWW .vjs-liveui .vjs-progress-control{display:flex;align-items:center}#QQuniqueIDWW .video-js .vjs-progress-holder .vjs-load-progress,#QQuniqueIDWW .video-js .vjs-progress-holder .vjs-load-progress div,#QQuniqueIDWW .video-js .vjs-progress-holder .vjs-play-progress{position:absolute!important;top:0;display:block!important;width:0;height:100%;margin:0!important;padding:0!important}#QQuniqueIDWW .video-js .vjs-progress-control:hover .vjs-progress-holder:focus .vjs-time-tooltip,#QQuniqueIDWW .video-js .vjs-progress-control:hover .vjs-time-tooltip{display:block!important;font-size:.6em!important;visibility:visible!important}#QQuniqueIDWW .vjs-mouse-display .vjs-time-tooltip{color:#fff;background-color:#000;background-color:rgba(0,0,0,.8)}#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-mute-control:hover~.vjs-volume-control,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control:active,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control:hover,#QQuniqueIDWW .video-js .vjs-volume-panel:active .vjs-volume-control,#QQuniqueIDWW .video-js .vjs-volume-panel:focus .vjs-volume-control,#QQuniqueIDWW .video-js .vjs-volume-panel:hover .vjs-volume-control{visibility:visible!important;opacity:1!important;position:relative!important;transition:visibility .1s,opacity .1s,height .1s,width .1s,left 0s,top 0s!important}#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-mute-control:hover~.vjs-volume-control.vjs-volume-horizontal,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-horizontal,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-horizontal,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control:hover.vjs-volume-horizontal,#QQuniqueIDWW .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-horizontal,#QQuniqueIDWW .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-horizontal,#QQuniqueIDWW .video-js .vjs-volume-panel:hover .vjs-volume-control.vjs-volume-horizontal{width:5em!important;height:3em!important}#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-mute-control:hover~.vjs-volume-control.vjs-volume-vertical,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control.vjs-slider-active.vjs-volume-vertical,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control:active.vjs-volume-vertical,#QQuniqueIDWW .video-js .vjs-volume-panel .vjs-volume-control:hover.vjs-volume-vertical,#QQuniqueIDWW .video-js .vjs-volume-panel:active .vjs-volume-control.vjs-volume-vertical,#QQuniqueIDWW .video-js .vjs-volume-panel:focus .vjs-volume-control.vjs-volume-vertical,#QQuniqueIDWW .video-js .vjs-volume-panel:hover .vjs-volume-control.vjs-volume-vertical{left:-3.5em!important}#QQuniqueIDWW .video-js.vjs-no-flex .vjs-volume-control.vjs-volume-vertical,#QQuniqueIDWW .video-js.vjs-no-flex .vjs-volume-panel .vjs-volume-control.vjs-volume-vertical{position:absolute!important;bottom:3em!important;left:.5em!important}#QQuniqueIDWW .vjs-volume-bar.vjs-slider-horizontal{width:5em;height:.3em}#QQuniqueIDWW .vjs-volume-bar.vjs-slider-horizontal .vjs-volume-level{width:100%}#QQuniqueIDWW .vjs-volume-bar.vjs-slider-vertical{width:.3em;height:5em;margin:1.35em auto}#QQuniqueIDWW .vjs-volume-bar.vjs-slider-vertical .vjs-volume-level{height:100%}#QQuniqueIDWW .vjs-slider-vertical .vjs-volume-level{width:.3em}#QQuniqueIDWW .vjs-slider-vertical .vjs-volume-level:before{top:-.5em;left:-.3em}#QQuniqueIDWW .vjs-slider-horizontal .vjs-volume-level{height:.3em}#QQuniqueIDWW .vjs-slider-horizontal .vjs-volume-level:before{top:-.3em;right:-.5em}#QQuniqueIDWW .vjs-poster{display:inline-block;vertical-align:middle;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;background-color:#000;cursor:pointer;margin:0;padding:0;position:absolute;top:0;right:0;bottom:0;left:0;height:100%}#QQuniqueIDWW .video-js.vjs-live:not(.vjs-liveui) .vjs-seek-to-live-control,#QQuniqueIDWW .video-js.vjs-liveui .vjs-live-control,#QQuniqueIDWW .video-js:not(.vjs-live) .vjs-live-control,#QQuniqueIDWW .video-js:not(.vjs-live) .vjs-seek-to-live-control,#QQuniqueIDWW .vjs-using-native-controls .vjs-poster{display:none!important}#QQuniqueIDWW .vjs-seek-to-live-control.vjs-control.vjs-at-live-edge{cursor:auto}#QQuniqueIDWW .vjs-seek-to-live-control.vjs-control.vjs-at-live-edge .vjs-icon-placeholder{color:red}#QQuniqueIDWW .vjs-seek-to-live-control .vjs-icon-placeholder{margin-right:.5em;color:#888}#QQuniqueIDWW .video-js .vjs-current-time,#QQuniqueIDWW .video-js .vjs-duration,#QQuniqueIDWW .vjs-no-flex .vjs-current-time,#QQuniqueIDWW .vjs-no-flex .vjs-duration{display:none!important}#QQuniqueIDWW .vjs-time-divider{display:none;line-height:3em}#QQuniqueIDWW .vjs-text-track-display{position:absolute;bottom:3em;left:0;right:0;top:0;pointer-events:none}#QQuniqueIDWW .vjs-subtitles{color:#fff}#QQuniqueIDWW .vjs-captions{color:#fc6}#QQuniqueIDWW .vjs-tt-cue{display:block}#QQuniqueIDWW video::-webkit-media-text-track-display{transform:translateY(-3em)!important}#QQuniqueIDWW .vjs-playback-rate .vjs-playback-rate-value,#QQuniqueIDWW .vjs-playback-rate>.vjs-menu-button{position:absolute;top:0;left:0;width:100%;height:100%}#QQuniqueIDWW .vjs-playback-rate .vjs-playback-rate-value{pointer-events:none;font-size:1.5em;line-height:2;text-align:center}#QQuniqueIDWW .vjs-playback-rate .vjs-menu{width:4em;left:0}#QQuniqueIDWW .vjs-error .vjs-error-display .vjs-modal-dialog-content{font-size:1.4em;text-align:center}#QQuniqueIDWW .vjs-error .vjs-error-display:before{color:#fff;content:" X ";font-family:Arial,Helvetica,sans-serif;font-size:4em;left:0;line-height:1;margin-top:-.5em;position:absolute;text-shadow:.05em .05em .1em #000;text-align:center;top:50%;vertical-align:middle;width:100%}#QQuniqueIDWW .vjs-loading-spinner{display:none;position:absolute;top:50%;left:50%;margin:-25px 0 0 -25px;opacity:.85;text-align:left;border:6px solid rgba(43,51,63,.7);box-sizing:border-box;background-clip:padding-box;width:50px;height:50px;border-radius:25px;visibility:hidden}#QQuniqueIDWW .vjs-seeking .vjs-loading-spinner,#QQuniqueIDWW .vjs-waiting .vjs-loading-spinner{display:block;animation:vjs-spinner-show 0s linear .3s forwards}#QQuniqueIDWW .vjs-loading-spinner:after,#QQuniqueIDWW .vjs-loading-spinner:before{content:"";position:absolute;margin:-6px;box-sizing:inherit;width:inherit;height:inherit;border-radius:inherit;opacity:1;border:inherit;border-color:transparent;border-top-color:#fff}#QQuniqueIDWW .vjs-seeking .vjs-loading-spinner:after,#QQuniqueIDWW .vjs-seeking .vjs-loading-spinner:before,#QQuniqueIDWW .vjs-waiting .vjs-loading-spinner:after,#QQuniqueIDWW .vjs-waiting .vjs-loading-spinner:before{animation:vjs-spinner-spin 1.1s cubic-bezier(.6,.2,0,.8) infinite,vjs-spinner-fade 1.1s linear infinite}#QQuniqueIDWW .vjs-seeking .vjs-loading-spinner:before,#QQuniqueIDWW .vjs-waiting .vjs-loading-spinner:before{border-top-color:#fff}#QQuniqueIDWW .vjs-seeking .vjs-loading-spinner:after,#QQuniqueIDWW .vjs-waiting .vjs-loading-spinner:after{border-top-color:#fff;animation-delay:.44s}#QQuniqueIDWW .vjs-chapters-button .vjs-menu ul{width:24em}#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-audio-button,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-captions-button,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-chapters-button,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-current-time,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-descriptions-button,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-duration,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-mute-control,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-playback-rate,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-remaining-time,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-subtitles-button,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-time-divider,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-control,#QQuniqueIDWW .video-js.vjs-layout-small:not(.vjs-fullscreen) .vjs-volume-panel,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-audio-button,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-captions-button,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-chapters-button,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-current-time,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-descriptions-button,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-duration,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-mute-control,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-playback-rate,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-progress-control,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-remaining-time,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subs-caps-button,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-subtitles-button,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-time-divider,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-control,#QQuniqueIDWW .video-js.vjs-layout-tiny:not(.vjs-fullscreen) .vjs-volume-panel,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-audio-button,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-captions-button,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-chapters-button,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-current-time,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-descriptions-button,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-duration,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-mute-control,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-playback-rate,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-remaining-time,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subs-caps-button,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-subtitles-button,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-time-divider,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-control,#QQuniqueIDWW .video-js.vjs-layout-x-small:not(.vjs-fullscreen) .vjs-volume-panel{display:none!important}#QQuniqueIDWW .vjs-text-track-settings .vjs-modal-dialog-content{display:table}#QQuniqueIDWW .vjs-text-track-settings .vjs-track-settings-controls{text-align:right;vertical-align:bottom;grid-column:1/-1}#QQuniqueIDWW .vjs-text-track-settings fieldset{margin:5px;padding:3px;border:none}#QQuniqueIDWW .vjs-text-track-settings fieldset span{display:inline-block}#QQuniqueIDWW .vjs-text-track-settings fieldset span>select{max-width:7.3em}#QQuniqueIDWW .vjs-text-track-settings legend{color:#fff;margin:0 0 5px}#QQuniqueIDWW .vjs-text-track-settings .vjs-label{position:absolute;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px);display:block;margin:0 0 5px;padding:0;border:0;height:1px;width:1px;overflow:hidden}#QQuniqueIDWW .vjs-text-track-settings .vjs-track-settings-colors,#QQuniqueIDWW .vjs-text-track-settings .vjs-track-settings-controls,#QQuniqueIDWW .vjs-text-track-settings .vjs-track-settings-font{display:table-cell}@supports (display:grid){#QQuniqueIDWW .vjs-text-track-settings .vjs-modal-dialog-content{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr;padding:20px 24px 0}#QQuniqueIDWW .vjs-text-track-settings .vjs-track-settings-controls{grid-column:1/-1}#QQuniqueIDWW .vjs-track-settings-controls .vjs-default-button{margin-bottom:20px}#QQuniqueIDWW .vjs-layout-small .vjs-text-track-settings .vjs-modal-dialog-content,#QQuniqueIDWW .vjs-layout-tiny .vjs-text-track-settings .vjs-modal-dialog-content,#QQuniqueIDWW .vjs-layout-x-small .vjs-text-track-settings .vjs-modal-dialog-content{grid-template-columns:1fr}}#QQuniqueIDWW .vjs-track-setting>select{margin-right:1em;margin-bottom:.5em}#QQuniqueIDWW .vjs-track-settings-controls button:active,#QQuniqueIDWW .vjs-track-settings-controls button:focus{outline-style:solid;outline-width:medium;background-image:linear-gradient(0deg,#fff 88%,#73859f)}#QQuniqueIDWW .vjs-resize-manager{position:absolute;top:0;left:0;width:100%;height:100%;border:none;z-index:-1000}#QQuniqueIDWW .js-focus-visible .video-js :focus:not(.focus-visible),#QQuniqueIDWW .video-js .vjs-menu :focus:not(:focus-visible),#QQuniqueIDWW .video-js :focus:not(:focus-visible){outline:0;background:0 0}#QQuniqueIDWW .vjs-label-hidden{display:none!important}#QQuniqueIDWW .vjs-default-skin div.vjs-ads-label{font-size:13px;line-height:30px;font-weight:400;text-align:center;color:#fff;display:none;width:auto;padding-left:10px}#QQuniqueIDWW .vjs-ad-playing .vjs-control.vjs-ads-label{display:block}#QQuniqueIDWW .vjs-ad-playing .vjs-progress-control{pointer-events:none}#QQuniqueIDWW .vjs-ad-playing.vjs-vast-ad-loading .vjs-loading-spinner{display:block;z-index:2;animation:spin 1.5s infinite linear}#QQuniqueIDWW .vjs-black-poster{position:absolute;top:0;right:0;bottom:0;left:0;margin:0;padding:0;background-repeat:no-repeat;background-position:50% 50%;background-size:contain;cursor:pointer;background-color:#000}#QQuniqueIDWW .vjs-has-started .vjs-black-poster.vjs-hidden,#QQuniqueIDWW .vjs-using-native-controls .vjs-black-poster{display:none}#QQuniqueIDWW div.VPAID-container{position:absolute;top:0;left:0;width:100%;height:100%}#QQuniqueIDWW div.vjs-vpaid-ad.vjs-vpaid-flash-ad div.VPAID-container{background-color:#000}#QQuniqueIDWW div.vjs-vpaid-ad .vjs-tech{z-index:0}#QQuniqueIDWW div.vast-skip-button{display:block;position:absolute;bottom:20%;right:0;background-color:#000;color:#fff;font-size:15px;font-weight:700;width:auto;padding:8px;z-index:1;border:1px solid #fff;border-right:none}#QQuniqueIDWW div.vjs-vpaid-ad div.vjs-progress-control,#QQuniqueIDWW div.vjs-vpaid-ad div.vjs-time-controls,#QQuniqueIDWW div.vjs-vpaid-ad div.vjs-time-divider{display:none}#QQuniqueIDWW .vjs-ad-playing .vjs-play-control.vjs-paused,#QQuniqueIDWW .vjs-ad-playing .vjs-play-progress,#QQuniqueIDWW .vjs-ad-playing .vjs-volume-level{background-color:#ffe400!important}#QQuniqueIDWW .vast-skip-button.enabled{cursor:pointer;color:#fff}#QQuniqueIDWW .vast-skip-button.enabled:hover{cursor:pointer;background:#333}#QQuniqueIDWW .vast-skip-button.enabled:after{content:">>";position:relative;top:1px;margin-left:8px}#QQuniqueIDWW .vast-blocker{display:block;position:absolute;margin:0;padding:0;height:100%;width:100%;top:0;left:0;right:0;bottom:0}#QQuniqueIDWW .vjs-vast-ad-loading div.vjs-big-play-button{display:none!important}#QQuniqueIDWW .vjs-ad-playing .vjs-live-controls,#QQuniqueIDWW .vjs-ad-playing .vjs-slider-handle:before{display:none}#QQuniqueIDWW div.vast-skip-button{display:none!important}#QQuniqueIDWW.notransition{transition:none!important}#QQuniqueIDWW .video-js .vjs-control-bar{display:none;width:100%!important;position:absolute!important;left:0!important;right:0!important;height:0!important;bottom:1em!important;background-color:transparent!important}#QQuniqueIDWW .video-js .vjs-slider{background-color:hsla(234,5%,59%,.25)!important}#QQuniqueIDWW .video-js .vjs-progress-control .vjs-slider:before{content:none}#QQuniqueIDWW .video-js .vjs-load-progress{background-color:hsla(234,5%,59%,.5)!important}#QQuniqueIDWW .video-js .vjs-volume-panel{position:absolute;right:10px;bottom:1em;width:3em;height:22px}#QQuniqueIDWW .video-js .vjs-volume-panel.vjs-volume-panel-horizontal.vjs-slider-active,#QQuniqueIDWW .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:active,#QQuniqueIDWW .video-js .vjs-volume-panel.vjs-volume-panel-horizontal:hover{width:3em}#QQuniqueIDWW .video-js .vjs-mute-control{width:3em;background:rgba(46,47,57,.65);border-radius:4px;outline:none}#QQuniqueIDWW .video-js .vjs-mute-control:hover{background:rgba(46,47,57,.9)}#QQuniqueIDWW .video-js .vjs-mute-control>.vjs-icon-placeholder:before{font-size:1.4em;line-height:22px}#QQuniqueIDWW .vjs-ad-playing .vjs-play-control.vjs-paused,#QQuniqueIDWW .vjs-ad-playing .vjs-play-progress,#QQuniqueIDWW .vjs-ad-playing .vjs-volume-level{background-color:#38b0e4!important}@keyframes vjs-spinner-show{to{visibility:visible}}@keyframes vjs-spinner-spin{to{transform:rotate(1turn)}}@keyframes vjs-spinner-fade{0%{border-top-color:#73859f}20%{border-top-color:#73859f}35%{border-top-color:#fff}60%{border-top-color:#73859f}to{border-top-color:#73859f}}']};try{var s=typeof e!="undefined"?e:{};new n(s)}catch(e){t(e)}})({vastUrl:"https://zogrepsili.com/dTm.FUzVdWG_NYvZZaGbU-/dce0flgk_PiSjZk6lb-2n5olpSqW_Qs9tNuDvc-4xNyTzMAz_NCQD"})