apt-outcome.com
Open in
urlscan Pro
2a00:1178:1:4b::1d
Public Scan
URL:
https://apt-outcome.com/d/m/FDz.dvG/lst_PH3IpuvTbRmPVJJgZCDX0/1AMeDxEXwQMiD_AwySLZT/UawRMeT_ACwOMxDnMM
Submission: On November 11 via api from US — Scanned from NL
Submission: On November 11 via api from US — Scanned from NL
Form analysis
0 forms found in the DOMText 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 ]]]";try{o=navigator.userAgent}catch{}void 0===e?n+="Error object is undefined (sic).":(void 0!==e.message&&(n+="Message: "+e.message),void 0!==e.stack&&(n+=` Stack: `+e.stack),void 0!==e.situation&&(n+=` Situation: `+e.situation)),t&&(n+=` More info: `+t),n+=` Url: `+window.location.href,n+=` Version: 0.3.3`,s.src="//ptekuwiny.pro/jserr?msg="+encodeURIComponent(n)+"&ua="+encodeURIComponent(o)+"&tag=videoim",i.appendChild(s)}function n(e){this.isProhibited()||(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:{href:"",content:""},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.adsBy.href},target:"_blank"},content:function(){return this.settings.adsBy.content},if:function(){return this.settings.adsBy.content&&0<this.settings.adsBy.content.length}},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 e=[],t=window.XMLHttpRequest.prototype.send,n=window.XMLHttpRequest.prototype.open;window.XMLHttpRequest.ensureWithoutCredentials=function(t){t&&(t=t.toLowerCase(),-1===e.indexOf(t)&&e.push(t))},window.XMLHttpRequest.prototype.open=function(){if(2<=arguments.length){var t=(arguments[1]||"").toLowerCase();-1!==e.indexOf(t)&&(this._ensureWithoutCredentials=!0)}return n.apply(this,arguments)},window.XMLHttpRequest.prototype.send=function(){return this._ensureWithoutCredentials&&(this.withCredentials=!1),t.apply(this,arguments)}}},render:function(){this.makeDOM(),this.setUniqueID(),this.injectVideoAssets(),this.insertStyles(),this.injectDOM(),this.initAd()},copySettings:function(e,t){if("object"==typeof e){if("object"==typeof e.options&&0<Object.keys(e.options).length)for(o in e.options)this.settings.options[o]=e.options[o];if(t){var n,o,s=["clickUrl","videoAdStartUrl","videoAdFinishUrl","videoAdViewingUrl","vastUrl","adsBy"];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"),"object"==typeof e){for(i in e){switch(typeof(o=(s=this.layout.props[i]||this.defaults.layout.props).if)){case"function":o=o.call(this);break;case"undefined":o=!0}if(o){a=s.tagName||this.defaults.layout.props.tagName,l=this.getValue(s.repeat)||1;for(var n,s,o,i,a,r,c,l,d=0;d<l;d++){switch(n=document.createElement(a),(c=s.attributes)&&(n=this.setAttributes(n,c)),void 0!==(r=this.getValue(s.content))&&(n.innerHTML=r),this.settings.options.ignoredBetterJs.push(n),t.appendChild(n),void 0!==s.assign&&(this[s.assign]=n),typeof s.click){case"string":n.addEventListener("click",this[s.click].bind(this),!1);break;case"function":n.addEventListener("click",s.click.bind(this),!1)}e[i]&&this.makeDOM(e[i],n)}}}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,n,s=this.settings.options.layout;for(t in s)n=new RegExp("QQ"+t+"WW","g"),e=e.replace(n,s[t]);return e},injectDOM:function(){try{this.extra.appendToBody(this.adElement)}catch(e){t(e,"Failed to insert video ad [injectDOM].")}},setVideoIMFlag:function(){(document.head||document.getElementsByTagName("head")[0]).htavim=!0},removeVideoIMFlag:function(){delete(document.head||document.getElementsByTagName("head")[0]).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(){this.settings.vastUrl&&(window.XMLHttpRequest.ensureWithoutCredentials&&"function"==typeof window.XMLHttpRequest.ensureWithoutCredentials&&window.XMLHttpRequest.ensureWithoutCredentials(this.settings.vastUrl),this.player.ready(function(){this.play()}),this.player.vastClient({adTagUrl:this.settings.vastUrl,playAdAlways:!0,adCancelTimeout:36e5,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(),e.error&&303===e.error.code||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,s,e=this.adElement,o=this.player.videoWidth()||480,n=o/(this.player.videoHeight()||270),i=window.innerWidth>window.innerHeight?window.innerHeight:window.innerWidth;o<50&&(n=1.777),t=parseInt(getComputedStyle(e).height)*n,e.style.removeProperty("height"),e.style.removeProperty("width"),e.classList.add("notransition"),i<t&&(s=(t=i)/n,e.style.height=s+"px"),e.style.width=t+"px"},getValue:function(e){return"function"==typeof e?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;"string"==typeof e&&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;"string"==typeof e&&e&&isNaN(e.charAt(0))||(e=this.randomEmoji(1)),this.settings.options.layout.defaultClass=e},randomEmoji:function(e){var t,n="";for(t=0;t<(e||1);t++)n+="â–¶".charAt(Math.floor(Math.random()*"â–¶".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:void("playing"in HTMLMediaElement.prototype||Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return 0<this.currentTime&&!this.paused&&!this.ended&&2<this.readyState}}))},assetsJs:[function(e){var s="#QQuniqueIDWW .video-js {width: 300px;height: 150px;}#QQuniqueIDWW .vjs-fluid {padding-top: 56.25%;}",s=e.replaceAttributesInStyles(s),n=this,t=function(){"use strict";T="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function A(e,t){return e(t={exports:{}},t.exports),t.exports}for(var Wt,t="undefined"!=typeof window?window:void 0!==T?T:"undefined"!=typeof self?self:{},Oi={},xi=void 0!==T?T:"undefined"!=typeof window?window:{},s="undefined"!=typeof document?document:xi["__GLOBAL_DOCUMENT_CACHE@4"]||(xi["__GLOBAL_DOCUMENT_CACHE@4"]=Oi),Bn={prefixed:!0},Nn=[["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"]],Fi=Nn[0],Sn=0;Sn<Nn.length;Sn++)if(Nn[Sn][1]in s){Wt=Nn[Sn];break}if(Wt){for(Ot=0;Ot<Wt.length;Ot++)Bn[Fi[Ot]]=Wt[Ot];Bn.prefixed=Wt[0]!==Fi[0]}var B=[],d=function e(n){function s(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];i("log",o,n)}var i,o="info";return i=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+":"),B)&&(B.push([].concat(i)),r=B.length-1e3,B.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))}}(n,s),s.createLogger=function(t){return e(n+": "+t)},s.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:o},s.level=function(e){if("string"==typeof e){if(!s.levels.hasOwnProperty(e))throw new Error('"'+e+'" in not a valid log level');o=e}return o},(s.history=function(){return B?[].concat(B):[]}).filter=function(e){return(B||[]).filter(function(t){return new RegExp(".*"+e+".*").test(t[0])})},s.history.clear=function(){B&&(B.length=0)},s.history.disable=function(){null!==B&&(B.length=0,B=null)},s.history.enable=function(){null===B&&(B=[])},s.error=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return i("error",o,n)},s.warn=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return i("warn",o,n)},s.debug=function(){for(var t=arguments.length,n=new Array(t),e=0;e<t;e++)n[e]=arguments[e];return i("debug",o,n)},s}("VIDEOJS"),Di=d.createLogger,yn=A(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}),Yd=Object.prototype.toString,qi=function(e){return ue(e)?Object.keys(e):[]};function mt(e,t){qi(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?yn.apply(void 0,[e].concat(s)):(s.forEach(function(t){t&&mt(t,function(t,n){e[n]=t})}),e)}function ue(e){return!!e&&"object"==typeof e}function yt(e){return ue(e)&&"[object Object]"===Yd.call(e)&&e.constructor===Object}function ft(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 gs,vs,aa,_s,w=t.navigator&&t.navigator.userAgent||"",wa=/AppleWebKit\/([\d.]+)/i.exec(w),Ad=wa?parseFloat(wa.pop()):null,La=/iPod/i.test(w),bd=(gs=w.match(/OS (\d+)_/i))&&gs[1]?gs[1]:null,je=/Android/i.test(w),ks=function(){if(e=w.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}(),pr=je&&ks<5&&Ad<537,jr=/Firefox/i.test(w),Zt=/Edg/i.test(w),oe=!Zt&&(/Chrome/i.test(w)||/CriOS/i.test(w)),Ar=(vs=w.match(/(Chrome|CriOS)\/(\d+)/))&&vs[2]?parseFloat(vs[2]):null,Tt=(!(_s=(aa=/MSIE\s(\d+)\.\d/.exec(w))&&parseFloat(aa[1]))&&/Trident\/7.0/i.test(w)&&/rv:11.0/.test(w)&&(_s=11),_s),Ss=/Safari/i.test(w)&&!oe&&!je&&!Zt,Gr=/Windows/i.test(w),Ge=Boolean(at()&&("ontouchstart"in t||t.navigator.maxTouchPoints||t.DocumentTouch&&t.document instanceof t.DocumentTouch)),Ds=/iPad/i.test(w)||Ss&&Ge&&!/iPhone/i.test(w),Ns=/iPhone/i.test(w)&&!Ds,K=Ns||Ds||La,cn=(Ss||K)&&!oe,Cl=Object.freeze({__proto__:null,IS_IPOD:La,IOS_VERSION:bd,IS_ANDROID:je,ANDROID_VERSION:ks,IS_NATIVE_ANDROID:pr,IS_FIREFOX:jr,IS_EDGE:Zt,IS_CHROME:oe,CHROME_VERSION:Ar,IE_VERSION:Tt,IS_SAFARI:Ss,IS_WINDOWS:Gr,TOUCH_ENABLED:Ge,IS_IPAD:Ds,IS_IPHONE:Ns,IS_IOS:K,IS_ANY_SAFARI:cn});function vi(e){return"string"==typeof e&&Boolean(e.trim())}function ul(e){if(0<=e.indexOf(" "))throw new Error("class has illegal whitespace characters")}function at(){return s===t.document}function rt(e){return ue(e)&&1===e.nodeType}function cl(){try{return t.parent!==t.self}catch{return!0}}function il(e){return function(t,n){if(!vi(t))return s[e](null);vi(n)&&(n=s.querySelector(n));var o=rt(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?Re(i,n):i[e]===n&&"tabIndex"!==e||(i[e]=n)}),Object.getOwnPropertyNames(n).forEach(function(e){i.setAttribute(e,n[e])}),o&&wo(i,o),i}function Re(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function io(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Ee(e,t){return ul(t),e.classList?e.classList.contains(t):new RegExp("(^|\\s)"+t+"($|\\s)").test(e.className)}function ie(e,t){return e.classList?e.classList.add(t):Ee(e,t)||(e.className=(e.className+" "+t).trim()),e}function wt(e,t){return e.classList?e.classList.remove(t):(ul(t),e.className=e.className.split(/\s+/).filter(function(e){return e!==t}).join(" ")),e}function Yc(e,t,n){var s=Ee(e,t);if("function"==typeof n&&(n=n(e,t)),"boolean"!=typeof n&&(n=!s),n!==s)return n?ie(e,t):wt(e,t),e}function qc(e,t){Object.getOwnPropertyNames(t).forEach(function(n){var s=t[n];s==null||!1===s?e.removeAttribute(n):e.setAttribute(n,!0===s?"":s)})}function le(e){if(o={},e&&e.attributes&&0<e.attributes.length)for(var n,s,o,i=e.attributes,t=i.length-1;0<=t;t--)n=i[t].name,s=i[t].value,"boolean"!=typeof e[n]&&-1===",autoplay,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+n+",")||(s=null!==s),o[n]=s;return o}function Uc(e,t){return e.getAttribute(t)}function jt(e,t,n){e.setAttribute(t,n)}function Jt(e,t){e.removeAttribute(t)}function Vc(){s.body.focus(),s.onselectstart=function(){return!1}}function Ic(){s.onselectstart=function(){return!0}}function jo(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(ft(e,"height"))),t.width||(t.width=parseFloat(ft(e,"width"))),t}}function Et(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[Bn.fullscreenElement];)t+=e.offsetLeft,n+=e.offsetTop,e=e.offsetParent;return{left:t,top:n,width:o,height:i}}function yo(e,t){if(n={x:0,y:0},K)for(s=e;s&&"html"!==s.nodeName.toLowerCase();)i=ft(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=Et(t.target),o=Et(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,K&&(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 Lc(e){return ue(e)&&3===e.nodeType}function _o(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Sc(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map(function(e){return"function"==typeof e&&(e=e()),rt(e)||Lc(e)?e:"string"==typeof e&&/\S/.test(e)?s.createTextNode(e):void 0}).filter(function(e){return e})}function wo(e,t){return Sc(t).forEach(function(t){return e.appendChild(t)}),e}function kc(e,t){return wo(_o(e),t)}function Xe(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 xo,ge=il("querySelector"),jc=il("querySelectorAll"),gc=Object.freeze({__proto__:null,isReal:at,isEl:rt,isInFrame:cl,createEl:g,textContent:Re,prependTo:io,hasClass:Ee,addClass:ie,removeClass:wt,toggleClass:Yc,setAttributes:qc,getAttributes:le,getAttribute:Uc,setAttribute:jt,removeAttribute:Jt,blockTextSelection:Vc,unblockTextSelection:Ic,getBoundingClientRect:jo,findPosition:Et,getPointerPosition:yo,isTextNode:Lc,emptyEl:_o,normalizeContent:Sc,appendContent:wo,insertContent:kc,isSingleLeftClick:Xe,$:ge,$$:jc}),fc=!1,Pl=function(){if(at()&&!1!==xo.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){Eo(1);break}void 0===e.player&&null!==e.getAttribute("data-setup")&&xo(e)}else fc||Eo(1)}};function Eo(e,n){n&&(xo=n),t.setTimeout(Pl,e)}function Mo(){fc=!0,t.removeEventListener("load",Mo)}function sc(e){var t=s.createElement("style");return t.className=e,t}function Lr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t}at()&&("complete"===s.readyState?Mo():t.addEventListener("load",Mo)),zr=3;function ve(){return zr++}t.WeakMap||(Dr=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]||ve();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 Dr;function Fr(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 Ro(e,t,n,s){n.forEach(function(n){e(t,n,s)})}function ls(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}Cr=function(){if("boolean"!=typeof wn){wn=!1;try{var e=Object.defineProperty({},"passive",{get:function(){wn=!0}});t.addEventListener("test",null,e),t.removeEventListener("test",null,e)}catch{}}return wn},xr=["touchstart","touchmove"];function q(e,t,n){if(Array.isArray(t))return Ro(q,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=ve()),s.handlers[t].push(n),s.dispatcher||(s.disabled=!1,s.dispatcher=function(t,n){if(!s.disabled&&(t=ls(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,Cr()&&-1<xr.indexOf(t)&&(o={passive:!0}),e.addEventListener(t,s.dispatcher,o)):e.attachEvent&&e.attachEvent("on"+t,s.dispatcher))}function S(e,t,n){if(M.has(e)){var o,i,a,r,s=M.get(e);if(s.handlers){if(Array.isArray(t))return Ro(S,e,t,n);if(a=function(e,t){s.handlers[t]=[],Fr(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);Fr(e,t)}else a(e,t)}else for(r in s.handlers)Object.prototype.hasOwnProperty.call(s.handlers||{},r)&&a(e,r)}}}function Ke(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=ls(t),i.dispatcher&&i.dispatcher.call(e,t,n),s&&!t.isPropagationStopped()&&!0===t.bubbles?Ke.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 Gn(e,t,n){if(Array.isArray(t))return Ro(Gn,e,t,n);function s(){S(e,t,s),n.apply(this,arguments)}s.guid=n.guid=n.guid||ve(),q(e,t,s)}function wr(e,t,n){function s(){S(e,t,s),n.apply(this,arguments)}s.guid=n.guid=n.guid||ve(),q(e,t,s)}function u(e,t,n){t.guid||(t.guid=ve());var s=t.bind(e);return s.guid=n?n+"_"+t.guid:t.guid,s}function Oe(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 F(){}lr=Object.freeze({__proto__:null,fixEvent:ls,on:q,off:S,trigger:Ke,one:Gn,any:wr});function $n(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 Vo(e){return"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length}function Rn(e,t,n){if(!e||!e.nodeName&&!ne(e))throw new Error("Invalid target for "+$n(t)+"#"+n+"; must be a DOM node or evented object.")}function ar(e,t,n){if(!Vo(e))throw new Error("Invalid event type for "+$n(t)+"#"+n+"; must be a non-empty string or array.")}function sr(e,t,n){if("function"!=typeof e)throw new Error("Invalid listener for "+$n(t)+"#"+n+"; must be a function.")}function Wo(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]),Rn(s,e,n),ar(o,e,n),sr(i,e,n),{isTargetingSelf:a,target:s,type:o,listener:i=u(e,i)}}function Se(e,t,n,s){Rn(e,e,t),e.nodeName?lr[t](e,n,s):e[t](n,s)}F.prototype.allowedEvents_={},F.prototype.addEventListener=F.prototype.on=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},q(this,e,t),this.addEventListener=n},F.prototype.removeEventListener=F.prototype.off=function(e,t){S(this,e,t)},F.prototype.one=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},Gn(this,e,t),this.addEventListener=n},F.prototype.any=function(e,t){var n=this.addEventListener;this.addEventListener=function(){},wr(this,e,t),this.addEventListener=n},F.prototype.dispatchEvent=F.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=ls(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),Ke(this,e)},F.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)},ne=function(e){return e instanceof F||!!e.eventBusEl_&&["on","one","off","trigger"].every(function(t){return"function"==typeof e[t]})},Wa={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=Wo(this,c,"on"),d=t.isTargetingSelf,o=t.target,l=t.type,n=t.listener;Se(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,Se(this,"on","dispose",s),Se(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=Wo(this,r,"one"),l=t.isTargetingSelf,n=t.target,s=t.type,o=t.listener;l?Se(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,Se(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=Wo(this,r,"any"),l=t.isTargetingSelf,n=t.target,s=t.type,o=t.listener;l?Se(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,Se(n,"any",s,i))},off:function(e,t,n){if(!e||Vo(e))S(this.eventBusEl_,e,t);else{var s=e,o=t;Rn(s,this,"off"),ar(o,this,"off"),sr(n,this,"off"),n=u(this,n),this.off("dispose",n),s.nodeName?(S(s,o,n),S(s,"dispose",n)):ne(s)&&(s.off(o,n),s.off("dispose",n))}},trigger:function(e,t){if(Rn(this.eventBusEl_,this,"trigger"),!Vo(e&&"string"!=typeof e?e.type:e)){var n="Invalid event type for "+$n(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.";if(!e)throw new Error(n);(this.log||d).error(n)}return Ke(this.eventBusEl_,e,t)}};function ti(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,Wa),e.eventedCallbacks&&e.eventedCallbacks.forEach(function(e){e()}),e.on("dispose",function(){e.off(),t.setTimeout(function(){e.eventBusEl_=null},0)}),e}Va={state:{},setState:function(e){var t,n=this;return"function"==typeof e&&(e=e()),mt(e,function(e,s){n.state[s]!==e&&((t=t||{})[s]={from:n.state[s],to:e}),n.state[s]=e}),t&&ne(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Ra(e,t){return p(e,Va),e.state=p({},e.state,t),"function"==typeof e.handleStateChanged&&ne(e)&&e.on("statechanged",e.handleStateChanged),e}function xn(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&&mt(t,function(t,n){yt(t)?(yt(e[n])||(e[n]={}),e[n]=f(e[n],t)):e[n]=t})}),e}var xd=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}(),Ed=t.Map?t.Map:xd,kd=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}(),oi=t.Set?t.Set:kd,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_"+ve()}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),!1!==t.evented&&(ti(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Ra(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new oi,this.setIntervalIds_=new oi,this.rafIds_=new oi,this.namedRafs_=new Ed,(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 void 0===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];for(e=e.reduce(function(e,t){return e.concat(t)},[]),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_[xn(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_:rt(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_[xn(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 ge(e,t||this.contentEl())},e.$$=function(e,t){return jc(e,t||this.contentEl())},e.hasClass=function(e){return Ee(this.el_,e)},e.addClass=function(e){ie(this.el_,e)},e.removeClass=function(e){wt(this.el_,e)},e.toggleClass=function(e,t){Yc(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 Uc(this.el_,e)},e.setAttribute=function(e,t){jt(this.el_,e,t)},e.removeAttribute=function(e){Jt(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=ft(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;function o(){e=!1}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)}}),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=n.getComponent("Tech"),r=a&&a.isTech(t),c=n===t||n.prototype.isPrototypeOf(t.prototype);if(r||!c)throw new Error('Illegal component, "'+e+'"; '+(r?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");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_[xn(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},A(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}),A(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 Ea(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 ii(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:Ea.bind(null,"start",0,e),end:Ea.bind(null,"end",1,e)}}function Le(e,t){return Array.isArray(e)?ii(e):void 0===e||void 0===t?ii():ii([[e,t]])}function _a(e,t){var n,s,o,i=0;if(!t)return 0;e&&e.length||(e=Le(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 R(e){if(e instanceof R)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:ue(e)&&("number"==typeof e.code&&(this.code=e.code),p(this,e)),this.message||(this.message=R.defaultMessages[this.code]||"")}R.prototype.code=0,R.prototype.message="",R.prototype.status=null,R.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],R.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(we=0;we<R.errorTypes.length;we++)R[R.errorTypes[we]]=we,R.prototype[R.errorTypes[we]]=we;function At(e){return e!=null&&"function"==typeof e.then}function Me(e){At(e)&&e.then(null,function(){})}function ya(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 c=A(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]}),ai=(c.code,c.codes,c.aliases,c.names,c.title,"vjs-modal-dialog"),Je=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:ai+"-content"},{role:"document"}),s.descEl_=g("p",{className:ai+"-description vjs-control-text",id:s.el().getAttribute("aria-describedby")}),Re(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 ai+" 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(),kc(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"),_o(this.contentEl()),this.trigger("modalempty")},n.content=function(e){return void 0!==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);Je.prototype.options_={pauseOnOpen:!0,temporary:!0},n.registerComponent("ModalDialog",Je),Ce=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})},ne(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}(F);for(Nd in Ce.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"},Ce.prototype.allowedEvents_)Ce.prototype["on"+Nd]=null;function ri(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 li(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 di(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 ia(e){if(!e.match(/^https?:\/\//)){var t=s.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e}function hi(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^/]+?)(\.([^./?]+)))(?:[/]*|[?].*)$/.exec(e);if(t)return t.pop().toLowerCase()}return""}function nn(e,n){void 0===n&&(n=t.location);var s=di(e);return(":"===s.protocol?n.protocol:s.protocol)+s.host!==n.protocol+n.host}var Wd=function(e){function t(t){void 0===t&&(t=[]);for(var s,n=t.length-1;0<=n;n--)if(t[n].enabled){ri(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&&ri(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.enabledChange_=function(){n.changing_||(n.changing_=!0,ri(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}(Ce),Ud=function(e){function t(t){void 0===t&&(t=[]);for(var s,n=t.length-1;0<=n;n--)if(t[n].selected){li(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&&li(this,t),e.prototype.addTrack.call(this,t),t.addEventListener&&(t.selectedChange_=function(){n.changing_||(n.changing_=!0,li(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}(Ce),Ui=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}(Ce),qd=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}(),$i=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;function o(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})}if(this.cues_=e,this.length_=e.length,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}(),Xd={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Qd={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Zd={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},Ai={disabled:"disabled",hidden:"hidden",showing:"showing"},ms=function(e){function t(t){function i(e){Object.defineProperty(l(n),e,{get:function(){return o[e]},set:function(){}})}void 0===t&&(t={});var a,n=e.call(this)||this,o={id:t.id||"vjs_track_"+ve(),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}(F),Rl=Object.freeze({__proto__:null,parseUrl:di,getAbsoluteURL:ia,getFileExtension:hi,isCrossOrigin:nn}),yi="undefined"!=typeof window?window:void 0!==T?T:"undefined"!=typeof self?self:{},yu=function(e){var t=Jd.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)},Jd=Object.prototype.toString,Pd=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();void 0===t[n]?t[n]=s:Array.isArray(t[n])?t[n].push(s):t[n]=[t[n],s]}),t},ui=ae,Ld=ae;function ca(e,t,n){var s=e;return yu(t)?(n=t,"string"==typeof e&&(s={uri:e})):s=yn({},t,{uri:e}),s.callback=n,s}function ae(e,t,n){return la(t=ca(e,t,n))}function la(e){if(void 0===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=Pd(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 ae.XDomainRequest:new ae.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}function ba(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 Ca(e,n){var o,s={uri:e},i=nn(e);i&&(s.cors=i),o="use-credentials"===n.tech_.crossOrigin(),o&&(s.withCredentials=o),ui(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 ba(o,n);d.error("vttjs failed to load, stopping trying to process "+n.src)}):ba(o,n)}))}ae.XMLHttpRequest=yi.XMLHttpRequest||function(){},ae.XDomainRequest="withCredentials"in new ae.XMLHttpRequest?ae.XMLHttpRequest:yi.XDomainRequest,function(e,t){for(var n=0;n<e.length;n++)t(e[n])}(["get","put","post","patch","head","delete"],function(e){ae["delete"===e?"del":e]=function(t,n,s){return(n=ca(t,n,s)).method=e.toUpperCase(),la(n)}}),ui.default=Ld,ct=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:Zd[t.kind]||"subtitles",language:t.language||t.srclang||""}),o=Ai[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 $i(n.cues_),r=new $i(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){Ai[e]&&o!==e&&(o=e,this.preload_||"disabled"===o||0!==this.cues.length||Ca(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)&&Ca(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}(ms),ct.prototype.allowedEvents_={cuechange:"cuechange"};var ka=function(e){function t(t){void 0===t&&(t={});var s=f(t,{kind:Qd[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}(ms),$a=function(e){function t(t){void 0===t&&(t={});var s=f(t,{kind:Xd[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}(ms),dt=function(e){function t(t){void 0===t&&(t={});var o,n=e.call(this)||this,s=new ct(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}(F);dt.prototype.allowedEvents_={load:"load"},dt.NONE=0,dt.LOADING=1,dt.LOADED=2,dt.ERROR=3,W={audio:{ListClass:Wd,TrackClass:ka,capitalName:"Audio"},video:{ListClass:Ud,TrackClass:$a,capitalName:"Video"},text:{ListClass:Ui,TrackClass:ct,capitalName:"Text"}},Object.keys(W).forEach(function(e){W[e].getterName=e+"Tracks",W[e].privateName=e+"Tracks_"}),Ae={remoteText:{ListClass:Ui,TrackClass:ct,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:qd,TrackClass:dt,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},E=yn({},W,Ae),Ae.names=Object.keys(Ae),W.names=Object.keys(W),E.names=[].concat(Ae.names).concat(W.names),bn=Object.create||function(e){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return Ka.prototype=e,new Ka};function Ka(){}function Q(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function Zo(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 gt(){this.values=bn(null)}function vt(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 Od(e,t,n){var o=e;function i(){var t=Zo(e);if(null===t)throw new Q(Q.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 Q(Q.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 gt;vt(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)}((Q.prototype=bn(Error.prototype)).constructor=Q).Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},gt.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 Go=s.createElement("textarea"),Hd={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Ja={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)"},pd={v:"title",lang:"lang"},ac={rt:"ruby"};function Wc(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=Hd[t],!s)return null;var s,o=e.document.createElement(s),i=pd[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,Go.innerHTML=r,r=Go.textContent,Go.textContent="",r)));else{if("/"===n[1]){a.length&&a[a.length-1]===n.substr(2).replace(">","")&&(a.pop(),o=o.parentNode);continue}if(c=Zo(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,ac[(u=s).localName]&&ac[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;Ja.hasOwnProperty(n)&&(o=t?"background-color":"color",i=Ja[n],s.style[o]=i)}),s.className=l.join(" ")),a.push(i[1]),o.appendChild(s),o=s}return d}ho=[[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 kl(e){for(var n,t=0;t<ho.length;t++)if(n=ho[t],e>=n[0]&&e<=n[1])return!0;return!1}function zn(){}function ao(e,t,n){zn.call(this),this.cue=t,this.cueDiv=Wc(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(kl(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 N(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 El(e,t,n,s){var l,u,m,c=new N(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 N(t)}m=function(e,t){for(var i,a,r=new N(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 N(e),c=i),e=new N(r)}return a||r}(c,o),t.move(m.toCSSCompatValues(n))}function Ft(){}zn.prototype.applyStyles=function(e,t){for(var n in t=t||this.div,e)e.hasOwnProperty(n)&&(t.style[n]=e[n])},zn.prototype.formatStyle=function(e,t){return 0===e?0:e+t},(ao.prototype=bn(zn.prototype)).constructor=ao,N.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}},N.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},N.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},N.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},N.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}},N.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)},N.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}},N.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}},Ft.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},Ft.convertCueToDOMTree=function(e,t){return e&&t?Wc(e,t):null},Ft.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=N.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 ao(e,o,r),s.appendChild(n.div),El(0,n,a,i),o.displayState=n.div,i.push(N.getSimpleBoxPosition(n))}()}else for(o=0;o<t.length;o++)s.appendChild(t[o].displayState)},(Ft.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 Q))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var n,s,o,i,r,t=this;function a(){for(var s,n=t.buffer,e=0;e<n.length&&"\r"!==n[e]&&` `!==n[e];)++e;return s=n.substr(0,e),"\r"===n[e]&&++e,` `===n[e]&&++e,t.buffer=n.substr(e),s}e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));try{if("INITIAL"===t.state){if(!/\r\n|\n/.test(t.buffer))return this;if(i=(n=a()).match(/^WEBVTT([ \t].*)?$/),!i||!i[0])throw new Q(Q.Errors.BadSignature);t.state="HEADER"}for(s=!1;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:n=a(),t.state){case"HEADER":/:/.test(n)?(o=n).match(/X-TIMESTAMP-MAP/)?vt(o,function(e,n){switch(e){case"X-TIMESTAMP-MAP":o=n,s=new gt,vt(o,function(e,t){switch(e){case"MPEGT":s.integer(e+"S",t);break;case"LOCA":s.set(e+"L",Zo(t))}},/[^\d]:/,/,/),t.ontimestampmap&&t.ontimestampmap({MPEGTS:s.get("MPEGTS"),LOCAL:s.get("LOCAL")})}var s,o},/=/):vt(o,function(e,n){switch(e){case"Region":!function(e){var s,n=new gt;vt(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 gt,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)}},/:/):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{Od(n,t.cue,t.regionList)}catch(e){t.reportOrThrowError(e),t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":if(r=-1!==n.indexOf("-->"),!n||r&&(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 Q(Q.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}};var xl=Ft,_d={"":1,lr:1,rl:1},ld={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&&!!ld[e.toLowerCase()]&&e.toLowerCase()}function gl(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,n="string"==typeof(t=e)&&!!_d[t.toLowerCase()]&&t.toLowerCase();if(!1===n)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");l=n,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}gl.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},bl=gl,al={"":!0,up:!0};function Pt(e){return"number"==typeof e&&0<=e&&e<=100}function Al(){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(!Pt(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(!Pt(e))throw new Error("RegionAnchorX must be between 0 and 100.");s=e}},regionAnchorX:{enumerable:!0,get:function(){return n},set:function(e){if(!Pt(e))throw new Error("RegionAnchorY must be between 0 and 100.");n=e}},viewportAnchorY:{enumerable:!0,get:function(){return i},set:function(e){if(!Pt(e))throw new Error("ViewportAnchorY must be between 0 and 100.");i=e}},viewportAnchorX:{enumerable:!0,get:function(){return o},set:function(e){if(!Pt(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,n="string"==typeof(t=e)&&!!al[t.toLowerCase()]&&t.toLowerCase();!1===n||(a=n)}}})}Ye=A(function(e){n=e.exports={WebVTT:xl,VTTCue:bl,VTTRegion:Al},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()}),Ye.WebVTT,Ye.VTTCue,Ye.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}),E.names.forEach(function(e){var n=E[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 E.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 Le(0,0)},n.bufferedPercent=function(){return _a(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(W.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 R(e),this.trigger("error")),this.error_},n.played=function(){return this.hasStarted_?Le(0,0):Le()},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;W.names.forEach(function(t){function n(){e.trigger(t+"trackchange")}var o=W[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(Ye)&&0<Object.keys(Ye).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();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)}n.on("addtrack",o),n.on("removetrack",i),this.addWebVttScript_(),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 E.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_[xn(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),E.names.forEach(function(e){var t=E[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 ze={},qs={},Qn={};function Ml(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,ze[l],s,o,i,a);else if(l){if(c=function(e,t){if(s=qs[e.id()],n=null,s==null)return n=t(e),qs[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}(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:ze[l.type],s,o,i,a)})}else r.length?e(t,r,s,o,i,a):a?s(t,i):e(t,ze["*"],s,o,i,!0)}(t,ze[t.type],n,e)},1)}function cc(e,t,n,s){void 0===s&&(s=null);var r="call"+b(n),o=e.reduce(Es(r),s),i=o===Qn,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 Ul={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1},Ql={setCurrentTime:1,setMuted:1,setVolume:1},gr={play:1,pause:1};function Es(e){return function(t,n){return t===Qn?Qn:n[e]?n[e](t):t}}function os(e){void 0===e&&(e="");var t=hi(e);return qa[t.toLowerCase()]||""}qa={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 Aa(e){if(!e.type){var t=os(e.src);t&&(e.type=t)}return e}Oa=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",Oa),Ut=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,Re(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"),void 0!==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"),void 0!==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",Ut),ja=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)||(Tt||Zt)&&t||this.player_.tech(!0).focus(),this.player_.paused()?Me(this.player_.play()):this.player_.pause()}},n}(Ut),n.registerComponent("PosterImage",ja),pt="#222",ta={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 Zs(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 fs(e,t,n){try{e.style[t]=n}catch{return}}Ei=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&&fs(s.firstChild,"color",Zs(n.color||"#fff",n.textOpacity)),n.backgroundColor&&(s.firstChild.style.backgroundColor=n.backgroundColor),n.backgroundOpacity&&fs(s.firstChild,"backgroundColor",Zs(n.backgroundColor||"#000",n.backgroundOpacity)),n.windowColor&&(n.windowOpacity?fs(s,"backgroundColor",Zs(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 "+pt:"raised"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+pt:"depressed"===n.edgeStyle?s.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+pt:"uniform"===n.edgeStyle&&(s.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+pt)),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=ta[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,ie(c,"vjs-text-track-cue"),ie(c,"vjs-text-track-cue-"+(n.language?n.language:s));this.player_.textTrackSettings&&this.updateDisplayState(n)}}},s}(n),n.registerComponent("TextTrackDisplay",Ei),ea=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",ea),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}(Ut),n.registerComponent("Button",G),bs=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,Me(t),void(!this.player_.tech(!0)||(Tt||Zt)&&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()},At(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),bs.prototype.controlText_="Play Video",n.registerComponent("BigPlayButton",bs),ra=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",ra),ys=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);function ma(e,t){e=e<0?0:e;var o=Math.floor(e%60),n=Math.floor(e/60%60),s=Math.floor(e/3600),i=Math.floor(t/60%60),a=Math.floor(t/3600);return!isNaN(e)&&e!==1/0||(s=n=o="-"),(s=0<s||0<a?s+":":"")+(n=((s||10<=i)&&n<10?"0"+n:n)+":")+(o<10?"0"+o:o)}ys.prototype.controlText_="Play",n.registerComponent("PlayToggle",ys),ds=ma;function Ve(e,t){return void 0===t&&(t=e),ds(e,t)}De=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=Ve(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),De.prototype.labelText_="Time",De.prototype.controlText_="Time",n.registerComponent("TimeDisplay",De),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}(De),is.prototype.labelText_="Current Time",is.prototype.controlText_="Current Time",n.registerComponent("CurrentTimeDisplay",is),ss=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}(De),ss.prototype.labelText_="Duration",ss.prototype.controlText_="Duration",n.registerComponent("DurationDisplay",ss),ur=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",ur),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}(De),ns.prototype.labelText_="Remaining Time",ns.prototype.controlText_="Remaining Time",n.registerComponent("RemainingTimeDisplay",ns),Kr=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",Kr),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);function Fs(e,t,n){return e=Number(e),Math.min(n,Math.max(t,isNaN(e)?t:e))}Ms.prototype.controlText_="Seek to live, currently playing live",n.registerComponent("SeekToLive",Ms),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||oe||e.preventDefault(),Vc(),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;Ic(),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(Fs(this.getPercent(),0,1).toFixed(4))},t.calculateDistance=function(e){var t=yo(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);function zs(e,t){return Fs(e/t*100,0,100).toFixed(2)+"%"}n.registerComponent("Slider",ts),Xr=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=zs(l,u);t.percent_!==i&&(t.el_.style.width=i,Re(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=zs(a,l),e.style.width=zs(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",Xr),Zr=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).update=Oe(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=Et(this.el_),i=jo(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){Re(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?"":"-")+Ve(c,a)}else i=Ve(n,r);o.update(e,t,i),s&&s()})},n}(n),n.registerComponent("TimeTooltip",Zr),es=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).update=Oe(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),es.prototype.options_={children:[]},K||je||es.prototype.options_.children.push("timeTooltip"),n.registerComponent("PlayProgressBar",es),Rs=function(e){function t(t,n){var s;return(s=e.call(this,t,n)||this).update=Oe(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),Rs.prototype.options_={children:["timeTooltip"]},n.registerComponent("MouseTimeDisplay",Rs),Jn=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=Oe(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}",[Ve(t,e),Ve(e,e)],"{1} of {2}")),n.currentTime_=t,n.duration_=e),n.bar&&n.bar.update(jo(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){Xe(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(Xe(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?Me(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),Jn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"},K||je||Jn.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),n.registerComponent("SeekBar",Jn),Hs=function(e){function n(t,n){var s;return(s=e.call(this,t,n)||this).handleMouseMove=Oe(u(l(s),s.handleMouseMove),30),s.throttledHandleMouseSeek=Oe(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=Et(i),o=yo(i,e).x,o=Fs(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),Hs.prototype.options_={children:["seekBar"]},n.registerComponent("ProgressControl",Hs),Is=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),Is.prototype.controlText_="Picture-in-Picture",n.registerComponent("PictureInPictureToggle",Is),Bs=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),Bs.prototype.controlText_="Fullscreen",n.registerComponent("FullscreenToggle",Bs),lc=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",lc),Zn=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){Xe(t)&&e.prototype.handleMouseDown.call(this,t)},t.handleMouseMove=function(e){Xe(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),Zn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},Zn.prototype.playerEvent="volumechange",n.registerComponent("VolumeBar",Zn),Ws=function(e){function n(t,n){var s,o,i;return void 0===n&&(n={}),n.vertical=n.vertical||!1,void 0!==n.volumeBar&&!yt(n.volumeBar)||(n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=n.vertical),s=e.call(this,t,n)||this,o=l(s),(i=t).tech_&&!i.tech_.featuresVolumeControl&&o.addClass("vjs-hidden"),o.on(i,"loadstart",function(){i.tech_.featuresVolumeControl?o.removeClass("vjs-hidden"):o.addClass("vjs-hidden")}),s.throttledHandleMouseMove=Oe(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),Ws.prototype.options_={children:["volumeBar"]},n.registerComponent("VolumeControl",Ws),Us=function(e){function n(t,n){var s,o,i;return s=e.call(this,t,n)||this,o=l(s),(i=t).tech_&&!i.tech_.featuresMuteControl&&o.addClass("vjs-hidden"),o.on(i,"loadstart",function(){i.tech_.featuresMuteControl?o.removeClass("vjs-hidden"):o.addClass("vjs-hidden")}),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;K&&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++)wt(this.el_,"vjs-vol-"+t);ie(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),Us.prototype.controlText_="Mute",n.registerComponent("MuteToggle",Us),Ks=function(e){function n(t,n){var s;return void 0===n&&(n={}),void 0!==n.inline?n.inline=n.inline:n.inline=!0,void 0!==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"),q(s,"keyup",u(this,this.handleKeyPress))},t.handleMouseOut=function(){this.removeClass("vjs-hover"),S(s,"keyup",u(this,this.handleKeyPress))},t.handleKeyPress=function(e){c.isEventKey(e,"Esc")&&this.handleMouseOut()},n}(n),Ks.prototype.options_={children:["muteToggle","volumeControl"]},n.registerComponent("VolumePanel",Ks),Xn=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_),q(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",Xn),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(),q(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 Xn(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"),S(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"),K&&cl())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),Wn=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",Wn),jl=["Tab","Esc","Up","Down","Right","Left"],et=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){jl.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}(Ut),n.registerComponent("MenuItem",et),tt=function(e){function o(n,o){var i,r,c=o.track,a=n.textTracks();function d(){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 o.label=c.label||c.language||"Unknown",o.selected="showing"===c.mode,(i=e.call(this,n,o)||this).track=c,i.kinds=(o.kinds||[o.kind||i.track.kind]).filter(Boolean),n.on(["loadstart","texttrackchange"],d),a.addEventListener("change",d),a.addEventListener("selectedlanguagechange",u),i.on("dispose",function(){n.off(["loadstart","texttrackchange"],d),a.removeEventListener("change",d),a.removeEventListener("selectedlanguagechange",u)}),void 0===a.onchange&&i.on(["tap","click"],function(){if("object"!=typeof t.Event)try{r=new t.Event("change")}catch{}r||(r=s.createEvent("Event")).initEvent("change",!0,!0),a.dispatchEvent(r)}),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}(et),n.registerComponent("TextTrackMenuItem",tt),Js=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}(tt),n.registerComponent("OffTextTrackMenuItem",Js),Te=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=tt),this.label_&&(i=this.label_+" off"),e.push(new Js(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}(Wn),n.registerComponent("TextTrackButton",Te),to=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}(et),n.registerComponent("ChaptersTrackMenuItem",to),In=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 to(this.player_,{track:this.track_,cue:s}),e.push(o);return e},n}(Te),In.prototype.kind_="chapters",In.prototype.controlText_="Chapters",n.registerComponent("ChaptersButton",In),Hn=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}(Te),Hn.prototype.kind_="descriptions",Hn.prototype.controlText_="Descriptions",n.registerComponent("DescriptionsButton",Hn),Pn=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}(Te),Pn.prototype.kind_="subtitles",Pn.prototype.controlText_="Subtitles",n.registerComponent("SubtitlesButton",Pn),Ln=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}(tt),n.registerComponent("CaptionSettingsMenuItem",Ln),Dn=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 Ln(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(Te),Dn.prototype.kind_="captions",Dn.prototype.controlText_="Captions",n.registerComponent("CaptionsButton",Dn),ro=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}(tt),n.registerComponent("SubsCapsMenuItem",ro),Tn=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 Ln(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t,ro)},t}(Te),Tn.prototype.kinds_=["captions","subtitles"],Tn.prototype.controlText_="Subtitles",n.registerComponent("SubsCapsButton",Tn),lo=function(e){function t(t,n){var s,o=n.track,i=t.audioTracks();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 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"),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}(et),n.registerComponent("AudioTrackMenuItem",lo),uo=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 lo(this.player_,{track:s,selectable:!0,multiSelectable:!1}));return e},t}(Wn),uo.prototype.controlText_="Audio Track",n.registerComponent("AudioTrackButton",uo),Fn=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}(et),Fn.prototype.contentElType="button",n.registerComponent("PlaybackRateMenuItem",Fn),mo=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 Xn(this.player()),t=this.playbackRates();if(t)for(e=t.length-1;0<=e;e--)n.addChild(new Fn(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),mo.prototype.controlText_="Playback Rate",n.registerComponent("PlaybackRateMenuButton",mo),fo=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",fo),Kc=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}(fo),n.registerComponent("CustomControlSpacer",Kc),Mt=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),Mt.prototype.options_={children:["playToggle","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","fullscreenToggle"]},"exitPictureInPicture"in s&&Mt.prototype.options_.children.splice(Mt.prototype.options_.children.length-1,0,"pictureInPictureToggle"),n.registerComponent("ControlBar",Mt),vo=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}(Je),vo.prototype.options_=yn({},Je.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),n.registerComponent("ErrorDisplay",vo);var bo="vjs-text-track-settings",Hc=["#000","Black"],Pc=["#00F","Blue"],zc=["#0FF","Cyan"],Ac=["#0F0","Green"],_c=["#F0F","Magenta"],yc=["#F00","Red"],mc=["#FFF","White"],uc=["#FF0","Yellow"],ko=["1","Opaque"],Ao=["0.5","Semi-Transparent"],rc=["0","Transparent"],Fe={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[Hc,mc,yc,Ac,Pc,uc,_c,zc]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[ko,Ao,rc]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[mc,Hc,yc,Ac,Pc,uc,_c,zc]},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:[ko,Ao]},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:[rc,Ao,ko]}};function oc(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}Fe.windowColor.options=Fe.backgroundColor.options,Wr=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()}),mt(Fe,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=Fe[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,t,n=this;return void 0===(e={})&&(e=0),qi(t=Fe).reduce(function(e,s){return function(e,t,s){var o=function(e,t){return oc(e.options[e.options.selectedIndex].value,t)}(n.$(t.selector),t.parser);return void 0!==o&&(e[s]=o),e}(e,t[s],s)},e)},n.setValues=function(e){var t=this;mt(Fe,function(n,s){!function(e,t,n){if(t)for(var s=0;s<e.options.length;s++)if(oc(e.options[s].value,n)===t){e.selectedIndex=s;break}}(t.$(n.selector),e[s],n.parser)})},n.setDefaults=function(){var e=this;mt(Fe,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(bo))}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(bo,JSON.stringify(e)):t.localStorage.removeItem(bo)}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}(Je),n.registerComponent("TextTrackSettings",Wr),Hr=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;function a(){var n=this,s=arguments,t=function(){t=i=null,e.apply(n,s)};o.clearTimeout(i),i=o.setTimeout(t,100)}return void 0===o&&(o=t),a.cancel=function(){o.clearTimeout(i),i=null},a}(function(){o.resizeHandler()},0,0,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(){S(this,"resize",t),S(this,"unload",e),e=null};q(o.el_.contentWindow,"unload",e),q(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",Hr),Rr={trackingThreshold:30,liveTolerance:15},kr=function(e){function o(t,n){var o,i=f(Rr,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()}),Tt&&"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);function Lo(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 Er(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 Or(e){if(n=e.el(),!n.resetSourceWatch_){var n,s={},o=Er([e.el(),t.HTMLMediaElement.prototype,t.Element.prototype,gd],"innerHTML"),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),Lo(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 Ho(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)}n.registerComponent("LiveTracker",kr);var An,gd=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}}),vd=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?ia(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")||!nn(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_(),(Ge||Ns||pr)&&!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(){!function(e){if(e.featuresSourceset&&(n=e.el(),!n.resetSourceset_)){var n,s=Er([e.el(),t.HTMLMediaElement.prototype,vd],"src"),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 Lo(e)||(e.triggerSourceset(""),Or(e)),t},n.currentSrc?e.triggerSourceset(n.currentSrc):Lo(e)||Or(e),n.resetSourceset_=function(){n.resetSourceset_=null,n.load=i,n.setAttribute=o,Object.defineProperty(n,"src",s),n.resetSourceWatch_&&n.resetSourceWatch_()}}}(this)},n.restoreMetadataTracksInIOSNativePlayer_=function(){function t(){for(var t,n=[],s=0;s<e.length;s++)t=e[s],"metadata"===t.kind&&n.push({track:t,storedMode:t.mode})}var n,e=this.textTracks();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)}t(),e.addEventListener("change",t),this.on("dispose",function(){return e.removeEventListener("change",t)}),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=W[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;W.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&&le(this.options_.tag)),Ge&&!0===this.options_.nativeControlsForTouch||delete a.controls,qc(e,p(a,{id:this.options_.techId,class:"vjs-tech"}))),e.playerId=this.options_.playerId),void 0!==this.options_.preload&&jt(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],void 0!==n&&(n?jt(e,t,t):Jt(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&&cn?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&&je&&oe&&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)Me(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 void 0!==this.el().webkitDroppedFrameCount&&void 0!==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);Ho(a,"TEST_VID",function(){if(at()){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?jt(a.TEST_VID,"muted","muted"):Jt(a.TEST_VID,"muted"),e!==a.TEST_VID.muted}catch{return!1}},a.canControlPlaybackRate=function(){if(je&&oe&&Ar<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 cn||K&&oe},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];Ho(a.prototype,t,function(){return a[n]()},!0)}),a.prototype.movingMediaElementInDOM=!K,a.prototype.featuresFullscreenResize=!0,a.prototype.featuresProgressEvents=!0,a.prototype.featuresTimeupdateEvents=!0,a.patchCanPlayType=function(){4<=ks&&!jr&&!oe&&(An=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":An.call(this,e)})},a.unpatchCanPlayType=function(){var e=a.TEST_VID.constructor.prototype.canPlayType;return An&&(a.TEST_VID.constructor.prototype.canPlayType=An),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=hi(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 Za=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Uo={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},Ko=["tiny","xsmall","small","medium","large","xlarge","huge"],En={};Ko.forEach(function(e){var t="x"===e.charAt(0)?"x-"+e.substring(1):e;En[e]="vjs-layout-"+t}),Ya={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_"+ve(),(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(le(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=Di(i.id_),i.fsApi_=Bn,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&&le(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(),ti(l(i),{eventBusKey:"el_"}),i.fsApi_.requestFullscreen&&(q(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"),Ge&&i.addClass("vjs-touch-enabled"),K||i.addClass("vjs-workinghover"),a.players[i.id_]=l(i),h="7.11.7".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"),S(s,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),S(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),qs[this.id()]=null,E.names.forEach(function(e){var s=E[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=le(n),a){for(o=this.el_=n,n=this.tag=s.createElement("video");o.children.length;)n.appendChild(o.firstChild);Ee(o,"video-js")||ie(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",(Tt||oe&&Gr)&&(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_=sc("vjs-styles-dimensions"),l=ge(".vjs-styles-defaults"),d=ge("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),ie(h,"vjs-hidden"),h.setAttribute("hidden","hidden");return n.initNetworkState_=n.networkState,n.parentNode&&!c&&n.parentNode.insertBefore(o,n),io(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,n,s=this;if(void 0===e)return!!this.fluid_;this.fluid_=!!e,ne(this)&&this.off(["playerreset","resize"],this.updateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),n=function(){s.on(["playerreset","resize"],s.updateStyleEl_)},ne(t=this)?n():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(n))):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),Lr(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},E.names.forEach(function(e){var t=E[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),function(e,t){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()}(this.textTracksJson_||[],this.tech_),Za.forEach(function(e){n.on(n.tech_,e,n["handleTech"+b(e)+"_"])}),Object.keys(Uo).forEach(function(e){n.on(n.tech_,e,function(t){0===n.tech_.playbackRate()&&n.tech_.seeking()?n.queuedCallbacks_.push({callback:n["handleTech"+Uo[e]+"_"].bind(n),event:t}):n["handleTech"+Uo[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||io(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},o.unloadTech_=function(){var e=this;E.names.forEach(function(t){var n=E[t];e[n.privateName]=e[n.getterName]()}),this.textTracksJson_=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=ya(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(ya))}(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();function n(){t.muted(s)}if(t.muted(!0),t.playTerminatedQueue_.push(n),e=t.play(),At(e))return e.catch(n)},"any"===e&&!0!==this.muted()?At(n=this.play())&&(n=n.catch(s)):n="muted"===e&&!0!==this.muted()?s():this.play(),At(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 os(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=le(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){Xe(e)&&this.controls_&&(this.paused()?Me(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 Ql)return n=this.middleware_,s=this.tech_,i=t,s[o=e](n.reduce(Es(o),i));var n,s,o,i;if(e in gr)return cc(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 Ul)return n=this.middleware_,s=this.tech_,t=e,n.reduceRight(Es(t),s[t]());if(e in gr)return cc(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)}}var t,n,s},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=Me),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||!cn&&!K||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")||Le(0,0)},o.scrubbing=function(e){if(void 0===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 void 0!==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=Le(0,0)),e},o.bufferedPercent=function(){return _a(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,q(s,"keydown",this.boundFullWindowOnEscKey_),s.documentElement.style.overflow="hidden",ie(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,S(s,"keydown",this.boundFullWindowOnEscKey_),s.documentElement.style.overflow=this.docOrigOverflow,wt(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,s,n=this.options_.userActions;n&&n.hotkeys&&(t=this.el_.ownerDocument.activeElement,s=t.tagName.toLowerCase(),!t.isContentEditable&&("input"===s?-1!==["button","checkbox","hidden","radio","reset","submit"].indexOf(t.type):-1===["textarea"].indexOf(s))&&("function"==typeof n.hotkeys?n.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(void 0===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):ue(t)&&n.push(t)}),t=n}else t="string"==typeof t&&t.trim()?[Aa({src:t})]:ue(t)&&"string"==typeof t.src&&t.src&&t.src.trim()?[Aa(t)]:[];return t}(e),n.length?(this.changingSrc_=!0,this.cache_.sources=n,this.updateSourceCaches_(n[0]),Ml(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());var o=s,i=t.tech_;o.forEach(function(e){return e.setTech&&e.setTech(i)})})):this.setTimeout(function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})},0)},o.src_=function(e){var n,s,o=this,t=this.selectSource([e]);return!t||(n=t.tech,s=this.techName_,b(n)===b(s)?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(){o.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_():Me(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_(),ne(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=void 0===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 R(e),this.addClass("vjs-error"),d.error("(CODE:"+this.error_.code+" "+R.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||K||je||(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(),ne(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 Je(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<Ko.length;n++)if(e=Ko[n],s<=this.breakpoints_[e]){if(t===e)return;t&&this.removeClass(En[t]),this.addClass(En[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({},Ya,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 En[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:os(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:os(e.poster)}]),e},a.getTagSettings=function(e){var s,i,n={sources:[],tracks:[]},t=le(e),a=t["data-setup"];if(Ee(e,"vjs-fill")&&(t.fill=!0),Ee(e,"vjs-fluid")&&(t.fluid=!0),null!==a){var r=function(e,t){var n,s=null;try{n=JSON.parse(e,t)}catch(e){s=e}return[s,n]}(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(le(s)):"track"===i&&n.tracks.push(le(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),E.names.forEach(function(e){var t=E[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={},ht=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:ht&&(ht.languages&&ht.languages[0]||ht.userLanguage||ht.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)}}),Za.forEach(function(e){j.prototype["handleTech"+b(e)+"_"]=function(){return this.trigger(e)}}),n.registerComponent("Player",j),Qo=A(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 _n(e){return nt.hasOwnProperty(e)}function jn(e){return _n(e)?nt[e]:void 0}function Ua(e,t){e[it]=e[it]||{},e[it][t]=!0}function mn(e,t,n){var s=(n?"before":"")+"pluginsetup";e.trigger(s,t),e.trigger(s+":"+t.name,t)}function Ha(e,t){return t.prototype.name=e,function(){mn(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=Sd(t,[this].concat(i)),this[e]=function(){return s},mn(this,s.getEventHash()),s}}var Sd=A(function(e){function t(){return 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}}()?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&&Qo(o,n.prototype),o},t.apply(null,arguments)}e.exports=t}),hn="plugin",it="activePlugins_",nt={},ee=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)),ti(this),delete this.trigger,Ra(this,this.constructor.defaultState),Ua(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={}),Ke(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[it][e]=!1,this.player=this.state=null,t[e]=Ha(e,nt[e])},e.isBasic=function(t){var n="string"==typeof t?jn(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(_n(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 nt[t]=n,t!==hn&&(e.isBasic(n)?j.prototype[t]=function(e,t){function n(){mn(this,{name:e,plugin:t,instance:null},!0);var n=t.apply(this,arguments);return Ua(this,e),mn(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]=Ha(t,n)),n},e.deregisterPlugin=function(e){if(e===hn)throw new Error("Cannot de-register base plugin.");_n(e)&&(delete nt[e],delete j.prototype[e])},e.getPlugins=function(e){var t;return void 0===e&&(e=Object.keys(nt)),e.forEach(function(e){var n=jn(e);n&&((t=t||{})[e]=n)}),t},e.getPluginVersion=function(e){var t=jn(e);return t&&t.VERSION||""},e}();ee.getPlugin=jn,ee.BASE_PLUGIN_NAME=hn,ee.registerPlugin(hn,ee),j.prototype.usingPlugin=function(e){return!!this[it]&&!0===this[it][e]},j.prototype.hasPlugin=function(e){return!!_n(e)},ci=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?ge("#"+ci(t)):t,!rt(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));ue(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&&at())&&(Rt=ge(".vjs-styles-defaults"),Rt||(Rt=sc("vjs-styles-defaults"),sn=ge("head"),sn&&sn.insertBefore(Rt,sn.firstChild),Lr(Rt,` .video-js { width: 300px; height: 150px; } .vjs-fluid { padding-top: 56.25% } `))),Eo(1,e),e.VERSION="7.11.7",e.options=j.prototype.options_,e.getPlayers=function(){return j.players},e.getPlayer=function(e){if(n=j.players,"string"==typeof e){if(s=ci(e),o=n[s],o)return o;t=ge("#"+s)}else t=e;if(rt(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){ze[e]=ze[e]||[],ze[e].push(t)},Object.defineProperty(e,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(e.middleware,"TERMINATOR",{value:Qn,writeable:!1,enumerable:!0}),e.browser=Cl,e.TOUCH_ENABLED=Ge,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),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&&Qo(e,t)}(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=ee.registerPlugin,e.deregisterPlugin=ee.deregisterPlugin,e.plugin=function(e,t){return d.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),ee.registerPlugin(e,t)},e.getPlugins=ee.getPlugins,e.getPlugin=ee.getPlugin,e.getPluginVersion=ee.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=Di,e.createTimeRange=e.createTimeRanges=Le,e.formatTime=Ve,e.setFormatTime=function(e){ds=e},e.resetFormatTime=function(){ds=ma},e.parseUrl=di,e.isCrossOrigin=nn,e.EventTarget=F,e.on=q,e.one=Gn,e.off=S,e.trigger=Ke,e.xhr=ui,e.TextTrack=ct,e.AudioTrack=ka,e.VideoTrack=$a,["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"),gc[t].apply(null,arguments)}}),e.computedStyle=ft,e.dom=gc,e.url=Rl,e.defineLazyProperty=Ho,Y=Ne(A(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})),mi=A(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});function tn(e,t){return/^[a-z]+:/i.test(t)?t:(/\/\//i.test(e)||(e=ji.buildAbsoluteURL(pe.location&&pe.location.href||"",e)),ji.buildAbsoluteURL(e,t))}Ne(mi);var ce=Ne(A(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})),wi=void 0!==T?T:"undefined"!=typeof window?window:{},Z="undefined"!=typeof document?document:wi["__GLOBAL_DOCUMENT_CACHE@4"]||(wi["__GLOBAL_DOCUMENT_CACHE@4"]=Oi),o="undefined"!=typeof window?window:void 0!==T?T:"undefined"!=typeof self?self:{},ji=A(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}),pe="undefined"!=typeof window?window:void 0!==T?T:"undefined"!=typeof self?self:{},_i=A(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});Ne(_i);var gi=Ne(A(function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,_i(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0})),pi=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}(),ju=Ne(A(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})),bu=Ne(A(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})),vu=function(e){return pe.atob?pe.atob(e):Buffer.from(e,"base64").toString("binary")};function ki(e){for(var n=vu(e),s=new Uint8Array(n.length),t=0;t<n.length;t++)s[t]=n.charCodeAt(t);return s}function Xt(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 Si(e){return ru.test(e)?"hls":au.test(e)?"dash":"application/vnd.videojs.vhs+json"===e?"vhs-json":null}var gu=function(e){function t(){var t;return(t=e.call(this)||this).buffer="",t}return gi(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}(pi),_l=function(e){function t(){var t;return(t=e.call(this)||this).customParsers=[],t.tagMappers=[],t}gi(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("\r",""),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=Xt(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=Xt(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=Xt(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=Xt(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=Xt(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}(pi),hu=function(e){function n(){(n=e.call(this)||this).lineStream=new gu,n.parseStream=new _l,n.lineStream.pipe(n.parseStream);var n,s,o,r,c=bu(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:ki(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},void 0!==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={}),ju(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(){void 0===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}gi(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}(pi),ru=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i,au=/^application\/dash\+xml/i,nu="undefined"!=typeof window?window:void 0!==T?T:"undefined"!=typeof self?self:{},eu={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:"♦"}},fi=/[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]/,Pi=new RegExp("[\\-\\.0-9"+fi.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Hi=new RegExp("^"+fi.source+Pi.source+"*(?::"+fi.source+Pi.source+"*)?$"),Gt=0,fe=1,Ie=2,Kt=3,Be=4,We=5,$t=6,en=7;function Yi(){}function Gi(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function Vd(e,t,n,s,o,i){for(var c,l,d,r=++t,a=Gt;;){switch(d=e.charAt(r),d){case"=":if(a===fe)l=e.slice(t,r),a=Kt;else{if(a!==Ie)throw new Error("attribute equal must after attrName");a=Kt}break;case"'":case'"':if(a===Kt||a===fe){if(a===fe&&(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=We}else{if(a!=Be)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=We}break;case"/":switch(a){case Gt:n.setTagName(e.slice(t,r));case We:case $t:case en:a=en,n.closed=!0;case Be:case fe:case Ie:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return i.error("unexpected end of input"),a==Gt&&n.setTagName(e.slice(t,r)),r;case">":switch(a){case Gt:n.setTagName(e.slice(t,r));case We:case $t:case en:break;case Be:case fe:"/"===(c=e.slice(t,r)).slice(-1)&&(n.closed=!0,c=c.slice(0,-1));case Ie:a===Ie&&(c=l),a==Be?(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 Kt:throw new Error("attribute value missed!!")}return r;case"€":d=" ";default:if(d<=" ")switch(a){case Gt:n.setTagName(e.slice(t,r)),a=$t;break;case fe:l=e.slice(t,r),a=Ie;break;case Be:c=e.slice(t,r).replace(/&#?\w+;/g,o),i.warning('attribute "'+c+'" missed quot(")!!'),n.add(l,c,t);case We:a=$t}else switch(a){case Ie: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=fe;break;case We:i.warning('attribute space is required"'+l+'"!!');case $t:a=fe,t=r;break;case Kt:a=Be,t=r;break;case en:throw new Error("elements closed character '/' and '>' must be connected to")}}r++}}function Qi(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={},Ji(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 Bd(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 Ji(e,t){for(var n in e)t[n]=e[n]}function Id(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 wd(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 na(){}Yi.prototype={parse:function(e,t,n){var s=this.domBuilder;s.startDocument(),Ji(t,t={}),function(e,t,n,s,o){function O(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 S(t){if(l<t){var n=e.substring(l,t).replace(/&#?\w+;/g,O);d&&f(l),s.characters(n,0,t-l),l=t}}function f(t,n){for(;A<=t&&(n=D.exec(e));)C=n.index,A=C+n[0].length,d.lineNumber++;d.columnNumber=t-C+1}for(var i,h,p,g,v,b,j,y,_,x,E,k,F,z,C=0,A=0,D=/.*(?:\r\n?|\n)|.*$/g,d=s.locator,m=[{currentNSMap:t}],T={},l=0;;){try{if(i=e.indexOf("<",l),i<0){e.substr(l).match(/^\s*$/)||(_=s.doc,j=_.createTextNode(e.substr(l)),_.appendChild(j),s.currentElement=j);return}switch(l<i&&S(i),e.charAt(i+1)){case"/":var a=e.indexOf(">",i+3),c=e.substring(i+2,a),u=m.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),E=u.localNSMap,v=u.tagName==c,v||u.tagName&&u.tagName.toLowerCase()==c.toLowerCase()){if(s.endElement(u.uri,u.localName,c),E)for(z in E)s.endPrefixMapping(z);v||o.fatalError("end tag name: "+c+" is not match the current start tagName:"+u.tagName)}else m.push(u);a++;break;case"?":d&&f(i),a=wd(e,i,s);break;case"!":d&&f(i),a=Id(e,i,s,o);break;default:d&&f(i);var r=new na,w=m[m.length-1].currentNSMap,M=(a=Vd(e,i,r,w,O,o),r.length);if(!r.closed&&(y=e,x=a,p=r.tagName,h=void 0,null==(h=(F=T)[p])&&((h=y.lastIndexOf("</"+p+">"))<x&&(h=y.lastIndexOf("</"+p)),F[p]=h),h<x)&&(r.closed=!0,n.nbsp||o.warning("unclosed xml attribute")),d&&M){for(k=Gi(d,{}),g=0;g<M;g++)b=r[g],f(b.offset),b.locator=Gi(d,{});s.locator=k,Qi(r,s,w)&&m.push(r),s.locator=d}else Qi(r,s,w)&&m.push(r);"http://www.w3.org/1999/xhtml"!==r.uri||r.closed?a++:a=Bd(e,a,r.tagName,O,s)}}catch(e){o.error("element parse error: "+e),a=-1}l<a?l=a:S(Math.max(i,l)+1)}}(e,t,n,s,this.errorHandler),s.endDocument()}},na.prototype={setTagName:function(e){if(!Hi.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!Hi.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}},sa=Yi;function It(e,t){for(var n in e)t[n]=e[n]}function H(e,t){var s,n=e.prototype;n instanceof t||(s=function(){},s.prototype=t.prototype,It(n,s=new s),e.prototype=n=s),n.constructor!=e&&(n.constructor=e)}var Rd="http://www.w3.org/1999/xhtml",I={},X=I.ELEMENT_NODE=1,Qe=I.ATTRIBUTE_NODE=2,rn=I.TEXT_NODE=3,ua=I.CDATA_SECTION_NODE=4,ha=I.ENTITY_REFERENCE_NODE=5,Dd=I.ENTITY_NODE=6,fa=I.PROCESSING_INSTRUCTION_NODE=7,pa=I.COMMENT_NODE=8,ga=I.DOCUMENT_NODE=9,va=I.DOCUMENT_TYPE_NODE=10,re=I.DOCUMENT_FRAGMENT_NODE=11,zd=I.NOTATION_NODE=12,k={},_={},Td=(k.INDEX_SIZE_ERR=(_[1]="Index size error",1),k.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2),k.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3)),Md=(k.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),k.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),k.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),k.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7),k.NOT_FOUND_ERR=(_[8]="Not found",8)),xa=(k.NOT_SUPPORTED_ERR=(_[9]="Not supported",9),k.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10));function lt(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,_[e]),this.message=_[e],Error.captureStackTrace&&Error.captureStackTrace(this,lt);return n.code=e,t&&(this.message=this.message+": "+t),n}function be(){}function Pe(e,t){this._node=e,this._refresh=t,si(this)}function si(e){var t,n=e._node._inc||e._node.ownerDocument._inc;e._inc!=n&&(t=e._refresh(e._node),or(e,"length",t.length),It(t,e),e._inc=n)}function gn(){}function Ma(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function Fa(e,t,n,s){if(s?t[Ma(t,s)]=n:t[t.length++]=n,e){var o,a,i=(n.ownerElement=e).ownerDocument;i&&(s&&Pa(i,e,s),a=e,o=n,i&&i._inc++,"http://www.w3.org/2000/xmlns/"==o.namespaceURI&&(a._nsMap[o.prefix?o.localName:""]=o.value))}}function Ta(e,t,n){var o,i,s=Ma(t,n);if(!(0<=s))throw lt(Md,new Error(e.tagName+"@"+n));for(o=t.length-1;s<o;)t[s]=t[++s];t.length=o,e&&(i=e.ownerDocument,i&&(Pa(i,e,n),n.ownerElement=null))}function za(e){if(this._features={},e)for(var t in e)this._features=e[t]}function L(){}function Na(e){return("<"==e?"<":">"==e&&">")||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function zt(e,t){if(t(e))return!0;if(e=e.firstChild)do if(zt(e,t))return!0;while(e=e.nextSibling)}function bt(){}function Pa(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function ni(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 Ia(e,t){var n=t.previousSibling,s=t.nextSibling;return n?n.nextSibling=s:e.firstChild=s,s?s.previousSibling=n:e.lastChild=n,ni(e.ownerDocument,e),t}function Ba(e,t,n){var s,o,i,a=t.parentNode;if(a&&a.removeChild(t),t.nodeType===re){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 ni(e.ownerDocument||e,e),t.nodeType==re&&(t.firstChild=t.lastChild=null),t}function _t(){this._nsMap={}}function kn(){}function xt(){}function ei(){}function Jo(){}function Xo(){}function Yo(){}function Ga(){}function Xa(){}function qo(){}function Mn(){}function $o(){}function er(){}function tr(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}]),ot(this,o,e,t,a),o.join("")}function nr(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 ot(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 X:o=o||[];var a,r,l,f,p,h=e.attributes,g=h.length,i=e.firstChild,u=e.tagName;n=Rd===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(nr(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})}ot(a,t,n,s,o)}if(nr(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):ot(i,t,n,s,o),i=i.nextSibling;else for(;i;)ot(i,t,n,s,o),i=i.nextSibling;t.push("</",u,">")}else t.push("/>");return;case ga:case re:for(i=e.firstChild;i;)ot(i,t,n,s,o),i=i.nextSibling;return;case Qe:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,Na),'"');case rn:return t.push(e.data.replace(/[<&]/g,Na));case ua:return t.push("<![CDATA[",e.data,"]]>");case pa:return t.push("<!--",e.data,"-->");case va: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 fa:return t.push("<?",e.target," ",e.data,"?>");case ha:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function or(e,t,n){e[t]=n}k.INVALID_STATE_ERR=(_[11]="Invalid state",11),k.SYNTAX_ERR=(_[12]="Syntax error",12),k.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),k.NAMESPACE_ERR=(_[14]="Invalid namespace",14),k.INVALID_ACCESS_ERR=(_[15]="Invalid access",15),lt.prototype=Error.prototype,It(k,lt),be.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var s=[],n=0;n<this.length;n++)ot(this[n],s,e,t);return s.join("")}},Pe.prototype.item=function(e){return si(this),this[e]},H(Pe,be),gn.prototype={length:0,item:be.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 lt(xa);return t=this.getNamedItem(e.nodeName),Fa(this._ownerElement,this,e,t),t},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new lt(xa);return t=this.getNamedItemNS(e.namespaceURI,e.localName),Fa(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return Ta(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return Ta(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}},za.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 bt;return(s.implementation=this,s.childNodes=new be,(s.doctype=n)&&s.appendChild(n),t)&&(o=s.createElementNS(e,t),s.appendChild(o)),s},createDocumentType:function(e,t,n){var s=new Yo;return s.name=e,s.nodeName=e,s.publicId=t,s.systemId=n,s}},L.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 Ba(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return Ia(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 be),o.ownerDocument=t,o.nodeType){case X:var o,i,a,r,c,l=n.attributes,d=o.attributes=new gn,u=l.length;d._ownerElement=o;for(r=0;r<u;r++)o.setAttributeNode(e(t,l.item(r),!0));break;case Qe: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==rn&&e.nodeType==rn?(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==Qe?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==Qe?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},It(I,L),It(I,L.prototype),bt.prototype={nodeName:"#document",nodeType:ga,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType!=re)return null==this.documentElement&&e.nodeType==X&&(this.documentElement=e),Ba(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),Ia(this,e)},importNode:function(e,t){return function e(t,n,s){switch(n.nodeType){case X:(o=n.cloneNode(!1)).ownerDocument=t;case re:break;case Qe:s=!0}if((o=o||n.cloneNode(!1)).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 zt(this.documentElement,function(n){if(n.nodeType==X&&n.getAttribute("id")==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new Pe(this,function(e){var n=[];return zt(e.documentElement,function(s){s!==e&&s.nodeType==X&&t.test(s.getAttribute("class"))&&n.push(s)}),n})},createElement:function(e){var t=new _t;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new be,(t.attributes=new gn)._ownerElement=t},createDocumentFragment:function(){var e=new Mn;return e.ownerDocument=this,e.childNodes=new be,e},createTextNode:function(e){var t=new ei;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new Jo;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new Xo;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new $o;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new kn;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new qo;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new _t,s=t.split(":"),o=n.attributes=new gn;return n.childNodes=new be,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 kn,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}},H(bt,L),bt.prototype.getElementsByTagName=(_t.prototype={nodeType:X,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===re?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,ni(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 Pe(this,function(t){var n=[];return zt(t,function(s){s===t||s.nodeType!=X||"*"!==e&&s.tagName!=e||n.push(s)}),n})},getElementsByTagNameNS:function(e,t){return new Pe(this,function(n){var s=[];return zt(n,function(o){o===n||o.nodeType!==X||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||s.push(o)}),s})}}).getElementsByTagName,bt.prototype.getElementsByTagNameNS=_t.prototype.getElementsByTagNameNS,H(_t,L),kn.prototype.nodeType=Qe,H(kn,L),xt.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}},H(xt,L),ei.prototype={nodeName:"#text",nodeType:rn,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}},H(ei,xt),Jo.prototype={nodeName:"#comment",nodeType:pa},H(Jo,xt),Xo.prototype={nodeName:"#cdata-section",nodeType:ua},H(Xo,xt),Yo.prototype.nodeType=va,H(Yo,L),Ga.prototype.nodeType=zd,H(Ga,L),Xa.prototype.nodeType=Dd,H(Xa,L),qo.prototype.nodeType=ha,H(qo,L),Mn.prototype.nodeName="#document-fragment",Mn.prototype.nodeType=re,H(Mn,L),$o.prototype.nodeType=fa,H($o,L),er.prototype.serializeToString=function(e,t,n){return tr.call(e,t,n)},L.prototype.toString=tr;try{Object.defineProperty&&(Object.defineProperty(Pe.prototype,"length",{get:function(){return si(this),this.$$length}}),Object.defineProperty(L.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case X:case re: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 X:case re: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}}}),or=function(e,t,n){e["$$"+t]=n})}catch{}function ir(e){return!!e&&"object"==typeof e}function V(){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]):ir(e[n])&&ir(t[n])?e[n]=V(e[n],t[n]):e[n]=t[n]}),e},{})}function Vn(e){return e.reduce(function(e,t){return e.concat(t)},[])}function cr(e){if(!e.length)return[];for(var n=[],t=0;t<e.length;t++)n.push(e[t]);return n}function qt(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:tn(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 dr(e){return e&&"number"!=typeof e&&(e=parseInt(e,10)),isNaN(e)?null:e}function Bo(e){var t,s,o=e.type,i=void 0===o?"static":o,c=e.duration,a=e.timescale,l=void 0===a?1:a,d=e.sourceDuration,r=Yl[i](e),n=function(e,t){for(var s=[],n=e;n<t;n++)s.push(n);return s}(r.start,r.end).map((t=e,function(e,n){var s=t.duration,o=t.timescale,a=void 0===o?1:o,r=t.periodIndex,i=t.startNumber;return{number:(void 0===i?1:i)+e,duration:s/a,timeline:r,time:n*s}}));return"static"===i&&(s=n.length-1,n[s].duration=d-c/l*s),n}function hr(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(Xl);return c=qt({baseUrl:n,source:i.sourceURL,range:i.range}),t=qt({baseUrl:n,source:n,indexRange:l}),t.map=c,d?(s=Bo(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 mr(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,u=hr({baseUrl:n,timescale:m,timeline:c,periodIndex:c,duration:l.subsegmentDuration,sourceDuration:p,indexRange:s+"-"+(s+d-1)})[0];a&&(u.map=a),r.push(u),s+=d}return e.segments=r,e}function fr(e){return(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},{}),Object.keys(t).map(function(e){return t[e]})).map(function(e){return e.discontinuityStarts=e.segments.reduce(function(e,t,n){return t.discontinuity&&e.push(n),e},[]),e});var t}function Io(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+"-"+(a=(s=n.sidx.byterange).offset+s.length-1,s.offset+"-"+a),i=t[o]&&t[o].sidx;n.sidx&&i&&mr(n,i,n.sidx.resolvedUri)}return e}function fd(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 vr(e,t){for(var s,a,r,d,h,p,v,j,y,_,C,E,k,A,S,M,f=e.type,L=void 0===f?"static":f,g=e.minimumUpdatePeriod,N=void 0===g?0:g,b=e.media,T=void 0===b?"":b,D=e.sourceDuration,m=e.timescale,w=void 0===m?1:m,O=e.startNumber,x=void 0===O?1:O,z=e.periodIndex,i=[],n=-1,l=0;l<t.length;l++){var u=t[l],o=u.d,F=u.r||0,c=u.t||0;n<0&&(n=c),c&&n<c&&(n=c),r=void 0,F<0?(d=l+1,r=d===t.length?"dynamic"===L&&0<N&&0<T.indexOf("$Number$")?(p=n,y=o,C=(s=e).NOW,_=s.clientOffset,M=s.availabilityStartTime,A=void 0===(S=s.timescale)?1:S,k=void 0===(h=s.start)?0:h,j=(C+_)/1e3+(void 0===(E=s.minimumUpdatePeriod)?0:E)-(M+k),Math.ceil((j*A-p)/y)):(D*w-n)/o:(t[d].t-n)/o):r=F+1;for(v=x+i.length+r,a=x+i.length;a<v;)i.push({number:a,duration:o/w,time:n,timeline:z}),n+=o,a++}return i}function br(e,t){return e.replace(ql,(n=t,function(e,t,s,o){if("$$"===e)return"$";if(void 0===n[t])return e;var i=""+n[t];return"RepresentationID"===t?i:(o=s?parseInt(o,10):1)<=i.length?i:new Array(o-i.length+1).join("0")+i}));var n}function hd(e,t){var n,o,s={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,a=void 0===i?{sourceURL:"",range:""}:i,r=qt({baseUrl:e.baseUrl,source:br(a.sourceURL,s),range:a.range});return(o=t,(n=e).duration||o?n.duration?Bo(n):vr(n,o):[{number:n.startNumber||1,duration:n.sourceDuration,time:0,timeline:n.periodIndex}]).map(function(t){s.Number=t.number,s.Time=t.time;var n=br(e.media||"",s);return{uri:n,timeline:t.timeline,duration:t.duration,resolvedUri:tn(e.baseUrl||"",n),map:r,number:t.number}})}function ud(e,t){var s,o,n=e.duration,i=e.segmentUrls,a=void 0===i?[]:i;if(!n&&!t||n&&t)throw new Error(Gl);return o=a.map(function(t){return n=t,s=(i=e).baseUrl,o=i.initialization,r=qt({baseUrl:s,source:(a=void 0===o?{}:o).sourceURL,range:a.range}),(c=qt({baseUrl:s,source:n.media,range:n.mediaRange})).map=r,c;var n,s,o,i,a,r,c}),n&&(s=Bo(e)),t&&(s=vr(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 dd(e){if(i=e.attributes,n=e.segmentInfo,n.template?(o=hd,t=V(i,n.template)):n.base?(o=hr,t=V(i,n.base)):n.list&&(o=ud,t=V(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 cr(e.childNodes).filter(function(e){return e.tagName===t})}function Po(e){return e.textContent.trim()}function $e(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 D(e){return e&&e.attributes?cr(e.attributes).reduce(function(e,t){var n=Jr[t.name]||Jr.DEFAULT;return e[t.name]=n(t.value),e},{}):{}}function us(e,t){return t.length?Vn(e.map(function(e){return t.map(function(t){return tn(e,Po(t))})})):e}function No(e){var o,i=y(e,"SegmentTemplate")[0],n=y(e,"SegmentList")[0],d=n&&y(n,"SegmentURL").map(function(e){return V({tag:"SegmentURL"},D(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&&D(i);return t&&s?t.initialization=s&&D(s):t&&t.initialization&&(t.initialization={sourceURL:t.initialization}),o={template:t,timeline:c&&y(c,"S").map(function(e){return D(e)}),list:n&&V(D(n),{segmentUrls:d,initialization:D(s)}),base:a&&V(D(a),{initialization:D(s)})},Object.keys(o).forEach(function(e){o[e]||delete o[e]}),o}function cd(e,t){void 0===t&&(t={});var s=t,d=s.manifestUri,m=void 0===d?"":d,i=s.NOW,u=void 0===i?Date.now():i,a=s.clientOffset,h=void 0===a?0:a,r=y(e,"Period");if(!r.length)throw new Error(ed);var o,c,l=y(e,"Location"),n=D(e),f=us([m],y(e,"BaseURL"));return n.sourceDuration=n.mediaPresentationDuration||0,n.NOW=u,n.clientOffset=h,l.length&&(n.locations=l.map(Po)),{locations:n.locations,representationInfo:Vn(r.map((c=n,o=f,function(e,t){var s=us(o,y(e,"BaseURL")),i=D(e),n=parseInt(i.id,10),a=nu.isNaN(n)?t:n,r=V(c,{periodIndex:a}),l=y(e,"AdaptationSet"),d=No(e);return Vn(l.map(function(e,t,n){return function(s){var l=D(s),d=us(t,y(s,"BaseURL")),u={role:D(y(s,"Role")[0])},o=V(e,l,u),i=y(s,"ContentProtection").reduce(function(e,t){var s,o,a,i=D(t),n=Kl[i.schemeIdUri];return n&&(e[n]={attributes:i},s=y(t,"cenc:pssh")[0],s&&(o=Po(s),a=o&&ki(o),e[n].pssh=a)),e},{});Object.keys(i).length&&(o=V(o,{contentProtection:i}));var a,r,c,h=No(s),m=y(s,"Representation"),f=V(n,h);return Vn(m.map((a=o,r=d,c=f,function(e){var t=y(e,"BaseURL"),n=us(r,t),s=V(a,D(e)),o=No(e);return n.map(function(e){return{segmentInfo:V(c,o),attributes:V(s,{baseUrl:e})}})})))}}(r,s,d)))})))}}function Sr(e){if(""===e)throw new Error(Jl);var t,n,s=new td;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(Zl);return t}function id(e,t){void 0===t&&(t={});var n=cd(Sr(e),t);return function(e,t,n){if(void 0===n&&(n={}),!e.length)return{};var o,a,i=e[0].attributes,u=i.sourceDuration,r=i.type,h=void 0===r?"static":r,m=i.suggestedPresentationDelay,c=i.minimumUpdatePeriod,f=fr(e.filter(function(e){var t=e.attributes;return"video/mp4"===t.mimeType||"video/webm"===t.mimeType||"video"===t.contentType})).map(fd),l=fr(e.filter(function(e){var t=e.attributes;return"audio/mp4"===t.mimeType||"audio/webm"===t.mimeType||"audio"===t.contentType})),d=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:u,playlists:Io(f,n)};return 0<=c&&(s.minimumUpdatePeriod=1e3*c),t&&(s.locations=t),"dynamic"===h&&(s.suggestedPresentationDelay=m),l.length&&(s.mediaGroups.AUDIO.audio=function(e,t){void 0===t&&(t={});var n,s=l.reduce(function(e,s){var o,i,a,r,d,u,m,c=s.attributes.role&&s.attributes.role.value||"",h=s.attributes.lang||"",l="main";return h&&(m=c?" ("+c+")":"",l=s.attributes.lang+m),e[l]&&e[l].playlists[0].attributes.BANDWIDTH>s.attributes.bandwidth||(e[l]={language:h,autoselect:!0,default:"main"===c,playlists:Io([(i=s,o=i.attributes,a=i.segments,u=i.sidx,r={attributes:(d={NAME:o.id,BANDWIDTH:o.bandwidth,CODECS:o.codecs},d["PROGRAM-ID"]=1,d),uri:"",endList:"static"===(o.type||"static"),timeline:o.periodIndex,resolvedUri:"",targetDuration:o.duration,segments:a,mediaSequence:a.length?a[0].number:1},o.contentProtection&&(r.contentProtection=o.contentProtection),u&&(r.sidx=u),r)],t),uri:""},void 0===n&&"main"===c&&((n=s).default=!0)),e},{});return n||(s[Object.keys(s)[0]].default=!0),s}(0,n)),d.length&&(s.mediaGroups.SUBTITLES.subs=(void 0===(a=n)&&(a={}),d.reduce(function(e,t){var n=t.attributes.lang||"text";return e[n]||(e[n]={language:n,default:!1,autoselect:!1,playlists:Io([function(e){var s,o,t=e.attributes,n=e.segments;return void 0===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}}(t)],a),uri:""}),e},{}))),s}(n.representationInfo.map(dd),n.locations,t.sidxMapping)}function r(e){return e instanceof Uint8Array?e:(Array.isArray(e)||(t=e,ArrayBuffer.isView(t))||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));var t}function Tr(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 He(e,t){return void 0===t&&(t=0),(e=r(e)).length-t<10||!v(e,Wl,{offset:t})?t:He(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 Nr(e){return"string"==typeof e?Tr(e):e}function cs(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<So.length&&!(e&So[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]^=So[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)*Fo[o]},x(0)),d&&(o=Fo[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 Do(e){return"string"==typeof e?e.match(/.{1,2}/g).map(function(e){return Do(e)}):"number"==typeof e?function(e,t){i=(void 0===t?{}:t).le,r=void 0!==i&&i,("bigint"!=typeof e&&"number"!=typeof e||"number"==typeof e&&e!=e)&&(e=0);for(var o,i,a,r,c=(a=e=x(e),Math.ceil(a.toString(2).length/8)),n=new Uint8Array(new ArrayBuffer(c)),s=0;s<c;s++)o=r?s:Math.abs(s+1-n.length),n[o]=Number(e/Fo[s]&x(255)),e<0&&(n[o]=Math.abs(~n[o]),n[o]-=0===s?1:2);return n}(e):e}function Pr(e,t,n){if(n>=t.length)return t.length;var o,s=cs(t,n,!1);return v(e.bytes,s.bytes)?n:(o=cs(t,n+s.length),Pr(e,t,n+o.length+o.value+s.length))}function zo(e,t){if(c=t,t=Array.isArray(c)?c.map(function(e){return Do(e)}):[Do(c)],e=r(e),s=[],!t.length)return s;for(o=0;o<e.length;){var s,o,c,l,d,i=cs(e,o,!1),n=cs(e,o+i.length),a=o+i.length+n.length;127===n.value&&(n.value=Pr(i,e,a),n.value!==e.length&&(n.value-=a)),d=a+n.value>e.length?e.length:a+n.value,l=e.subarray(a,d),v(t[0],i.bytes)&&(1===t.length?s.push(l):s=s.concat(zo(l,t.slice(1)))),o+=i.length+n.length+l.length}return s}function od(e){for(n=[],t=1;t<e.length-2;)v(e.subarray(t,t+3),Hl)&&(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 Br(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),Vl)?i=4:v(e.subarray(o),Il)&&(i=3),i){if(l++,a)return od(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 sd=za,nd=er,To=A(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 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 o=this.options,i=new r,n=o.domBuilder||new s,d=o.errorHandler,c=o.locator,a=o.xmlns||{},l=/\/x?html?$/.test(t),u=l?eu.entityMap:{lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&n.setDocumentLocator(c),i.errorHandler=function(e,t,o){if(!e){if(n instanceof s)return n;e=n}var a={},r=e instanceof Function;function i(t){var n=e[t];!n&&r&&(n=2==e.length?function(n){e(t,n)}:e),a[t]=n&&function(e){n("[xmldom "+t+"] "+e+function(e){if(e)return` @`+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}(o))}||function(){}}return o=o||{},i("warning"),i("error"),i("fatalError"),a}(d,0,c),i.domBuilder=o.domBuilder||n,l&&(a[""]="http://www.w3.org/1999/xhtml"),a.xml=a.xml||"http://www.w3.org/XML/1998/namespace",e&&"string"==typeof e?i.parse(e,a,u):i.errorHandler.error("invalid doc source"),n.doc},s.prototype={startDocument:function(){this.doc=(new c).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 r=sa,c=t.DOMImplementation=sd;t.XMLSerializer=nd,t.DOMParser=i}),td=(To.DOMImplementation,To.XMLSerializer,To.DOMParser),ed="INVALID_NUMBER_OF_PERIOD",Jl="DASH_EMPTY_MANIFEST",Zl="DASH_INVALID_XML",Xl="NO_BASE_URL",Gl="SEGMENT_TIME_UNSPECIFIED",Yl={static:function(e){var s=e.duration,t=e.timescale,o=void 0===t?1:t,i=e.sourceDuration,n=dr(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=dr(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)}}},ql=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Jr={mediaPresentationDuration:function(e){return $e(e)},availabilityStartTime:function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(t=e)&&(t+="Z"),Date.parse(t)/1e3;var t},minimumUpdatePeriod:function(e){return $e(e)},suggestedPresentationDelay:function(e){return $e(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return $e(e)},start:function(e){return $e(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)?$e(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}},Kl={"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"},tc=mr,nc=Math.pow(2,32),x=pe.BigInt||Number,Fo=[x("0x1"),x("0x100"),x("0x10000"),x("0x1000000"),x("0x100000000"),x("0x10000000000"),x("0x1000000000000"),x("0x100000000000000"),x("0x10000000000000000")],Wl=r([73,68,51]),rs={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])},So=[128,64,32,16,8,4,2,1],Vl=r([0,0,0,1]),Il=r([0,0,1]),Hl=r([0,0,3]),U={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])},Ue={aac:function(e){return v(e,[255,16],{offset:He(e),mask:[255,22]})},mp3:function(e){return v(e,[255,2],{offset:He(e),mask:[255,6]})},webm:function(e){return v(zo(e,[rs.EBML,rs.DocType])[0],U.webm)},mkv:function(e){return v(zo(e,[rs.EBML,rs.DocType])[0],U.matroska)},mp4:function(e){return!Ue["3gp"](e)&&!Ue.mov(e)&&(v(e,U.mp4,{offset:4})||v(e,U.fmp4,{offset:4}))},mov:function(e){return v(e,U.mov,{offset:4})},"3gp":function(e){return v(e,U["3gp"],{offset:4})},ac3:function(e){var t=He(e);return v(e,U.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=He(e);return v(e,U.flac,{offset:t})},ogg:function(e){return v(e,U.ogg)},avi:function(e){return v(e,U.riff)&&v(e,U.avi,{offset:8})},wav:function(e){return v(e,U.riff)&&v(e,U.wav,{offset:8})},h264:function(e){return Br(e,"h264",7,3).length},h265:function(e){return Br(e,"h265",[32,33],3).length}},Co=Object.keys(Ue).filter(function(e){return"ts"!==e&&"h264"!==e&&"h265"!==e}).concat(["ts","h264","h265"]);function hs(e){e=r(e);for(var n,t=0;t<Co.length;t++)if(n=Co[t],vc[n](e))return n;return""}function pc(e){return 0<function e(t,n,s){if(void 0===s&&(s=!1),c=n,n=Array.isArray(c)?c.map(function(e){return Nr(e)}):[Nr(c)],t=r(t),i=[],!n.length)return i;for(o=0;o<t.length;){var o,i,a,c,l,d=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])>>>0,u=t.subarray(o+4,o+8);if(0==d)break;if(a=o+d,a>t.length){if(s)break;a=t.length}l=t.subarray(o+8,a),v(u,n[0])&&(1===n.length?i.push(l):i.push.apply(i,e(l,n.slice(1),s))),o=a}return i}(e,["moof"]).length}function ke(){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={}}}}Co.forEach(function(e){var t=Ue[e];Ue[e]=function(e){return t(r(e))}}),vc=Ue;function bi(e){var t=31&e[1];return(t<<=8)|e[2]}function qn(e){return!!(64&e[1])}function Un(e){var t=0;return 1<(48&e[3])>>>4&&(t+=e[4]+1),t}function Oo(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 wc(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 Oc(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}ke.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},ke.prototype.push=function(e){this.trigger("data",e)},ke.prototype.flush=function(e){this.trigger("done",e)},ke.prototype.partialFlush=function(e){this.trigger("partialdone",e)},ke.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},ke.prototype.reset=function(e){this.trigger("reset",e)},new ke;var Ll={parseType:function(e,t){var n=bi(e);return 0===n?"pat":n===t?"pmt":t?"pes":null},parsePat:function(e){var n=qn(e),t=4+Un(e);return n&&(t+=e[t]+1),(31&e[t+10])<<8|e[t+11]},parsePmt:function(e){var n,s,i,o={},a=qn(e),t=4+Un(e);if(a&&(t+=e[t]+1),1&e[t+5]){for(i=3+((15&e[t+1])<<8|e[t+2])-4,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:qn,parsePesType:function(e,t){switch(t[bi(e)]){case 27:return"video";case 15:return"audio";case 21:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!qn(e))return null;var n,s,t=4+Un(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+Un(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"===Oo(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"===Oo(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"===Oo(31&n[s+3])&&(o=!0),o}},Nl=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],Dl={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+=wc(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:wc,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 Nl[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){t=10,64&e[5]&&(t+=4,t+=Oc(e.subarray(10,14)));do{if((i=Oc(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=0;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)+(3&s[7])}}t+=10,t+=i}while(t<e.byteLength)return null}},Lt=(function(e){return 9e4*e},function(e,t){return e*t},function(e){return e/9e4},function(e,t){return e/t},9e4),st=function(e,t){var n=1;for(t<e&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e},h={};function zl(e,t,n){for(var o,a,c,l,i=0,s=z,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+=z,s+=z}for(i=(s=e.byteLength)-z,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-=z,s-=z}}function Tl(e,t,n){for(var s,r,l,d,u,m,f,p,o=0,i=z,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+=z,i+=z}for(o=(i=e.byteLength)-z,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-=z,i-=z}}h.ts=Ll,h.aac=Dl;var Tc,z=188,Fl=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=9e4/a,{audio:[{type:"audio",dts:n,pts:n},{type:"audio",dts:n+1024*r*c,pts:n+1024*r*c}]})}(e):function(e){var s,n={pid:null,table:null},t={};for(s in function(e,t){for(var s,o=0,n=z;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+=z,n+=z}}(e,n),n.table)if(n.table.hasOwnProperty(s))switch(n.table[s]){case 27:t.video=[],Tl(e,n,t),0===t.video.length&&delete t.video;break;case 15:t.audio=[],zl(e,n,t),0===t.audio.length&&delete t.audio}return t}(e))&&(n.audio||n.video)?(function(e,t){if(e.audio&&e.audio.length){var n,s,o=t;void 0!==o&&!isNaN(o)||(o=e.audio[0].dts),e.audio.forEach(function(e){e.dts=st(e.dts,o),e.pts=st(e.pts,o),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4})}e.video&&e.video.length&&(s=t,(void 0!==s&&!isNaN(s)||(s=e.video[0].dts),e.video.forEach(function(e){e.dts=st(e.dts,s),e.pts=st(e.pts,s),e.dtsTime=e.dts/9e4,e.ptsTime=e.pts/9e4}),e.firstKeyFrame)&&(n=e.firstKeyFrame,n.dts=st(n.dts,s),n.pts=st(n.pts,s),n.dtsTime=n.dts/9e4,n.ptsTime=n.pts/9e4))}(n,t),n):null},Nc=function(e){return e>>>0},Dt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},Sl=Nc,se=function e(t,n){var s,o,a,r,c,i=[];if(!n.length)return null;for(s=0;s<t.byteLength;)a=Sl(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]),r=Dt(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},On=Nc,Qt=function(e){return("00"+e.toString(16)).slice(-2)};function Bc(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 de(e){void 0===e&&(e="");var n=e.split(","),t=[];return n.forEach(function(e){var n;e=e.trim(),yd.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 $c(e){return void 0===e&&(e=""),me.audio.test(e.trim().toLowerCase())}function go(e){if(e&&"string"==typeof e){var n,o,t=e.toLowerCase().split(",").map(function(e){return Bc(e.trim())}),s="video";return 1===t.length&&$c(t[0])?s="audio":1===t.length&&(void 0===(o=t[0])&&(o=""),me.text.test(o.trim().toLowerCase()))&&(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 pn(e){return void 0===e&&(e=""),pe.MediaSource&&pe.MediaSource.isTypeSupported&&pe.MediaSource.isTypeSupported(go(e))||!1}function po(e){return void 0===e&&(e=""),e.toLowerCase().split(",").every(function(e){e=e.trim();for(var t=0;t<_r.length;t++)if(me["muxer"+_r[t]].test(e))return!0;return!1})}function fn(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 co(e,t){return e+"-"+t}function Xc(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 hu;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 un(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 Zc(e){var t=e.playlist,n=e.uri,s=e.id;t.id=s,n&&(t.uri=n),t.attributes=t.attributes||{}}function Jc(e,t){e.uri=t;for(var s,o,n=0;n<e.playlists.length;n++)e.playlists[n].uri||(s="placeholder-uri-"+n,e.playlists[n].uri=s);un(e,function(t,n,s,o){if(t.playlists&&t.playlists.length&&!t.playlists[0].uri){var i="placeholder-uri-"+n+"-"+s+"-"+o,a=co(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],Zc({playlist:t,id:co(n,t.uri)}),t.resolvedUri=ye(e.uri,t.uri),e.playlists[t.id]=t,(e.playlists[t.uri]=t).attributes.BANDWIDTH||md.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}(e),un(o=e,function(e){e.uri&&(e.resolvedUri=ye(o.uri,e.uri))})}function el(e,t){e.resolvedUri||(e.resolvedUri=ye(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=ye(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=ye(t,e.map.uri))}function tl(e,t){return e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence}function oo(e,t,n){void 0===n&&(n=tl);var o,a,s=As(e,{}),i=s.playlists[t.id];if(!i)return null;if(n(i,t))return null;o=As(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]=As(e[s],o[s-n]);return o}(i.segments,t.segments,t.mediaSequence-i.mediaSequence)),o.segments.forEach(function(e){el(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 sl(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 Ct(e,t){return ol(e,function(e,n){return e-.1<=t&&t<=n+.1})}function so(e,t){return ol(e,function(e){return t<=e-qe})}function rl(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 xe(e){for(var n=[],t=0;t<e.length;t++)n.push({start:e.start(t),end:e.end(t)});return n}function ll(e,t,n){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;var o,s=function(e){var o=0,i=t-e.mediaSequence,s=e.segments[i];if(s){if(void 0!==s.start)return{result:s.start,precise:!0};if(void 0!==s.end)return{result:s.end-s.duration,precise:!0}}for(;i--;){if(void 0!==(s=e.segments[i]).end)return{result:o+s.end,precise:!0};if(o+=s.duration,void 0!==s.start)return{result:o+s.start,precise:!0}}return{result:o,precise:!1}}(e);return s.precise?s.result:(o=function(e){for(var s,o=0,i=t-e.mediaSequence;i<e.segments.length;i++){if(void 0!==(s=e.segments[i]).start)return{result:s.start-o,precise:!0};if(o+=s.duration,void 0!==s.end)return{result:s.end-o,precise:!0}}return{result:-1,precise:!1}}(e),o.precise?o.result:s.result+n)}function dl(e,t,n){if(!e)return 0;if("number"!=typeof n&&(n=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return o.Infinity}return ll(e,t,n)}function St(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 hl(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 ml(e,t,n,s){if(!e||!e.segments)return null;if(e.endList)return dl(e);if(null===t)return null;t=t||0;var o=n?hl(e,s):e.segments.length;return ll(e,e.mediaSequence+o,t)}function fl(e){return e.excludeUntil&&e.excludeUntil>Date.now()}function no(e){return e.excludeUntil&&e.excludeUntil===1/0}function dn(e){var t=fl(e);return!e.disabled&&!t}function vl(e,t){return t.attributes&&t.attributes[e]}function Qs(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!!dn(e)&&(e.attributes.BANDWIDTH||0)<n}).length}function Xs(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 pl(){function t(n,s){n=yl({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?jd:e.Vhs.xhr)(n,function(e,t){return Xs(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 Gs(e){var t,n,s={};return e.byterange&&(s.Range=(t=e.byterange,n=t.offset+t.length-1,"bytes="+t.offset+"-"+n)),s}function wl(e,t){var n=e.toString(16);return"00".substring(0,2-n.length)+n+(t%2?" ":"")}function Ol(e){return 32<=e&&e<126?String.fromCharCode(e):"."}function nl(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 ln(e){var t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")}function Qc(e){return e.resolvedUri}function Gc(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(wl).join("")+" "+n.slice(16*t,16*t+16).map(Ol).join("")+` `;return s}function Ys(e,t){if(4===e.readyState)return t()}function Rc(e,t){if(!tl(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 $s(e){var t=e.byterange.offset+e.byterange.length-1;return e.uri+"-"+e.byterange.offset+"-"+t}function Dc(e,t){var n,s,o,i,r,a={};for(r in e)if(i=e[r].sidx,i){if(o=$s(i),!t[o])break;n=t[o].sidxInfo,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 Fc(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 Mc(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e}function Ec(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=Mc(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 Cc(e){return"var browserWorkerPolyFill = "+Mc.toString()+`; browserWorkerPolyFill(self); `+e}function xc(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)}function bc(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){var s,i,a;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)},void 0!==r&&(i.videoFrameDtsTime=r),void 0!==c&&(i.videoFramePtsTime=c),n(i)}(n,o,_),"trackinfo"===n.data.action&&y(n.data.trackInfo),"gopInfo"===n.data.action&&(o.gopInfo=n.data.gopInfo),"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,a=(s={transmuxedData:o,callback:p}).callback,(i=s.transmuxedData).buffer=[],a(i),Da(t))))},a&&t.postMessage({action:"setAudioAppendStart",appendStart:a}),Array.isArray(r)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:r}),void 0!==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 hc(e,t){e.postMessage({action:t}),Da(e)}function dc(e){e.forEach(function(e){e.abort()})}function Vs(e,t){return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:xs,xhr:t}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Os,xhr:t}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:Bt,xhr:t}:null}function Bl(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*Lt,n=Fl(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)),!function(e){e.transmuxer.currentTransmux?e.transmuxer.transmuxQueue.push(e):bc(e.transmuxer.currentTransmux=e)}({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&&void 0!==e.start&&(s(e.start),s=null),u&&void 0!==e.end&&u(e.end)},onVideoTimingInfo:function(e){o&&void 0!==e.start&&(o(e.start),o=null),d&&void 0!==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 Ps(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(pc(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=ad(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(void 0===t.container&&(t.container=hs(u)),"ts"!==t.container&&"aac"!==t.container)return d(t,{hasAudio:!1,hasVideo:!1}),void i(null,t,{});Bl({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 $l(t){var n,o,a,r,c,l,d,u,h,w,E,k,S,M,m=t.xhr,f=t.xhrOptions,F=t.decryptionWorker,s=t.segment,T=t.abortFn,z=t.progressFn,A=t.trackInfoFn,v=t.timingInfoFn,x=t.videoSegmentTimingInfoFn,b=t.audioSegmentTimingInfoFn,C=t.id3Fn,g=t.captionsFn,j=t.isEndOfTimeline,y=t.endedTimelineFn,_=t.dataFn,D=t.doneFn,O=t.handlePartialData,i=[],p=function(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,dc(r),t(e,p);if((f+=1)===r.length){if(p.endOfAllRequests=Date.now(),p.encryptedBytes)return v=(g={decryptionWorker:m,segment:p,trackInfoFn:s,timingInfoFn:o,videoSegmentTimingInfoFn:i,audioSegmentTimingInfoFn:a,id3Fn:n,captionsFn:c,isEndOfTimeline:l,endedTimelineFn:d,dataFn:u,doneFn:t}).segment,w=g.trackInfoFn,_=g.timingInfoFn,y=g.videoSegmentTimingInfoFn,O=g.audioSegmentTimingInfoFn,x=g.id3Fn,C=g.captionsFn,E=g.isEndOfTimeline,k=g.endedTimelineFn,A=g.dataFn,S=g.doneFn,(j=g.decryptionWorker).addEventListener("message",function e(t){if(t.data.source===v.requestId){j.removeEventListener("message",e);var n=t.data.decrypted;v.bytes=new Uint8Array(n.bytes,n.byteOffset,n.byteLength),Ps({segment:v,bytes:v.bytes,isPartial:!1,trackInfoFn:w,timingInfoFn:_,videoSegmentTimingInfoFn:y,audioSegmentTimingInfoFn:O,id3Fn:x,captionsFn:C,isEndOfTimeline:E,endedTimelineFn:k,dataFn:A,doneFn:S})}}),b=v.key.bytes.slice?v.key.bytes.slice():new Uint32Array(Array.prototype.slice.call(v.key.bytes)),void j.postMessage(nl({source:v.requestId,encrypted:v.encryptedBytes,key:b,iv:v.key.iv}),[v.encryptedBytes.buffer,b.buffer]);Ps({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})}}var g,v,b,j,y,_,w,O,x,C,E,k,A,S}}({activeXhrs:i,decryptionWorker:F,trackInfoFn:A,timingInfoFn:v,videoSegmentTimingInfoFn:x,audioSegmentTimingInfoFn:b,id3Fn:C,captionsFn:g,isEndOfTimeline:j,endedTimelineFn:y,dataFn:_,doneFn:D});return s.key&&!s.key.bytes&&(E=m(e.mergeOptions(f,{uri:s.key.resolvedUri,responseType:"arraybuffer"}),(r=s,d=p,function(e,t){var n,s=t.response,o=Vs(e,t);return o?d(o,r):16!==s.byteLength?d({status:t.status,message:"Invalid HLS key at URL: "+t.uri,code:Bt,xhr:t},r):(n=new DataView(s),r.key.bytes=new Uint32Array([n.getUint32(0),n.getUint32(4),n.getUint32(8),n.getUint32(12)]),d(null,r))})),i.push(E)),s.map&&!s.map.bytes&&(k=m(e.mergeOptions(f,{uri:s.map.resolvedUri,responseType:"arraybuffer",headers:Gs(s.map)}),(n=(S={segment:s,finishProcessingFn:p}).segment,a=S.finishProcessingFn,function(e,t){var s,i=t.response,o=Vs(e,t);return o?a(o,n):0===i.byteLength?a({status:t.status,message:"Empty HLS segment content at URL: "+t.uri,code:Bt,xhr:t},n):(n.map.bytes=new Uint8Array(t.response),s=hs(n.map.bytes),"mp4"!==s?a({status:t.status,message:"Found unsupported "+(s||"unknown")+" container for initialization segment at URL: "+t.uri,code:Bt,internal:!0,xhr:t},n):(rd(n.map.bytes).forEach(function(e){n.map.tracks=n.map.tracks||{},n.map.tracks[e.type]||"number"==typeof(n.map.tracks[e.type]=e).id&&e.timescale&&(n.map.timescales=n.map.timescales||{},n.map.timescales[e.id]=e.timescale)}),a(null,n)))})),i.push(k)),c=e.mergeOptions(f,{uri:s.resolvedUri,responseType:"arraybuffer",headers:Gs(s)}),O&&(c.responseType="text",c.beforeSend=function(e){e.overrideMimeType("text/plain; charset=x-user-defined")}),h=m(c,(u={segment:s,finishProcessingFn:p,responseType:c.responseType},o=u.segment,l=u.finishProcessingFn,M=u.responseType,function(e,t){var n,s,a=t.response,i=Vs(e,t);return i?l(i,o):(s="arraybuffer"!==M&&t.responseText?Fc(t.responseText.substring(o.lastReachedChar||0)):t.response,0===a.byteLength?l({status:t.status,message:"Empty HLS segment content at URL: "+t.uri,code:Bt,xhr:t},o):(o.stats={bandwidth:(n=t).bandwidth,bytesReceived:n.bytesReceived||0,roundTripTime:n.roundTripTime||0},o.key?o.encryptedBytes=new Uint8Array(s):o.bytes=new Uint8Array(s),l(null,o)))})),h.addEventListener("progress",function(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 f,g,v,b,p=t.target;if(!p.aborted)return m&&!n.key&&p.responseText&&8<=p.responseText.length&&(g=Fc(p.responseText.substring(n.lastReachedChar||0)),!n.lastReachedChar&&pc(new Uint8Array(g))||(n.lastReachedChar=p.responseText.length,Ps({segment:n,bytes:g,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,(b=(v=t).target,(f={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-b.requestTime||0}).bytesReceived=v.loaded,f.bandwidth=Math.floor(f.bytesReceived/f.roundTripTime*8*1e3),f)),!n.stats.firstBytesReceivedAt&&n.stats.bytesReceived&&(n.stats.firstBytesReceivedAt=Date.now()),s(t,n)}}({segment:s,progressFn:z,trackInfoFn:A,timingInfoFn:v,videoSegmentTimingInfoFn:x,audioSegmentTimingInfoFn:b,id3Fn:C,captionsFn:g,isEndOfTimeline:j,endedTimelineFn:y,dataFn:_,handlePartialData:O})),i.push(h),w={},i.forEach(function(e){var t,n,s;e.addEventListener("loadend",(t=(s={loadendState:w,abortFn:T}).loadendState,n=s.abortFn,function(e){e.target.aborted&&n&&!t.calledAbortFn&&(n(),t.calledAbortFn=!0)}))}),function(){return dc(i)}}function ic(e,t){var n=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&n.AUDIO&&e.mediaGroups.AUDIO[n.AUDIO]}function Ls(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(Bc(""+s+o))}),Object.keys(t).forEach(function(e){if(1<t[e].length)return Fd("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 ec(e){var t=0;return e.audio&&t++,e.video&&t++,t}function kt(e,t){var s,o=t.attributes||{},n=Ls(function(){var n=t.attributes||{};if(n.CODECS)return de(n.CODECS)}()||[]);return ic(e,t)&&!n.audio&&!function(e,t){if(!ic(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=Ls(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 de(n.playlists[0].attributes.CODECS);return null}(e,o.AUDIO)||[]),s.audio&&(n.audio=s.audio)),n}function Qr(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 on(e,t){if(!e)return"";var n=o.getComputedStyle(e);return n?n[t]:""}function Ht(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 Ts(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||o.Number.MAX_VALUE)}function Yr(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}}),Ht(r,function(e,t){return e.bandwidth-t.bandwidth}),a=(r=r.filter(function(e){return!P.isIncompatible(e.playlist)})).filter(function(e){return P.isEnabled(e.playlist)}),a.length||(a=r.filter(function(e){return!P.isDisabled(e.playlist)}));var a,r,c,l,u,h,m,f,p,g,v,y,_,j=a.filter(function(e){return e.bandwidth*O.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"),an("choosing "+Qr(h)+" using "+f+" with options",l),h.playlist):(an("could not choose a playlist with options",l),null)):(m=j.filter(function(e){return e.width&&e.height}),Ht(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"),an("choosing "+Qr(u)+" using "+c+" with options",l),u.playlist):(an("could not choose a playlist with options",l),null))}}function qr(){var e=this.useDevicePixelRatio&&o.devicePixelRatio||1;return Yr(this.playlists.master,this.systemBandwidth,parseInt(on(this.tech_.el(),"width"),10)*e,parseInt(on(this.tech_.el(),"height"),10)*e,this.limitRenditionByPlayerDimensions)}function Yt(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 Ur(e){return"number"==typeof e&&isFinite(e)}function $r(e){return e+"TimingInfo"}function Vr(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 Ir(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 Mr(e){var t=e.segmentDuration,n=e.maxDuration;return!!t&&Math.round(t)>n+qe}var T,Ot,Dr,zr,wn,M,Cr,xr,Nt,lr,ne,Wa,Va,i,l,we,Ce,Nd,ct,W,Ae,E,bn,ho,bl,al,Ye,m,qa,Oa,Ut,ja,pt,ta,Ei,ea,G,bs,ra,ys,ds,De,is,ss,ur,ns,Kr,Ms,ts,Xr,Zr,es,Rs,Jn,Hs,Is,Bs,lc,Zn,Ws,Us,Ks,Xn,Kn,Wn,jl,et,tt,Js,Te,to,In,Hn,Pn,Ln,Dn,ro,Tn,lo,uo,Fn,mo,fo,Kc,Mt,vo,Wr,Hr,Rr,kr,Ya,j,ht,Qo,ci,Rt,sn,Y,mi,sa,vc,ps,Yn,Vt,ad=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=On(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=On(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),1===n&&(t*=Math.pow(2,32),t+=On(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},rd=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=Dt(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=Dt(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"===Dt(s.subarray(4,8))&&11<s.length?(n.codec+=".",n.codec+=Qt(s[9]),n.codec+=Qt(s[10]),n.codec+=Qt(s[11])):n.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(n.codec)?(s=a.subarray(28),"esds"===Dt(s.subarray(4,8))&&20<s.length&&0!==s[19]?(n.codec+="."+Qt(s[19]),n.codec+="."+Qt(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=Tc(u)),t.push(n)}),t},me=(Tc=function(e){var t=0===e[0]?12:20;return On(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^/}),yd=["video","audio","text"],_r=["Video","Audio","Text"],yr="mp4a.40.2",ye=tn,md=e.log,As=e.mergeOptions,ut=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:ye(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}ce(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||Xc({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(),Zc({playlist:t,uri:c,id:n}),s=oo(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")},sl(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=fn(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=fn(e.handleManifestRedirects,e.src,n);var s=Xc({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,Jc(this.master,this.srcUri()),e.playlists.forEach(function(e){e.segments&&e.segments.forEach(function(t){el(t,e.resolvedUri)})}),this.trigger("loadedplaylist"),void(this.request||this.media(this.master.playlists[0]));var t,n,s,i=this.srcUri()||o.location.href;this.master=(s=co(0,n=i),(t={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:o.location.href,resolvedUri:o.location.href,playlists:[{uri:n,id:s,resolvedUri:n,attributes:{}}]}).playlists[s]=t.playlists[0],t.playlists[n]=t.playlists[0],t),this.haveMetadata({playlistObject:e,url:i,id:this.master.playlists[0].id}),this.trigger("loadedmetadata")},n}(e.EventTarget),qe=1/30,rr=e.createTimeRange,P={duration:dl,seekable:function(e,t,n){var o=t||0,s=ml(e,t,!0,n);return null===s?rr():rr(o,s)},safeLiveIndex:hl,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+qe))return{mediaIndex:o,startTime:s-St(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+qe)<0)return{mediaIndex:o,startTime:s+St(e,n,o)};return{mediaIndex:a-1,startTime:t}},isEnabled:dn,isDisabled:function(e){return e.disabled},isBlacklisted:fl,isIncompatible:no,playlistEnd:ml,isAes:function(e){for(var t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:vl,estimateSegmentRequestTime:function(e,t,n,s){return void 0===s&&(s=0),vl("BANDWIDTH",n)?(e*n.attributes.BANDWIDTH-8*s)/t:NaN},isLowestEnabledRendition:Qs},jd=e.xhr,yl=e.mergeOptions,pu=Object.freeze({__proto__:null,createTransferableMessage:nl,initSegmentId:ln,segmentKeyId:Qc,hexDump:Gc,tagDump:function(e){return Gc(e.bytes)},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}}),Qa=e.mergeOptions,Cs=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}ce(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&&$s(e.sidx);e.sidx&&i&&!this.masterPlaylistLoader_.sidxMapping_[i]?(a=fn(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=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)*nc+n.getUint32(t+4),s.firstOffset=n.getUint32(t+8)*nc+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}(r(o.response).subarray(8));return l[i].sidx=a,tc(e,a,e.sidx.resolvedUri),n(!0)}},this.request=function(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,Tr(a,!0)),i=i||He(s),s.length<10||i&&s.length<i+2?Ys(t,function(){return o(e,t,"",s)}):(n=hs(s),"ts"===n&&s.length<188?Ys(t,function(){return o(e,t,"",s)}):!n&&s.length<376?Ys(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,Xs(e,null,{statusCode:e.status},a)})}},function(e,t){return Xs(l,e,t,a)});return l}(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:Gs({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=fn(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=function(e){return function(){var n,s=y(Sr(e),"UTCTiming")[0];if(!s)return null;switch(n=D(s),n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.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":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.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("UNSUPPORTED_UTC_TIMING_SCHEME")}return n}()}(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:ye(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 t,s,o,i,e=(t={masterXml:this.masterPlaylistLoader_.masterXml_,srcUrl:this.masterPlaylistLoader_.srcUrl,clientOffset:this.masterPlaylistLoader_.clientOffset_,sidxMapping:this.masterPlaylistLoader_.sidxMapping_},Jc(i=id(t.masterXml,{manifestUri:o=t.srcUrl,clientOffset:t.clientOffset,sidxMapping:t.sidxMapping}),o),i),n=this.masterPlaylistLoader_.master;return n&&(e=function(e,t,n){for(var o,r,c,i=!0,s=Qa(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod}),a=0;a<t.playlists.length;a++)o=t.playlists[a],o.sidx&&(r=$s(o.sidx),n&&n[r]&&tc(o,n[r].sidx,o.sidx.resolvedUri)),c=oo(s,o,Rc),c&&(s=c,i=!1);return un(t,function(e,t,n,o){if(e.playlists&&e.playlists.length){var r=e.playlists[0].id,a=oo(s,e.playlists[0],Rc);a&&((s=a).mediaGroups[t][n][o].playlists[0]=s.playlists[r],i=!1)}}),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(i=!1),i?null:s}(n,e,this.masterPlaylistLoader_.sidxMapping_)),this.masterPlaylistLoader_.master=e||n,s=this.masterPlaylistLoader_.master.locations&&this.masterPlaylistLoader_.master.locations[0],s&&s!==this.masterPlaylistLoader_.srcUrl&&(this.masterPlaylistLoader_.srcUrl=s),(!n||e&&e.minimumUpdatePeriod!==n.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){var s,o,i;n&&(e.media_&&(e.media_=e.masterPlaylistLoader_.master.playlists[e.media_.id]),e.masterPlaylistLoader_.sidxMapping_=(o=e.masterPlaylistLoader_.master,i=e.masterPlaylistLoader_.sidxMapping_,s=Dc(o.playlists,i),un(o,function(e){if(e.playlists&&e.playlists.length){var a=e.playlists;s=Qa(s,Dc(a,i))}}),s),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()},sl(t.media(),Boolean(s))))}(),this.trigger("loadedplaylist")},n}(e.EventTarget),O={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},Cd=Ec(Cc(xc(function(){function m(){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={}}}}m.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},m.prototype.push=function(e){this.trigger("data",e)},m.prototype.flush=function(e){this.trigger("done",e)},m.prototype.partialFlush=function(e){this.trigger("partialdone",e)},m.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},m.prototype.reset=function(e){this.trigger("reset",e)},a=m,V=Math.pow(2,32)-1;function we(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 l(e){e=e||{},l.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")))}!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)]);W=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),We=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),Ue=new Uint8Array([0,0,0,1]),$e=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]),Ie=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]),He={video:$e,audio:Ie},Ne=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Re=new Uint8Array([0,0,0,0,0,0,0,0]),T=new Uint8Array([0,0,0,0,0,0,0,0]),De=T,ze=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Fe=T,Pe=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}();var e,W,Ue,We,$e,Ie,He,Pe,Re,Ne,a,V,K,_e,je,G,ve,ye,s,c,T,De,ze,Fe,r,b,N,Le,A,L,P,H,Be,Ve,M,I,B,$,U,Y,Xe,_,Ze,te,Se,ke,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},Tt=function(){return t(e.dinf,t(e.dref,Ne))},At=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,He[n])},it=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)},at=function(n){return t(e.mdia,it(n),tt(n.type),jt(n))},yt=function(n){return t(e.mfhd,new Uint8Array([0,0,0,0,(4278190080&n)>>24,(16711680&n)>>16,(65280&n)>>8,255&n]))},jt=function(n){return t(e.minf,"video"===n.type?t(e.vmhd,Pe):t(e.smhd,Re),Tt(),ot(n))},pt=function(n,s){for(var i=[],o=s.length;o--;)i[o]=et(s[o]);return t.apply(null,[e.moof,yt(n)].concat(i))},ht=function(n){for(var s=n.length,o=[];s--;)o[s]=ct(n[s]);return t.apply(null,[e.moov,lt(4294967295)].concat(o).concat(ut(n)))},ut=function(n){for(var s=n.length,o=[];s--;)o[s]=_t(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)},nt=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)},ot=function(n){return t(e.stbl,dt(n),t(e.stts,Fe),t(e.stsc,De),t(e.stsz,ze),t(e.stco,T))},dt=function(n){return t(e.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===n.type?wt(n):xt(n))},wt=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)},xt=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]),At(n))},rt=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)},et=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])),"audio"===n.type?(i=Ke(n,92),t(e.traf,a,r,i)):(c=nt(n),i=Ke(n,c.length+92),t(e.traf,a,r,i,c))},ct=function(n){return n.duration=n.duration||4294967295,t(e.trak,rt(n),at(n))},_t=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)},Oe=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]},Dt=function(n,s){var o,i,a,r,c,l;for(s+=20+16*(r=n.samples||[]).length,c=Oe(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)},Ct=function(n,s){var o,i,a,r,c,l;for(s+=20+8*(r=n.samples||[]).length,c=Oe(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)},Ke=function(e,t){return"audio"===e.type?Ct(e,t):Dt(e,t)},Ot=function(){return t(e.ftyp,W,Ue,W,We)},F=function(n){return t(e.mdat,n)},x=pt,J=function(e){var t,n=Ot(),s=ht(e);return(t=new Uint8Array(n.byteLength+s.byteLength)).set(n),t.set(s,n.byteLength),t},ge=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},pe=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},de=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},Pt=function(e,t){var n,s=[];return n=we(e,t||0),s.push(n),s},vt=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],oe=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],re=_e=function(e){return 9e4*e},o=(je=function(e,t){return e*t},G=function(e){return e/9e4}),le=(ve=function(e,t){return e/t},function(e,t){return _e(ve(e,t))}),v=function(e,t,n){return G(n?e:e-t)},ue=function(e,t,s,o){var i,r,c,l,u,m=0,d=0,a=0;if(t.length&&(u=le(e.baseMediaDecodeTime,e.samplerate),i=Math.ceil(9e4/(e.samplerate/1024)),s&&o&&(m=u-Math.max(s,o),a=(d=Math.floor(m/i))*i),!(d<1||45e3<a))){for(r=(r=function(){if(!K){var t={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:[oe,n(268),[3,127,248],n(268),[6,255,240],n(268),[13,255,224],n(268),[27,253,128],n(259),[56]],11025:[oe,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:[oe,n(268),[3,121,16],n(47),[7]]},e=t;K=Object.keys(e).reduce(function(t,n){return t[n]=new Uint8Array(e[n].reduce(function(e,t){return e.concat(t)},[])),t},{})}return K}()[e.samplerate])||t[0].data,c=0;c<d;c++)l=t[0],t.splice(0,0,{data:r,dts:l.dts-i,pts:l.pts-i});return e.baseMediaDecodeTime-=Math.floor(function(e,t){return je(G(e),t)}(a,e.samplerate)),a}},he=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)}))},me=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},fe=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},d=function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},C=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/9e4,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))};function be(e){return 32<=e&&e<=127||160<=e&&e<=255}function u(e){this.windowNum=e,this.reset()}(l.prototype=new a).push=function(e){var t,n,s;if("sei_rbsp"===e.nalUnitType&&(t=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}(e.escapedRBSP)).payload&&4===t.payloadType&&(n=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)}(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=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}(e.pts,n),this.captionPackets_=this.captionPackets_.concat(s),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},l.prototype.flushCCStreams=function(e){this.ccStreams_.forEach(function(t){return"flush"===e?t.flush():t.partialFlush()},this)},l.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)},l.prototype.flush=function(){return this.flushStream("flush")},l.prototype.partialFlush=function(){return this.flushStream("partialFlush")},l.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach(function(e){e.reset()})},l.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)},l.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},l.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},l.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},l.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)},ye={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};function q(e){this.serviceNum=e,this.text="",this.currentWindow=new u(-1),this.windows=[]}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)}},q.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)},q.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)}};function E(e){return null===e?"":(e=zt[e]||e,String.fromCharCode(e))}function f(){for(var e=[],t=15;t--;)e.push("");return 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++)be(o=a[s])?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){return be(this.current708Packet.data[++e])&&(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 q(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 s,i,a=(s=(n?4096:0)|this.current708Packet.data[e],i=ye[s]||s,4096&s&&s===i?"":String.fromCharCode(i)),o=t.currentWindow;return o.pendingNewLine&&!o.isEmpty()&&o.newLine(this.getPts(e)),o.pendingNewLine=!1,o.addText(a),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)};var zt={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},Mt=[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_=f();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=f();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=f()),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(s,n))o=E((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=E((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=Mt.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=E(s),o+=E(n),this[this.mode_](e.pts,o),this.column_+=o.length)}else this.lastControlCode_=null}};function Ae(e,t){var n=1;for(t<e&&(n=-1);4294967296<Math.abs(t-e);)e+=8589934592*n;return e}function R(e){var t,n;R.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=Ae(e.dts,t),e.pts=Ae(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")}}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_=f(),this.nonDisplayed_=f(),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_=f(),this.displayed_=f()),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},b={CaptionStream:l,Cea608Stream:i,Cea708Stream:s},c={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21};function Te(e,t,n){var s,o="";for(s=t;s<n;s++)o+="%"+("00"+e[s].toString(16)).slice(-2);return o}function k(e,t,n){return decodeURIComponent(Te(e,t,n))}function z(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]}R.prototype=new a,Le=R,L={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=k(e.data,1,t),e.value=k(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=k(e.data,1,t),e.url=k(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(Te(n,0,t)));break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},(N=function(e){var s,o={debug:!!e&&!!e.debug,descriptor:e&&e.descriptor},n=0,t=[],i=0;if(N.prototype.init.call(this),this.dispatchType=c.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=z(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+=z(s.data.subarray(10,14)),n-=z(s.data.subarray(16,20)));do{if((d=z(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,L[r.id]&&(L[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,Be=N,Ve=Le,(P=function(){var t=new Uint8Array(188),e=0;P.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,(A=function(){var e,t,n,s;A.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===c.H264_STREAM_TYPE&&null===e.programMapTable.video?e.programMapTable.video=i:o===c.ADTS_STREAM_TYPE&&null===e.programMapTable.audio?e.programMapTable.audio=i:o===c.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=c.H264_STREAM_TYPE:n.pid===this.programMapTable.audio?n.streamType=c.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,A.STREAM_TYPES={h264:27,adts:15},(H=function(){function e(e,t,n){var s,i,c,l,d,u,h=new Uint8Array(e.size),a={type:t},r=0,m=0;if(e.data.length&&!(e.size<9)){for(a.trackId=e.data[0].pid,r=0;r<e.data.length;r++)l=e.data[r],h.set(l.data,m),m+=l.data.byteLength;i=a,u=(s=h)[0]<<16|s[1]<<8|s[2],i.data=new Uint8Array,1==u&&(i.packetLength=6+(s[4]<<8|s[5]),i.dataAlignmentIndicator=0!=(4&s[6]),192&(d=s[7])&&(i.pts=(14&s[9])<<27|(255&s[10])<<20|(254&s[11])<<12|(255&s[12])<<5|(254&s[13])>>>3,i.pts*=4,i.pts+=(6&s[13])>>>1,i.dts=i.pts,64&d&&(i.dts=(14&s[14])<<27|(255&s[15])<<20|(254&s[16])<<12|(255&s[17])<<5|(254&s[18])>>>3,i.dts*=4,i.dts+=(6&s[18])>>>1)),i.data=s.subarray(9+s[8])),c="video"===t||a.packetLength<=e.size,(n||c)&&(e.size=0,e.data.length=0),c&&o.trigger("data",a)}}var t,o=this,n={data:[],size:0},s={data:[],size:0},i={data:[],size:0};H.prototype.init.call(this),this.push=function(a){({pat:function(){},pes:function(){var t,o;switch(a.streamType){case c.H264_STREAM_TYPE:t=n,o="video";break;case c.ADTS_STREAM_TYPE:t=s,o="audio";break;case c.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,I={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:P,TransportParseStream:A,ElementaryStream:H,TimestampRolloverStream:Ve,CaptionStream:b.CaptionStream,Cea608Stream:b.Cea608Stream,Cea708Stream:b.Cea708Stream,MetadataStream:Be};for(B in c)c.hasOwnProperty(B)&&(I[B]=c[B]);r=I,U=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],($=function(e){var t,n=0;$.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=9e4*(d=1024*(1+(3&t[o+6])))/U[(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:U[(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,_=$,Ze=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()};function ie(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}(M=function(){var e,t,n=0;M.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,Xe={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},(Y=function(){var t,n,s,o,i,a,r,e=new M;Y.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 Ze(e)).readUnsignedByte(),a=t.readUnsignedByte(),f=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),Xe[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;var X,Me={H264Stream:Y,NalByteStream:M},Je=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+=ie(t,n))}(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},st=ie;function Qe(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 D(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}}(X=function(){var e=new Uint8Array,t=0;X.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(n){var i,a,r,c,l,d,u,h,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+(void 0,u=(224&(a=e)[(r=s)+5])>>5,h=a[r+4]<<3,o=6144&a[r+3]|h|u)>e.length)break;d={type:"audio",data:e.subarray(s,s+o),pts:t,dts:t},this.trigger("data",d),s+=o}else{if(e.length-s<10)break;if(s+(o=st(e,s))>e.length)break;l={type:"timed-metadata",data:e.subarray(s,s+o)},this.trigger("data",l),s+=o}c=e.length-s,e=0<c?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;var p,j,S,Q,Ge=X,w=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],O=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],mt=Me.H264Stream,ft=Je;function Z(e,t){var n=[],i=0,a=0,r=0,c=1/0,s=null,o=null;t=t||{},Z.prototype.init.call(this),this.push=function(t){g(e,t),e&&w.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=he(n,e,a)).length&&(e.baseMediaDecodeTime=C(e,t.keepOriginalTimestamps),ue(e,l,r,c),e.samples=me(l),h=F(fe(l)),n=[],u=x(i,[e]),i++,e.initSegment=J([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*bt/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")}}(j=function(e,t){var n=[],s=0,o=0,i=0,a=1/0;t=t||{},j.prototype.init.call(this),this.push=function(t){g(e,t),e&&w.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=he(n,e,o),e.baseMediaDecodeTime=C(e,t.keepOriginalTimestamps),f=ue(e,r,i,a),e.samples=me(r),h=F(fe(r)),n=[],c=x(s,[e]),l=new Uint8Array(c.byteLength+h.byteLength),s++,l.set(c),l.set(h,c.byteLength),d(e),m=Math.ceil(9216e4/e.samplerate),r.length&&(u=r.length*m,this.trigger("segmentTimingInfo",D(le(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,(S=function(e,t){var o,i,a=0,n=[],s=[];t=t||{},S.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],O.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=ge(n),(o=pe(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=de(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=function(e,t){var n,s,o,i,a=t||0,r=[];for(n=0;n<e.length;n++)for(o=e[n],s=0;s<o.length;s++)a+=(i=we(o[s],a)).size,r.push(i);return r}(o),u=F(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}(o)),e.baseMediaDecodeTime=C(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",D(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=x(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&&Qe(e.pps[0],i.pps[0])&&e.sps&&Qe(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,void 0!==(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,O.forEach(function(e){n.info[e]=this.videoTrack[e]},this)):this.audioTrack&&(i=this.audioTrack.timelineStartInfo.pts,w.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=J(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=v(s.startPts,i,this.keepOriginalTimestamps),s.endTime=v(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=v(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},(Q=function(e){var n,s,t=this,o=!0;Q.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 Ge,o.audioTimestampRolloverStream=new r.TimestampRolloverStream("audio"),o.timedMetadataTimestampRolloverStream=new r.TimestampRolloverStream("timed-metadata"),o.adtsStream=new _,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 j(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 _,o.h264Stream=new mt,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 S(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 j(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=ft(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;var gt={Transmuxer:Q,VideoSegmentStream:S,AudioSegmentStream:j,AUDIO_PROPERTIES:w,VIDEO_PROPERTIES:O,generateSegmentTimingInfo:D},Ye={Adts:_,h264:Me},bt=9e4;function ee(e,t){var o,a,c,l=0,n=[],s=[],i=null,r=null,u=!0;t=t||{},ee.prototype.init.call(this),this.push=function(t){g(e,t),void 0===e.timelineStartInfo.dts&&(e.timelineStartInfo.dts=t.dts),"seq_parameter_set_rbsp"!==t.nalUnitType||a||(a=t.config,e.sps=[t.data],O.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=ge(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=pe(c))[0][0].keyFrame){if(!(o=de(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=Pt(h),v=F(vt(h)),d(e),g(e,h),e.baseMediaDecodeTime=C(e,t.keepOriginalTimestamps),f=x(l,[e]),l++,e.initSegment=J([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")}}Z.prototype=new a,te=Z;function qe(e){return e.prototype=new a,e.prototype.init.call(e),e}function ae(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 ne(e){var t=null,n=!0;e=e||{},ne.prototype.init.call(this),e.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.push=function(s){if(n){var o,i,a,c,l=ke(s);!l||t&&"aac"===t.type?l||t&&"ts"===t.type||(a=e,(o={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 Ye.Adts,h264:new Ye.h264.H264Stream,captionStream:new r.CaptionStream(a),metadataStream:new r.MetadataStream}).headOfPipeline=o.packet,o.packet.pipe(o.parse).pipe(o.elementary).pipe(o.timestampRollover),o.timestampRollover.pipe(o.h264),o.h264.pipe(o.captionStream),o.timestampRollover.pipe(o.metadataStream),o.timestampRollover.pipe(o.adts),o.elementary.on("data",function(e){if("metadata"===e.type){for(var t=0;t<e.tracks.length;t++)o.tracks[e.tracks[t].type]||(o.tracks[e.tracks[t].type]=e.tracks[t],o.tracks[e.tracks[t].type].timelineStartInfo.baseMediaDecodeTime=a.baseMediaDecodeTime);o.tracks.video&&!o.videoSegmentStream&&(o.videoSegmentStream=new Se(o.tracks.video,a),o.videoSegmentStream.on("timelineStartInfo",function(e){o.tracks.audio&&!a.keepOriginalTimestamps&&o.audioSegmentStream.setEarliestDts(e.dts-a.baseMediaDecodeTime)}),o.videoSegmentStream.on("timingInfo",o.trigger.bind(o,"videoTimingInfo")),o.videoSegmentStream.on("data",function(e){o.trigger("data",{type:"video",data:e})}),o.videoSegmentStream.on("done",o.trigger.bind(o,"done")),o.videoSegmentStream.on("partialdone",o.trigger.bind(o,"partialdone")),o.videoSegmentStream.on("endedtimeline",o.trigger.bind(o,"endedtimeline")),o.h264.pipe(o.videoSegmentStream)),o.tracks.audio&&!o.audioSegmentStream&&(o.audioSegmentStream=new te(o.tracks.audio,a),o.audioSegmentStream.on("data",function(e){o.trigger("data",{type:"audio",data:e})}),o.audioSegmentStream.on("done",o.trigger.bind(o,"done")),o.audioSegmentStream.on("partialdone",o.trigger.bind(o,"partialdone")),o.audioSegmentStream.on("endedtimeline",o.trigger.bind(o,"endedtimeline")),o.audioSegmentStream.on("timingInfo",o.trigger.bind(o,"audioTimingInfo")),o.adts.pipe(o.audioSegmentStream)),o.trigger("trackinfo",{hasAudio:!!o.tracks.audio,hasVideo:!!o.tracks.video})}}),o.captionStream.on("data",function(e){var t=o.tracks.video&&o.tracks.video.timelineStartInfo.pts||0;e.startTime=v(e.startPts,t,a.keepOriginalTimestamps),e.endTime=v(e.endPts,t,a.keepOriginalTimestamps),o.trigger("caption",e)}),(o=qe(o)).metadataStream.on("data",o.trigger.bind(o,"id3Frame")),ae(t=o,this)):(c=e,(i={type:"aac",tracks:{audio:null},metadataStream:new r.MetadataStream,aacStream:new Ge,audioRollover:new r.TimestampRolloverStream("audio"),timedMetadataRollover:new r.TimestampRolloverStream("timed-metadata"),adtsStream:new _(!0)}).headOfPipeline=i.aacStream,i.aacStream.pipe(i.audioRollover).pipe(i.adtsStream),i.aacStream.pipe(i.timedMetadataRollover).pipe(i.metadataStream),i.metadataStream.on("timestamp",function(e){i.aacStream.setTimestamp(e.timeStamp)}),i.aacStream.on("data",function(e){"timed-metadata"!==e.type&&"audio"!==e.type||i.audioSegmentStream||(i.tracks.audio=i.tracks.audio||{timelineStartInfo:{baseMediaDecodeTime:c.baseMediaDecodeTime},codec:"adts",type:"audio"},i.audioSegmentStream=new te(i.tracks.audio,c),i.audioSegmentStream.on("data",function(e){i.trigger("data",{type:"audio",data:e})}),i.audioSegmentStream.on("partialdone",i.trigger.bind(i,"partialdone")),i.audioSegmentStream.on("done",i.trigger.bind(i,"done")),i.audioSegmentStream.on("endedtimeline",i.trigger.bind(i,"endedtimeline")),i.audioSegmentStream.on("timingInfo",i.trigger.bind(i,"audioTimingInfo")),i.adtsStream.pipe(i.audioSegmentStream),i.trigger("trackinfo",{hasAudio:!!i.tracks.audio,hasVideo:!!i.tracks.video}))}),(i=qe(i)).metadataStream.on("data",i.trigger.bind(i,"id3Frame")),ae(t=i,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(){}}ee.prototype=new a,Se=ee,ke=Je;function Et(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 kt(e,t){var o=y(e,["moof","traf"]),i=y(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 o,i,r,c,l,d,u,m,g=e.mdat,a=e.traf,h=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}(y(a,["tfhd"])[0]),s=h.trackId,f=y(a,["tfdt"]),v=0<f.length?function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4)),baseMediaDecodeTime:Ce(e[4]<<24|e[5]<<16|e[6]<<8|e[7])};return 1===t.version&&(t.baseMediaDecodeTime*=Math.pow(2,32),t.baseMediaDecodeTime+=Ce(e[8]<<24|e[9]<<16|e[10]<<8|e[11])),t}(f[0]).baseMediaDecodeTime:0,p=y(a,["trun"]);t===s&&0<p.length&&(u=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=Et(s,t),o={nalUnitType:"sei_rbsp",size:i,data:c,escapedRBSP:Nt(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}(g,(m=p,o=v,c=(r=h).defaultSampleDuration||0,l=r.defaultSampleSize||0,d=r.trackId,i=[],m.forEach(function(e){var t=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:xe(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=xe(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}(e).samples;t.forEach(function(e){void 0===e.duration&&(e.duration=c),void 0===e.size&&(e.size=l),e.trackId=d,e.dts=o,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),e.pts=o+e.compositionTimeOffset,o+=e.duration}),i=i.concat(t)}),i),s),n[s]||(n[s]=[]),n[s]=n[s].concat(u))}),n}function se(e){return"AudioSegmentStream"===e?"audio":"VideoSegmentStream"===e?"video":""}ne.prototype=new a;var St=ne,Ee=function(e){return e>>>0},Ft=Ee,y=function e(t,n){var s,o,i,a,c,l,d,r=[];if(!n.length)return null;for(s=0;s<t.byteLength;)c=Ft(t[s]<<24|t[s+1]<<16|t[s+2]<<8|t[s+3]),o=t.subarray(s+4,s+8),i=void 0,i="",i+=String.fromCharCode(o[0]),i+=String.fromCharCode(o[1]),l=(i+=String.fromCharCode(o[2]))+String.fromCharCode(o[3]),a=1<c?s+c:t.byteLength,l===n[0]&&(1===n.length?r.push(t.subarray(s+8,a)):(d=e(t.subarray(s+8,a),n.slice(1))).length&&(r=r.concat(d))),s=a;return r},Ce=Ee,xe=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]}},Nt=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},Lt=b.CaptionStream,Rt=function(){var e,t,n,s,o,i,a=!1;this.isInitialized=function(){return a},this.init=function(e){s=new Lt,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,l,d=o.shift();this.parse(d,i,a)}return null!==(l=t,r=null===(c=e)?null:{seiNals:kt(s,c)[c],timescale:l})&&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(){var e,t,n,s;this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=this.options.handlePartialData?new St(this.options):new gt.Transmuxer(this.options),this.options.handlePartialData?(t=this.self,(s=this.transmuxer).on("data",function(e){var s={data:e.data.track.initSegment.buffer,byteOffset:e.data.track.initSegment.byteOffset,byteLength:e.data.track.initSegment.byteLength},n={boxes:{data:e.data.boxes.buffer,byteOffset:e.data.boxes.byteOffset,byteLength:e.data.boxes.byteLength},initSegment:s,type:e.type,sequence:e.data.sequence};void 0!==e.data.videoFrameDts&&(n.videoFrameDtsTime=o(e.data.videoFrameDts)),void 0!==e.data.videoFramePts&&(n.videoFramePtsTime=o(e.data.videoFramePts)),t.postMessage({action:"data",segment:n},[n.boxes.data,n.initSegment.data])}),s.on("id3Frame",function(e){t.postMessage({action:"id3Frame",id3Frame:e})}),s.on("caption",function(e){t.postMessage({action:"caption",caption:e})}),s.on("done",function(e){t.postMessage({action:"done",type:se(e)})}),s.on("partialdone",function(e){t.postMessage({action:"partialdone",type:se(e)})}),s.on("endedsegment",function(e){t.postMessage({action:"endedSegment",type:se(e)})}),s.on("trackinfo",function(e){t.postMessage({action:"trackinfo",trackInfo:e})}),s.on("audioTimingInfo",function(e){if(null!==e.start){var n={start:o(e.start)};e.end&&(n.end=o(e.end)),t.postMessage({action:"audioTimingInfo",audioTimingInfo:n})}else t.postMessage({action:"audioTimingInfo",audioTimingInfo:e})}),s.on("videoTimingInfo",function(e){var n={start:o(e.start)};e.end&&(n.end=o(e.end)),t.postMessage({action:"videoTimingInfo",videoTimingInfo:n})})):(e=this.self,(n=this.transmuxer).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])}),n.on("done",function(){e.postMessage({action:"done"})}),n.on("gopInfo",function(t){e.postMessage({action:"gopInfo",gopInfo:t})}),n.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})}),n.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})}),n.on("id3Frame",function(t){e.postMessage({action:"id3Frame",id3Frame:t})}),n.on("caption",function(t){e.postMessage({action:"caption",caption:t})}),n.on("trackinfo",function(t){e.postMessage({action:"trackinfo",trackInfo:t})}),n.on("audioTimingInfo",function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:o(t.start),end:o(t.end)}})}),n.on("videoTimingInfo",function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:o(t.start),end:o(t.end)}})}))},e.pushMp4Captions=function(e){this.captionParser||(this.captionParser=new Rt,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(re(t)))},e.setAudioAppendStart=function(e){this.transmuxer.setAudioAppendStart(Math.ceil(re(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))}}))),Da=function(e){e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():bc(e.currentTransmux))},Sa=function(e){!function(e,t){if(!t.currentTransmux)return t.currentTransmux=e,hc(t,e);t.transmuxQueue.push(hc.bind(null,t,e))}("reset",e)},Bt=2,xs=-101,Os=-102,Fd=J("CodecUtils"),an=J("PlaylistSelector"),ws=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}ce(s,t);var n=s.prototype;return n.createTransmuxer_=function(){return function(e){var n,t=new Cd;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}({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 void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_},n.endOfStream=function(){this.ended_=!0,this.transmuxer_&&Sa(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=ln(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=Qc(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_&&Sa(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)*Lt),c=Math.ceil((n-s)*Lt),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_)Yt(e,t,this.inbandTextTracks_[i]);Yt(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=Vr({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=P.getMediaInfoForTime(t,c,i.segmentIndex,i.time),a=m.mediaIndex,l=m.startTime):(f=P.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(t==null||!e.length)return[];var s,o=Math.ceil((t-n+3)*Lt);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,o,i,d,u,a=this.currentTime_(),r=e.bandwidth,c=this.pendingSegment_.duration,l=P.estimateSegmentRequestTime(c,r,this.playlist_,e.bytesReceived),n=(s=this.buffered_(),u=a,void 0===(i=this.vhs_.tech_.playbackRate())&&(i=1),((s.length?s.end(s.length-1):0)-u)/i-1);l<=n||(t=function(e){var t,n,i=e.currentTime,a=e.bandwidth,r=e.duration,c=e.segmentDuration,l=e.timeUntilRebuffer,d=e.currentTimeline,u=e.syncController,o=e.master.playlists.filter(function(e){return!P.isIncompatible(e)}),s=o.filter(P.isEnabled);return s.length||(s=o.filter(function(e){return!P.isDisabled(e)})),t=s.filter(P.hasAttribute.bind(null,"BANDWIDTH")).map(function(e){var t=u.getSyncPoint(e,r,d,i)?1:2;return{playlist:e,rebufferingImpact:P.estimateSegmentRequestTime(c,a,e)*t-l}}),n=t.filter(function(e){return e.rebufferingImpact<=0}),Ht(n,function(e,t){return Ts(t.playlist,e.playlist)}),n.length?n[0]:(Ht(t,function(e,t){return e.rebufferingImpact-t.rebufferingImpact}),t[0]||null)}({master:this.vhs_.playlists.master,currentTime:a,bandwidth:r,duration:this.duration_(),segmentDuration:c,timeUntilRebuffer:n,currentTimeline:this.currentTimeline_,syncController:this.syncController_}),t&&(d=l-n-t.rebufferingImpact,o=.5,n<=qe&&(o=1),!t.playlist||t.playlist.uri===this.playlist_.uri||d<o||(this.bandwidth=t.playlist.attributes.BANDWIDTH*O.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=$r(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),Yt(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(t,n,s){if(this.earlyAbortWhenNeeded_(t.stats),!this.checkForAbort_(t.requestId))if(this.pendingSegment_.hasAppendedData_){var a=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),i=this.inbandTextTracks_,r=s,c=this.vhs_.tech_;i.metadataTrack_||(i.metadataTrack_=c.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,i.metadataTrack_.inBandMetadataTrackDispatchType=r),function(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,i=new l(s,s,t.value||t.url||t.data||"");i.frame=t,i.value=t,o=i,Object.defineProperties(o.frame,{id:{get:function(){return e.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),o.value.key}},value:{get:function(){return e.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),o.value.data}},privateData:{get:function(){return e.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),o.value.data}}}),n.addCue(i)})}),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})})}}({inbandTextTracks:this.inbandTextTracks_,metadataArray:n,timestampOffset:a,videoDuration:this.duration_()})}else this.metadataQueue_.id3.push(this.handleId3_.bind(this,t,n,s))},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_&&Ir({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!Ir({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[$r(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=ln(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: "+xe(s).join(", ")),1<i.length&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+xe(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: "+xe(s).join(", ")+", video buffer: "+xe(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 n,s,o,a,r,c=e.segmentInfo,l=e.type,i=e.initSegment,d=e.data,t=e.bytes;t||(a=[d],r=d.byteLength,i&&(a.unshift(i),r+=i.byteLength),o=0,(n={bytes:r,segments:a}).bytes&&(s=new Uint8Array(n.bytes),n.segments.forEach(function(e){s.set(e,o),o+=e.byteLength})),t=s),this.sourceUpdater_.appendBuffer({segmentInfo:c,type:l,bytes:t},this.handleAppendError_.bind(this,{segmentInfo:c,type:l,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=Vr({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=$l({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-O.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===Os)return;return this.pause(),e.code===xs?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 void 0!==n?n:r?(t=i.segments[s-1],0!==s&&t&&void 0!==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,n,s,o=(s=this.loaderType_,n=this.currentMediaInfo_,t=e,"main"===s&&n&&t?t.hasAudio||t.hasVideo?n.hasVideo&&!t.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.":!n.hasVideo&&t.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);return!!o&&(this.error({message:o,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,o,i,a,r,c,l,d,u,h,m,f,t=this.pendingSegment_;this.updateTimingInfoEnd_(t),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:t,shouldSaveTimelineMapping:"main"===this.loaderType_}),this.logger_((i=(o=t).segment,f=i.start,m=i.end,s=o.playlist,r=s.mediaSequence,l=s.id,c=s.segments,h=void 0===c?[]:c,d=o.mediaIndex,u=o.timeline,["appending ["+d+"] of ["+r+", "+(r+h.length)+"] from playlist ["+l+"]","["+f+" => "+m+"] in timeline ["+u+"]"].join(" "))),n=function(e,t){if("hls"!==t)return null;if(o=(n=e.audioTimingInfo,s=e.videoTimingInfo,a=n&&"number"==typeof n.start&&"number"==typeof n.end?n.end-n.start:0,r=s&&"number"==typeof s.start&&"number"==typeof s.end?s.end-s.start:0,Math.max(a,r)),!o)return null;var n,s,o,a,r,i=e.playlist.targetDuration,c=Mr({segmentDuration:o,maxDuration:2*i}),l=Mr({segmentDuration:o,maxDuration:i}),d="Segment with index "+e.mediaIndex+" from playlist "+e.playlist.id+" has a duration of "+o+" when the reported duration is "+e.duration+" and the target duration is "+i+". 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 c||l?{severity:c?"warn":"info",message:d}:null}(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"),a=t.segment,a.end&&this.currentTime_()-a.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(Ur(n)&&Ur(s)){Yt(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);function he(){}function da(e){return"string"!=typeof e?e:e.replace(/./,function(e){return e.toUpperCase()})}function js(e,t){var n=t[e+"Buffer"];return n&&n.updating||t.queuePending[e]}function Ze(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&&!js(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 Ze(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),n.action(t),n.doneFn&&n.doneFn(),Ze("audio",t),Ze("video",t))}}function oa(e,t){var n=t[e+"Buffer"],s=da(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 te(e,t){return e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t)}function $(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}),Ze(t,n)}function Zi(e,t){return function(){if(t.queuePending[e]){var s=t.queuePending[e].doneFn;t.queuePending[e]=null,s&&s(t[e+"Error_"])}Ze(e,t)}}function Xi(e){return decodeURIComponent(escape(String.fromCharCode.apply(null,e)))}function $d(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 vn(e,t){e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)}function Ki(e,t){(t.activePlaylistLoader=e).load()}function Kd(e,t,n){var s,i,a,r,o=e.masterPlaylistController_,c=o[(e.options_.smoothQualityChange?"smooth":"fast")+"QualityChange_"].bind(o);t.attributes.RESOLUTION&&(i=t.attributes.RESOLUTION,this.width=i.width,this.height=i.height),this.bandwidth=t.attributes.BANDWIDTH,this.codecs=kt(o.master(),t),this.playlist=t,this.id=n,this.enabled=(s=e.playlists,a=t.id,r=c,function(e){var t=s.master.playlists[a],o=no(t),n=dn(t);return void 0===e?n:(e?delete t.disabled:t.disabled=!0,e===n||o||(r(),e?s.trigger("renditionenabled"):s.trigger("renditiondisabled")),e)})}function Wi(t){!function t(n,s){var r=0,i=0,o=e.mergeOptions(fu,s);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.ready(function(){n.trigger({type:"usage",name:"vhs-error-reload-initialized"}),n.trigger({type:"usage",name:"hls-error-reload-initialized"})}),n.on("error",l),n.on("dispose",a),n.reloadSourceOnError=function(e){a(),t(n,e)}}(this,t)}var _e,Gd=["video","audio"],Vi=function(e,t){return function(n,s){var o=s[n+"Buffer"];te(s.mediaSource,o)&&(s.logger_("Removing "+e+" to "+t+" from "+n+"Buffer"),o.remove(e,t))}},Bi=function(e){return function(t,n){var s=n[t+"Buffer"];te(n.mediaSource,s)&&(n.logger_("Setting "+t+"timestampOffset to "+e),s.timestampOffset=e)}},Ii=function(e){return function(){e()}},Ri=function(t){function s(e){var n;return(n=t.call(this)||this).mediaSource=e,n.sourceopenListener_=function(){return Ze("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_=Zi("video",Y(n)),n.onAudioUpdateEnd_=Zi("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}ce(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){$({type:"mediaSource",sourceUpdater:this,action:function(e,t){return function(n){var s,o=da(e),i=go(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}}(e,t),name:"addSourceBuffer"})},n.abort=function(t){$({type:t,sourceUpdater:this,action:function(t,n){if("open"===n.mediaSource.readyState){var s=n[t+"Buffer"];if(te(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)}}}},name:"abort"})},n.removeSourceBuffer=function(t){this.canRemoveSourceBuffer()?$({type:"mediaSource",sourceUpdater:this,action:function(t){return function(n){var s=n[t+"Buffer"];if(oa(t,n),te(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)}}}}(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()?$({type:t,sourceUpdater:this,action:function(e){return function(t,n){var s=n[t+"Buffer"],o=go(e);te(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)}}(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($({type:n,sourceUpdater:this,action:function(e,t,n){return function(s,o){var i=o[s+"Buffer"];if(te(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)}}}}(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 te(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:e.createTimeRange()},n.videoBuffered=function(){return te(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:e.createTimeRange()},n.buffered=function(){var t=te(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,n=te(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(t,n){void 0===n&&(n=he),$({type:"mediaSource",sourceUpdater:this,action: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)}}}(t),name:"duration",doneFn:n})},n.endOfStream=function(t,n){void 0===t&&(t=null),void 0===n&&(n=he),"string"!=typeof t&&(t=void 0),$({type:"mediaSource",sourceUpdater:this,action: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)}}}}(t),name:"endOfStream",doneFn:n})},n.removeAudio=function(e,t,n){void 0===n&&(n=he),this.audioBuffered().length&&0!==this.audioBuffered().end(0)?$({type:"audio",sourceUpdater:this,action:Vi(e,t),doneFn:n,name:"remove"}):n()},n.removeVideo=function(e,t,n){void 0===n&&(n=he),this.videoBuffered().length&&0!==this.videoBuffered().end(0)?$({type:"video",sourceUpdater:this,action:Vi(e,t),doneFn:n,name:"remove"}):n()},n.updating=function(){return!!js("audio",this)||!!js("video",this)},n.audioTimestampOffset=function(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&($({type:"audio",sourceUpdater:this,action:Bi(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_},n.videoTimestampOffset=function(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset!==e&&($({type:"video",sourceUpdater:this,action:Bi(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_},n.audioQueueCallback=function(e){this.audioBuffer&&$({type:"audio",sourceUpdater:this,action:Ii(e),name:"callback"})},n.videoQueueCallback=function(e){this.videoBuffer&&$({type:"video",sourceUpdater:this,action:Ii(e),name:"callback"})},n.dispose=function(){var e=this;this.trigger("dispose"),Gd.forEach(function(t){e.abort(t),e.canRemoveSourceBuffer()?e.removeSourceBuffer(t):e[t+"QueueCallback"](function(){return oa(t,e)})}),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()},s}(e.EventTarget),Li=new Uint8Array(` `.split("").map(function(e){return e.charCodeAt(0)})),tu=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}ce(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=ln(e),s=this.initSegments_[o];return t&&!s&&e.bytes&&(i=Li.byteLength+e.bytes.byteLength,n=new Uint8Array(i),n.set(e.bytes),n.set(Li,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 void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_},n.remove=function(e,t){Yt(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===xs&&this.handleTimeout_(),e.code===Os?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=Xi(s)),n.parse(s)),i=t.bytes,r&&(i=Xi(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/Lt-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}(ws),Ni=[{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&&void 0!==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}}],su=function(e){function n(){var n;return(n=e.call(this)||this).timelines=[],n.discontinuities=[],n.timelineToDatetimeMappings={},n.logger_=J("SyncController"),n}ce(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+St(e,n.segmentIndex,0))):null},t.runStrategies_=function(e,t,n,s){for(var o,i,r=[],a=0;a<Ni.length;a++)o=Ni[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&&void 0!==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 void 0===this.timelines[e]?null:this.timelines[e].time},t.mappingForTimeline=function(e){return void 0===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,c,o=t.discontinuityStarts[s],i=t.discontinuitySequence+s+1,a=o-e.mediaIndex,r=Math.abs(a);(!this.discontinuities[i]||this.discontinuities[i].accuracy>r)&&(c=a<0?n.start-St(t,e.mediaIndex,o):n.end+St(t,e.mediaIndex+1,o),this.discontinuities[i]={time:c,accuracy:r})}},t.dispose=function(){this.trigger("dispose"),this.off()},n}(e.EventTarget),ou=function(e){function n(){var t;return(t=e.call(this)||this).pendingTimelineChanges_={},t.lastTimelineChanges_={},t}ce(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),iu=Ec(Cc(xc(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)}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,t=null,o=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}(),i=function(e){function t(){var t;return(t=e.call(this,n)||this).jobs=[],t.delay=1,t.timeout_=null,t}!function(e,t){e.prototype=Object.create(t.prototype),(e.prototype.constructor=e).__proto__=t}(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),a=function(){function t(n,s,o,a){var l=t.STEP,c=new Int32Array(n.buffer),d=new Uint8Array(n.byteLength),r=0;for(this.asyncStream_=new i,this.asyncStream_.push(this.decryptChunk_(c.subarray(r,r+l),s,o,d)),r=l;r<c.length;r+=l)o=new Uint32Array([e(c[r-4]),e(c[r-3]),e(c[r-2]),e(c[r-1])]),this.asyncStream_.push(this.decryptChunk_(c.subarray(r,r+l),s,o,d));this.asyncStream_.push(function(){var e;a(null,(e=d).subarray(0,e.byteLength-e[e.byteLength-1]))})}return t.prototype.decryptChunk_=function(t,n,s,i){return function(){var a=function(t,n,s){var i,c,l,d,u,h,m,f,p,r=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),v=new o(Array.prototype.slice.call(n)),g=new Uint8Array(t.byteLength),a=new Int32Array(g.buffer);for(m=s[0],p=s[1],f=s[2],c=s[3],i=0;i<r.length;i+=4)l=e(r[i]),d=e(r[i+1]),u=e(r[i+2]),h=e(r[i+3]),v.decrypt(l,d,u,h,a,i),a[i]=e(a[i]^m),a[i+1]=e(a[i+1]^p),a[i+2]=e(a[i+2]^f),a[i+3]=e(a[i+3]^c),m=l,p=d,f=u,c=h;return g}(t,n,s);i.set(a,t.byteOffset)}},function(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}(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 a(n,s,o,function(e,n){var s,o;self.postMessage((o={source:t.source,decrypted:n},s={},Object.keys(o).forEach(function(e){var t=o[e];ArrayBuffer.isView(t)?s[e]={bytes:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength}:s[e]=t}),s),[n.buffer])})}}))),Cn={AUDIO:function(t,n){return function(){var r=n.segmentLoaders[t],s=n.mediaTypes[t],c=n.blacklistCurrentPlaylist;vn(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."),vn(i,s),o=s.activeTrack(),o&&(o.mode="disabled"),s.onTrackChanged()}}},zi={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",Cn[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",Cn[e](e,n))}},cu={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;function f(c){function h(u){var f,p,g,v,h=s[t][c][u];!l.filter(function(e){return e.resolvedUri!==h.resolvedUri}).length&&l.length&&delete h.resolvedUri,(g="vhs-json"===d&&h.playlists?new ut(h.playlists[0],o,a):h.resolvedUri?new ut(h.resolvedUri,o,a):h.playlists&&"dash"===d?new Cs(h.playlists[0],o,a,m):null,h=e.mergeOptions({id:u,playlistLoader:g},h),zi[t](t,h.playlistLoader,n),i[c].push(h),void 0===r[u])&&(v=new e.AudioTrack({id:u,kind:(f=h,p=f.default?"main":"alternative",f.characteristics&&0<=f.characteristics.indexOf("public.accessibility.describes-video")&&(p="main-desc"),p),enabled:!1,language:h.language,default:h.default,label:u}),r[u]=v)}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]&&0!==Object.keys(s[t]).length||(s[t]={main:{default:{default:!0}}}),s[t])f(p);h.on("error",Cn[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 ut(s.resolvedUri,c,d);else if("dash"===l){if(!s.playlists.filter(function(e){return e.excludeUntil!==1/0}).length)return;a=new Cs(s.playlists[0],c,d,g)}else"vhs-json"===l&&(a=new ut(s.playlists?s.playlists[0]:s.resolvedUri,c,d));s=e.mergeOptions({id:o,playlistLoader:a},s),zi[t](t,s.playlistLoader,n),u[i].push(s),void 0===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",Cn[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)),void 0===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)}},lu={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}}},du=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred"],uu=function(t){function s(n){var i,a,s=t.call(this)||this,r=n.src,j=n.handleManifestRedirects,l=n.withCredentials,c=n.tech,h=n.bandwidth,u=n.externVhs,d=n.useCueTags,m=n.blacklistDuration,f=n.enableLowInitialPlaylist,p=n.sourceType,g=n.cacheEncryptionKeys,v=n.handlePartialData,b=n.experimentalBufferBasedABR;if(!r)throw new Error("A non-empty playlist URL or JSON manifest string is required");return _e=u,s.experimentalBufferBasedABR=Boolean(b),s.withCredentials=l,s.tech_=c,s.vhs_=c.vhs,s.sourceType_=p,s.useCueTags_=d,s.blacklistDuration=m,s.enableLowInitialPlaylist=f,s.useCueTags_&&(s.cueTagsTrack_=s.tech_.addTextTrack("metadata","ad-cues"),s.cueTagsTrack_.inBandMetadataTrackDispatchType=""),s.requestOptions_={withCredentials:l,handleManifestRedirects:j,timeout:null},s.on("error",s.pauseLoading),s.mediaTypes_=(a={},["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(e){a[e]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:he,activeTrack:he,onGroupChanged:he,onTrackChanged:he}}),a),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 su(n),s.segmentMetadataTrack_=c.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,s.decrypter_=new iu,s.sourceUpdater_=new Ri(s.mediaSource),s.inbandTextTracks_={},s.timelineChangeController_=new ou,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:h,syncController:s.syncController_,decrypter:s.decrypter_,sourceType:s.sourceType_,inbandTextTracks:s.inbandTextTracks_,cacheEncryptionKeys:g,handlePartialData:v,sourceUpdater:s.sourceUpdater_,timelineChangeController:s.timelineChangeController_},s.masterPlaylistLoader_="dash"===s.sourceType_?new Cs(r,s.vhs_,s.requestOptions_):new ut(r,s.vhs_,s.requestOptions_),s.setupMasterPlaylistLoaderListeners_(),s.mainSegmentLoader_=new ws(e.mergeOptions(i,{segmentMetadataTrack:s.segmentMetadataTrack_,loaderType:"main"}),n),s.audioSegmentLoader_=new ws(e.mergeOptions(i,{loaderType:"audio"}),n),s.subtitleSegmentLoader_=new tu(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_()})),du.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}ce(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;Qs(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()),function(e){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(t){cu[t](t,e)});var s,i,c,t=e.mediaTypes,o=e.masterPlaylistLoader,n=e.tech,r=e.vhs;["AUDIO","SUBTITLES"].forEach(function(n){var s,o,i,a,r,c,l,d;t[n].activeGroup=(o=n,c=e,function(e){var t,i=c.masterPlaylistLoader,s=c.mediaTypes[o].groups,n=i.media();return n?(t=null,n.attributes[o]&&(t=s[n.attributes[o]]),t=t||s.main,void 0===e?t:null===e?null:t.filter(function(t){return t.id===e.id})[0]||null):null}),t[n].activeTrack=lu[n](n,e),t[n].onGroupChanged=(a=n,r=e,function(){var n=r.segmentLoaders,s=n[a],o=n.main,e=r.mediaTypes[a],i=e.activeTrack(),t=e.activeGroup(i),c=e.activePlaylistLoader;vn(s,e),t&&(t.playlistLoader?(s.resyncLoader(),Ki(t.playlistLoader,e)):c&&o.resetEverything())}),t[n].onGroupChanging=(l=n,d=e,function(){var e=d.segmentLoaders[l];e.abort(),e.pause()}),t[n].onTrackChanged=(s=n,i=e,function(){var a=i.segmentLoaders,e=a[s],o=a.main,t=i.mediaTypes[s],r=t.activeTrack(),n=t.activeGroup(r),c=t.activePlaylistLoader;if(vn(e,t),n){if("AUDIO"===s){if(!n.playlistLoader)return o.setAudio(!0),void o.resetEverything();e.setAudio(!0),o.setAudio(!1)}c!==n.playlistLoader&&(e.track&&e.track(r),e.resetEverything()),Ki(n.playlistLoader,t)}})}),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])}({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;Qs(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"})),_e.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?O.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:O.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;function t(){if(!e.sourceUpdater_.hasCreatedSourceBuffers())return e.tryToCreateSourceBuffers_();var t=e.getCodecsOrExclude_();t&&e.sourceUpdater_.addOrChangeSourceBuffers(t)}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))}),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();void 0!==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=_e.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(dn),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;void 0!==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=Ct(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:_e.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=_e.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=_e.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 ["+rl(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=_e.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=kt(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||yr)),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||c)&&(t.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||yr,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)&&(r=e[s].isFmp4,i=t[s],!(r?pn(i):po(i)))){var i,r,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=(de(s.sourceUpdater_.codecs[e]||"")[0]||{}).type,i=(de(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=kt(e.master,i),a=[];!o.audio||po(o.audio)||pn(o.audio)||a.push("audio codec "+o.audio),!o.video||po(o.video)||pn(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=Ls(de(e)),r=ec(t),s=t.video&&de(t.video)[0]||null,o=t.audio&&de(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=kt(n.masterPlaylistLoader_.master,t),h=ec(c);(c.audio||c.video)&&((h!==r&&l.push('codec count "'+h+'" !== "'+r+'"'),!n.sourceUpdater_.canChangeType())&&(d=c.video&&de(c.video)[0]||null,u=c.audio&&de(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||$d(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=O.GOAL_BUFFER_LENGTH,n=O.GOAL_BUFFER_LENGTH_RATE,s=Math.max(e,O.MAX_GOAL_BUFFER_LENGTH);return Math.min(e+t*n,s)},n.bufferLowWaterLine=function(){var t=this.tech_.currentTime(),e=O.BUFFER_LOW_WATER_LINE,n=O.BUFFER_LOW_WATER_LINE_RATE,s=Math.max(e,O.MAX_BUFFER_LOW_WATER_LINE),o=Math.max(e,O.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(e+t*n,this.experimentalBufferBasedABR?o:s)},n.bufferHighWaterLine=function(){return O.BUFFER_HIGH_WATER_LINE},s}(e.EventTarget),Ti=["seeking","seeked","pause","playing","error"],mu=function(){function n(e){t=this;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_()}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");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(Ti,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(Ti,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:xe(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,i,a,r,c,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))&&(a=t.start(0),e=a+(a===t.end(0)?0:.1)),void 0!==e?(this.logger_("Trying to seek outside of seekable at time "+n+" with seekable range "+rl(t)+". Seeking to "+e+"."),this.tech_.setCurrentTime(e),!0):(i=this.tech_.buffered(),!(o={buffered:i,targetDuration:this.media().targetDuration,currentTime:n},r=o.targetDuration,c=o.currentTime,!(s=o.buffered).length||s.end(0)-s.start(0)<2*r||c>s.start(0)||!(s.start(0)-c<r)||(e=i.start(0)+.1,this.logger_("Buffered region starts ("+i.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(),t=Ct(this.tech_.buffered(),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=so(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=Ct(t,n-3),r=Ct(t,n),a=Ct(o,n);a.length&&!r.length&&i.length&&(s={start:i.end(0),end:a.end(0)})}else so(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=so(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)+qe),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}(),fu={errorInterval:30,getSource:function(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},C={PlaylistLoader:ut,Playlist:P,utils:pu,STANDARD_PLAYLIST_SELECTOR:qr,INITIAL_PLAYLIST_SELECTOR:function(){var t=this,e=this.playlists.master.playlists.filter(P.isEnabled);return Ht(e,function(e,t){return Ts(e,t)}),e.filter(function(e){return!!kt(t.playlists.master,e).video})[0]||null},lastBandwidthSelector:qr,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,Yr(this.playlists.master,t,parseInt(on(this.tech_.el(),"width"),10)*n,parseInt(on(this.tech_.el(),"height"),10)*n,this.limitRenditionByPlayerDimensions)}},comparePlaylistBandwidth:Ts,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:pl()};function Mi(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"})}Object.keys(O).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"),O[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"):O[t]=n}})}),ps="videojs-vhs";function Ci(){if(!o.localStorage)return null;var e=o.localStorage.getItem(ps);if(!e)return null;try{return JSON.parse(e)}catch{return null}}return C.canPlaySource=function(){return e.log.warn("HLS is no longer a tech. Please remove it from your player's techOrder.")},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.")},Yn=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}ce(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=void 0!==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=Ci(),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=O.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===O.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","limitRenditionByPlayerDimensions","bandwidth","smoothQualityChange","customTagParsers","customTagMappers","handleManifestRedirects","cacheEncryptionKeys","handlePartialData","playlistSelector","initialPlaylistSelector","experimentalBufferBasedABR","liveRangeSafeTimeDelta"].forEach(function(e){void 0!==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,r,s=this;t&&(this.setOptions_(),this.options_.src=0===(i=this.source_.src).toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")?JSON.parse(i.substring(i.indexOf(",")+1)):i,this.options_.tech=this.tech_,this.options_.externVhs=C,this.options_.sourceType=Si(n),this.options_.seekTo=function(e){s.tech_.setCurrentTime(e)},this.masterPlaylistController_=new uu(this.options_),a=e.mergeOptions({liveRangeSafeTimeDelta:.1},this.options_,{seekable:function(){return s.seekable()},media:function(){return s.masterPlaylistController_.media()},masterPlaylistController:this.masterPlaylistController_}),this.playbackWatcher_=new mu(a),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)}),r=this.options_.experimentalBufferBasedABR?C.movingAverageBandwidthSelector(.55):C.STANDARD_PLAYLIST_SELECTOR,this.masterPlaylistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.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 xe(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 xe(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){var n=Ci(),n=n?e.mergeOptions(n,t):t;try{o.localStorage.setItem(ps,JSON.stringify(n))}catch{return}}}({bandwidth:s.bandwidth,throughput:Math.round(s.throughput)})}),this.masterPlaylistController_.on("selectedinitialmedia",function(){var t,e=(t=s).playlists;t.representations=function(){return e&&e.master&&e.master.playlists?e.master.playlists.filter(function(e){return!no(e)}).map(function(e){return new Kd(t,e,e.id)}):[]}}),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,o,i,n=this,s=this.masterPlaylistController_.mediaTypes_.AUDIO.activePlaylistLoader,a=(t={player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:s&&s.media()},o=t.player,!(!(i=function(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){var t;$c(e=e.trim())?o.audio=e:(void 0===(t=e)&&(t=""),me.video.test(t.trim().toLowerCase())&&(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)}(t.sourceKeySystems,t.media,t.audioMedia))||(o.currentSource().keySystems=i)&&!o.eme&&(e.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1)));11!==e.browser.IE_VERSION&&a?(this.logger_("waiting for EME key session creation"),function(e){var t=e.player,c=e.sourceKeySystems,n=e.audioMedia,s=e.mainPlaylists;if(!t.eme.initializeMediaKeys)return Promise.resolve();var o,i,l=(o=n?s.concat([n]):s,i=Object.keys(c),o.reduce(function(e,t){if(!t.contentProtection)return e;var n=i.reduce(function(e,n){var s=t.contentProtection[n];return s&&s.pssh&&(e[n]={pssh:s.pssh}),e},{});return Object.keys(n).length&&e.push(n),e},[])),a=[],r=[];return l.forEach(function(e){r.push(new Promise(function(e){t.tech_.one("keysessioncreated",e)})),a.push(new Promise(function(n,s){t.eme.initializeMediaKeys({keySystems:e},function(e){e?s(e):n()})}))}),Promise.race([Promise.all(a),Promise.race(r)])}({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:s&&s.media(),mainPlaylists:this.playlists.master.playlists}).then(function(){n.logger_("created EME key session"),n.masterPlaylistController_.sourceUpdater_.initializedEme()}).catch(function(e){n.logger_("error while creating EME key session",e),n.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(){var n,e=t.qualityLevels_;(n=t).representations().forEach(function(t){e.addQualityLevel(t)}),Mi(e,n.playlists)}),this.playlists.on("mediachange",function(){Mi(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 Ri.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 function(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"}))}({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),function e(t){var a,c,l,f,o=t.programTime,s=t.playlist,m=t.retryCount,d=void 0===m?2:m,r=t.seekTo,h=t.pauseAfterSeek,u=void 0===h||h,i=t.tech,n=t.callback;if(!n)throw new Error("seekToProgramTime: callback must be provided");if(void 0===o||!s||!r)return n({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!s.endList&&!i.hasStarted_)return n({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}(s))return n({message:"programDateTime tags must be provided in the manifest "+s.resolvedUri});if(a=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&&(n=t.segments[i],!(o<t.segments[i+1].dateTimeObject));i++);var n,o,i,a,s=t.segments[t.segments.length-1],r=s.dateTimeObject,c=s.videoTimingInfo?(a=s.videoTimingInfo).transmuxedPresentationEnd-a.transmuxedPresentationStart-a.transmuxerPrependedSeconds:s.duration+.25*s.duration;return new Date(r.getTime()+1e3*c)<o?null:(r<o&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:P.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})}(o,s),!a)return n({message:o+" was not found in the stream"});if(l=a.segment,c=function(e,t){try{n=new Date(e),s=new Date(t)}catch{}var n,s,o=n.getTime();return(s.getTime()-o)/1e3}(l.dateTimeObject,o),"estimate"===a.type)return 0===d?n({message:o+" is not buffered yet. Try again"}):(r(a.estimatedStart+c),void i.one("seeked",function(){e({programTime:o,playlist:s,retryCount:d-1,seekTo:r,pauseAfterSeek:u,tech:i,callback:n})}));f=l.start+c,i.one("seeked",function(){return n(null,i.currentTime())}),u&&i.pause(),r(f)}({programTime:e,playlist:this.masterPlaylistController_.media(),retryCount:s,pauseAfterSeek:n,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})},s}(e.getComponent("Component")),Vt={name:"videojs-http-streaming",VERSION:"2.6.4",canHandleSource:function(t,n){void 0===n&&(n={});var s=e.mergeOptions(e.options,n);return Vt.canPlayType(t.type,s)},handleSource:function(t,n,s){void 0===s&&(s={});var o=e.mergeOptions(e.options,s);return n.vhs=new Yn(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=pl(),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=Si(t);return!o||C.supportsTypeNatively(o)&&!i?"":"maybe"}},pn("avc1.4d400d,mp4a.40.2")&&e.getTech("Html5").registerSourceHandler(Vt,0),e.VhsHandler=Yn,Object.defineProperty(e,"HlsHandler",{get:function(){return e.log.warn("videojs.HlsHandler is deprecated. Use videojs.VhsHandler instead."),Yn},configurable:!0}),e.VhsSourceHandler=Vt,Object.defineProperty(e,"HlsSourceHandler",{get:function(){return e.log.warn("videojs.HlsSourceHandler is deprecated. Use videojs.VhsSourceHandler instead."),Vt},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",Wi):e.plugin("reloadSourceOnError",Wi),e};"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).videojs=t()},function(){!function e(t,n,s){function o(i,r){if(!n[i]){if(!t[i]){var c,l,d="function"==typeof require&&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="function"==typeof require&&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=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}}(),o=n.IVPAIDAdUnit=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return s(e,[{key:"handshakeVersion",value:function(){arguments.length<=0||void 0===arguments[0]||arguments[0],arguments.length<=1||void 0===arguments[1]||arguments[1]}},{key:"initAd",value:function(){arguments.length<=4||void 0===arguments[4]||arguments[4],arguments.length<=5||void 0===arguments[5]||arguments[5],arguments.length<=6||void 0===arguments[6]||arguments[6]}},{key:"resizeAd",value:function(){arguments.length<=3||void 0===arguments[3]||arguments[3]}},{key:"startAd",value:function(){arguments.length<=0||void 0===arguments[0]||arguments[0]}},{key:"stopAd",value:function(){arguments.length<=0||void 0===arguments[0]||arguments[0]}},{key:"pauseAd",value:function(){arguments.length<=0||void 0===arguments[0]||arguments[0]}},{key:"resumeAd",value:function(){arguments.length<=0||void 0===arguments[0]||arguments[0]}},{key:"expandAd",value:function(){arguments.length<=0||void 0===arguments[0]||arguments[0]}},{key:"collapseAd",value:function(){arguments.length<=0||void 0===arguments[0]||arguments[0]}},{key:"skipAd",value:function(){arguments.length<=0||void 0===arguments[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(){arguments.length<=1||void 0===arguments[1]||arguments[1]}},{key:"getAdVolume",value:function(){}},{key:"getAdCompanions",value:function(){}},{key:"getAdIcons",value:function(){}}]),e}();Object.defineProperty(o,"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";s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},Object.defineProperty(n,"__esModule",{value:!0});var s,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}}(),o=e("./IVPAIDAdUnit").IVPAIDAdUnit,a=Object.getOwnPropertyNames(o.prototype).filter(function(e){return-1===["constructor"].indexOf(e)});n.VPAIDAdUnit=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==(void 0===t?"undefined":s(t))&&"function"!=typeof t?e:t}(this,Object.getPrototypeOf(t).call(this));return n._destroyed=!1,n._flash=e,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+(void 0===t?"undefined":s(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)}(t,o),i(t,[{key:"_destroy",value:function(){var e=this;this._destroyed=!0,a.forEach(function(t){e._flash.removeCallbackByMethodName(t)}),o.EVENTS.forEach(function(t){e._flash.offEvent(t)}),this._flash=null}},{key:"isDestroyed",value:function(){return this._destroyed}},{key:"on",value:function(e,t){this._flash.on(e,t)}},{key:"off",value:function(e,t){this._flash.off(e,t)}},{key:"handshakeVersion",value:function(){var e=arguments.length<=0||void 0===arguments[0]?"2.0":arguments[0],t=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1];this._flash.callFlashMethod("handshakeVersion",[e],t)}},{key:"initAd",value:function(e,t,n,s){var o=arguments.length<=4||void 0===arguments[4]?{AdParameters:""}:arguments[4],i=arguments.length<=5||void 0===arguments[5]?{flashVars:""}:arguments[5],a=arguments.length<=6||void 0===arguments[6]?void 0:arguments[6];this._flash.setSize(e,t),o=o||{AdParameters:""},i=i||{flashVars:""},this._flash.callFlashMethod("initAd",[this._flash.getWidth(),this._flash.getHeight(),n,s,o.AdParameters||"",i.flashVars||""],a)}},{key:"resizeAd",value:function(e,t,n){var s=arguments.length<=3||void 0===arguments[3]?void 0:arguments[3];this._flash.setSize(e,t),this._flash.callFlashMethod("resizeAd",[this._flash.getWidth(),this._flash.getHeight(),n],s)}},{key:"startAd",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this._flash.callFlashMethod("startAd",[],e)}},{key:"stopAd",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this._flash.callFlashMethod("stopAd",[],e)}},{key:"pauseAd",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this._flash.callFlashMethod("pauseAd",[],e)}},{key:"resumeAd",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this._flash.callFlashMethod("resumeAd",[],e)}},{key:"expandAd",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this._flash.callFlashMethod("expandAd",[],e)}},{key:"collapseAd",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this._flash.callFlashMethod("collapseAd",[],e)}},{key:"skipAd",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];this._flash.callFlashMethod("skipAd",[],e)}},{key:"getAdLinear",value:function(e){this._flash.callFlashMethod("getAdLinear",[],e)}},{key:"getAdWidth",value:function(e){this._flash.callFlashMethod("getAdWidth",[],e)}},{key:"getAdHeight",value:function(e){this._flash.callFlashMethod("getAdHeight",[],e)}},{key:"getAdExpanded",value:function(e){this._flash.callFlashMethod("getAdExpanded",[],e)}},{key:"getAdSkippableState",value:function(e){this._flash.callFlashMethod("getAdSkippableState",[],e)}},{key:"getAdRemainingTime",value:function(e){this._flash.callFlashMethod("getAdRemainingTime",[],e)}},{key:"getAdDuration",value:function(e){this._flash.callFlashMethod("getAdDuration",[],e)}},{key:"setAdVolume",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?void 0:arguments[1];this._flash.callFlashMethod("setAdVolume",[e],t)}},{key:"getAdVolume",value:function(e){this._flash.callFlashMethod("getAdVolume",[],e)}},{key:"getAdCompanions",value:function(e){this._flash.callFlashMethod("getAdCompanions",[],e)}},{key:"getAdIcons",value:function(e){this._flash.callFlashMethod("getAdIcons",[],e)}}]),t}()},{"./IVPAIDAdUnit":1}],3:[function(e,t){"use strict";var g=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}}(),o=e("swfobject"),r=e("./jsFlashBridge").JSFlashBridge,d=e("./VPAIDAdUnit").VPAIDAdUnit,p=e("./utils").noop,f=e("./utils").callbackTimeout,l=e("./utils").isPositiveInt,m=e("./utils").createElementWithID,u=e("./utils").unique("vpaid"),h=e("./flashTester.js").createFlashTester,a={isSupported:function(){return!0}},i=function(){function e(t,n){var c,d,s=arguments.length<=2||void 0===arguments[2]?{data:"VPAIDFlash.swf",width:800,height:400}:arguments[2],g=this,i=arguments.length<=3||void 0===arguments[3]?{wmode:"transparent",salign:"tl",align:"left",allowScriptAccess:"always",scale:"noScale",allowFullScreen:"true",quality:"high"}:arguments[3],a=arguments.length<=4||void 0===arguments[4]?{debug:!1,timeout:1e4}:arguments[4];if(!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),c=this,this._vpaidParentEl=t,this._flashID=u(),this._destroyed=!1,n=n||p,s.width=l(s.width,800),s.height=l(s.height,400),m(t,this._flashID,!0),i.movie=s.data,i.FlashVars="flashid="+this._flashID+"&handler="+r.VPAID_FLASH_HANDLER+"&debug="+a.debug+"&salign="+i.salign,!e.isSupported())return h("user don't support flash or doesn't have the minimum required version of flash 10.1.0");if(this.el=o.createSWF(s,i,this._flashID),!this.el)return h("swfobject failed to create object in element");d=f(a.timeout,function(e,t){(function(){this._loadLater&&(this.loadAdUnit(this._loadLater.url,this._loadLater.callback),delete this._loadLater)}).call(g),n(e,t)},function(){n("vpaid flash load timeout "+a.timeout)});function h(e){return setTimeout(function(){n(new Error(e))},0),c}this._flash=new r(this.el,s.data,this._flashID,s.width,s.height,d)}return g(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(e,t){var n=this;s.call(this),this._adUnit&&this._destroyAdUnit(),this._flash.isReady()?(this._adUnitLoad=function(e){e||(n._adUnit=new d(n._flash)),n._adUnitLoad=null,t(e,n._adUnit)},this._flash.callFlashMethod("loadAdUnit",[e],this._adUnitLoad)):this._loadLater={url:e,callback:t}}},{key:"unloadAdUnit",value:function(){var e=arguments.length<=0||void 0===arguments[0]?void 0:arguments[0];s.call(this),this._destroyAdUnit(),this._flash.callFlashMethod("unloadAdUnit",[],e)}},{key:"getFlashID",value:function(){return s.call(this),this._flash.getFlashID()}},{key:"getFlashURL",value:function(){return s.call(this),this._flash.getFlashURL()}}]),e}();function s(){if(this._destroyed)throw new Error("VPAIDFlashToJS is destroyed!")}function c(e,t){var n=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];Object.defineProperty(i,e,{writable:n,configurable:!1,value:t})}c("isSupported",function(){return o.hasFlashPlayerVersion("10.1.0")&&a.isSupported()},!0),c("runFlashTest",function(e){a=h(document.body,e)}),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 r=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}}(),c=e("swfobject"),o="vpaid_video_flash_tester",s="vpaid_video_flash_tester_el",a=e("./jsFlashBridge").JSFlashBridge,i=e("./utils"),l=e("./registry").MultipleValuesRegistry,d=function(){function e(t){var o,r=this,n=arguments.length<=1||void 0===arguments[1]?{data:"VPAIDFlash.swf",width:800,height:400}:arguments[1];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(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=c.createSWF(n,o,s),this._handlers=new l,this._isSupported=!1,this.el&&(i.hideFlashEl(this.el),this._flash=new a(this.el,n.data,s,n.width,n.height,function(){r._isSupported=!0,r._handlers.get("change").forEach(function(e){setTimeout(function(){e("change",!0)},0)})}))}return r(e,[{key:"isSupported",value:function(){return this._isSupported}},{key:"on",value:function(e,t){this._handlers.add(e,t)}}]),e}();n.createFlashTester=function(e,t){return window[o]||(window[o]=new d(e,t)),window[o]}},{"./jsFlashBridge":5,"./registry":7,"./utils":8,swfobject:14}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=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}}(),c=e("./utils").unique,o=e("./utils").isPositiveInt,l=e("./utils").stringEndsWith,d=e("./registry").SingleValueRegistry,u=e("./registry").MultipleValuesRegistry,s=e("./jsFlashBridgeRegistry"),i="vpaid_video_flash_handler",h=n.JSFlashBridge=function(){function e(t,n,o,i,a,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._el=t,this._flashID=o,this._flashURL=n,this._width=i,this._height=a,this._handlers=new u,this._callbacks=new d,this._uniqueMethodIdentifier=c(this._flashID),this._ready=!1,this._handShakeHandler=r,s.addInstance(this._flashID,this)}return r(e,[{key:"on",value:function(e,t){this._handlers.add(e,t)}},{key:"off",value:function(e,t){return this._handlers.remove(e,t)}},{key:"offEvent",value:function(e){return this._handlers.removeByKey(e)}},{key:"offAll",value:function(){return this._handlers.removeAll()}},{key:"callFlashMethod",value:function(e){var s=arguments.length<=1||void 0===arguments[1]?[]:arguments[1],n=arguments.length<=2||void 0===arguments[2]?void 0:arguments[2],t="";n&&(t=this._uniqueMethodIdentifier()+"_"+e,this._callbacks.add(t,n));try{this._el[e]([t].concat(s))}catch(e){n?a.call(this,t,e):this._trigger("AdError",e)}}},{key:"removeCallback",value:function(e){return this._callbacks.removeByValue(e)}},{key:"removeCallbackByMethodName",value:function(e){var t=this;this._callbacks.filterKeys(function(t){return l(t,e)}).forEach(function(e){t._callbacks.remove(e)})}},{key:"removeAllCallbacks",value:function(){return this._callbacks.removeAll()}},{key:"_trigger",value:function(e,t){var n=this;this._handlers.get(e).forEach(function(s){"AdClickThru"===e?s(t):setTimeout(function(){0<n._handlers.get(e).length&&s(t)},0)})}},{key:"_callCallback",value:function(e,t,n,s){this._callbacks.get(t)?a.call(this,t,n,s):n&&""===t&&this.trigger("AdError",n)}},{key:"_handShake",value:function(e,t){this._ready=!0,this._handShakeHandler&&(this._handShakeHandler(e,t),delete this._handShakeHandler)}},{key:"getSize",value:function(){return{width:this._width,height:this._height}}},{key:"setSize",value:function(e,t){this._width=o(e,this._width),this._height=o(t,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(e){this.setSize(e,this._height)}},{key:"getHeight",value:function(){return this._height}},{key:"setHeight",value:function(e){this.setSize(this._width,e)}},{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 a(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(h,"VPAID_FLASH_HANDLER",{writable:!1,configurable:!1,value:i}),window[i]=function(e,t,n,o,i,a){var r=s.getInstanceByID(e);r&&("handShake"===n?r._handShake(i,a):"event"!==t?r._callCallback(n,o,i,a):r._trigger(n,a))}},{"./jsFlashBridgeRegistry":6,"./registry":7,"./utils":8}],6:[function(e,t){"use strict";var o=new(e("./registry").SingleValueRegistry),s={};Object.defineProperty(s,"addInstance",{writable:!1,configurable:!1,value:function(e,t){o.add(e,t)}}),Object.defineProperty(s,"getInstanceByID",{writable:!1,configurable:!1,value:function(e){return o.get(e)}}),Object.defineProperty(s,"removeInstanceByID",{writable:!1,configurable:!1,value:function(e){return o.remove(e)}}),t.exports=s},{"./registry":7}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var 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")}n.MultipleValuesRegistry=function(){function e(){o(this,e),this._registries={}}return s(e,[{key:"add",value:function(e,t){this._registries[e]||(this._registries[e]=[]),-1===this._registries[e].indexOf(t)&&this._registries[e].push(t)}},{key:"get",value:function(e){return this._registries[e]||[]}},{key:"filterKeys",value:function(e){return Object.keys(this._registries).filter(e)}},{key:"findByValue",value:function(e){var t=this;return Object.keys(this._registries).filter(function(n){return-1!==t._registries[n].indexOf(e)})}},{key:"remove",value:function(e,t){if(this._registries[e]){var n=this._registries[e].indexOf(t);if(!(n<0))return this._registries[e].splice(n,1)}}},{key:"removeByKey",value:function(e){var t=this._registries[e];return delete this._registries[e],t}},{key:"removeByValue",value:function(e){var t=this;return this.findByValue(e).map(function(n){return t.remove(n,e)})}},{key:"removeAll",value:function(){var e=this._registries;return this._registries={},e}},{key:"size",value:function(){return Object.keys(this._registries).length}}]),e}(),n.SingleValueRegistry=function(){function e(){o(this,e),this._registries={}}return s(e,[{key:"add",value:function(e,t){this._registries[e]=t}},{key:"get",value:function(e){return this._registries[e]}},{key:"filterKeys",value:function(e){return Object.keys(this._registries).filter(e)}},{key:"findByValue",value:function(e){var t=this;return Object.keys(this._registries).filter(function(n){return t._registries[n]===e})}},{key:"remove",value:function(e){var t=this._registries[e];return delete this._registries[e],t}},{key:"removeByValue",value:function(e){var t=this;return this.findByValue(e).map(function(e){return t.remove(e)})}},{key:"removeAll",value:function(){var e=this._registries;return this._registries={},e}},{key:"size",value:function(){return Object.keys(this._registries).length}}]),e}()},{}],8:[function(e,t,n){"use strict";function s(){}Object.defineProperty(n,"__esModule",{value:!0}),n.unique=function(e){var t=-1;return function(){return e+"_"+ ++t}},n.noop=s,n.callbackTimeout=function(e,t,n){var o=setTimeout(function(){t=s,n()},e);return function(){clearTimeout(o),t.apply(this,arguments)}},n.createElementWithID=function(e,t){var s=!(arguments.length<=2||void 0===arguments[2])&&arguments[2],n=document.createElement("div");return n.id=t,s&&(e.innerHTML=""),e.appendChild(n),n},n.isPositiveInt=function(e,t){return!isNaN(parseFloat(e))&&isFinite(e)&&0<e?e:t},n.stringEndsWith=function(e,t){return o.call(e,t)},n.hideFlashEl=function(e){e.style.position="absolute",e.style.left="-1px",e.style.top="-1px",e.style.width="1px",e.style.height="1px"};var o=String.prototype.endsWith?String.prototype.endsWith:function(e,t){var s,n=this.toString();return(void 0===t||t>n.length)&&(t=n.length),t-=e.length,s=n.indexOf(e,t),-1!==s&&s===t}},{}],9:[function(e,t){"use strict";var a,i=["handshakeVersion","initAd","startAd","stopAd","skipAd","resizeAd","pauseAd","resumeAd","expandAd","collapseAd","subscribe","unsubscribe"];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",["getAdLinear","getAdWidth","getAdHeight","getAdExpanded","getAdSkippableState","getAdRemainingTime","getAdDuration","getAdVolume","getAdCompanions","getAdIcons"]),o(s,"SETTERS",["setAdVolume"]),o(s,"EVENTS",["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"]),a=i.filter(function(e){return-1===["skipAd"].indexOf(e)});function o(e,t,n){Object.defineProperty(e,t,{writable:!1,configurable:!1,value:n})}o(s,"checkVPAIDInterface",function(e){return a.every(function(t){return"function"==typeof e[t]})}),t.exports=s},{}],10:[function(e,t){"use strict";var o=e("./IVPAIDAdUnit"),c=e("./subscriber"),l=o.checkVPAIDInterface,r=e("./utils"),a=(o.METHODS,"AdClickThru"),d=o.EVENTS.filter(function(e){return e!=a});function s(e,t,n,s){this._isValid=l(e),this._isValid&&(this._creative=e,this._el=t,this._videoEl=n,this._iframe=s,this._subscribers=new c,function(){if(d.forEach(function(e){this._creative.subscribe(function(e){this._subscribers.trigger(e,Array.prototype.slice(arguments,1))}.bind(this,e),e)}.bind(this)),this._creative.subscribe(function(e,t,n){this._subscribers.triggerSync(a,{url:e,id:t,playerHandles:n})}.bind(this),a),this._videoEl){var e=this._iframe.contentDocument.documentElement,t=this._videoEl;e.addEventListener("click",function(n){n.target===e&&t.click()})}}.call(this))}function i(e,t,n,s){e?e(n,s):n&&t.trigger("AdError",n)}(s.prototype=Object.create(o.prototype)).isValidVPAIDAd=function(){return this._isValid},o.METHODS.forEach(function(e){-1===["subscribe","unsubscribe","initAd"].indexOf(e)&&(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(e,t,n,s,o,a,c){o=o||{},a=r.extend({slot:this._el,videoSlot:this._videoEl},a||{}),setTimeout(function(){var r;try{this._creative.initAd(e,t,n,s,o,a)}catch(e){r=e}i(c,this._subscribers,r)}.bind(this),0)},s.prototype.subscribe=function(e,t,n){this._subscribers.subscribe(t,e,n)},s.prototype.unsubscribe=function(e,t){this._subscribers.unsubscribe(t,e)},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(e,t){setTimeout(function(){var s,n=null;try{this._creative.setAdVolume(e),s=this._creative.getAdVolume()}catch(e){n=e}n||(n=r.validate(s===e,"failed to apply volume: "+e)),i(t,this._subscribers,n,s)}.bind(this),0)},s.prototype._destroy=function(){this.stopAd(),this._subscribers.unsubscribeAll()},t.exports=s},{"./IVPAIDAdUnit":9,"./subscriber":12,"./utils":13}],11:[function(e,t){"use strict";var s=e("./utils"),l=s.unique("vpaidIframe"),d=e("./VPAIDAdUnit");function o(e,t,n,o){n=n||{},this._id=l(),this._destroyed=!1,this._frameContainer=s.createElementInEl(e,"div"),this._videoEl=t,this._vpaidOptions=o||{timeout:1e4},this._templateConfig={template:n.template||`<!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>`,extraOptions:n.extraOptions||{}}}function i(){a.call(this),function(){this._adUnit&&(this._adUnit.stopAd(),delete this._adUnit)}.call(this)}function a(){(function(e){var t=this[e];t&&(t.remove(),delete this[e])}).call(this,"_frame"),r.call(this)}function r(){this._onLoad&&(window.removeEventListener("message",this._onLoad),s.clearCallbackTimeout(this._onLoad),delete this._onLoad)}function c(){return window.location.origin?window.location.origin:window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}o.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,i.call(this))},o.prototype.isDestroyed=function(){return this._destroyed},o.prototype.loadAdUnit=function(e,t){(function(){if(this._destroyed)throw new Error("VPAIDHTML5Client already destroyed!")}).call(this),i.call(this);var n=this,o=s.createIframeWithContent(this._frameContainer,this._templateConfig.template,s.extend({iframeURL_JS:e,iframeID:this.getID(),origin:c()},this._templateConfig.extraOptions));this._frame=o,this._onLoad=s.callbackTimeout(this._vpaidOptions.timeout,function(e){if(e.origin!==c())return;if(JSON.parse(e.data).id!==n.getID())return;if(o=n._frame.contentWindow?(l=n._frame.contentWindow.getVPAIDAd,s.validate("function"==typeof l,"the ad didn't return a function to create an ad")):"the iframe is not anymore in the DOM tree",!o){var o,i,l,u=n._frame.contentWindow.document.querySelector(".da-element");(i=new d(l(),u,n._videoEl,n._frame)).subscribe("AdStopped",function(){a.call(this),delete this._adUnit}.bind(n)),o=s.validate(i.isValidVPAIDAd(),"the add is not fully complaint with VPAID specification")}return n._adUnit=i,r.call(n),t(o,o?null:i),!0}.bind(this),function(){t("timeout",null)}.bind(this)),window.addEventListener("message",this._onLoad)},o.prototype.unloadAdUnit=function(){i.call(this)},o.prototype.getID=function(){return this._id},t.exports=o,window.VPAIDHTML5Client=o},{"./VPAIDAdUnit":10,"./utils":13}],12:[function(e,t){"use strict";function s(){this._subscribers={}}s.prototype.subscribe=function(e,t,n){this.isHandlerAttached(e,t)||this.get(t).push({handler:e,context:n,eventName:t})},s.prototype.unsubscribe=function(e,t){this._subscribers[t]=this.get(t).filter(function(t){return e!==t.handler})},s.prototype.unsubscribeAll=function(){this._subscribers={}},s.prototype.trigger=function(e,t){var n=this;this.get(e).concat(this.get("*")).forEach(function(e){setTimeout(function(){n.isHandlerAttached(e.handler,e.eventName)&&e.handler.call(e.context,t)},0)})},s.prototype.triggerSync=function(e,t){this.get(e).concat(this.get("*")).forEach(function(e){e.handler.call(e.context,t)})},s.prototype.get=function(e){return this._subscribers[e]||(this._subscribers[e]=[]),this._subscribers[e]},s.prototype.isHandlerAttached=function(e,t){return this.get(t).some(function(t){return e===t.handler})},t.exports=s},{}],13:[function(e,t){"use strict";function o(){}var s={};function i(e){var t=s[e];t&&(clearTimeout(t),delete s[e])}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="object"==typeof s?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)}t.exports={noop:o,validate:function(e,t){return e?null:new Error(t)},clearCallbackTimeout:i,callbackTimeout:function(e,t,n){var a,r;return r=setTimeout(function(){t=o,delete r[a],n()},e),s[a=function(){t.apply(this,arguments)&&i(a)}]=r,a},createElementInEl:function(e,t,n){var s=document.createElement(t);return n&&(s.id=n),e.appendChild(s),s},createIframeWithContent:function(e,t,n){var s=a(e,null,n.zIndex);if(c(s,r(t,n)))return s},createIframe:a,simpleTemplate:r,setIframeContent:c,extend:function(e,t){return Object.keys(t).forEach(function(n){e[n]=t[n]}),e},unique:function(e){var t=-1;return function(){return e+"_"+ ++t}}}},{}],14:[function(e,t){var o=this,s=function(){var l,p,O,x,C,B,n="undefined",c="object",H="Shockwave Flash",b="application/x-shockwave-flash",P="SWFObjectExprInst",z="onreadystatechange",o=window,t=document,a=navigator,R=!1,f=[],r=[],j=[],m=[],d=!1,_=!1,L=!0,w=!1,e=function(){var d,h=typeof t.getElementById!==n&&typeof t.getElementsByTagName!==n&&typeof t.createElement!==n,r=a.userAgent.toLowerCase(),u=a.platform.toLowerCase(),m=/win/.test(u||r),f=/mac/.test(u||r),p=!!/webkit/.test(r)&&parseFloat(r.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")),l="Microsoft Internet Explorer"===a.appName,i=[0,0,0],e=null;if(typeof a.plugins!==n&&typeof a.plugins[H]===c)(e=a.plugins[H].description)&&typeof a.mimeTypes!==n&&a.mimeTypes[b]&&a.mimeTypes[b].enabledPlugin&&(l=!(R=!0),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{d=new ActiveXObject("ShockwaveFlash.ShockwaveFlash"),d&&(e=d.GetVariable("$version"))&&(l=!0,i=[s((e=e.split(" ")[1].split(","))[0]),s(e[1]),s(e[2])])}catch{}return{w3:h,pv:i,wk:p,ie:l,win:m,mac:f}}();e.w3&&((typeof t.readyState!==n&&("complete"===t.readyState||"interactive"===t.readyState)||typeof t.readyState===n&&(t.getElementsByTagName("body")[0]||t.body))&&g(),d||(typeof t.addEventListener!==n&&t.addEventListener("DOMContentLoaded",g,!1),e.ie&&(t.attachEvent(z,function e(){"complete"===t.readyState&&(t.detachEvent(z,e),g())}),o==top&&function e(){if(!d){try{t.documentElement.doScroll("left")}catch{return void setTimeout(e,0)}g()}}()),e.wk&&function e(){d||(/loaded|complete/.test(t.readyState)?g():setTimeout(e,0))}()));function g(){if(!d&&document.getElementsByTagName("body")[0]){try{e=i("span"),e.style.display="none",(n=t.getElementsByTagName("body")[0].appendChild(e)).parentNode.removeChild(n),e=n=null}catch{return}d=!0;for(var e,n,o=f.length,s=0;s<o;s++)f[s]()}}function N(e){d?e():f[f.length]=e}function k(){if(f=r.length,0<f)for(o=0;o<f;o++){var i=r[o].id,a=r[o].callbackFn,s={success:!1,id:i};if(0<e.pv[0]){if(t=h(i),t)if(!y(r[o].swfVersion)||e.wk&&e.wk<312)if(r[o].expressInstall&&S()){c={},c.data=r[o].expressInstall,c.width=t.getAttribute("width")||"0",c.height=t.getAttribute("height")||"0",t.getAttribute("class")&&(c.styleclass=t.getAttribute("class")),t.getAttribute("align")&&(c.align=t.getAttribute("align"));for(var t,o,c,d,f,p={},m=t.getElementsByTagName("param"),g=m.length,l=0;l<g;l++)"movie"!==m[l].getAttribute("name").toLowerCase()&&(p[m[l].getAttribute("name")]=m[l].getAttribute("value"));M(c,p,i,a)}else W(t),a&&a(s);else u(i,!0),a&&(s.success=!0,s.ref=A(i),s.id=i,a(s))}else u(i,!0),a&&(d=A(i),d&&typeof d.SetVariable!==n&&(s.success=!0,s.ref=d,s.id=d.id),a(s))}}function A(e){var s=null,t=h(e);return t&&"OBJECT"===t.nodeName.toUpperCase()&&(s=typeof t.SetVariable!==n?t:t.getElementsByTagName(c)[0]||t),s}function S(){return!_&&y("6.0.65")&&(e.win||e.mac)&&!(e.wk&&e.wk<312)}function M(a,r,c,l){if(d=h(c),c=E(c),O=l||null,B={success:!(_=!0),id:c},d){x="OBJECT"===d.nodeName.toUpperCase()?(p=T(d),null):(p=d,c),a.id=P,(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 d,u,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&&4!=d.readyState)&&(u=i("div"),c+="SWFObjectNew",u.setAttribute("id",c),d.parentNode.insertBefore(u,d),d.style.display="none",v(d)),F(a,r,c)}}function W(t){if(e.ie&&4!=t.readyState){t.style.display="none";var n=i("div");t.parentNode.insertBefore(n,t),n.parentNode.replaceChild(T(t),n),v(t)}else t.parentNode.replaceChild(T(t),t)}function T(t){if(o=i("div"),e.win&&e.ie)o.innerHTML=t.innerHTML;else if(a=t.getElementsByTagName(c)[0],a&&(n=a.childNodes,n))for(var n,o,a,r=n.length,s=0;s<r;s++)1==n[s].nodeType&&"PARAM"===n[s].nodeName||8==n[s].nodeType||o.appendChild(n[s].cloneNode(!0));return o}function F(t,s,o){var a,r,l,d,m,u=h(o);if(o=E(o),e.wk&&e.wk<312)return d;if(u){a=i(e.ie?"div":c);for(l in typeof t.id===n&&(t.id=o),s)s.hasOwnProperty(l)&&"movie"!==l.toLowerCase()&&$(a,l,s[l]);for(r in e.ie&&(a=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}(t.data,a.innerHTML)),t)t.hasOwnProperty(r)&&("styleclass"===(m=r.toLowerCase())?a.setAttribute("class",t[r]):"classid"!==m&&"data"!==m&&a.setAttribute(r,t[r]));e.ie?j[j.length]=t.id:(a.setAttribute("type",b),a.setAttribute("data",t.data)),u.parentNode.replaceChild(a,u),d=a}return d}function $(e,t,n){var s=i("param");s.setAttribute("name",t),s.setAttribute("value",n),e.appendChild(s)}function v(t){var n=h(t);n&&"OBJECT"===n.nodeName.toUpperCase()&&(e.ie?(n.style.display="none",function e(){if(4==n.readyState){for(var t in n)"function"==typeof n[t]&&(n[t]=null);n.parentNode.removeChild(n)}else setTimeout(e,10)}()):n.parentNode.removeChild(n))}function D(e){return e&&e.nodeType&&1===e.nodeType}function E(e){return D(e)?e.id:e}function h(e){if(D(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 y(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 I(s,o,a,r){var c,d,u=t.getElementsByTagName("head")[0];u&&(c="string"==typeof a?a:"screen",(r&&(C=l=null),!l||C!=c)&&(d=i("style"),d.setAttribute("type","text/css"),d.setAttribute("media",c),l=u.appendChild(d),e.ie&&typeof t.styleSheets!==n&&0<t.styleSheets.length&&(l=t.styleSheets[t.styleSheets.length-1]),C=c),l&&(typeof l.addRule!==n?l.addRule(s,o):typeof t.createTextNode!==n&&l.appendChild(t.createTextNode(s+" {"+o+"}"))))}function u(e,t){if(L){var n=t?"visible":"hidden",s=h(e);d&&s?s.style.visibility=n:"string"==typeof e&&I("#"+e,"visibility:"+n)}}function V(e){return null!==/[\\"<>.;]/.exec(e)&&typeof encodeURIComponent!==n?encodeURIComponent(e):e}return f[0]=function(){R?function(){var o,r,l=t.getElementsByTagName("body")[0],a=i(c);a.setAttribute("style","visibility: hidden;"),a.setAttribute("type",b),o=l.appendChild(a),o?(r=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(r<10)return r++,void setTimeout(t,10);l.removeChild(a),o=null,k()}()):k()}():k()},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]);for(s=j.length,n=0;n<s;n++)v(j[n]);for(i in e)e[i]=null;for(a in e=null,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,r[r.length]=i,u(t,!1)}else o&&o({success:!1,id:t})},getObjectById:function(t){if(e.w3)return A(t)},embedSWF:function(t,s,o,i,a,r,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),N(function(){if(o+="",i+="",e={},h&&typeof h===c)for(j in h)e[j]=h[j];if(e.data=t,e.width=o,e.height=i,g={},d&&typeof d===c)for(_ in d)g[_]=d[_];if(l&&typeof l===c)for(v in l)if(l.hasOwnProperty(v)){var e,g,v,b,j,_,O=w?encodeURIComponent(v):v,x=w?encodeURIComponent(l[v]):l[v];typeof g.flashvars!==n?g.flashvars+="&"+O+"="+x:g.flashvars=O+"="+x}if(y(a))b=F(e,g,s),e.id==f&&u(f,!0),p.success=!0,p.ref=b,p.id=b.id;else{if(r&&S())return e.data=r,void M(e,g,s,m);u(f,!0)}m&&m(p)})):m&&m(p)},switchOffAutoHideShow:function(){L=!1},enableUriEncoding:function(e){w=typeof e===n||e},ua:e,getFlashPlayerVersion:function(){return{major:e.pv[0],minor:e.pv[1],release:e.pv[2]}},hasFlashPlayerVersion:y,createSWF:function(t,n,s){return e.w3?F(t,n,s):void 0},showExpressInstall:function(t,n,s,o){e.w3&&S()&&M(t,n,s,o)},removeSWF:function(t){e.w3&&v(t)},createCSS:function(t,n,s,o){e.w3&&I(t,n,s,o)},addDomLoadEvent:N,addLoadEvent:function(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)!function(e,t,n){e.attachEvent(t,n),m[m.length]=[e,t,n]}(o,"onload",e);else if("function"==typeof o.onload){var s=o.onload;o.onload=function(){s(),e()}}else o.onload=e},getQueryParamValue:function(e){if(n=t.location.search||t.location.hash,n){if(/\?/.test(n)&&(n=n.split("?")[1]),!e)return V(n);for(var n,o=n.split("&"),s=0;s<o.length;s++)if(o[s].substring(0,o[s].indexOf("="))==e)return V(o[s].substring(o[s].indexOf("=")+1))}return""},expressInstallCallback:function(){if(_){var t=h(P);t&&p&&(t.parentNode.replaceChild(p,t),x&&(u(x,!0),e.ie&&(p.style.display="block")),O&&O(B)),_=!1}},version:"2.3"}};"function"==typeof define&&define.amd?define(s):"object"==typeof t&&t.exports?t.exports=s():o.swfobject=s()},{}],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 a=e("./TrackingEvent"),i=e("../../utils/utilityFunctions"),s=e("../../utils/xml"),o=e("../../utils/consoleLogger");t.exports=function e(t){if(!(this instanceof e))return new e(t);o.info("<Companion> found companion ad"),o.debug("<Companion> companionJTree:",t),this.creativeType=s.attr(t.staticResource,"creativeType"),this.staticResource=s.keyValue(t.staticResource),o.info("<Companion> creativeType: "+this.creativeType),o.info("<Companion> staticResource: "+this.staticResource);var n,r=null;s.keyValue(t.HTMLResource)?r=s.keyValue(t.HTMLResource):s.keyValue(t.hTMLResource)&&(r=s.keyValue(t.hTMLResource)),null!==r&&o.info("<Companion> found html resource",r),this.htmlResource=r,n=null,s.keyValue(t.IFrameResource)?n=s.keyValue(t.IFrameResource):s.keyValue(t.iFrameresource)&&(n=s.keyValue(t.iFrameresource)),null!==n&&o.info("<Companion> found iframe resource",n),this.iframeResource=n,this.id=s.attr(t,"id"),this.width=s.attr(t,"width"),this.height=s.attr(t,"height"),this.expandedWidth=s.attr(t,"expandedWidth"),this.expandedHeight=s.attr(t,"expandedHeight"),this.scalable=s.attr(t,"scalable"),this.maintainAspectRatio=s.attr(t,"maintainAspectRatio"),this.minSuggestedDuration=s.attr(t,"minSuggestedDuration"),this.apiFramework=s.attr(t,"apiFramework"),this.companionClickThrough=s.keyValue(t.companionClickThrough),this.trackingEvents=function(e){var t=[];return i.isDefined(e)&&(e=i.isArray(e)?e:[e]).forEach(function(e){t.push(new a(e))}),t}(t.trackingEvents&&t.trackingEvents.tracking),o.info("<Companion> companionClickThrough: "+this.companionClickThrough)}},{"../../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]).forEach(function(e){n.push(new a(e))}),this.companionAds=n}}s.prototype.isSupported=function(){return!this.linear||this.linear.isSupported()},s.parseCreatives=function(e){var t=[];return o.isDefined(e)&&o.isDefined(e.creative)&&(o.isArray(e.creative)?e.creative:[e.creative]).forEach(function(e){t.push(new s(e))}),t},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=function(e){return e?i.transformArray(i.isArray(e)?e:[e],function(e){if(i.isNotEmptyString(e.keyValue))return{uri:e.keyValue,type:e.attr("type")}}):[]}(e.survey),this.error=s.keyValue(e.error),this.pricing=s.keyValue(e.pricing),this.extensions=e.extensions}o.prototype.isSupported=function(){var e,t;if(0===this.creatives.length)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=function(e){var t=[];return o.isDefined(e)&&(e=o.isArray(e)?e:[e]).forEach(function(e){t.push(new c(e))}),t}(e.mediaFiles&&e.mediaFiles.mediaFile),this.trackingEvents=function(e,t){var n=[];return o.isDefined(e)&&(e=o.isArray(e)?e:[e]).forEach(function(e){n.push(new r(e,t))}),n}(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)))}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):"video/x-flv"!==this.type||o.isFlashSupported()},t.exports=s},{"../../utils/xml":48,"./vastUtil":30}],21:[function(e,t){"use strict";var s=e("./parsers"),o=e("../../utils/xml");t.exports=function e(t,n){if(!(this instanceof e))return new e(t,n);this.name=t.attr("event"),this.uri=o.keyValue(t),"progress"===this.name&&(this.offset=s.offset(t.attr("offset"),n))}},{"../../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);e=e||{},this.settings=o.extend({},e,{WRAPPER_LIMIT:5}),this.errorURLMacros=[]}i.prototype.getVASTResponse=function(e,t){var i=this,n=function(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")}(e,t);if(n){if(o.isFunction(t))return t(n);throw n}a.waterfall([this._getVASTAd.bind(this,e),function(e,t){try{var n=i._buildVASTResponse(e);t(null,n)}catch(e){t(e)}}],t)},i.prototype._getVASTAd=function(e,t){var d,u,h,n=this;function f(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(m(n),n)}catch{t(new s("on VASTClient.getVASTAd.buildVastWaterfall, error parsing xml",100),null)}}function m(e){var t=r.attr(e,"version");return e.ad?t&&3!=t&&2!=t?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,c){if(t.length>=n.WRAPPER_LIMIT)return c(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)?function(e,t){n._requestVASTXml(e,function(e,n){if(e)return t(e);try{var o=r.toJXONTree(n);t(m(o),o.ad)}catch{t(new s("on VASTClient.getVASTAd.requestVASTAd, error parsing xml",100))}})}(e,t):t(null,e)},p],function(e,n){return n&&t.push(n),e?c(e,t):n.wrapper?i(n.wrapper.VASTAdTagURI,t,c):c(null,t)})}function p(e,t){try{var n=new l(e);t(function(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?!n||n.isSupported()?!t||t.VASTAdTagURI?null:new s(o+"missing 'VASTAdTagURI' in wrapper",101):new s(o+"could not find MediaFile that is supported by this video player",403):new s(o+"nor wrapper nor inline elements found on the Ad",101)}(n),n)}catch{t(new s("on VASTClient.getVASTAd.buildAd, error parsing xml",100),null)}}d=e,u=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(),[],function e(s,o){s?(n._trackError(s,o),0<a.length?i(a.shift(),[],e):t(s,o)):t(null,o)})},h=n._requestVASTXml.bind(n,d),a.waterfall([h,f],u)},i.prototype._requestVASTXml=function(e,t){try{o.isFunction(e)?e(n):(c.info("requesting adTagUrl: "+e),h.get(e,n,{withCredentials:!0}))}catch(e){t(e)}function n(e,n,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 t(new s(a,301),null)}t(null,n)}},i.prototype._buildVASTResponse=function(e){var n,t=new d;return n=t,e.forEach(function(e){n.addAd(e)}),function(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(void 0===e.duration)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)})}(t),t},i.prototype._trackError=function(e,t){if(o.isArray(t)&&0!==t.length){var n=[];t.forEach(function(e){e.wrapper&&e.wrapper.error&&n.push(e.wrapper.error),e.inLine&&e.inLine.error&&n.push(e.inLine.error)}),u.track(n,{ERRORCODE:e.code||900})}},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).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(e,t){var n=this;return t=t||r.noop,e instanceof d?(h.waterfall([function(t){t(null,e)},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,s){e&&s&&n._trackError(e,s),t(e,s)}),this._adUnit={_src:null,type:"VAST",pauseAd:function(){n.player.pause(!0)},resumeAd:function(){n.player.play(!0)},isPaused:function(){return n.player.paused(!0)},getSrc:function(){return this._src}},this._adUnit):t(new c("On VASTIntegrator, missing required VASTResponse"))},s.prototype._selectAdSource=function(e,t){var n,s=o.getDimension(this.player.el()).width;if(e.mediaFiles.sort(function(e,t){return Math.abs(s-e.width)-Math.abs(s-t.width)}),n=this.player.selectSource(e.mediaFiles).source)return a.info("selected source: ",n),this._adUnit&&(this._adUnit._src=n),t(null,n,e);t(new c("Could not find Ad mediafile supported by this player",403),e)},s.prototype._createVASTTracker=function(e,t,n){try{n(null,e,new u(e.src,t),t)}catch(e){n(e,t)}},s.prototype._setupEvents=function(e,t,n,s){var a,o=this.player;return o.on("fullscreenchange",r),o.on("vast.adStart",d),o.on("pause",c),o.on("timeupdate",l),o.on("volumechange",u),i.once(o,["vast.adEnd","vast.adsCancel"],function(){o.off("fullscreenchange",r),o.off("vast.adStart",d),o.off("pause",c),o.off("timeupdate",l),o.off("volumechange",u)}),i.once(o,["vast.adEnd","vast.adsCancel","vast.adSkip"],function(e){"vast.adEnd"===e.type&&t.trackComplete()}),s(null,e,n);function r(){o.isFullscreen()?t.trackFullscreen():t.trackExitFullscreen()}function c(){Math.abs(o.duration()-o.currentTime())<2||(t.trackPause(),i.once(o,["play","vast.adEnd","vast.adsCancel"],function(e){"play"===e.type&&t.trackResume()}))}function l(){var e=1e3*o.currentTime();t.trackProgress(e)}function d(){t.trackImpressions(),t.trackCreativeView()}function u(){var e=o.muted();e?t.trackMute():a&&t.trackUnmute(),a=e}},s.prototype._addSkipButton=function(e,t,n,s){var a,c,l,d,u,h=this;r.isNumber(n.skipoffset)&&(d=n.skipoffset/1e3,a=this.player,u=d,c=function(e){var n=window.document.createElement("div");return o.addClass(n,"vast-skip-button"),n.onclick=function(s){if(o.hasClass(n,"enabled")&&(t.trackSkip(),e.trigger("vast.adSkip")),void 0===window.Event.prototype.stopPropagation)return!1;s.stopPropagation()},n}(a),l=function(e,t,n){var s=Math.ceil(t-n.currentTime());0<s?e.innerHTML="Skip in "+r.toFixedDigits(s,2)+"...":o.hasClass(e,"enabled")||(o.addClass(e,"enabled"),e.innerHTML="Skip ad")}.bind(h,c,u,a),a.el().appendChild(c),a.on("timeupdate",l),i.once(a,["vast.adEnd","vast.adsCancel"],function(){a.off("timeupdate",l),o.remove(c)})),s(null,e,t,n)},s.prototype._addClickThrough=function(e,t,n,s){var a=this.player,c=function(e,t,n){var s=window.document.createElement("a"),i=n.clickThrough;return o.addClass(s,"vast-blocker"),s.href=u(i,e),r.isString(i)&&(s.target="_blank"),s.onclick=function(n){if(e.paused())return e.play(),void 0!==window.Event.prototype.stopPropagation&&n.stopPropagation(),!1;e.pause(),t.trackClick()},s}(a,t,n),d=function(e,t,n){e.href=u(t.clickThrough,n)}.bind(this,c,n,a);return a.el().insertBefore(c,a.controlBar.el()),a.on("timeupdate",d),i.once(a,["vast.adEnd","vast.adsCancel"],function(){a.off("timeupdate",d),o.remove(c)}),s(null,e,t,n);function u(t,n){var s={ASSETURI:e.src,CONTENTPLAYHEAD:l.formatProgress(1e3*n.currentTime())};return t?l.parseURLMacro(t,s):"#"}},s.prototype._playSelectedAd=function(e,t,n){var s=this.player;s.preload("auto"),s.src(e),a.debug("<VASTIntegrator._playSelectedAd> waiting for durationchange to play the ad..."),i.once(s,["durationchange","error","vast.adsCancel"],function(e){"durationchange"===e.type?(a.debug("<VASTIntegrator._playSelectedAd> got durationchange; calling playAd()"),i.once(s,["playing","vast.adsCancel"],function(e){function o(e){"ended"===e.type&&3<s.duration()-s.currentTime()||(s.off("ended",o),s.off("vast.adsCancel",o),s.off("vast.adSkip",o),"ended"!==e.type&&"vast.adSkip"!==e.type||n(null,t))}"vast.adsCancel"!==e.type&&(a.debug("<VASTIntegrator._playSelectedAd/playAd> got playing event; triggering vast.adStart..."),s.trigger("vast.adStart"),s.on("ended",o),s.on("vast.adsCancel",o),s.on("vast.adSkip",o))}),a.debug("<VASTIntegrator._playSelectedAd/playAd> calling player.play()..."),s.play()):"error"===e.type&&n(new c("on VASTIntegrator, Player is unable to play the Ad",400),t)})},s.prototype._trackError=function(e,t){l.track(t.errorURLMacros,{ERRORCODE:e.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");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}function i(e,t){t.forEach(function(t){e.push(t)})}window.InLine__A=a,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]).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},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(e,t){o.isArray(e)&&0<e.length&&(t=o.extend({ASSETURI:this.assetURI,CONTENTPLAYHEAD:a.formatProgress(this.progress)},t||{}),a.track(e,t))},s.prototype.trackEvent=function(e,t){this.trackURLs(function(e){var t;return e&&(t=[],e.forEach(function(e){t.push(e.uri)})),t}(this.response.trackingEvents[e])),t&&(this.response.trackingEvents[e]=void 0)},s.prototype.trackProgress=function(e){var s,a,t=this,r=[],c=!0,n=this.response.trackingEvents;function i(e,t,s){n[e]&&s&&r.push({name:e,trackOnce:!!t})}function l(e,t){var n=e.time;return n<=t&&t<=n+5e3}o.isNumber(e)&&(i("start",c,0<e),i("rewind",!1,(s=this.progress,(a=e)<s&&3e3<Math.abs(a-s))),function(e){var s=t.quartiles,o=t.quartiles.firstQuartile,a=t.quartiles.midpoint,r=t.quartiles.thirdQuartile;o.tracked?a.tracked?r.tracked||n("thirdQuartile",e):n("midpoint",e):n("firstQuartile",e);function n(e,t){var n=s[e];l(n,t)&&(n.tracked=!0,i(e,c,!0))}}(e),function(e){if(!o.isArray(n.progress))return;var s=[];n.progress.forEach(function(n){n.offset<=e?t.trackURLs([n.uri]):s.push(n)}),n.progress=s}(e),r.forEach(function(e){t.trackEvent(e.name,e.trackOnce)}),this.progress=e)},["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(e){o.isNumber(e)&&this.trackURLs(this.response.errorURLMacros,{ERRORCODE:e})},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 o=e("../../utils/utilityFunctions"),s=e("../../utils/xml");t.exports=function e(t){if(!(this instanceof e))return new e(t);function n(e){var t=[];return e&&(e=o.isArray(e)?e:[e]).forEach(function(e){t.push(s.keyValue(e))}),t}this.clickThrough=s.keyValue(t.clickThrough),this.clickTrackings=n(t.clickTracking),this.customClicks=n(t.customClick)}},{"../../utils/utilityFunctions":47,"../../utils/xml":48}],28:[function(e,t){"use strict";var o=e("./vastUtil"),i=e("./Creative"),a=e("../../utils/utilityFunctions"),s=e("../../utils/xml");t.exports=function e(t){if(!(this instanceof e))return new e(t);this.adSystem=s.keyValue(t.adSystem),this.impressions=o.parseImpressions(t.impression),this.VASTAdTagURI=s.keyValue(t.vASTAdTagURI),this.creatives=i.parseCreatives(t.creatives),this.error=s.keyValue(t.error),this.extensions=t.extensions,this.followAdditionalWrappers=!a.isDefined(s.attr(t,"followAdditionalWrappers"))||s.attr(t,"followAdditionalWrappers"),this.allowMultipleAds=s.attr(t,"allowMultipleAds"),this.fallbackOnNoAd=s.attr(t,"fallbackOnNoAd")}},{"../../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){var t,n,s,a;return o.isString(e)&&(t=e.match(i))&&(a=t[1],n=60*parseInt(a,10)*60*1e3+r(t[2])+(s=t[3],1e3*parseInt(s,10))+parseInt(t[5]||0)),isNaN(n)?null:n;function r(e){return 60*parseInt(e,10)*1e3}},offset:function(e,t){return/^\d+(\.\d+)?%$/g.test(e)?function(e,t){return t?function(e,t){return e*t/100}(t,parseFloat(e.replace("%",""))):null}(e,t):s.duration(e)}};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(e,t){var s=o.parseURLMacros(e,t),n=[];return s.forEach(function(e){var t=new Image;t.src=e,n.push(t)}),n},parseURLMacros:function(e,t){var n=[];return(t=t||{}).CACHEBUSTING||(t.CACHEBUSTING=Math.round(1e10*Math.random())),e.forEach(function(e){n.push(o._parseURLMacro(e,t))}),n},parseURLMacro:function(e,t){return(t=t||{}).CACHEBUSTING||(t.CACHEBUSTING=Math.round(1e10*Math.random())),o._parseURLMacro(e,t)},_parseURLMacro:function(e,t){return t=t||{},s.forEach(t,function(t,n){e=e.replace(new RegExp("\\["+n+"\\]","gm"),t)}),e},parseDuration:function(e){var t,n,o,i,a;return s.isString(e)&&(t=e.match(/(\d\d):(\d\d):(\d\d)(\.(\d\d\d))?/))&&(a=t[1],n=60*parseInt(a,10)*60*1e3+(i=t[2],60*parseInt(i,10)*1e3)+(o=t[3],1e3*parseInt(o,10))+parseInt(t[5]||0)),isNaN(n)?null:n},parseImpressions:function(e){return e?(e=s.isArray(e)?e:[e],s.transformArray(e,function(e){if(s.isNotEmptyString(e.keyValue))return e.keyValue})):[]},formatProgress:function(e){var t,n,o,i;return t=e/36e5,t=Math.floor(t),n=e/6e4%60,n=Math.floor(n),o=e/1e3%60,o=Math.floor(o),i=e%1e3,s.toFixedDigits(t,2)+":"+s.toFixedDigits(n,2)+":"+s.toFixedDigits(o,2)+"."+s.toFixedDigits(i,3)},parseOffset:function(e,t){return/^\d+(\.\d+)?%$/g.test(e)?function(e,t){return t?function(e,t){return e*t/100}(t,parseFloat(e.replace("%",""))):null}(e,t):o.parseDuration(e)},VPAID_techs:[r,a],isVPAID:function(e){return!!e&&"VPAID"===e.apiFramework},findSupportedVPAIDTech:function(e){var t,n,s;for(t=0,n=this.VPAID_techs.length;t<n;t+=1)if((s=this.VPAID_techs[t]).supports(e))return s;return null},isFlashSupported:function(){return i.isSupported()},runFlashSupportCheck:function(e){i.runFlashTest({data:e})}};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);!function(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")}(e,t),this.options=o.extend({},t),this._adUnit=e}s.checkVPAIDInterface=function(e){for(var t,s=["handshakeVersion","initAd","startAd","stopAd","resizeAd","pauseAd","expandAd","collapseAd"],n=0,i=s.length;n<i;n++)if(!e||!o.isFunction(e[s[n]]))return!1;return t=e,(o.isFunction(t.subscribe)||o.isFunction(t.addEventListener)||o.isFunction(t.on))&&a(e);function a(e){return o.isFunction(e.unsubscribe)||o.isFunction(e.removeEventListener)||o.isFunction(e.off)}},s.prototype.adUnitAsyncCall=function(){var e,t=o.arrayLikeObjToArray(arguments),s=t.shift(),n=t.pop();!function(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")}(s,n,this._adUnit),t.push(function(){e&&clearTimeout(e),n.apply(this,arguments)}),this._adUnit[s].apply(this._adUnit,t),e=setTimeout(function(){e=null,n(new i("on VPAIDAdUnitWrapper, timeout while waiting for a response on call '"+s+"'")),n=o.noop},this.options.responseTimeout)},s.prototype.on=function(e,t){(this._adUnit.addEventListener||this._adUnit.subscribe||this._adUnit.on).call(this._adUnit,e,t)},s.prototype.off=function(e,t){(this._adUnit.removeEventListener||this._adUnit.unsubscribe||this._adUnit.off).call(this._adUnit,e,t)},s.prototype.waitForEvent=function(e,t,n){var s;!function(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")}(e,t),n=n||null,this.on(e,function(){var e=o.arrayLikeObjToArray(arguments);s&&(clearTimeout(s),s=null),e.unshift(null),t.apply(n,e)}),s=setTimeout(function(){t(new i("on VPAIDAdUnitWrapper.waitForEvent, timeout while waiting for event '"+e+"'")),s=null,t=o.noop},this.options.responseTimeout)},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);!function(e){if(!e||!a.isString(e.src))throw new o("on VPAIDFlashTech, invalid MediaFile")}(e),this.name="vpaid-flash",this.mediaFile=e,this.containerEl=null,this.vpaidFlashClient=null,this.settings=t}s.VPAIDFLASHClient=l,s.supports=function(e){return-1<c.flash.indexOf(e)&&s.VPAIDFLASHClient.isSupported()},s.prototype.loadAdUnit=function(e,t,n){var c=this,l=this.settings&&this.settings.vpaidFlashLoaderPath?{data:this.settings.vpaidFlashLoaderPath}:void 0;function d(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")}d(e,n),this.containerEl=e,i.debug("<VPAIDFlashTech.loadAdUnit> loading VPAIDFLASHClient with opts:",l),this.vpaidFlashClient=new s.VPAIDFLASHClient(e,function(e){if(e)return n(e);i.info("<VPAIDFlashTech.loadAdUnit> calling VPAIDFLASHClient.loadAdUnit(); that.mediaFile:",c.mediaFile),c.vpaidFlashClient.loadAdUnit(c.mediaFile.src,n)},l)},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);!function(e){if(!e||!a.isString(e.src))throw new i(s.INVALID_MEDIA_FILE)}(e),this.name="vpaid-html5",this.containerEl=null,this.videoEl=null,this.vpaidHTMLClient=null,this.mediaFile=e}s.VPAIDHTML5Client=l,s.supports=function(e){return!a.isOldIE()&&-1<c.html5.indexOf(e)},s.prototype.loadAdUnit=function(e,t,n){!function(e,t,n){if(!r.isDomElement(e))throw new i(s.INVALID_DOM_CONTAINER_EL);if(!r.isDomElement(t)||"video"!==t.tagName.toLowerCase())throw new i(s.INVALID_DOM_CONTAINER_EL);if(!a.isFunction(n))throw new i(s.MISSING_CALLBACK)}(e,t,n),this.containerEl=e,this.videoEl=t,this.vpaidHTMLClient=new s.VPAIDHTML5Client(e,t,{}),this.vpaidHTMLClient.loadAdUnit(this.mediaFile.src,n)},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);var n;this.VIEW_MODE={NORMAL:"normal",FULLSCREEN:"fullscreen",THUMBNAIL:"thumbnail"},this.player=e,this.containerEl=(n=document.createElement("div"),o.addClass(n,"VPAID-container"),e.el().insertBefore(n,e.controlBar.el()),n),this.options={responseTimeout:5e3,VPAID_VERSION:"2.0"},this.settings=t}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)}s.prototype.playAd=function(e,t){if(!(e instanceof m))return t(new a("on VASTIntegrator.playAd, missing required VASTResponse"));var s,u=this,n=this.player;return c.debug("<VPAIDIntegrator.playAd> looking for supported tech..."),s=this._findSupportedTech(e,this.settings),(t=t||i.noop,this._adUnit=null,o.addClass(n.el(),"vjs-vpaid-ad"),n.on("vast.adsCancel",l),n.one("vpaid.adEnd",function(){n.off("vast.adsCancel",l),function(){s&&s.unloadAdUnit(),o.removeClass(n.el(),"vjs-vpaid-ad")}()}),s)?(c.info("<VPAIDIntegrator.playAd> found tech: ",s),d.waterfall([function(t){t(null,s,e)},this._loadAdUnit.bind(this),this._playAdUnit.bind(this),this._finishPlaying.bind(this)],r),this._adUnit={_paused:!0,type:"VPAID",pauseAd:function(){n.trigger("vpaid.pauseAd"),n.pause(!0)},resumeAd:function(){n.trigger("vpaid.resumeAd")},isPaused:function(){return this._paused},getSrc:function(){return s.mediaFile}}):(c.debug("<VPAIDIntegrator.playAd> could not find suitable tech"),r(new a("on VPAIDIntegrator.playAd, could not find a supported mediaFile",403),this._adUnit,e)),this._adUnit;function r(e,s,o){e&&o&&u._trackError(o,e.code),n.trigger("vpaid.adEnd"),t(e,o)}function l(){n.trigger("vpaid.adEnd")}},s.prototype._findSupportedTech=function(e,t){if(!(e instanceof m))return null;var n,s,i,c,l,d=e.mediaFiles.filter(r.isVPAID),o=t&&t.preferredTech,a=[];for(s=0,l=d.length;s<l;s+=1)if(n=d[s],i=r.findSupportedVPAIDTech(n.type)){if(!!o&&(n.type===o||u[o]&&-1<u[o].indexOf(n.type)))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(e,t,n){e.handshakeVersion(this.options.VPAID_VERSION,function(s,o){return s?n(s,e,t):o&&function(e){var t=function(e){var t=e.split(".");return parseInt(t[0],10)}(e);return 1<=t&&t<=2}(o)?n(null,e,t):n(new a('on VPAIDIntegrator._handshake, unsupported version "'+o+'"'),e,t)})},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 g=e.options.src,a=this._createVASTTracker(g,t),s=this.player,c=this;function d(){c._adUnit&&c._adUnit.isPaused()&&(c._adUnit._paused=!1),s.trigger("play")}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(),d()}),e.on("AdVideoStart",function(){s.trigger("vpaid.AdVideoStart"),a.trackStart(),d()}),e.on("AdPlaying",function(){s.trigger("vpaid.AdPlaying"),a.trackResume(),d()}),e.on("AdPaused",function(){s.trigger("vpaid.AdPaused"),a.trackPause(),function(){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,c,l=n.url,u=n.playerHandles,d=i.isNotEmptyString(l)?l:(o=t.clickThrough,c={ASSETURI:e.options.src,CONTENTPLAYHEAD:0},o?r.parseURLMacro(o,c):null);a.trackClick(),u&&d&&window.open(d,"_blank")}),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&&(0===n&&0<t&&a.trackMute(),0<n&&0===t&&a.trackUnmute(),s.volume(n))})});var u=h.bind(this,s,e,this.VIEW_MODE),l=i.throttle(u,100),m=this.settings.autoResize;function f(){e.pauseAd(i.noop)}function p(){e.resumeAd(i.noop)}m&&(o.addEventListener(window,"resize",l),o.addEventListener(window,"orientationchange",l)),s.on("vast.resize",u),s.on("vpaid.pauseAd",f),s.on("vpaid.resumeAd",p),s.one("vpaid.adEnd",function(){s.off("vast.resize",u),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)},s.prototype._addSkipButton=function(e,t,n){var s,a=this.player;function r(){o.remove(s),s=null}e.on("AdSkippableStateChange",function(){a.trigger("vpaid.AdSkippableStateChange"),e.getAdSkippableState(function(t,n){n?s||function(t){s=function(){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),void 0===window.Event.prototype.stopPropagation)return!1;t.stopPropagation()},t}(),t.el().appendChild(s)}(a):r()})}),f.once(a,["vast.adEnd","vast.adsCancel"],r),n(null,e,t)},s.prototype._linkPlayerControls=function(e,t,n){var s,o,i,a,r=this;!function(e,t){function n(){var n=e.muted()?0:e.volume();t.setAdVolume(n,l)}e.on("volumechange",n),t.on("AdVolumeChange",function(){e.trigger("vpaid.AdVolumeChange");var n=e.volume();t.getAdVolume(function(t,s){t?l(t):n!==s&&e.volume(s)})}),e.one("vpaid.adEnd",function(){e.off("volumechange",n)})}(this.player,e),s=this.player,i=e,a=this.VIEW_MODE,o=h.bind(r,s,i,a),s.on("fullscreenchange",o),s.one("vpaid.adEnd",function(){s.off("fullscreenchange",o)}),n(null,e,t)},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;function s(s){n(s,e,t)}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))})},s.prototype._trackError=function(e,t){r.track(e.errorURLMacros,{ERRORCODE:t||901})},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=e("../../utils/dom"),s=document.createElement("div");s.className="vjs-ads-label vjs-control vjs-label-hidden",s.innerHTML="Advertisement",t.exports=function(e){return{init:function(t,n){n.el=s,e.call(this,t,n),setTimeout(function(){var e=t.controlBar&&(t.controlBar.getChild("timerControls")||t.controlBar.getChild("currentTimeDisplay"));e&&t.controlBar.el().insertBefore(s,e.el()),o.removeClass(s,"vjs-label-hidden")},0)},el:function(){return s}}}},{"../../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");t.exports=function(e){return{init:function(t,n){(n.el=s).className="vjs-black-poster",e.call(this,t,n);var o=t.getChild("posterImage");setTimeout(function(){o&&t&&t.el()&&t.el().insertBefore(s,o.el())},0)},el:function(){return s}}}},{}],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){var m,t=this,v=new d,p=!1,n=o.extend({},{timeout:500,iosPrerollCancelTimeout:2e3,adCancelTimeout:3e3,playAdAlways:!1,adsEnabled:!0,autoResize:!0,vpaidFlashLoaderPath:"/VPAIDFlash.swf",verbosity:0},e||{});return o.isUndefined(n.adTagUrl)&&o.isDefined(n.url)&&(n.adTagUrl=n.url),o.isString(n.adTagUrl)&&(n.adTagUrl=o.echoFn(n.adTagUrl)),o.isDefined(n.adTagXML)&&!o.isFunction(n.adTagXML)?f(new i("on VideoJS VAST plugin, the passed adTagXML option does not contain a function")):o.isDefined(n.adTagUrl)||o.isFunction(n.adTagXML)?(a.setVerbosity(n.verbosity),r.runFlashSupportCheck(n.vpaidFlashLoaderPath),s.prepareForAds(t),n.playAdAlways&&t.on("vast.contentEnd",function(){setTimeout(function(){t.trigger("vast.reset")},0)}),t.on("vast.firstPlay",function(){function e(){s.once(t,["playing","vast.reset","vast.firstPlay"],function(e){"playing"===e.type&&(t.trigger("vast.contentStart"),s.once(t,["ended","vast.reset","vast.firstPlay"],function(e){"ended"===e.type&&t.trigger("vast.contentEnd")}))}),m&&(s.restorePlayerSnapshot(t,m),m=null)}function a(){setTimeout(function(){l.removeClass(t.el(),"vjs-vast-ad-loading")},100)}s.removeNativePoster(t),s.once(t,["vast.adsCancel","vast.adEnd"],function(){t.vast&&t.vast.adUnit&&(t.vast.adUnit=null),e()}),c.waterfall([function(e){if(n.adsEnabled)return e(null);e(new i("Ads are not enabled"))},function(e){!o.isIPhone()||t.currentTime()<=n.iosPrerollCancelTimeout?(m=s.getPlayerSnapshot(t),t.pause(),l.addClass(t.el(),"vjs-vast-ad-loading"),s.once(t,["vast.adStart","vast.adsCancel"],a),t.paused()?e(null):s.once(t,["playing"],function(){t.pause(),e(null)})):e(new i("video content has been playing before preroll ad"))},function(e){var o;function a(){o&&(clearTimeout(o),o=null)}p=!1,o=setTimeout(function(){f(new i("timeout while waiting for the video to start playing",402))},n.adCancelTimeout),s.once(t,["vast.adStart","vast.adsCancel"],a),e(null)},b],function(e,n){e?f(e,n):t.trigger("vast.adEnd")})}),t.on("vast.reset",function(){m=null,g()}),t.vast={isEnabled:function(){return n.adsEnabled},enable:function(){n.adsEnabled=!0},disable:function(){n.adsEnabled=!1}},t.vast):f(new i("on VideoJS VAST plugin, missing adTagUrl on options object"));function g(){t.trigger("vast.adsCancel"),p=!0}function b(e){c.waterfall([j,y],e)}function j(e){v.getVASTResponse(n.adTagUrl?n.adTagUrl():n.adTagXML,e)}function y(e,i){if(!p){var l=function(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}(e)?new h(t,n):new u(t),c=!1;s.once(t,["vast.adStart","vast.adsCancel"],function(e){"vast.adStart"===e.type&&function(){if(c||t.controlBar.getChild("AdsLabel"))return;t.controlBar.addChild("AdsLabel")}()}),s.once(t,["vast.adEnd","vast.adsCancel"],function(){t.controlBar.removeChild("AdsLabel"),c=!0}),o.isIDevice()&&function(){var n=3,e=0,a=0;function o(){t.duration()-e>n&&(t.pause(!0),t.play(!0),t.currentTime(e))}function i(){var s=t.currentTime(),o=Math.abs(s-e);n<o?(2<=(a+=1)&&t.pause(!0),t.currentTime(e)):e=s}t.on("timeupdate",i),t.on("ended",o),s.once(t,["vast.adEnd","vast.adsCancel","vast.adError"],function(){t.off("timeupdate",i),t.off("ended",o)})}(),t.vast.vastResponse=e,a.debug("calling adIntegrator.playAd() with vastResponse:",e),t.vast.adUnit=l.playAd(e,i)}}function f(e,n){t.trigger({type:"vast.adError",error:e}),g(),a.error("AD ERROR:",e.message,e,n)}}},{"../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 s=e("./utilityFunctions"),o={setImmediate:function(e){setTimeout(e,0)},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)},waterfall:function(e,t){if(t=t||function(){},!s.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(s){if(s)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),o.setImmediate(function(){e.apply(null,i)})}}},n(o.iterator(e))()},when:function(e,t){if(!s.isFunction(t))throw new Error("async.when error: missing callback argument");var n=s.isFunction(e)?e:function(){return!!e};return function(){var e=s.arrayLikeObjToArray(arguments),o=e.pop();return n.apply(null,e)?t.apply(this,arguments):(e.unshift(null),o.apply(null,e))}}};t.exports=o},{"./utilityFunctions":47}],41:[function(e,t){"use strict";var s,i=0,a="[videojs-vast-vpaid] ";function o(e,t){0<t.length&&"string"==typeof t[0]&&(t[0]=a+t[0]),e.apply?e.apply(console,Array.prototype.slice.call(t)):e(Array.prototype.slice.call(t))}s={setVerbosity:function(e){i=e},debug:function(){i<4||(void 0===console.debug?o(console.log,arguments):o(console.debug,arguments))},log:function(){i<3||o(console.log,arguments)},info:function(){i<2||o(console.info,arguments)},warn:function(){i<1||o(console.warn,arguments)},error:function(){o(console.error,arguments)}},"undefined"!=typeof console&&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 s=e("./utilityFunctions"),o={isVisible:function(e){return"hidden"!==window.getComputedStyle(e).visibility},isHidden:function(e){return"none"===window.getComputedStyle(e).display},isShown:function(e){return!o.isHidden(e)},hide:function(e){e.__prev_style_display_=e.style.display,e.style.display="none"},show:function(e){o.isHidden(e)&&(e.style.display=e.__prev_style_display_),e.__prev_style_display_=void 0},hasClass:function(e,t){var n,o,i;if(s.isNotEmptyString(t)){if(e.classList)return e.classList.contains(t);for(t=t||"",n=0,i=(o=s.isString(e.getAttribute("class"))?e.getAttribute("class").split(/\s+/):[]).length;n<i;n+=1)if(o[n]===t)return!0}return!1},addClass:function(e,t){var n;if(s.isNotEmptyString(t)){if(e.classList)return e.classList.add(t);n=s.isString(e.getAttribute("class"))?e.getAttribute("class").split(/\s+/):[],s.isString(t)&&s.isNotEmptyString(t.replace(/\s+/,""))&&(n.push(t),e.setAttribute("class",n.join(" ")))}},removeClass:function(e,t){if(s.isNotEmptyString(t)){if(e.classList)return e.classList.remove(t);o=s.isString(e.getAttribute("class"))?e.getAttribute("class").split(/\s+/):[];var n,o,i,a=[];if(s.isString(t)&&s.isNotEmptyString(t.replace(/\s+/,""))){for(n=0,i=o.length;n<i;n+=1)t!==o[n]&&a.push(o[n]);e.setAttribute("class",a.join(" "))}}},addEventListener:function(e,t,n){s.isArray(e)?s.forEach(e,function(e){o.addEventListener(e,t,n)}):s.isArray(t)?s.forEach(t,function(t){o.addEventListener(e,t,n)}):e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent("on"+t,n)},removeEventListener:function(e,t,n){s.isArray(e)?s.forEach(e,function(e){o.removeEventListener(e,t,n)}):s.isArray(t)?s.forEach(t,function(t){o.removeEventListener(e,t,n)}):e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},dispatchEvent:function(e,t){e.dispatchEvent?e.dispatchEvent(t):e.fireEvent("on"+t.eventType,t)},isDescendant:function(e,t){for(var n=t.parentNode;null!==n;){if(n===e)return!0;n=n.parentNode}return!1},getTextContent:function(e){return e.textContent||e.text},prependChild:function(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.insertBefore(t,e.firstChild)},remove:function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},isDomElement:function(e){return e instanceof Element},click:function(e,t){o.addEventListener(e,"click",t)},once:function(e,t,n){o.addEventListener(e,t,function s(){n.apply(null,arguments),o.removeEventListener(e,t,s)})},getDimension:function(e){var t;return!s.isOldIE()&&e.getBoundingClientRect?{width:(t=e.getBoundingClientRect()).width,height:t.height}:{width:e.offsetWidth,height:e.offsetHeight}}};t.exports=o},{"./utilityFunctions":47}],43:[function(e,t){"use strict";var r,c=e("./urlUtils"),s=e("./utilityFunctions");function o(e){this.message="HttpRequest Error: "+(e||"")}function i(e){if(!s.isFunction(e))throw new o("Missing XMLHttpRequest factory method");this.createXhr=e}function a(){var e=new XMLHttpRequest;return"withCredentials"in e||(e=new XDomainRequest),e}(o.prototype=new Error).name="HttpRequest Error",i.prototype.run=function(e,t,n,i){!function(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+"'")}(t,n,i);var r,l,d,u,a=this.createXhr();function h(){n(-1,null,null,"")}i=i||{},l=s.isNumber(i.timeout)?i.timeout:0,a.open(e,c.urlParts(t).href,!0),i.headers&&(d=a,u=i.headers,s.forEach(u,function(e,t){s.isDefined(e)&&d.setRequestHeader(t,e)})),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=1223===a.status?204:a.status,n(o,t,a.getAllResponseHeaders(),e)},a.onerror=h,a.onabort=h,a.send(),0<l&&(r=setTimeout(function(){a&&a.abort()},l))},i.prototype.get=function(e,t,n){this.run("GET",e,function(e,n,s,i){(function(e){return 200<=e&&e<300})(e)?t(null,n,e,s,i):t(new o(i),n,e,s,i)},n)},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={getPlayerSnapshot:function(e){var t=e.el().querySelector(".vjs-tech"),n={ended:e.ended(),src:e.currentSrc(),currentTime:e.currentTime(),type:e.currentType(),playing:!e.paused(),suppressedTracks:function(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}(e)};return t&&(n.nativePoster=t.poster,n.style=t.getAttribute("style")),n},restorePlayerSnapshot:function(e,t){var n,o=e.el().querySelector(".vjs-tech"),a=20;function i(){t.suppressedTracks.forEach(function(e){e.track.mode=e.mode})}t.nativePoster&&(o.poster=t.nativePoster),"style"in t&&o.setAttribute("style",t.style||""),function(e,t){return e.src()?e.src()!==t.src:e.currentSrc()!==t.src}(e,t)?(e.one("contentloadedmetadata",i),e.one("canplay",function n(){if(!s.isReadyToResume(e)&&a--)setTimeout(n,50);else try{e.currentTime()!==t.currentTime?(t.playing&&e.one("seeked",function(){e.play()}),e.currentTime(t.currentTime)):t.playing&&e.play()}catch(e){videojs.log.warn("Failed to resume the content after an advertisement",e)}}),n=setTimeout(function(){e.trigger("canplay")},1e3),e.one("canplay",function(){clearTimeout(n)}),e.src({src:t.src,type:t.type}),e.load()):(i(),t.playing&&e.play())},isReadyToResume:function(e){return 1<e.readyState()||void 0===e.seekable()||0<e.seekable().length}};s.prepareForAds=function(e){var t,s=e.addChild("blackPoster"),a=!0;function r(){return e.vast&&e.vast.adUnit}function c(){return a}function l(){t&&(e.currentTime(0),function(t){o.isObject(t)&&(e.volume(t.volume),e.muted(t.muted))}(t),t=null)}function n(){i.hasClass(s.el(),"vjs-hidden")||s.hide()}function d(){i.removeClass(e.el(),"vjs-ad-playing")}!function(){var s,i,n=e.play;e.play=function(s){var i=this;return c()?function(){o.isIPhone()||(t={muted:e.muted(),volume:e.volume()},e.muted(!0)),n.apply(i,arguments)}():function(t){r()&&!t?e.vast.adUnit.resumeAd():n.apply(i,arguments)}(s),this},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)}}(),e.on("play",function(){c()&&(a=!1,e.trigger("vast.firstPlay"))}),e.on("vast.reset",function(){a=!0,s.show(),l()}),e.on("vast.firstPlay",l),e.on("error",n),e.on("vast.adStart",n),e.on("vast.adsCancel",n),e.on("vast.adError",n),e.on("vast.adStart",function(){i.addClass(e.el(),"vjs-ad-playing")}),e.on("vast.adEnd",d),e.on("vast.adsCancel",d)},s.removeNativePoster=function(e){var t=e.el().querySelector(".vjs-tech");t&&t.removeAttribute("poster")},s.once=function(e,t,n){function s(){n.apply(null,arguments),t.forEach(function(t){e.off(t,s)})}t.forEach(function(t){e.on(t,s)})},t.exports=s},{"./dom":42,"./utilityFunctions":47}],46:[function(e,t){"use strict";var o=e("./utilityFunctions"),s=document.createElement("a"),i=document.documentMode;t.exports={urlParts:function(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}},queryStringToObj:function(e,t){var n,s;return t=o.isFunction(t)?t:function(){return!0},s=(e=e.trim().replace(/^\?/,"")).split("&"),n={},o.forEach(s,function(e){var s,o,i;""!==e&&(s=(i=e.split("="))[0],o=i[1],t(s,o)&&(n[s]=o))}),n},objToQueryString:function(e){var t=[];return o.forEach(e,function(e,n){t.push(n+"="+e)}),t.join("&")}}},{"./utilityFunctions":47}],47:[function(e,t){"use strict";var s,c=/[A-Z]/g,l=/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$/i,d=/^([+-]?\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 i(e){return null===e}function o(e){return"object"==typeof e}function a(e){return"function"==typeof e}function r(e){return"[object Array]"===Object.prototype.toString.call(e)}s={_UA:navigator.userAgent,noop:function(){},isNull:i,isDefined:function(e){return void 0!==e},isUndefined:function(e){return void 0===e},isObject:o,isFunction:a,isNumber:function(e){return"number"==typeof e},isWindow:function(e){return s.isObject(e)&&e.window===e},isArray:r,isArrayLike:function(e){if(null===e||s.isWindow(e)||s.isFunction(e)||s.isUndefined(e))return!1;var t=e.length;return 1===e.nodeType&&!!t||s.isString(e)||s.isArray(e)||0===t||"number"==typeof t&&0<t&&t-1 in e},isString:function(e){return"string"==typeof e},isEmptyString:function(e){return s.isString(e)&&0===e.length},isNotEmptyString:function(e){return s.isString(e)&&0!==e.length},arrayLikeObjToArray:function(e){return Array.prototype.slice.call(e)},forEach:function e(t,n,s){if(t)if(a(t))for(o in t)"prototype"===o||"length"===o||"name"===o||t.hasOwnProperty&&!t.hasOwnProperty(o)||n.call(s,t[o],o,t);else if(r(t)){var o,i,c="object"!=typeof t;for(o=0,i=t.length;o<i;o++)(c||o in t)&&n.call(s,t[o],o,t)}else if(t.forEach&&t.forEach!==e)t.forEach(n,s,t);else for(o in t)t.hasOwnProperty(o)&&n.call(s,t[o],o,t);return t},snake_case:function(e,t){return t=t||"_",e.replace(c,function(e,n){return(n?t:"")+e.toLowerCase()})},isValidEmail:function(e){return!!s.isString(e)&&l.test(e.trim())},extend:function e(t){var n,s,a;for(a=1;a<arguments.length;a++)for(n in s=arguments[a])s.hasOwnProperty(n)&&(o(t[n])&&!i(t[n])&&o(s[n])?t[n]=e({},t[n],s[n]):t[n]=s[n]);return t},capitalize:function(e){return e.charAt(0).toUpperCase()+e.slice(1)},decapitalize:function(e){return e.charAt(0).toLowerCase()+e.slice(1)},transformArray:function(e,t){var n=[];return e.forEach(function(e,o){var i=t(e,o);s.isDefined(i)&&n.push(i)}),n},toFixedDigits:function(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))return"NaN";for(n=e+"";n.length<t;)n="0"+n;return n},throttle:function(e,t){var n=(new Date).getTime()-(t+1);return function(){var s=(new Date).getTime();t<=s-n&&(n=s,e.apply(this,arguments))}},debounce:function(e,t){var n;return function(){n&&clearTimeout(n),n=setTimeout(function(){e.apply(this,arguments),n=void 0},t)}},treeSearch:function e(t,n,s){for(var a,i=n(t),o=0;o<i.length;o++){if(s(i[o]))return i[o];if(a=e(i[o],n,s),a)return a}},echoFn:function(e){return function(){return e}},isISO8601:function(e){return s.isNumber(e)&&(e+=""),!!s.isString(e)&&d.test(e.trim())},isOldIE:function(){var e=s.getInternetExplorerVersion(navigator);return-1!==e&&e<10},getInternetExplorerVersion:function(e){if(t=-1,"Microsoft Internet Explorer"==e.appName){var t,s=e.userAgent,n=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(s);null!==n&&(t=parseFloat(n[1]))}return t},isIDevice:function(){return/iP(hone|ad)/.test(s._UA)},isMobile:function(){return/iP(hone|ad|od)|Android|Windows Phone/.test(s._UA)},isIPhone:function(){return/iP(hone|od)/.test(s._UA)},isAndroid:function(){return/Android/.test(s._UA)}},t.exports=s},{}],48:[function(e,t){"use strict";var o=e("./utilityFunctions"),s={};s.strToXMLDoc=function(e){if(void 0!==window.DOMParser)return function(e){var t,n=new DOMParser;try{if(function(e){try{var n=new DOMParser,s=n.parseFromString("INVALID","text/xml"),t=s.getElementsByTagName("parsererror")[0].namespaceURI;return"http://www.w3.org/1999/xhtml"===t?0<e.getElementsByTagName("parsererror").length:0<e.getElementsByTagNameNS(t,"parsererror").length}catch{}}(t=n.parseFromString(e,"application/xml"))||o.isEmptyString(e))throw new Error}catch{throw new Error("xml.strToXMLDOC: Error parsing the string: '"+e+"'")}return t}(e);var t=new ActiveXObject("Microsoft.XMLDOM");return t.async=!1,t.loadXML(e),t},s.parseText=function(e){return/^\s*$/.test(e)?null:/^(?:true|false)$/i.test(e)?"true"===e.toLowerCase():isFinite(e)?parseFloat(e):o.isISO8601(e)?new Date(e):e.trim()},s.JXONTree=function(e){if(a=s.parseText,e.documentElement)return new s.JXONTree(e.documentElement);if(e.hasChildNodes()){for(var t,n,i,a,r,d,c="",l=0;l<e.childNodes.length;l++)3==((t=e.childNodes.item(l)).nodeType-1|1)?c+=3===t.nodeType?t.nodeValue.trim():t.nodeValue:1!==t.nodeType||t.prefix||(n=o.decapitalize(t.nodeName),r=new s.JXONTree(t),this.hasOwnProperty(n)?(this[n].constructor!==Array&&(this[n]=[this[n]]),this[n].push(r)):this[n]=r);c&&(this.keyValue=a(c))}if(void 0===e.hasAttributes?0<e.attributes.length:e.hasAttributes())for(i=0;i<e.attributes.length;i++)d=e.attributes.item(i),this["@"+o.decapitalize(d.name)]=a(d.value.trim())},s.JXONTree.prototype.attr=function(e){return this["@"+o.decapitalize(e)]},s.toJXONTree=function(e){var t=s.strToXMLDoc(e);return new s.JXONTree(t)},s.keyValue=function(e){if(e)return e.keyValue},s.attr=function(e,t){if(e)return e["@"+o.decapitalize(t)]},s.encode=function(e){if(o.isString(e))return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},s.decode=function(e){if(o.isString(e))return e.replace(/'/g,"'").replace(/"/g,'"').replace(/>/g,">").replace(/</g,"<").replace(/&/g,"&")},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="undefined"!=typeof e?e:{};new n(s)}catch(e){t(e)}})({vastUrl:"https://apt-outcome.com/dvm-Fxzyd.GzNAv_ZCGDUE/Fc-0HlIkJPKS_ZM6NbO2P5-lRSSWTQU9_NWTXAYxZM-DbAcwdMeg_"})