PageSourceSearch

https://www.erf.de/js/release/1.2.107/build/erf-player-vendor.js

js erf.de collected 2026-09-24 09:23:50 UTC 839,388 bytes, 2 lines download raw bytes

vendor: 5,903 bytes, lines 1-2
1/*! For license information please see erf-player-vendor.js.LICENSE.txt */
2(self.webpackChunkerf_v2016=self.webpackChunkerf_v2016||[]).push([[2022],{85215:function(e,t,i){"use strict";i.r(t),i.d(t,{default:function(){return Bs}});var n=i(58908),s=i.n(n),r=i(89144),a=i.n(r),o=i(9603),l=i.n(o),u=i(13407),c=i.n(u),h=i(87462),d=i(80779),p=i(90555),f=i(92260),g=i(8485),m=i(60562),y=i(98525),_=i(84221),v=i.n(_),b=i(68925),T=i(47530),S=i(51489),k="8.23.8";const w={},C=function(e,t){return w[e]=w[e]||[],t&&(w[e]=w[e].concat(t)),w[e]},E=function(e,t){const i=C(e).indexOf(t);return!(i<=-1||(w[e]=w[e].slice(),w[e].splice(i,1),0))},x={prefixed:!0},I=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror","fullscreen"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror","-webkit-full-screen"]],O=I[0];let P;for(let e=0;e<I.length;e++)if(I[e][1]in a()){P=I[e];break}if(P){for(let e=0;e<P.length;e++)x[O[e]]=P[e];x.prefixed=P[0]!==O[0]}let A=[];const L=function e(t,i=":",n=""){let r,a="info";function o(...e){r("log",a,e)}return r=((e,t,i)=>(n,r,a)=>{const o=t.levels[r],l=new RegExp(`^(${o})$`);let u=e;if("log"!==n&&a.unshift(n.toUpperCase()+":"),i&&(u=`%c${e}`,a.unshift(i)),a.unshift(u+":"),A){A.push([].concat(a));const e=A.length-1e3;A.splice(0,e>0?e:0)}if(!s().console)return;let c=s().console[n];c||"debug"!==n||(c=s().console.info||s().console.log),c&&o&&l.test(n)&&c[Array.isArray(a)?"apply":"call"](s().console,a)})(t,o,n),o.createLogger=(s,r,a)=>{const o=void 0!==r?r:i;return e(`${t} ${o} ${s}`,o,void 0!==a?a:n)},o.createNewLogger=(t,i,n)=>e(t,i,n),o.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:a},o.level=e=>{if("string"==typeof e){if(!o.levels.hasOwnProperty(e))throw new Error(`"${e}" in not a valid log level`);a=e}return a},o.history=()=>A?[].concat(A):[],o.history.filter=e=>(A||[]).filter((t=>new RegExp(`.*${e}.*`).test(t[0]))),o.history.clear=()=>{A&&(A.length=0)},o.history.disable=()=>{null!==A&&(A.length=0,A=null)},o.history.enable=()=>{null===A&&(A=[])},o.error=(...e)=>r("error",a,e),o.warn=(...e)=>r("warn",a,e),o.debug=(...e)=>r("debug",a,e),o}("VIDEOJS"),M=L.createLogger,D=Object.prototype.toString,j=function(e){return U(e)?Object.keys(e):[]};function R(e,t){j(e).forEach((i=>t(e[i],i)))}function N(e,t,i=0){return j(e).reduce(((i,n)=>t(i,e[n],n)),i)}function U(e){return!!e&&"object"==typeof e}function B(e){return U(e)&&"[object Object]"===D.call(e)&&e.constructor===Object}function F(...e){const t={};return e.forEach((e=>{e&&R(e,((e,i)=>{B(e)?(B(t[i])||(t[i]={}),t[i]=F(t[i],e)):t[i]=e}))})),t}function V(e={}){const t=[];for(const i in e)if(e.hasOwnProperty(i)){const n=e[i];t.push(n)}return t}function H(e,t,i,n=!0){const s=i=>Object.defineProperty(e,t,{value:i,enumerable:!0,writable:!0}),r={configurable:!0,enumerable:!0,get(){const e=i();return s(e),e}};return n&&(r.set=s),Object.defineProperty(e,t,r)}var q=Object.freeze({__proto__:null,each:R,reduce:N,isObject:U,isPlain:B,merge:F,values:V,defineLazyProperty:H});let $,z=!1,W=null,G=!1,K=!1,Q=!1,X=!1,Y=!1,J=null,Z=null;const ee=Boolean(s().cast&&s().cast.framework&&s().cast.framework.CastReceiverContext);let te=null,ie=!1,ne=!1,se=!1,re=!1,ae=!1,oe=!1,le=!1;const ue=Boolean(ge()&&("ontouchstart"in s()||s().navigator.maxTouchPoints||s().DocumentTouch&&s().document instanceof s().DocumentTouch)),ce=s().navigator&&s().navigator.userAgentData;if(ce&&ce.platform&&ce.brands&&(G="Android"===ce.platform,Q=Boolean(ce.brands.find((e=>"Microsoft Edge"===e.brand))),X=Boolean(ce.brands.find((e=>"Chromium"===e.brand))),Y=!Q&&X,J=Z=(ce.brands.find((e=>"Chromium"===e.brand))||{}).version||null,ne="Windows"===ce.platform),!X){const e=s().navigator&&s().navigator.userAgent||"";z=/iPod/i.test(e),W=function(){const t=e.match(/OS (\d+)_/i);return t&&t[1]?t[1]:null}(),G=/Android/i.test(e),$=function(){const t=e.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!t)return null;const i=t[1]&&parseFloat(t[1]),n=t[2]&&parseFloat(t[2]);return i&&n?parseFloat(t[1]+"."+t[2]):i||null}(),K=/Firefox/i.test(e),Q=/Edg/i.test(e),X=/Chrome/i.test(e)||/CriOS/i.test(e),Y=!Q&&X,J=Z=function(){const t=e.match(/(Chrome|CriOS)\/(\d+)/);return t&&t[2]?parseFloat(t[2]):null}(),te=function(){const t=/MSIE\s(\d+)\.\d/.exec(e);let i=t&&parseFloat(t[1]);return!i&&/Trident\/7.0/i.test(e)&&/rv:11.0/.test(e)&&(i=11),i}(),ae=/Tizen/i.test(e),oe=/Web0S/i.test(e),le=ae||oe,ie=/Safari/i.test(e)&&!Y&&!G&&!Q&&!le,ne=/Windows/i.test(e),se=/iPad/i.test(e)||ie&&ue&&!/iPhone/i.test(e),re=/iPhone/i.test(e)&&!se}const he=re||se||z,de=(ie||he)&&!Y;var pe=Object.freeze({__proto__:null,get IS_IPOD(){return z},get IOS_VERSION(){return W},get IS_ANDROID(){return G},get ANDROID_VERSION(){return $},get IS_FIREFOX(){return K},get IS_EDGE(){return Q},get IS_CHROMIUM(){return X},get IS_CHROME(){return Y},get CHROMIUM_VERSION(){return J},get CHROME_VERSION(){return Z},IS_CHROMECAST_RECEIVER:ee,get IE_VERSION(){return te},get IS_SAFARI(){return ie},get IS_WINDOWS(){return ne},get IS_IPAD(){return se},get IS_IPHONE(){return re},get IS_TIZEN(){return ae},get IS_WEBOS(){return oe},get IS_SMART_TV(){return le},TOUCH_ENABLED:ue,IS_IOS:he,IS_ANY_SAFARI:de});function fe(e){return"string"==typeof e&&Boolean(e.trim())}function ge(){return a()===s().document}function me(e){return U(e)&&1===e.nodeType}function ye(){try{return s().parent!==s().self}catch(e){return!0}}function _e(e){return function(t,i){if(!fe(t))return a()[e](null);fe(i)&&(i=a().querySelector(i));const n=me(i)?i:a();return n[e]&&n[e](t)}}function ve(e="div",t={},i={},n){const s=a().createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){const i=t[e];"textContent"===e?be(s,i):s[e]===i&&"tabIndex"!==e||(s[e]=i)}
vendor: 2,167 bytes, line 2
2)),Object.getOwnPropertyNames(i).forEach((function(e){s.setAttribute(e,i[e])})),n&&Be(s,n),s}function be(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}function Te(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}function Se(e,t){return function(e){if(e.indexOf(" ")>=0)throw new Error("class has illegal whitespace characters")}(t),e.classList.contains(t)}function ke(e,...t){return e.classList.add(...t.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e}function we(e,...t){return e?(e.classList.remove(...t.reduce(((e,t)=>e.concat(t.split(/\s+/))),[])),e):(L.warn("removeClass was called with an element that doesn't exist"),null)}function Ce(e,t,i){return"function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=void 0),t.split(/\s+/).forEach((t=>e.classList.toggle(t,i))),e}function Ee(e,t){Object.getOwnPropertyNames(t).forEach((function(i){const n=t[i];null==n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))}function xe(e){const t={},i=["autoplay","controls","playsinline","loop","muted","default","defaultMuted"];if(e&&e.attributes&&e.attributes.length>0){const n=e.attributes;for(let e=n.length-1;e>=0;e--){const s=n[e].name;let r=n[e].value;i.includes(s)&&(r=null!==r),t[s]=r}}return t}function Ie(e,t){return e.getAttribute(t)}function Oe(e,t,i){e.setAttribute(t,i)}function Pe(e,t){e.removeAttribute(t)}function Ae(){a().body.focus(),a().onselectstart=function(){return!1}}function Le(){a().onselectstart=function(){return!0}}function Me(e){if(e&&e.getBoundingClientRect&&e.parentNode){const t=e.getBoundingClientRect(),i={};return["bottom","height","left","right","top","width"].forEach((e=>{void 0!==t[e]&&(i[e]=t[e])})),i.height||(i.height=parseFloat($e(e,"height"))),i.width||(i.width=parseFloat($e(e,"width"))),i}}function De(e){if(!e||e&&!e.offsetParent)return{left:0,top:0,width:0,height:0};const t=e.offsetWidth,i=e.offsetHeight;let n=0,s=0;for(;e.offsetParent&&e!==a()[x.fullscreenElement];)n+=e.offsetLeft,s+=e.offsetTop,e=e.offsetParent;return{left:n,top:s,width:t,height:i}}function je(e,t){const i={x:0,y:0};if(he){let t=e;for(;t&&"html"!==t.nodeName.toLowerCase();){const e=$e(t,"transform");
vendor: 7,960 bytes, line 2
2if(/^matrix/.test(e)){const t=e.slice(7,-1).split(/,\s/).map(Number);i.x+=t[4],i.y+=t[5]}else if(/^matrix3d/.test(e)){const t=e.slice(9,-1).split(/,\s/).map(Number);i.x+=t[12],i.y+=t[13]}if(t.assignedSlot&&t.assignedSlot.parentElement&&s().WebKitCSSMatrix){const e=s().getComputedStyle(t.assignedSlot.parentElement).transform,n=new(s().WebKitCSSMatrix)(e);i.x+=n.m41,i.y+=n.m42}t=t.parentNode||t.host}}const n={},r=De(t.target),a=De(e),o=a.width,l=a.height;let u=t.offsetY-(a.top-r.top),c=t.offsetX-(a.left-r.left);return t.changedTouches&&(c=t.changedTouches[0].pageX-a.left,u=t.changedTouches[0].pageY+a.top,he&&(c-=i.x,u-=i.y)),n.y=1-Math.max(0,Math.min(1,u/l)),n.x=Math.max(0,Math.min(1,c/o)),n}function Re(e){return U(e)&&3===e.nodeType}function Ne(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function Ue(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((e=>("function"==typeof e&&(e=e()),me(e)||Re(e)?e:"string"==typeof e&&/\S/.test(e)?a().createTextNode(e):void 0))).filter((e=>e))}function Be(e,t){return Ue(t).forEach((t=>e.appendChild(t))),e}function Fe(e,t){return Be(Ne(e),t)}function Ve(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||"mousedown"===e.type&&0===e.button&&0===e.buttons||0===e.button&&1===e.buttons}const He=_e("querySelector"),qe=_e("querySelectorAll");function $e(e,t){if(!e||!t)return"";if("function"==typeof s().getComputedStyle){let i;try{i=s().getComputedStyle(e)}catch(e){return""}return i?i.getPropertyValue(t)||i[t]:""}return""}function ze(e){[...a().styleSheets].forEach((t=>{try{const i=[...t.cssRules].map((e=>e.cssText)).join(""),n=a().createElement("style");n.textContent=i,e.document.head.appendChild(n)}catch(i){const n=a().createElement("link");n.rel="stylesheet",n.type=t.type,n.media=t.media.mediaText,n.href=t.href,e.document.head.appendChild(n)}}))}var We=Object.freeze({__proto__:null,isReal:ge,isEl:me,isInFrame:ye,createEl:ve,textContent:be,prependTo:Te,hasClass:Se,addClass:ke,removeClass:we,toggleClass:Ce,setAttributes:Ee,getAttributes:xe,getAttribute:Ie,setAttribute:Oe,removeAttribute:Pe,blockTextSelection:Ae,unblockTextSelection:Le,getBoundingClientRect:Me,findPosition:De,getPointerPosition:je,isTextNode:Re,emptyEl:Ne,normalizeContent:Ue,appendContent:Be,insertContent:Fe,isSingleLeftClick:Ve,$:He,$$:qe,computedStyle:$e,copyStyleSheetsToWindow:ze});let Ge,Ke=!1;const Qe=function(){if(!1===Ge.options.autoSetup)return;const e=Array.prototype.slice.call(a().getElementsByTagName("video")),t=Array.prototype.slice.call(a().getElementsByTagName("audio")),i=Array.prototype.slice.call(a().getElementsByTagName("video-js")),n=e.concat(t,i);if(n&&n.length>0)for(let e=0,t=n.length;e<t;e++){const t=n[e];if(!t||!t.getAttribute){Xe(1);break}void 0===t.player&&null!==t.getAttribute("data-setup")&&Ge(t)}else Ke||Xe(1)};function Xe(e,t){ge()&&(t&&(Ge=t),s().setTimeout(Qe,e))}function Ye(){Ke=!0,s().removeEventListener("load",Ye)}ge()&&("complete"===a().readyState?Ye():s().addEventListener("load",Ye));const Je=function(e){const t=a().createElement("style");return t.className=e,t},Ze=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t};var et=new WeakMap;let tt,it=3;function nt(){return it++}function st(e,t){if(!et.has(e))return;const i=et.get(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&et.delete(e)}function rt(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function at(e){if(e.fixed_)return e;function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped||!e.isImmediatePropagationStopped){const n=e||s().event;e={};const r=["layerX","layerY","keyLocation","path","webkitMovementX","webkitMovementY","mozPressure","mozInputSource"];for(const t in n)r.includes(t)||"returnValue"===t&&n.preventDefault||(e[t]=n[t]);if(e.target||(e.target=e.srcElement||a()),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=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){const t=a().documentElement,i=a().body;e.pageX=e.clientX+(t&&t.scrollLeft||i&&i.scrollLeft||0)-(t&&t.clientLeft||i&&i.clientLeft||0),e.pageY=e.clientY+(t&&t.scrollTop||i&&i.scrollTop||0)-(t&&t.clientTop||i&&i.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}const ot=function(){if("boolean"!=typeof tt){tt=!1;try{const e=Object.defineProperty({},"passive",{get(){tt=!0}});s().addEventListener("test",null,e),s().removeEventListener("test",null,e)}catch(e){}}return tt},lt=["touchstart","touchmove"];function ut(e,t,i){if(Array.isArray(t))return rt(ut,e,t,i);et.has(e)||et.set(e,{});const n=et.get(e);if(n.handlers||(n.handlers={}),n.handlers[t]||(n.handlers[t]=[]),i.guid||(i.guid=nt()),n.handlers[t].push(i),n.dispatcher||(n.disabled=!1,n.dispatcher=function(t,i){if(n.disabled)return;t=at(t);const s=n.handlers[t.type];if(s){const n=s.slice(0);for(let s=0,r=n.length;s<r&&!t.isImmediatePropagationStopped();s++)try{n[s].call(e,t,i)}catch(e){L.error(e)}}}),1===n.handlers[t].length)if(e.addEventListener){let i=!1;ot()&&lt.indexOf(t)>-1&&(i={passive:!0}),e.addEventListener(t,n.dispatcher,i)}else e.attachEvent&&e.attachEvent("on"+t,n.dispatcher)}function ct(e,t,i){if(!et.has(e))return;const n=et.get(e);if(!n.handlers)return;if(Array.isArray(t))return rt(ct,e,t,i);const s=function(e,t){n.handlers[t]=[],st(e,t)};if(void 0===t){for(const t in n.handlers)Object.prototype.hasOwnProperty.call(n.handlers||{},t)&&s(e,t);return}const r=n.handlers[t];if(r)if(i){if(i.guid)for(let e=0;e<r.length;e++)r[e].guid===i.guid&&r.splice(e--,1);st(e,t)}else s(e,t)}function ht(e,t,i){const n=et.has(e)?et.get(e):{},s=e.parentNode||e.ownerDocument;if("string"==typeof t?t={type:t,target:e}:t.target||(t.target=e),t=at(t),n.dispatcher&&n.dispatcher.call(e,t,i),s&&!t.isPropagationStopped()&&!0===t.bubbles)ht.call(null,s,t,i);else if(!s&&!t.defaultPrevented&&t.target&&t.target[t.type]){et.has(t.target)||et.set(t.target,{});const e=et.get(t.target);t.target[t.type]&&(e.disabled=!0,"function"==typeof t.target[t.type]&&t.target[t.type](),e.disabled=!1)}return!t.defaultPrevented}function dt(e,t,i){if(Array.isArray(t))return rt(dt,e,t,i);const n=function(){ct(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||nt(),ut(e,t,n)}function pt(e,t,i){const n=function(){ct(e,t,n),i.apply(this,arguments)};n.guid=i.guid=i.guid||nt(),ut(e,t,n)}var ft=Object.freeze({__proto__:null,fixEvent:at,on:ut,off:ct,trigger:ht,one:dt,any:pt});const gt=30,mt=function(e,t,i){t.guid||(t.guid=nt());const n=t.bind(e);return n.guid=i?i+"_"+t.guid:t.guid,n},yt=function(e,t){let i=s().performance.now();return function(...n){const r=s().performance.now();r-i>=t&&(e(...n),i=r)}},_t=function(e,t,i,n=s()){let r;const a=function(){const s=this,a=arguments;let o=function(){r=null,o=null,i||e.apply(s,a)};!r&&i&&e.apply(s,a),n.clearTimeout(r),r=n.setTimeout(o,t)};return a.cancel=()=>{n.clearTimeout(r),r=null},a};var vt=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:gt,bind_:mt,throttle:yt,debounce:_t});let bt;class Tt{on(e,t){const i=this.addEventListener;this.addEventListener=()=>{},ut(this,e,t),this.addEventListener=i}off(e,t){ct(this,e,t)}
vendor: 10,501 bytes, line 2
2one(e,t){const i=this.addEventListener;this.addEventListener=()=>{},dt(this,e,t),this.addEventListener=i}any(e,t){const i=this.addEventListener;this.addEventListener=()=>{},pt(this,e,t),this.addEventListener=i}trigger(e){const t=e.type||e;"string"==typeof e&&(e={type:t}),e=at(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),ht(this,e)}queueTrigger(e){bt||(bt=new Map);const t=e.type||e;let i=bt.get(this);i||(i=new Map,bt.set(this,i));const n=i.get(t);i.delete(t),s().clearTimeout(n);const r=s().setTimeout((()=>{i.delete(t),0===i.size&&(i=null,bt.delete(this)),this.trigger(e)}),0);i.set(t,r)}}Tt.prototype.allowedEvents_={},Tt.prototype.addEventListener=Tt.prototype.on,Tt.prototype.removeEventListener=Tt.prototype.off,Tt.prototype.dispatchEvent=Tt.prototype.trigger;const St=e=>"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,kt=e=>e instanceof Tt||!!e.eventBusEl_&&["on","one","off","trigger"].every((t=>"function"==typeof e[t])),wt=e=>"string"==typeof e&&/\S/.test(e)||Array.isArray(e)&&!!e.length,Ct=(e,t,i)=>{if(!e||!e.nodeName&&!kt(e))throw new Error(`Invalid target for ${St(t)}#${i}; must be a DOM node or evented object.`)},Et=(e,t,i)=>{if(!wt(e))throw new Error(`Invalid event type for ${St(t)}#${i}; must be a non-empty string or array.`)},xt=(e,t,i)=>{if("function"!=typeof e)throw new Error(`Invalid listener for ${St(t)}#${i}; must be a function.`)},It=(e,t,i)=>{const n=t.length<3||t[0]===e||t[0]===e.eventBusEl_;let s,r,a;return n?(s=e.eventBusEl_,t.length>=3&&t.shift(),[r,a]=t):(s=t[0],r=t[1],a=t[2]),Ct(s,e,i),Et(r,e,i),xt(a,e,i),a=mt(e,a),{isTargetingSelf:n,target:s,type:r,listener:a}},Ot=(e,t,i,n)=>{Ct(e,e,t),e.nodeName?ft[t](e,i,n):e[t](i,n)},Pt={on(...e){const{isTargetingSelf:t,target:i,type:n,listener:s}=It(this,e,"on");if(Ot(i,"on",n,s),!t){const e=()=>this.off(i,n,s);e.guid=s.guid;const t=()=>this.off("dispose",e);t.guid=s.guid,Ot(this,"on","dispose",e),Ot(i,"on","dispose",t)}},one(...e){const{isTargetingSelf:t,target:i,type:n,listener:s}=It(this,e,"one");if(t)Ot(i,"one",n,s);else{const e=(...t)=>{this.off(i,n,e),s.apply(null,t)};e.guid=s.guid,Ot(i,"one",n,e)}},any(...e){const{isTargetingSelf:t,target:i,type:n,listener:s}=It(this,e,"any");if(t)Ot(i,"any",n,s);else{const e=(...t)=>{this.off(i,n,e),s.apply(null,t)};e.guid=s.guid,Ot(i,"any",n,e)}},off(e,t,i){if(!e||wt(e))ct(this.eventBusEl_,e,t);else{const n=e,s=t;Ct(n,this,"off"),Et(s,this,"off"),xt(i,this,"off"),i=mt(this,i),this.off("dispose",i),n.nodeName?(ct(n,s,i),ct(n,"dispose",i)):kt(n)&&(n.off(s,i),n.off("dispose",i))}},trigger(e,t){Ct(this.eventBusEl_,this,"trigger");const i=e&&"string"!=typeof e?e.type:e;if(!wt(i))throw new Error(`Invalid event type for ${St(this)}#trigger; must be a non-empty string or object with a type key that has a non-empty value.`);return ht(this.eventBusEl_,e,t)}};function At(e,t={}){const{eventBusKey:i}=t;if(i){if(!e[i].nodeName)throw new Error(`The eventBusKey "${i}" does not refer to an element.`);e.eventBusEl_=e[i]}else e.eventBusEl_=ve("span",{className:"vjs-event-bus"});return Object.assign(e,Pt),e.eventedCallbacks&&e.eventedCallbacks.forEach((e=>{e()})),e.on("dispose",(()=>{e.off(),[e,e.el_,e.eventBusEl_].forEach((function(e){e&&et.has(e)&&et.delete(e)})),s().setTimeout((()=>{e.eventBusEl_=null}),0)})),e}const Lt={state:{},setState(e){let t;return"function"==typeof e&&(e=e()),R(e,((e,i)=>{this.state[i]!==e&&(t=t||{},t[i]={from:this.state[i],to:e}),this.state[i]=e})),t&&kt(this)&&this.trigger({changes:t,type:"statechanged"}),t}};function Mt(e,t){return Object.assign(e,Lt),e.state=Object.assign({},e.state,t),"function"==typeof e.handleStateChanged&&kt(e)&&e.on("statechanged",e.handleStateChanged),e}const Dt=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toLowerCase()))},jt=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},Rt=function(e,t){return jt(e)===jt(t)};var Nt=Object.freeze({__proto__:null,toLowerCase:Dt,toTitleCase:jt,titleCaseEquals:Rt});class Ut{constructor(e,t,i){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_){const t=e&&e.id&&e.id()||"no_player";this.id_=`${t}_component_${nt()}`}this.name_=t.name||null,t.el?this.el_=t.el:!1!==t.createEl&&(this.el_=this.createEl()),t.className&&this.el_&&t.className.split(" ").forEach((e=>this.addClass(e))),["on","off","one","any","trigger"].forEach((e=>{this[e]=void 0})),!1!==t.evented&&(At(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange)),Mt(this,this.constructor.defaultState),this.children_=[],this.childIndex_={},this.childNameIndex_={},this.setTimeoutIds_=new Set,this.setIntervalIds_=new Set,this.rafIds_=new Set,this.namedRafs_=new Map,this.clearingTimersOnDispose_=!1,!1!==t.initChildren&&this.initChildren(),this.ready(i),!1!==t.reportTouchActivity&&this.enableTouchActivity()}dispose(e={}){if(!this.isDisposed_){if(this.readyQueue_&&(this.readyQueue_.length=0),this.trigger({type:"dispose",bubbles:!1}),this.isDisposed_=!0,this.children_)for(let e=this.children_.length-1;e>=0;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&&(e.restoreEl?this.el_.parentNode.replaceChild(e.restoreEl,this.el_):this.el_.parentNode.removeChild(this.el_)),this.el_=null),this.player_=null}}isDisposed(){return Boolean(this.isDisposed_)}player(){return this.player_}options(e){return e?(this.options_=F(this.options_,e),this.options_):this.options_}el(){return this.el_}createEl(e,t,i){return ve(e,t,i)}localize(e,t,i=e){const n=this.player_.language&&this.player_.language(),s=this.player_.languages&&this.player_.languages(),r=s&&s[n],a=n&&n.split("-")[0],o=s&&s[a];let l=i;return r&&r[e]?l=r[e]:o&&o[e]&&(l=o[e]),t&&(l=l.replace(/\{(\d+)\}/g,(function(e,i){const n=t[i-1];let s=n;return void 0===n&&(s=e),s}))),l}handleLanguagechange(){}contentEl(){return this.contentEl_||this.el_}id(){return this.id_}name(){return this.name_}children(){return this.children_}getChildById(e){return this.childIndex_[e]}getChild(e){if(e)return this.childNameIndex_[e]}getDescendant(...e){e=e.reduce(((e,t)=>e.concat(t)),[]);let t=this;for(let i=0;i<e.length;i++)if(t=t.getChild(e[i]),!t||!t.getChild)return;return t}setIcon(e,t=this.el()){if(!this.player_.options_.experimentalSvgIcons)return;const i="http://www.w3.org/2000/svg",n=ve("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),s=a().createElementNS(i,"svg");s.setAttributeNS(null,"viewBox","0 0 512 512");const r=a().createElementNS(i,"use");return s.appendChild(r),r.setAttributeNS(null,"href",`#vjs-icon-${e}`),n.appendChild(s),this.iconIsSet_?t.replaceChild(n,t.querySelector(".vjs-icon-placeholder")):t.appendChild(n),this.iconIsSet_=!0,n}addChild(e,t={},i=this.children_.length){let n,s;if("string"==typeof e){s=jt(e);const i=t.componentClass||s;t.name=s;const r=Ut.getComponent(i);if(!r)throw new Error(`Component ${i} does not exist`);if("function"!=typeof r)return null;n=new r(this.player_||this,t)}else n=e;if(n.parentComponent_&&n.parentComponent_.removeChild(n),this.children_.splice(i,0,n),n.parentComponent_=this,"function"==typeof n.id&&(this.childIndex_[n.id()]=n),s=s||n.name&&jt(n.name()),s&&(this.childNameIndex_[s]=n,this.childNameIndex_[Dt(s)]=n),"function"==typeof n.el&&n.el()){let e=null;this.children_[i+1]&&(this.children_[i+1].el_?e=this.children_[i+1].el_:me(this.children_[i+1])&&(e=this.children_[i+1])),this.contentEl().insertBefore(n.el(),e)}return n}removeChild(e){if("string"==typeof e&&(e=this.getChild(e)),!e||!this.children_)return;let t=!1;for(let i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(!t)return;e.parentComponent_=null,this.childIndex_[e.id()]=null,this.childNameIndex_[jt(e.name())]=null,this.childNameIndex_[Dt(e.name())]=null;const i=e.el();i&&i.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}initChildren(){const e=this.options_.children;if(e){const t=this.options_,i=e=>{const i=e.name;let n=e.opts;if(void 0!==t[i]&&(n=t[i]),!1===n)return;!0===n&&(n={}),n.playerOptions=this.options_.playerOptions;const s=this.addChild(i,n);s&&(this[i]=s)};let n;const s=Ut.getComponent("Tech");n=Array.isArray(e)?e:Object.keys(e),n.concat(Object.keys(this.options_).filter((function(e){return!n.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((t=>{let i,n;return"string"==typeof t?(i=t,n=e[i]||this.options_[i]||{}):(i=t.name,n=t),{name:i,opts:n}})).filter((e=>{const t=Ut.getComponent(e.opts.componentClass||jt(e.name));return t&&!s.isTech(t)})).forEach(i)}}buildCSSClass(){return""}ready(e,t=!1){if(e)return this.isReady_?void(t?e.call(this):this.setTimeout(e,1)):(this.readyQueue_=this.readyQueue_||[],void this.readyQueue_.push(e))}triggerReady(){this.isReady_=!0,this.setTimeout((function(){const e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)}$(e,t){return He(e,t||this.contentEl())}$$(e,t){return qe(e,t||this.contentEl())}hasClass(e){return Se(this.el_,e)}addClass(...e){ke(this.el_,...e)}removeClass(...e){we(this.el_,...e)}toggleClass(e,t){Ce(this.el_,e,t)}show(){this.removeClass("vjs-hidden")}hide(){this.addClass("vjs-hidden")}lockShowing(){this.addClass("vjs-lock-showing")}unlockShowing(){this.removeClass("vjs-lock-showing")}getAttribute(e){return Ie(this.el_,e)}setAttribute(e,t){Oe(this.el_,e,t)}removeAttribute(e){Pe(this.el_,e)}width(e,t){return this.dimension("width",e,t)}height(e,t){return this.dimension("height",e,t)}dimensions(e,t){this.width(e,!0),this.height(t)}dimension(e,t,i){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(i||this.trigger("componentresize"));if(!this.el_)return 0;const n=this.el_.style[e],s=n.indexOf("px");return-1!==s?parseInt(n.slice(0,s),10):parseInt(this.el_["offset"+jt(e)],10)}currentDimension(e){let t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if(t=$e(this.el_,e),t=parseFloat(t),0===t||isNaN(t)){const i=`offset${jt
2(e)}`;t=this.el_[i]}return t}currentDimensions(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}}currentWidth(){return this.currentDimension("width")}currentHeight(){return this.currentDimension("height")}getPositions(){const e=this.el_.getBoundingClientRect();return{boundingClientRect:{x:e.x,y:e.y,width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left},center:{x:e.left+e.width/2,y:e.top+e.height/2,width:0,height:0,top:e.top+e.height/2,right:e.left+e.width/2,bottom:e.top+e.height/2,left:e.left+e.width/2}}}focus(){this.el_.focus()}blur(){this.el_.blur()}handleKeyDown(e){this.player_&&("Tab"===e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||e.stopPropagation(),this.player_.handleKeyDown(e))}handleKeyPress(e){this.handleKeyDown(e)}emitTapEvents(){let e,t=0,i=null;this.on("touchstart",(function(n){1===n.touches.length&&(i={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},t=s().performance.now(),e=!0)})),this.on("touchmove",(function(t){if(t.touches.length>1)e=!1;else if(i){const n=t.touches[0].pageX-i.pageX,s=t.touches[0].pageY-i.pageY;Math.sqrt(n*n+s*s)>10&&(e=!1)}}));const n=function(){e=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){i=null,!0===e&&s().performance.now()-t<200&&(n.preventDefault(),this.trigger("tap"))}))}enableTouchActivity(){if(!this.player()||!this.player().reportUserActivity)return;const e=mt(this.player(),this.player().reportUserActivity);let t;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));const i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}setTimeout(e,t){var i;return e=mt(this,e),this.clearTimersOnDispose_(),i=s().setTimeout((()=>{this.setTimeoutIds_.has(i)&&this.setTimeoutIds_.delete(i),e()}),t),this.setTimeoutIds_.add(i),i}clearTimeout(e){return this.setTimeoutIds_.has(e)&&(this.setTimeoutIds_.delete(e),s().clearTimeout(e)),e}setInterval(e,t){e=mt(this,e),this.clearTimersOnDispose_();const i=s().setInterval(e,t);return this.setIntervalIds_.add(i),i}clearInterval(e){return this.setIntervalIds_.has(e)&&(this.setIntervalIds_.delete(e),s().clearInterval(e)),e}requestAnimationFrame(e){var t;return this.clearTimersOnDispose_(),e=mt(this,e),t=s().requestAnimationFrame((()=>{this.rafIds_.has(t)&&this.rafIds_.delete(t),e()})),this.rafIds_.add(t),t}requestNamedAnimationFrame(e,t){this.namedRafs_.has(e)&&this.cancelNamedAnimationFrame(e),this.clearTimersOnDispose_(),t=mt(this,t);const i=this.requestAnimationFrame((()=>{t(),this.namedRafs_.has(e)&&this.namedRafs_.delete(e)}));return this.namedRafs_.set(e,i),e}cancelNamedAnimationFrame(e){this.namedRafs_.has(e)&&(this.cancelAnimationFrame(this.namedRafs_.get(e)),this.namedRafs_.delete(e))}cancelAnimationFrame(e){return this.rafIds_.has(e)&&(this.rafIds_.delete(e),s().cancelAnimationFrame(e)),e}clearTimersOnDispose_(){this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",(()=>{[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach((([e,t])=>{this[e].forEach(((e,i)=>this[t](i)))})),this.clearingTimersOnDispose_=!1})))}getIsDisabled(){return Boolean(this.el_.disabled)}getIsExpresslyInert(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert}getIsFocusable(e){return(e||this.el_).tabIndex>=0&&!(this.getIsDisabled()||this.getIsExpresslyInert())}getIsAvailableToBeFocused(e){function t(e){const t=s().getComputedStyle(e,null),i=t.getPropertyValue("visibility");return"none"!==t.getPropertyValue("display")&&!["hidden","collapse"].includes(i)}return e||(e=this.el()),!!(function(e){if(e.offsetWidth+e.offsetHeight+e.getBoundingClientRect().height+e.getBoundingClientRect().width===0)return!1;const t={x:e.getBoundingClientRect().left+e.offsetWidth/2,y:e.getBoundingClientRect().top+e.offsetHeight/2};if(t.x<0)return!1;if(t.x>(a().documentElement.clientWidth||s().innerWidth))return!1;if(t.y<0)return!1;if(t.y>(a().documentElement.clientHeight||s().innerHeight))return!1;let i=a().elementFromPoint(t.x,t.y);for(;i;){if(i===e)return!0;
vendor: 9,605 bytes, line 2
2if(!i.parentNode)return!1;i=i.parentNode}}(e)&&(i=e,t(i.parentElement)&&t(i)&&"0"!==i.style.opacity&&"0px"!==s().getComputedStyle(i).height&&"0px"!==s().getComputedStyle(i).width)&&(!e.parentElement||e.tabIndex>=0));var i}static registerComponent(e,t){if("string"!=typeof e||!e)throw new Error(`Illegal component name, "${e}"; must be a non-empty string.`);const i=Ut.getComponent("Tech"),n=i&&i.isTech(t),s=Ut===t||Ut.prototype.isPrototypeOf(t.prototype);if(n||!s){let t;throw t=n?"techs must be registered using Tech.registerTech()":"must be a Component subclass",new Error(`Illegal component, "${e}"; ${t}.`)}e=jt(e),Ut.components_||(Ut.components_={});const r=Ut.getComponent("Player");if("Player"===e&&r&&r.players){const e=r.players,t=Object.keys(e);if(e&&t.length>0)for(let i=0;i<t.length;i++)if(null!==e[t[i]])throw new Error("Can not register Player component after player has been created.")}return Ut.components_[e]=t,Ut.components_[Dt(e)]=t,t}static getComponent(e){if(e&&Ut.components_)return Ut.components_[e]}}function Bt(e,t,i,n){return function(e,t,i){if("number"!=typeof t||t<0||t>i)throw new Error(`Failed to execute '${e}' on 'TimeRanges': The index provided (${t}) is non-numeric or out of bounds (0-${i}).`)}(e,n,i.length-1),i[n][t]}function Ft(e){let t;return t=void 0===e||0===e.length?{length:0,start(){throw new Error("This TimeRanges object is empty")},end(){throw new Error("This TimeRanges object is empty")}}:{length:e.length,start:Bt.bind(null,"start",0,e),end:Bt.bind(null,"end",1,e)},s().Symbol&&s().Symbol.iterator&&(t[s().Symbol.iterator]=()=>(e||[]).values()),t}function Vt(e,t){return Array.isArray(e)?Ft(e):void 0===e||void 0===t?Ft():Ft([[e,t]])}Ut.registerComponent("Component",Ut);const Ht=function(e,t){e=e<0?0:e;let i=Math.floor(e%60),n=Math.floor(e/60%60),s=Math.floor(e/3600);const r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(s=n=i="-"),s=s>0||a>0?s+":":"",n=((s||r>=10)&&n<10?"0"+n:n)+":",i=i<10?"0"+i:i,s+n+i};let qt=Ht;function $t(e){qt=e}function zt(){qt=Ht}function Wt(e,t=e){return qt(e,t)}var Gt=Object.freeze({__proto__:null,createTimeRanges:Vt,createTimeRange:Vt,setFormatTime:$t,resetFormatTime:zt,formatTime:Wt});function Kt(e,t){let i,n,s=0;if(!t)return 0;e&&e.length||(e=Vt(0,0));for(let r=0;r<e.length;r++)i=e.start(r),n=e.end(r),n>t&&(n=t),s+=n-i;return s/t}function Qt(e){if(e instanceof Qt)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:U(e)&&("number"==typeof e.code&&(this.code=e.code),Object.assign(this,e)),this.message||(this.message=Qt.defaultMessages[this.code]||"")}function Xt(e){return null!=e&&"function"==typeof e.then}function Yt(e){Xt(e)&&e.then(null,(e=>{}))}Qt.prototype.code=0,Qt.prototype.message="",Qt.prototype.status=null,Qt.prototype.metadata=null,Qt.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],Qt.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."},Qt.MEDIA_ERR_CUSTOM=0,Qt.prototype.MEDIA_ERR_CUSTOM=0,Qt.MEDIA_ERR_ABORTED=1,Qt.prototype.MEDIA_ERR_ABORTED=1,Qt.MEDIA_ERR_NETWORK=2,Qt.prototype.MEDIA_ERR_NETWORK=2,Qt.MEDIA_ERR_DECODE=3,Qt.prototype.MEDIA_ERR_DECODE=3,Qt.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Qt.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4,Qt.MEDIA_ERR_ENCRYPTED=5,Qt.prototype.MEDIA_ERR_ENCRYPTED=5;const Jt=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce(((t,i,n)=>(e[i]&&(t[i]=e[i]),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 Zt=Jt;const ei="vjs-modal-dialog";class ti extends Ut{constructor(e,t){super(e,t),this.handleKeyDown_=e=>this.handleKeyDown(e),this.close_=e=>this.close(e),this.opened_=this.hasBeenOpened_=this.hasBeenFilled_=!1,this.closeable(!this.options_.uncloseable),this.content(this.options_.content),this.contentEl_=ve("div",{className:`${ei}-content`},{role:"document"}),this.descEl_=ve("p",{className:`${ei}-description vjs-control-text`,id:this.el().getAttribute("aria-describedby")}),be(this.descEl_,this.description()),this.el_.appendChild(this.descEl_),this.el_.appendChild(this.contentEl_)}createEl(){return super.createEl("div",{className:this.buildCSSClass(),tabIndex:-1},{"aria-describedby":`${this.id()}_description`,"aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})}dispose(){this.contentEl_=null,this.descEl_=null,this.previouslyActiveEl_=null,super.dispose()}buildCSSClass(){return`${ei} vjs-hidden ${super.buildCSSClass()}`}label(){return this.localize(this.options_.label||"Modal Window")}description(){let 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}open(){if(this.opened_)return void(this.options_.fillAlways&&this.fill());const 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}opened(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_}close(){if(!this.opened_)return;const 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({type:"modalclose",bubbles:!0}),this.conditionalBlur_(),this.options_.temporary&&this.dispose()}closeable(e){if("boolean"==typeof e){const t=this.closeable_=!!e;let i=this.getChild("closeButton");if(t&&!i){const e=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=e,this.on(i,"close",this.close_)}!t&&i&&(this.off(i,"close",this.close_),this.removeChild(i),i.dispose())}return this.closeable_}fill(){this.fillWith(this.content())}fillWith(e){const t=this.contentEl(),i=t.parentNode,n=t.nextSibling;this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),Fe(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t);const s=this.getChild("closeButton");s&&i.appendChild(s.el_),this.trigger("aftermodalfill")}empty(){this.trigger("beforemodalempty"),Ne(this.contentEl()),this.trigger("modalempty")}content(e){return void 0!==e&&(this.content_=e),this.content_}conditionalFocus_(){const e=a().activeElement,t=this.player_.el_;this.previouslyActiveEl_=null,(t.contains(e)||t===e)&&(this.previouslyActiveEl_=e,this.focus())}conditionalBlur_(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_=null)}handleKeyDown(e){if(this.trigger({type:"modalKeydown",originalEvent:e,target:this,bubbles:!0}),e.stopPropagation(),"Escape"===e.key&&this.closeable())return e.preventDefault(),void this.close();if("Tab"!==e.key)return;const t=this.focusableEls_(),i=this.el_.querySelector(":focus");let n;for(let e=0;e<t.length;e++)if(i===t[e]){n=e;break}a().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())}focusableEls_(){const e=this.el_.querySelectorAll("*");return Array.prototype.filter.call(e,(e=>(e instanceof s().HTMLAnchorElement||e instanceof s().HTMLAreaElement)&&e.hasAttribute("href")||(e instanceof s().HTMLInputElement||e instanceof s().HTMLSelectElement||e instanceof s().HTMLTextAreaElement||e instanceof s().HTMLButtonElement)&&!e.hasAttribute("disabled")||e instanceof s().HTMLIFrameElement||e instanceof s().HTMLObjectElement||e instanceof s().HTMLEmbedElement||e.hasAttribute("tabindex")&&-1!==e.getAttribute("tabindex")||e.hasAttribute("contenteditable")))}}ti.prototype.options_={pauseOnOpen:!0,temporary:!0},Ut.registerComponent("ModalDialog",ti);class ii extends Tt{constructor(e=[]){super(),this.tracks_=[];for(let t=0;t<e.length;t++)this.addTrack(e[t])}get length(){return this.tracks_.length}addTrack(e){const t=this.tracks_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.tracks_[t]}}),-1===this.tracks_.indexOf(e)&&(this.tracks_.push(e),this.trigger({track:e,type:"addtrack",target:this})),e.labelchange_=()=>{this.trigger({track:e,type:"labelchange",target:this})},kt(e)&&e.addEventListener("labelchange",e.labelchange_)}removeTrack(e){let t;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this[i],t.off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack",target:this})}getTrackById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const n=this[i];if(n.id===e){t=n;break}}return t}}ii.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(const e in ii.prototype.allowedEvents_)ii.prototype["on"+e]=null;const ni=function(e,t){for(let i=0;i<e.length;
2i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].enabled=!1)};class si extends ii{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].enabled){ni(e,e[t]);break}super(e),this.changing_=!1}addTrack(e){e.enabled&&ni(this,e),super.addTrack(e),e.addEventListener&&(e.enabledChange_=()=>{this.changing_||(this.changing_=!0,ni(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("enabledchange",e.enabledChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.enabledChange_&&(e.removeEventListener("enabledchange",e.enabledChange_),e.enabledChange_=null)}}const ri=function(e,t){for(let i=0;i<e.length;i++)Object.keys(e[i]).length&&t.id!==e[i].id&&(e[i].selected=!1)};class ai extends ii{constructor(e=[]){for(let t=e.length-1;t>=0;t--)if(e[t].selected){ri(e,e[t]);break}super(e),this.changing_=!1,Object.defineProperty(this,"selectedIndex",{get(){for(let e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set(){}})}addTrack(e){e.selected&&ri(this,e),super.addTrack(e),e.addEventListener&&(e.selectedChange_=()=>{this.changing_||(this.changing_=!0,ri(this,e),this.changing_=!1,this.trigger("change"))},e.addEventListener("selectedchange",e.selectedChange_))}removeTrack(e){super.removeTrack(e),e.removeEventListener&&e.selectedChange_&&(e.removeEventListener("selectedchange",e.selectedChange_),e.selectedChange_=null)}}class oi extends ii{addTrack(e){super.addTrack(e),this.queueChange_||(this.queueChange_=()=>this.queueTrigger("change")),this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=()=>this.trigger("selectedlanguagechange")),e.addEventListener("modechange",this.queueChange_),-1===["metadata","chapters"].indexOf(e.kind)&&e.addEventListener("modechange",this.triggerSelectedlanguagechange_)}removeTrack(e){super.removeTrack(e),e.removeEventListener&&(this.queueChange_&&e.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&e.removeEventListener("modechange",this.triggerSelectedlanguagechange_))}toJSON(){return this.tracks_.map((e=>e.toJSON()))}}class li{constructor(e){li.prototype.setCues_.call(this,e),Object.defineProperty(this,"length",{get(){return this.length_}})}setCues_(e){const t=this.length||0;let i=0;const n=e.length;this.cues_=e,this.length_=e.length;const s=function(e){""+e in this||Object.defineProperty(this,""+e,{get(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)s.call(this,i)}getCueById(e){let t=null;for(let i=0,n=this.length;i<n;i++){const n=this[i];if(n.id===e){t=n;break}}return t}}const ui={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},ci={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},hi={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},di={disabled:"disabled",hidden:"hidden",showing:"showing"};class pi extends Tt{constructor(e={}){super();const t={id:e.id||"vjs_track_"+nt(),kind:e.kind||"",language:e.language||""};let i=e.label||"";for(const e in t)Object.defineProperty(this,e,{get(){return t[e]},set(){}});Object.defineProperty(this,"label",{get(){return i},set(e){e!==i&&(i=e,this.trigger("labelchange"))}})}}const fi=function(e){return new URL(e,a().baseURI)},gi=function(e){return new URL(e,a().baseURI).href},mi=function(e){if("string"==typeof e){const t=e.split("?")[0].replace(/\/+$/,"").match(/\.([^.\/]+)$/);return t?t[1].toLowerCase():""}return""},yi=function(e,t=s().location){return fi(e).origin!==t.origin};var _i=Object.freeze({__proto__:null,parseUrl:fi,getAbsoluteURL:gi,getFileExtension:mi,isCrossOrigin:yi});const vi=function(e,t){const i=new(s().WebVTT.Parser)(s(),s().vttjs,s().WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(s().console&&s().console.groupCollapsed&&s().console.groupCollapsed(`Text Track parsing errors for ${t.src}`),n.forEach((e=>L.error(e))),s().console&&s().console.groupEnd&&s().console.groupEnd()),i.flush()},bi=function(e,t){const i={uri:e},n=yi(e);n&&(i.cors=n);const r="use-credentials"===t.tech_.crossOrigin();r&&(i.withCredentials=r),l()(i,mt(this,(function(e,i,n){if(e)return L.error(e,i);t.loaded_=!0,"function"!=typeof s().WebVTT?t.tech_&&t.tech_.any(["vttjsloaded","vttjserror"],(e=>{if("vttjserror"!==e.type)return vi(n,t);L.error(`vttjs failed to load, stopping trying to process ${t.src}`)})):vi(n,t)})))};class Ti extends pi{constructor(e={}
vendor: 8,063 bytes, line 2
2){if(!e.tech)throw new Error("A tech was not provided.");const t=F(e,{kind:hi[e.kind]||"subtitles",language:e.language||e.srclang||""});let i=di[t.mode]||"disabled";const n=t.default;"metadata"!==t.kind&&"chapters"!==t.kind||(i="hidden"),super(t),this.tech_=t.tech,this.cues_=[],this.activeCues_=[],this.preload_=!1!==this.tech_.preloadTextTracks;const s=new li(this.cues_),r=new li(this.activeCues_);let a=!1;this.timeupdateHandler=mt(this,(function(e={}){this.tech_.isDisposed()||(this.tech_.isReady_?(this.activeCues=this.activeCues,a&&(this.trigger("cuechange"),a=!1),"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler))):"timeupdate"!==e.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))})),this.tech_.one("dispose",(()=>{this.stopTracking()})),"disabled"!==i&&this.startTracking(),Object.defineProperties(this,{default:{get(){return n},set(){}},mode:{get(){return i},set(e){di[e]&&i!==e&&(i=e,this.preload_||"disabled"===i||0!==this.cues.length||bi(this.src,this),this.stopTracking(),"disabled"!==i&&this.startTracking(),this.trigger("modechange"))}},cues:{get(){return this.loaded_?s:null},set(){}},activeCues:{get(){if(!this.loaded_)return null;if(0===this.cues.length)return r;const e=this.tech_.currentTime(),t=[];for(let i=0,n=this.cues.length;i<n;i++){const n=this.cues[i];n.startTime<=e&&n.endTime>=e&&t.push(n)}if(a=!1,t.length!==this.activeCues_.length)a=!0;else for(let e=0;e<t.length;e++)-1===this.activeCues_.indexOf(t[e])&&(a=!0);return this.activeCues_=t,r.setCues_(this.activeCues_),r},set(){}}}),t.src?(this.src=t.src,this.preload_||(this.loaded_=!0),(this.preload_||"subtitles"!==t.kind&&"captions"!==t.kind)&&bi(this.src,this)):this.loaded_=!0}startTracking(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler),this.tech_.on("timeupdate",this.timeupdateHandler)}stopTracking(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_),this.rvf_=void 0),this.tech_.off("timeupdate",this.timeupdateHandler)}addCue(e){let t=e;if(!("getCueAsHTML"in t)){t=new(s().vttjs.VTTCue)(e.startTime,e.endTime,e.text);for(const i in e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}const i=this.tech_.textTracks();for(let e=0;e<i.length;e++)i[e]!==this&&i[e].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)}toJSON(){return Zt(this)}removeCue(e){let t=this.cues_.length;for(;t--;){const i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}}}Ti.prototype.allowedEvents_={cuechange:"cuechange"};class Si extends pi{constructor(e={}){const t=F(e,{kind:ci[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"enabled",{get(){return i},set(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("enabledchange"))}}),t.enabled&&(this.enabled=t.enabled),this.loaded_=!0}}class ki extends pi{constructor(e={}){const t=F(e,{kind:ui[e.kind]||""});super(t);let i=!1;Object.defineProperty(this,"selected",{get(){return i},set(e){"boolean"==typeof e&&e!==i&&(i=e,this.trigger("selectedchange"))}}),t.selected&&(this.selected=t.selected)}}class wi extends Tt{constructor(e={}){let t;super();const i=new Ti(e);this.kind=i.kind,this.src=i.src,this.srclang=i.language,this.label=i.label,this.default=i.default,Object.defineProperties(this,{readyState:{get(){return t}},track:{get(){return i}}}),t=wi.NONE,i.addEventListener("loadeddata",(()=>{t=wi.LOADED,this.trigger({type:"load",target:this})}))}}wi.prototype.allowedEvents_={load:"load"},wi.NONE=0,wi.LOADING=1,wi.LOADED=2,wi.ERROR=3;const Ci={audio:{ListClass:si,TrackClass:Si,capitalName:"Audio"},video:{ListClass:ai,TrackClass:ki,capitalName:"Video"},text:{ListClass:oi,TrackClass:Ti,capitalName:"Text"}};Object.keys(Ci).forEach((function(e){Ci[e].getterName=`${e}Tracks`,Ci[e].privateName=`${e}Tracks_`}));const Ei={remoteText:{ListClass:oi,TrackClass:Ti,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:class{constructor(e=[]){this.trackElements_=[],Object.defineProperty(this,"length",{get(){return this.trackElements_.length}});for(let t=0,i=e.length;t<i;t++)this.addTrackElement_(e[t])}addTrackElement_(e){const t=this.trackElements_.length;""+t in this||Object.defineProperty(this,t,{get(){return this.trackElements_[t]}}),-1===this.trackElements_.indexOf(e)&&this.trackElements_.push(e)}getTrackElementByTrack_(e){let t;for(let i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t}removeTrackElement_(e){for(let t=0,i=this.trackElements_.length;t<i;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}}},TrackClass:wi,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},xi=Object.assign({},Ci,Ei);Ei.names=Object.keys(Ei),Ci.names=Object.keys(Ci),xi.names=[].concat(Ei.names).concat(Ci.names);class Ii extends Ut{constructor(e={},t=function(){}){e.reportTouchActivity=!1,super(null,e,t),this.onDurationChange_=e=>this.onDurationChange(e),this.trackProgress_=e=>this.trackProgress(e),this.trackCurrentTime_=e=>this.trackCurrentTime(e),this.stopTrackingCurrentTime_=e=>this.stopTrackingCurrentTime(e),this.disposeSourceHandler_=e=>this.disposeSourceHandler(e),this.queuedHanders_=new Set,this.hasStarted_=!1,this.on("playing",(function(){this.hasStarted_=!0})),this.on("loadstart",(function(){this.hasStarted_=!1})),xi.names.forEach((t=>{const i=xi[t];e&&e[i.getterName]&&(this[i.privateName]=e[i.getterName])})),this.featuresProgressEvents||this.manualProgressOn(),this.featuresTimeupdateEvents||this.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((t=>{!1===e[`native${t}Tracks`]&&(this[`featuresNative${t}Tracks`]=!1)})),!1===e.nativeCaptions||!1===e.nativeTextTracks?this.featuresNativeTextTracks=!1:!0!==e.nativeCaptions&&!0!==e.nativeTextTracks||(this.featuresNativeTextTracks=!0),this.featuresNativeTextTracks||this.emulateTextTracks(),this.preloadTextTracks=!1!==e.preloadTextTracks,this.autoRemoteTextTracks_=new xi.text.ListClass,this.initTrackListeners(),e.nativeControlsForTouch||this.emitTapEvents(),this.constructor&&(this.name_=this.constructor.name||"Unknown Tech")}triggerSourceset(e){this.isReady_||this.one("ready",(()=>this.setTimeout((()=>this.triggerSourceset(e)),1))),this.trigger({src:e,type:"sourceset"})}manualProgressOn(){this.on("durationchange",this.onDurationChange_),this.manualProgress=!0,this.one("ready",this.trackProgress_)}manualProgressOff(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange_)}trackProgress(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(mt(this,(function(){const e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)}onDurationChange(e){this.duration_=this.duration()}buffered(){return Vt(0,0)}bufferedPercent(){return Kt(this.buffered(),this.duration_)}stopTrackingProgress(){this.clearInterval(this.progressInterval)}manualTimeUpdatesOn(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime_),this.on("pause",this.stopTrackingCurrentTime_)}manualTimeUpdatesOff(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime_),this.off("pause",this.stopTrackingCurrentTime_)}trackCurrentTime(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)}stopTrackingCurrentTime(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}dispose(){this.clearTracks(Ci.names),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),super.dispose()}
vendor: 4,460 bytes, line 2
2clearTracks(e){(e=[].concat(e)).forEach((e=>{const t=this[`${e}Tracks`]()||[];let i=t.length;for(;i--;){const n=t[i];"text"===e&&this.removeRemoteTextTrack(n),t.removeTrack(n)}}))}cleanupAutoTextTracks(){const e=this.autoRemoteTextTracks_||[];let t=e.length;for(;t--;){const i=e[t];this.removeRemoteTextTrack(i)}}reset(){}crossOrigin(){}setCrossOrigin(){}error(e){return void 0!==e&&(this.error_=new Qt(e),this.trigger("error")),this.error_}played(){return this.hasStarted_?Vt(0,0):Vt()}play(){}setScrubbing(e){}scrubbing(){}setCurrentTime(e){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}initTrackListeners(){Ci.names.forEach((e=>{const t=Ci[e],i=()=>{this.trigger(`${e}trackchange`)},n=this[t.getterName]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),this.on("dispose",(()=>{n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)}))}))}addWebVttScript_(){if(!s().WebVTT)if(a().body.contains(this.el())){if(!this.options_["vtt.js"]&&B(c())&&Object.keys(c()).length>0)return void this.trigger("vttjsloaded");const e=a().createElement("script");e.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js",e.onload=()=>{this.trigger("vttjsloaded")},e.onerror=()=>{this.trigger("vttjserror")},this.on("dispose",(()=>{e.onload=null,e.onerror=null})),s().WebVTT=!0,this.el().parentNode.appendChild(e)}else this.ready(this.addWebVttScript_)}emulateTextTracks(){const e=this.textTracks(),t=this.remoteTextTracks(),i=t=>e.addTrack(t.track),n=t=>e.removeTrack(t.track);t.on("addtrack",i),t.on("removetrack",n),this.addWebVttScript_();const s=()=>this.trigger("texttrackchange"),r=()=>{s();for(let t=0;t<e.length;t++){const i=e[t];i.removeEventListener("cuechange",s),"showing"===i.mode&&i.addEventListener("cuechange",s)}};r(),e.addEventListener("change",r),e.addEventListener("addtrack",r),e.addEventListener("removetrack",r),this.on("dispose",(function(){t.off("addtrack",i),t.off("removetrack",n),e.removeEventListener("change",r),e.removeEventListener("addtrack",r),e.removeEventListener("removetrack",r);for(let t=0;t<e.length;t++)e[t].removeEventListener("cuechange",s)}))}addTextTrack(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,n,s={}){const r=e.textTracks();s.kind=t,i&&(s.label=i),n&&(s.language=n),s.tech=e;const a=new xi.text.TrackClass(s);return r.addTrack(a),a}(this,e,t,i)}createRemoteTextTrack(e){const t=F(e,{tech:this});return new Ei.remoteTextEl.TrackClass(t)}addRemoteTextTrack(e={},t){const i=this.createRemoteTextTrack(e);return"boolean"!=typeof t&&(t=!1),this.remoteTextTrackEls().addTrackElement_(i),this.remoteTextTracks().addTrack(i.track),!1===t&&this.ready((()=>this.autoRemoteTextTracks_.addTrack(i.track))),i}removeRemoteTextTrack(e){const t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack(e),this.autoRemoteTextTracks_.removeTrack(e)}getVideoPlaybackQuality(){return{}}requestPictureInPicture(){return Promise.reject()}disablePictureInPicture(){return!0}setDisablePictureInPicture(){}requestVideoFrameCallback(e){const t=nt();return!this.isReady_||this.paused()?(this.queuedHanders_.add(t),this.one("playing",(()=>{this.queuedHanders_.has(t)&&(this.queuedHanders_.delete(t),e())}))):this.requestNamedAnimationFrame(t,e),t}cancelVideoFrameCallback(e){this.queuedHanders_.has(e)?this.queuedHanders_.delete(e):this.cancelNamedAnimationFrame(e)}setPoster(){}playsinline(){}setPlaysinline(){}overrideNativeAudioTracks(e){}overrideNativeVideoTracks(e){}canPlayType(e){return""}static canPlayType(e){return""}static canPlaySource(e,t){return Ii.canPlayType(e.type)}static isTech(e){return e.prototype instanceof Ii||e instanceof Ii||e===Ii}static registerTech(e,t){if(Ii.techs_||(Ii.techs_={}),!Ii.isTech(t))throw new Error(`Tech ${e} must be a Tech`);if(!Ii.canPlayType)throw new Error("Techs must have a static canPlayType method on them");if(!Ii.canPlaySource)throw new Error("Techs must have a static canPlaySource method on them");return e=jt(e),Ii.techs_[e]=t,Ii.techs_[Dt(e)]=t,"Tech"!==e&&Ii.defaultTechOrder_.push(e),t}static getTech(e){if(e)return Ii.techs_&&Ii.techs_[e]?Ii.techs_[e]:(e=jt(e),s()&&s().videojs&&s().videojs[e]?(L.warn(`The ${e} tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)`),s().videojs[e]):void 0)}}
vendor: 14,871 bytes, line 2
2xi.names.forEach((function(e){const t=xi[e];Ii.prototype[t.getterName]=function(){return this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName]}})),Ii.prototype.featuresVolumeControl=!0,Ii.prototype.featuresMuteControl=!0,Ii.prototype.featuresFullscreenResize=!1,Ii.prototype.featuresPlaybackRate=!1,Ii.prototype.featuresProgressEvents=!1,Ii.prototype.featuresSourceset=!1,Ii.prototype.featuresTimeupdateEvents=!1,Ii.prototype.featuresNativeTextTracks=!1,Ii.prototype.featuresVideoFrameCallback=!1,Ii.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){let n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){const i=e.sourceHandlers||[];let n;for(let e=0;e<i.length;e++)if(n=i[e].canPlayType(t),n)return n;return""},e.selectSourceHandler=function(t,i){const n=e.sourceHandlers||[];let s;for(let e=0;e<n.length;e++)if(s=n[e].canHandleSource(t,i),s)return n[e];return null},e.canPlaySource=function(t,i){const n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""},["seekable","seeking","duration"].forEach((function(e){const 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){let i=e.selectSourceHandler(t,this.options_);i||(e.nativeSourceHandler?i=e.nativeSourceHandler:L.error("No source handler found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler_),i!==e.nativeSourceHandler&&(this.currentSource_=t),this.sourceHandler_=i.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)}},Ut.registerComponent("Tech",Ii),Ii.registerTech("Tech",Ii),Ii.defaultTechOrder_=[];const Oi={},Pi={},Ai={};function Li(e,t,i){e.setTimeout((()=>Ui(t,Oi[t.type],i,e)),1)}function Mi(e,t,i,n=null){const s="call"+jt(i),r=e.reduce(Ni(s),n),a=r===Ai,o=a?null:t[i](r);return function(e,t,i,n){for(let s=e.length-1;s>=0;s--){const r=e[s];r[t]&&r[t](n,i)}}(e,i,o,a),o}const Di={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},ji={setCurrentTime:1,setMuted:1,setVolume:1},Ri={play:1,pause:1};function Ni(e){return(t,i)=>t===Ai?Ai:i[e]?i[e](t):t}function Ui(e={},t=[],i,n,s=[],r=!1){const[a,...o]=t;if("string"==typeof a)Ui(e,Oi[a],i,n,s,r);else if(a){const t=function(e,t){const i=Pi[e.id()];let n=null;if(null==i)return n=t(e),Pi[e.id()]=[[t,n]],n;for(let e=0;e<i.length;e++){const[s,r]=i[e];s===t&&(n=r)}return null===n&&(n=t(e),i.push([t,n])),n}(n,a);if(!t.setSource)return s.push(t),Ui(e,o,i,n,s,r);t.setSource(Object.assign({},e),(function(a,l){if(a)return Ui(e,o,i,n,s,r);s.push(t),Ui(l,e.type===l.type?o:Oi[l.type],i,n,s,r)}))}else o.length?Ui(e,o,i,n,s,r):r?i(e,s):Ui(e,Oi["*"],i,n,s,!0)}const Bi={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",mpd:"application/dash+xml",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},Fi=function(e=""){const t=mi(e);return Bi[t.toLowerCase()]||""},Vi=function(e){if(Array.isArray(e)){let t=[];e.forEach((function(e){e=Vi(e),Array.isArray(e)?t=t.concat(e):U(e)&&t.push(e)})),e=t}else e="string"==typeof e&&e.trim()?[Hi({src:e})]:U(e)&&"string"==typeof e.src&&e.src&&e.src.trim()?[Hi(e)]:[];return e};function Hi(e){if(!e.type){const t=Fi(e.src);t&&(e.type=t)}return e}const qi=ae?10009:oe?461:8,$i={codes:{play:415,pause:19,ff:417,rw:412,back:qi},names:{415:"play",19:"pause",417:"ff",412:"rw",[qi]:"back"},isEventKey(e,t){return t=t.toLowerCase(),!(!this.names[e.keyCode]||this.names[e.keyCode]!==t)},getEventName(e){if(this.names[e.keyCode])return this.names[e.keyCode];if(this.codes[e.code]){const t=this.codes[e.code];return this.names[t]}return null}};class zi extends Tt{constructor(e){super(),this.player_=e,this.focusableComponents=[],this.isListening_=!1,this.isPaused_=!1,this.onKeyDown_=this.onKeyDown_.bind(this),this.lastFocusedComponent_=null}start(){this.isListening_||(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",(()=>{this.focus(this.updateFocusableComponents()[0])})),this.player_.on("modalclose",(()=>{this.refocusComponent()})),this.player_.on("focusin",this.handlePlayerFocus_.bind(this)),this.player_.on("focusout",this.handlePlayerBlur_.bind(this)),this.isListening_=!0,this.player_.errorDisplay&&this.player_.errorDisplay.on("aftermodalfill",(()=>{this.updateFocusableComponents(),this.focusableComponents.length&&(this.focusableComponents.length>1?this.focusableComponents[1].focus():this.focusableComponents[0].focus())})))}stop(){this.player_.off("keydown",this.onKeyDown_),this.isListening_=!1}onKeyDown_(e){const t=e.originalEvent?e.originalEvent:e;if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(t.key)){if(this.isPaused_)return;t.preventDefault();const e=t.key.substring(5).toLowerCase();this.move(e)}else if($i.isEventKey(t,"play")||$i.isEventKey(t,"pause")||$i.isEventKey(t,"ff")||$i.isEventKey(t,"rw")){t.preventDefault();const e=$i.getEventName(t);this.performMediaAction_(e)}else $i.isEventKey(t,"Back")&&e.target&&"function"==typeof e.target.closeable&&e.target.closeable()&&(t.preventDefault(),e.target.close())}performMediaAction_(e){if(this.player_)switch(e){case"play":this.player_.paused()&&this.player_.play();break;case"pause":this.player_.paused()||this.player_.pause();break;case"ff":this.userSeek_(this.player_.currentTime()+5);break;case"rw":this.userSeek_(this.player_.currentTime()-5)}}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}pause(){this.isPaused_=!0}resume(){this.isPaused_=!1}handlePlayerBlur_(e){const t=e.relatedTarget;let i=null;const n=this.getCurrentComponent(e.target);t&&(i=Boolean(t.closest(".video-js")),t.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_()),(e.currentTarget.contains(e.relatedTarget)||i)&&t||(n&&"CloseButton"===n.name()?this.refocusComponent():(this.pause(),n&&n.el()&&(this.lastFocusedComponent_=n)))}handlePlayerFocus_(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()}updateFocusableComponents(){const e=this.player_,t=[];function i(e){for(const n of e)n.hasOwnProperty("el_")&&n.getIsFocusable()&&n.getIsAvailableToBeFocused(n.el())&&t.push(n),n.hasOwnProperty("children_")&&n.children_.length>0&&i(n.children_)}return e.children_.forEach((e=>{if(e.hasOwnProperty("el_")){if(e.getIsFocusable&&e.getIsAvailableToBeFocused&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el()))return void t.push(e);e.hasOwnProperty("children_")&&e.children_.length>0?i(e.children_):e.hasOwnProperty("items")&&e.items.length>0?i(e.items):this.findSuitableDOMChild(e)&&t.push(e)}if("ErrorDisplay"===e.name_&&e.opened_){const i=e.el_.querySelector(".vjs-errors-ok-button-container");i&&i.querySelectorAll("button").forEach(((e,i)=>{t.push({name:()=>"ModalButton"+(i+1),el:()=>e,getPositions:()=>{const t=e.getBoundingClientRect();return{boundingClientRect:{x:t.x,y:t.y,width:t.width,height:t.height,top:t.top,right:t.right,bottom:t.bottom,left:t.left},center:{x:t.left+t.width/2,y:t.top+t.height/2,width:0,height:0,top:t.top+t.height/2,right:t.left+t.width/2,bottom:t.top+t.height/2,left:t.left+t.width/2}}},getIsAvailableToBeFocused:()=>!0,getIsFocusable:e=>!0,focus:()=>e.focus()})}))}})),this.focusableComponents=t,this.focusableComponents}findSuitableDOMChild(e){return e.el()?function t(i){if(e.getIsFocusable(i)&&e.getIsAvailableToBeFocused(i))return i;for(let e=0;e<i.children.length;e++){const n=t(i.children[e]);if(n)return n}return null}(e.el()):null}getCurrentComponent(e){this.updateFocusableComponents();const t=e||document.activeElement;if(this.focusableComponents.length)for(const e of this.focusableComponents)if(e.el()===t)return e}add(e){const t=[...this.focusableComponents];e.hasOwnProperty("el_")&&e.getIsFocusable()&&e.getIsAvailableToBeFocused(e.el())&&t.push(e),this.focusableComponents=t,this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}remove(e){for(let t=0;t<this.focusableComponents.length;t++)if(this.focusableComponents[t].name()===e.name())return this.focusableComponents.splice(t,1),void this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})}clear(){this.focusableComponents.length>0&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))}move(e){const t=this.getCurrentComponent();if(!t)return;const i=t.getPositions(),n=this.focusableComponents.filter((n=>n!==t&&this.isInDirection_(i.boundingClientRect,n.getPositions().boundingClientRect,e))),s=this.findBestCandidate_(i.center,n,e);s?this.focus(s):this.trigger({type:"endOfFocusableComponents",direction:e,focusedComponent:t})}findBestCandidate_(e,t,i){let n=1/0,s=null;for(const r of t){const t=r.getPositions().center,a=this.calculateDistance_(e,t,i);a<n&&(n=a,s=r)}return s}isInDirection_(e,t,i){switch(i){case"right":return t.left>=e.right;case"left":return t.right<=e.left;case"down":return t.top>=e.bottom;case"up":return t.bottom<=e.top;default:return!1}}refocusComponent(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0),this.updateFocusableComponents();for(let e=0;e<this.focusableComponents.length;e++)if(this.focusableComponents[e].name()===this.lastFocusedComponent_.name())return void this.focus(this.focusableComponents[e])}else this.focus(this.updateFocusableComponents()[0])}focus(e){"object"==typeof e&&(e.getIsAvailableToBeFocused(e.el())?e.focus():this.findSuitableDOMChild(e)&&this.findSuitableDOMChild(e).focus())}calculateDistance_(e,t,i){const n=Math.abs(e.x-t.x),s=Math.abs(e.y-t.y);let r;switch(i){case"right":case"left":r=n+100*s;break;case"up":r=2*s+.5*n;break;case"down":r=5*s+n;break;default:r=n+s}return r}searchForTrackSelect_(){const e=this;for(const t of e.updateFocusableComponents())if("TextTrackSelect"===t.constructor.name){e.focus(t);break}}}Ut.registerComponent("MediaLoader",class extends Ut{constructor(e,t,i){if(super(e,F({createEl:!1},t),i),t.playerOptions.sources&&0!==t.playerOptions.sources.length)e.src(t.playerOptions.sources);else for(let i=0,n=t.playerOptions.techOrder;i<n.length;i++){const t=jt(n[i]);let s=Ii.getTech(t);if(t||(s=Ut.getComponent(t)),s&&s.isSupported()){e.loadTech_(t);break}}}});class Wi extends Ut{constructor(e,t){super(e,t),this.options_.controlText&&this.controlText(this.options_.controlText),this.handleMouseOver_=e=>this.handleMouseOver(e),this.handleMouseOut_=e=>this.handleMouseOut(e),this.handleClick_=e=>this.handleClick(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.emitTapEvents(),this.enable()}createEl(e="div",t={},i={}){t=Object.assign({className:this.buildCSSClass(),tabIndex:0},t),"button"===e&&L.error(`Creating a ClickableComponent with an HTML element of ${e} is not supported; use a Button instead.`),i=Object.assign({role:"button"},i),this.tabIndex_=t.tabIndex;const n=ve(e,t,i);return this.player_.options_.experimentalSvgIcons||n.appendChild(ve("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}dispose(){this.controlTextEl_=null,super.dispose()}createControlTextEl(e){return this.controlTextEl_=ve("span",{className:"vjs-control-text"},{"aria-live":"polite"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_}controlText(e,t=this.el()){if(void 0===e)return this.controlText_||"Need Text";const i=this.localize(e);this.controlText_=e,be(this.controlTextEl_,i),this.nonIconControl||this.player_.options_.noUITitleAttributes||t.setAttribute("title",i)}buildCSSClass(){return`vjs-control vjs-button ${super.buildCSSClass()}`}enable(){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_))}disable(){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_)}handleLanguagechange(){this.controlText(this.controlText_)}handleClick(e){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)}handleKeyDown(e){" "===e.key||"Enter"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}}Ut.registerComponent("ClickableComponent",Wi);class Gi extends Wi{constructor(e,t){super(e,t),this.update(),this.update_=e=>this.update(e),e.on("posterchange",this.update_)}dispose(){this.player().off("posterchange",this.update_),super.dispose()}createEl(){return ve("div",{className:"vjs-poster"})}crossOrigin(e){if(void 0===e)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_?this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null===e||"anonymous"===e||"use-credentials"===e?this.$("img")&&(this.$("img").crossOrigin=e):this.player_.log.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`)}update(e){const t=this.player().poster();this.setSrc(t),t?this.show():this.hide()}setSrc(e){e?(this.$("img")||this.el_.appendChild(ve("picture",{className:"vjs-poster",tabIndex:-1},{},ve("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=e):this.el_.textContent=""}handleClick(e){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?Yt(this.player_.play()):this.player_.pause())}}Gi.prototype.crossorigin=Gi.prototype.crossOrigin,Ut.registerComponent("PosterImage",Gi);const Ki="#222",Qi="#ccc",Xi={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',
vendor: 4,763 bytes, line 2
2script:'"Monotype Corsiva", cursive',smallcaps:'"Andale Mono", "Lucida Console", monospace, sans-serif'};function Yi(e,t){let i;if(4===e.length)i=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.");i=e.slice(1)}return"rgba("+parseInt(i.slice(0,2),16)+","+parseInt(i.slice(2,4),16)+","+parseInt(i.slice(4,6),16)+","+t+")"}function Ji(e,t,i){try{e.style[t]=i}catch(e){return}}function Zi(e){return e?`${e}px`:""}Ut.registerComponent("TextTrackDisplay",class extends Ut{constructor(e,t,i){super(e,t,i);const n=e=>this.updateDisplay(e),r=e=>{this.updateDisplayOverlay(),this.updateDisplay(e)};e.on("loadstart",(e=>this.toggleDisplay(e))),e.on("useractive",n),e.on("userinactive",n),e.on("texttrackchange",n),e.on("loadedmetadata",(e=>{this.updateDisplayOverlay(),this.preselectTrack(e)})),e.ready(mt(this,(function(){if(e.tech_&&e.tech_.featuresNativeTextTracks)return void this.hide();e.on("fullscreenchange",r),e.on("playerresize",r);const t=s().screen.orientation||s(),i=s().screen.orientation?"change":"orientationchange";t.addEventListener(i,r),e.on("dispose",(()=>t.removeEventListener(i,r)));const n=this.options_.playerOptions.tracks||[];for(let e=0;e<n.length;e++)this.player_.addRemoteTextTrack(n[e],!0);this.preselectTrack()})))}preselectTrack(){const e={captions:1,subtitles:1},t=this.player_.textTracks(),i=this.player_.cache_.selectedLanguage;let n,s,r;for(let a=0;a<t.length;a++){const o=t[a];i&&i.enabled&&i.language&&i.language===o.language&&o.kind in e?o.kind===i.kind?r=o:r||(r=o):i&&!i.enabled?(r=null,n=null,s=null):o.default&&("descriptions"!==o.kind||n?o.kind in e&&!s&&(s=o):n=o)}r?r.mode="showing":s?s.mode="showing":n&&(n.mode="showing")}toggleDisplay(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()}createEl(){return super.createEl("div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})}clearDisplay(){"function"==typeof s().WebVTT&&s().WebVTT.processCues(s(),[],this.el_)}updateDisplay(){const e=this.player_.textTracks(),t=this.options_.allowMultipleShowingTracks;if(this.clearDisplay(),t){const t=[];for(let i=0;i<e.length;++i){const n=e[i];"showing"===n.mode&&t.push(n)}return void this.updateForTrack(t)}let i=null,n=null,r=e.length;for(;r--;){const t=e[r];"showing"===t.mode&&("descriptions"===t.kind?i=t:n=t)}if(n?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(n)):i&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(i)),void 0===s().CSS||!s().CSS.supports("inset","10px")){const e=this.el_,t=e.querySelectorAll(".vjs-text-track-cue"),i=this.player_.controlBar.el_.getBoundingClientRect().height,n=this.player_.el_.getBoundingClientRect().height;e.style="",Ji(e,"position","relative"),Ji(e,"height",n-i+"px"),Ji(e,"top","unset"),Ji(e,"bottom",le?n+"px":"0px"),t.length>0&&t.forEach((e=>{if(e.style.inset){const t=e.style.inset.split(" ");3===t.length&&Object.assign(e.style,{top:t[0],right:t[1],bottom:t[2],left:"unset"})}}))}}updateDisplayOverlay(){if(!this.player_.videoHeight()||void 0===s().CSS||!s().CSS.supports("inset-inline: 10px"))return;const e=this.player_.currentWidth(),t=this.player_.currentHeight(),i=e/t,n=this.player_.videoWidth()/this.player_.videoHeight();let r=0,a=0;Math.abs(i-n)>.1&&(i>n?r=Math.round((e-t*n)/2):a=Math.round((t-e/n)/2)),Ji(this.el_,"insetInline",Zi(r)),Ji(this.el_,"insetBlock",Zi(a))}updateDisplayState(e){const t=this.player_.textTrackSettings.getValues(),i=e.activeCues;let n=i.length;for(;n--;){const e=i[n];if(!e)continue;const r=e.displayState;if(t.color&&(r.firstChild.style.color=t.color),t.textOpacity&&Ji(r.firstChild,"color",Yi(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(r.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&Ji(r.firstChild,"backgroundColor",Yi(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?Ji(r,"backgroundColor",Yi(t.windowColor,t.windowOpacity)):r.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?r.firstChild.style.textShadow=`2px 2px 3px ${Ki}, 2px 2px 4px ${Ki}, 2px 2px 5px ${Ki}`:"raised"===t.edgeStyle?r.firstChild.style.textShadow=`1px 1px ${Ki}, 2px 2px ${Ki}, 3px 3px ${Ki}`:"depressed"===t.edgeStyle?r.firstChild.style.textShadow=`1px 1px ${Qi}, 0 1px ${Qi}, -1px -1px ${Ki}, 0 -1px ${Ki}`:"uniform"===t.edgeStyle&&(r.firstChild.style.textShadow=`0 0 4px ${Ki}, 0 0 4px ${Ki}, 0 0 4px ${Ki}, 0 0 4px ${Ki}`)),t.fontPercent&&1!==t.fontPercent){const e=s().parseFloat(r.style.fontSize);r.style.fontSize=e*t.fontPercent+"px",r.style.height="auto",r.style.top="auto"}
vendor: 6,057 bytes, line 2
2t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?r.firstChild.style.fontVariant="small-caps":r.firstChild.style.fontFamily=Xi[t.fontFamily])}}updateForTrack(e){if(Array.isArray(e)||(e=[e]),"function"!=typeof s().WebVTT||e.every((e=>!e.activeCues)))return;const t=[];for(let i=0;i<e.length;++i){const n=e[i];for(let e=0;e<n.activeCues.length;++e)t.push(n.activeCues[e])}s().WebVTT.processCues(s(),t,this.el_);for(let t=0;t<e.length;++t){const i=e[t];for(let e=0;e<i.activeCues.length;++e){const n=i.activeCues[e].displayState;ke(n,"vjs-text-track-cue","vjs-text-track-cue-"+(i.language?i.language:t)),i.language&&Oe(n,"lang",i.language)}this.player_.textTrackSettings&&this.updateDisplayState(i)}}}),Ut.registerComponent("LoadingSpinner",class extends Ut{createEl(){const e=this.player_.isAudio(),t=this.localize(e?"Audio Player":"Video Player"),i=ve("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.",[t])}),n=super.createEl("div",{className:"vjs-loading-spinner",dir:"ltr"});return n.appendChild(i),n}handleLanguagechange(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])}});class en extends Wi{createEl(e,t={},i={}){const n=ve("button",t=Object.assign({className:this.buildCSSClass()},t),i=Object.assign({type:"button"},i));return this.player_.options_.experimentalSvgIcons||n.appendChild(ve("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),this.createControlTextEl(n),n}addChild(e,t={}){const i=this.constructor.name;return L.warn(`Adding an actionable (user controllable) child to a Button (${i}) is not supported; use a ClickableComponent instead.`),Ut.prototype.addChild.call(this,e,t)}enable(){super.enable(),this.el_.removeAttribute("disabled")}disable(){super.disable(),this.el_.setAttribute("disabled","disabled")}handleKeyDown(e){" "!==e.key&&"Enter"!==e.key?super.handleKeyDown(e):e.stopPropagation()}}Ut.registerComponent("Button",en);class tn extends en{constructor(e,t){super(e,t),this.mouseused_=!1,this.setIcon("play"),this.on("mousedown",(e=>this.handleMouseDown(e)))}buildCSSClass(){return"vjs-big-play-button"}handleClick(e){const t=this.player_.play();if("tap"===e.type||this.mouseused_&&"clientX"in e&&"clientY"in e)return Yt(t),void(this.player_.tech(!0)&&this.player_.tech(!0).focus());const i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(!n)return void this.player_.tech(!0).focus();const s=()=>n.focus();Xt(t)?t.then(s,(()=>{})):this.setTimeout(s,1)}handleKeyDown(e){this.mouseused_=!1,super.handleKeyDown(e)}handleMouseDown(e){this.mouseused_=!0}}tn.prototype.controlText_="Play Video",Ut.registerComponent("BigPlayButton",tn),Ut.registerComponent("CloseButton",class extends en{constructor(e,t){super(e,t),this.setIcon("cancel"),this.controlText(t&&t.controlText||this.localize("Close"))}buildCSSClass(){return`vjs-close-button ${super.buildCSSClass()}`}handleClick(e){this.trigger({type:"close",bubbles:!1})}handleKeyDown(e){"Escape"===e.key?(e.preventDefault(),e.stopPropagation(),this.trigger("click")):super.handleKeyDown(e)}});class nn extends en{constructor(e,t={}){super(e,t),t.replay=void 0===t.replay||t.replay,this.setIcon("play"),this.on(e,"play",(e=>this.handlePlay(e))),this.on(e,"pause",(e=>this.handlePause(e))),t.replay&&this.on(e,"ended",(e=>this.handleEnded(e)))}buildCSSClass(){return`vjs-play-control ${super.buildCSSClass()}`}handleClick(e){this.player_.paused()?Yt(this.player_.play()):this.player_.pause()}handleSeeked(e){this.removeClass("vjs-ended"),this.player_.paused()?this.handlePause(e):this.handlePlay(e)}handlePlay(e){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.setIcon("pause"),this.controlText("Pause")}handlePause(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.setIcon("play"),this.controlText("Play")}handleEnded(e){this.removeClass("vjs-playing"),this.addClass("vjs-ended"),this.setIcon("replay"),this.controlText("Replay"),this.one(this.player_,"seeked",(e=>this.handleSeeked(e)))}}nn.prototype.controlText_="Play",Ut.registerComponent("PlayToggle",nn);class sn extends Ut{constructor(e,t){super(e,t),this.on(e,["timeupdate","ended","seeking"],(e=>this.update(e))),this.updateTextNode_()}createEl(){const e=this.buildCSSClass(),t=super.createEl("div",{className:`${e} vjs-time-control vjs-control`}),i=ve("span",{className:"vjs-control-text",textContent:`${this.localize(this.labelText_)} `},{role:"presentation"});return t.appendChild(i),this.contentEl_=ve("span",{className:`${e}-display`},{role:"presentation"}),t.appendChild(this.contentEl_),t}dispose(){this.contentEl_=null,this.textNode_=null,super.dispose()}update(e){(this.player_.options_.enableSmoothSeeking||"seeking"!==e.type)&&this.updateContent(e)}updateTextNode_(e=0){e=Wt(e),this.formattedTime_!==e&&(this.formattedTime_=e,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",(()=>{if(!this.contentEl_)return;let e=this.textNode_;e&&this.contentEl_.firstChild!==e&&(e=null,L.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")),this.textNode_=a().createTextNode(this.formattedTime_),this.textNode_&&(e?this.contentEl_.replaceChild(this.textNode_,e):this.contentEl_.appendChild(this.textNode_))})))}updateContent(e){}}sn.prototype.labelText_="Time",sn.prototype.controlText_="Time",Ut.registerComponent("TimeDisplay",sn);class rn extends sn{buildCSSClass(){return"vjs-current-time"}updateContent(e){let t;t=this.player_.ended()?this.player_.duration():e&&e.target&&"function"==typeof e.target.pendingSeekTime&&null!==e.target.pendingSeekTime()?e.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),this.updateTextNode_(t)}}rn.prototype.labelText_="Current Time",rn.prototype.controlText_="Current Time",Ut.registerComponent("CurrentTimeDisplay",rn);class an extends sn{constructor(e,t){super(e,t);const i=e=>this.updateContent(e);
vendor: 17,541 bytes, line 2
2this.on(e,"durationchange",i),this.on(e,"loadstart",i),this.on(e,"loadedmetadata",i)}buildCSSClass(){return"vjs-duration"}updateContent(e){const t=this.player_.duration();this.updateTextNode_(t)}}an.prototype.labelText_="Duration",an.prototype.controlText_="Duration",Ut.registerComponent("DurationDisplay",an),Ut.registerComponent("TimeDivider",class extends Ut{createEl(){const e=super.createEl("div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),t=super.createEl("div"),i=super.createEl("span",{textContent:"/"});return t.appendChild(i),e.appendChild(t),e}});class on extends sn{constructor(e,t){super(e,t),this.on(e,"durationchange",(e=>this.updateContent(e)))}buildCSSClass(){return"vjs-remaining-time"}createEl(){const e=super.createEl();return!1!==this.options_.displayNegative&&e.insertBefore(ve("span",{},{"aria-hidden":!0},"-"),this.contentEl_),e}updateContent(e){if("number"!=typeof this.player_.duration())return;let t;t=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(t)}}on.prototype.labelText_="Remaining Time",on.prototype.controlText_="Remaining Time",Ut.registerComponent("RemainingTimeDisplay",on),Ut.registerComponent("LiveDisplay",class extends Ut{constructor(e,t){super(e,t),this.updateShowing(),this.on(this.player(),"durationchange",(e=>this.updateShowing(e)))}createEl(){const e=super.createEl("div",{className:"vjs-live-control vjs-control"});return this.contentEl_=ve("div",{className:"vjs-live-display"},{"aria-live":"off"}),this.contentEl_.appendChild(ve("span",{className:"vjs-control-text",textContent:`${this.localize("Stream Type")} `})),this.contentEl_.appendChild(a().createTextNode(this.localize("LIVE"))),e.appendChild(this.contentEl_),e}dispose(){this.contentEl_=null,super.dispose()}updateShowing(e){this.player().duration()===1/0?this.show():this.hide()}});class ln extends en{constructor(e,t){super(e,t),this.updateLiveEdgeStatus(),this.player_.liveTracker&&(this.updateLiveEdgeStatusHandler_=e=>this.updateLiveEdgeStatus(e),this.on(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_))}createEl(){const e=super.createEl("button",{className:"vjs-seek-to-live-control vjs-control"});return this.setIcon("circle",e),this.textEl_=ve("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"}),e.appendChild(this.textEl_),e}updateLiveEdgeStatus(){!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"))}handleClick(){this.player_.liveTracker.seekToLiveEdge()}dispose(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_),this.textEl_=null,super.dispose()}}function un(e,t,i){return e=Number(e),Math.min(i,Math.max(t,isNaN(e)?t:e))}ln.prototype.controlText_="Seek to live, currently playing live",Ut.registerComponent("SeekToLive",ln);var cn=Object.freeze({__proto__:null,clamp:un});class hn extends Ut{constructor(e,t){super(e,t),this.handleMouseDown_=e=>this.handleMouseDown(e),this.handleMouseUp_=e=>this.handleMouseUp(e),this.handleKeyDown_=e=>this.handleKeyDown(e),this.handleClick_=e=>this.handleClick(e),this.handleMouseMove_=e=>this.handleMouseMove(e),this.update_=e=>this.update(e),this.bar=this.getChild(this.options_.barName),this.vertical(!!this.options_.vertical),this.enable()}enabled(){return this.enabled_}enable(){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)}disable(){if(!this.enabled())return;const 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}createEl(e,t={},i={}){return t.className=t.className+" vjs-slider",t=Object.assign({tabIndex:0},t),i=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},i),super.createEl(e,t,i)}handleMouseDown(e){const t=this.bar.el_.ownerDocument;"mousedown"===e.type&&e.preventDefault(),"touchstart"!==e.type||Y||e.preventDefault(),Ae(),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,!0)}handleMouseMove(e){}handleMouseUp(e){const t=this.bar.el_.ownerDocument;Le(),this.removeClass("vjs-sliding"),this.trigger("sliderinactive"),this.off(t,"mousemove",this.handleMouseMove_),this.off(t,"mouseup",this.handleMouseUp_),this.off(t,"touchmove",this.handleMouseMove_),this.off(t,"touchend",this.handleMouseUp_),this.update()}update(){if(!this.el_||!this.bar)return;const e=this.getProgress();return e===this.progress_||(this.progress_=e,this.requestNamedAnimationFrame("Slider#update",(()=>{const t=this.vertical()?"height":"width";this.bar.el().style[t]=(100*e).toFixed(2)+"%"}))),e}getProgress(){return Number(un(this.getPercent(),0,1).toFixed(4))}calculateDistance(e){const t=je(this.el_,e);return this.vertical()?t.y:t.x}handleKeyDown(e){const t=this.options_.playerOptions.spatialNavigation,i=t&&t.enabled,n=t&&t.horizontalSeek;i?n&&"ArrowLeft"===e.key||!n&&"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):n&&"ArrowRight"===e.key||!n&&"ArrowUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):(this.pendingSeekTime()&&(this.pendingSeekTime(null),this.userSeek_(this.player_.currentTime())),super.handleKeyDown(e)):"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepBack()):"ArrowUp"===e.key||"ArrowRight"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):super.handleKeyDown(e)}handleClick(e){e.stopPropagation(),e.preventDefault()}vertical(e){if(void 0===e)return this.vertical_||!1;this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")}}Ut.registerComponent("Slider",hn);const dn=(e,t)=>un(e/t*100,0,100).toFixed(2)+"%";Ut.registerComponent("LoadProgressBar",class extends Ut{constructor(e,t){super(e,t),this.partEls_=[],this.on(e,"progress",(e=>this.update(e)))}createEl(){const e=super.createEl("div",{className:"vjs-load-progress"}),t=ve("span",{className:"vjs-control-text"}),i=ve("span",{textContent:this.localize("Loaded")}),n=a().createTextNode(": ");return this.percentageEl_=ve("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"}),e.appendChild(t),t.appendChild(i),t.appendChild(n),t.appendChild(this.percentageEl_),e}dispose(){this.partEls_=null,this.percentageEl_=null,super.dispose()}update(e){this.requestNamedAnimationFrame("LoadProgressBar#update",(()=>{const e=this.player_.liveTracker,t=this.player_.buffered(),i=e&&e.isLive()?e.seekableEnd():this.player_.duration(),n=this.player_.bufferedEnd(),s=this.partEls_,r=dn(n,i);this.percent_!==r&&(this.el_.style.width=r,be(this.percentageEl_,r),this.percent_=r);for(let e=0;e<t.length;e++){const i=t.start(e),r=t.end(e);let a=s[e];a||(a=this.el_.appendChild(ve()),s[e]=a),a.dataset.start===i&&a.dataset.end===r||(a.dataset.start=i,a.dataset.end=r,a.style.left=dn(i,n),a.style.width=dn(r-i,n))}for(let e=s.length;e>t.length;e--)this.el_.removeChild(s[e-1]);s.length=t.length}))}}),Ut.registerComponent("TimeTooltip",class extends Ut{constructor(e,t){super(e,t),this.update=yt(mt(this,this.update),gt)}createEl(){return super.createEl("div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})}update(e,t,i){const n=De(this.el_),s=Me(this.player_.el()),r=e.width*t;if(!s||!n)return;let a=e.left-s.left+r,o=e.width-r+(s.right-e.right);o||(o=e.width-r,a=r);let l=n.width/2;a<l?l+=l-a:o<l&&(l=o),l<0?l=0:l>n.width&&(l=n.width),l=Math.round(l),this.el_.style.right=`-${l}px`,this.write(i)}write(e){be(this.el_,e)}updateTime(e,t,i,n){this.requestNamedAnimationFrame("TimeTooltip#updateTime",(()=>{let s;const r=this.player_.duration();if(this.player_.liveTracker&&this.player_.liveTracker.isLive()){const e=this.player_.liveTracker.liveWindow(),i=e-t*e;s=(i<1?"":"-")+Wt(i,e)}else s=Wt(i,r);this.update(e,t,s),n&&n()}))}});class pn extends Ut{constructor(e,t){super(e,t),this.setIcon("circle"),this.update=yt(mt(this,this.update),gt)}createEl(){return super.createEl("div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})}update(e,t,i){const n=this.getChild("timeTooltip");if(!n)return;const s=i&&i.target&&"function"==typeof i.target.pendingSeekTime?i.target.pendingSeekTime():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();n.updateTime(e,t,s)}}pn.prototype.options_={children:[]},he||G||pn.prototype.options_.children.push("timeTooltip"),Ut.registerComponent("PlayProgressBar",pn);class fn extends Ut{constructor(e,t){super(e,t),this.update=yt(mt(this,this.update),gt)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t){const i=t*this.player_.duration();this.getChild("timeTooltip").updateTime(e,t,i,(()=>{this.el_.style.left=e.width*t+"px"}))}}fn.prototype.options_={children:["timeTooltip"]},Ut.registerComponent("MouseTimeDisplay",fn);class gn extends hn{constructor(e,t){(t=F(gn.prototype.options_,t)).children=[...t.children];const i=e.options_.disableSeekWhileScrubbingOnMobile&&(he||G)||e.options_.disableSeekWhileScrubbingOnSTV;(!he&&!G||i)&&t.children.splice(1,0,"mouseTimeDisplay"),super(e,t),this.shouldDisableSeekWhileScrubbing_=i,this.pendingSeekTime_=null,this.setEventHandlers_()}setEventHandlers_(){this.update_=mt(this,this.update),this.update=yt(this.update_,gt),this.on(this.player_,["durationchange","timeupdate"],this.update),this.on(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.on(this.player_.liveTracker,"liveedgechange",this.update),this.updateInterval=null,this.enableIntervalHandler_=e=>this.enableInterval_(e),this.disableIntervalHandler_=e=>this.disableInterval_(e),this.on(this.player_,["playing"],this.enableIntervalHandler_),this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a()&&"visibilityState"in a()&&this.on(a(),"visibilitychange",this.toggleVisibility_)}toggleVisibility_(e){"hidden"===a().visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(e)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())}enableInterval_(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,gt))}disableInterval_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&e&&"ended"!==e.type||this.updateInterval&&(this.clearInterval(this.updateInterval),this.updateInterval=null)}createEl(){return super.createEl("div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})}update(e){if("hidden"===a().visibilityState)return;const t=super.update();return this.requestNamedAnimationFrame("SeekBar#update",(()=>{const i=this.player_.ended()?this.player_.duration():this.getCurrentTime_(),n=this.player_.liveTracker;let s=this.player_.duration();n&&n.isLive()&&(s=this.player_.liveTracker.liveCurrentTime()),this.percent_!==t&&(this.el_.setAttribute("aria-valuenow",(100*t).toFixed(2)),this.percent_=t),this.currentTime_===i&&this.duration_===s||(this.el_.setAttribute("aria-valuetext",this.localize("progress bar timing: currentTime={1} duration={2}",[Wt(i,s),Wt(s,s)],"{1} of {2}")),this.currentTime_=i,this.duration_=s),this.bar&&this.bar.update(Me(this.el()),this.getProgress(),e)})),t}userSeek_(e){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(),this.player_.currentTime(e)}getCurrentTime_(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}pendingSeekTime(e){if(void 0!==e)if(null!==e){const t=this.player_.duration();this.pendingSeekTime_=Math.max(0,Math.min(e,t))}else this.pendingSeekTime_=null;return this.pendingSeekTime_}getPercent(){if(null!==this.pendingSeekTime())return this.pendingSeekTime()/this.player_.duration();const e=this.getCurrentTime_();let t;const i=this.player_.liveTracker;return i&&i.isLive()?(t=(e-i.seekableStart())/i.liveWindow(),i.atLiveEdge()&&(t=1)):t=e/this.player_.duration(),t}handleMouseDown(e){Ve(e)&&(e.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.shouldDisableSeekWhileScrubbing_||this.player_.pause(),super.handleMouseDown(e))}handleMouseMove(e,t=!1){if(!Ve(e)||isNaN(this.player_.duration()))return;let i;t||this.player_.scrubbing()||this.player_.scrubbing(!0);const n=this.calculateDistance(e),s=this.player_.liveTracker;if(s&&s.isLive()){if(n>=.99)return void s.seekToLiveEdge();const e=s.seekableStart(),t=s.liveCurrentTime();if(i=e+n*s.liveWindow(),i>=t&&(i=t),i<=e&&(i=e+.1),i===1/0)return}else i=n*this.player_.duration(),i===this.player_.duration()&&(i-=.1);this.shouldDisableSeekWhileScrubbing_?this.pendingSeekTime(i):this.userSeek_(i),this.player_.options_.enableSmoothSeeking&&this.update()}enable(){super.enable();const e=this.getChild("mouseTimeDisplay");e&&e.show()}disable(){super.disable();const e=this.getChild("mouseTimeDisplay");e&&e.hide()}handleMouseUp(e){super.handleMouseUp(e),e&&e.stopPropagation(),this.player_.scrubbing(!1),null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0}),this.videoWasPlaying?Yt(this.player_.play()):this.update_()}handlePendingSeek_(e){this.player_.paused()||this.player_.pause();const t=null!==this.pendingSeekTime()?this.pendingSeekTime():this.player_.currentTime();this.pendingSeekTime(t+e),this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}stepForward(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(this.options().stepSeconds):this.userSeek_(this.player_.currentTime()+this.options().stepSeconds)}stepBack(){this.shouldDisableSeekWhileScrubbing_?this.handlePendingSeek_(-this.options().stepSeconds):this.userSeek_(this.player_.currentTime()-this.options().stepSeconds)}handleAction(e){null!==this.pendingSeekTime()&&(this.userSeek_(this.pendingSeekTime()),this.pendingSeekTime(null)),this.player_.paused()?this.player_.play():this.player_.pause()}handleKeyDown(e){const t=this.player_.liveTracker;if(" "===e.key||"Enter"===e.key)e.preventDefault(),e.stopPropagation(),this.handleAction(e);else if("Home"===e.key)e.preventDefault(),e.stopPropagation(),this.userSeek_(0);else if("End"===e.key)e.preventDefault(),e.stopPropagation(),t&&t.isLive()?this.userSeek_(t.liveCurrentTime()):this.userSeek_(this.player_.duration());else if(/^[0-9]$/.test(e.key)){e.preventDefault(),e.stopPropagation();const i=.1*parseInt(e.key,10);t&&t.isLive()?this.userSeek_(t.seekableStart()+t.liveWindow()*i):this.userSeek_(this.player_.duration()*i)}else"PageDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()-this.options().stepSeconds*this.options().pageMultiplier)):"PageUp"===e.key?(e.preventDefault(),e.stopPropagation(),this.userSeek_(this.player_.currentTime()+this.options().stepSeconds*this.options().pageMultiplier)):super.handleKeyDown(e)}dispose(){this.disableInterval_(),this.off(this.player_,["durationchange","timeupdate"],this.update),this.off(this.player_,["ended"],this.update_),this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.update),this.off(this.player_,["playing"],this.enableIntervalHandler_),this.off(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_),"hidden"in a()&&"visibilityState"in a()&&this.off(a(),"visibilitychange",this.toggleVisibility_),super.dispose()}}gn.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar",stepSeconds:5,pageMultiplier:12},Ut.registerComponent("SeekBar",gn);class mn extends Ut{constructor(e,t){super(e,t),this.handleMouseMove=yt(mt(this,this.handleMouseMove),gt),this.throttledHandleMouseSeek=yt(mt(this,this.handleMouseSeek),gt),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.handleMouseDownHandler_=e=>this.handleMouseDown(e),this.enable()}createEl(){return super.createEl("div",{className:"vjs-progress-control vjs-control"})}handleMouseMove(e){const t=this.getChild("seekBar");if(!t)return;const i=t.getChild("playProgressBar"),n=t.getChild("mouseTimeDisplay");if(!i&&!n)return;const s=t.el(),r=De(s);let a=je(s,e).x;a=un(a,0,1),n&&n.update(r,a),i&&i.update(r,t.getProgress())}handleMouseSeek(e){const t=this.getChild("seekBar");t&&t.handleMouseMove(e)}enabled(){return this.enabled_}
vendor: 6,576 bytes, line 2
2disable(){if(this.children().forEach((e=>e.disable&&e.disable())),this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){const e=this.getChild("seekBar");this.player_.scrubbing(!1),e.videoWasPlaying&&Yt(this.player_.play())}}enable(){this.children().forEach((e=>e.enable&&e.enable())),this.enabled()||(this.on(["mousedown","touchstart"],this.handleMouseDownHandler_),this.on(this.el_,["mousemove","touchmove"],this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)}removeListenersAddedOnMousedownAndTouchstart(){const e=this.el_.ownerDocument;this.off(e,"mousemove",this.throttledHandleMouseSeek),this.off(e,"touchmove",this.throttledHandleMouseSeek),this.off(e,"mouseup",this.handleMouseUpHandler_),this.off(e,"touchend",this.handleMouseUpHandler_)}handleMouseDown(e){const t=this.el_.ownerDocument,i=this.getChild("seekBar");i&&i.handleMouseDown(e),this.on(t,"mousemove",this.throttledHandleMouseSeek),this.on(t,"touchmove",this.throttledHandleMouseSeek),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.getChild("seekBar");t&&t.handleMouseUp(e),this.removeListenersAddedOnMousedownAndTouchstart()}}mn.prototype.options_={children:["seekBar"]},Ut.registerComponent("ProgressControl",mn);class yn extends en{constructor(e,t){super(e,t),this.setIcon("picture-in-picture-enter"),this.on(e,["enterpictureinpicture","leavepictureinpicture"],(e=>this.handlePictureInPictureChange(e))),this.on(e,["disablepictureinpicturechanged","loadedmetadata"],(e=>this.handlePictureInPictureEnabledChange(e))),this.on(e,["loadedmetadata","audioonlymodechange","audiopostermodechange"],(()=>this.handlePictureInPictureAudioModeChange())),this.disable()}buildCSSClass(){return`vjs-picture-in-picture-control vjs-hidden ${super.buildCSSClass()}`}handlePictureInPictureAudioModeChange(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()}handlePictureInPictureEnabledChange(){a().pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()||this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in s()?this.enable():this.disable()}handlePictureInPictureChange(e){this.player_.isInPictureInPicture()?(this.setIcon("picture-in-picture-exit"),this.controlText("Exit Picture-in-Picture")):(this.setIcon("picture-in-picture-enter"),this.controlText("Picture-in-Picture")),this.handlePictureInPictureEnabledChange()}handleClick(e){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture():this.player_.requestPictureInPicture()}show(){"function"==typeof a().exitPictureInPicture&&super.show()}}yn.prototype.controlText_="Picture-in-Picture",Ut.registerComponent("PictureInPictureToggle",yn);class _n extends en{constructor(e,t){super(e,t),this.setIcon("fullscreen-enter"),this.on(e,"fullscreenchange",(e=>this.handleFullscreenChange(e))),!1===a()[e.fsApi_.fullscreenEnabled]&&this.disable()}buildCSSClass(){return`vjs-fullscreen-control ${super.buildCSSClass()}`}handleFullscreenChange(e){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))}handleClick(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()}}_n.prototype.controlText_="Fullscreen",Ut.registerComponent("FullscreenToggle",_n),Ut.registerComponent("VolumeLevel",class extends Ut{createEl(){const e=super.createEl("div",{className:"vjs-volume-level"});return this.setIcon("circle",e),e.appendChild(super.createEl("span",{className:"vjs-control-text"})),e}}),Ut.registerComponent("VolumeLevelTooltip",class extends Ut{constructor(e,t){super(e,t),this.update=yt(mt(this,this.update),gt)}createEl(){return super.createEl("div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})}update(e,t,i,n){if(!i){const i=Me(this.el_),n=Me(this.player_.el()),s=e.width*t;if(!n||!i)return;const r=e.left-n.left+s,a=e.width-s+(n.right-e.right);let o=i.width/2;r<o?o+=o-r:a<o&&(o=a),o<0?o=0:o>i.width&&(o=i.width),this.el_.style.right=`-${o}px`}this.write(`${n}%`)}write(e){be(this.el_,e)}updateVolume(e,t,i,n,s){this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",(()=>{this.update(e,t,i,n.toFixed(0)),s&&s()}))}});class vn extends Ut{constructor(e,t){super(e,t),this.update=yt(mt(this,this.update),gt)}createEl(){return super.createEl("div",{className:"vjs-mouse-display"})}update(e,t,i){const n=100*t;this.getChild("volumeLevelTooltip").updateVolume(e,t,i,n,(()=>{i?this.el_.style.bottom=e.height*t+"px":this.el_.style.left=e.width*t+"px"}))}}vn.prototype.options_={children:["volumeLevelTooltip"]},Ut.registerComponent("MouseVolumeLevelDisplay",vn);class bn extends hn{constructor(e,t){super(e,t),this.on("slideractive",(e=>this.updateLastVolume_(e))),this.on(e,"volumechange",(e=>this.updateARIAAttributes(e))),e.ready((()=>this.updateARIAAttributes()))}createEl(){return super.createEl("div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})}handleMouseDown(e){Ve(e)&&super.handleMouseDown(e)}handleMouseMove(e){const t=this.getChild("mouseVolumeLevelDisplay");if(t){const i=this.el(),n=Me(i),s=this.vertical();let r=je(i,e);r=s?r.y:r.x,r=un(r,0,1),t.update(n,r,s)}Ve(e)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(e)))}checkMuted(){this.player_.muted()&&this.player_.muted(!1)}getPercent(){return this.player_.muted()?0:this.player_.volume()}stepForward(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)}stepBack(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)}updateARIAAttributes(e){const t=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")}volumeAsPercentage_(){return Math.round(100*this.player_.volume())}updateLastVolume_(){const e=this.player_.volume();this.one("sliderinactive",(()=>{0===this.player_.volume()&&this.player_.lastVolume_(e)}))}}bn.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},he||G||bn.prototype.options_.children.splice(0,0,"mouseVolumeLevelDisplay"),bn.prototype.playerEvent="volumechange",Ut.registerComponent("
2VolumeBar",bn);class Tn extends Ut{constructor(e,t={}){t.vertical=t.vertical||!1,(void 0===t.volumeBar||B(t.volumeBar))&&(t.volumeBar=t.volumeBar||{},t.volumeBar.vertical=t.vertical),super(e,t),function(e,t){t.tech_&&!t.tech_.featuresVolumeControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresVolumeControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.throttledHandleMouseMove=yt(mt(this,this.handleMouseMove),gt),this.handleMouseUpHandler_=e=>this.handleMouseUp(e),this.on("mousedown",(e=>this.handleMouseDown(e))),this.on("touchstart",(e=>this.handleMouseDown(e))),this.on("mousemove",(e=>this.handleMouseMove(e))),this.on(this.volumeBar,["focus","slideractive"],(()=>{this.volumeBar.addClass("vjs-slider-active"),this.addClass("vjs-slider-active"),this.trigger("slideractive")})),this.on(this.volumeBar,["blur","sliderinactive"],(()=>{this.volumeBar.removeClass("vjs-slider-active"),this.removeClass("vjs-slider-active"),this.trigger("sliderinactive")}))}createEl(){let e="vjs-volume-horizontal";return this.options_.vertical&&(e="vjs-volume-vertical"),super.createEl("div",{className:`vjs-volume-control vjs-control ${e}`})}handleMouseDown(e){const t=this.el_.ownerDocument;this.on(t,"mousemove",this.throttledHandleMouseMove),this.on(t,"touchmove",this.throttledHandleMouseMove),this.on(t,"mouseup",this.handleMouseUpHandler_),this.on(t,"touchend",this.handleMouseUpHandler_)}handleMouseUp(e){const t=this.el_.ownerDocument;this.off(t,"mousemove",this.throttledHandleMouseMove),this.off(t,"touchmove",this.throttledHandleMouseMove),this.off(t,"mouseup",this.handleMouseUpHandler_),this.off(t,"touchend",this.handleMouseUpHandler_)}handleMouseMove(e){this.volumeBar.handleMouseMove(e)}}Tn.prototype.options_={children:["volumeBar"]},Ut.registerComponent("VolumeControl",Tn);class Sn extends en{constructor(e,t){super(e,t),function(e,t){t.tech_&&!t.tech_.featuresMuteControl&&e.addClass("vjs-hidden"),e.on(t,"loadstart",(function(){t.tech_.featuresMuteControl?e.removeClass("vjs-hidden"):e.addClass("vjs-hidden")}))}(this,e),this.on(e,["loadstart","volumechange"],(e=>this.update(e)))}buildCSSClass(){return`vjs-mute-control ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.volume(),i=this.player_.lastVolume_();if(0===t){const e=i<.1?.1:i;this.player_.volume(e),this.player_.muted(!1)}else this.player_.muted(!this.player_.muted())}update(e){this.updateIcon_(),this.updateControlText_()}updateIcon_(){const e=this.player_.volume();let t=3;this.setIcon("volume-high"),he&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted),0===e||this.player_.muted()?(this.setIcon("volume-mute"),t=0):e<.33?(this.setIcon("volume-low"),t=1):e<.67&&(this.setIcon("volume-medium"),t=2),we(this.el_,[0,1,2,3].reduce(((e,t)=>e+`${t?" ":""}vjs-vol-${t}`),"")),ke(this.el_,`vjs-vol-${t}`)}updateControlText_(){const e=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==e&&this.controlText(e)}}Sn.prototype.controlText_="Mute",Ut.registerComponent("MuteToggle",Sn);class kn extends Ut{constructor(e,t={}){void 0!==t.inline?t.inline=t.inline:t.inline=!0,(void 0===t.volumeControl||B(t.volumeControl))&&(t.volumeControl=t.volumeControl||{},t.volumeControl.vertical=!t.inline),super(e,t),this.handleKeyPressHandler_=e=>this.handleKeyPress(e),this.on(e,["loadstart"],(e=>this.volumePanelState_(e))),this.on(this.muteToggle,"keyup",(e=>this.handleKeyPress(e))),this.on(this.volumeControl,"keyup",(e=>this.handleVolumeControlKeyUp(e))),this.on("keydown",(e=>this.handleKeyPress(e))),this.on("mouseover",(e=>this.handleMouseOver(e))),this.on("mouseout",(e=>this.handleMouseOut(e))),this.on(this.volumeControl,["slideractive"],this.sliderActive_),this.on(this.volumeControl,["sliderinactive"],this.sliderInactive_)}sliderActive_(){this.addClass("vjs-slider-active")}sliderInactive_(){this.removeClass("vjs-slider-active")}volumePanelState_(){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")}createEl(){let e="vjs-volume-panel-horizontal";return this.options_.inline||(e="vjs-volume-panel-vertical"),super.createEl("div",{className:`vjs-volume-panel vjs-control ${e}`})}dispose(){this.handleMouseOut(),super.dispose()}handleVolumeControlKeyUp(e){"Escape"===e.key&&this.muteToggle.focus()}
vendor: 5,168 bytes, line 2
2handleMouseOver(e){this.addClass("vjs-hover"),ut(a(),"keyup",this.handleKeyPressHandler_)}handleMouseOut(e){this.removeClass("vjs-hover"),ct(a(),"keyup",this.handleKeyPressHandler_)}handleKeyPress(e){"Escape"===e.key&&this.handleMouseOut()}}kn.prototype.options_={children:["muteToggle","volumeControl"]},Ut.registerComponent("VolumePanel",kn);class wn extends en{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipForwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`forward-${this.skipTime}`),this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipForwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.forward}buildCSSClass(){return`vjs-skip-forward-${this.getSkipForwardTime()} ${super.buildCSSClass()}`}handleClick(e){if(isNaN(this.player_.duration()))return;const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()?i.seekableEnd():this.player_.duration();let s;s=t+this.skipTime<=n?t+this.skipTime:n,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))}}wn.prototype.controlText_="Skip Forward",Ut.registerComponent("SkipForward",wn);class Cn extends en{constructor(e,t){super(e,t),this.validOptions=[5,10,30],this.skipTime=this.getSkipBackwardTime(),this.skipTime&&this.validOptions.includes(this.skipTime)?(this.setIcon(`replay-${this.skipTime}`),this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime.toLocaleString(e.language())])),this.show()):this.hide()}getSkipBackwardTime(){const e=this.options_.playerOptions;return e.controlBar&&e.controlBar.skipButtons&&e.controlBar.skipButtons.backward}buildCSSClass(){return`vjs-skip-backward-${this.getSkipBackwardTime()} ${super.buildCSSClass()}`}handleClick(e){const t=this.player_.currentTime(),i=this.player_.liveTracker,n=i&&i.isLive()&&i.seekableStart();let s;s=n&&t-this.skipTime<=n?n:t>=this.skipTime?t-this.skipTime:0,this.player_.currentTime(s)}handleLanguagechange(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))}}Cn.prototype.controlText_="Skip Backward",Ut.registerComponent("SkipBackward",Cn);class En extends Ut{constructor(e,t){super(e,t),t&&(this.menuButton_=t.menuButton),this.focusedChild_=-1,this.on("keydown",(e=>this.handleKeyDown(e))),this.boundHandleBlur_=e=>this.handleBlur(e),this.boundHandleTapClick_=e=>this.handleTapClick(e)}addEventListenerForItem(e){e instanceof Ut&&(this.on(e,"blur",this.boundHandleBlur_),this.on(e,["tap","click"],this.boundHandleTapClick_))}removeEventListenerForItem(e){e instanceof Ut&&(this.off(e,"blur",this.boundHandleBlur_),this.off(e,["tap","click"],this.boundHandleTapClick_))}removeChild(e){"string"==typeof e&&(e=this.getChild(e)),this.removeEventListenerForItem(e),super.removeChild(e)}addItem(e){const t=this.addChild(e);t&&this.addEventListenerForItem(t)}createEl(){const e=this.options_.contentElType||"ul";this.contentEl_=ve(e,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");const t=super.createEl("div",{append:this.contentEl_,className:"vjs-menu"});return t.appendChild(this.contentEl_),ut(t,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),t}dispose(){this.contentEl_=null,this.boundHandleBlur_=null,this.boundHandleTapClick_=null,super.dispose()}handleBlur(e){const t=e.relatedTarget||a().activeElement;if(!this.children().some((e=>e.el()===t))){const e=this.menuButton_;e&&e.buttonPressed_&&t!==e.el().firstChild&&e.unpressButton()}}handleTapClick(e){if(this.menuButton_){this.menuButton_.unpressButton();const t=this.children();if(!Array.isArray(t))return;const i=t.filter((t=>t.el()===e.target))[0];if(!i)return;"CaptionSettingsMenuItem"!==i.name()&&this.menuButton_.focus()}}handleKeyDown(e){"ArrowLeft"===e.key||"ArrowDown"===e.key?(e.preventDefault(),e.stopPropagation(),this.stepForward()):"ArrowRight"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),e.stopPropagation(),this.stepBack())}stepForward(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)}stepBack(){let e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)}focus(e=0){const t=this.children().slice();t.length&&t[0].hasClass("vjs-menu-title")&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())}}Ut.registerComponent("Menu",En);class xn extends Ut{constructor(e,t={}){super(e,t),this.menuButton_=new en(e,t),this.menuButton_.controlText(this.controlText_),this.menuButton_.el_.setAttribute("aria-haspopup","true");const i=en.prototype.buildCSSClass();this.menuButton_.el_.className=this.buildCSSClass()+" "+i,this.menuButton_.removeClass("vjs-control"),this.addChild(this.menuButton_),this.update(),this.enabled_=!0;const n=e=>this.handleClick(e);this.handleMenuKeyUp_=e=>this.handleMenuKeyUp(e),this.on(this.menuButton_,"tap",n),this.on(this.menuButton_,"click",n),this.on(this.menuButton_,"keydown",(e=>this.handleKeyDown(e))),this.on(this.menuButton_,"mouseenter",(()=>
vendor: 8,523 bytes, line 2
2{this.addClass("vjs-hover"),this.menu.show(),ut(a(),"keyup",this.handleMenuKeyUp_)})),this.on("mouseleave",(e=>this.handleMouseLeave(e))),this.on("keydown",(e=>this.handleSubmenuKeyDown(e)))}update(){const 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.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))}createMenu(){const e=new En(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const t=ve("li",{className:"vjs-menu-title",textContent:jt(this.options_.title),tabIndex:-1}),i=new Ut(this.player_,{el:t});e.addItem(i)}if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}createItems(){}createEl(){return super.createEl("div",{className:this.buildWrapperCSSClass()},{})}setIcon(e){return super.setIcon(e,this.menuButton_.el_)}buildWrapperCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${en.prototype.buildCSSClass()} ${super.buildCSSClass()}`}buildCSSClass(){let e="vjs-menu-button";return!0===this.options_.inline?e+="-inline":e+="-popup",`vjs-menu-button ${e} ${super.buildCSSClass()}`}controlText(e,t=this.menuButton_.el()){return this.menuButton_.controlText(e,t)}dispose(){this.handleMouseLeave(),super.dispose()}handleClick(e){this.buttonPressed_?this.unpressButton():this.pressButton()}handleMouseLeave(e){this.removeClass("vjs-hover"),ct(a(),"keyup",this.handleMenuKeyUp_)}focus(){this.menuButton_.focus()}blur(){this.menuButton_.blur()}handleKeyDown(e){"Escape"===e.key||"Tab"===e.key?(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus())):"Up"!==e.key&&("Down"!==e.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(e.preventDefault(),this.pressButton())}handleMenuKeyUp(e){"Escape"!==e.key&&"Tab"!==e.key||this.removeClass("vjs-hover")}handleSubmenuKeyPress(e){this.handleSubmenuKeyDown(e)}handleSubmenuKeyDown(e){"Escape"!==e.key&&"Tab"!==e.key||(this.buttonPressed_&&this.unpressButton(),"Tab"===!e.key&&(e.preventDefault(),this.menuButton_.focus()))}pressButton(){if(this.enabled_){if(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),he&&ye())return;this.menu.focus()}}unpressButton(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))}disable(){this.unpressButton(),this.enabled_=!1,this.addClass("vjs-disabled"),this.menuButton_.disable()}enable(){this.enabled_=!0,this.removeClass("vjs-disabled"),this.menuButton_.enable()}}Ut.registerComponent("MenuButton",xn);class In extends xn{constructor(e,t){const i=t.tracks;if(super(e,t),this.items.length<=1&&this.hide(),!i)return;const n=mt(this,this.update);i.addEventListener("removetrack",n),i.addEventListener("addtrack",n),i.addEventListener("labelchange",n),this.player_.on("ready",n),this.player_.on("dispose",(function(){i.removeEventListener("removetrack",n),i.removeEventListener("addtrack",n),i.removeEventListener("labelchange",n)}))}}Ut.registerComponent("TrackButton",In);class On extends Wi{constructor(e,t){super(e,t),this.selectable=t.selectable,this.isSelected_=t.selected||!1,this.multiSelectable=t.multiSelectable,this.selected(this.isSelected_),this.selectable?this.multiSelectable?this.el_.setAttribute("role","menuitemcheckbox"):this.el_.setAttribute("role","menuitemradio"):this.el_.setAttribute("role","menuitem")}createEl(e,t,i){this.nonIconControl=!0;const n=super.createEl("li",Object.assign({className:"vjs-menu-item",tabIndex:-1},t),i),s=ve("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});return this.player_.options_.experimentalSvgIcons?n.appendChild(s):n.replaceChild(s,n.querySelector(".vjs-icon-placeholder")),n}handleKeyDown(e){["Tab","Escape","ArrowUp","ArrowLeft","ArrowRight","ArrowDown"].includes(e.key)||super.handleKeyDown(e)}handleClick(e){this.selected(!0)}selected(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))}}Ut.registerComponent("MenuItem",On);class Pn extends On{constructor(e,t){const i=t.track,n=e.textTracks();t.label=i.label||i.language||"Unknown",t.selected="showing"===i.mode,super(e,t),this.track=i,this.kinds=(t.kinds||[t.kind||this.track.kind]).filter(Boolean);const r=(...e)=>{this.handleTracksChange.apply(this,e)},o=(...e)=>{this.handleSelectedLanguageChange.apply(this,e)};if(e.on(["loadstart","texttrackchange"],r),n.addEventListener("change",r),n.addEventListener("selectedlanguagechange",o),this.on("dispose",(function(){e.off(["loadstart","texttrackchange"],r),n.removeEventListener("change",r),n.removeEventListener("selectedlanguagechange",o)})),void 0===n.onchange){let e;this.on(["tap","click"],(function(){if("object"!=typeof s().Event)try{e=new(s().Event)("change")}catch(e){}e||(e=a().createEvent("Event"),e.initEvent("change",!0,!0)),n.dispatchEvent(e)}))}this.handleTracksChange()}handleClick(e){const t=this.track,i=this.player_.textTracks();if(super.handleClick(e),i)for(let e=0;e<i.length;e++){const n=i[e];-1!==this.kinds.indexOf(n.kind)&&(n===t?"showing"!==n.mode&&(n.mode="showing"):"disabled"!==n.mode&&(n.mode="disabled"))}}handleTracksChange(e){const t="showing"===this.track.mode;t!==this.isSelected_&&this.selected(t)}handleSelectedLanguageChange(e){if("showing"===this.track.mode){const e=this.player_.cache_.selectedLanguage;if(e&&e.enabled&&e.language===this.track.language&&e.kind!==this.track.kind)return;this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}}}dispose(){this.track=null,super.dispose()}}Ut.registerComponent("TextTrackMenuItem",Pn);class An extends Pn{constructor(e,t){t.track={player:e,kind:t.kind,kinds:t.kinds,default:!1,mode:"disabled"},t.kinds||(t.kinds=[t.kind]),t.label?t.track.label=t.label:t.track.label=t.kinds.join(" and ")+" off",t.selectable=!0,t.multiSelectable=!1,super(e,t)}handleTracksChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(this.options_.kinds.indexOf(n.kind)>-1&&"showing"===n.mode){i=!1;break}}i!==this.isSelected_&&this.selected(i)}handleSelectedLanguageChange(e){const t=this.player().textTracks();let i=!0;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(["captions","descriptions","subtitles"].indexOf(n.kind)>-1&&"showing"===n.mode){i=!1;break}}i&&(this.player_.cache_.selectedLanguage={enabled:!1})}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label),super.handleLanguagechange()}}Ut.registerComponent("OffTextTrackMenuItem",An);class Ln extends In{constructor(e,t={}){t.tracks=e.textTracks(),super(e,t)}createItems(e=[],t=Pn){let i;this.label_&&(i=`${this.label_} off`),e.push(new An(this.player_,{kinds:this.kinds_,kind:this.kind_,label:i})),this.hideThreshold_+=1;const n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(let i=0;i<n.length;i++){const s=n[i];if(this.kinds_.indexOf(s.kind)>-1){const i=new t(this.player_,{track:s,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});i.addClass(`vjs-${s.kind}-menu-item`),e.push(i)}}return e}}Ut.registerComponent("TextTrackButton",Ln);class Mn extends On{constructor(e,t){const i=t.track,n=t.cue,s=e.currentTime();t.selectable=!0,t.multiSelectable=!1,t.label=n.text,t.selected=n.startTime<=s&&s<n.endTime,super(e,t),this.track=i,this.cue=n}handleClick(e){super.handleClick(),this.player_.currentTime(this.cue.startTime)}}Ut.registerComponent("ChaptersTrackMenuItem",Mn);class Dn extends Ln{constructor(e,t,i){super(e,t,i),this.setIcon("chapters"),this.selectCurrentItem_=()=>{this.items.forEach((e=>{e.selected(this.track_.activeCues[0]===e.cue)}))}}buildCSSClass(){return`vjs-chapters-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-chapters-button ${super.buildWrapperCSSClass()}`}update(e){if(e&&e.track&&"chapters"!==e.track.kind)return;
vendor: 9,522 bytes, line 2
2const t=this.findChaptersTrack();t!==this.track_?(this.setTrack(t),super.update()):(!this.items||t&&t.cues&&t.cues.length!==this.items.length)&&super.update()}setTrack(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.removeEventListener("load",this.updateHandler_),this.track_.removeEventListener("cuechange",this.selectCurrentItem_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";const e=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);e&&e.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}}}findChaptersTrack(){const e=this.player_.textTracks()||[];for(let t=e.length-1;t>=0;t--){const i=e[t];if(i.kind===this.kind_)return i}}getMenuCaption(){return this.track_&&this.track_.label?this.track_.label:this.localize(jt(this.kind_))}createMenu(){return this.options_.title=this.getMenuCaption(),super.createMenu()}createItems(){const e=[];if(!this.track_)return e;const t=this.track_.cues;if(!t)return e;for(let i=0,n=t.length;i<n;i++){const n=t[i],s=new Mn(this.player_,{track:this.track_,cue:n});e.push(s)}return e}}Dn.prototype.kind_="chapters",Dn.prototype.controlText_="Chapters",Ut.registerComponent("ChaptersButton",Dn);class jn extends Ln{constructor(e,t,i){super(e,t,i),this.setIcon("audio-description");const n=e.textTracks(),s=mt(this,this.handleTracksChange);n.addEventListener("change",s),this.on("dispose",(function(){n.removeEventListener("change",s)}))}handleTracksChange(e){const t=this.player().textTracks();let i=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(n.kind!==this.kind_&&"showing"===n.mode){i=!0;break}}i?this.disable():this.enable()}buildCSSClass(){return`vjs-descriptions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-descriptions-button ${super.buildWrapperCSSClass()}`}}jn.prototype.kind_="descriptions",jn.prototype.controlText_="Descriptions",Ut.registerComponent("DescriptionsButton",jn);class Rn extends Ln{constructor(e,t,i){super(e,t,i),this.setIcon("subtitles")}buildCSSClass(){return`vjs-subtitles-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subtitles-button ${super.buildWrapperCSSClass()}`}}Rn.prototype.kind_="subtitles",Rn.prototype.controlText_="Subtitles",Ut.registerComponent("SubtitlesButton",Rn);class Nn extends Pn{constructor(e,t){t.track={player:e,kind:t.kind,label:t.kind+" settings",selectable:!1,default:!1,mode:"disabled"},t.selectable=!1,t.name="CaptionSettingsMenuItem",super(e,t),this.addClass("vjs-texttrack-settings"),this.controlText(", opens "+t.kind+" settings dialog")}handleClick(e){this.player().getChild("textTrackSettings").open()}handleLanguagechange(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings"),super.handleLanguagechange()}}Ut.registerComponent("CaptionSettingsMenuItem",Nn);class Un extends Ln{constructor(e,t,i){super(e,t,i),this.setIcon("captions")}buildCSSClass(){return`vjs-captions-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-captions-button ${super.buildWrapperCSSClass()}`}createItems(){const e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Nn(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),super.createItems(e)}}Un.prototype.kind_="captions",Un.prototype.controlText_="Captions",Ut.registerComponent("CaptionsButton",Un);class Bn extends Pn{createEl(e,t,i){const n=super.createEl(e,t,i),s=n.querySelector(".vjs-menu-item-text");return"captions"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",n):s.appendChild(ve("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(ve("span",{className:"vjs-control-text",textContent:` ${this.localize("Captions")}`}))),n}}Ut.registerComponent("SubsCapsMenuItem",Bn);class Fn extends Ln{constructor(e,t={}){super(e,t),this.label_="subtitles",this.setIcon("subtitles"),["en","en-us","en-ca","fr-ca"].indexOf(this.player_.language_)>-1&&(this.label_="captions",this.setIcon("captions")),this.menuButton_.controlText(jt(this.label_))}buildCSSClass(){return`vjs-subs-caps-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-subs-caps-button ${super.buildWrapperCSSClass()}`}createItems(){let e=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(e.push(new Nn(this.player_,{kind:this.label_})),this.hideThreshold_+=1),e=super.createItems(e,Bn),e}}Fn.prototype.kinds_=["captions","subtitles"],Fn.prototype.controlText_="Subtitles",Ut.registerComponent("SubsCapsButton",Fn);class Vn extends On{constructor(e,t){const i=t.track,n=e.audioTracks();t.label=i.label||i.language||"Unknown",t.selected=i.enabled,super(e,t),this.track=i,this.addClass(`vjs-${i.kind}-menu-item`);const s=(...e)=>{this.handleTracksChange.apply(this,e)};n.addEventListener("change",s),this.on("dispose",(()=>{n.removeEventListener("change",s)}))}createEl(e,t,i){const n=super.createEl(e,t,i),s=n.querySelector(".vjs-menu-item-text");return["main-desc","descriptions"].indexOf(this.options_.track.kind)>=0&&(s.appendChild(ve("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),s.appendChild(ve("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")}))),n}handleClick(e){if(super.handleClick(e),this.track.enabled=!0,this.player_.tech_.featuresNativeAudioTracks){const e=this.player_.audioTracks();for(let t=0;t<e.length;t++){const i=e[t];i!==this.track&&(i.enabled=i===this.track)}}}handleTracksChange(e){this.selected(this.track.enabled)}}Ut.registerComponent("AudioTrackMenuItem",Vn);class Hn extends In{constructor(e,t={}){t.tracks=e.audioTracks(),super(e,t),this.setIcon("audio")}buildCSSClass(){return`vjs-audio-button ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-audio-button ${super.buildWrapperCSSClass()}`}createItems(e=[]){this.hideThreshold_=1;const t=this.player_.audioTracks();for(let i=0;i<t.length;i++){const n=t[i];e.push(new Vn(this.player_,{track:n,selectable:!0,multiSelectable:!1}))}return e}}Hn.prototype.controlText_="Audio Track",Ut.registerComponent("AudioTrackButton",Hn);class qn extends On{constructor(e,t){const i=t.rate,n=parseFloat(i,10);t.label=i,t.selected=n===e.playbackRate(),t.selectable=!0,t.multiSelectable=!1,super(e,t),this.label=i,this.rate=n,this.on(e,"ratechange",(e=>this.update(e)))}handleClick(e){super.handleClick(),this.player().playbackRate(this.rate)}update(e){this.selected(this.player().playbackRate()===this.rate)}}qn.prototype.contentElType="button",Ut.registerComponent("PlaybackRateMenuItem",qn);class $n extends xn{constructor(e,t){super(e,t),this.menuButton_.el_.setAttribute("aria-describedby",this.labelElId_),this.updateVisibility(),this.updateLabel(),this.on(e,"loadstart",(e=>this.updateVisibility(e))),this.on(e,"ratechange",(e=>this.updateLabel(e))),this.on(e,"playbackrateschange",(e=>this.handlePlaybackRateschange(e)))}createEl(){const e=super.createEl();return this.labelElId_="vjs-playback-rate-value-label-"+this.id_,this.labelEl_=ve("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"}),e.appendChild(this.labelEl_),e}dispose(){this.labelEl_=null,super.dispose()}buildCSSClass(){return`vjs-playback-rate ${super.buildCSSClass()}`}buildWrapperCSSClass(){return`vjs-playback-rate ${super.buildWrapperCSSClass()}`}createItems(){const e=this.playbackRates(),t=[];for(let i=e.length-1;i>=0;i--)t.push(new qn(this.player(),{rate:e[i]+"x"}));return t}handlePlaybackRateschange(e){this.update()}playbackRates(){const e=this.player();return e.playbackRates&&e.playbackRates()||[]}playbackRateSupported(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0}updateVisibility(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")}updateLabel(e){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")}}$n.prototype.controlText_="Playback Rate",Ut.registerComponent("PlaybackRateMenuButton",$n);class zn extends Ut{buildCSSClass(){return`vjs-spacer ${super.buildCSSClass()}`}createEl(e="div",t={},i={}){return t.className||(t.className=this.buildCSSClass()),super.createEl(e,t,i)}}Ut.registerComponent("Spacer",zn),Ut.registerComponent("CustomControlSpacer",class extends zn{buildCSSClass(){return`vjs-custom-control-spacer ${super.buildCSSClass()}`}createEl(){return super.createEl("div",{className:this.buildCSSClass(),textContent:" "})}});class Wn extends Ut{createEl(){return super.createEl("div",{className:"vjs-control-bar",dir:"ltr"})}}Wn.prototype.options_={children:["playToggle","skipBackward","skipForward","volumePanel","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","seekToLive","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subsCapsButton","audioTrackButton","pictureInPictureToggle","fullscreenToggle"]},Ut.registerComponent("ControlBar",Wn);class Gn extends ti{constructor(e,t){super(e,t),this.on(e,"error",(e=>{this.open(e)}))}buildCSSClass(){return`vjs-error-display ${super.buildCSSClass()}`}content(){const e=this.player().error();return e?this.localize(e.message):""}}Gn.prototype.options_=Object.assign({}
vendor: 4,318 bytes, line 2
2,ti.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),Ut.registerComponent("ErrorDisplay",Gn);class Kn extends Ut{constructor(e,t={}){super(e,t),this.el_.setAttribute("aria-labelledby",this.selectLabelledbyIds)}createEl(){return this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim(),ve("select",{id:this.options_.id},{},this.options_.SelectOptions.map((e=>{const t=(this.options_.labelId?this.options_.labelId:`vjs-track-option-${nt()}`)+"-"+e[1].replace(/\W+/g,""),i=ve("option",{id:t,value:this.localize(e[0]),textContent:this.localize(e[1])});return i.setAttribute("aria-labelledby",`${this.selectLabelledbyIds} ${t}`),i})))}}Ut.registerComponent("TextTrackSelect",Kn);class Qn extends Ut{constructor(e,t={}){super(e,t);const i=ve("legend",{textContent:this.localize(this.options_.legendText),id:this.options_.legendId});this.el().appendChild(i);const n=this.options_.selects;for(const t of n){const i=this.options_.selectConfigs[t],n=i.className,s=i.id.replace("%s",this.options_.id_);let r=null;const a=`vjs_select_${nt()}`;if("colors"===this.options_.type){r=ve("span",{className:n});const e=ve("label",{id:s,className:"vjs-label",textContent:this.localize(i.label)});e.setAttribute("for",a),r.appendChild(e)}const o=new Kn(e,{SelectOptions:i.options,legendId:this.options_.legendId,id:a,labelId:s});this.addChild(o),"colors"===this.options_.type&&(r.appendChild(o.el()),this.el().appendChild(r))}}createEl(){return ve("fieldset",{className:this.options_.className})}}Ut.registerComponent("TextTrackFieldset",Qn);class Xn extends Ut{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new Qn(e,{id_:i,legendId:`captions-text-legend-${i}`,legendText:this.localize("Text"),className:"vjs-fg vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(n);const s=new Qn(e,{id_:i,legendId:`captions-background-${i}`,legendText:this.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(s);const r=new Qn(e,{id_:i,legendId:`captions-window-${i}`,legendText:this.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"colors"});this.addChild(r)}createEl(){return ve("div",{className:"vjs-track-settings-colors"})}}Ut.registerComponent("TextTrackSettingsColors",Xn);class Yn extends Ut{constructor(e,t={}){super(e,t);const i=this.options_.textTrackComponentid,n=new Qn(e,{id_:i,legendId:`captions-font-size-${i}`,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:this.options_.fieldSets[0],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(n);const s=new Qn(e,{id_:i,legendId:`captions-edge-style-${i}`,legendText:this.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:this.options_.fieldSets[1],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(s);const r=new Qn(e,{id_:i,legendId:`captions-font-family-${i}`,legendText:this.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:this.options_.fieldSets[2],selectConfigs:this.options_.selectConfigs,type:"font"});this.addChild(r)}createEl(){return ve("div",{className:"vjs-track-settings-font"})}}Ut.registerComponent("TextTrackSettingsFont",Yn);class Jn extends Ut{constructor(e,t={}){super(e,t);const i=new en(e,{controlText:this.localize("restore all settings to the default values"),className:"vjs-default-button"});i.el().classList.remove("vjs-control","vjs-button"),i.el().textContent=this.localize("Reset"),this.addChild(i);const n=this.localize("Done"),s=new en(e,{controlText:n,className:"vjs-done-button"});s.el().classList.remove("vjs-control","vjs-button"),s.el().textContent=n,this.addChild(s)}createEl(){return ve("div",{className:"vjs-track-settings-controls"})}}Ut.registerComponent("TrackSettingsControls",Jn);const Zn="vjs-text-track-settings",es=["#000","Black"],ts=["#00F","Blue"],is=["#0FF","Cyan"],ns=["#0F0","Green"],ss=["#F0F","Magenta"],rs=["#F00","Red"],as=["#FFF","White"],os=["#FF0","Yellow"],ls=["1","Opaque"],us=["0.5","Semi-Transparent"],
vendor: 10,639 bytes, line 2
2cs=["0","Transparent"],hs={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[es,as,rs,ns,ts,os,ss,is],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Opacity",options:[ls,us,cs],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color > select",id:"captions-foreground-color-%s",label:"Color",options:[as,es,rs,ns,ts,os,ss,is],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style > select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family > select",id:"",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:"",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:e=>"1.00"===e?null:Number(e)},textOpacity:{selector:".vjs-text-opacity > select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[ls,us],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color > select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity > select",id:"captions-window-opacity-%s",label:"Opacity",options:[cs,us,ls],className:"vjs-window-opacity vjs-opacity"}};function ds(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}hs.windowColor.options=hs.backgroundColor.options,Ut.registerComponent("TextTrackSettings",class extends ti{constructor(e,t){t.temporary=!1,super(e,t),this.updateDisplay=this.updateDisplay.bind(this),this.fill(),this.hasBeenOpened_=this.hasBeenFilled_=!0,this.renderModalComponents(e),this.endDialog=ve("p",{className:"vjs-control-text",textContent:this.localize("End of dialog window.")}),this.el().appendChild(this.endDialog),this.setDefaults(),void 0===t.persistTextTrackSettings&&(this.options_.persistTextTrackSettings=this.options_.playerOptions.persistTextTrackSettings),this.bindFunctionsToSelectsAndButtons(),this.options_.persistTextTrackSettings&&this.restoreSettings()}renderModalComponents(e){const t=new Xn(e,{textTrackComponentid:this.id_,selectConfigs:hs,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(t);const i=new Yn(e,{textTrackComponentid:this.id_,selectConfigs:hs,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(i);const n=new Jn(e);this.addChild(n)}bindFunctionsToSelectsAndButtons(){this.on(this.$(".vjs-done-button"),["click","tap"],(()=>{this.saveSettings(),this.close()})),this.on(this.$(".vjs-default-button"),["click","tap"],(()=>{this.setDefaults(),this.updateDisplay()})),R(hs,(e=>{this.on(this.$(e.selector),"change",this.updateDisplay)}))}dispose(){this.endDialog=null,super.dispose()}label(){return this.localize("Caption Settings Dialog")}description(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}buildCSSClass(){return super.buildCSSClass()+" vjs-text-track-settings"}getValues(){return N(hs,((e,t,i)=>{const n=(s=this.$(t.selector),r=t.parser,ds(s.options[s.options.selectedIndex].value,r));var s,r;return void 0!==n&&(e[i]=n),e}),{})}setValues(e){R(hs,((t,i)=>{!function(e,t,i){if(t)for(let n=0;n<e.options.length;n++)if(ds(e.options[n].value,i)===t){e.selectedIndex=n;break}}(this.$(t.selector),e[i],t.parser)}))}setDefaults(){R(hs,(e=>{const t=e.hasOwnProperty("default")?e.default:0;this.$(e.selector).selectedIndex=t}))}restoreSettings(){let e;try{e=JSON.parse(s().localStorage.getItem(Zn))}catch(e){L.warn(e)}e&&this.setValues(e)}saveSettings(){if(!this.options_.persistTextTrackSettings)return;const e=this.getValues();try{Object.keys(e).length?s().localStorage.setItem(Zn,JSON.stringify(e)):s().localStorage.removeItem(Zn)}catch(e){L.warn(e)}}updateDisplay(){const e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()}handleLanguagechange(){this.fill(),this.renderModalComponents(this.player_),this.bindFunctionsToSelectsAndButtons()}}),Ut.registerComponent("ResizeManager",class extends Ut{constructor(e,t){let i=t.ResizeObserver||s().ResizeObserver;null===t.ResizeObserver&&(i=!1),super(e,F({createEl:!i,reportTouchActivity:!1},t)),this.ResizeObserver=t.ResizeObserver||s().ResizeObserver,this.loadListener_=null,this.resizeObserver_=null,this.debouncedHandler_=_t((()=>{this.resizeHandler()}),100,!1,this),i?(this.resizeObserver_=new this.ResizeObserver(this.debouncedHandler_),this.resizeObserver_.observe(e.el())):(this.loadListener_=()=>{if(!this.el_||!this.el_.contentWindow)return;const e=this.debouncedHandler_;let t=this.unloadListener_=function(){ct(this,"resize",e),ct(this,"unload",t),t=null};ut(this.el_.contentWindow,"unload",t),ut(this.el_.contentWindow,"resize",e)},this.one("load",this.loadListener_))}createEl(){return super.createEl("iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})}resizeHandler(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")}dispose(){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,super.dispose()}});const ps={trackingThreshold:20,liveTolerance:15};Ut.registerComponent("LiveTracker",class extends Ut{constructor(e,t){super(e,F(ps,t,{createEl:!1})),this.trackLiveHandler_=()=>this.trackLive_(),this.handlePlay_=e=>this.handlePlay(e),this.handleFirstTimeupdate_=e=>this.handleFirstTimeupdate(e),this.handleSeeked_=e=>this.handleSeeked(e),this.seekToLiveEdge_=e=>this.seekToLiveEdge(e),this.reset_(),this.on(this.player_,"durationchange",(e=>this.handleDurationchange(e))),this.on(this.player_,"canplay",(()=>this.toggleTracking()))}trackLive_(){const e=this.player_.seekable();if(!e||!e.length)return;const t=Number(s().performance.now().toFixed(4)),i=-1===this.lastTime_?0:(t-this.lastTime_)/1e3;this.lastTime_=t,this.pastSeekEnd_=this.pastSeekEnd()+i;const n=this.liveCurrentTime(),r=this.player_.currentTime();let a=this.player_.paused()||this.seekedBehindLive_||Math.abs(n-r)>this.options_.liveTolerance;this.timeupdateSeen_&&n!==1/0||(a=!1),a!==this.behindLiveEdge_&&(this.behindLiveEdge_=a,this.trigger("liveedgechange"))}handleDurationchange(){this.toggleTracking()}toggleTracking(){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())}startTracking(){this.isTracking()||(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_,gt),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_?this.on(this.player_,"seeked",this.handleSeeked_):(this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)))}handleFirstTimeupdate(){this.timeupdateSeen_=!0,this.on(this.player_,"seeked",this.handleSeeked_)}handleSeeked(){const e=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_=this.nextSeekedFromUser_&&e>2,this.nextSeekedFromUser_=!1,this.trackLive_()}handlePlay(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)}reset_(){this.lastTime_=-1,this.pastSeekEnd_=0,this.lastSeekEnd_=-1,this.behindLiveEdge_=!0,this.timeupdateSeen_=!1,this.seekedBehindLive_=!1,this.nextSeekedFromUser_=!1,this.clearInterval(this.trackingInterval_),this.trackingInterval_=null,this.off(this.player_,["play","pause"],this.trackLiveHandler_),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_)}nextSeekedFromUser(){this.nextSeekedFromUser_=!0}stopTracking(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))}seekableEnd(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.end(i));return t.length?t.sort()[t.length-1]:1/0}seekableStart(){const e=this.player_.seekable(),t=[];let i=e?e.length:0;for(;i--;)t.push(e.start(i));return t.length?t.sort()[0]:0}liveWindow(){const e=this.liveCurrentTime();return e===1/0?0:e-this.seekableStart()}isLive(){return this.isTracking()}atLiveEdge(){return!this.behindLiveEdge()}liveCurrentTime(){return this.pastSeekEnd()+this.seekableEnd()}pastSeekEnd(){const e=this.seekableEnd();return-1!==this.lastSeekEnd_&&e!==this.lastSeekEnd_&&(this.pastSeekEnd_=0),this.lastSeekEnd_=e,this.pastSeekEnd_}behindLiveEdge(){return this.behindLiveEdge_}isTracking(){return"number"==typeof this.trackingInterval_}seekToLiveEdge(){this.seekedBehindLive_=!1,this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))}dispose(){this.stopTracking(),super.dispose()}}),Ut.registerComponent("TitleBar",class extends Ut{constructor(e,t){super(e,t),this.on("statechanged",(e=>this.updateDom_())),this.updateDom_()}createEl(){return this.els={title:ve("div",{className:"vjs-title-bar-title",id:`vjs-title-bar-title-${nt()}`}),description:ve("div",{className:"vjs-title-bar-description",id:`vjs-title-bar-description-${nt()}`})},ve("div",{className:"vjs-title-bar"},{},V(this.els))}updateDom_(){const e=this.player_.tech_,t=e&&e.el_,i={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach((e=>{const n=this.state[e],s=this.els[e],r=i[e];Ne(s),n&&be(s,n),t&&(t.removeAttribute(r),n&&t.setAttribute(r,s.id))})),this.state.title||this.state.description?this.show():this.hide()}update(e){this.setState(e)}dispose(){const e=this.player_.tech_,t=e&&e.el_;t&&(t.removeAttribute("aria-labelledby"),t.removeAttribute("aria-describedby")),super.dispose(),this.els=null}});const fs={initialDisplay:4e3,position:[],takeFocus:!1};
2Ut.registerComponent("TransientButton",class extends en{constructor(e,t){super(e,t=F(fs,t)),this.controlText(t.controlText),this.hide(),this.on(this.player_,["useractive","userinactive"],(e=>{this.removeClass("force-display")}))}buildCSSClass(){return`vjs-transient-button focus-visible ${this.options_.position.map((e=>`vjs-${e}`)).join(" ")}`}createEl(){const e=ve("button",{},{type:"button",class:this.buildCSSClass()},ve("span"));return this.controlTextEl_=e.querySelector("span"),e}show(){super.show(),this.addClass("force-display"),this.options_.takeFocus&&this.el().focus({preventScroll:!0}),this.forceDisplayTimeout=this.player_.setTimeout((()=>{this.removeClass("force-display")}),this.options_.initialDisplay)}hide(){this.removeClass("force-display"),super.hide()}dispose(){this.player_.clearTimeout(this.forceDisplayTimeout),super.dispose()}});const gs=e=>{const t=e.el();if(t.hasAttribute("src"))return e.triggerSourceset(t.src),!0;const i=e.$$("source"),n=[];let s="";if(!i.length)return!1;for(let e=0;e<i.length;e++){const t=i[e].src;t&&-1===n.indexOf(t)&&n.push(t)}return!!n.length&&(1===n.length&&(s=n[0]),e.triggerSourceset(s),!0)},ms=Object.defineProperty({},"innerHTML",{get(){return this.cloneNode(!0).innerHTML},set(e){const t=a().createElement(this.nodeName.toLowerCase());t.innerHTML=e;const i=a().createDocumentFragment();for(;t.childNodes.length;)i.appendChild(t.childNodes[0]);return this.innerText="",s().Element.prototype.appendChild.call(this,i),this.innerHTML}}),ys=(e,t)=>{let i={};for(let n=0;n<e.length&&(i=Object.getOwnPropertyDescriptor(e[n],t),!(i&&i.set&&i.get));n++);return i.enumerable=!0,i.configurable=!0,i},_s=function(e){const t=e.el();if(t.resetSourceWatch_)return;const i={},n=(e=>ys([e.el(),s().HTMLMediaElement.prototype,s().Element.prototype,ms],"innerHTML"))(e),r=i=>(...n)=>{const s=i.apply(t,n);return gs(e),s};["append","appendChild","insertAdjacentHTML"].forEach((e=>{t[e]&&(i[e]=t[e],t[e]=r(i[e]))})),Object.defineProperty(t,"innerHTML",F(n,{set:r(n.set)})),t.resetSourceWatch_=()=>
vendor: 14,855 bytes, line 2
2{t.resetSourceWatch_=null,Object.keys(i).forEach((e=>{t[e]=i[e]})),Object.defineProperty(t,"innerHTML",n)},e.one("sourceset",t.resetSourceWatch_)},vs=Object.defineProperty({},"src",{get(){return this.hasAttribute("src")?gi(s().Element.prototype.getAttribute.call(this,"src")):""},set(e){return s().Element.prototype.setAttribute.call(this,"src",e),e}});class bs extends Ii{constructor(e,t){super(e,t);const i=e.source;let n=!1;if(this.featuresVideoFrameCallback=this.featuresVideoFrameCallback&&"VIDEO"===this.el_.tagName,i&&(this.el_.currentSrc!==i.src||e.tag&&3===e.tag.initNetworkState_)?this.setSource(i):this.handleLateInit_(this.el_),e.enableSourceset&&this.setupSourcesetHandling_(),this.isScrubbing_=!1,this.el_.hasChildNodes()){const e=this.el_.childNodes;let t=e.length;const i=[];for(;t--;){const s=e[t];"track"===s.nodeName.toLowerCase()&&(this.featuresNativeTextTracks?(this.remoteTextTrackEls().addTrackElement_(s),this.remoteTextTracks().addTrack(s.track),this.textTracks().addTrack(s.track),n||this.el_.hasAttribute("crossorigin")||!yi(s.src)||(n=!0)):i.push(s))}for(let e=0;e<i.length;e++)this.el_.removeChild(i[e])}this.proxyNativeTracks_(),this.featuresNativeTextTracks&&n&&L.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading."),this.restoreMetadataTracksInIOSNativePlayer_(),(ue||re)&&!0===e.nativeControlsForTouch&&this.setControls(!0),this.proxyWebkitFullscreen_(),this.triggerReady()}dispose(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_(),bs.disposeMediaElement(this.el_),this.options_=null,super.dispose()}setupSourcesetHandling_(){!function(e){if(!e.featuresSourceset)return;const t=e.el();if(t.resetSourceset_)return;const i=(e=>ys([e.el(),s().HTMLMediaElement.prototype,vs],"src"))(e),n=t.setAttribute,r=t.load;Object.defineProperty(t,"src",F(i,{set:n=>{const s=i.set.call(t,n);return e.triggerSourceset(t.src),s}})),t.setAttribute=(i,s)=>{const r=n.call(t,i,s);return/src/i.test(i)&&e.triggerSourceset(t.src),r},t.load=()=>{const i=r.call(t);return gs(e)||(e.triggerSourceset(""),_s(e)),i},t.currentSrc?e.triggerSourceset(t.currentSrc):gs(e)||_s(e),t.resetSourceset_=()=>{t.resetSourceset_=null,t.load=r,t.setAttribute=n,Object.defineProperty(t,"src",i),t.resetSourceWatch_&&t.resetSourceWatch_()}}(this)}restoreMetadataTracksInIOSNativePlayer_(){const e=this.textTracks();let t;const i=()=>{t=[];for(let i=0;i<e.length;i++){const n=e[i];"metadata"===n.kind&&t.push({track:n,storedMode:n.mode})}};i(),e.addEventListener("change",i),this.on("dispose",(()=>e.removeEventListener("change",i)));const n=()=>{for(let e=0;e<t.length;e++){const i=t[e];"disabled"===i.track.mode&&i.track.mode!==i.storedMode&&(i.track.mode=i.storedMode)}e.removeEventListener("change",n)};this.on("webkitbeginfullscreen",(()=>{e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)})),this.on("webkitendfullscreen",(()=>{e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)}))}overrideNative_(e,t){if(t!==this[`featuresNative${e}Tracks`])return;const i=e.toLowerCase();this[`${i}TracksListeners_`]&&Object.keys(this[`${i}TracksListeners_`]).forEach((e=>{this.el()[`${i}Tracks`].removeEventListener(e,this[`${i}TracksListeners_`][e])})),this[`featuresNative${e}Tracks`]=!t,this[`${i}TracksListeners_`]=null,this.proxyNativeTracksForType_(i)}overrideNativeAudioTracks(e){this.overrideNative_("Audio",e)}overrideNativeVideoTracks(e){this.overrideNative_("Video",e)}proxyNativeTracksForType_(e){const t=Ci[e],i=this.el()[t.getterName],n=this[t.getterName]();if(!this[`featuresNative${t.capitalName}Tracks`]||!i||!i.addEventListener)return;const s={change:t=>{const i={type:"change",target:n,currentTarget:n,srcElement:n};n.trigger(i),"text"===e&&this[Ei.remoteText.getterName]().trigger(i)},addtrack(e){n.addTrack(e.track)},removetrack(e){n.removeTrack(e.track)}},r=function(){const e=[];for(let t=0;t<n.length;t++){let s=!1;for(let e=0;e<i.length;e++)if(i[e]===n[t]){s=!0;break}s||e.push(n[t])}for(;e.length;)n.removeTrack(e.shift())};this[t.getterName+"Listeners_"]=s,Object.keys(s).forEach((e=>{const t=s[e];i.addEventListener(e,t),this.on("dispose",(n=>i.removeEventListener(e,t)))})),this.on("loadstart",r),this.on("dispose",(e=>this.off("loadstart",r)))}proxyNativeTracks_(){Ci.names.forEach((e=>{this.proxyNativeTracksForType_(e)}))}createEl(){let e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){const t=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(t,e),bs.disposeMediaElement(e),e=t}else{e=a().createElement("video");const t=F({},this.options_.tag&&xe(this.options_.tag));ue&&!0===this.options_.nativeControlsForTouch||delete t.controls,Ee(e,Object.assign(t,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&Oe(e,"preload",this.options_.preload),void 0!==this.options_.disablePictureInPicture&&(e.disablePictureInPicture=this.options_.disablePictureInPicture);const t=["loop","muted","playsinline","autoplay"];for(let i=0;i<t.length;i++){const n=t[i],s=this.options_[n];void 0!==s&&(s?Oe(e,n,n):Pe(e,n),e[n]=s)}return e}handleLateInit_(e){if(0===e.networkState||3===e.networkState)return;if(0===e.readyState){let e=!1;const t=function(){e=!0};this.on("loadstart",t);const i=function(){e||this.trigger("loadstart")};return this.on("loadedmetadata",i),void this.ready((function(){this.off("loadstart",t),this.off("loadedmetadata",i),e||this.trigger("loadstart")}))}const t=["loadstart"];t.push("loadedmetadata"),e.readyState>=2&&t.push("loadeddata"),e.readyState>=3&&t.push("canplay"),e.readyState>=4&&t.push("canplaythrough"),this.ready((function(){t.forEach((function(e){this.trigger(e)}),this)}))}setScrubbing(e){this.isScrubbing_=e}scrubbing(){return this.isScrubbing_}setCurrentTime(e){try{this.isScrubbing_&&this.el_.fastSeek&&de?this.el_.fastSeek(e):this.el_.currentTime=e}catch(e){L(e,"Video is not ready. (Video.js)")}}duration(){if(this.el_.duration===1/0&&G&&Y&&0===this.el_.currentTime){const e=()=>{this.el_.currentTime>0&&(this.el_.duration===1/0&&this.trigger("durationchange"),this.off("timeupdate",e))};return this.on("timeupdate",e),NaN}return this.el_.duration||NaN}width(){return this.el_.offsetWidth}height(){return this.el_.offsetHeight}proxyWebkitFullscreen_(){if(!("webkitDisplayingFullscreen"in this.el_))return;const e=function(){this.trigger("fullscreenchange",{isFullscreen:!1}),this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},t=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",e),this.trigger("fullscreenchange",{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",t),this.on("dispose",(()=>{this.off("webkitbeginfullscreen",t),this.off("webkitendfullscreen",e)}))}supportsFullScreen(){return"function"==typeof this.el_.webkitEnterFullScreen}enterFullScreen(){const e=this.el_;if(e.paused&&e.networkState<=e.HAVE_METADATA)Yt(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)}}exitFullScreen(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",new Error("The video is not fullscreen"))}requestPictureInPicture(){return this.el_.requestPictureInPicture()}requestVideoFrameCallback(e){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(e):super.requestVideoFrameCallback(e)}cancelVideoFrameCallback(e){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(e):super.cancelVideoFrameCallback(e)}src(e){if(void 0===e)return this.el_.src;this.setSrc(e)}addSourceElement(e,t){if(!e)return L.error("Invalid source URL."),!1;const i={src:e};t&&(i.type=t);const n=ve("source",{},i);return this.el_.appendChild(n),!0}removeSourceElement(e){if(!e)return L.error("Source URL is required to remove the source element."),!1;const t=this.el_.querySelectorAll("source");for(const i of t)if(i.src===e)return this.el_.removeChild(i),!0;return L.warn(`No matching source element found with src: ${e}`),!1}reset(){bs.resetMediaElement(this.el_)}currentSrc(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc}setControls(e){this.el_.controls=!!e}addTextTrack(e,t,i){return this.featuresNativeTextTracks?this.el_.addTextTrack(e,t,i):super.addTextTrack(e,t,i)}createRemoteTextTrack(e){if(!this.featuresNativeTextTracks)return super.createRemoteTextTrack(e);const t=a().createElement("track");return e.kind&&(t.kind=e.kind),e.label&&(t.label=e.label),(e.language||e.srclang)&&(t.srclang=e.language||e.srclang),e.default&&(t.default=e.default),e.id&&(t.id=e.id),e.src&&(t.src=e.src),t}addRemoteTextTrack(e,t){const i=super.addRemoteTextTrack(e,t);return this.featuresNativeTextTracks&&this.el().appendChild(i),i}removeRemoteTextTrack(e){if(super.removeRemoteTextTrack(e),this.featuresNativeTextTracks){const t=this.$$("track");let i=t.length;for(;i--;)e!==t[i]&&e!==t[i].track||this.el().removeChild(t[i])}}getVideoPlaybackQuality(){if("function"==typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality();const e={};return void 0!==this.el().webkitDroppedFrameCount&&void 0!==this.el().webkitDecodedFrameCount&&(e.droppedVideoFrames=this.el().webkitDroppedFrameCount,e.totalVideoFrames=this.el().webkitDecodedFrameCount),s().performance&&(e.creationTime=s().performance.now()),e}}H(bs,"TEST_VID",(function(){if(!ge())return;const e=a().createElement("video"),t=a().createElement("track");return t.kind="captions",t.srclang="en",t.label="English",e.appendChild(t),e})),bs.isSupported=function(){try{bs.TEST_VID.volume=.5}catch(e){return!1}return!(!bs.TEST_VID||!bs.TEST_VID.canPlayType)},bs.canPlayType=function(e){return bs.TEST_VID.canPlayType(e)},bs.canPlaySource=function(e,t){return bs.canPlayType(e.type)},bs.canControlVolume=function(){try{const e=bs.TEST_VID.volume;bs.TEST_VID.volume=e/2+.1;const t=e!==bs.TEST_VID.volume;return t&&he?(s().setTimeout((()=>{bs&&bs.prototype&&(bs.prototype.featuresVolumeControl=e!==bs.TEST_VID.volume)})),!1):t}catch(e){return!1}},bs.canMuteVolume=function(){try{const e=bs.TEST_VID.muted;return bs.TEST_VID.muted=!e,bs.TEST_VID.muted?Oe(bs.TEST_VID,"muted","muted"):Pe(bs.TEST_VID,"muted"),e!==bs.TEST_VID.muted}catch(e){return!1}},bs.canControlPlaybackRate=function(){if(G&&Y&&Z<58)return!1;try{const e=bs.TEST_VID.playbackRate;return bs.TEST_VID.playbackRate=e/2+.1,e!==bs.TEST_VID.playbackRate}catch(e){return!1}},bs.canOverrideAttributes=function(){try{const e=()=>{};Object.defineProperty(a().createElement("video"),"src",{get:e,set:e}),Object.defineProperty(a().createElement("audio"),"src",{get:e,set:e}),Object.defineProperty(a().createElement("video"),"innerHTML",{get:e,set:e}),Object.defineProperty(a().createElement("audio"),"innerHTML",{get:e,set:e})}catch(e){return!1}return!0},bs.supportsNativeTextTracks=function(){return de||he&&Y},bs.supportsNativeVideoTracks=function(){return!(!bs.TEST_VID||!bs.TEST_VID.videoTracks)},bs.supportsNativeAudioTracks=function(){return!(!bs.TEST_VID||!bs.TEST_VID.audioTracks)},bs.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","resize","volumechange"],[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEach((function([e,t]){H(bs.prototype,e,(()=>bs[t]()),!0)})),bs.prototype.featuresVolumeControl=bs.canControlVolume(),bs.prototype.movingMediaElementInDOM=!he,bs.prototype.featuresFullscreenResize=!0,bs.prototype.featuresProgressEvents=!0,bs.prototype.featuresTimeupdateEvents=!0,bs.prototype.featuresVideoFrameCallback=!(!bs.TEST_VID||!bs.TEST_VID.requestVideoFrameCallback),bs.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(e){}}()}},bs.resetMediaElement=function(e){if(!e)return;const t=e.querySelectorAll("source");let i=t.length;for(;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){bs.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){bs.prototype["set"+jt(e)]=function(t){this.el_[e]=t,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){bs.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate","defaultPlaybackRate","disablePictureInPicture","crossOrigin"].forEach((function(e){bs.prototype["set"+jt(e)]=function(t){this.el_[e]=t}})),["pause","load","play"].forEach((function(e){bs.prototype[e]=function(){return this.el_[e]()}})),Ii.withSourceHandlers(bs),bs.nativeSourceHandler={},bs.nativeSourceHandler.canPlayType=function(e){try{return bs.TEST_VID.canPlayType(e)}catch(e){return""}},bs.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return bs.nativeSourceHandler.canPlayType(e.type);if(e.src){const t=mi(e.src);return bs.nativeSourceHandler.canPlayType(`video/${t}`)}return""},bs.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},bs.nativeSourceHandler.dispose=function(){},bs.registerSourceHandler(bs.nativeSourceHandler),Ii.registerTech("Html5",bs);const Ts=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","resize","volumechange","texttrackchange"],Ss={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing",seeked:"Seeked"},ks=["tiny","xsmall","small","medium","large","xlarge","huge"],ws={};ks.forEach((e=>{const t="x"===e.charAt(0)?`x-${e.substring(1)}`:e;ws[e]=`vjs-layout-${t}`}));const Cs={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:1/0};class Es extends Ut{constructor(e,t,i){if(e.id=e.id||t.id||`vjs_video_${nt
2()}`,(t=Object.assign(Es.getTagSettings(e),t)).initChildren=!1,t.createEl=!1,t.evented=!1,t.reportTouchActivity=!1,!t.language){const i=e.closest("[lang]");i&&(t.language=i.getAttribute("lang"))}if(super(null,t,i),this.boundDocumentFullscreenChange_=e=>this.documentFullscreenChange_(e),this.boundFullWindowOnEscKey_=e=>this.fullWindowOnEscKey(e),this.boundUpdateStyleEl_=e=>this.updateStyleEl_(e),this.boundApplyInitTime_=e=>this.applyInitTime_(e),this.boundUpdateCurrentBreakpoint_=e=>this.updateCurrentBreakpoint_(e),this.boundHandleTechClick_=e=>this.handleTechClick_(e),this.boundHandleTechDoubleClick_=e=>this.handleTechDoubleClick_(e),this.boundHandleTechTouchStart_=e=>this.handleTechTouchStart_(e),this.boundHandleTechTouchMove_=e=>this.handleTechTouchMove_(e),this.boundHandleTechTouchEnd_=e=>this.handleTechTouchEnd_(e),this.boundHandleTechTap_=e=>this.handleTechTap_(e),this.boundUpdatePlayerHeightOnAudioOnlyMode_=e=>this.updatePlayerHeightOnAudioOnlyMode_(e),this.isFullscreen_=!1,this.log=M(this.id_),this.fsApi_=x,this.isPosterFromTech_=!1,this.queuedCallbacks_=[],this.isReady_=!1,this.hasStarted_=!1,this.userActive_=!1,this.debugEnabled_=!1,this.audioOnlyMode_=!1,this.audioPosterMode_=!1,this.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]},!this.options_||!this.options_.techOrder||!this.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(this.tag=e,this.tagAttributes=e&&xe(e),this.language(this.options_.language),t.languages){const e={};Object.getOwnPropertyNames(t.languages).forEach((function(i){e[i.toLowerCase()]=t.languages[i]})),this.languages_=e}else this.languages_=Es.prototype.options_.languages;this.resetCache_(),this.poster_=t.poster||"",this.controls_=!!t.controls,e.controls=!1,e.removeAttribute("controls"),this.changingSrc_=!1,this.playCallbacks_=[],this.playTerminatedQueue_=[],e.hasAttribute("autoplay")?this.autoplay(!0):this.autoplay(this.options_.autoplay),t.plugins&&Object.keys(t.plugins).forEach((e=>{if("function"!=typeof this[e])throw new Error(`plugin "${e}" does not exist`)})),this.scrubbing_=!1,this.el_=this.createEl(),At(this,{eventBusKey:"el_"}),this.fsApi_.requestFullscreen&&(ut(a(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),this.on(this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_)),this.fluid_&&this.on(["playerreset","resize"],this.boundUpdateStyleEl_);const n=F(this.options_);if(t.plugins&&Object.keys(t.plugins).forEach((e=>{this[e](t.plugins[e])})
vendor: 17,980 bytes, line 2
2),t.debug&&this.debug(!0),this.options_.playerOptions=n,this.middleware_=[],this.playbackRates(t.playbackRates),t.experimentalSvgIcons){const e=(new(s().DOMParser)).parseFromString('<svg xmlns="http://www.w3.org/2000/svg">\n  <defs>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-play">\n      <path d="M16 10v28l22-14z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-pause">\n      <path d="M12 38h8V10h-8v28zm16-28v28h8V10h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-audio">\n      <path d="M24 2C14.06 2 6 10.06 6 20v14c0 3.31 2.69 6 6 6h6V24h-8v-4c0-7.73 6.27-14 14-14s14 6.27 14 14v4h-8v16h6c3.31 0 6-2.69 6-6V20c0-9.94-8.06-18-18-18z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-captions">\n      <path d="M38 8H10c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM22 22h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2zm14 0h-3v-1h-4v6h4v-1h3v2a2 2 0 0 1-2 2h-6a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-subtitles">\n      <path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-enter">\n      <path d="M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-fullscreen-exit">\n      <path d="M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-play-circle">\n      <path d="M20 33l12-9-12-9v18zm4-29C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-mute">\n      <path d="M33 24c0-3.53-2.04-6.58-5-8.05v4.42l4.91 4.91c.06-.42.09-.85.09-1.28zm5 0c0 1.88-.41 3.65-1.08 5.28l3.03 3.03C41.25 29.82 42 27 42 24c0-8.56-5.99-15.72-14-17.54v4.13c5.78 1.72 10 7.07 10 13.41zM8.55 6L6 8.55 15.45 18H6v12h8l10 10V26.55l8.51 8.51c-1.34 1.03-2.85 1.86-4.51 2.36v4.13a17.94 17.94 0 0 0 7.37-3.62L39.45 42 42 39.45l-18-18L8.55 6zM24 8l-4.18 4.18L24 16.36V8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-low">\n      <path d="M14 18v12h8l10 10V8L22 18h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-medium">\n      <path d="M37 24c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zm-27-6v12h8l10 10V8L18 18h-8z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-volume-high">\n      <path d="M6 18v12h8l10 10V8L14 18H6zm27 6c0-3.53-2.04-6.58-5-8.05v16.11c2.96-1.48 5-4.53 5-8.06zM28 6.46v4.13c5.78 1.72 10 7.07 10 13.41s-4.22 11.69-10 13.41v4.13c8.01-1.82 14-8.97 14-17.54S36.01 8.28 28 6.46z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-spinner">\n      <path d="M18.8 21l9.53-16.51C26.94 4.18 25.49 4 24 4c-4.8 0-9.19 1.69-12.64 4.51l7.33 12.69.11-.2zm24.28-3c-1.84-5.85-6.3-10.52-11.99-12.68L23.77 18h19.31zm.52 2H28.62l.58 1 9.53 16.5C41.99 33.94 44 29.21 44 24c0-1.37-.14-2.71-.4-4zm-26.53 4l-7.8-13.5C6.01 14.06 4 18.79 4 24c0 1.37.14 2.71.4 4h14.98l-2.31-4zM4.92 30c1.84 5.85 6.3 10.52 11.99 12.68L24.23 30H4.92zm22.54 0l-7.8 13.51c1.4.31 2.85.49 4.34.49 4.8 0 9.19-1.69 12.64-4.51L29.31 26.8 27.46 30z"></path>\n    </symbol>\n    <symbol viewBox="0 0 24 24" id="vjs-icon-hd">\n      <path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-8 12H9.5v-2h-2v2H6V9h1.5v2.5h2V9H11v6zm2-6h4c.55 0 1 .45 1 1v4c0 .55-.45 1-1 1h-4V9zm1.5 4.5h2v-3h-2v3z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-chapters">\n      <path d="M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"></path>\n    </symbol>\n    <symbol viewBox="0 0 40 40" id="vjs-icon-downloading">\n      <path d="M18.208 36.875q-3.208-.292-5.979-1.729-2.771-1.438-4.812-3.729-2.042-2.292-3.188-5.229-1.146-2.938-1.146-6.23 0-6.583 4.334-11.416 4.333-4.834 10.833-5.5v3.166q-5.167.75-8.583 4.646Q6.25 14.75 6.25 19.958q0 5.209 3.396 9.104 3.396 3.896 8.562 4.646zM20 28.417L11.542 20l2.083-2.083 4.917 4.916v-11.25h2.916v11.25l4.875-4.916L28.417 20zm1.792 8.458v-3.167q1.833-.25 3.541-.958 1.709-.708 3.167-1.875l2.333 2.292q-1.958 1.583-4.25 2.541-2.291.959-4.791 1.167zm6.791-27.792q-1.541-1.125-3.25-1.854-1.708-.729-3.541-1.021V3.042q2.5.25 4.77 1.208 2.271.958 4.271 2.5zm4.584 21.584l-2.25-2.25q1.166-1.5 1.854-3.209.687-1.708.937-3.541h3.209q-.292 2.5-1.229 4.791-.938 2.292-2.521 4.209zm.541-12.417q-.291-1.833-.958-3.562-.667-1.73-1.833-3.188l2.375-2.208q1.541 1.916 2.458 4.208.917 2.292 1.167 4.75z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download">\n      <path d="M10.8 40.55q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h26.35v-7.7h3.4v7.7q0 1.4-1 2.4t-2.4 1zM24 32.1L13.9 22.05l2.45-2.45 5.95 5.95V7.15h3.4v18.4l5.95-5.95 2.45 2.45z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-done">\n      <path d="M9.8 40.5v-3.45h28.4v3.45zm9.2-9.05L7.4 19.85l2.45-2.35L19 26.65l19.2-19.2 2.4 2.4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-file-download-off">\n      <path d="M4.9 4.75L43.25 43.1 41 45.3l-4.75-4.75q-.05.05-.075.025-.025-.025-.075-.025H10.8q-1.35 0-2.375-1T7.4 37.15v-7.7h3.4v7.7h22.05l-7-7-1.85 1.8L13.9 21.9l1.85-1.85L2.7 7zm26.75 14.7l2.45 2.45-3.75 3.8-2.45-2.5zM25.7 7.15V21.1l-3.4-3.45V7.15z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-share">\n      <path d="M36 32.17c-1.52 0-2.89.59-3.93 1.54L17.82 25.4c.11-.45.18-.92.18-1.4s-.07-.95-.18-1.4l14.1-8.23c1.07 1 2.5 1.62 4.08 1.62 3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6c0 .48.07.95.18 1.4l-14.1 8.23c-1.07-1-2.5-1.62-4.08-1.62-3.31 0-6 2.69-6 6s2.69 6 6 6c1.58 0 3.01-.62 4.08-1.62l14.25 8.31c-.1.42-.16.86-.16 1.31A5.83 5.83 0 1 0 36 32.17z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cog">\n      <path d="M38.86 25.95c.08-.64.14-1.29.14-1.95s-.06-1.31-.14-1.95l4.23-3.31c.38-.3.49-.84.24-1.28l-4-6.93c-.25-.43-.77-.61-1.22-.43l-4.98 2.01c-1.03-.79-2.16-1.46-3.38-1.97L29 4.84c-.09-.47-.5-.84-1-.84h-8c-.5 0-.91.37-.99.84l-.75 5.3a14.8 14.8 0 0 0-3.38 1.97L9.9 10.1a1 1 0 0 0-1.22.43l-4 6.93c-.25.43-.14.97.24 1.28l4.22 3.31C9.06 22.69 9 23.34 9 24s.06 1.31.14 1.95l-4.22 3.31c-.38.3-.49.84-.24 1.28l4 6.93c.25.43.77.61 1.22.43l4.98-2.01c1.03.79 2.16 1.46 3.38 1.97l.75 5.3c.08.47.49.84.99.84h8c.5 0 .91-.37.99-.84l.75-5.3a14.8 14.8 0 0 0 3.38-1.97l4.98 2.01a1 1 0 0 0 1.22-.43l4-6.93c.25-.43.14-.97-.24-1.28l-4.22-3.31zM24 31c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-square">\n      <path d="M36 8H12c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zm0 28H12V12h24v24z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle">\n      <circle cx="24" cy="24" r="20"></circle>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-outline">\n      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-circle-inner-circle">\n      <path d="M24 4C12.97 4 4 12.97 4 24s8.97 20 20 20 20-8.97 20-20S35.03 4 24 4zm0 36c-8.82 0-16-7.18-16-16S15.18 8 24 8s16 7.18 16 16-7.18 16-16 16zm6-16c0 3.31-2.69 6-6 6s-6-2.69-6-6 2.69-6 6-6 6 2.69 6 6z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cancel">\n      <path d="M24 4C12.95 4 4 12.95 4 24s8.95 20 20 20 20-8.95 20-20S35.05 4 24 4zm10 27.17L31.17 34 24 26.83 16.83 34 14 31.17 21.17 24 14 16.83 16.83 14 24 21.17 31.17 14 34 16.83 26.83 24 34 31.17z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-replay">\n      <path d="M24 10V2L14 12l10 10v-8c6.63 0 12 5.37 12 12s-5.37 12-12 12-12-5.37-12-12H8c0 8.84 7.16 16 16 16s16-7.16 16-16-7.16-16-16-16z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-repeat">\n      <path d="M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-5">\n      <path d="M17.689 98l-8.697 8.696 8.697 8.697 2.486-2.485-4.32-4.319h1.302c4.93 0 9.071 1.722 12.424 5.165 3.352 3.443 5.029 7.638 5.029 12.584h3.55c0-2.958-.553-5.73-1.658-8.313-1.104-2.583-2.622-4.841-4.555-6.774-1.932-1.932-4.19-3.45-6.773-4.555-2.584-1.104-5.355-1.657-8.313-1.657H15.5l4.615-4.615zm-8.08 21.659v13.861h11.357v5.008H9.609V143h12.7c.834 0 1.55-.298 2.146-.894.596-.597.895-1.31.895-2.145v-7.781c0-.835-.299-1.55-.895-2.147a2.929 2.929 0 0 0-2.147-.894h-8.227v-5.096H25.35v-4.384z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-10">\n      <path d="M42.315 125.63c0-4.997-1.694-9.235-5.08-12.713-3.388-3.479-7.571-5.218-12.552-5.218h-1.315l4.363 4.363-2.51 2.51-8.787-8.786L25.221 97l2.45 2.45-4.662 4.663h1.375c2.988 0 5.788.557 8.397 1.673 2.61 1.116 4.892 2.65 6.844 4.602 1.953 1.953 3.487 4.234 4.602 6.844 1.116 2.61 1.674 5.41 1.674 8.398zM8.183 142v-19.657H3.176V117.8h9.643V142zm13.63 0c-1.156 0-2.127-.393-2.912-1.178-.778-.778-1.168-1.746-1.168-2.902v-16.04c0-1.156.393-2.127 1.178-2.912.779-.779 1.746-1.168 2.902-1.168h7.696c1.156 0 2.126.392 2.911 1.177.779.78 1.168 1.747 1.168 2.903v16.04c0 1.156-.392 2.127-1.177 2.912-.779.779-1.746 1.168-2.902 1.168zm.556-4.636h6.583v-15.02H22.37z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-replay-30">\n      <path d="M26.047 97l-8.733 8.732 8.733 8.733 2.496-2.494-4.336-4.338h1.307c4.95 0 9.108 1.73 12.474 5.187 3.367 3.458 5.051 7.668 5.051 12.635h3.565c0-2.97-.556-5.751-1.665-8.346-1.109-2.594-2.633-4.862-4.574-6.802-1.94-1.941-4.208-3.466-6.803-4.575-2.594-1.109-5.375-1.664-8.345-1.664H23.85l4.634-4.634zM2.555 117.531v4.688h10.297v5.25H5.873v4.687h6.979v5.156H2.555V142H13.36c1.061 0 1.95-.395 2.668-1.186.718-.79 1.076-1.772 1.076-2.94v-16.218c0-1.168-.358-2.149-1.076-2.94-.717-.79-1.607-1.185-2.668-1.185zm22.482.14c-1.149 0-2.11.39-2.885 1.165-.78.78-1.172 1.744-1.172 2.893v15.943c0 1.149.388 2.11 1.163 2.885.78.78 1.745 1.172 2.894 1.172h7.649c1.148 0 2.11-.388 2.884-1.163.78-.78 1.17-1.745 1.17-2.894v-15.943c0-1.15-.386-2.111-1.16-2.885-.78-.78-1.746-1.172-2.894-1.172zm.553 4.518h6.545v14.93H25.59z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-5">\n      <path d="M29.508 97l-2.431 2.43 4.625 4.625h-1.364c-2.965 0-5.742.554-8.332 1.66-2.589 1.107-4.851 2.629-6.788 4.566-1.937 1.937-3.458 4.2-4.565 6.788-1.107 2.59-1.66 5.367-1.66 8.331h3.557c0-4.957 1.68-9.16 5.04-12.611 3.36-3.45 7.51-5.177 12.451-5.177h1.304l-4.326 4.33 2.49 2.49 8.715-8.716zm-9.783 21.61v13.89h11.382v5.018H19.725V142h12.727a2.93 2.93 0 0 0 2.15-.896 2.93 2.93 0 0 0 .896-2.15v-7.798c0-.837-.299-1.554-.896-2.152a2.93 2.93 0 0 0-2.15-.896h-8.245V123h11.29v-4.392z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-10">\n      <path d="M23.119 97l-2.386 2.383 4.538 4.538h-1.339c-2.908 0-5.633.543-8.173 1.63-2.54 1.085-4.76 2.577-6.66 4.478-1.9 1.9-3.392 4.12-4.478 6.66-1.085 2.54-1.629 5.264-1.629 8.172h3.49c0-4.863 1.648-8.986 4.944-12.372 3.297-3.385 7.368-5.078 12.216-5.078h1.279l-4.245 4.247 2.443 2.442 8.55-8.55zm-9.52 21.45v4.42h4.871V142h4.513v-23.55zm18.136 0c-1.125 0-2.066.377-2.824 1.135-.764.764-1.148 1.709-1.148 2.834v15.612c0 1.124.38 2.066 1.139 2.824.764.764 1.708 1.145 2.833 1.145h7.489c1.125 0 2.066-.378 2.824-1.136.764-.764 1.145-1.709 1.145-2.833v-15.612c0-1.125-.378-2.067-1.136-2.825-.764-.764-1.708-1.145-2.833-1.145zm.54 4.42h6.408v14.617h-6.407z"></path>\n    </symbol>\n    <symbol viewBox="0 96 48 48" id="vjs-icon-forward-30">\n      <path d="M25.549 97l-2.437 2.434 4.634 4.635H26.38c-2.97 0-5.753.555-8.347 1.664-2.594 1.109-4.861 2.633-6.802 4.574-1.94 1.94-3.465 4.207-4.574 6.802-1.109 2.594-1.664 5.377-1.664 8.347h3.565c0-4.967 1.683-9.178 5.05-12.636 3.366-3.458 7.525-5.187 12.475-5.187h1.307l-4.335 4.338 2.495 2.494 8.732-8.732zm-11.553 20.53v4.689h10.297v5.249h-6.978v4.688h6.978v5.156H13.996V142h10.808c1.06 0 1.948-.395 2.666-1.186.718-.79 1.077-1.771 1.077-2.94v-16.217c0-1.169-.36-2.15-1.077-2.94-.718-.79-1.605-1.186-2.666-1.186zm21.174.168c-1.149 0-2.11.389-2.884 1.163-.78.78-1.172 1.745-1.172 2.894v15.942c0 1.15.388 2.11 1.162 2.885.78.78 1.745 1.17 2.894 1.17h7.649c1.149 0 2.11-.386 2.885-1.16.78-.78 1.17-1.746 1.17-2.895v-15.942c0-1.15-.387-2.11-1.161-2.885-.78-.78-1.745-1.172-2.894-1.172zm.552 4.516h6.542v14.931h-6.542z"></path>\n    </symbol>\n    <symbol viewBox="0 0 512 512" id="vjs-icon-audio-description">\n      <g fill-rule="evenodd"><path d="M227.29 381.351V162.993c50.38-1.017 89.108-3.028 117.631 17.126 27.374 19.342 48.734 56.965 44.89 105.325-4.067 51.155-41.335 94.139-89.776 98.475-24.085 2.155-71.972 0-71.972 0s-.84-1.352-.773-2.568m48.755-54.804c31.43 1.26 53.208-16.633 56.495-45.386 4.403-38.51-21.188-63.552-58.041-60.796v103.612c-.036 1.466.575 2.22 1.546 2.57"></path><path d="M383.78 381.328c13.336 3.71 17.387-11.06 23.215-21.408 12.722-22.571 22.294-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.226 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M425.154 381.328c13.336 3.71 17.384-11.061 23.215-21.408 12.721-22.571 22.291-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.511c-.586 3.874 2.226 7.315 3.866 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894"></path><path d="M466.26 381.328c13.337 3.71 17.385-11.061 23.216-21.408 12.722-22.571 22.292-51.594 22.445-84.774.221-47.594-18.343-82.517-35.6-106.182h-8.51c-.587 3.874 2.225 7.315 3.865 10.276 13.166 23.762 25.367 56.553 25.54 94.194.2 43.176-14.162 79.278-30.955 107.894M4.477 383.005H72.58l18.573-28.484 64.169-.135s.065 19.413.065 28.62h48.756V160.307h-58.816c-5.653 9.537-140.85 222.697-140.85 222.697zm152.667-145.282v71.158l-40.453-.27 40.453-70.888z"></path></g>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-next-item">\n      <path d="M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-previous-item">\n      <path d="M12 12h4v24h-4zm7 12l17 12V12z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-shuffle">\n      <path d="M21.17 18.34L10.83 8 8 10.83l10.34 10.34 2.83-2.83zM29 8l4.09 4.09L8 37.17 10.83 40l25.09-25.09L40 19V8H29zm.66 18.83l-2.83 2.83 6.26 6.26L29 40h11V29l-4.09 4.09-6.25-6.26z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-cast">\n      <path d="M42 6H6c-2.21 0-4 1.79-4 4v6h4v-6h36v28H28v4h14c2.21 0 4-1.79 4-4V10c0-2.21-1.79-4-4-4zM2 36v6h6c0-3.31-2.69-6-6-6zm0-8v4c5.52 0 10 4.48 10 10h4c0-7.73-6.27-14-14-14zm0-8v4c9.94 0 18 8.06 18 18h4c0-12.15-9.85-22-22-22z"></path>\n    </symbol>\n    <symbol viewBox="0 0 48 48" id="vjs-icon-picture-in-picture-enter">\n      <path d="M38 22H22v11.99h16V22zm8 16V9.96C46 7.76 44.2 6 42 6H6C3.8 6 2 7.76 2 9.96V38c0 2.2 1.8 4 4 4h36c2.2 0 4-1.8 4-4zm-4 .04H6V9.94h36v28.1z"></path>\n    </symbol>\n    <symbol viewBox="0 0 22 18" id="vjs-icon-picture-in-picture-exit">\n      <path d="M18 4H4v10h14V4zm4 12V1.98C22 .88 21.1 0 20 0H2C.9 0 0 .88 0 1.98V16c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H2V1.97h18v14.05z"></path>\n      <path fill="none" d="M-1-3h24v24H-1z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-facebook">\n      <path d="M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-linkedin">\n      <path d="M477 625v991H147V625h330zm21-306q1 73-50.5 122T312 490h-2q-82 0-132-49t-50-122q0-74 51.5-122.5T314 148t133 48.5T498 319zm1166 729v568h-329v-530q0-105-40.5-164.5T1168 862q-63 0-105.5 34.5T999 982q-11 30-11 81v553H659q2-399 2-647t-1-296l-1-48h329v144h-2q20-32 41-56t56.5-52 87-43.5T1285 602q171 0 275 113.5t104 332.5z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1200 1227" id="vjs-icon-twitter">\n      <path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-tumblr">\n      <path d="M1328 1329l80 237q-23 35-111 66t-177 32q-104 2-190.5-26T787 1564t-95-106-55.5-120-16.5-118V676H452V461q72-26 129-69.5t91-90 58-102 34-99T779 12q1-5 4.5-8.5T791 0h244v424h333v252h-334v518q0 30 6.5 56t22.5 52.5 49.5 41.5 81.5 14q78-2 134-29z"></path>\n    </symbol>\n    <symbol viewBox="0 0 1792 1792" id="vjs-icon-pinterest">\n      <path d="M1664 896q0 209-103 385.5T1281.5 1561 896 1664q-111 0-218-32 59-93 78-164 9-34 54-211 20 39 73 67.5t114 28.5q121 0 216-68.5t147-188.5 52-270q0-114-59.5-214T1180 449t-255-63q-105 0-196 29t-154.5 77-109 110.5-67 129.5T377 866q0 104 40 183t117 111q30 12 38-20 2-7 8-31t8-30q6-23-11-43-51-61-51-151 0-151 104.5-259.5T904 517q151 0 235.5 82t84.5 213q0 170-68.5 289T980 1220q-61 0-98-43.5T859 1072q8-35 26.5-93.5t30-103T927 800q0-50-27-83t-77-33q-62 0-105 57t-43 142q0 73 25 122l-99 418q-17 70-13 177-206-91-333-281T128 896q0-209 103-385.5T510.5 231 896 128t385.5 103T1561 510.5 1664 896z"></path>\n    </symbol>\n  </defs>\n</svg>',"image/svg+xml");if(e.querySelector("parsererror"))
vendor: 1,456 bytes, line 2
2L.warn("Failed to load SVG Icons. Falling back to Font Icons."),this.options_.experimentalSvgIcons=null;else{const t=e.documentElement;t.style.display="none",this.el_.appendChild(t),this.addClass("vjs-svg-icons-enabled")}}this.initChildren(),this.isAudio("audio"===e.nodeName.toLowerCase()),this.controls()?this.addClass("vjs-controls-enabled"):this.addClass("vjs-controls-disabled"),this.el_.setAttribute("role","region"),this.isAudio()?this.el_.setAttribute("aria-label",this.localize("Audio Player")):this.el_.setAttribute("aria-label",this.localize("Video Player")),this.isAudio()&&this.addClass("vjs-audio"),t.spatialNavigation&&t.spatialNavigation.enabled&&(this.spatialNavigation=new zi(this),this.addClass("vjs-spatial-navigation-enabled")),ue&&this.addClass("vjs-touch-enabled"),he||this.addClass("vjs-workinghover"),Es.players[this.id_]=this;const r=k.split(".")[0];this.addClass(`vjs-v${r}`),this.userActive(!0),this.reportUserActivity(),this.one("play",(e=>this.listenForUserActivity_(e))),this.on("keydown",(e=>this.handleKeyDown(e))),this.on("languagechange",(e=>this.handleLanguagechange(e))),this.breakpoints(this.options_.breakpoints),this.responsive(this.options_.responsive),this.on("ready",(()=>{this.audioPosterMode(this.options_.audioPosterMode),this.audioOnlyMode(this.options_.audioOnlyMode)}))}dispose(){this.trigger("dispose"),this.off("dispose"),ct(a(),this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_),ct(a(),"ke
2ydown",this.boundFullWindowOnEscKey_),this.styleEl_&&this.styleEl_.parentNode&&(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null),Es.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),Pi.hasOwnProperty(this.id())&&delete Pi[this.id()],xi.names.forEach((e=>{const t=this[xi[e].getterName]();t&&t.off&&t.off()})),super.dispose({restoreEl:this.options_.restoreEl})}createEl(){let e,t=this.tag,i=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");const n="video-js"===this.tag.tagName.toLowerCase();i?e=this.el_=t.parentNode:n||(e=this.el_=super.createEl("div"));const r=xe(t);if(n){for(e=this.el_=t,t=this.tag=a().createElement("video");e.children.length;)t.appendChild(e.firstChild);Se(e,"video-js")||ke(e,"video-js"),e.appendChild(t),i=this.playerElIngest_=e,Object.keys(e).forEach((i=>{try{t[i]=e[i]}catch(e){}}))}t.setAttribute("tabindex","-1"),r.tabindex="-1",Y&&ne&&(t.setAttribute("role","application"),r.role="application"),t.removeAttribute("width"),t.removeAttribute("height"),"width"in r&&delete r.width,"height"in r&&delete r.height,Object.getOwnPropertyNames(r).forEach((function(i){n&&"class"===i||e.setAttribute(i,r[i]),n&&t.setAttribute(i,r[i])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=e.player=this,this.addClass("vjs-paused");const o=["IS_SMART_TV","IS_TIZEN","IS_WEBOS","IS_ANDROID","IS_IPAD","IS_IPHONE","IS_CHROMECAST_RECEIVER"].filter((e=>pe[e])).map((e=>"vjs-device-"+e.substring(3).toLowerCase().replace(/\_/g,"-")));if(this.addClass(...o),!0!==s().VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Je("vjs-styles-dimensions");const e=He(".vjs-styles-defaults"),t=He("head");t.insertBefore(this.styleEl_,e?e.nextSibling:t.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);const l=t.getElementsByTagName("a");for(let e=0;e<l.length;e++){const t=l.item(e);ke(t,"vjs-hidden"),t.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!i&&t.parentNode.insertBefore(e,t),Te(t,e),this.children_.unshift(t),this.el_.setAttribute("lang",this.language_),this.el_.setAttribute("translate","no"),this.el_=e,e}crossOrigin(e){if(void 0===e)return this.techGet_("crossOrigin");null===e||"anonymous"===e||"use-credentials"===e?(this.techCall_("setCrossOrigin",e),this.posterImage&&this.posterImage.crossOrigin(e)):L.warn(`crossOrigin must be null,  "anonymous" or "use-credentials", given "${e}"`)}width(e){return this.dimension("width",e)}height(e){return this.dimension("height",e)}dimension(e,t){const i=e+"_";if(void 0===t)return this[i]||0;if(""===t||"auto"===t)return this[i]=void 0,void this.updateStyleEl_();const n=parseFloat(t);isNaN(n)?L.error(`Improper value "${t}" supplied for for ${e}`):(this[i]=n,this.updateStyleEl_())}fluid(e){if(void 0===e)return!!this.fluid_;var t,i;this.fluid_=!!e,kt(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_),e?(this.addClass("vjs-fluid"),this.fill(!1),i=()=>{this.on(["playerreset","resize"],this.boundUpdateStyleEl_)},kt(t=this)?i():(t.eventedCallbacks||(t.eventedCallbacks=[]),t.eventedCallbacks.push(i))):this.removeClass("vjs-fluid"),this.updateStyleEl_()}fill(e){if(void 0===e)return!!this.fill_;this.fill_=!!e,e?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")}aspectRatio(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_()}updateStyleEl_(){if(!0===s().VIDEOJS_NO_DYNAMIC_STYLE){const e="number"==typeof this.width_?this.width_:this.options_.width,t="number"==typeof this.height_?this.height_:this.options_.height,i=this.tech_&&this.tech_.el();return void(i&&(e>=0&&(i.width=e),t>=0&&(i.height=t)))}let e,t,i,n;i=void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9";const r=i.split(":"),a=r[1]/r[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/a:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*a,n=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(n),Ze(this.styleEl_,`\n      .${n}
2 {\n        width: ${e}px;\n        height: ${t}px;\n      }\n\n      .${n}.vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: ${100*a}%;\n      }\n    `)}loadTech_(e,t){this.tech_&&this.unloadTech_();const i=jt(e),n=e.charAt(0).toLowerCase()+e.slice(1);"Html5"!==i&&this.tag&&(Ii.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=i,this.isReady_=!1;let s=this.autoplay();("string"==typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)&&(s=!1);const r={source:t,autoplay:s,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:`${this.id()}_${n}_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};xi.names.forEach((e=>{const t=xi[e];r[t.getterName]=this[t.privateName]})),Object.assign(r,this.options_[i]),Object.assign(r,this.options_[n]),Object.assign(r,this.options_[e.toLowerCase()]),this.tag&&(r.tag=this.tag),t&&t.src===this.cache_.src&&this.cache_.currentTime>0&&(r.startTime=this.cache_.currentTime);const a=Ii.getTech(e);if(!a)throw new Error(`No Tech named '${i}' exists! '${i}' should be registered using videojs.registerTech()'`);var o,l;this.tech_=new a(r),this.tech_.ready(mt(this,this.handleTechReady_),!0),o=this.textTracksJson_||[],l=this.tech_,o.forEach((function(e){const t=l.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((e=>t.addCue(e)))})),l.textTracks(),Ts.forEach((e=>{this.on(this.tech_,e,(t=>this[`handleTech${jt(e)}_`](t)))})),Object.keys(Ss).forEach((e=>{this.on(this.tech_,e,(t=>{0===this.tech_.playbackRate()&&this.tech_.seeking()?this.queuedCallbacks_.push({callback:this[`handleTech${Ss[e]}_`].bind(this),event:t}):this[`handleTech${Ss[e]}_`](t)}))})),this.on(this.tech_,"loadstart",(e=>this.handleTechLoadStart_(e))),this.on(this.tech_,"sourceset",(e=>this.handleTechSourceset_(e))),this.on(this.tech_,"waiting",(e=>this.handleTechWaiting_(e))),this.on(this.tech_,"ended",(e=>this.handleTechEnded_(e))),this.on(this.tech_,"seeking",(e=>this.handleTechSeeking_(e))),this.on(this.tech_,"play",(e=>this.handleTechPlay_(e))),this.on(this.tech_,"pause",(e=>this.handleTechPause_(e))),this.on(this.tech_,"durationchange",(e=>this.handleTechDurationChange_(e))),this.on(this.tech_,"fullscreenchange",((e,t)=>this.handleTechFullscreenChange_(e,t))),this.on(this.tech_,"fullscreenerror",((e,t)=>this.handleTechFullscreenError_(e,t))),this.on(this.tech_,"enterpictureinpicture",(e=>this.handleTechEnterPictureInPicture_(e))),this.on(this.tech_,"leavepictureinpicture",(e=>this.handleTechLeavePictureInPicture_(e))),this.on(this.tech_,"error",(e=>this.handleTechError_(e))),this.on(this.tech_,"posterchange",(e=>this.handleTechPosterChange_(e))),this.on(this.tech_,"textdata",(e=>this.handleTechTextData_(e))),this.on(this.tech_,"ratechange",(e=>this.handleTechRateChange_(e))),this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_),this.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===i&&this.tag||Te(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)}unloadTech_(){xi.names.forEach((e=>{const t=xi[e];this[t.privateName]=this[t.getterName]()})),this.textTracksJson_=function(e){const t=e.$$("track"),i=Array.prototype.map.call(t,(e=>e.track));return Array.prototype.map.call(t,(function(e){const t=Jt(e.track);return e.src&&(t.src=e.src),t})).concat(Array.prototype.filter.call(e.textTracks(),(function(e){return-1===i.indexOf(e)})).map(Jt))}(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1,this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange")),this.isPosterFromTech_=!1}tech(e){return void 0===e&&L.warn("Using the tech directly can be dangerous. I hope you know 
2what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"),this.tech_}version(){return{"video.js":k}}addTechControlsListeners_(){this.removeTechControlsListeners_(),this.on(this.tech_,"click",this.boundHandleTechClick_),this.on(this.tech_,"dblclick",this.boundHandleTechDoubleClick_),this.on(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.on(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.on(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.on(this.tech_,"tap",this.boundHandleTechTap_)}removeTechControlsListeners_(){this.off(this.tech_,"tap",this.boundHandleTechTap_),this.off(this.tech_,"touchstart",this.boundHandleTechTouchStart_),this.off(this.tech_,"touchmove",this.boundHandleTechTouchMove_),this.off(this.tech_,"touchend",this.boundHandleTechTouchEnd_),this.off(this.tech_,"click",this.boundHandleTechClick_),this.off(this.tech_,"dblclick",this.boundHandleTechDoubleClick_)}handleTechReady_(){this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_()}handleTechLoadStart_(){this.removeClass("vjs-ended","vjs-seeking"),this.error(null),this.handleTechDurationChange_(),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):this.trigger("loadstart"),this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())}manualAutoplay_(e){if(!this.tech_||"string"!=typeof e)return;const t=()=>{const e=this.muted();this.muted(!0);const t=()=>{this.muted(e)};this.playTerminatedQueue_.push(t);const i=this.play();if(Xt(i))return i.catch((e=>{throw t(),new Error(`Rejection at manualAutoplay. Restoring muted value. ${e||""}`)}))};let i;return"any"!==e||this.muted()?i="muted"!==e||this.muted()?this.play():t():(i=this.play(),Xt(i)&&(i=i.catch(t))),Xt(i)?i.then((()=>{this.trigger({type:"autoplay-success",autoplay:e})})).catch((()=>{this.trigger({type:"autoplay-failure",autoplay:e})})):void 0}updateSourceCaches_(e=""){let t=e,i="";"string"!=typeof t&&(t=e.src,i=e.type),this.cache_.source=this.cache_.source||{},this.cache_.sources=this.cache_.sources||[],t&&!i&&(i=((e,t)=>{if(!t)return"";if(e.cache_.source.src===t&&e.cache_.source.type)return e.cache_.source.type;const i=e.cache_.sources.filter((e=>e.src===t));if(i.length)return i[0].type;const n=e.$$("source");for(let e=0;e<n.length;e++){const i=n[e];if(i.type&&i.src&&i.src===t)return i.type}return Fi(t)})(this,t)),this.cache_.source=F({},e,{src:t,type:i});const n=this.cache_.sources.filter((e=>e.src&&e.src===t)),s=[],r=this.$$("source"),a=[];for(let e=0;e<r.length;e++){const i=xe(r[e]);s.push(i),i.src&&i.src===t&&a.push(i.src)}a.length&&!n.length?this.cache_.sources=s:n.length||(this.cache_.sources=[this.cache_.source]),this.cache_.src=t}handleTechSourceset_(e){if(!this.changingSrc_){let t=e=>this.updateSourceCaches_(e);const i=this.currentSource().src,n=e.src;i&&!/^blob:/.test(i)&&/^blob:/.test(n)&&(!this.lastSource_||this.lastSource_.tech!==n&&this.lastSource_.player!==i)&&(t=()=>{}),t(n),e.src||this.tech_.any(["sourceset","loadstart"],(e=>{if("sourceset"===e.type)return;const t=this.techGet_("currentSrc");this.lastSource_.tech=t,this.updateSourceCaches_(t)}))}this.lastSource_={player:this.currentSource().src,tech:e.src},this.trigger({src:e.src,type:"sourceset"})}hasStarted(e){if(void 0===e)return this.hasStarted_;e!==this.hasStarted_&&(this.hasStarted_=e,this.hasStarted_?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))}handleTechPlay_(){this.removeClass("vjs-ended","vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")}handleTechRateChange_(){this.tech_.playbackRate()>0&&0===this.cache_.lastPlaybackRate&&(this.queuedCallbacks_.forEach((e=>e.callback(e.event))),this.queuedCallbacks_=[]),this.cache_.lastPlaybackRate=this.tech_.playbackRate(),this.trigger("ratechange")}handleTechWaiting_(){this.addClass("vjs-waiting"),this.trigger("waiting");const e=this.currentTime(),t=()=>{e!==this.currentTime()&&(this.removeClass("vjs-waiting"),this.off("timeupdate",t))};this.on("timeupdate",t)}handleTechCanPlay_(){this.removeClass("vjs-waiting"),this.trigger("canplay")}handleTechCanPlayThrough_(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")}handleTechPlaying_(){this.removeClass("vjs-waiting"),this.trigger("playing")}handleTechSeeking_(){this.addClass("vjs-seeking"),this.trigger("seeking")}
vendor: 8,550 bytes, line 2
2handleTechSeeked_(){this.removeClass("vjs-seeking","vjs-ended"),this.trigger("seeked")}handleTechPause_(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")}handleTechEnded_(){this.addClass("vjs-ended"),this.removeClass("vjs-waiting"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")}handleTechDurationChange_(){this.duration(this.techGet_("duration"))}handleTechClick_(e){this.controls_&&(void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click||(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"==typeof this.options_.userActions.click?this.options_.userActions.click.call(this,e):this.paused()?Yt(this.play()):this.pause()))}handleTechDoubleClick_(e){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),(t=>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.isInPictureInPicture()&&!a().pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))}handleTechTap_(){this.userActive(!this.userActive())}handleTechTouchStart_(){this.userWasActive=this.userActive()}handleTechTouchMove_(){this.userWasActive&&this.reportUserActivity()}handleTechTouchEnd_(e){e.cancelable&&e.preventDefault()}toggleFullscreenClass_(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")}documentFullscreenChange_(e){const t=e.target.player;if(t&&t!==this)return;const i=this.el();let n=a()[this.fsApi_.fullscreenElement]===i;!n&&i.matches&&(n=i.matches(":"+this.fsApi_.fullscreen)),this.isFullscreen(n)}handleTechFullscreenChange_(e,t){t&&(t.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",(()=>{this.removeClass("vjs-ios-native-fs")}))),this.isFullscreen(t.isFullscreen))}handleTechFullscreenError_(e,t){this.trigger("fullscreenerror",t)}togglePictureInPictureClass_(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")}handleTechEnterPictureInPicture_(e){this.isInPictureInPicture(!0)}handleTechLeavePictureInPicture_(e){this.isInPictureInPicture(!1)}handleTechError_(){const e=this.tech_.error();e&&this.error(e)}handleTechTextData_(){let e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)}getCache(){return this.cache_}resetCache_(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout,duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}}techCall_(e,t){this.ready((function(){if(e in ji)return function(e,t,i,n){return t[i](e.reduce(Ni(i),n))}(this.middleware_,this.tech_,e,t);if(e in Ri)return Mi(this.middleware_,this.tech_,e,t);try{this.tech_&&this.tech_[e](t)}catch(e){throw L(e),e}}),!0)}techGet_(e){if(this.tech_&&this.tech_.isReady_){if(e in Di)return function(e,t,i){return e.reduceRight(Ni(i),t[i]())}(this.middleware_,this.tech_,e);if(e in Ri)return Mi(this.middleware_,this.tech_,e);try{return this.tech_[e]()}catch(t){if(void 0===this.tech_[e])throw L(`Video.js: ${e} method not defined for ${this.techName_} playback technology.`,t),t;if("TypeError"===t.name)throw L(`Video.js: ${e} unavailable on ${this.techName_} playback technology element.`,t),this.tech_.isReady_=!1,t;throw L(t),t}}}play(){return new Promise((e=>{this.play_(e)}))}play_(e=Yt){this.playCallbacks_.push(e);const t=Boolean(!this.changingSrc_&&(this.src()||this.currentSrc())),i=Boolean(de||he);if(this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null),!this.isReady_||!t)return this.waitToPlay_=e=>{this.play_()},this.one(["ready","loadstart"],this.waitToPlay_),void(!t&&i&&this.load());const n=this.techGet_("play");i&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===n?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(n)}runPlayTerminatedQueue_(){const e=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[],e.forEach((function(e){e()}))}runPlayCallbacks_(e){const t=this.playCallbacks_.slice(0);this.playCallbacks_=[],this.playTerminatedQueue_=[],t.forEach((function(t){t(e)}))}pause(){this.techCall_("pause")}paused(){return!1!==this.techGet_("paused")}played(){return this.techGet_("played")||Vt(0,0)}scrubbing(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")}currentTime(e){return void 0===e?(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime):(e<0&&(e=0),this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",e),this.cache_.initTime=0,void(isFinite(e)&&(this.cache_.currentTime=Number(e)))):(this.cache_.initTime=e,this.off("canplay",this.boundApplyInitTime_),void this.one("canplay",this.boundApplyInitTime_)))}applyInitTime_(){this.currentTime(this.cache_.initTime)}duration(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,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(e)||this.trigger("durationchange"))}remainingTime(){return this.duration()-this.currentTime()}remainingTimeDisplay(){return Math.floor(this.duration())-Math.floor(this.currentTime())}buffered(){let e=this.techGet_("buffered");return e&&e.length||(e=Vt(0,0)),e}seekable(){let e=this.techGet_("seekable");return e&&e.length||(e=Vt(0,0)),e}seeking(){return this.techGet_("seeking")}ended(){return this.techGet_("ended")}networkState(){return this.techGet_("networkState")}readyState(){return this.techGet_("readyState")}bufferedPercent(){return Kt(this.buffered(),this.duration())}bufferedEnd(){const e=this.buffered(),t=this.duration();let i=e.end(e.length-1);return i>t&&(i=t),i}volume(e){let t;return void 0!==e?(t=Math.max(0,Math.min(1,e)),this.cache_.volume=t,this.techCall_("setVolume",t),void(t>0&&this.lastVolume_(t))):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)}muted(e){if(void 0===e)return this.techGet_("muted")||!1;this.techCall_("setMuted",e)}defaultMuted(e){return void 0!==e&&this.techCall_("setDefaultMuted",e),this.techGet_("defaultMuted")||!1}lastVolume_(e){if(void 0===e||0===e)return this.cache_.lastVolume;this.cache_.lastVolume=e}supportsFullScreen(){return this.techGet_("supportsFullScreen")||!1}isFullscreen(e){if(void 0!==e){const t=this.isFullscreen_;return this.isFullscreen_=Boolean(e),this.isFullscreen_!==t&&this.fsApi_.prefixed&&this.trigger("fullscreenchange"),void this.toggleFullscreenClass_()}return this.isFullscreen_}requestFullscreen(e){this.isInPictureInPicture()&&this.exitPictureInPicture();const t=this;return new Promise(((i,n)=>{function s(){t.off("fullscreenerror",a),t.off("fullscreenchange",r)}function r(){s(),i()}function a(e,t){s(),n(t)}t.one("fullscreenchange",r),t.one("fullscreenerror",a);const o=t.requestFullscreenHelper_(e);o&&(o.then(s,s),o.then(i,n))}))}requestFullscreenHelper_(e){let t;if(this.fsApi_.prefixed||(t=this.options_.fullscreen&&this.options_.fullscreen.options||{},void 0!==e&&(t=e)),this.fsApi_.requestFullscreen){const e=this.el_[this.fsApi_.requestFullscreen](t);return e&&e.then((()=>this.isFullscreen(!0)),(()=>this.isFullscreen(!1))),e}this.tech_.supportsFullScreen()&&1==!this.options_.preferFullWindow?this.techCall_("enterFullScreen"):this.enterFullWindow()}exitFullscreen(){const e=this;return new Promise(((t,i)=>{function n(){e.off("fullscreenerror",r),e.off("fullscreenchange",s)}function s(){n(),t()}function r(e,t){n(),i(t)}e.one("fullscreenchange",s),e.one("fullscreenerror",r);const a=e.exitFullscreenHelper_();a&&(a.then(n,n),a.then(t,i))}))}exitFullscreenHelper_(){if(this.fsApi_.requestFullscreen){const e=a()[this.fsApi_.exitFullscreen]();return e&&Yt(e.then((()=>this.isFullscreen(!1)))),e}this.tech_.supportsFullScreen()&&1==!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()}enterFullWindow(){this.isFullscreen(!0),this.isFullWindow=!0,this.docOrigOverflow=a().documentElement.style.overflow,ut(a(),"ke
2ydown",this.boundFullWindowOnEscKey_),a().documentElement.style.overflow="hidden",ke(a().body,"vjs-full-window"),this.trigger("enterFullWindow")}fullWindowOnEscKey(e){"Escape"===e.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())}exitFullWindow(){this.isFullscreen(!1),this.isFullWindow=!1,ct(a(),"keydown",this.boundFullWindowOnEscKey_),a().documentElement.style.overflow=this.docOrigOverflow,we(a().body,"vjs-full-window"),this.trigger("exitFullWindow")}disablePictureInPicture(e){if(void 0===e)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture",e),this.options_.disablePictureInPicture=e,this.trigger("disablepictureinpicturechanged")}isInPictureInPicture(e){return void 0!==e?(this.isInPictureInPicture_=!!e,void this.togglePictureInPictureClass_()):!!this.isInPictureInPicture_}requestPictureInPicture(){if(this.options_.enableDocumentPictureInPicture&&s().documentPictureInPicture){const e=a().createElement(this.el().tagName);return e.classList=this.el().classList,e.classList.add("vjs-pip-container"),this.posterImage&&e.appendChild(this.posterImage.el().cloneNode(!0)),this.titleBar&&e.appendChild(this.titleBar.el().cloneNode(!0)),e.appendChild(ve("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture"))),s().documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then((t=>(ze(t),this.el_.parentNode.insertBefore(e,this.el_),t.document.body.appendChild(this.el_),t.document.body.classList.add("vjs-pip-window"),this.player_.isInPictureInPicture(!0),this.player_.trigger({type:"enterpictureinpicture",pipWindow:t}),t.addEventListener("pagehide",(t=>{const i=t.target.querySelector(".video-js");e.parentNode.replaceChild(i,e),this.player_.isInPictureInPicture(!1),this.player_.trigger("leavepictureinpicture")})),t)))}return"pictureInPictureEnabled"in a()&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")}exitPictureInPicture(){return s().documentPictureInPicture&&s().documentPictureInPicture.window?(s().documentPictureInPicture.window.close(),Promise.resolve()):"pictureInPictureEnabled"in a()?a().exitPictureInPicture():void 0}handleKeyDown(e){const{userActions:t}=this.options_;t&&t.hotkeys&&((e=>{const t=e.tagName.toLowerCase();return!!e.isContentEditable||("input"===t?-1===["button","checkbox","hidden","radio","reset","submit"].indexOf(e.type):-1!==["textarea"].indexOf(t))})(this.el_.ownerDocument.activeElement)||("function"==typeof t.hotkeys?t.hotkeys.call(this,e):this.handleHotkeys(e)))}handleHotkeys(e){const t=this.options_.userActions?this.options_.userActions.hotkeys:{},{fullscreenKey:i=(t=>"f"===e.key.toLowerCase()),muteKey:n=(t=>"m"===e.key.toLowerCase()),playPauseKey:s=(t=>"k"===e.key.toLowerCase()||" "===e.key.toLowerCase())}=t;if(i.call(this,e)){e.preventDefault(),e.stopPropagation();const t=Ut.getComponent("FullscreenToggle");!1!==a()[this.fsApi_.fullscreenEnabled]&&t.prototype.handleClick.call(this,e)}else n.call(this,e)?(e.preventDefault(),e.stopPropagation(),Ut.getComponent("MuteToggle").prototype.handleClick.call(this,e)):s.call(this,e)&&(e.preventDefault(),e.stopPropagation(),Ut.getComponent("PlayToggle").prototype.handleClick.call(this,e))}canPlayType(e){let t;for(let i=0,n=this.options_.techOrder;i<n.length;i++){const s=n[i];let r=Ii.getTech(s);if(r||(r=Ut.getComponent(s)),r){if(r.isSupported()&&(t=r.canPlayType(e),t))return t}else L.error(`The "${s}" tech is undefined. Skipped browser support check for that tech.`)}return""}selectSource(e){const t=this.options_.techOrder.map((e=>[e,Ii.getTech(e)])).filter((([e,t])=>t?t.isSupported():(L.error(`The "${e}" tech is undefined. Skipped browser support check for that tech.`),!1))),i=function(e,t,i){let n;return e.some((e=>t.some((t=>{if(n=i(e,t),n)return!0})))),n};let n;const s=([e,t],i)=>{if(t.canPlaySource(i,this.options_[e.toLowerCase()]))return{source:i,tech:e}};var r;return n=this.options_.sourceOrder?i(e,t,(r=s,(e,t)=>r(t,e))):i(t,e,s),n||!1}handleSrc_(e,t){if(void 0===e)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();const i=Vi(e);if(i.length){if(this.changingSrc_=!0,t||(this.cache_.sources=i),this.updateSourceCaches_(i[0]),Li(this,i[0],((e,n)=>{if(this.middleware_=n,t||(this.cache_.sources=i),this.updateSourceCaches_(e),this.src_(e))return i.length>1?this.handleSrc_(i.slice(1)):(this.changingSrc_=!1,this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0),void this.triggerReady());var s,r;
vendor: 4,148 bytes, line 2
2s=n,r=this.tech_,s.forEach((e=>e.setTech&&e.setTech(r)))})),i.length>1){const e=()=>{this.error(null),this.handleSrc_(i.slice(1),!0)},t=()=>{this.off("error",e)};this.one("error",e),this.one("playing",t),this.resetRetryOnError_=()=>{this.off("error",e),this.off("playing",t)}}}else this.setTimeout((function(){this.error({code:4,message:this.options_.notSupportedMessage})}),0)}src(e){return this.handleSrc_(e,!1)}src_(e){const t=this.selectSource([e]);return!t||(Rt(t.tech,this.techName_)?(this.ready((function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),this.changingSrc_=!1}),!0),!1):(this.changingSrc_=!0,this.loadTech_(t.tech,t.source),this.tech_.ready((()=>{this.changingSrc_=!1})),!1))}addSourceElement(e,t){return!!this.tech_&&this.tech_.addSourceElement(e,t)}removeSourceElement(e){return!!this.tech_&&this.tech_.removeSourceElement(e)}load(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")}reset(){this.paused()?this.doReset_():Yt(this.play().then((()=>this.doReset_())))}doReset_(){this.tech_&&this.tech_.clearTracks("text"),this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.resetCache_(),this.poster(""),this.loadTech_(this.options_.techOrder[0],null),this.techCall_("reset"),this.resetControlBarUI_(),this.error(null),this.titleBar&&this.titleBar.update({title:void 0,description:void 0}),kt(this)&&this.trigger("playerreset")}resetControlBarUI_(){this.resetProgressBar_(),this.resetPlaybackRate_(),this.resetVolumeBar_()}resetProgressBar_(){this.currentTime(0);const{currentTimeDisplay:e,durationDisplay:t,progressControl:i,remainingTimeDisplay:n}=this.controlBar||{},{seekBar:s}=i||{};e&&e.updateContent(),t&&t.updateContent(),n&&n.updateContent(),s&&(s.update(),s.loadProgressBar&&s.loadProgressBar.update())}resetPlaybackRate_(){this.playbackRate(this.defaultPlaybackRate()),this.handleTechRateChange_()}resetVolumeBar_(){this.volume(1),this.trigger("volumechange")}currentSources(){const e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t}currentSource(){return this.cache_.source||{}}currentSrc(){return this.currentSource()&&this.currentSource().src||""}currentType(){return this.currentSource()&&this.currentSource().type||""}preload(e){return void 0!==e?(this.techCall_("setPreload",e),void(this.options_.preload=e)):this.techGet_("preload")}autoplay(e){if(void 0===e)return this.options_.autoplay||!1;let t;"string"==typeof e&&/(any|play|muted)/.test(e)||!0===e&&this.options_.normalizeAutoplay?(this.options_.autoplay=e,this.manualAutoplay_("string"==typeof e?e:"play"),t=!1):this.options_.autoplay=!!e,t=void 0===t?this.options_.autoplay:t,this.tech_&&this.techCall_("setAutoplay",t)}playsinline(e){return void 0!==e&&(this.techCall_("setPlaysinline",e),this.options_.playsinline=e),this.techGet_("playsinline")}loop(e){return void 0!==e?(this.techCall_("setLoop",e),void(this.options_.loop=e)):this.techGet_("loop")}poster(e){if(void 0===e)return this.poster_;e||(e=""),e!==this.poster_&&(this.poster_=e,this.techCall_("setPoster",e),this.isPosterFromTech_=!1,this.trigger("posterchange"))}handleTechPosterChange_(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){const e=this.tech_.poster()||"";e!==this.poster_&&(this.poster_=e,this.isPosterFromTech_=!0,this.trigger("posterchange"))}}controls(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_()))}usingNativeControls(e){if(void 0===e)return!!this.usingNativeControls_;e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,this.usingNativeControls_?(this.addClass("vjs-using-native-control
2s"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))}error(e){if(void 0===e)return this.error_||null;if(C("beforeerror").forEach((t=>{const i=t(this,e);U(i)&&!Array.isArray(i)||"string"==typeof i||"number"==typeof i||null===i?e=i:this.log.error("please return a value that MediaError expects in beforeerror hooks")})),this.options_.suppressNotSupportedError&&e&&4===e.code){const 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_=null,this.removeClass("vjs-error"),void(this.errorDisplay&&this.errorDisplay.close());this.error_=new Qt(e),this.addClass("vjs-error"),L.error(`(CODE:${this.error_.code} ${Qt.errorTypes[this.error_.code]})`,this.error_.message,this.error_),this.trigger("error"),C("error").forEach((e=>e(this,this.error_)))}reportUserActivity(e){this.userActivity_=!0}userActive(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")}}listenForUserActivity_(){let e,t,i;const n=mt(this,this.reportUserActivity),s=function(t){n(),this.clearInterval(e)};this.on("mousedown",(function(){n(),this.clearInterval(e),e=this.setInterval(n,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())})),this.on("mouseup",s),this.on("mouseleave",s);const r=this.getChild("controlBar");let a;!r||he||G||(r.on("mouseenter",(function(e){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout),this.player().options_.inactivityTimeout=0})),r.on("mouseleave",(function(e){this.player().options_.inactivityTimeout=this.player().cache_.inactivityTimeout}))),this.on("keydown",n),this.on("keyup",n),this.setInterval((function(){if(!this.userActivity_)return;this.userActivity_=!1,this.userActive(!0),this.clearTimeout(a);const e=this.options_.inactivityTimeout;e<=0||(a=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}),250)}playbackRate(e){if(void 0===e)return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate||this.techGet_("playbackRate"):1;this.techCall_("setPlaybackRate",e)}defaultPlaybackRate(e){return void 0!==e?this.techCall_("setDefaultPlaybackRate",e):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1}isAudio(e){if(void 0===e)return!!this.isAudio_;this.isAudio_=!!e}updatePlayerHeightOnAudioOnlyMode_(){const e=this.getChild("ControlBar");e&&this.audioOnlyCache_.controlBarHeight!==e.currentHeight()&&(this.audioOnlyCache_.controlBarHeight=e.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))}enableAudioOnlyUI_(){this.addClass("vjs-audio-only-mode");const e=this.children(),t=this.getChild("ControlBar"),i=t&&t.currentHeight();e.forEach((e=>{e!==t&&e.el_&&!e.hasClass("vjs-hidden")&&(e.hide(),this.audioOnlyCache_.hiddenChildren.push(e))})),this.audioOnlyCache_.playerHeight=this.currentHeight(),this.audioOnlyCache_.controlBarHeight=i,this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.height(i),this.trigger("audioonlymodechange")}disableAudioOnlyUI_(){this.removeClass("vjs-audio-only-mode"),this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_),this.audioOnlyCache_.hiddenChildren.forEach((e=>e.show())),this.height(this.audioOnlyCache_.playerHeight),this.trigger("audioonlymodechange")}audioOnlyMode(e){if("boolean"!=typeof e||e===this.audioOnlyMode_)return this.audioOnlyMode_;if(this.audioOnlyMode_=e,e){const e=[];return this.isInPictureInPicture()&&e.push(this.exitPictureInPicture()),this.isFullscreen()&&e.push(this.exitFullscreen()),this.audioPosterMode()&&e.push(this.audioPosterMode(!1)),Promise.all(e).then((()=>this.enableAudioOnlyUI_()))}return Promise.resolve().then((()=>this.disableAudioOnlyUI_()))}enablePosterModeUI_(){(this.tech_&&this.tech_).hide(),this.addClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}disablePosterModeUI_(){(this.tech_&&this.tech_).show(),this.removeClass("vjs-audio-poster-mode"),this.trigger("audiopostermodechange")}audioPosterMode(e){return"boolean"!=typeof e||e===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=e,e?this.audioOnlyMode()?this.audioOnlyMode(!1).then((()=>{this.enablePosterModeUI_()})):Promise.resolve().then((()=>{this.enablePosterModeUI_()})):Promise.resolve().then((()=>{this.disablePosterModeUI_()})))}addTextTrack(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)}addRemoteTextTrack(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)}removeRemoteTextTrack(e={}){let{track:t}=e;if(t||(t=e),this.tech_)return this.tech_.removeRemoteTextTrack(t)}getVideoPlaybackQuality(){return this.techGet_("getVideoPlaybackQuality")}videoWidth(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0}videoHeight(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0}language(e){if(void 0===e)return this.language_;this.language_!==String(e).toLowerCase()&&(this.language_=String(e).toLowerCase(),kt(this)&&this.trigger("languagechange"))}languages(){return F(Es.prototype.options_.languages,this.languages_)}toJSON(){const e=F(this.options_),t=e.tracks;e.tracks=[];for(let i=0;i<t.length;i++){let n=t[i];n=F(n),n.player=void 0,e.tracks[i]=n}return e}createModal(e,t){(t=t||{}).content=e||"";const i=new ti(this,t);return this.addChild(i),i.on("dispose",(()=>{this.removeChild(i)})),i.open(),i}updateCurrentBreakpoint_(){if(!this.responsive())return;const e=this.currentBreakpoint(),t=this.currentWidth();for(let i=0;i<ks.length;i++){const n=ks[i];
vendor: 6,849 bytes, line 2
2if(t<=this.breakpoints_[n]){if(e===n)return;e&&this.removeClass(ws[e]),this.addClass(ws[n]),this.breakpoint_=n;break}}}removeCurrentBreakpoint_(){const e=this.currentBreakpointClass();this.breakpoint_="",e&&this.removeClass(e)}breakpoints(e){return void 0===e||(this.breakpoint_="",this.breakpoints_=Object.assign({},Cs,e),this.updateCurrentBreakpoint_()),Object.assign(this.breakpoints_)}responsive(e){return void 0===e?this.responsive_:(e=Boolean(e))!==this.responsive_?(this.responsive_=e,e?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize",this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),e):void 0}currentBreakpoint(){return this.breakpoint_}currentBreakpointClass(){return ws[this.breakpoint_]||""}loadMedia(e,t){if(!e||"object"!=typeof e)return;const i=this.crossOrigin();this.reset(),this.cache_.media=F(e);const{artist:n,artwork:s,description:r,poster:a,src:o,textTracks:l,title:u}=this.cache_.media;!s&&a&&(this.cache_.media.artwork=[{src:a,type:Fi(a)}]),i&&this.crossOrigin(i),o&&this.src(o),a&&this.poster(a),Array.isArray(l)&&l.forEach((e=>this.addRemoteTextTrack(e,!1))),this.titleBar&&this.titleBar.update({title:u,description:r||n||""}),this.ready(t)}getMedia(){if(!this.cache_.media){const e=this.poster(),t={src:this.currentSources(),textTracks:Array.prototype.map.call(this.remoteTextTracks(),(e=>({kind:e.kind,label:e.label,language:e.language,src:e.src})))};return e&&(t.poster=e,t.artwork=[{src:t.poster,type:Fi(t.poster)}]),t}return F(this.cache_.media)}static getTagSettings(e){const t={sources:[],tracks:[]},i=xe(e),n=i["data-setup"];if(Se(e,"vjs-fill")&&(i.fill=!0),Se(e,"vjs-fluid")&&(i.fluid=!0),null!==n)try{Object.assign(i,JSON.parse(n||"{}"))}catch(e){L.error("data-setup",e)}if(Object.assign(t,i),e.hasChildNodes()){const i=e.childNodes;for(let e=0,n=i.length;e<n;e++){const n=i[e],s=n.nodeName.toLowerCase();"source"===s?t.sources.push(xe(n)):"track"===s&&t.tracks.push(xe(n))}}return t}debug(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)}playbackRates(e){if(void 0===e)return this.cache_.playbackRates;Array.isArray(e)&&e.every((e=>"number"==typeof e))&&(this.cache_.playbackRates=e,this.trigger("playbackrateschange"))}}Es.prototype.videoTracks=()=>{},Es.prototype.audioTracks=()=>{},Es.prototype.textTracks=()=>{},Es.prototype.remoteTextTracks=()=>{},Es.prototype.remoteTextTrackEls=()=>{},xi.names.forEach((function(e){const t=xi[e];Es.prototype[t.getterName]=function(){return this.tech_?this.tech_[t.getterName]():(this[t.privateName]=this[t.privateName]||new t.ListClass,this[t.privateName])}})),Es.prototype.crossorigin=Es.prototype.crossOrigin,Es.players={};const xs=s().navigator;Es.prototype.options_={techOrder:Ii.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2e3,playbackRates:[],liveui:!1,children:["mediaLoader","posterImage","titleBar","textTrackDisplay","loadingSpinner","bigPlayButton","liveTracker","controlBar","errorDisplay","textTrackSettings","resizeManager"],language:xs&&(xs.languages&&xs.languages[0]||xs.userLanguage||xs.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media.",normalizeAutoplay:!1,fullscreen:{options:{navigationUI:"hide"}},breakpoints:{},responsive:!1,audioOnlyMode:!1,audioPosterMode:!1,spatialNavigation:{enabled:!1,horizontalSeek:!1},enableSmoothSeeking:!1,disableSeekWhileScrubbingOnMobile:!1,disableSeekWhileScrubbingOnSTV:!1},Ts.forEach((function(e){Es.prototype[`handleTech${jt(e)}_`]=function(){return this.trigger(e)}})),Ut.registerComponent("Player",Es);const Is="plugin",Os="activePlugins_",Ps={},As=e=>Ps.hasOwnProperty(e),Ls=e=>As(e)?Ps[e]:void 0,Ms=(e,t)=>{e[Os]=e[Os]||{},e[Os][t]=!0},Ds=(e,t,i)=>{const n=(i?"before":"")+"pluginsetup";e.trigger(n,t),e.trigger(n+":"+t.name,t)},js=(e,t)=>(t.prototype.name=e,function(...i){Ds(this,{name:e,plugin:t,instance:null},!0);const n=new t(...[this,...i]);return this[e]=()=>n,Ds(this,n.getEventHash()),n});class Rs{constructor(e){if(this.constructor===Rs)throw new Error("Plugin must be sub-classed; not directly instantiated.");this.player=e,this.log||(this.log=this.player.log.createLogger(this.name)),At(this),delete this.trigger,Mt(this,this.constructor.defaultState),Ms(e,this.name),this.dispose=this.dispose.bind(this),e.on("dispose",this.dispose)}version(){return this.constructor.VERSION}getEventHash(e={}){return e.name=this.name,e.plugin=this.constructor,e.instance=this,e}trigger(e,t={}){return ht(this.eventBusEl_,e,this.getEventHash(t))}handleStateChanged(e){}dispose(){const{name:e,player:t}=this;this.trigger("dispose"),this.off(),t.off("dispose",this.dispose),t[Os][e]=!1,this.player=this.state=null,t[e]=js(e,Ps[e])}static isBasic(e){const t="string"==typeof e?Ls(e):e;return"function"==typeof t&&!Rs.prototype.isPrototypeOf(t.prototype)}static registerPlugin(e,t){if("string"!=typeof e)throw new Error(`Illegal plugin name, "${e}", must be a string, was ${typeof e}.`);if(As(e))L.warn(`A plugin named "${e}" already exists. You may want to avoid re-registering plugins!`);else if(Es.prototype.hasOwnProperty(e))throw new Error(`Illegal plugin name, "${e}", cannot share a name with an existing player method!`);if("function"!=typeof t)throw new Error(`Illegal plugin for "${e}", must be a function, was ${typeof t}.`);return Ps[e]=t,e!==Is&&(Rs.isBasic(t)?Es.prototype[e]=function(e,t){const i=function(){Ds(this,{name:e,plugin:t,instance:null},!0);const i=t.apply(this,arguments);return Ms(this,e),Ds(this,{name:e,plugin:t,instance:i}),i};return Object.keys(t).forEach((function(e){i[e]=t[e]})),i}(e,t):Es.prototype[e]=js(e,t)),t}static deregisterPlugin(e){if(e===Is)throw new Error("Cannot de-register base plugin.");As(e)&&(delete Ps[e],delete Es.prototype[e])}static getPlugins(e=Object.keys(Ps)){let t;return e.forEach((e=>{const i=Ls(e);i&&(t=t||{},t[e]=i)})),t}static getPluginVersion(e){const t=Ls(e);return t&&t.VERSION||""}}function Ns(e,t,i,n){return function(e,t){let i=!1;return function(...n){return i||L.warn(e),i=!0,t.apply(this,n)}}(`${t} is deprecated and will be removed in ${e}.0; please use ${i} instead.`,n)}Rs.getPlugin=Ls,Rs.BASE_PLUGIN_NAME=Is,Rs.registerPlugin(Is,Rs),Es.prototype.usingPlugin=function(e){return!!this[Os]&&!0===this[Os][e]},Es.prototype.hasPlugin=function(e){return!!As(e)};const Us=e=>0===e.indexOf("#")?e.slice(1):e;function Bs(e,t,i){let n=Bs.getPlayer(e);if(n)return t&&L.warn(`Player "${e}" is already initialised. Options will not be applied.`),i&&n.ready(i),n;const r="string"==typeof e?He("#"+Us(e)):e;if(!me(r))throw new TypeError("The element or ID supplied is not val
2id. (videojs)");const a="getRootNode"in r&&r.getRootNode()instanceof s().ShadowRoot?r.getRootNode():r.ownerDocument.body;r.ownerDocument.defaultView&&a.contains(r)||L.warn("The element supplied is not included in the DOM"),!0===(t=t||{}).restoreEl&&(t.restoreEl=(r.parentNode&&r.parentNode.hasAttribute&&r.parentNode.hasAttribute("data-vjs-player")?r.parentNode:r).cloneNode(!0)),C("beforesetup").forEach((e=>{const i=e(r,F(t));U(i)&&!Array.isArray(i)?t=F(t,i):L.error("please return an object in beforesetup hooks")}));const o=Ut.getComponent("Player");return n=new o(r,t,i),C("setup").forEach((e=>e(n))),n}if(Bs.hooks_=w,Bs.hooks=C,Bs.hook=function(e,t){C(e,t)},Bs.hookOnce=function(e,t){C(e,[].concat(t).map((t=>{const i=(...n)=>(E(e,i),t(...n));return i})))},Bs.removeHook=E,!0!==s().VIDEOJS_NO_DYNAMIC_STYLE&&ge()){let e=He(".vjs-styles-defaults");if(!e){e=Je("vjs-styles-defaults");const t=He("head");t&&t.insertBefore(e,t.firstChild),Ze(e,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid:not(.vjs-audio-only-mode) {\n        padding-top: 56.25%\n      }\n    ")}}Xe(1,Bs),Bs.VERSION=k,Bs.options=Es.prototype.options_,Bs.getPlayers=()=>Es.players,Bs.getPlayer=e=>{const t=Es.players;let i;if("string"==typeof e){const n=Us(e),s=t[n];if(s)return s;i=He("#"+n)}else i=e;if(me(i)){const{player:e,playerId:n}=i;if(e||t[n])return e||t[n]}},Bs.getAllPlayers=()=>Object.keys(Es.players).map((e=>Es.players[e])).filter(Boolean),Bs.players=Es.players,Bs.getComponent=Ut.getComponent,Bs.registerComponent=(e,t)=>(Ii.isTech(t)&&L.warn(`The ${e} tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)`),Ut.registerComponent.call(Ut,e,t)),Bs.getTech=Ii.getTech,Bs.registerTech=Ii.registerTech,Bs.use=function(e,t){Oi[e]=Oi[e]||[],Oi[e].push(t)},Object.defineProperty(Bs,"middleware",{value:{},writeable:!1,enumerable:!0}),Object.defineProperty(Bs.middleware,"TERMINATOR",{value:Ai,writeable:!1,enumerable:!0}),Bs.browser=pe,Bs.obj=q,Bs.mergeOptions=Ns(9,"videojs.mergeOptions","videojs.obj.merge",F),Bs.defineLazyProperty=Ns(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",H),Bs.bind=Ns(9,"videojs.bind","native Function.prototype.bind",mt),Bs.registerPlugin=Rs.registerPlugin,Bs.deregisterPlugin=Rs.deregisterPlugin,Bs.plugin=(e,t)=>(L.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead"),Rs.registerPlugin(e,t)),Bs.getPlugins=Rs.getPlugins,Bs.getPlugin=Rs.getPlugin,Bs.getPluginVersion=Rs.getPluginVersion,Bs.addLanguage=function(e,t){return e=(""+e).toLowerCase(),Bs.options.languages=F(Bs.options.languages,{[e]:t}),Bs.options.languages[e]},Bs.log=L,Bs.createLogger=M,Bs.time=Gt,Bs.createTimeRange=Ns(9,"videojs.createTimeRange","videojs.time.createTimeRanges",Vt),Bs.createTimeRanges=Ns(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",Vt),Bs.formatTime=Ns(9,"videojs.formatTime","videojs.time.formatTime",Wt),Bs.setFormatTime=Ns(9,"videojs.setFormatTime","videojs.time.setFormatTime",$t),Bs.resetFormatTime=Ns(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",zt),Bs.parseUrl=Ns(9,"videojs.parseUrl","videojs.url.parseUrl",fi),Bs.isCrossOrigin=Ns(9,"videojs.isCrossOrigin","videojs.url.isCrossOrigin",yi),Bs.EventTarget=Tt,Bs.any=pt,Bs.on=ut,Bs.one=dt,Bs.off=ct,Bs.trigger=ht,Bs.xhr=l(),Bs.TrackList=ii,Bs.TextTrack=Ti,Bs.TextTrackList=oi,Bs.AudioTrack=Si,Bs.AudioTrackList=si,Bs.VideoTrack=ki,Bs.VideoTrackList=ai,["isEl","isTextNode","createEl","hasClass","addClass","removeClass","toggleClass","setAttributes","getAttributes","emptyEl","appendContent","insertContent"].forEach((e=>{Bs[e]=function(){return L.warn(`videojs.${e}() is deprecated; use videojs.dom.${e}() instead`),We[e].apply(null,arguments)}})),Bs.computedStyle=Ns(9,"videojs.computedStyle","videojs.dom.computedStyle",$e),Bs.dom=We,Bs.fn=vt,Bs.num=cn,Bs.str=Nt,Bs.url=_i,Bs.Error={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror",StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};class Fs{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(e){t.enabled_(e)}}),t}}class Vs extends Bs.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new Fs(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}Vs.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const e in Vs.prototype.allowedEvents_)Vs.prototype["on"+e]=null;var Hs="4.1.0";const qs=function(e){return function(e,t){const i=e.qualityLevels,n=new Vs,s=function(){n.dispose(),e.qualityLevels=i,e.off("dispose",s)};return e.on("dispose",s),e.qualityLevels=()=>n,e.qualityLevels.VERSION=Hs,n}(this,Bs.obj.merge({},e))};Bs.registerPlugin("qualityLevels",qs),qs.VERSION=Hs;const $s=d.Z,zs=(e,t)=>t&&t.responseURL&&e!==t.responseURL?t.responseURL:e,Ws=e=>Bs.log.debug?Bs.log.debug.bind(Bs,"VHS:",`${e} >`):function(){};function Gs(...e){const t=Bs.obj||Bs;return(t.merge||t.mergeOptions).apply(t,e)}function Ks(...e){const t=Bs.time||Bs;return(t.createTimeRanges||t.createTimeRanges).apply(t,e)}const Qs=1/30,Xs=.1,Ys=function(e,t){const i=[];let n;if(e&&e.length)for(n=0;n<e.length;n++)t(e.start(n),e.end(n))&&i.push([e.start(n),e.end(n)]);return Ks(i)},Js=function(e,t){return Ys(e,(function(e,i){return e-Xs<=t&&i+Xs>=t}))},Zs=function(e,t){return Ys(e,(function(e){return e-Qs>=t}))},er=e=>{const t=[];if(!e||!e.length)return"";for(let i=0;i<e.length;i++)t.push(e.start(i)+" => "+e.end(i));return t.join(", ")},tr=e=>{const t=[];for(let i=0;i<e.length;i++)t.push({start:e.start(i),end:e.end(i)});return t},ir=function(e){if(e&&e.length&&e.end)return e.end(e.length-1)},nr=function(e,t){let i=0;if(!e||!e.length)return i;for(let n=0;n<e.length;n++){const s=e.start(n),r=e.end(n);t>r||(i+=t>s&&t<=r?r-t:r-s)}return i},sr=(e,t)=>
vendor: 4,288 bytes, line 2
2{if(!t.preload)return t.duration;let i=0;return(t.parts||[]).forEach((function(e){i+=e.duration})),(t.preloadHints||[]).forEach((function(t){"PART"===t.type&&(i+=e.partTargetDuration)})),i},rr=e=>(e.segments||[]).reduce(((e,t,i)=>(t.parts?t.parts.forEach((function(n,s){e.push({duration:n.duration,segmentIndex:i,partIndex:s,part:n,segment:t})})):e.push({duration:t.duration,segmentIndex:i,partIndex:null,segment:t,part:null}),e)),[]),ar=e=>{const t=e.segments&&e.segments.length&&e.segments[e.segments.length-1];return t&&t.parts||[]},or=({preloadSegment:e})=>{if(!e)return;const{parts:t,preloadHints:i}=e;let n=(i||[]).reduce(((e,t)=>e+("PART"===t.type?1:0)),0);return n+=t&&t.length?t.length:0,n},lr=(e,t)=>{if(t.endList)return 0;if(e&&e.suggestedPresentationDelay)return e.suggestedPresentationDelay;const i=ar(t).length>0;return i&&t.serverControl&&t.serverControl.partHoldBack?t.serverControl.partHoldBack:i&&t.partTargetDuration?3*t.partTargetDuration:t.serverControl&&t.serverControl.holdBack?t.serverControl.holdBack:t.targetDuration?3*t.targetDuration:0},ur=function(e,t,i){if(void 0===t&&(t=e.mediaSequence+e.segments.length),t<e.mediaSequence)return 0;const n=function(e,t){let i=0,n=t-e.mediaSequence,s=e.segments[n];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(;n--;){if(s=e.segments[n],void 0!==s.end)return{result:i+s.end,precise:!0};if(i+=sr(e,s),void 0!==s.start)return{result:i+s.start,precise:!0}}return{result:i,precise:!1}}(e,t);if(n.precise)return n.result;const s=function(e,t){let i,n=0,s=t-e.mediaSequence;for(;s<e.segments.length;s++){if(i=e.segments[s],void 0!==i.start)return{result:i.start-n,precise:!0};if(n+=sr(e,i),void 0!==i.end)return{result:i.end-n,precise:!0}}return{result:-1,precise:!1}}(e,t);return s.precise?s.result:n.result+i},cr=function(e,t,i){if(!e)return 0;if("number"!=typeof i&&(i=0),void 0===t){if(e.totalDuration)return e.totalDuration;if(!e.endList)return s()[1/0]}return ur(e,t,i)},hr=function({defaultDuration:e,durationList:t,startIndex:i,endIndex:n}){let s=0;if(i>n&&([i,n]=[n,i]),i<0){for(let t=i;t<Math.min(0,n);t++)s+=e;i=0}for(let e=i;e<n;e++)s+=t[e].duration;return s},dr=function(e,t,i,n){if(!e||!e.segments)return null;if(e.endList)return cr(e);if(null===t)return null;t=t||0;let s=ur(e,e.mediaSequence+e.segments.length,t);return i&&(s-=n="number"==typeof n?n:lr(null,e)),Math.max(0,s)},pr=function(e){return e.excludeUntil&&e.excludeUntil>Date.now()},fr=function(e){return e.excludeUntil&&e.excludeUntil===1/0},gr=function(e){const t=pr(e);return!e.disabled&&!t},mr=function(e,t){return t.attributes&&t.attributes[e]},yr=(e,t)=>{if(1===e.playlists.length)return!0;const i=t.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===e.playlists.filter((e=>!!gr(e)&&(e.attributes.BANDWIDTH||0)<i)).length},_r=(e,t)=>!(!e&&!t||!e&&t||e&&!t||e!==t&&(!e.id||!t.id||e.id!==t.id)&&(!e.resolvedUri||!t.resolvedUri||e.resolvedUri!==t.resolvedUri)&&(!e.uri||!t.uri||e.uri!==t.uri)),vr=function(e,t){const i=e&&e.mediaGroups&&e.mediaGroups.AUDIO||{};let n=!1;for(const e in i){for(const s in i[e])if(n=t(i[e][s]),n)break;if(n)break}return!!n},br=e=>{if(!e||!e.playlists||!e.playlists.length)return vr(e,(e=>e.playlists&&e.playlists.length||e.uri));for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t],n=i.attributes&&i.attributes.CODECS;if((!n||!n.split(",").every((e=>(0,f.KL)(e))))&&!vr(e,(e=>_r(i,e))))return!1}return!0};var Tr={liveEdgeDelay:lr,duration:cr,seekable:function(e,t,i){const n=t||0;let s=dr(e,t,!0,i);return null===s?Ks():(s<n&&(s=n),Ks(n,s))},getMediaInfoForTime:function({playlist:e,currentTime:t,startingSegmentIndex:i,startingPartIndex:n,startTime:s,exactManifestTimings:r}){let a=t-s;const o=rr(e);let l=0;for(let e=0;e<o.length;e++){const t=o[e];if(i===t.segmentIndex&&("number"!=typeof n||"number"!=typeof t.partIndex||n===t.partIndex)){l=e;break}}if(a<0){if(l>0)for(let t=l-1;t>=0;t--){const i=o[t];if(a+=i.duration,r){if(a<0)continue}else if(a+Qs<=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:s-hr({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t}}if(l<0){for(let i=l;i<0;
vendor: 1,046 bytes, line 2
2i++)if(a-=e.targetDuration,a<0)return{partIndex:o[0]&&o[0].partIndex||null,segmentIndex:o[0]&&o[0].segmentIndex||0,startTime:t};l=0}for(let t=l;t<o.length;t++){const i=o[t];a-=i.duration;const n=i.duration>Qs;if(0!==a&&!(n&&a+Qs>=0)||t===o.length-1){if(r){if(a>0)continue}else if(a-Qs>=0)continue;return{partIndex:i.partIndex,segmentIndex:i.segmentIndex,startTime:s+hr({defaultDuration:e.targetDuration,durationList:o,startIndex:l,endIndex:t})}}}return{segmentIndex:o[o.length-1].segmentIndex,partIndex:o[o.length-1].partIndex,startTime:t}},isEnabled:gr,isDisabled:function(e){return e.disabled},isExcluded:pr,isIncompatible:fr,playlistEnd:dr,isAes:function(e){for(let t=0;t<e.segments.length;t++)if(e.segments[t].key)return!0;return!1},hasAttribute:mr,estimateSegmentRequestTime:function(e,t,i,n=0){return mr("BANDWIDTH",i)?(e*i.attributes.BANDWIDTH-8*n)/t:NaN},isLowestEnabledRendition:yr,isAudioOnly:br,playlistMatch:_r,segmentDurationWithParts:sr};const{log:Sr}=Bs,kr=(e,t)=>`${e}-${t}`,wr=(e,t,i)=>`placeholder-uri-${e}-${t}-${i}`,Cr=(e,t)=>
vendor: 6,904 bytes, line 2
2{e.mediaGroups&&["AUDIO","SUBTITLES"].forEach((i=>{if(e.mediaGroups[i])for(const n in e.mediaGroups[i])for(const s in e.mediaGroups[i][n]){const r=e.mediaGroups[i][n][s];t(r,i,n,s)}}))},Er=({playlist:e,uri:t,id:i})=>{e.id=i,e.playlistErrors_=0,t&&(e.uri=t),e.attributes=e.attributes||{}},xr=(e,t,i=wr)=>{e.uri=t;for(let t=0;t<e.playlists.length;t++)if(!e.playlists[t].uri){const i=`placeholder-uri-${t}`;e.playlists[t].uri=i}const n=br(e);Cr(e,((t,s,r,a)=>{if(!t.playlists||!t.playlists.length){if(n&&"AUDIO"===s&&!t.uri)for(let t=0;t<e.playlists.length;t++){const i=e.playlists[t];if(i.attributes&&i.attributes.AUDIO&&i.attributes.AUDIO===r)return}t.playlists=[(0,h.Z)({},t)]}t.playlists.forEach((function(t,n){const o=i(s,r,a,t),l=kr(n,o);t.uri?t.resolvedUri=t.resolvedUri||$s(e.uri,t.uri):(t.uri=0===n?o:l,t.resolvedUri=t.uri),t.id=t.id||l,t.attributes=t.attributes||{},e.playlists[t.id]=t,e.playlists[t.uri]=t}))})),(e=>{let t=e.playlists.length;for(;t--;){const i=e.playlists[t];Er({playlist:i,id:kr(t,i.uri)}),i.resolvedUri=$s(e.uri,i.uri),e.playlists[i.id]=i,e.playlists[i.uri]=i,i.attributes.BANDWIDTH||Sr.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}})(e),(e=>{Cr(e,(t=>{t.uri&&(t.resolvedUri=$s(e.uri,t.uri))}))})(e)};class Ir{constructor(){this.offset_=null,this.pendingDateRanges_=new Map,this.processedDateRanges_=new Map}setOffset(e=[]){if(null!==this.offset_)return;if(!e.length)return;const[t]=e;void 0!==t.programDateTime&&(this.offset_=t.programDateTime/1e3)}setPendingDateRanges(e=[]){if(!e.length)return;const[t]=e,i=t.startDate.getTime();this.trimProcessedDateRanges_(i),this.pendingDateRanges_=e.reduce(((e,t)=>(e.set(t.id,t),e)),new Map)}processDateRange(e){this.pendingDateRanges_.delete(e.id),this.processedDateRanges_.set(e.id,e)}getDateRangesToProcess(){if(null===this.offset_)return[];const e={},t=[];this.pendingDateRanges_.forEach(((i,n)=>{if(!this.processedDateRanges_.has(n)&&(i.startTime=i.startDate.getTime()/1e3-this.offset_,i.processDateRange=()=>this.processDateRange(i),t.push(i),i.class))if(e[i.class]){const t=e[i.class].push(i);i.classListIndex=t-1}else e[i.class]=[i],i.classListIndex=0}));for(const i of t){const t=e[i.class]||[];i.endDate?i.endTime=i.endDate.getTime()/1e3-this.offset_:i.endOnNext&&t[i.classListIndex+1]?i.endTime=t[i.classListIndex+1].startTime:i.duration?i.endTime=i.startTime+i.duration:i.plannedDuration?i.endTime=i.startTime+i.plannedDuration:i.endTime=i.startTime}return t}trimProcessedDateRanges_(e){new Map(this.processedDateRanges_).forEach(((t,i)=>{t.startDate.getTime()<e&&this.processedDateRanges_.delete(i)}))}}const Or=({requestType:e,request:t,error:i,parseFailure:n})=>{const s=t.status<200||t.status>299,r=t.status>=400&&t.status<=499,a={uri:t.uri,requestType:e},o=s&&!r||n;if(i&&r)a.error=(0,h.Z)({},i),a.errorType=Bs.Error.NetworkRequestFailed;else if(t.aborted)a.errorType=Bs.Error.NetworkRequestAborted;else if(t.timedout)a.errorType=Bs.Error.NetworkRequestTimeout;else if(o){const e=n?Bs.Error.NetworkBodyParserFailed:Bs.Error.NetworkBadStatus;a.errorType=e,a.status=t.status,a.headers=t.headers}return a},Pr=Ws("CodecUtils"),Ar=function(e){const t=e.attributes||{};if(t.CODECS)return(0,f.kS)(t.CODECS)},Lr=(e,t)=>{const i=t.attributes||{};return e&&e.mediaGroups&&e.mediaGroups.AUDIO&&i.AUDIO&&e.mediaGroups.AUDIO[i.AUDIO]},Mr=function(e){const t={};return e.forEach((({mediaType:e,type:i,details:n})=>{t[e]=t[e]||[],t[e].push((0,f.ws)(`${i}${n}`))})),Object.keys(t).forEach((function(e){if(t[e].length>1)return Pr(`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},Dr=function(e){let t=0;return e.audio&&t++,e.video&&t++,t},jr=function(e,t){const i=t.attributes||{},n=Mr(Ar(t)||[]);if(Lr(e,t)&&!n.audio&&!((e,t)=>{if(!Lr(e,t))return!0;const i=t.attributes||{},n=e.mediaGroups.AUDIO[i.AUDIO];for(const e in n)if(!n[e].uri&&!n[e].playlists)return!0;return!1})(e,t)){const t=Mr((0,f.Jg)(e,i.AUDIO)||[]);t.audio&&(n.audio=t.audio)}return n},{EventTarget:Rr}=Bs,Nr=(e,t)=>{if(!e)return t;const i=Gs(e,t);if(e.preloadHints&&!t.preloadHints&&delete i.preloadHints,e.parts&&!t.parts)delete i.parts;else if(e.parts&&t.parts)for(let n=0;n<t.parts.length;n++)e.parts&&e.parts[n]&&(i.parts[n]=Gs(e.parts[n],t.parts[n]));return!e.skipped&&t.skipped&&(i.skipped=!1),e.preload&&!t.preload&&(i.preload=!1),i},Ur=(e,t)=>{!e.resolvedUri&&e.uri&&(e.resolvedUri=$s(t,e.uri)),e.key&&!e.key.resolvedUri&&(e.key.resolvedUri=$s(t,e.key.uri)),e.map&&!e.map.resolvedUri&&(e.map.resolvedUri=$s(t,e.map.uri)),e.map&&e.map.key&&!e.map.key.resolvedUri&&(e.map.key.resolvedUri=$s(t,e.map.key.uri)),e.parts&&e.parts.length&&e.parts.forEach((e=>{e.resolvedUri||(e.resolvedUri=$s(t,e.uri))})),e.preloadHints&&e.preloadHints.length&&e.preloadHints.forEach((e=>{e.resolvedUri||(e.resolvedUri=$s(t,e.uri))}))},Br=function(e){const t=e.segments||[],i=e.preloadSegment;if(i&&i.parts&&i.parts.length){if(i.preloadHints)for(let e=0;e<i.preloadHints.length;e++)if("MAP"===i.preloadHints[e].type)return t;i.duration=e.targetDuration,i.preload=!0,t.push(i)}return t},Fr=(e,t)=>e===t||e.segments&&t.segments&&e.segments.length===t.segments.length&&e.endList===t.endList&&e.mediaSequence===t.mediaSequence&&e.preloadSegment===t.preloadSegment,Vr=(e,t,i=Fr)=>{const n=Gs(e,{}),s=n.playlists[t.id];if(!s)return null;if(i(s,t))return null;t.segments=Br(t);const r=Gs(s,t);if(r.preloadSegment&&!t.preloadSegment&&delete r.preloadSegment,s.segments){if(t.skip){t.segments=t.segments||[];for(let e=0;e<t.skip.skippedSegments;e++)t.segments.unshift({skipped:!0})}r.segments=((e,t,i)=>{const n=e.slice(),s=t.slice();i=i||0;const r=[];let a;for(let e=0;e<s.length;e++){const t=n[e+i],o=s[e];t?(a=t.map||a,r.push(Nr(t,o))):(a&&!o.map&&(o.map=a),r.push(o))}return r})(s.segments,t.segments,t.mediaSequence-s.mediaSequence)}r.segments.forEach((e=>{Ur(e,r.resolvedUri)}));for(let e=0;e<n.playlists.length;e++)n.playlists[e].id===t.id&&(n.playlists[e]=r);return n.playlists[t.id]=r,n.playlists[t.uri]=r,Cr(e,((e,i,n,s)=>{if(e.playlists)for(let i=0;i<e.playlists.length;i++)t.id===e.playlists[i].id&&(e.playlists[i]=r)})),n},Hr=(e,t)=>{const i=e.segments||[],n=i[i.length-1],s=n&&n.parts&&n.parts[n.parts.length-1],r=s&&s.duration||n&&n.duration;return t&&r?1e3*r:500*(e.partTargetDuration||e.targetDuration||10)},qr=(e,t,i)=>{if(!e)return;const n=[];return e.forEach((e=>{if(!e.attributes)return;const{BANDWIDTH:t,RESOLUTION:i,CODECS:s}=e.attributes;n.push({id:e.id,bandwidth:t,resolution:i,codecs:s})})),{type:t,isLive:i,renditions:n}};class $r extends Rr{constructor(e,t,i={}){if(super(),!e)throw new Error("A non-empty playlist URL or object is required");this.logger_=Ws("PlaylistLoader");const{withCredentials:n=!1}=i;this.src=e,this.vhs_=t,this.withCredentials=n,this.addDateRangesToTextTrack_=i.addD
vendor: 6,115 bytes, line 2
2ateRangesToTextTrack;const s=t.options_;this.customTagParsers=s&&s.customTagParsers||[],this.customTagMappers=s&&s.customTagMappers||[],this.llhls=s&&s.llhls,this.dateRangesStorage_=new Ir,this.state="HAVE_NOTHING",this.handleMediaupdatetimeout_=this.handleMediaupdatetimeout_.bind(this),this.on("mediaupdatetimeout",this.handleMediaupdatetimeout_),this.on("loadedplaylist",this.handleLoadedPlaylist_.bind(this))}handleLoadedPlaylist_(){const e=this.media();if(!e)return;this.dateRangesStorage_.setOffset(e.segments),this.dateRangesStorage_.setPendingDateRanges(e.dateRanges);const t=this.dateRangesStorage_.getDateRangesToProcess();t.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(t)}handleMediaupdatetimeout_(){if("HAVE_METADATA"!==this.state)return;const e=this.media();let t=$s(this.main.uri,e.uri);this.llhls&&(t=((e,t)=>{if(t.endList||!t.serverControl)return e;const i={};if(t.serverControl.canBlockReload){const{preloadSegment:e}=t;let n=t.mediaSequence+t.segments.length;if(e){const s=e.parts||[],r=or(t)-1;r>-1&&r!==s.length-1&&(i._HLS_part=r),(r>-1||s.length)&&n--}i._HLS_msn=n}if(t.serverControl&&t.serverControl.canSkipUntil&&(i._HLS_skip=t.serverControl.canSkipDateranges?"v2":"YES"),Object.keys(i).length){const t=new(s().URL)(e);["_HLS_skip","_HLS_msn","_HLS_part"].forEach((function(e){i.hasOwnProperty(e)&&t.searchParams.set(e,i[e])})),e=t.toString()}return e})(t,e)),this.state="HAVE_CURRENT_METADATA",this.request=this.vhs_.xhr({uri:t,withCredentials:this.withCredentials,requestType:"hls-playlist"},((e,t)=>{if(this.request)return e?this.playlistRequestError(this.request,this.media(),"HAVE_METADATA"):void this.haveMetadata({playlistString:this.request.responseText,url:this.media().uri,id:this.media().id})}))}playlistRequestError(e,t,i){const{uri:n,id:s}=t;this.request=null,i&&(this.state=i),this.error={playlist:this.main.playlists[s],status:e.status,message:`HLS playlist request error at URL: ${n}.`,responseText:e.responseText,code:e.status>=500?4:2,metadata:Or({requestType:e.requestType,request:e,error:e.error})},this.trigger("error")}parseManifest_({url:e,manifestString:t}){try{const i=(({onwarn:e,oninfo:t,manifestString:i,customTagParsers:n=[],customTagMappers:s=[],llhls:r})=>{const a=new p._b;e&&a.on("warn",e),t&&a.on("info",t),n.forEach((e=>a.addParser(e))),s.forEach((e=>a.addTagMapper(e))),a.push(i),a.end();const o=a.manifest;if(r||(["preloadSegment","skip","serverControl","renditionReports","partInf","partTargetDuration"].forEach((function(e){o.hasOwnProperty(e)&&delete o[e]})),o.segments&&o.segments.forEach((function(e){["parts","preloadHints"].forEach((function(t){e.hasOwnProperty(t)&&delete e[t]}))}))),!o.targetDuration){let t=10;o.segments&&o.segments.length&&(t=o.segments.reduce(((e,t)=>Math.max(e,t.duration)),0)),e&&e({message:`manifest has no targetDuration defaulting to ${t}`}),o.targetDuration=t}const l=ar(o);if(l.length&&!o.partTargetDuration){const t=l.reduce(((e,t)=>Math.max(e,t.duration)),0);e&&(e({message:`manifest has no partTargetDuration defaulting to ${t}`}),Sr.error("LL-HLS manifest has parts but lacks required #EXT-X-PART-INF:PART-TARGET value. See https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-09#section-4.4.3.7. Playback is not guaranteed.")),o.partTargetDuration=t}return o})({onwarn:({message:t})=>this.logger_(`m3u8-parser warn for ${e}: ${t}`),oninfo:({message:t})=>this.logger_(`m3u8-parser info for ${e}: ${t}`),manifestString:t,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls});return i.playlists&&i.playlists.length?(this.excludeAudioOnlyVariants(i.playlists),i):i}catch(e){this.error=e,this.error.metadata={errorType:Bs.Error.StreamingHlsPlaylistParserError,error:e}}}excludeAudioOnlyVariants(e){const t=e=>{const t=e.attributes||{},{width:i,height:n}=t.RESOLUTION||{};if(i&&n)return!0;const s=Ar(e)||[],r=Mr(s);return Boolean(r.video)};e.some(t)&&e.forEach((e=>{t(e)||(e.excludeUntil=1/0)}))}haveMetadata({playlistString:e,playlistObject:t,url:i,id:n}){this.request=null,this.state="HAVE_METADATA";const s={playlistInfo:{type:"media",uri:i}};this.trigger({type:"playlistparsestart",metadata:s});const r=t||this.parseManifest_({url:i,manifestString:e});r.lastRequest=Date.now(),Er({playlist:r,uri:i,id:n});const a=Vr(this.main,r);this.targetDuration=r.partTargetDuration||r.targetDuration,this.pendingMedia_=null,a?(this.main=a,this.media_=this.main.playlists[n]):this.trigger("playlistunchanged"),this.updateMediaUpdateTimeout_(Hr(this.media(),!!a)),s.parsedPlaylist=qr(this.main.playlists,s.playlistInfo.type,!this.media_.endList),this.trigger({type:"playlistparsecomplete",metadata:s}),this.trigger("loadedplaylist")}dispose(){this.trigger("dispose"),this.stopRequest(),s().clearTimeout(this.mediaUpdateTimeout),s().clearTimeout(this.finalRenditionTimeout),this.dateRangesStorage_=new Ir,this.off()}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e,t){if(!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.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.main.playlists[e]}if(s().clearTimeout(this.finalRenditionTimeout),t){const t=(e.partTargetDuration||e.targetDuration)/2*1e3||5e3;return void(this.finalRenditionTimeout=s().setTimeout(this.media.bind(this,e,!1),t))}const i=this.state,n=!this.media_||e.id!==this.media_.id,r=this.main.playlists[e.id];if(r&&r.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(n&&(this.trigger("mediachanging"),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")));if(this.updateMediaUpdateTimeout_(Hr(e,!0)),!n)return;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.pendingMedia_=e;
2const a={playlistInfo:{type:"media",uri:e.uri}};this.trigger({type:"playlistrequeststart",metadata:a}),this.request=this.vhs_.xhr({uri:e.resolvedUri,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,n)=>{if(this.request){if(e.lastRequest=Date.now(),e.resolvedUri=zs(e.resolvedUri,n),t)return this.playlistRequestError(this.request,e,i);this.trigger({type:"playlistrequestcomplete",metadata:a}),this.haveMetadata({playlistString:n.responseText,url:e.uri,id:e.id}),"HAVE_MAIN_MANIFEST"===i?this.trigger("loadedmetadata"):this.trigger("mediachange")}}))}pause(){this.mediaUpdateTimeout&&(s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.stopRequest(),"HAVE_NOTHING"===this.state&&(this.started=!1),"SWITCHING_MEDIA"===this.state?this.media_?this.state="HAVE_METADATA":this.state="HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")}load(e){this.mediaUpdateTimeout&&(s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);const t=this.media();if(e){const e=t?(t.partTargetDuration||t.targetDuration)/2*1e3:5e3;this.mediaUpdateTimeout=s().setTimeout((()=>{this.mediaUpdateTimeout=null,this.load()}),e)}else this.started?t&&!t.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()}updateMediaUpdateTimeout_(e){this.mediaUpdateTimeout&&(s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null),this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=s().setTimeout((()=>{this.mediaUpdateTimeout=null,this.trigger("mediaupdatetimeout"),this.updateMediaUpdateTimeout_(e)}),e))}
vendor: 2,622 bytes, line 2
2start(){if(this.started=!0,"object"==typeof this.src)return this.src.uri||(this.src.uri=s().location.href),this.src.resolvedUri=this.src.uri,void setTimeout((()=>{this.setupInitialPlaylist(this.src)}),0);const e={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:e}),this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},((t,i)=>{if(!this.request)return;if(this.request=null,t)return this.error={status:i.status,message:`HLS playlist request error at URL: ${this.src}.`,responseText:i.responseText,code:2,metadata:Or({requestType:i.requestType,request:i,error:t})},"HAVE_NOTHING"===this.state&&(this.started=!1),this.trigger("error");this.trigger({type:"playlistrequestcomplete",metadata:e}),this.src=zs(this.src,i),this.trigger({type:"playlistparsestart",metadata:e});const n=this.parseManifest_({manifestString:i.responseText,url:this.src});e.parsedPlaylist=qr(n.playlists,e.playlistInfo.type,!1),this.trigger({type:"playlistparsecomplete",metadata:e}),this.setupInitialPlaylist(n)}))}srcUri(){return"string"==typeof this.src?this.src:this.src.uri}setupInitialPlaylist(e){if(this.state="HAVE_MAIN_MANIFEST",e.playlists)return this.main=e,xr(this.main,this.srcUri()),e.playlists.forEach((e=>{e.segments=Br(e),e.segments.forEach((t=>{Ur(t,e.resolvedUri)}))})),this.trigger("loadedplaylist"),void(this.request||this.media(this.main.playlists[0]));const t=this.srcUri()||s().location.href;this.main=((e,t)=>{const i=kr(0,t),n={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:s().location.href,resolvedUri:s().location.href,playlists:[{uri:t,id:i,resolvedUri:t,attributes:{}}]};return n.playlists[i]=n.playlists[0],n.playlists[t]=n.playlists[0],n})(0,t),this.haveMetadata({playlistObject:e,url:t,id:this.main.playlists[0].id}),this.trigger("loadedmetadata")}updateOrDeleteClone(e,t){const i=this.main,n=e.ID;let s=i.playlists.length;for(;s--;){const r=i.playlists[s];if(r.attributes["PATHWAY-ID"]===n){const a=r.resolvedUri,o=r.id;if(t){const t=this.createCloneURI_(r.resolvedUri,e),a=kr(n,t),o=this.createCloneAttributes_(n,r.attributes),l=this.createClonePlaylist_(r,a,e,o);i.playlists[s]=l,i.playlists[a]=l,i.playlists[t]=l}else i.playlists.splice(s,1);delete i.playlists[o],delete i.playlists[a]}}this.updateOrDeleteCloneMedia(e,t)}updateOrDeleteCloneMedia(e,t){const i=this.main,n=e.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{if(i.mediaGroups[e]&&i.mediaGroups[e][n])for(const t in i.mediaGroups[e])if(t===n){for(const n in i.mediaGroups[e][t])i.mediaGroups[e][t][n].playlists.forEac
vendor: 4,171 bytes, line 2
2h(((e,t)=>{const n=i.playlists[e.id],s=n.id,r=n.resolvedUri;delete i.playlists[s],delete i.playlists[r]}));delete i.mediaGroups[e][t]}})),t&&this.createClonedMediaGroups_(e)}addClonePathway(e,t={}){const i=this.main,n=i.playlists.length,s=this.createCloneURI_(t.resolvedUri,e),r=kr(e.ID,s),a=this.createCloneAttributes_(e.ID,t.attributes),o=this.createClonePlaylist_(t,r,e,a);i.playlists[n]=o,i.playlists[r]=o,i.playlists[s]=o,this.createClonedMediaGroups_(e)}createClonedMediaGroups_(e){const t=e.ID,i=e["BASE-ID"],n=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((s=>{if(n.mediaGroups[s]&&!n.mediaGroups[s][t])for(const r in n.mediaGroups[s])if(r===i){n.mediaGroups[s][t]={};for(const i in n.mediaGroups[s][r]){const a=n.mediaGroups[s][r][i];n.mediaGroups[s][t][i]=(0,h.Z)({},a);const o=n.mediaGroups[s][t][i],l=this.createCloneURI_(a.resolvedUri,e);o.resolvedUri=l,o.uri=l,o.playlists=[],a.playlists.forEach(((r,a)=>{const l=n.playlists[r.id],u=wr(s,t,i),c=kr(t,u);if(l&&!n.playlists[c]){const t=this.createClonePlaylist_(l,c,e),i=t.resolvedUri;n.playlists[c]=t,n.playlists[i]=t}o.playlists[a]=this.createClonePlaylist_(r,c,e)}))}}}))}createClonePlaylist_(e,t,i,n){const s=this.createCloneURI_(e.resolvedUri,i),r={resolvedUri:s,uri:s,id:t};return e.segments&&(r.segments=[]),n&&(r.attributes=n),Gs(e,r)}createCloneURI_(e,t){const i=new URL(e);i.hostname=t["URI-REPLACEMENT"].HOST;const n=t["URI-REPLACEMENT"].PARAMS;for(const e of Object.keys(n))i.searchParams.set(e,n[e]);return i.href}createCloneAttributes_(e,t){const i={"PATHWAY-ID":e};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((n=>{t[n]&&(i[n]=e)})),i}getKeyIdSet(e){const t=new Set;if(!e||!e.contentProtection)return t;for(const i in e.contentProtection)if(e.contentProtection[i]&&e.contentProtection[i].attributes&&e.contentProtection[i].attributes.keyId){const n=e.contentProtection[i].attributes.keyId;t.add(n.toLowerCase())}return t}}const zr=function(e,t,i,n){const s="arraybuffer"===e.responseType?e.response:e.responseText;!t&&s&&(e.responseTime=Date.now(),e.roundTripTime=e.responseTime-e.requestTime,e.bytesReceived=s.byteLength||s.length,e.bandwidth||(e.bandwidth=Math.floor(e.bytesReceived/e.roundTripTime*8*1e3))),i.headers&&(e.responseHeaders=i.headers),t&&"ETIMEDOUT"===t.code&&(e.timedout=!0),t||e.aborted||200===i.statusCode||206===i.statusCode||0===i.statusCode||(t=new Error("XHR Failed with a response of: "+(e&&(s||e.responseText)))),n(t,e)},Wr=function(){const e=function e(t,i){t=Gs({timeout:45e3},t);const n=e.beforeRequest||Bs.Vhs.xhr.beforeRequest,s=e._requestCallbackSet||Bs.Vhs.xhr._requestCallbackSet||new Set,r=e._responseCallbackSet||Bs.Vhs.xhr._responseCallbackSet;n&&"function"==typeof n&&(Bs.log.warn("beforeRequest is deprecated, use onRequest instead."),s.add(n));const a=!0===Bs.Vhs.xhr.original?Bs.xhr:Bs.Vhs.xhr,o=((e,t)=>{if(!e||!e.size)return;let i=t;return e.forEach((e=>{i=e(i)})),i})(s,t);s.delete(n);const l=a(o||t,(function(e,t){return((e,t,i,n)=>{e&&e.size&&e.forEach((e=>{e(t,i,n)}))})(r,l,e,t),zr(l,e,t,i)})),u=l.abort;return l.abort=function(){return l.aborted=!0,u.apply(l,arguments)},l.uri=t.uri,l.requestType=t.requestType,l.requestTime=Date.now(),l};return e.original=!0,e},Gr=function(e){const t={};return e.byterange&&(t.Range=function(e){let t;const i=e.offset;return t="bigint"==typeof e.offset||"bigint"==typeof e.length?s().BigInt(e.offset)+s().BigInt(e.length)-s().BigInt(1):e.offset+e.length-1,"bytes="+i+"-"+t}(e.byterange)),t},Kr=function(e,t){return e.start(t)+"-"+e.end(t)},Qr=function(e,t){const i=e.toString(16);return"00".substring(0,2-i.length)+i+(t%2?" ":"")},Xr=function(e){return e>=32&&e<126?String.fromCharCode(e):"."},Yr=function(e){const t={};return Object.keys(e).forEach((i=>{const n=e[i];(0,m.Au)(n)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t},Jr=function(e){const t=e.byterange||{length:1/0,offset:0};return[t.length,t.offset,e.resolvedUri].join(",")},Zr=function(e){return e.resolvedUri},ea=e=>{const t=Array.prototype.slice.call(e),i=16;let n,s,r="";for(let e=0;e<t.length/i;e++)n=t.slice(e*i,e*i+i).map(Qr).join(""),s=t.slice(e*i,e*i+i).map(Xr).join(""),r+=n+" "+s+"\
2n";return r};var ta=Object.freeze({__proto__:null,createTransferableMessage:Yr,initSegmentId:Jr,segmentKeyId:Zr,hexDump:ea,tagDump:({bytes:e})=>ea(e),textRanges:e=>{let t,i="";for(t=0;t<e.length;t++)i+=Kr(e,t)+" ";return i}});const ia=({programTime:e,playlist:t,retryCount:i=2,seekTo:n,pauseAfterSeek:s=!0,tech:r,callback:a})=>{if(!a)throw new Error("seekToProgramTime: callback must be provided");if(void 0===e||!t||!n)return a({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!t.endList&&!r.hasStarted_)return a({message:"player must be playing a live stream to start buffering"});if(!(e=>{if(!e.segments||0===e.segments.length)return!1;for(let t=0;t<e.segments.length;t++)if(!e.segments[t].dateTimeObject)return!1;return!0})(t))return a({message:"programDateTime tags must be provided in the manifest "+t.resolvedUri});const o=((e,t)=>{let i;try{i=new Date(e)}catch(e){return null}if(!t||!t.segments||0===t.segments.length)return null;let n=t.segments[0];if(i<new Date(n.dateTimeObject))return null;for(let e=0;e<t.segments.length-1&&(n=t.segments[e],!(i<new Date(t.segments[e+1].dateTimeObject)));e++);const s=t.segments[t.segments.length-1],r=s.dateTimeObject,a=s.videoTimingInfo?(o=s.videoTimingInfo).transmuxedPresentationEnd-o.transmuxedPresentationStart-o.transmuxerPrependedSeconds:s.duration+.25*s.duration;var o;return i>new Date(r.getTime()+1e3*a)?null:(i>new Date(r)&&(n=s),{segment:n,estimatedStart:n.videoTimingInfo?n.videoTimingInfo.transmuxedPresentationStart:Tr.duration(t,t.mediaSequence+t.segments.indexOf(n)),type:n.videoTimingInfo?"accurate":"estimate"})})(e,t);if(!o)return a({message:`${e} was not found in the stream`});const l=o.segment,u=((e,t)=>{let i,n;try{i=new Date(e),n=new Date(t)}catch(e){}const s=i.getTime();return(n.getTime()-s)/1e3})(l.dateTimeObject,e);if("estimate"===o.type)return 0===i?a({message:`${e} is not buffered yet. Try again`}):(n(o.estimatedStart+u),void r.one("seeked",(()=>{ia({programTime:e,playlist:t,retryCount:i-1,seekTo:n,pauseAfterSeek:s,tech:r,callback:a})})));const c=l.start+u;r.one("seeked",(()=>a(null,r.currentTime()))),s&&r.pause(),n(c)},na=(e,t)=>{if(4===e.readyState)return t()},{EventTarget:sa}=Bs,ra=function(e,t){if(!Fr(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(let i=0;i<e.segments.length;i++){const n=e.segments[i],s=t.segments[i];if(n.uri!==s.uri)return!1;if(!n.byterange&&!s.byterange)continue;const r=n.byterange,a=s.byterange;if(r&&!a||!r&&a)return!1;if(r.offset!==a.offset||r.length!==a.length)return!1}return!0},aa=(e,t,i,n)=>`placeholder-uri-${e}-${t}-${n.attributes.NAME||i}`,oa=(e,t)=>{const i={};for(const r in e){const a=e[r].sidx;if(a){const e=(0,y.mm)(a);if(!t[e])break;n=t[e].sidxInfo,s=a,(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&&(i[e]=t[e])}}var n,s;return i};class la extends sa{constructor(e,t,i={},n){super(),this.isPaused_=!0,this.mainPlaylistLoader_=n||this,n||(this.isMain_=!0);const{withCredentials:s=!1}=i;if(this.vhs_=t,this.withCredentials=s,this.addMetadataToTextTrack=i.addMetadataToTextTrack,!e)throw new Error("A non-empty playlist URL or object is required");this.on("minimumUpdatePeriod",(()=>{this.refreshXml_()})),this.on("mediaupdatetimeout",(()=>{this.refreshMedia_(this.media().id)})),this.state="HAVE_NOTHING",this.loadedPlaylists_={},this.logger_=Ws("DashPlaylistLoader"),this.isMain_?(this.mainPlaylistLoader_.srcUrl=e,this.mainPlaylistLoader_.sidxMapping_={}):this.childPlaylist_=e}get isPaused(){return this.isPaused_}requestErrored_(e,t,i){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,metadata:e.metadata}:e,i&&(this.state=i),this.trigger("error"),!0):void 0)}addSidxSegments_(e,t,i){const n=e.sidx&&(0,y.mm)(e.sidx);if(!e.sidx||!n||this.mainPlaylistLoader_.sidxMapping_[n])return s().clearTimeout(this.mediaRequest_),void(this.mediaRequest_=s().setTimeout((()=>i(!1)),0));const r=zs(e.sidx.resolvedUri),a=(s,r)=>{if(this.requestErrored_(s,r,t))return;const a=this.mainPlaylistLoader_.sidxMapping_,{requestType:o}=r;let l;try{l=v()((0,m.Ki)(r.response).subarray(8))}catch(e){return e.metadata=Or({requestType:o,request:r,parseFailure:!0}),void this.requestErrored_(e,r,t)}return a[n]={sidxInfo:e.sidx,sidx:l},(0,y.jp)(e,l,e.sidx.resolvedUri),i(!0)};this.request=((e,t,i,n)=>{let s,r=[],a=!1;const o=function(e,t,n,s){return t.abort(),a=!0,i(e,t,n,s)},l=function(e,t){if(a)return;if(e)return e.metadata=Or({requestType:"dash-sidx",request:t,error:e}),o(e,t,"",r);const i=t.responseText.substring(r&&r.byteLength||0,t.responseText.length);if(r=(0,m.lx)(r,(0,m.qX)(i,!0)),s=s||(0,b.c)(r),r.length<10||s&&r.length<s+2)return na(t,(()=>o(e,t,"",r)));const n=(0,T.Xm)(r);return"ts"===n&&r.length<188||!n&&r.length<376?na(t,(()=>o(e,t,"",r))):o(null,t,n,r)},u={uri:e,beforeSend(e){e.overrideMimeType("text/plain;
2 charset=x-user-defined"),e.addEventListener("progress",(function({total:t,loaded:i}){return zr(e,null,{statusCode:e.status},l)}))}},c=t(u,(function(e,t){return zr(c,e,t,l)}));return c})(r,this.vhs_.xhr,((t,i,n,s)=>{if(t)return a(t,i);if(!n||"mp4"!==n){const t=n||"unknown";return a({status:i.status,message:`Unsupported ${t} container type for sidx segment at URL: ${r}`,response:"",playlist:e,internal:!0,playlistExclusionDuration:1/0,code:2},i)}const{offset:o,length:l}=e.sidx.byterange;if(s.length>=l+o)return a(t,{response:s.subarray(o,o+l),status:i.status,uri:i.uri});this.request=this.vhs_.xhr({uri:r,responseType:"arraybuffer",requestType:"dash-sidx",headers:Gr({byterange:e.sidx.byterange})},a)}))}dispose(){this.isPaused_=!0,this.trigger("dispose"),this.stopRequest(),this.loadedPlaylists_={},s().clearTimeout(this.minimumUpdatePeriodTimeout_),s().clearTimeout(this.mediaRequest_),s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.mediaRequest_=null,this.minimumUpdatePeriodTimeout_=null,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.off()}hasPendingRequest(){return this.request||this.mediaRequest_}stopRequest(){if(this.request){const e=this.request;this.request=null,e.onreadystatechange=null,e.abort()}}media(e){if(!e)return this.media_;if("HAVE_NOTHING"===this.state)throw new Error("Cannot switch media playlist from "+this.state);const t=this.state;if("string"==typeof e){if(!this.mainPlaylistLoader_.main.playlists[e])throw new Error("Unknown playlist URI: "+e);e=this.mainPlaylistLoader_.main.playlists[e]}const i=!this.media_||e.id!==this.media_.id;if(i&&this.loadedPlaylists_[e.id]&&this.loadedPlaylists_[e.id].endList)return this.state="HAVE_METADATA",this.media_=e,void(i&&(this.trigger("mediachanging"),this.trigger("mediachange")));i&&(this.media_&&this.trigger("mediachanging"),this.addSidxSegments_(e,t,(i=>{this.haveMetadata({startingState:t,playlist:e})})))}haveMetadata({startingState:e,playlist:t}){this.state="HAVE_METADATA",this.loadedPlaylists_[t.id]=t,s().clearTimeout(this.mediaRequest_),this.mediaRequest_=null,this.refreshMedia_(t.id),"HAVE_MAIN_MANIFEST"===e?this.trigger("loadedmetadata"):this.trigger("mediachange")}pause(){this.isPaused_=!0,this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null),this.stopRequest(),s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null,this.isMain_&&(s().clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null),"HAVE_NOTHING"===this.state&&(this.started=!1)}load(e){this.isPaused_=!1,s().clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null;const t=this.media();if(e){const e=t?t.targetDuration/2*1e3:5e3;this.mediaUpdateTimeout=s().setTimeout((()=>this.load()),e)}else this.started?t&&!t.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()}start(){if(this.started=!0,!this.isMain_)return s().clearTimeout(this.mediaRequest_),void(this.mediaRequest_=s().setTimeout((()=>this.haveMain_()),0));this.requestMain_(((e,t)=>{this.haveMain_(),this.hasPendingRequest()||this.media_||this.media(this.mainPlaylistLoader_.main.playlists[0])}))}requestMain_(e){const t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:t}),this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},((i,n)=>{if(i){const{requestType:e}=n;i.metadata=Or({requestType:e,request:n,error:i})}if(this.requestErrored_(i,n))return void("HAVE_NOTHING"===this.state&&(this.started=!1));this.trigger({type:"manifestrequestcomplete",metadata:t});const s=n.responseText!==this.mainPlaylistLoader_.mainXml_;return this.mainPlaylistLoader_.mainXml_=n.responseText,n.responseHeaders&&n.responseHeaders.date?this.mainLoaded_=Date.parse(n.responseHeaders.date):this.mainLoaded_=Date.now(),this.mainPlaylistLoader_.srcUrl=zs(this.mainPlaylistLoader_.srcUrl,n),s?(this.handleMain_(),void this.syncCl
2ientServerClock_((()=>e(n,s)))):e(n,s)}))}syncClientServerClock_(e){const t=(0,y.LG)(this.mainPlaylistLoader_.mainXml_);return null===t?(this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()):"DIRECT"===t.method?(this.mainPlaylistLoader_.clientOffset_=t.value-Date.now(),e()):void(this.request=this.vhs_.xhr({uri:$s(this.mainPlaylistLoader_.srcUrl,t.value),method:t.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},((i,n)=>{if(!this.request)return;if(i){const{requestType:t}=n;return this.error.metadata=Or({requestType:t,request:n,error:i}),this.mainPlaylistLoader_.clientOffset_=this.mainLoaded_-Date.now(),e()}let s;s="HEAD"===t.method?n.responseHeaders&&n.responseHeaders.date?Date.parse(n.responseHeaders.date):this.mainLoaded_:Date.parse(n.responseText),this.mainPlaylistLoader_.clientOffset_=s-Date.now(),e()})))}haveMain_(){this.state="HAVE_MAIN_MANIFEST",this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)}handleMain_(){s().clearTimeout(this.mediaRequest_),this.mediaRequest_=null;const e=this.mainPlaylistLoader_.main,t={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};let i;this.trigger({type:"manifestparsestart",metadata:t});try{i=(({mainXml:e,srcUrl:t,clientOffset:i,sidxMapping:n,previousManifest:s})=>{const r=(0,y.Qc)(e,{manifestUri:t,clientOffset:i,sidxMapping:n,previousManifest:s});return xr(r,t,aa),r})({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:e})}catch(e){this.error=e,this.error.metadata={errorType:Bs.Error.StreamingDashManifestParserError,error:e},this.trigger("error")}e&&(i=((e,t,i)=>{let n=!0,s=Gs(e,{duration:t.duration,minimumUpdatePeriod:t.minimumUpdatePeriod,timelineStarts:t.timelineStarts});for(let e=0;e<t.playlists.length;e++){const r=t.playlists[e];if(r.sidx){const e=(0,y.mm)(r.sidx);i&&i[e]&&i[e].sidx&&(0,y.jp)(r,i[e].sidx,r.sidx.resolvedUri)}const a=Vr(s,r,ra);a&&(s=a,n=!1)}return Cr(t,((e,t,i,r)=>{if(e.playlists&&e.playlists.length){const a=e.playlists[0].id,o=Vr(s,e.playlists[0],ra);o&&(s=o,r in s.mediaGroups[t][i]||(s.mediaGroups[t][i][r]=e),s.mediaGroups[t][i][r].playlists[0]=s.playlists[a],n=!1)}})),((e,t)=>{Cr(e,((i,n,s,r)=>{t.mediaGroups[n][s]&&r in t.mediaGroups[n][s]||delete e.mediaGroups[n][s][r]}))})(s,t),t.minimumUpdatePeriod!==e.minimumUpdatePeriod&&(n=!1),n?null:s})(e,i,this.mainPlaylistLoader_.sidxMapping_)),this.mainPlaylistLoader_.main=i||e;const n=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0];if(n&&n!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=n),(!e||i&&i.minimumUpdatePeriod!==e.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_(),this.addEventStreamToMetadataTrack_(i),i){const{duration:e,endList:n}=i,s=[];
vendor: 4,962 bytes, line 2
2i.playlists.forEach((e=>{s.push({id:e.id,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS})}));const r={duration:e,isLive:!n,renditions:s};t.parsedManifest=r,this.trigger({type:"manifestparsecomplete",metadata:t})}return Boolean(i)}updateMinimumUpdatePeriodTimeout_(){const e=this.mainPlaylistLoader_;e.createMupOnMedia_&&(e.off("loadedmetadata",e.createMupOnMedia_),e.createMupOnMedia_=null),e.minimumUpdatePeriodTimeout_&&(s().clearTimeout(e.minimumUpdatePeriodTimeout_),e.minimumUpdatePeriodTimeout_=null);let t=e.main&&e.main.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)}createMUPTimeout_(e){const t=this.mainPlaylistLoader_;t.minimumUpdatePeriodTimeout_=s().setTimeout((()=>{t.minimumUpdatePeriodTimeout_=null,t.trigger("minimumUpdatePeriod"),t.createMUPTimeout_(e)}),e)}refreshXml_(){this.requestMain_(((e,t)=>{t&&(this.media_&&(this.media_=this.mainPlaylistLoader_.main.playlists[this.media_.id]),this.mainPlaylistLoader_.sidxMapping_=((e,t)=>{let i=oa(e.playlists,t);return Cr(e,((e,n,s,r)=>{if(e.playlists&&e.playlists.length){const n=e.playlists;i=Gs(i,oa(n,t))}})),i})(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.sidxMapping_),this.addSidxSegments_(this.media(),this.state,(e=>{this.refreshMedia_(this.media().id)})))}))}refreshMedia_(e){if(!e)throw new Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();const t=this.mainPlaylistLoader_.main.playlists,i=!this.media_||this.media_!==t[e];if(i?this.media_=t[e]:this.trigger("playlistunchanged"),!this.mediaUpdateTimeout){const e=()=>{this.media().endList||(this.mediaUpdateTimeout=s().setTimeout((()=>{this.trigger("mediaupdatetimeout"),e()}),Hr(this.media(),Boolean(i))))};e()}this.trigger("loadedplaylist")}addEventStreamToMetadataTrack_(e){if(e&&this.mainPlaylistLoader_.main.eventStream){const e=this.mainPlaylistLoader_.main.eventStream.map((e=>({cueTime:e.start,frames:[{data:e.messageData}]})));this.addMetadataToTextTrack("EventStream",e,this.mainPlaylistLoader_.main.duration)}}getKeyIdSet(e){if(e.contentProtection){const t=new Set;for(const i in e.contentProtection){const n=e.contentProtection[i].attributes["cenc:default_KID"];n&&t.add(n.replace(/-/g,"").toLowerCase())}return t}}}var ua={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};const ca=function(e){return e.on=e.addEventListener,e.off=e.removeEventListener,e},ha=function(e){return function(){const t=function(e){try{return URL.createObjectURL(new Blob([e],{type:"application/javascript"}))}catch(t){const i=new BlobBuilder;return i.append(e),URL.createObjectURL(i.getBlob())}}(e),i=ca(new Worker(t));i.objURL=t;const n=i.terminate;return i.on=i.addEventListener,i.off=i.removeEventListener,i.terminate=function(){return URL.revokeObjectURL(t),n.call(this)},i}},da=function(e){return`var browserWorkerPolyFill = ${ca.toString()};\nbrowserWorkerPolyFill(self);\n`+e},pa=function(e){return e.toString().replace(/^function.+?{/,"").slice(0,-1)},fa=da(pa((function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},t=function(){this.init=function(){var e={};this.on=function(t,i){e[t]||(e[t]=[]),e[t]=e[t].concat(i)},this.off=function(t,i){var n;return!!e[t]&&(n=e[t].indexOf(i),e[t]=e[t].slice(),e[t].splice(n,1),n>-1)},this.trigger=function(t){var i,n,s,r;if(i=e[t])if(2===arguments.length)for(s=i.length,n=0;n<s;++n)i[n].call(this,arguments[1]);else{for(r=[],n=arguments.length,n=1;n<arguments.length;++n)r.push(arguments[n]);for(s=i.length,n=0;n<s;++n)i[n].apply(this,r)}},this.dispose=function(){e={}}}};t.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},t.prototype.push=function(e){this.trigger("data",e)},t.prototype.flush=function(e){this.trigger("done",e)},t.prototype.partialFlush=function(e){this.trigger("partialdone",e)},t.prototype.endTimeline=function(e){this.trigger("endedtimeline",e)},t.prototype.reset=function(e){this.trigger("reset",e)};var n,s,r,a,o,l,u,c,h,d,p,f,g,m,y,_,v,b,T,S,k,w,C,E,x,I,O,P,A,L,M,D,j,R,N,U,B,F,V,H,q=t,$=Math.pow(2,32),z={getUint64:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength);return i.getBigUint64?(t=i.getBigUint64(0))<Number.MAX_SAFE_INTEGER?
vendor: 4,191 bytes, line 2
2Number(t):t:i.getUint32(0)*$+i.getUint32(4)},MAX_UINT32:$},W=z.MAX_UINT32;!function(){var e;if(w={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(e in w)w.hasOwnProperty(e)&&(w[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);C=new Uint8Array(["i".charCodeAt(0),"s".charCodeAt(0),"o".charCodeAt(0),"m".charCodeAt(0)]),x=new Uint8Array(["a".charCodeAt(0),"v".charCodeAt(0),"c".charCodeAt(0),"1".charCodeAt(0)]),E=new Uint8Array([0,0,0,1]),I=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]),O=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]),P={video:I,audio:O},M=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),L=new Uint8Array([0,0,0,0,0,0,0,0]),D=new Uint8Array([0,0,0,0,0,0,0,0]),j=D,R=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),N=D,A=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}}(),n=function(e){var t,i,n=[],s=0;for(t=1;t<arguments.length;t++)n.push(arguments[t]);for(t=n.length;t--;)s+=n[t].byteLength;for(i=new Uint8Array(s+8),new DataView(i.buffer,i.byteOffset,i.byteLength).setUint32(0,i.byteLength),i.set(e,4),t=0,s=8;t<n.length;t++)i.set(n[t],s),s+=n[t].byteLength;return i},s=function(){return n(w.dinf,n(w.dref,M))},r=function(e){return n(w.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,e.audioobjecttype<<3|e.samplingfrequencyindex>>>1,e.samplingfrequencyindex<<7|e.channelcount<<3,6,1,2]))},y=function(e){return n(w.hdlr,P[e])},m=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,e.duration>>>24&255,e.duration>>>16&255,e.duration>>>8&255,255&e.duration,85,196,0,0]);return e.samplerate&&(t[12]=e.samplerate>>>24&255,t[13]=e.samplerate>>>16&255,t[14]=e.samplerate>>>8&255,t[15]=255&e.samplerate),n(w.mdhd,t)},g=function(e){return n(w.mdia,m(e),y(e.type),l(e))},o=function(e){return n(w.mfhd,new Uint8Array([0,0,0,0,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e]))},l=function(e){return n(w.minf,"video"===e.type?n(w.vmhd,A):n(w.smhd,L),s(),v(e))},u=function(e,t){for(var i=[],s=t.length;s--;)i[s]=T(t[s]);return n.apply(null,[w.moof,o(e)].concat(i))},c=function(e){for(var t=e.length,i=[];t--;)i[t]=p(e[t]);return n.apply(null,[w.moov,d(4294967295)].concat(i).concat(h(e)))},h=function(e){for(var t=e.length,i=[];t--;)i[t]=S(e[t]);return n.apply(null,[w.mvex].concat(i))},d=function(e){var t=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e,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 n(w.mvhd,t)},_=function(e){var t,i,s=e.samples||[],r=new Uint8Array(4+s.length);for(i=0;i<s.length;i++)t=s[i].flags,r[i+4]=t.dependsOn<<4|t.isDependedOn<<2|t.hasRedundancy;return n(w.sdtp,r)},v=function(e){return n(w.stbl,b(e),n(w.stts,N),n(w.stsc,j),n(w.stsz,R),n(w.stco,D))},b=function(e){return n(w.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===e.type?U(e):B(e))},U=function(e){var t,i,s=e.sps||[],r=e.pps||[],a=[],o=[];for(t=0;t<s.length;t++)a.push((65280&s[t].byteLength)>>>8),a.push(255&s[t].byteLength),a=a.concat(Array.prototype.slice.call(s[t]));for(t=0;t<r.length;t++)o.push((65280&r[t].byteLength)>>>8),o.push(255&r[t].byteLength),o=o.concat(Array.prototype.slice.call(r[t]));if(i=[w.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&e.width)>>8,255&e.width,(65280&e.height)>>8,255&e.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]),n(w.avcC,new Uint8Array([1,e.profileIdc,e.profileCompatibility,e.levelIdc,255].concat([s.length],a,[r.length],o))),n(w.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192]))],e.sarRatio){var l=e.s
vendor: 11,403 bytes, line 2
2arRatio[0],u=e.sarRatio[1];i.push(n(w.pasp,new Uint8Array([(4278190080&l)>>24,(16711680&l)>>16,(65280&l)>>8,255&l,(4278190080&u)>>24,(16711680&u)>>16,(65280&u)>>8,255&u])))}return n.apply(null,i)},B=function(e){return n(w.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&e.channelcount)>>8,255&e.channelcount,(65280&e.samplesize)>>8,255&e.samplesize,0,0,0,0,(65280&e.samplerate)>>8,255&e.samplerate,0,0]),r(e))},f=function(e){var t=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,0,(4278190080&e.duration)>>24,(16711680&e.duration)>>16,(65280&e.duration)>>8,255&e.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&e.width)>>8,255&e.width,0,0,(65280&e.height)>>8,255&e.height,0,0]);return n(w.tkhd,t)},T=function(e){var t,i,s,r,a,o;return t=n(w.tfhd,new Uint8Array([0,0,0,58,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(e.baseMediaDecodeTime/W),o=Math.floor(e.baseMediaDecodeTime%W),i=n(w.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o>>>24&255,o>>>16&255,o>>>8&255,255&o])),"audio"===e.type?(s=k(e,92),n(w.traf,t,i,s)):(r=_(e),s=k(e,r.length+92),n(w.traf,t,i,s,r))},p=function(e){return e.duration=e.duration||4294967295,n(w.trak,f(e),g(e))},S=function(e){var t=new Uint8Array([0,0,0,0,(4278190080&e.id)>>24,(16711680&e.id)>>16,(65280&e.id)>>8,255&e.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==e.type&&(t[t.length-1]=0),n(w.trex,t)},H=function(e,t){var i=0,n=0,s=0,r=0;return e.length&&(void 0!==e[0].duration&&(i=1),void 0!==e[0].size&&(n=2),void 0!==e[0].flags&&(s=4),void 0!==e[0].compositionTimeOffset&&(r=8)),[0,0,i|n|s|r,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]},V=function(e,t){var i,s,r,a,o,l;for(t+=20+16*(a=e.samples||[]).length,r=H(a,t),(s=new Uint8Array(r.length+16*a.length)).set(r),i=r.length,l=0;l<a.length;l++)o=a[l],s[i++]=(4278190080&o.duration)>>>24,s[i++]=(16711680&o.duration)>>>16,s[i++]=(65280&o.duration)>>>8,s[i++]=255&o.duration,s[i++]=(4278190080&o.size)>>>24,s[i++]=(16711680&o.size)>>>16,s[i++]=(65280&o.size)>>>8,s[i++]=255&o.size,s[i++]=o.flags.isLeading<<2|o.flags.dependsOn,s[i++]=o.flags.isDependedOn<<6|o.flags.hasRedundancy<<4|o.flags.paddingValue<<1|o.flags.isNonSyncSample,s[i++]=61440&o.flags.degradationPriority,s[i++]=15&o.flags.degradationPriority,s[i++]=(4278190080&o.compositionTimeOffset)>>>24,s[i++]=(16711680&o.compositionTimeOffset)>>>16,s[i++]=(65280&o.compositionTimeOffset)>>>8,s[i++]=255&o.compositionTimeOffset;return n(w.trun,s)},F=function(e,t){var i,s,r,a,o,l;for(t+=20+8*(a=e.samples||[]).length,r=H(a,t),(i=new Uint8Array(r.length+8*a.length)).set(r),s=r.length,l=0;l<a.length;l++)o=a[l],i[s++]=(4278190080&o.duration)>>>24,i[s++]=(16711680&o.duration)>>>16,i[s++]=(65280&o.duration)>>>8,i[s++]=255&o.duration,i[s++]=(4278190080&o.size)>>>24,i[s++]=(16711680&o.size)>>>16,i[s++]=(65280&o.size)>>>8,i[s++]=255&o.size;return n(w.trun,i)},k=function(e,t){return"audio"===e.type?F(e,t):V(e,t)};var G,K,Q,X,Y,J,Z,ee,te={ftyp:a=function(){return n(w.ftyp,C,E,C,x)},mdat:function(e){return n(w.mdat,e)},moof:u,moov:c,initSegment:function(e){var t,i=a(),n=c(e);return(t=new Uint8Array(i.byteLength+n.byteLength)).set(i),t.set(n,i.byteLength),t}},ie=function(e,t){var i={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};return i.dataOffset=t,i.compositionTimeOffset=e.pts-e.dts,i.duration=e.duration,i.size=4*e.length,i.size+=e.byteLength,e.keyFrame&&(i.flags.dependsOn=2,i.flags.isNonSyncSample=0),i},ne={groupNalsIntoFrames:function(e){var t,i,n=[],s=[];for(s.byteLength=0,s.nalCount=0,s.duration=0,n.byteLength=0,t=0;t<e.length;t++)"access_unit_delimiter_rbsp"===(i=e[t]).nalUnitType?(n.length&&(n.duration=i.dts-n.dts,s.byteLength+=n.byteLength,s.nalCount+=n.length,s.duration+=n.duration,s.push(n)),(n=[i]).byteLength=i.data.byteLength,n.pts=i.pts,n.dts=i.dts):("slice_layer_without_partitioning_rbsp_idr"===i.nalUnitType&&(n.keyFrame=!0),n.duration=i.dts-n.dts,n.byteLength+=i.data.byteLength,n.push(i));return s.length&&(!n.duration||n.duration<=0)&&(n.duration=s[s.length-1].duration),s.byteLength+=n.byteLength,s.nalCount+=n.length,s.duration+=n.duration,s.push(n),s},groupFramesIntoGops:function(e){var t,i,n=[],s=[];for(n.byteLength=0,n.nalCount=0,n.duration=0,n.pts=e[0].pts,n.dts=e[0].dts,s.byteLength=0,s.nalCount=0,s.duration=0,s.pts=e[0].pts,s.dts=e[0].dts,t=0;t<e.length;t++)(i=e[t]).keyFrame?(n.length&&(s.push(n),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.duration+=n.duration),(n=[i]).nalCount=i.length,n.byteLength=i.byteLength,n.pts=i.pts,n.dts=i.dts,n.duration=i.duration):(n.duration+=i.duration,n.nalCount+=i.length,n.byteLength+=i.byteLength,n.push(i));return s.length&&n.duration<=0&&(n.duration=s[s.length-1].duration),s.byteLength+=n.byteLength,s.nalCount+=n.nalCount,s.duration+=n.duration,s.push(n),s},extendFirstKeyFrame:function(e){var t;return!e[0][0].keyFrame&&e.length>1&&(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},generateSampleTable:function(e,t){var i,n,s,r,a,o=t||0,l=[];for(i=0;i<e.length;i++)for(r=e[i],n=0;n<r.length;n++)a=r[n],o+=(s=ie(a,o)).size,l.push(s);return l},concatenateNalData:function(e){var t,i,n,s,r,a,o=0,l=e.byteLength,u=e.nalCount,c=new Uint8Array(l+4*u),h=new DataView(c.buffer);for(t=0;t<e.length;t++)for(s=e[t],i=0;i<s.length;i++)for(r=s[i],n=0;n<r.length;n++)a=r[n],h.setUint32(o,a.data.byteLength),o+=4,c.set(a.data,o),o+=a.data.byteLength;return c},generateSampleTableForFrame:function(e,t){var i,n=[];return i=ie(e,t||0),n.push(i),n},concatenateNalDataForFrame:function(e){var t,i,n=0,s=e.byteLength,r=e.length,a=new Uint8Array(s+4*r),o=new DataView(a.buffer);for(t=0;t<e.length;t++)i=e[t],o.setUint32(n,i.data.byteLength),n+=4,a.set(i.data,n),n+=i.data.byteLength;return a}},se=[33,16,5,32,164,27],re=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],ae=function(e){for(var t=[];e--;)t.push(0);return t},oe=9e4;J=function(e,t){return K(Y(e,t))},Z=function(e,t){return Q(X(e),t)},ee=function(e,t,i){return X(i?e:e-t)};var le={ONE_SECOND_IN_TS:oe,secondsToVideoTs:K=function(e){return e*oe},secondsToAudioTs:Q=function(e,t){return e*t},videoTsToSeconds:X=function(e){return e/oe},audioTsToSeconds:Y=function(e,t){return e/t},audioTsToVideoTs:J,videoTsToAudioTs:Z,metadataTsToSeconds:ee},ue=le,ce={prefixWithSilence:function(e,t,i,n){var s,r,a,o,l,u=0,c=0,h=0;if(t.length&&(s=ue.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),r=Math.ceil(ue.ONE_SECOND_IN_TS/(e.samplerate/1024)),i&&n&&(u=s-Math.max(i,n),h=(c=Math.floor(u/r))*r),!(c<1||h>ue.ONE_SECOND_IN_TS/2))){for((a=function(){if(!G){var e={96e3:[se,[227,64],ae(154),[56]],88200:[se,[231],ae(170),[56]],64e3:[se,[248,192],ae(240),[56]],48e3:[se,[255,192],ae(268),[55,148,128],ae(54),[112]],44100:[se,[255,192],ae(268),[55,163,128],ae(84),[112]],32e3:[se,[255,192],ae(268),[55,234],ae(226),[112]],24e3:[se,[255,192],ae(268),[55,255,128],ae(268),[111,112],ae(126),[224]],16e3:[se,[255,192],ae(268),[55,255,128],ae(268),[111,255],ae(269),[223,108],ae(195),[1,192]],12e3:[re,ae(268),[3,127,248],ae(268),[6,255,240],ae(268),[13,255,224],ae(268),[27,253,128],ae(259),[56]],11025:[re,ae(268),[3,127,248],ae(268),[6,255,240],ae(268),[13,255,224],ae(268),[27,255,192],ae(268),[55,175,128],ae(108),[112]],8e3:[re,ae(268),[3,121,16],ae(47),[7]]};t=e,G=Object.keys(t).reduce((function(e,i){return e[i]=new Uint8Array(t[i].reduce((function(e,t){return e.concat(t)}),[])),e}),{})}var t;return G}()[e.samplerate])||(a=t[0].data),o=0;o<c;o++)l=t[0],t.splice(0,0,{data:a,dts:l.dts-r,pts:l.pts-r});return e.baseMediaDecodeTime-=Math.floor(ue.videoTsToAudioTs(h,e.samplerate)),h}},trimAdtsFramesByEarliestDts:function(e,t,i){return t.minSegmentDts>=i?e:(t.minSegmentDts=1/0,e.filter((function(e){return e.dts>=i&&(t.minSegmentDts=Math.min(t.minSegmentDts,e.dts),t.minSegmentPts=t.minSegmentDts,!0)})))},generateSampleTable:function(e){var t,i,n=[];for(t=0;t<e.length;t++)i=e[t],n.push({size:i.data.byteLength,duration:1024});return n},concatenateFrameData:function(e){var t,i,n=0,s=new Uint8Array(function(e){var t,i=0;for(t=0;t<e.length;t++)i+=e[t].data.byteLength;return i}(e));for(t=0;t<e.length;t++)i=e[t],s.set(i.data,n),n+=i.data.byteLength;return s}},he=le.ONE_SECOND_IN_TS,de={clearDtsInfo:function(e){delete e.minSegmentDts,delete e.maxSegmentDts,delete e.minSegmentPts,delete e.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(e,t){var i,n=e.minSegmentDts;return t||(n-=e.timelineStartInfo.dts),i=e.timelineStartInfo.baseMediaDecodeTime,i+=n,i=Math.max(0,i),"audio"===e.type&&(i*=e.samplerate/he,i=Math.floor(i)),i},collectDtsInfo: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))}},pe={parseSei:function(e){for(var t=0,i={payloadType:-1,payloadSize:0},n=0,s=0;t<e.byteLength&&128!==e[t];){for(;255===e[t];)n+=255,t++;for(n+=e[t++];255===e[t];)s+=255,t++;if(s+=e[t++],!i.payload&&4===n){if("GA94"===String.fromCharCode(e[t+3],e[t+4],e[t+5],e[t+6])){i.payloadType=n,i.payloadSize=s,i.payload=e.subarray(t,t+s);break}i.payload=void 0}t+=s,n=0,s=0}return i},parseUserData:function(e){return 181!==e.payload[0]||49!=(e.payload[1]<<8|e.payload[2])||"GA94"!==String.fromCharCode(e.payload[3],e.payload[4],e.payload[5],e.payload[6])||3!==e.payload[7]?null:e.payload.subarray(8,e.payload.length-1)},parseCaptionPackets:function(e,t){var i,n,s,r,a=[];if(!(64&t[0]))return a;for(n=31&t[0],i=0;i<n;i++)r={type:3&t[2+(s=3*i)],pts:e},4&t[s+2]&&(r.ccData=t[s+3]<<8|t[s+4],a.push(r));return a},discardEmulationPreventionBytes:function(e){for(var t,i,n=e.byteLength,s=[],r=1;r<n-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(s.push(r+2),r+=2):r++;if(0===s.length)return e;t=n-s.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===s[0]&&(a++,s.shift()),i[r]=e[a];return i},USER_DATA_REGISTERED_ITU_T_T35:4},fe=q,ge=pe,me=function(e){e=e||{},me.prototype.init.call(this),this.parse708captions_="boolean"!=typeof e.parse708captions||e.parse708captions,this.captionPackets_=[],this.ccStreams_=[new Ee(0,0),new Ee(0,1),new Ee(1,0),new Ee(1,1)],this.parse708captions_&&(this.cc708Stream_=new Te({captionServices:e.captionServices})),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")))};me.prototype=new fe,me.prototype.push=function(e){var t,i,n;
vendor: 4,453 bytes, line 2
2if("sei_rbsp"===e.nalUnitType&&(t=ge.parseSei(e.escapedRBSP)).payload&&t.payloadType===ge.USER_DATA_REGISTERED_ITU_T_T35&&(i=ge.parseUserData(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));n=ge.parseCaptionPackets(e.pts,i),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==e.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=e.dts}},me.prototype.flushCCStreams=function(e){this.ccStreams_.forEach((function(t){return"flush"===e?t.flush():t.partialFlush()}),this)},me.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)):this.flushCCStreams(e)},me.prototype.flush=function(){return this.flushStream("flush")},me.prototype.partialFlush=function(){return this.flushStream("partialFlush")},me.prototype.reset=function(){this.latestDts_=null,this.ignoreNextEqualDts_=!1,this.numSameDts_=0,this.activeCea608Channel_=[null,null],this.ccStreams_.forEach((function(e){e.reset()}))},me.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)},me.prototype.setsChannel1Active=function(e){return 4096==(30720&e.ccData)},me.prototype.setsChannel2Active=function(e){return 6144==(30720&e.ccData)},me.prototype.setsTextOrXDSActive=function(e){return 256==(28928&e.ccData)||4138==(30974&e.ccData)||6186==(30974&e.ccData)},me.prototype.dispatchCea708Packet=function(e){this.parse708captions_&&this.cc708Stream_.push(e)};var 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},_e=function(e){return 32<=e&&e<=127||160<=e&&e<=255},ve=function(e){this.windowNum=e,this.reset()};ve.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},ve.prototype.getText=function(){return this.rows.join("\n")},ve.prototype.clearText=function(){this.rows=[""],this.rowIdx=0},ve.prototype.newLine=function(e){for(this.rows.length>=this.virtualRowCount&&"function"==typeof this.beforeRowOverflow&&this.beforeRowOverflow(e),this.rows.length>0&&(this.rows.push(""),this.rowIdx++);this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--},ve.prototype.isEmpty=function(){return 0===this.rows.length||1===this.rows.length&&""===this.rows[0]},ve.prototype.addText=function(e){this.rows[this.rowIdx]+=e},ve.prototype.backspace=function(){if(!this.isEmpty()){var e=this.rows[this.rowIdx];this.rows[this.rowIdx]=e.substr(0,e.length-1)}};var be=function(e,t,i){this.serviceNum=e,this.text="",this.currentWindow=new ve(-1),this.windows=[],this.stream=i,"string"==typeof t&&this.createTextDecoder(t)};be.prototype.init=function(e,t){this.startPts=e;for(var i=0;i<8;i++)this.windows[i]=new ve(i),"function"==typeof t&&(this.windows[i].beforeRowOverflow=t)},be.prototype.setCurrentWindow=function(e){this.currentWindow=this.windows[e]},be.prototype.createTextDecoder=function(e){if("undefined"==typeof TextDecoder)this.stream.trigger("log",{level:"warn",message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(e)}catch(t){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+e+" encoding. "+t})}};var Te=function(e){e=e||{},Te.prototype.init.call(this);var t,i=this,n=e.captionServices||{},s={};
vendor: 4,332 bytes, line 2
2Object.keys(n).forEach((e=>{t=n[e],/^SERVICE/.test(e)&&(s[e]=t.encoding)})),this.serviceEncodings=s,this.current708Packet=null,this.services={},this.push=function(e){3===e.type?(i.new708Packet(),i.add708Bytes(e)):(null===i.current708Packet&&i.new708Packet(),i.add708Bytes(e))}};Te.prototype=new fe,Te.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet(),this.current708Packet={data:[],ptsVals:[]}},Te.prototype.add708Bytes=function(e){var t=e.ccData,i=t>>>8,n=255&t;this.current708Packet.ptsVals.push(e.pts),this.current708Packet.data.push(i),this.current708Packet.data.push(n)},Te.prototype.push708Packet=function(){var e=this.current708Packet,t=e.data,i=null,n=null,s=0,r=t[s++];for(e.seq=r>>6,e.sizeCode=63&r;s<t.length;s++)n=31&(r=t[s++]),7==(i=r>>5)&&n>0&&(i=r=t[s++]),this.pushServiceBlock(i,s,n),n>0&&(s+=n-1)},Te.prototype.pushServiceBlock=function(e,t,i){var n,s=t,r=this.current708Packet.data,a=this.services[e];for(a||(a=this.initService(e,s));s<t+i&&s<r.length;s++)n=r[s],_e(n)?s=this.handleText(s,a):24===n?s=this.multiByteCharacter(s,a):16===n?s=this.extendedCommands(s,a):128<=n&&n<=135?s=this.setCurrentWindow(s,a):152<=n&&n<=159?s=this.defineWindow(s,a):136===n?s=this.clearWindows(s,a):140===n?s=this.deleteWindows(s,a):137===n?s=this.displayWindows(s,a):138===n?s=this.hideWindows(s,a):139===n?s=this.toggleWindows(s,a):151===n?s=this.setWindowAttributes(s,a):144===n?s=this.setPenAttributes(s,a):145===n?s=this.setPenColor(s,a):146===n?s=this.setPenLocation(s,a):143===n?a=this.reset(s,a):8===n?a.currentWindow.backspace():12===n?a.currentWindow.clearText():13===n?a.currentWindow.pendingNewLine=!0:14===n?a.currentWindow.clearText():141===n&&s++},Te.prototype.extendedCommands=function(e,t){var i=this.current708Packet.data[++e];return _e(i)&&(e=this.handleText(e,t,{isExtended:!0})),e},Te.prototype.getPts=function(e){return this.current708Packet.ptsVals[Math.floor(e/2)]},Te.prototype.initService=function(e,t){var i,n,s=this;return(i="SERVICE"+e)in this.serviceEncodings&&(n=this.serviceEncodings[i]),this.services[e]=new be(e,n,s),this.services[e].init(this.getPts(t),(function(t){s.flushDisplayed(t,s.services[e])})),this.services[e]},Te.prototype.handleText=function(e,t,i){var n,s,r,a,o=i&&i.isExtended,l=i&&i.isMultiByte,u=this.current708Packet.data,c=o?4096:0,h=u[e],d=u[e+1],p=t.currentWindow;if(l?(s=[h,d],e++):s=[h],t.textDecoder_&&!o)n=t.textDecoder_.decode(new Uint8Array(s));else if(l){const e=s.map((e=>("0"+(255&e).toString(16)).slice(-2))).join("");n=String.fromCharCode(parseInt(e,16))}else a=ye[r=c|h]||r,n=4096&r&&r===a?"":String.fromCharCode(a);return p.pendingNewLine&&!p.isEmpty()&&p.newLine(this.getPts(e)),p.pendingNewLine=!1,p.addText(n),e},Te.prototype.multiByteCharacter=function(e,t){var i=this.current708Packet.data,n=i[e+1],s=i[e+2];return _e(n)&&_e(s)&&(e=this.handleText(++e,t,{isMultiByte:!0})),e},Te.prototype.setCurrentWindow=function(e,t){var i=7&this.current708Packet.data[e];return t.setCurrentWindow(i),e},Te.prototype.defineWindow=function(e,t){var i=this.current708Packet.data,n=i[e],s=7&n;t.setCurrentWindow(s);var r=t.currentWindow;return n=i[++e],r.visible=(32&n)>>5,r.rowLock=(16&n)>>4,r.columnLock=(8&n)>>3,r.priority=7&n,n=i[++e],r.relativePositioning=(128&n)>>7,r.anchorVertical=127&n,n=i[++e],r.anchorHorizontal=n,n=i[++e],r.anchorPoint=(240&n)>>4,r.rowCount=15&n,n=i[++e],r.columnCount=63&n,n=i[++e],r.windowStyle=(56&n)>>3,r.penStyle=7&n,r.virtualRowCount=r.rowCount+1,e},Te.prototype.setWindowAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],s=t.currentWindow.winAttr;return n=i[++e],s.fillOpacity=(192&n)>>6,s.fillRed=(48&n)>>4,s.fillGreen=(12&n)>>2,s.fillBlue=3&n,n=i[++e],s.borderType=(192&n)>>6,s.borderRed=(48&n)>>4,s.borderGreen=(12&n)>>2,s.borderBlue=3&n,n=i[++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=i[++e],s.effectSpeed=(240&n)>>4,s.effectDirection=(12&n)>>2,s.displayEffect=3&n,e},Te.prototype.flushDisplayed=function(e,t){for(var i=[],n=0;n<8;n++)t.windows[n].visible&&!t.windows[n].isEmpty()&&i.push(t.windows[n].getText());t.endPts=e,t.text=i.join("\n\n"),this.pushCaption(t),t.startPts=e},Te.prototype.pushCaption=function(e){""!==e.text&&(this.trigger("data",{startPts:e.startPts,endPts:e.endPts,text:e.text,stream
vendor: 4,344 bytes, line 2
2:"cc708_"+e.serviceNum}),e.text="",e.startPts=e.endPts)},Te.prototype.displayWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&(t.windows[s].visible=1);return e},Te.prototype.hideWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&(t.windows[s].visible=0);return e},Te.prototype.toggleWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&(t.windows[s].visible^=1);return e},Te.prototype.clearWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&t.windows[s].clearText();return e},Te.prototype.deleteWindows=function(e,t){var i=this.current708Packet.data[++e],n=this.getPts(e);this.flushDisplayed(n,t);for(var s=0;s<8;s++)i&1<<s&&t.windows[s].reset();return e},Te.prototype.setPenAttributes=function(e,t){var i=this.current708Packet.data,n=i[e],s=t.currentWindow.penAttr;return n=i[++e],s.textTag=(240&n)>>4,s.offset=(12&n)>>2,s.penSize=3&n,n=i[++e],s.italics=(128&n)>>7,s.underline=(64&n)>>6,s.edgeType=(56&n)>>3,s.fontStyle=7&n,e},Te.prototype.setPenColor=function(e,t){var i=this.current708Packet.data,n=i[e],s=t.currentWindow.penColor;return n=i[++e],s.fgOpacity=(192&n)>>6,s.fgRed=(48&n)>>4,s.fgGreen=(12&n)>>2,s.fgBlue=3&n,n=i[++e],s.bgOpacity=(192&n)>>6,s.bgRed=(48&n)>>4,s.bgGreen=(12&n)>>2,s.bgBlue=3&n,n=i[++e],s.edgeRed=(48&n)>>4,s.edgeGreen=(12&n)>>2,s.edgeBlue=3&n,e},Te.prototype.setPenLocation=function(e,t){var i=this.current708Packet.data,n=i[e],s=t.currentWindow.penLoc;return t.currentWindow.pendingNewLine=!0,n=i[++e],s.row=15&n,n=i[++e],s.column=63&n,e},Te.prototype.reset=function(e,t){var i=this.getPts(e);return this.flushDisplayed(i,t),this.initService(t.serviceNum,e)};var Se={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},ke=function(e){return null===e?"":(e=Se[e]||e,String.fromCharCode(e))},we=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],Ce=function(){for(var e=[],t=15;t--;)e.push({text:"",indent:0,offset:0});return e},Ee=function(e,t){Ee.prototype.init.call(this),this.field_=e||0,this.dataChannel_=t||0,this.name_="CC"+(1+(this.field_<<1|this.dataChannel_)),this.setConstants(),this.reset(),this.push=function(e){var t,i,n,s,r;if((t=32639&e.ccData)!==this.lastControlCode_){if(4096==(61440&t)?this.lastControlCode_=t:t!==this.PADDING_&&(this.lastControlCode_=null),n=t>>>8,s=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),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,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_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1);else if(t===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(e.pts),this.displayed_=Ce();else if(t===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=Ce();else if(t===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(e.pts),this.displayed_=Ce()
vendor: 14,045 bytes, line 2
2),this.mode_="paintOn",this.startPts_=e.pts;else if(this.isSpecialCharacter(n,s))r=ke((n=(3&n)<<8)|s),this[this.mode_](e.pts,r),this.column_++;else if(this.isExtCharacter(n,s))"popOn"===this.mode_?this.nonDisplayed_[this.row_].text=this.nonDisplayed_[this.row_].text.slice(0,-1):this.displayed_[this.row_].text=this.displayed_[this.row_].text.slice(0,-1),r=ke((n=(3&n)<<8)|s),this[this.mode_](e.pts,r),this.column_++;else if(this.isMidRowCode(n,s))this.clearFormatting(e.pts),this[this.mode_](e.pts," "),this.column_++,14==(14&s)&&this.addFormatting(e.pts,["i"]),1==(1&s)&&this.addFormatting(e.pts,["u"]);else if(this.isOffsetControlCode(n,s)){const e=3&s;this.nonDisplayed_[this.row_].offset=e,this.column_+=e}else if(this.isPAC(n,s)){var a=we.indexOf(7968&t);if("rollUp"===this.mode_&&(a-this.rollUpRows_+1<0&&(a=this.rollUpRows_-1),this.setRollUp(e.pts,a)),a!==this.row_&&a>=0&&a<=14&&(this.clearFormatting(e.pts),this.row_=a),1&s&&-1===this.formatting_.indexOf("u")&&this.addFormatting(e.pts,["u"]),16==(16&t)){const e=(14&t)>>1;this.column_=4*e,this.nonDisplayed_[this.row_].indent+=e}this.isColorPAC(s)&&14==(14&s)&&this.addFormatting(e.pts,["i"])}else this.isNormalChar(n)&&(0===s&&(s=null),r=ke(n),r+=ke(s),this[this.mode_](e.pts,r),this.column_+=r.length)}else this.lastControlCode_=null}};Ee.prototype=new fe,Ee.prototype.flushDisplayed=function(e){const t=e=>{this.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+e+"."})},i=[];this.displayed_.forEach(((e,n)=>{if(e&&e.text&&e.text.length){try{e.text=e.text.trim()}catch(e){t(n)}e.text.length&&i.push({text:e.text,line:n+1,position:10+Math.min(70,10*e.indent)+2.5*e.offset})}else null==e&&t(n)})),i.length&&this.trigger("data",{startPts:this.startPts_,endPts:e,content:i,stream:this.name_})},Ee.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=Ce(),this.nonDisplayed_=Ce(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},Ee.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_},Ee.prototype.isSpecialCharacter=function(e,t){return e===this.EXT_&&t>=48&&t<=63},Ee.prototype.isExtCharacter=function(e,t){return(e===this.EXT_+1||e===this.EXT_+2)&&t>=32&&t<=63},Ee.prototype.isMidRowCode=function(e,t){return e===this.EXT_&&t>=32&&t<=47},Ee.prototype.isOffsetControlCode=function(e,t){return e===this.OFFSET_&&t>=33&&t<=35},Ee.prototype.isPAC=function(e,t){return e>=this.BASE_&&e<this.BASE_+8&&t>=64&&t<=127},Ee.prototype.isColorPAC=function(e){return e>=64&&e<=79||e>=96&&e<=127},Ee.prototype.isNormalChar=function(e){return e>=32&&e<=127},Ee.prototype.setRollUp=function(e,t){if("rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(e),this.nonDisplayed_=Ce(),this.displayed_=Ce()),void 0!==t&&t!==this.row_)for(var i=0;i<this.rollUpRows_;i++)this.displayed_[t-i]=this.displayed_[this.row_-i],this.displayed_[this.row_-i]={text:"",indent:0,offset:0};void 0===t&&(t=this.row_),this.topRow_=t-this.rollUpRows_+1},Ee.prototype.addFormatting=function(e,t){this.formatting_=this.formatting_.concat(t);var i=t.reduce((function(e,t){return e+"<"+t+">"}),"");this[this.mode_](e,i)},Ee.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)}},Ee.prototype.popOn=function(e,t){var i=this.nonDisplayed_[this.row_].text;i+=t,this.nonDisplayed_[this.row_].text=i},Ee.prototype.rollUp=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i},Ee.prototype.shiftRowsUp_=function(){var e;for(e=0;e<this.topRow_;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.row_+1;e<15;e++)this.displayed_[e]={text:"",indent:0,offset:0};for(e=this.topRow_;e<this.row_;e++)this.displayed_[e]=this.displayed_[e+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}},Ee.prototype.paintOn=function(e,t){var i=this.displayed_[this.row_].text;i+=t,this.displayed_[this.row_].text=i};var xe={CaptionStream:me,Cea608Stream:Ee,Cea708Stream:Te},Ie={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Oe=q,Pe="shared",Ae=function(e,t){var i=1;for(e>t&&(i=-1);Math.abs(t-e)>4294967296;)e+=8589934592*i;return e},Le=function(e){var t,i;Le.prototype.init.call(this),this.type_=e||Pe,this.push=function(e){"metadata"!==e.type?this.type_!==Pe&&e.type!==this.type_||(void 0===i&&(i=e.dts),e.dts=Ae(e.dts,i),e.pts=Ae(e.pts,i),t=e.dts,this.trigger("data",e)):this.trigger("data",e)},this.flush=function(){i=t,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.discontinuity=function(){i=void 0,t=void 0},this.reset=function(){this.discontinuity(),this.trigger("reset")}};Le.prototype=new Oe;var Me,De={TimestampRolloverStream:Le,handleRollover:Ae},je=(e,t,i)=>{if(!e)return-1;for(var n=i;n<e.length;n++)if(e[n]===t)return n;return-1},Re=function(e,t,i){var n,s="";for(n=t;n<i;n++)s+="%"+("00"+e[n].toString(16)).slice(-2);return s},Ne=function(e,t,i){return decodeURIComponent(Re(e,t,i))},Ue=function(e,t,i){return unescape(Re(e,t,i))},Be=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},Fe={APIC:function(e){var t,i,n=1;3===e.data[0]&&((t=je(e.data,0,n))<0||(e.mimeType=Ue(e.data,n,t),n=t+1,e.pictureType=e.data[n],n++,(i=je(e.data,0,n))<0||(e.description=Ne(e.data,n,i),n=i+1,"--\x3e"===e.mimeType?e.url=Ue(e.data,n,e.data.length):e.pictureData=e.data.subarray(n,e.data.length))))},"T*":function(e){3===e.data[0]&&(e.value=Ne(e.data,1,e.data.length).replace(/\0*$/,""),e.values=e.value.split("\0"))},TXXX:function(e){var t;3===e.data[0]&&-1!==(t=je(e.data,0,1))&&(e.description=Ne(e.data,1,t),e.value=Ne(e.data,t+1,e.data.length).replace(/\0*$/,""),e.data=e.value)},"W*":function(e){e.url=Ue(e.data,0,e.data.length).replace(/\0.*$/,"")},WXXX:function(e){var t;3===e.data[0]&&-1!==(t=je(e.data,0,1))&&(e.description=Ne(e.data,1,t),e.url=Ue(e.data,t+1,e.data.length).replace(/\0.*$/,""))},PRIV:function(e){var t;for(t=0;t<e.data.length;t++)if(0===e.data[t]){e.owner=Ue(e.data,0,t);break}e.privateData=e.data.subarray(t+1),e.data=e.privateData}},Ve={parseId3Frames:function(e){var t,i=10,n=0,s=[];if(!(e.length<10||e[0]!=="I".charCodeAt(0)||e[1]!=="D".charCodeAt(0)||e[2]!=="3".charCodeAt(0))){n=Be(e.subarray(6,10)),n+=10,64&e[5]&&(i+=4,i+=Be(e.subarray(10,14)),n-=Be(e.subarray(16,20)));do{if((t=Be(e.subarray(i+4,i+8)))<1)break;var r={id:String.fromCharCode(e[i],e[i+1],e[i+2],e[i+3]),data:e.subarray(i+10,i+t+10)};r.key=r.id,Fe[r.id]?Fe[r.id](r):"T"===r.id[0]?Fe["T*"](r):"W"===r.id[0]&&Fe["W*"](r),s.push(r),i+=10,i+=t}while(i<n);return s}},parseSyncSafeInteger:Be,frameParsers:Fe},He=Ie,qe=Ve;(Me=function(e){var t,i={descriptor:e&&e.descriptor},n=0,s=[],r=0;if(Me.prototype.init.call(this),this.dispatchType=He.METADATA_STREAM_TYPE.toString(16),i.descriptor)for(t=0;t<i.descriptor.length;t++)this.dispatchType+=("00"+i.descriptor[t].toString(16)).slice(-2);this.push=function(e){var t,i,a,o,l;if("timed-metadata"===e.type)if(e.dataAlignmentIndicator&&(r=0,s.length=0),0===s.length&&(e.data.length<10||e.data[0]!=="I".charCodeAt(0)||e.data[1]!=="D".charCodeAt(0)||e.data[2]!=="3".charCodeAt(0)))this.trigger("log",{level:"warn",message:"Skipping unrecognized metadata packet"});else if(s.push(e),r+=e.data.byteLength,1===s.length&&(n=qe.parseSyncSafeInteger(e.data.subarray(6,10)),n+=10),!(r<n)){for(t={data:new Uint8Array(n),frames:[],pts:s[0].pts,dts:s[0].dts},l=0;l<n;)t.data.set(s[0].data.subarray(0,n-l),l),l+=s[0].data.byteLength,r-=s[0].data.byteLength,s.shift();i=10,64&t.data[5]&&(i+=4,i+=qe.parseSyncSafeInteger(t.data.subarray(10,14)),n-=qe.parseSyncSafeInteger(t.data.subarray(16,20)));do{if((a=qe.parseSyncSafeInteger(t.data.subarray(i+4,i+8)))<1){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}if((o={id:String.fromCharCode(t.data[i],t.data[i+1],t.data[i+2],t.data[i+3]),data:t.data.subarray(i+10,i+a+10)}).key=o.id,qe.frameParsers[o.id]?qe.frameParsers[o.id](o):"T"===o.id[0]?qe.frameParsers["T*"](o):"W"===o.id[0]&&qe.frameParsers["W*"](o),"com.apple.streaming.transportStreamTimestamp"===o.owner){var u=o.data,c=(1&u[3])<<30|u[4]<<22|u[5]<<14|u[6]<<6|u[7]>>>2;c*=4,c+=3&u[7],o.timeStamp=c,void 0===t.pts&&void 0===t.dts&&(t.pts=o.timeStamp,t.dts=o.timeStamp),this.trigger("timestamp",o)}t.frames.push(o),i+=10,i+=a}while(i<n);this.trigger("data",t)}}}).prototype=new q;var $e,ze,We,Ge=Me,Ke=q,Qe=xe,Xe=Ie,Ye=De.TimestampRolloverStream,Je=188;($e=function(){var e=new Uint8Array(Je),t=0;$e.prototype.init.call(this),this.push=function(i){var n,s=0,r=Je;for(t?((n=new Uint8Array(i.byteLength+t)).set(e.subarray(0,t)),n.set(i,t),t=0):n=i;r<n.byteLength;)71!==n[s]||71!==n[r]?(s++,r++):(this.trigger("data",n.subarray(s,r)),s+=Je,r+=Je);s<n.byteLength&&(e.set(n.subarray(s),0),t=n.byteLength-s)},this.flush=function(){t===Je&&71===e[0]&&(this.trigger("data",e),t=0),this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")},this.reset=function(){t=0,this.trigger("reset")}}).prototype=new Ke,(ze=function(){var e,t,i,n;ze.prototype.init.call(this),n=this,this.packetsWaitingForPmt=[],this.programMapTable=void 0,e=function(e,n){var s=0;n.payloadUnitStartIndicator&&(s+=e[s]+1),"pat"===n.type?t(e.subarray(s),n):i(e.subarray(s),n)},t=function(e,t){t.section_number=e[7],t.last_section_number=e[8],n.pmtPid=(31&e[10])<<8|e[11],t.pmtPid=n.pmtPid},i=function(e,t){var i,s;if(1&e[5]){for(n.programMapTable={video:null,audio:null,"timed-metadata":{}},i=3+((15&e[1])<<8|e[2])-4,s=12+((15&e[10])<<8|e[11]);s<i;){var r=e[s],a=(31&e[s+1])<<8|e[s+2];r===Xe.H264_STREAM_TYPE&&null===n.programMapTable.video?n.programMapTable.video=a:r===Xe.ADTS_STREAM_TYPE&&null===n.programMapTable.audio?n.programMapTable.audio=a:r===Xe.METADATA_STREAM_TYPE&&(n.programMapTable["timed-metadata"][a]=r),s+=5+((15&e[s+3])<<8|e[s+4])}t.programMapTable=n.programMapTable}},this.push=function(t){var i={},n=4;if(i.payloadUnitStartIndicator=!!(64&t[1]),i.pid=31&t[1],i.pid<<=8,i.pid|=t[2],(48&t[3])>>>4>1&&(n+=t[n]+1),0===i.pid)i.type="pat",e(t.subarray(n),i),this.trigger("data",i);else if(i.pid===this.pmtPid)for(i.type="pmt",e(t.subarray(n),i),this.trigger("data",i);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,n,i]):this.processPes_(t,n,i)},this.processPes_=function(e,t,i){i.pid===this.programMapTable.video?i.streamType=Xe.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=Xe.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=e.subarray(t),this.trigger("data",i)}}).prototype=new Ke,ze.STREAM_TYPES={h264:27,adts:15},We=function(){var e,t=this,i=!1,n={data:[],size:0},s={data:[],size:0},r={data:[],size:0},a=function(e,i,n){var s,r,a=new Uint8Array(e.size),o={type:i},l=0,u=0;if(e.data.length&&!(e.size<9)){for(o.trackId=e.data[0].pid,l=0;l<e.data.length;l++)r=e.data[l],a.set(r.data,u),u+=r.data.byteLength;!function(e,t){var i;const n=e[0]<<16|e[1]<<8|e[2];t.data=new Uint8Array,1===n&&(t.packetLength=6+(e[4]<<8|e[5]),t.dataAlignmentIndicator=0!=(4&e[6]),192&(i=e[7])&&(t.pts=(14&e[9])<<27|(255&e[10])<<20|(254&e[11])<<12|(255&e[12])<<5|(254&e[13])>>>3,t.pts*=4,t.pts+=(6&e[13])>>>1,t.dts=t.pts,64&i&&(t.dts=(14&e[14])<<27|(255&e[15])<<20|(254&e[16])<<12|(255&e[17])<<5|(254&e[18])>>>3,t.dts*=4,t.dts+=(6&e[18])>>>1)),t.data=e.subarray(9+e[8]))}(a,o),s="video"===i||o.packetLength<=e.size,(n||s)&&(e.size=0,e.data.length=0),s&&t.trigger("data",o)}};We.prototype.init.call(this),this.push=function(o){({pat:function(){},pes:function(){var e,t;switch(o.streamType){case Xe.H264_STREAM_TYPE:e=n,t="video";break;case Xe.ADTS_STREAM_TYPE:e=s,t="audio";break;case Xe.METADATA_STREAM_TYPE:e=r,t="timed-metadata";break;default:return}o.payloadUnitStartIndicator&&a(e,t,!0),e.data.push(o),e.size+=o.data.byteLength},pmt:function(){var n={type:"metadata",tracks:[]};null!==(e=o.programMapTable).video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),i=!0,t.trigger("data",n)}})[o.type]()},this.reset=function(){n.size=0,n.data.length=0,s.size=0,s.data.length=0,this.trigger("reset")},this.flushStreams_=function(){a(n,"video"),a(s,"audio"),a(r,"timed-metadata")},this.flush=function(){if(!i&&e){var n={type:"metadata",tracks:[]};null!==e.video&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&n.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),t.trigger("data",n)}i=!1,this.flushStreams_(),this.trigger("done")}},We.prototype=new Ke;var Ze={PAT_PID:0,MP2T_PACKET_LENGTH:Je,TransportPacketStream:$e,TransportParseStream:ze,ElementaryStream:We,TimestampRolloverStream:Ye,CaptionStream:Qe.CaptionStream,Cea608Stream:Qe.Cea608Stream,Cea708Stream:Qe.Cea708Stream,MetadataStream:Ge};for(var et in Xe)Xe.hasOwnProperty(et)&&(Ze[et]=Xe[et]);var tt,it=Ze,nt=le.ONE_SECOND_IN_TS,st=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(tt=function(e){var t,i=0;tt.prototype.init.call(this),this.skipWarn_=function(e,t){this.trigger("log",{level:"warn",message:`adts ski
2ping bytes ${e} to ${t} in frame ${i} outside syncword`})},this.push=function(n){var s,r,a,o,l,u=0;if(e||(i=0),"audio"===n.type){var c;for(t&&t.length?(a=t,(t=new Uint8Array(a.byteLength+n.data.byteLength)).set(a),t.set(n.data,a.byteLength)):t=n.data;u+7<t.length;)if(255===t[u]&&240==(246&t[u+1])){if("number"==typeof c&&(this.skipWarn_(c,u),c=null),r=2*(1&~t[u+1]),s=(3&t[u+3])<<11|t[u+4]<<3|(224&t[u+5])>>5,l=(o=1024*(1+(3&t[u+6])))*nt/st[(60&t[u+2])>>>2],t.byteLength-u<s)break;this.trigger("data",{pts:n.pts+i*l,dts:n.dts+i*l,sampleCount:o,audioobjecttype:1+(t[u+2]>>>6&3),channelcount:(1&t[u+2])<<2|(192&t[u+3])>>>6,samplerate:st[(60&t[u+2])>>>2],samplingfrequencyindex:(60&t[u+2])>>>2,samplesize:16,data:t.subarray(u+7+r,u+s)}),i++,u+=s}else"number"!=typeof c&&(c=u),u++;"number"==typeof c&&(this.skipWarn_(c,u),c=null),t=t.subarray(u)}},this.flush=function(){i=0,this.trigger("done")},this.reset=function(){t=void 0,this.trigger("reset")},this.endTimeline=function(){t=void 0,this.trigger("endedtimeline")}}).prototype=new q;var rt,at,ot,lt=tt,ut=q,ct=function(e){var t=e.byteLength,i=0,n=0;this.length=function(){return 8*t},this.bitsAvailable=function(){return 8*t+n},this.loadWord=function(){var s=e.byteLength-t,r=new Uint8Array(4),a=Math.min(4,t);if(0===a)throw new Error("no bytes available");r.set(e.subarray(s,s+a)),i=new DataView(r.buffer).getUint32(0),n=8*a,t-=a},this.skipBits=function(e){var s;n>e?(i<<=e,n-=e):(e-=n,e-=8*(s=Math.floor(e/8)),t-=s,this.loadWord(),i<<=e,n-=e)},this.readBits=function(e){var s=Math.min(n,e),r=i>>>32-s;return(n-=s)>0?i<<=s:t>0&&this.loadWord(),(s=e-s)>0?r<<s|this.readBits(s):r},this.skipLeadingZeros=function(){var e;for(e=0;e<n;++e)if(0!=(i&2147483648>>>e))return i<<=e,n-=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()};(at=function(){var e,t,i=0;at.prototype.init.call(this),this.push=function(n){var s;t?((s=new Uint8Array(t.byteLength+n.data.byteLength)).set(t),s.set(n.data,t.byteLength),t=s):t=n.data;for(var r=t.byteLength;i<r-3;i++)if(1===t[i+2]){e=i+5;break}for(;e<r;)switch(t[e]){case 0:if(0!==t[e-1]){e+=2;break}if(0!==t[e-2]){e++;break}i+3!==e-2&&this.trigger("data",t.subarray(i+3,e-2));do{e++}while(1!==t[e]&&e<r);i=e-2,e+=3;break;case 1:if(0!==t[e-1]||0!==t[e-2]){e+=3;break}this.trigger("data",t.subarray(i+3,e-2)),i=e-2,e+=3;break;default:e+=3}t=t.subarray(i),e-=i,i=0},this.reset=function(){t=null,i=0,this.trigger("reset")},this.flush=function(){t&&t.byteLength>3&&this.trigger("data",t.subarray(i+3)),t=null,i=0,this.trigger("done")},this.endTimeline=function(){this.flush(),this.trigger("endedtimeline")}}).prototype=new ut,ot={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0},rt=function(){var e,t,i,n,s,r,a,o=new at;rt.prototype.init.call(this),e=this,this.push=function(e){"video"===e.type&&(t=e.trackId,i=e.pts,n=e.dts,o.push(e))},o.on("data",(function(a){var o={trackId:t,pts:i,dts:n,data:a,nalUnitTypeCode:31&a[0]};switch(o.nalUnitTypeCode){case 5:o.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:o.nalUnitType="sei_rbsp",o.escapedRBSP=s(a.subarray(1));break;case 7:o.nalUnitType="seq_parameter_set_rbsp",o.escapedRBSP=s(a.subarray(1)),o.config=r(o.escapedRBSP);break;case 8:o.nalUnitType="pic_parameter_set_rbsp";break;case 9:o.nalUnitType="access_unit_delimiter_rbsp"}e.trigger("data",o)})),o.on("done",(function(){e.trigger("done")})),o.on("partialdone",(function(){e.trigger("partialdone")})),o.on("reset",(function(){e.trigger("reset")})),o.on("endedtimeline",(function(){e.trigger("endedtimeline")})),this.flush=function(){o.flush()},this.partialFlush=function(){o.partialFlush()},this.reset=function(){o.reset()},this.endTimeline=function(){o.endTimeline()},a=function(e,t){var i,n=8,s=8;for(i=0;i<e;i++)0!==s&&(s=(n+t.readExpGolomb()+256)%256),n=0===s?n:s},s=function(e){for(var t,i,n=e.byteLength,s=[],r=1;r<n-2;)0===e[r]&&0===e[r+1]&&3===e[r+2]?(s.push(r+2),r+=2):r++;if(0===s.length)return e;t=n-s.length,i=new Uint8Array(t);var a=0;for(r=0;r<t;a++,r++)a===s[0]&&(a++,s.shift()),i[r]=e[a];return i},r=function(e){var t,i,n,s,r,o,l,u,c,h,d,p,f=0,g=0,m=0,y=0,_=[1,1];if(i=(t=new ct(e)).readUnsignedByte(),s=t.readUnsignedByte(),n=t.readUnsignedByte(),t.skipUnsignedExpGolomb(),ot[i]&&(3===(r=t.readUnsignedExpGolomb())&&t.skipBits(1),t.skipUnsignedExpGolomb(),t.skipUnsignedExpGolomb(),t.skipBits(1),t.readBoolean()))for(d=3!==r?8:12,p=0;p<d;p++)t.readBoolean()&&a(p<6?16:64,t);if(t.skipUnsignedExpGolomb(),0===(o=t.readUnsignedExpGolomb()))t.readUnsignedExpGolomb();else if(1===o)for(t.skipBits(1),t.skipExpGolomb(),t.skipExpGolomb(),l=t.readUnsignedExpGolomb(),p=0;p<l;p++)t.skipExpGolomb();if(t.skipUnsignedExpGolomb(),t.skipBits(1),u=t.readUnsignedExpGolomb(),c=t.readUnsignedExpGolomb(),0===(h=t.readBits(1))&&t.skipBits(1),t.skipBits(1),t.readBoolean()&&(f=t.readUnsignedExpGolomb(),g=t.readUnsignedExpGolomb(),m=t.readUnsignedExpGolomb(),y=t.readUnsignedExpGolomb()),t.readBoolean()&&t.readBoolean()){switch(t.readUnsignedByte()){case 1:_=[1,1];break;case 2:_=[12,11];break;case 3:_=[10,11];break;case 4:_=[16,11];break;case 5:_=[40,33];break;case 6:_=[24,11];break;case 7:_=[20,11];break;case 8:_=[32,11];break;case 9:_=[80,33];break;case 10:_=[18,11];break;case 11:_=[15,11];break;case 12:_=[64,33];break;case 13:_=[160,99];break;case 14:_=[4,3];break;case 15:_=[3,2];break;case 16:_=[2,1];break;case 255:_=[t.readUnsignedByte()<<8|t.readUnsignedByte(),t.readUnsignedByte()<<8|t.readUnsignedByte()]}_&&(_[0],_[1])}return{profileIdc:i,levelIdc:n,profileCompatibility:s,width:16*(u+1)-2*f-2*g,height:(2-h)*(c+1)*16-2*m-2*y,sarRatio:_}}},rt.prototype=new ut;var ht,dt={H264Stream:rt,NalByteStream:at},pt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],ft=function(e,t){var i=e[t+6]<<21|e[t+7]<<14|e[t+8]<<7|e[t+9];return i=i>=0?i:0,(16&e[t+5])>>4?i+20:i+10},gt=function(e,t){return e.length-t<10||e[t]!=="I".charCodeAt(0)||e[t+1
vendor: 21,638 bytes, line 2
2]!=="D".charCodeAt(0)||e[t+2]!=="3".charCodeAt(0)?t:(t+=ft(e,t),gt(e,t))},mt=function(e){return e[0]<<21|e[1]<<14|e[2]<<7|e[3]},yt={isLikelyAacData:function(e){var t=gt(e,0);return e.length>=t+2&&255==(255&e[t])&&240==(240&e[t+1])&&16==(22&e[t+1])},parseId3TagSize:ft,parseAdtsSize:function(e,t){var i=(224&e[t+5])>>5,n=e[t+4]<<3;return 6144&e[t+3]|n|i},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 pt[(60&e[t+2])>>>2];t++}return null},parseAacTimestamp:function(e){var t,i,n;t=10,64&e[5]&&(t+=4,t+=mt(e.subarray(10,14)));do{if((i=mt(e.subarray(t+4,t+8)))<1)return null;if("PRIV"===String.fromCharCode(e[t],e[t+1],e[t+2],e[t+3])){n=e.subarray(t+10,t+i+10);for(var s=0;s<n.byteLength;s++)if(0===n[s]){var r=unescape(function(e,t,i){var n,s="";for(n=0;n<i;n++)s+="%"+("00"+e[n].toString(16)).slice(-2);return s}(n,0,s));if("com.apple.streaming.transportStreamTimestamp"===r){var a=n.subarray(s+1),o=(1&a[3])<<30|a[4]<<22|a[5]<<14|a[6]<<6|a[7]>>>2;return(o*=4)+(3&a[7])}break}}t+=10,t+=i}while(t<e.byteLength);return null}},_t=yt;(ht=function(){var e=new Uint8Array,t=0;ht.prototype.init.call(this),this.setTimestamp=function(e){t=e},this.push=function(i){var n,s,r,a,o=0,l=0;for(e.length?(a=e.length,(e=new Uint8Array(i.byteLength+a)).set(e.subarray(0,a)),e.set(i,a)):e=i;e.length-l>=3;)if(e[l]!=="I".charCodeAt(0)||e[l+1]!=="D".charCodeAt(0)||e[l+2]!=="3".charCodeAt(0))if(255!=(255&e[l])||240!=(240&e[l+1]))l++;else{if(e.length-l<7)break;if(l+(o=_t.parseAdtsSize(e,l))>e.length)break;r={type:"audio",data:e.subarray(l,l+o),pts:t,dts:t},this.trigger("data",r),l+=o}else{if(e.length-l<10)break;if(l+(o=_t.parseId3TagSize(e,l))>e.length)break;s={type:"timed-metadata",data:e.subarray(l,l+o)},this.trigger("data",s),l+=o}n=e.length-l,e=n>0?e.subarray(l):new Uint8Array},this.reset=function(){e=new Uint8Array,this.trigger("reset")},this.endTimeline=function(){e=new Uint8Array,this.trigger("endedtimeline")}}).prototype=new q;var vt,bt,Tt,St,kt=q,wt=te,Ct=ne,Et=ce,xt=de,It=it,Ot=le,Pt=lt,At=dt.H264Stream,Lt=ht,Mt=yt.isLikelyAacData,Dt=le.ONE_SECOND_IN_TS,jt=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Rt=["width","height","profileIdc","levelIdc","profileCompatibility","sarRatio"],Nt=function(e,t){t.stream=e,this.trigger("log",t)},Ut=function(e,t){for(var i=Object.keys(t),n=0;n<i.length;n++){var s=i[n];"headOfPipeline"!==s&&t[s].on&&t[s].on("log",Nt.bind(e,s))}},Bt=function(e,t){var i;if(e.length!==t.length)return!1;for(i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0},Ft=function(e,t,i,n,s,r){return{start:{dts:e,pts:e+(i-t)},end:{dts:e+(n-t),pts:e+(s-i)},prependedContentDuration:r,baseMediaDecodeTime:e}};bt=function(e,t){var i,n=[],s=0,r=0,a=1/0;i=(t=t||{}).firstSequenceNumber||0,bt.prototype.init.call(this),this.push=function(t){xt.collectDtsInfo(e,t),e&&jt.forEach((function(i){e[i]=t[i]})),n.push(t)},this.setEarliestDts=function(e){s=e},this.setVideoBaseMediaDecodeTime=function(e){a=e},this.setAudioAppendStart=function(e){r=e},this.flush=function(){var o,l,u,c,h,d,p;0!==n.length?(o=Et.trimAdtsFramesByEarliestDts(n,e,s),e.baseMediaDecodeTime=xt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),p=Et.prefixWithSilence(e,o,r,a),e.samples=Et.generateSampleTable(o),u=wt.mdat(Et.concatenateFrameData(o)),n=[],l=wt.moof(i,[e]),c=new Uint8Array(l.byteLength+u.byteLength),i++,c.set(l),c.set(u,l.byteLength),xt.clearDtsInfo(e),h=Math.ceil(1024*Dt/e.samplerate),o.length&&(d=o.length*h,this.trigger("segmentTimingInfo",Ft(Ot.audioTsToVideoTs(e.baseMediaDecodeTime,e.samplerate),o[0].dts,o[0].pts,o[0].dts+d,o[0].pts+d,p||0)),this.trigger("timingInfo",{start:o[0].pts,end:o[0].pts+d})),this.trigger("data",{track:e,boxes:c}),this.trigger("done","AudioSegmentStream")):this.trigger("done","AudioSegmentStream")},this.reset=function(){xt.clearDtsInfo(e),n=[],this.trigger("reset")}},bt.prototype=new kt,vt=function(e,t){var i,n,s,r=[],a=[];i=(t=t||{}).firstSequenceNumber||0,vt.prototype.init.call(this),delete e.minPTS,this.gopCache_=[],this.push=function(t){xt.collectDtsInfo(e,t),"seq_parameter_set_rbsp"!==t.nalUnitType||n||(n=t.config,e.sps=[t.data],Rt.forEach((function(t){e[t]=n[t]}),this)),"pic_parameter_set_rbsp"!==t.nalUnitType||s||(s=t.data,e.pps=[t.data]),r.push(t)},this.flush=function(){for(var n,s,o,l,u,c,h,d,p=0;r.length&&"access_unit_delimiter_rbsp"!==r[0].nalUnitType;)r.shift();if(0===r.length)return this.resetStream_(),void this.trigger("done","VideoSegmentStream");if(n=Ct.groupNalsIntoFrames(r),(o=Ct.groupFramesIntoGops(n))[0][0].keyFrame||((s=this.getGopForFusion_(r[0],e))?(p=s.duration,o.unshift(s),o.byteLength+=s.byteLength,o.nalCount+=s.nalCount,o.pts=s.pts,o.dts=s.dts,o.duration+=s.duration):o=Ct.extendFirstKeyFrame(o)),a.length){var f;if(!(f=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),r=[],this.resetStream_(),void this.trigger("done","VideoSegmentStream");xt.clearDtsInfo(e),o=f}xt.collectDtsInfo(e,o),e.samples=Ct.generateSampleTable(o),u=wt.mdat(Ct.concatenateNalData(o)),e.baseMediaDecodeTime=xt.calculateTrackBaseMediaDecodeTime(e,t.keepOriginalTimestamps),this.trigger("processedGopsInfo",o.map((function(e){return{pts:e.pts,dts:e.dts,byteLength:e.byteLength}}))),h=o[0],d=o[o.length-1],this.trigger("segmentTimingInfo",Ft(e.baseMediaDecodeTime,h.dts,h.pts,d.dts+d.duration,d.pts+d.duration,p)),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),r=[],this.trigger("baseMediaDecodeTime",e.baseMediaDecodeTime),this.trigger("timelineStartInfo",e.timelineStartInfo),l=wt.moof(i,[e]),c=new Uint8Array(l.byteLength+u.byteLength),i++,c.set(l),c.set(u,l.byteLength),this.trigger("data",{track:e,boxes:c}),this.resetStream_(),this.trigger("done","VideoSegmentStream")},this.reset=function(){this.resetStream_(),r=[],this.gopCache_.length=0,a.length=0,this.trigger("reset")},this.resetStream_=function(){xt.clearDtsInfo(e),n=void 0,s=void 0},this.getGopForFusion_=function(t){var i,n,s,r,a,o=1/0;for(a=0;a<this.gopCache_.length;a++)s=(r=this.gopCache_[a]).gop,e.pps&&Bt(e.pps[0],r.pps[0])&&e.sps&&Bt(e.sps[0],r.sps[0])&&(s.dts<e.timelineStartInfo.dts||(i=t.dts-s.dts-s.duration)>=-1e4&&i<=45e3&&(!n||o>i)&&(n=r,o=i));return n?n.gop:null},this.alignGopsAtStart_=function(e){var t,i,n,s,r,o,l,u;for(r=e.byteLength,o=e.nalCount,l=e.duration,t=i=0;t<a.length&&i<e.length&&(n=a[t],s=e[i],n.pts!==s.pts);)s.pts>n.pts?t++:(i++,r-=s.byteLength,o-=s.nalCount,l-=s.duration);return 0===i?e:i===e.length?null:((u=e.slice(i)).byteLength=r,u.duration=l,u.nalCount=o,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(e){var t,i,n,s,r,o,l;for(t=a.length-1,i=e.length-1,r=null,o=!1;t>=0&&i>=0;){if(n=a[t],s=e[i],n.pts===s.pts){o=!0;break}n.pts>s.pts?t--:(t===a.length-1&&(r=i),i--)}if(!o&&null===r)return null;if(0===(l=o?i:r))return e;var u=e.slice(l),c=u.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 u.byteLength=c.byteLength,u.duration=c.duration,u.nalCount=c.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(e){a=e}},vt.prototype=new kt,St=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,St.prototype.init.call(this),this.push=function(e){return e.content||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))))}},St.prototype=new kt,St.prototype.flush=function(e){var t,i,n,s,r=0,a={captions:[],captionStreams:{},metadata:[],info:{}},o=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?(o=this.videoTrack.timelineStartInfo.pts,Rt.forEach((function(e){a.info[e]=this.videoTrack[e]}),this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,jt.forEach((function(e){a.info[e]=this.audioTrack[e]}),this)),this.videoTrack||this.audioTrack){for(1===this.pendingTracks.length?a.type=this.pendingTracks[0].type:a.type="combined",this.emittedTracks+=this.pendingTracks.length,n=wt.initSegment(this.pendingTracks),a.initSegment=new Uint8Array(n.byteLength),a.initSegment.set(n),a.data=new Uint8Array(this.pendingBytes),s=0;s<this.pendingBoxes.length;s++)a.data.set(this.pendingBoxes[s],r),r+=this.pendingBoxes[s].byteLength;for(s=0;s<this.pendingCaptions.length;s++)(t=this.pendingCaptions[s]).startTime=Ot.metadataTsToSeconds(t.startPts,o,this.keepOriginalTimestamps),t.endTime=Ot.metadataTsToSeconds(t.endPts,o,this.keepOriginalTimestamps),a.captionStreams[t.stream]=!0,a.captions.push(t);for(s=0;s<this.pendingMetadata.length;s++)(i=this.pendingMetadata[s]).cueTime=Ot.metadataTsToSeconds(i.pts,o,this.keepOriginalTimestamps),a.metadata.push(i);for(a.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",a),s=0;s<a.captions.length;s++)t=a.captions[s],this.trigger("caption",t);for(s=0;s<a.metadata.length;s++)i=a.metadata[s],this.trigger("id3Frame",i)}this.emittedTracks>=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},St.prototype.setRemux=function(e){this.remuxTracks=e},(Tt=function(e){var t,i,n=this,s=!0;Tt.prototype.init.call(this),e=e||{},this.baseMediaDecodeTime=e.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var s={};this.transmuxPipeline_=s,s.type="aac",s.metadataStream=new It.MetadataStream,s.aacStream=new Lt,s.audioTimestampRolloverStream=new It.TimestampRolloverStream("audio"),s.timedMetadataTimestampRolloverStream=new It.TimestampRolloverStream("timed-metadata"),s.adtsStream=new Pt,s.coalesceStream=new St(e,s.metadataStream),s.headOfPipeline=s.aacStream,s.aacStream.pipe(s.audioTimestampRolloverStream).pipe(s.adtsStream),s.aacStream.pipe(s.timedMetadataTimestampRolloverStream).pipe(s.metadataStream).pipe(s.coalesceStream),s.metadataStream.on("timestamp",(function(e){s.aacStream.setTimestamp(e.timeStamp)})),s.aacStream.on("data",(function(r){"timed-metadata"!==r.type&&"audio"!==r.type||s.audioSegmentStream||(i=i||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},s.coalesceStream.numberOfTracks++,s.audioSegmentStream=new bt(i,e),s.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),s.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),s.adtsStream.pipe(s.audioSegmentStream).pipe(s.coalesceStream),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t}))})),s.coalesceStream.on("data",this.trigger.bind(this,"data")),s.coalesceStream.on("done",this.trigger.bind(this,"done")),Ut(this,s)},this.setupTsPipeline=function(){var s={};this.transmuxPipeline_=s,s.type="ts",s.metadataStream=new It.MetadataStream,s.packetStream=new It.TransportPacketStream,s.parseStream=new It.TransportParseStream,s.elementaryStream=new It.ElementaryStream,s.timestampRolloverStream=new It.TimestampRolloverStream,s.adtsStream=new Pt,s.h264Stream=new At,s.captionStream=new It.CaptionStream(e),s.coalesceStream=new St(e,s.metadataStream),s.headOfPipeline=s.packetStream,s.packetStream.pipe(s.parseStream).pipe(s.elementaryStream).pipe(s.timestampRolloverStream),s.timestampRolloverStream.pipe(s.h264Stream),s.timestampRolloverStream.pipe(s.adtsStream),s.timestampRolloverStream.pipe(s.metadataStream).pipe(s.coalesceStream),s.h264Stream.pipe(s.captionStream).pipe(s.coalesceStream),s.elementaryStream.on("data",(function(r){var a;if("metadata"===r.type){for(a=r.tracks.length;a--;)t||"video"!==r.tracks[a].type?i||"audio"!==r.tracks[a].type||((i=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime):(t=r.tracks[a]).timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime;t&&!s.videoSegmentStream&&(s.coalesceStream.numberOfTracks++,s.videoSegmentStream=new vt(t,e),s.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),s.videoSegmentStream.on("timelineStartInfo",(function(t){i&&!e.keepOriginalTimestamps&&(i.timelineStartInfo=t,s.audioSegmentStream.setEarliestDts(t.dts-n.baseMediaDecodeTime))})),s.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n,"gopInfo")),s.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),s.videoSegmentStream.on("baseMediaDecodeTime",(function(e){i&&s.audioSegmentStream.setVideoBaseMediaDecodeTime(e)})),s.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),s.h264Stream.pipe(s.videoSegmentStream).pipe(s.coalesceStream)),i&&!s.audioSegmentStream&&(s.coalesceStream.numberOfTracks++,s.audioSegmentStream=new bt(i,e),s.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),s.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),s.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),s.adtsStream.pipe(s.audioSegmentStream).pipe(s.coalesceStream)),n.trigger("trackinfo",{hasAudio:!!i,hasVideo:!!t})}})),s.coalesceStream.on("data",this.trigger.bind(this,"data")),s.coalesceStream.on("id3Frame",(function(e){e.dispatchType=s.metadataStream.dispatchType,n.trigger("id3Frame",e)})),s.coalesceStream.on("caption",this.trigger.bind(this,"caption")),s.coalesceStream.on("done",this.trigger.bind(this,"done")),Ut(this,s)},this.setBaseMediaDecodeTime=function(n){var s=this.transmuxPipeline_;e.keepOriginalTimestamps||(this.baseMediaDecodeTime=n),i&&(i.timelineStartInfo.dts=void 0,i.timelineStartInfo.pts=void 0,xt.clearDtsInfo(i),s.audioTimestampRolloverStream&&s.audioTimestampRolloverStream.discontinuity()),t&&(s.videoSegmentStream&&(s.videoSegmentStream.gopCache_=[]),t.timelineStartInfo.dts=void 0,t.timelineStartInfo.pts=void 0,xt.clearDtsInfo(t),s.captionStream.reset()),s.timestampRolloverStream&&s.timestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(e){i&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(e)},this.setRemux=function(t){var i=this.transmuxPipeline_;e.remux=t,i&&i.coalesceStream&&i.coalesceStream.setRemux(t)},this.alignGopsWith=function(e){t&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(e)},this.getLogTrigger_=function(e){var t=this;return function(i){i.stream=e,t.trigger("log",i)}},this.push=function(e){if(s){var t=Mt(e);t&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():t||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),s=!1}this.transmuxPipeline_.headOfPipeline.push(e)},this.flush=function(){s=!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 kt;var Vt,Ht,qt={Transmuxer:Tt,VideoSegmentStream:vt,AudioSegmentStream:bt,AUDIO_PROPERTIES:jt,VIDEO_PROPERTIES:Rt,generateSegmentTimingInfo:Ft},$t=function(e){return e>>>0},zt=function(e){var t="";return t+=String.fromCharCode(e[0]),t+=String.fromCharCode(e[1]),(t+=String.fromCharCode(e[2]))+String.fromCharCode(e[3])},Wt=$t,Gt=zt,Kt=function(e,t){var i,n,s,r,a,o=[];if(!t.length)return null;for(i=0;i<e.byteLength;)n=Wt(e[i]<<24|e[i+1]<<16|e[i+2]<<8|e[i+3]),s=Gt(e.subarray(i+4,i+8)),r=n>1?i+n:e.byteLength,s===t[0]&&(1===t.length?o.push(e.subarray(i+8,r)):(a=Kt(e.subarray(i+8,r),t.slice(1))).length&&(o=o.concat(a))),i=r;return o},Qt=Kt,Xt=$t,Yt=z.getUint64,Jt=function(e){var t={version:e[0],flags:new Uint8Array(e.subarray(1,4))};return 1===t.version?t.baseMediaDecodeTime=Yt(e.subarray(4)):t.baseMediaDecodeTime=Xt(e[4]<<24|e[5]<<16|e[6]<<8|e[7]),t},Zt=function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:i.getUint32(4)},s=1&n.flags[2],r=2&n.flags[2],a=8&n.flags[2],o=16&n.flags[2],l=32&n.flags[2],u=65536&n.flags[0],c=131072&n.flags[0];return t=8,s&&(t+=4,n.baseDataOffset=i.getUint32(12),t+=4),r&&(n.sampleDescriptionIndex=i.getUint32(t),t+=4),a&&(n.defaultSampleDuration=i.getUint32(t),t+=4),o&&(n.defaultSampleSize=i.getUint32(t),t+=4),l&&(n.defaultSampleFlags=i.getUint32(t)),u&&(n.durationIsEmpty=!0),!s&&c&&(n.baseDataOffsetIsMoof=!0),n},ei=z.getUint64,ti=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]}},ii=function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]},n=new DataView(e.buffer,e.byteOffset,e.byteLength),s=1&i.flags[2],r=4&i.flags[2],a=1&i.flags[1],o=2&i.flags[1],l=4&i.flags[1],u=8&i.flags[1],c=n.getUint32(4),h=8;for(s&&(i.dataOffset=n.getInt32(h),h+=4),r&&c&&(t={flags:ti(e.subarray(h,h+4))},h+=4,a&&(t.duration=n.getUint32(h),h+=4),o&&(t.size=n.getUint32(h),h+=4),u&&(1===i.version?t.compositionTimeOffset=n.getInt32(h):t.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(t),c--);c--;)t={},a&&(t.duration=n.getUint32(h),h+=4),o&&(t.size=n.getUint32(h),h+=4),l&&(t.flags=ti(e.subarray(h,h+4)),h+=4),u&&(1===i.version?t.compositionTimeOffset=n.getInt32(h):t.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(t);return i},ni=z.getUint64,si=function(e){return new Date(1e3*e-20828448e5)},ri=zt,ai=function(e){var t,i,n=new DataView(e.buffer,e.byteOffset,e.byteLength),s=[];for(t=0;t+4<e.length;t+=i)if(i=n.getUint32(t),t+=4,i<=0)s.push("<span style='color:red;'>MALFORMED DATA</span>");else switch(31&e[t]){case 1:s.push("slice_layer_without_partitioning_rbsp");break;case 5:s.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:s.push("sei_rbsp");break;case 7:s.push("seq_parameter_set_rbsp");break;case 8:s.push("pic_parameter_set_rbsp");break;case 9:s.push("access_unit_delimiter_rbsp");break;default:s.push("UNKNOWN NAL - "+e[t]&31)}return s},oi={avc1:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{dataReferenceIndex:t.getUint16(6),width:t.getUint16(24),height:t.getUint16(26),horizresolution:t.getUint16(28)+t.getUint16(30)/16,vertresolution:t.getUint16(32)+t.getUint16(34)/16,frameCount:t.getUint16(40),depth:t.getUint16(74),config:Vt(e.subarray(78,e.byteLength))}},avcC:function(e){var t,i,n,s,r=new DataView(e.buffer,e.byteOffset,e.byteLength),a={configurationVersion:e[0],avcProfileIndication:e[1],profileCompatibility:e[2],avcLevelIndication:e[3],lengthSizeMinusOne:3&e[4],sps:[],pps:[]},o=31&e[5];for(n=6,s=0;s<o;s++)i=r.getUint16(n),n+=2,a.sps.push(new Uint8Array(e.subarray(n,n+i))),n+=i;for(t=e[n],n++,s=0;s<t;s++)i=r.getUint16(n),n+=2,a.pps.push(new Uint8Array(e.subarray(n,n+i))),n+=i;return a},btrt:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{bufferSizeDB:t.getUint32(0),maxBitrate:t.getUint32(4),avgBitrate:t.getUint32(8)}},edts:function(e){return{boxes:Vt(e)}},elst:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),edits:[]},s=i.getUint32(4);for(t=8;s;s--)0===n.version?(n.edits.push({segmentDuration:i.getUint32(t),mediaTime:i.getInt32(t+4),mediaRate:i.getUint16(t+8)+i.getUint16(t+10)/65536}),t+=12):(n.edits.push({segmentDuration:ni(e.subarray(t)),mediaTime:ni(e.subarray(t+8)),mediaRate:i.getUint16(t+16)+i.getUint16(t+18)/65536}),t+=20);return n},esds:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),esId:e[6]<<8|e[7],streamPriority:31&e[8],decoderConfig:{objectProfileIndication:e[11],streamType:e[12]>>>2&63,bufferSize:e[13]<<16|e[14]<<8|e[15],maxBitrate:e[16]<<24|e[17]<<16|e[18]<<8|e[19],avgBitrate:e[20]<<24|e[21]<<16|e[22]<<8|e[23],decoderConfigDescriptor:{tag:e[24],length:e[25],audioObjectType:e[26]>>>3&31,samplingFrequencyIndex:(7&e[26])<<1|e[27]>>>7&1,channelConfiguration:e[27]>>>3&15}}}},ftyp:function(e){for(var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={majorBrand:ri(e.subarray(0,4)),minorVersion:t.getUint32(4),compatibleBrands:[]},n=8;n<e.byteLength;)i.compatibleBrands.push(ri(e.subarray(n,n+4))),n+=4;return i},dinf:function(e){return{boxes:Vt(e)}},dref:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),dataReferences:Vt(e.subarray(8))}},hdlr:function(e){var t={version:new DataView(e.buffer,e.byteOffset,e.byteLength).getUint8(0),flags:new Uint8Array(e.subarray(1,4)),handlerType:ri(e.subarray(8,12)),name:""},i=8;for(i=24;i<e.byteLength;
vendor: 4,199 bytes, line 2
2i++){if(0===e[i]){i++;break}t.name+=String.fromCharCode(e[i])}return t.name=decodeURIComponent(escape(t.name)),t},mdat:function(e){return{byteLength:e.byteLength,nals:ai(e)}},mdhd:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n=4,s={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),language:""};return 1===s.version?(n+=4,s.creationTime=si(i.getUint32(n)),n+=8,s.modificationTime=si(i.getUint32(n)),n+=4,s.timescale=i.getUint32(n),n+=8,s.duration=i.getUint32(n)):(s.creationTime=si(i.getUint32(n)),n+=4,s.modificationTime=si(i.getUint32(n)),n+=4,s.timescale=i.getUint32(n),n+=4,s.duration=i.getUint32(n)),n+=4,t=i.getUint16(n),s.language+=String.fromCharCode(96+(t>>10)),s.language+=String.fromCharCode(96+((992&t)>>5)),s.language+=String.fromCharCode(96+(31&t)),s},mdia:function(e){return{boxes:Vt(e)}},mfhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sequenceNumber:e[4]<<24|e[5]<<16|e[6]<<8|e[7]}},minf:function(e){return{boxes:Vt(e)}},mp4a:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={dataReferenceIndex:t.getUint16(6),channelcount:t.getUint16(16),samplesize:t.getUint16(18),samplerate:t.getUint16(24)+t.getUint16(26)/65536};return e.byteLength>28&&(i.streamDescriptor=Vt(e.subarray(28))[0]),i},moof:function(e){return{boxes:Vt(e)}},moov:function(e){return{boxes:Vt(e)}},mvex:function(e){return{boxes:Vt(e)}},mvhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=si(t.getUint32(i)),i+=8,n.modificationTime=si(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=8,n.duration=t.getUint32(i)):(n.creationTime=si(t.getUint32(i)),i+=4,n.modificationTime=si(t.getUint32(i)),i+=4,n.timescale=t.getUint32(i),i+=4,n.duration=t.getUint32(i)),i+=4,n.rate=t.getUint16(i)+t.getUint16(i+2)/16,i+=4,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,i+=8,n.matrix=new Uint32Array(e.subarray(i,i+36)),i+=36,i+=24,n.nextTrackId=t.getUint32(i),n},pdin:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),rate:t.getUint32(4),initialDelay:t.getUint32(8)}},sdtp:function(e){var t,i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),samples:[]};for(t=4;t<e.byteLength;t++)i.samples.push({dependsOn:(48&e[t])>>4,isDependedOn:(12&e[t])>>2,hasRedundancy:3&e[t]});return i},sidx:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i={version:e[0],flags:new Uint8Array(e.subarray(1,4)),references:[],referenceId:t.getUint32(4),timescale:t.getUint32(8)},n=12;0===i.version?(i.earliestPresentationTime=t.getUint32(n),i.firstOffset=t.getUint32(n+4),n+=8):(i.earliestPresentationTime=ei(e.subarray(n)),i.firstOffset=ei(e.subarray(n+8)),n+=16),n+=2;var s=t.getUint16(n);for(n+=2;s>0;n+=12,s--)i.references.push({referenceType:(128&e[n])>>>7,referencedSize:2147483647&t.getUint32(n),subsegmentDuration:t.getUint32(n+4),startsWithSap:!!(128&e[n+8]),sapType:(112&e[n+8])>>>4,sapDeltaTime:268435455&t.getUint32(n+8)});return i},smhd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),balance:e[4]+e[5]/256}},stbl:function(e){return{boxes:Vt(e)}},ctts:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),compositionOffsets:[]},s=i.getUint32(4);for(t=8;s;t+=8,s--)n.compositionOffsets.push({sampleCount:i.getUint32(t),sampleOffset:i[0===n.version?"getUint32":"getInt32"](t+4)});return n},stss:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:i.getUint8(0),flags:new Uint8Array(e.subarray(1,4)),syncSamples:[]},s=i.getUint32(4);for(t=8;s;t+=4,s--)n.syncSamples.push(i.getUint32(t));return n},stco:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),chunkOffsets:[]},s=i.getUint32(4);for(t=8;s;t+=4,s--)n.chunkOffsets.push(i.getUint32(t));return n},stsc:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n=i.getUint32(4),s={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleToChunks:[]};for(t=8;n;
vendor: 39,620 bytes, line 2
2t+=12,n--)s.sampleToChunks.push({firstChunk:i.getUint32(t),samplesPerChunk:i.getUint32(t+4),sampleDescriptionIndex:i.getUint32(t+8)});return s},stsd:function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleDescriptions:Vt(e.subarray(8))}},stsz:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(t=12;t<e.byteLength;t+=4)n.entries.push(i.getUint32(t));return n},stts:function(e){var t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),n={version:e[0],flags:new Uint8Array(e.subarray(1,4)),timeToSamples:[]},s=i.getUint32(4);for(t=8;s;t+=8,s--)n.timeToSamples.push({sampleCount:i.getUint32(t),sampleDelta:i.getUint32(t+4)});return n},styp:function(e){return oi.ftyp(e)},tfdt:Jt,tfhd:Zt,tkhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength),i=4,n={version:t.getUint8(0),flags:new Uint8Array(e.subarray(1,4))};return 1===n.version?(i+=4,n.creationTime=si(t.getUint32(i)),i+=8,n.modificationTime=si(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=8,n.duration=t.getUint32(i)):(n.creationTime=si(t.getUint32(i)),i+=4,n.modificationTime=si(t.getUint32(i)),i+=4,n.trackId=t.getUint32(i),i+=4,i+=4,n.duration=t.getUint32(i)),i+=4,i+=8,n.layer=t.getUint16(i),i+=2,n.alternateGroup=t.getUint16(i),i+=2,n.volume=t.getUint8(i)+t.getUint8(i+1)/8,i+=2,i+=2,n.matrix=new Uint32Array(e.subarray(i,i+36)),i+=36,n.width=t.getUint16(i)+t.getUint16(i+2)/65536,i+=4,n.height=t.getUint16(i)+t.getUint16(i+2)/65536,n},traf:function(e){return{boxes:Vt(e)}},trak:function(e){return{boxes:Vt(e)}},trex:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),trackId:t.getUint32(4),defaultSampleDescriptionIndex:t.getUint32(8),defaultSampleDuration:t.getUint32(12),defaultSampleSize:t.getUint32(16),sampleDependsOn:3&e[20],sampleIsDependedOn:(192&e[21])>>6,sampleHasRedundancy:(48&e[21])>>4,samplePaddingValue:(14&e[21])>>1,sampleIsDifferenceSample:!!(1&e[21]),sampleDegradationPriority:t.getUint16(22)}},trun:ii,"url ":function(e){return{version:e[0],flags:new Uint8Array(e.subarray(1,4))}},vmhd:function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);return{version:e[0],flags:new Uint8Array(e.subarray(1,4)),graphicsmode:t.getUint16(4),opcolor:new Uint16Array([t.getUint16(6),t.getUint16(8),t.getUint16(10)])}}};Vt=function(e){for(var t,i,n,s,r,a=0,o=[],l=new ArrayBuffer(e.length),u=new Uint8Array(l),c=0;c<e.length;++c)u[c]=e[c];for(t=new DataView(l);a<e.byteLength;)i=t.getUint32(a),n=ri(e.subarray(a+4,a+8)),s=i>1?a+i:e.byteLength,(r=(oi[n]||function(e){return{data:e}})(e.subarray(a+8,s))).size=i,r.type=n,o.push(r),a=s;return o},Ht=function(e,t){var i;return t=t||0,i=new Array(2*t+1).join(" "),e.map((function(e,n){return i+e.type+"\n"+Object.keys(e).filter((function(e){return"type"!==e&&"boxes"!==e})).map((function(t){var n=i+"  "+t+": ",s=e[t];if(s instanceof Uint8Array||s instanceof Uint32Array){var r=Array.prototype.slice.call(new Uint8Array(s.buffer,s.byteOffset,s.byteLength)).map((function(e){return" "+("00"+e.toString(16)).slice(-2)})).join("").match(/.{1,24}/g);return r?1===r.length?n+"<"+r.join("").slice(1)+">":n+"<\n"+r.map((function(e){return i+"  "+e})).join("\n")+"\n"+i+"  >":n+"<>"}return n+JSON.stringify(s,null,2).split("\n").map((function(e,t){return 0===t?e:i+"  "+e})).join("\n")})).join("\n")+(e.boxes?"\n"+Ht(e.boxes,t+1):"")})).join("\n")};var li,ui,ci,hi,di,pi,fi,gi={inspect:Vt,textify:Ht,parseType:ri,findBox:Qt,parseTraf:oi.traf,parseTfdt:oi.tfdt,parseHdlr:oi.hdlr,parseTfhd:oi.tfhd,parseTrun:oi.trun,parseSidx:oi.sidx},mi=function(e){for(var t=0,i=String.fromCharCode(e[t]),n="";"\0"!==i;)n+=i,t++,i=String.fromCharCode(e[t]);return n+i},yi=z.getUint64,_i=function(e){return void 0!==e||null!==e},vi={parseEmsgBox:function(e){var t,i,n,s,r,a,o,l=4,u=e[0];if(0===u)l+=(t=mi(e.subarray(l))).length,l+=(i=mi(e.subarray(l))).length,n=(c=new DataView(e.buffer)).getUint32(l),l+=4,r=c.getUint32(l),l+=4,a=c.getUint32(l),l+=4,o=c.getUint32(l),l+=4;else if(1===u){var c;n=(c=new DataView(e.buffer)).getUint32(l),l+=4,s=yi(e.subarray(l)),l+=8,a=c.getUint32(l),l+=4,o=c.getUint32(l),l+=4,l+=(t=mi(e.subarray(l))).length,l+=(i=mi(e.subarray(l))).length}var h={scheme_id_uri:t,value:i,timescale:n||1,presentation_time:s,presentation_time_delta:r,event_duration:a,id:o,message_data:new Uint8Array(e.subarray(l,e.byteLength))};return function(e,t){var i="\0"!==t.scheme_id_uri,n=0===e&&_i(t.presentation_time_delta)&&i,s=1===e&&_i(t.presentation_time)&&i;return!(e>1)&&n||s}(u,h)?h:void 0},scaleTime:function(e,t,i,n){return e||0===e?e/t:n+i/t}},bi="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{},Ti=$t,Si=function(e){return("00"+e.toString(16)).slice(-2)},ki=Qt,wi=zt,Ci=vi,Ei=Zt,xi=ii,Ii=Jt,Oi=z.getUint64,Pi=bi,Ai=Ve.parseId3Frames;li=function(e){return ki(e,["moov","trak"]).reduce((function(e,t){var i,n,s,r,a;return(i=ki(t,["tkhd"])[0])?(n=i[0],r=Ti(i[s=0===n?12:20]<<24|i[s+1]<<16|i[s+2]<<8|i[s+3]),(a=ki(t,["mdia","mdhd"])[0])?(s=0===(n=a[0])?12:20,e[r]=Ti(a[s]<<24|a[s+1]<<16|a[s+2]<<8|a[s+3]),e):null):null}),{})},ui=function(e,t){var i=ki(t,["moof","traf"]).reduce((function(t,i){var n,s=ki(i,["tfhd"])[0],r=Ti(s[4]<<24|s[5]<<16|s[6]<<8|s[7]),a=e[r]||9e4,o=ki(i,["tfdt"])[0],l=new DataView(o.buffer,o.byteOffset,o.byteLength);let u;return"bigint"==typeof(n=1===o[0]?Oi(o.subarray(4,12)):l.getUint32(4))?u=n/Pi.BigInt(a):"number"!=typeof n||isNaN(n)||(u=n/a),u<Number.MAX_SAFE_INTEGER&&(u=Number(u)),u<t&&(t=u),t}),1/0);return"bigint"==typeof i||isFinite(i)?i:0},ci=function(e,t){var i,n=ki(t,["moof","traf"]),s=0,r=0;if(n&&n.length){var a=ki(n[0],["tfhd"])[0],o=ki(n[0],["trun"])[0],l=ki(n[0],["tfdt"])[0];if(a&&(i=Ei(a).trackId),l&&(s=Ii(l).baseMediaDecodeTime),o){var u=xi(o);u.samples&&u.samples.length&&(r=u.samples[0].compositionTimeOffset||0)}}var c=e[i]||9e4;"bigint"==typeof s&&(r=Pi.BigInt(r),c=Pi.BigInt(c));var h=(s+r)/c;return"bigint"==typeof h&&h<Number.MAX_SAFE_INTEGER&&(h=Number(h)),h},hi=function(e){var t=ki(e,["moov","trak"]),i=[];return t.forEach((function(e){var t=ki(e,["mdia","hdlr"]),n=ki(e,["tkhd"]);t.forEach((function(e,t){var s,r,a=wi(e.subarray(8,12)),o=n[t];"vide"===a&&(r=0===(s=new DataView(o.buffer,o.byteOffset,o.byteLength)).getUint8(0)?s.getUint32(12):s.getUint32(20),i.push(r))}))})),i},pi=function(e){var t=0===e[0]?12:20;return Ti(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])},di=function(e){var t=ki(e,["moov","trak"]),i=[];return t.forEach((function(e){var t,n,s={},r=ki(e,["tkhd"])[0];r&&(n=(t=new DataView(r.buffer,r.byteOffset,r.byteLength)).getUint8(0),s.id=0===n?t.getUint32(12):t.getUint32(20));var a=ki(e,["mdia","hdlr"])[0];if(a){var o=wi(a.subarray(8,12));s.type="vide"===o?"video":"soun"===o?"audio":o}var l=ki(e,["mdia","minf","stbl","stsd"])[0];if(l){var u=l.subarray(8);s.codec=wi(u.subarray(4,8));var c,h=ki(u,[s.codec])[0];h&&(/^[asm]vc[1-9]$/i.test(s.codec)?(c=h.subarray(78),"avcC"===wi(c.subarray(4,8))&&c.length>11?(s.codec+=".",s.codec+=Si(c[9]),s.codec+=Si(c[10]),s.codec+=Si(c[11])):s.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(s.codec)?(c=h.subarray(28),"esds"===wi(c.subarray(4,8))&&c.length>20&&0!==c[19]?(s.codec+="."+Si(c[19]),s.codec+="."+Si(c[20]>>>2&63).replace(/^0/,"")):s.codec="mp4a.40.2"):s.codec=s.codec.toLowerCase())}var d=ki(e,["mdia","mdhd"])[0];d&&(s.timescale=pi(d)),i.push(s)})),i},fi=function(e,t=0){return ki(e,["emsg"]).map((e=>{var i=Ci.parseEmsgBox(new Uint8Array(e)),n=Ai(i.message_data);return{cueTime:Ci.scaleTime(i.presentation_time,i.timescale,i.presentation_time_delta,t),duration:Ci.scaleTime(i.event_duration,i.timescale),frames:n}}))};var Li={findBox:ki,parseType:wi,timescale:li,startTime:ui,compositionStartTime:ci,videoTrackIds:hi,tracks:di,getTimescaleFromMediaHeader:pi,getEmsgID3:fi};const{parseTrun:Mi}=gi,{findBox:Di}=Li;var ji=bi,Ri={getMdatTrafPairs:function(e){var t=Di(e,["moof","traf"]),i=Di(e,["mdat"]),n=[];return i.forEach((function(e,i){var s=t[i];n.push({mdat:e,traf:s})})),n},parseSamples:function(e,t,i){var n=t,s=i.defaultSampleDuration||0,r=i.defaultSampleSize||0,a=i.trackId,o=[];return e.forEach((function(e){var t=Mi(e).samples;t.forEach((function(e){void 0===e.duration&&(e.duration=s),void 0===e.size&&(e.size=r),e.trackId=a,e.dts=n,void 0===e.compositionTimeOffset&&(e.compositionTimeOffset=0),"bigint"==typeof n?(e.pts=n+ji.BigInt(e.compositionTimeOffset),n+=ji.BigInt(e.duration)):(e.pts=n+e.compositionTimeOffset,n+=e.duration)})),o=o.concat(t)})),o}},Ni=pe.discardEmulationPreventionBytes,Ui=xe.CaptionStream,Bi=Qt,Fi=Jt,Vi=Zt,{getMdatTrafPairs:Hi,parseSamples:qi}=Ri,$i=function(e,t){for(var i=e,n=0;n<t.length;n++){var s=t[n];if(i<s.size)return s;i-=s.size}return null},zi=function(){var e,t,i,n,s,r,a=!1;this.isInitialized=function(){return a},this.init=function(t){e=new Ui,a=!0,r=!!t&&t.isPartial,e.on("data",(function(e){e.startTime=e.startPts/n,e.endTime=e.endPts/n,s.captions.push(e),s.captionStreams[e.stream]=!0})),e.on("log",(function(e){s.logs.push(e)}))},this.isNewInit=function(e,t){return!(e&&0===e.length||t&&"object"==typeof t&&0===Object.keys(t).length||i===e[0]&&n===t[i])},this.parse=function(e,r,a){var o;if(!this.isInitialized())return null;if(!r||!a)return null;if(this.isNewInit(r,a))i=r[0],n=a[i];else if(null===i||!n)return t.push(e),null;for(;t.length>0;){var l=t.shift();this.parse(l,r,a)}return o=function(e,t,i){if(null===t)return null;var n=function(e,t){var i={};return Hi(e).forEach((function(e){var n,s=e.mdat,r=e.traf,a=Bi(r,["tfhd"]),o=Vi(a[0]),l=o.trackId,u=Bi(r,["tfdt"]),c=u.length>0?Fi(u[0]).baseMediaDecodeTime:0,h=Bi(r,["trun"]);t===l&&h.length>0&&(n=function(e,t,i){var n,s,r,a,o=new DataView(e.buffer,e.byteOffset,e.byteLength),l={logs:[],seiNals:[]};for(s=0;s+4<e.length;s+=r)if(r=o.getUint32(s),s+=4,!(r<=0))switch(31&e[s]){case 6:var u=e.subarray(s+1,s+1+r),c=$i(s,t);if(n={nalUnitType:"sei_rbsp",size:r,data:u,escapedRBSP:Ni(u),trackId:i},c)n.pts=c.pts,n.dts=c.dts,a=c;else{if(!a){l.logs.push({level:"warn",message:"We've encountered a nal unit without data at "+s+" for trackId "+i+". See mux.js#223."});break}n.pts=a.pts,n.dts=a.dts}l.seiNals.push(n)}return l}(s,qi(h,c,o),l),i[l]||(i[l]={seiNals:[],logs:[]}),i[l].seiNals=i[l].seiNals.concat(n.seiNals),i[l].logs=i[l].logs.concat(n.logs))})),i}(e,t)[t]||{};return{seiNals:n.seiNals,logs:n.logs,timescale:i}}(e,i,n),o&&o.logs&&(s.logs=s.logs.concat(o.logs)),null!==o&&o.seiNals?(this.pushNals(o.seiNals),this.flushStream(),s):s.logs.length?{logs:s.logs,captions:[],captionStreams:[]}:null},this.pushNals=function(t){if(!this.isInitialized()||!t||0===t.length)return null;t.forEach((function(t){e.push(t)}))},this.flushStream=function(){if(!this.isInitialized())return null;r?e.partialFlush():e.flush()},this.clearParsedCaptions=function(){s.captions=[],s.captionStreams={},s.logs=[]},this.resetCaptionStream=function(){if(!this.isInitialized())return null;e.reset()},this.clearAllCaptions=function(){this.clearParsedCaptions(),this.resetCaptionStream()},this.reset=function(){t=[],i=null,n=null,s?this.clearParsedCaptions():s={captions:[],captionStreams:{},logs:[]},this.resetCaptionStream()},this.reset()};const{parseTfdt:Wi}=gi,Gi=Qt,{getTimescaleFromMediaHeader:Ki}=Li,{parseSamples:Qi,getMdatTrafPairs:Xi}=Ri;var Yi=function(){let e=9e4;this.init=function(t){const i=Gi(t,["moov","trak","mdia","mdhd"])[0];i&&(e=Ki(i))},this.parseSegment=function(t){const i=[],n=Xi(t);let s=0;return n.forEach((function(t){const n=t.mdat,r=t.traf,a=Gi(r,["tfdt"])[0],o=Gi(r,["tfhd"])[0],l=Gi(r,["trun"]);if(a){const e=Wi(a);s=e.baseMediaDecodeTime}if(l.length&&o){const t=Qi(l,s,o);let r=0;t.forEach((function(t){const s=new TextDecoder("utf-8"),a=n.slice(r,r+t.size);Gi(a,["vtte"])[0]||Gi(a,["vttc"]).forEach((function(n){const r=Gi(n,["payl"])[0],a=Gi(n,["sttg"])[0],o=t.pts/e,l=(t.pts+t.duration)/e;let u,c;if(r)try{u=s.decode(r)}catch(e){console.error(e)}if(a)try{c=s.decode(a)}catch(e){console.error(e)}t.duration&&u&&i.push({cueText:u,start:o,end:l,settings:c})})),r+=t.size}))}})),i}},Ji=Ie,Zi=function(e){var t=31&e[1];return(t<<=8)|e[2]},en=function(e){return!!(64&e[1])},tn=function(e){var t=0;return(48&e[3])>>>4>1&&(t+=e[4]+1),t},nn=function(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}},sn={parseType:function(e,t){var i=Zi(e);return 0===i?"pat":i===t?"pmt":t?"pes":null},parsePat:function(e){var t=en(e),i=4+tn(e);return t&&(i+=e[i]+1),(31&e[i+10])<<8|e[i+11]},parsePmt:function(e){var t={},i=en(e),n=4+tn(e);if(i&&(n+=e[n]+1),1&e[n+5]){var s;s=3+((15&e[n+1])<<8|e[n+2])-4;for(var r=12+((15&e[n+10])<<8|e[n+11]);r<s;){var a=n+r;t[(31&e[a+1])<<8|e[a+2]]=e[a],r+=5+((15&e[a+3])<<8|e[a+4])}return t}},parsePayloadUnitStartIndicator:en,parsePesType:function(e,t){switch(t[Zi(e)]){case Ji.H264_STREAM_TYPE:return"video";case Ji.ADTS_STREAM_TYPE:return"audio";case Ji.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(e){if(!en(e))return null;var t=4+tn(e);if(t>=e.byteLength)return null;var i,n=null;return 192&(i=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&i&&(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 t=4+tn(e),i=e.subarray(t),n=0,s=0,r=!1;s<i.byteLength-3;s++)if(1===i[s+2]){n=s+5;break}for(;n<i.byteLength;)switch(i[n]){case 0:if(0!==i[n-1]){n+=2;break}if(0!==i[n-2]){n++;break}s+3!==n-2&&"slice_layer_without_partitioning_rbsp_idr"===nn(31&i[s+3])&&(r=!0);do{n++}while(1!==i[n]&&n<i.length);s=n-2,n+=3;break;case 1:if(0!==i[n-1]||0!==i[n-2]){n+=3;break}"slice_layer_without_partitioning_rbsp_idr"===nn(31&i[s+3])&&(r=!0),s=n-2,n+=3;break;default:n+=3}return i=i.subarray(s),n-=s,s=0,i&&i.byteLength>3&&"slice_layer_without_partitioning_rbsp_idr"===nn(31&i[s+3])&&(r=!0),r}},rn=Ie,an=De.handleRollover,on={};on.ts=sn,on.aac=yt;var ln=le.ONE_SECOND_IN_TS,un=188,cn=71,hn=function(e,t,i){for(var n,s,r,a,o=0,l=un,u=!1;l<=e.byteLength;)if(e[o]!==cn||e[l]!==cn&&l!==e.byteLength)o++,l++;else{if(n=e.subarray(o,l),"pes"===on.ts.parseType(n,t.pid)&&(s=on.ts.parsePesType(n,t.table),r=on.ts.parsePayloadUnitStartIndicator(n),"audio"===s&&r&&(a=on.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),u=!0)),u)break;o+=un,l+=un}for(o=(l=e.byteLength)-un,u=!1;o>=0;)if(e[o]!==cn||e[l]!==cn&&l!==e.byteLength)o--,l--;else{if(n=e.subarray(o,l),"pes"===on.ts.parseType(n,t.pid)&&(s=on.ts.parsePesType(n,t.table),r=on.ts.parsePayloadUnitStartIndicator(n),"audio"===s&&r&&(a=on.ts.parsePesTime(n))&&(a.type="audio",i.audio.push(a),u=!0)),u)break;o-=un,l-=un}},dn=function(e,t,i){for(var n,s,r,a,o,l,u,c=0,h=un,d=!1,p={data:[],size:0};h<e.byteLength;)if(e[c]!==cn||e[h]!==cn)c++,h++;else{if(n=e.subarray(c,h),"pes"===on.ts.parseType(n,t.pid)&&(s=on.ts.parsePesType(n,t.table),r=on.ts.parsePayloadUnitStartIndicator(n),"video"===s&&(r&&!d&&(a=on.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),d=!0),!i.firstKeyFrame))){if(r&&0!==p.size){for(o=new Uint8Array(p.size),l=0;p.data.length;)u=p.data.shift(),o.set(u,l),l+=u.byteLength;if(on.ts.videoPacketContainsKeyFrame(o)){var f=on.ts.parsePesTime(o);f?(i.firstKeyFrame=f,i.firstKeyFrame.type="video"):console.warn("Failed to extract PTS/DTS from PES at first keyframe. This could be an unusual TS segment, or else mux.js did not parse your TS segment correctly. If you know your TS segments do contain PTS/DTS on keyframes please file a bug report! You can try ffprobe to double check for yourself.")}p.size=0}p.data.push(n),p.size+=n.byteLength}if(d&&i.firstKeyFrame)break;c+=un,h+=un}for(c=(h=e.byteLength)-un,d=!1;c>=0;)if(e[c]!==cn||e[h]!==cn)c--,h--;else{if(n=e.subarray(c,h),"pes"===on.ts.parseType(n,t.pid)&&(s=on.ts.parsePesType(n,t.table),r=on.ts.parsePayloadUnitStartIndicator(n),"video"===s&&r&&(a=on.ts.parsePesTime(n))&&(a.type="video",i.video.push(a),d=!0)),d)break;c-=un,h-=un}},pn=function(e,t){var i;return i=on.aac.isLikelyAacData(e)?function(e){for(var t,i=!1,n=0,s=null,r=null,a=0,o=0;e.length-o>=3;){switch(on.aac.parseType(e,o)){case"timed-metadata":if(e.length-o<10){i=!0;break}if((a=on.aac.parseId3TagSize(e,o))>e.length){i=!0;break}null===r&&(t=e.subarray(o,o+a),r=on.aac.parseAacTimestamp(t)),o+=a;break;case"audio":if(e.length-o<7){i=!0;break}if((a=on.aac.parseAdtsSize(e,o))>e.length){i=!0;break}null===s&&(t=e.subarray(o,o+a),s=on.aac.parseSampleRate(t)),n++,o+=a;break;default:o++}if(i)return null}if(null===s||null===r)return null;var l=ln/s;return{audio:[{type:"audio",dts:r,pts:r},{type:"audio",dts:r+1024*n*l,pts:r+1024*n*l}]}}(e):function(e){var t={pid:null,table:null},i={};for(var n in function(e,t){for(var i,n=0,s=un;s<e.byteLength;)if(e[n]!==cn||e[s]!==cn)n++,s++;else{switch(i=e.subarray(n,s),on.ts.parseType(i,t.pid)){case"pat":t.pid=on.ts.parsePat(i);break;case"pmt":var r=on.ts.parsePmt(i);t.table=t.table||{},Object.keys(r).forEach((function(e){t.table[e]=r[e]}))}n+=un,s+=un}}(e,t),t.table)if(t.table.hasOwnProperty(n))switch(t.table[n]){case rn.H264_STREAM_TYPE:i.video=[],dn(e,t,i),0===i.video.length&&delete i.video;break;case rn.ADTS_STREAM_TYPE:i.audio=[],hn(e,t,i),0===i.audio.length&&delete i.audio}return i}(e),i&&(i.audio||i.video)?(function(e,t){if(e.audio&&e.audio.length){var i=t;(void 0===i||isNaN(i))&&(i=e.audio[0].dts),e.audio.forEach((function(e){e.dts=an(e.dts,i),e.pts=an(e.pts,i),e.dtsTime=e.dts/ln,e.ptsTime=e.pts/ln}))}if(e.video&&e.video.length){var n=t;if((void 0===n||isNaN(n))&&(n=e.video[0].dts),e.video.forEach((function(e){e.dts=an(e.dts,n),e.pts=an(e.pts,n),e.dtsTime=e.dts/ln,e.ptsTime=e.pts/ln})),e.firstKeyFrame){var s=e.firstKeyFrame;s.dts=an(s.dts,n),s.pts=an(s.pts,n),s.dtsTime=s.dts/ln,s.ptsTime=s.pts/ln}}}(i,t),i):null};class fn{constructor(e,t){this.options=t||{},this.self=e,this.init()}init(){this.transmuxer&&this.transmuxer.dispose(),this.transmuxer=new qt.Transmuxer(this.options),function(e,t){t.on("data",(function(t){const i=t.initSegment;t.initSegment={data:i.buffer,byteOffset:i.byteOffset,byteLength:i.byteLength};const n=t.data;t.data=n.buffer,e.postMessage({action:"data",segment:t,byteOffset:n.byteOffset,byteLength:n.byteLength},[t.data])})),t.on("done",(function(t){e.postMessage({action:"done"})})),t.on("gopInfo",(function(t){e.postMessage({action:"gopInfo",gopInfo:t})})),t.on("videoSegmentTimingInfo",(function(t){const i={start:{decode:le.videoTsToSeconds(t.start.dts),presentation:le.videoTsToSeconds(t.start.pts)},end:{decode:le.videoTsToSeconds(t.end.dts),presentation:le.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:le.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=le.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:i})})),t.on("audioSegmentTimingInfo",(function(t){const i={start:{decode:le.videoTsToSeconds(t.start.dts),presentation:le.videoTsToSeconds(t.start.pts)},end:{decode:le.videoTsToSeconds(t.end.dts),presentation:le.videoTsToSeconds(t.end.pts)},baseMediaDecodeTime:le.videoTsToSeconds(t.baseMediaDecodeTime)};t.prependedContentDuration&&(i.prependedContentDuration=le.videoTsToSeconds(t.prependedContentDuration)),e.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:i})})),t.on("id3Frame",(function(t){e.postMessage({action:"id3Frame",id3Frame:t})})),t.on("caption",(function(t){e.postMessage({action:"caption",caption:t})})),t.on("trackinfo",(function(t){e.postMessage({action:"trackinfo",trackInfo:t})})),t.on("audioTimingInfo",(function(t){e.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:le.videoTsToSeconds(t.start),end:le.videoTsToSeconds(t.end)}})})),t.on("videoTimingInfo",(function(t){e.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:le.videoTsToSeconds(t.start),end:le.videoTsToSeconds(t.end)}})})),t.on("log",(function(t){e.postMessage({action:"log",log:t})}))}(this.self,this.transmuxer)}pushMp4Captions(e){this.captionParser||(this.captionParser=new zi,this.captionParser.init());const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.captionParser.parse(t,e.trackIds,e.timescales);this.self.postMessage({action:"mp4Captions",captions:i&&i.captions||[],logs:i&&i.logs||[],data:t.buffer},[t.buffer])}initMp4WebVttParser(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.webVttParser.init(t)}getMp4WebVttText(e){this.webVttParser||(this.webVttParser=new Yi);const t=new Uint8Array(e.data,e.byteOffset,e.byteLength),i=this.webVttParser.parseSegment(t);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:i||[],data:t.buffer},[t.buffer])}probeMp4StartTime({timescales:e,data:t}){const i=Li.startTime(e,t);this.self.postMessage({action:"probeMp4StartTime",startTime:i,data:t},[t.buffer])}probeMp4Tracks({data:e}){const t=Li.tracks(e);this.self.postMessage({action:"probeMp4Tracks",tracks:t,data:e},[e.buffer])}probeEmsgID3({data:e,offset:t}){const i=Li.getEmsgID3(e,t);this.self.postMessage({action:"probeEmsgID3",id3Frames:i,emsgData:e},[e.buffer])}probeTs({data:e,baseStartTime:t}){const i="number"!=typeof t||isNaN(t)?void 0:t*le.ONE_SECOND_IN_TS,n=pn(e,i);let s=null;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)),this.self.postMessage({action:"probeTs",result:s,data:e},[e.buffer])}clearAllMp4Captions(){this.captionParser&&this.captionParser.clearAllCaptions()}clearParsedMp4Captions(){this.captionParser&&this.captionParser.clearParsedCaptions()}push(e){const t=new Uint8Array(e.data,e.byteOffset,e.byteLength);this.transmuxer.push(t)}reset(){this.transmuxer.reset()}setTimestampOffset(e){const t=e.timestampOffset||0;this.transmuxer.setBaseMediaDecodeTime(Math.round(le.secondsToVideoTs(t)))}setAudioAppendStart(e){this.transmuxer.setAudioAppendStart(Math.ceil(le.secondsToVideoTs(e.appendStart)))}setRemux(e){this.transmuxer.setRemux(e.remux)}flush(e){this.transmuxer.flush(),self.postMessage({action:"done",type:"transmuxed"})}endTimeline(){this.transmuxer.endTimeline(),self.postMessage({action:"endedtimeline",type:"transmuxed"})}alignGopsWith(e){this.transmuxer.alignGopsWith(e.gopsToAlignWith.slice())}}self.onmessage=function(e){"init"===e.data.action&&e.data.options?this.messageHandlers=new fn(self,e.data.options):(this.messageHandlers||(this.messageHandlers=new fn(self)),e.data&&e.data.action&&"init"!==e.data.action&&this.messageHandlers[e.data.action]&&this.messageHandlers[e.data.action](e.data))}})));var ga=ha(fa);const ma=e=>{const{transmuxer:t,bytes:i,audioAppendStart:n,gopsToAlignWith:s,remux:r,onData:a,onTrackInfo:o,onAudioTimingInfo:l,onVideoTimingInfo:u,onVideoSegmentTimingInfo:c,onAudioSegmentTimingInfo:h,onId3:d,onCaptions:p,onDone:f,onEndedTimeline:g,onTransmuxerLog:m,isEndOfTimeline:y,segment:_,triggerSegmentEventFn:v}=e,b={buffer:[]};let T=y;if(t.onmessage=i=>{t.currentTransmux===e&&("data"===i.data.action&&((e,t,i)=>{const{type:n,initSegment:s,captions:r,captionStreams:a,metadata:o,videoFrameDtsTime:l,videoFramePtsTime:u}=e.data.segment;t.buffer.push({captions:r,captionStreams:a,metadata:o});const c=e.data.segment.boxes||{data:e.data.segment.data},h={type:n,data:new Uint8Array(c.data,c.data.byteOffset,c.data.byteLength),initSegment:new Uint8Array(s.data,s.byteOffset,s.byteLength)};void 0!==l&&(h.videoFrameDtsTime=l),void 0!==u&&(h.videoFramePtsTime=u),i(h)})(i,b,a),"trackinfo"===i.data.action&&o(i.data.trackInfo),"gopInfo"===i.data.action&&((e,t)=>{t.gopInfo=e.data.gopInfo})(i,b),"audioTimingInfo"===i.data.action&&l(i.data.audioTimingInfo),"videoTimingInfo"===i.data.action&&u(i.data.videoTimingInfo),"videoSegmentTimingInfo"===i.data.action&&c(i.data.videoSegmentTimingInfo),"audioSegmentTimingInfo"===i.data.action&&h(i.data.audioSegmentTimingInfo),"id3Frame"===i.data.action&&d([i.data.id3Frame],i.data.id3Frame.dispatchType),"caption"===i.data.action&&p(i.data.caption),"endedtimeline"===i.data.action&&(T=!1,g()),"log"===i.data.action&&m(i.data.log),"transmuxed"===i.data.type&&(T||(t.onmessage=null,(({transmuxedData:e,callback:t})=>{e.buffer=[],t(e)})({transmuxedData:b,callback:f}),ya(t))))},t.onerror=()=>{const e={message:"Received an error message from the transmuxer worker",metadata:{errorType:Bs.Error.StreamingFailedToTransmuxSegment,segmentInfo:Ya({segment:_})}};f(null,e)},n&&t.postMessage({action:"setAudioAppendStart",appendStart:n}),Array.isArray(s)&&t.postMessage({action:"alignGopsWith",gopsToAlignWith:s}),void 0!==r&&t.postMessage({action:"setRemux",remux:r}),i.byteLength){const e=i instanceof ArrayBuffer?i:i.buffer,n=i instanceof ArrayBuffer?0:i.byteOffset;v({type:"segmenttransmuxingstart",segment:_}),t.postMessage({action:"push",data:e,byteOffset:n,byteLength:i.byteLength},[e])}y&&t.postMessage({action:"endTimeline"}),t.postMessage({action:"flush"})},ya=e=>{e.currentTransmux=null,e.transmuxQueue.length&&(e.currentTransmux=e.transmuxQueue.shift(),"function"==typeof e.currentTransmux?e.currentTransmux():ma(e.currentTransmux))},_a=(e,t)=>{e.postMessage({action:t}),ya(e)};var va=e=>{((e,t)=>{if(!t.currentTransmux)return t.currentTransmux=e,void _a(t,e);t.transmuxQueue.push(_a.bind(null,t,e))})("reset",e)};const ba=function(e){const t=e.transmuxer,i=e.endAction||e.action,n=e.callback,s=(0,h.Z)({},e,{endAction:null,transmuxer:null,callback:null}),r=s=>{s.data.action===i&&(t.removeEventListener("message",r),s.data.data&&(s.data.data=new Uint8Array(s.data.data,e.byteOffset||0,e.byteLength||s.data.data.byteLength),e.data&&(e.data=s.data.data)),n(s.data))};if(t.addEventListener("message",r),e.data){const i=e.data instanceof ArrayBuffer;s.byteOffset=i?0:e.data.byteOffset,s.byteLength=e.data.byteLength;const n=[i?e.data:e.data.buffer];t.postMessage(s,n)}else t.postMessage(s)},Ta=-101,Sa=-102,ka="wvtt",wa=e=>{e.forEach((e=>{e.abort()}))},Ca=(e,t)=>{const{requestType:i}=t,n=Or({requestType:i,request:t,error:e});return t.timedout?{status:t.status,message:"HLS request timed-out at URL: "+t.uri,code:Ta,xhr:t,metadata:n}:t.aborted?{status:t.status,message:"HLS request aborted at URL: "+t.uri,code:Sa,xhr:t,metadata:n}:e?{status:t.status,message:"HLS request errored at URL: "+t.uri,code:2,xhr:t,metadata:n}:"arraybuffer"===t.responseType&&0===t.response.byteLength?{status:t.status,message:"Empty HLS response at URL: "+t.uri,code:2,xhr:t,metadata:n}:null},Ea=(e,t,i,n)=>(s,r)=>{const a=r.response,o=Ca(s,r);if(o)return i(o,e);if(16!==a.byteLength)return i({status:r.status,message:"Invalid HLS key at URL: "+r.uri,code:2,xhr:r},e);const l=new DataView(a),u=new Uint32Array([l.getUint32(0),l.getUint32(4),l.getUint32(8),l.getUint32(12)]);for(let e=0;e<t.length;e++)t[e].bytes=u;const c={uri:r.uri};return n({type:"segmentkeyloadcomplete",segment:e,keyInfo:c}),i(null,e)},xa=(e,t)=>{const i=(0,T.Xm)(e.map.bytes);if("mp4"!==i){const n=e.map.resolvedUri||e.map.uri,s=i||"unknown";return t({internal:!0,message:`Found unsupported ${s} container for initialization segment at URL: ${n}`,code:2,metadata:{mediaType:s}})}ba({action:"probeMp4Tracks",data:e.map.bytes,transmuxer:e.transmuxer,callback:({tracks:i,data:n})=>(e.map.bytes=n,i.forEach((function(t){e.map.tracks=e.map.tracks||{},e.map.tracks[t.type]||(e.map.tracks[t.type]=t,"number"==typeof t.id&&t.timescale&&(e.map.timescales=e.map.timescales||{},e.map.timescales[t.id]=t.timescale),"text"===t.type&&((e,t)=>{t===ka&&e.transmuxer.postMessage({action:"initMp4WebVttParser",data:e.map.bytes})})(e,t.codec))})),t(null))})},Ia=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:p})=>{const f=e.map&&e.map.tracks||{},g=Boolean(f.audio&&f.video);let m=n.bind(null,e,"audio","start");const y=n.bind(null,e,"audio","end");let _=n.bind(null,e,"video","start");const v=n.bind(null,e,"video","end");ba({action:"probeTs",transmuxer:e.transmuxer,data:t,baseStartTime:e.baseStartTime,callback:n=>{e.bytes=t=n.data;const f=n.result;f&&(i(e,{hasAudio:f.hasAudio,hasVideo:f.hasVideo,isMuxed:g}),i=null),(e=>{if(!e.transmuxer.currentTransmux)return e.transmuxer.currentTransmux=e,void ma(e);e.transmuxer.transmuxQueue.push(e)})({bytes:t,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,remux:g,onData:t=>{t.type="combined"===t.type?"video":t.type,c(e,t)},onTrackInfo:t=>{i&&(g&&(t.isMuxed=!0),i(e,t))},onAudioTimingInfo:e=>{m&&void 0!==e.start&&(m(e.start),m=null),y&&void 0!==e.end&&y(e.end)},onVideoTimingInfo:e=>{_&&void 0!==e.start&&(_(e.start),_=null),v&&void 0!==e.end&&v(e.end)},onVideoSegmentTimingInfo:t=>{const i={pts:{start:t.start.presentation,end:t.end.presentation},dts:{start:t.start.decode,end:t.end.decode}};p({type:"segmenttransmuxingtiminginfoavailable",segment:e,timingInfo:i}),s(t)},onAudioSegmentTimingInfo:t=>{const i={pts:{start:t.start.pts,end:t.end.pts},dts:{start:t.start.dts,end:t.end.dts}};p({type:"segmenttransmuxingtiminginfoavailable",segment:e,timingInfo:i}),r(t)},onId3:(t,i)=>{a(e,t,i)},onCaptions:t=>{o(e,[t])},isEndOfTimeline:l,onEndedTimeline:()=>{u()},onTransmuxerLog:d,onDone:(t,i)=>{h&&(t.type="combined"===t.type?"video":t.type,p({type:"segmenttransmuxingcomplete",segment:e}),h(i,e,t))},segment:e,triggerSegmentEventFn:p})}})},Oa=({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:p})=>{let f=new Uint8Array(t);if((0,T.cz)(f)){e.isFmp4=!0;const{tracks:s}=e.map;if(s.text&&(!s.audio||!s.video))return c(e,{data:f,type:"text"}),void((e,t,i)=>{t===ka&&ba({action:"getMp4WebVttText",data:e.bytes,transmuxer:e.transmuxer,callback:({data:t,mp4VttCues:n})=>{e.bytes=t,i(null,e,{mp4VttCues:n})}})})(e,s.text.codec,h);const r={isFmp4:!0,hasVideo:!!s.video,hasAudio:!!s.audio};s.audio&&s.audio.codec&&"enca"!==s.audio.codec&&(r.audioCodec=s.audio.codec),s.video&&s.video.codec&&"encv"!==s.video.codec&&(r.videoCodec=s.video.codec),s.video&&s.audio&&(r.isMuxed=!0),i(e,r);const l=(t,i)=>{c(e,{data:f,type:r.hasAudio&&!r.isMuxed?"audio":"video"}),i&&i.length&&a(e,i),t&&t.length&&o(e,t),h(null,e,{})};ba({action:"probeMp4StartTime",timescales:e.map.timescales,data:f,transmuxer:e.transmuxer,callback:({data:i,startTime:a})=>{t=i.buffer,e.bytes=f=i,r.hasAudio&&!r.isMuxed&&n(e,"audio","start",a),r.hasVideo&&n(e,"video","start",a),ba({action:"probeEmsgID3",data:f,transmuxer:e.transmuxer,offset:a,callback:({emsgData:i,id3Frames:n})=>{t=i.buffer,e.bytes=f=i,s.video&&i.byteLength&&e.transmuxer?ba({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:e.transmuxer,data:f,timescales:e.map.timescales,trackIds:[s.video.id],callback:i=>{t=i.data.buffer,e.bytes=f=i.data,i.logs.forEach((function(e){d(Gs(e,{stream:"mp4CaptionParser"}))})),l(i.captions,n)}}):l(void 0,n)}})}})}else if(e.transmuxer){if(void 0===e.container&&(e.container=(0,T.Xm)(f)),"ts"!==e.container&&"aac"!==e.container)return i(e,{hasAudio:!1,hasVideo:!1}),void h(null,e,{});Ia({segment:e,bytes:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:p})}else h(null,e,{})},Pa=function({id:e,key:t,encryptedBytes:i,decryptionWorker:n,segment:s,doneFn:r},a){const o=t=>{if(t.data.source===e){n.removeEventListener("message",o);const e=t.data.decrypted;a(new Uint8Array(e.bytes,e.byteOffset,e.byteLength))}};let l;n.onerror=()=>{const e="An error occurred in the decryption worker",t=Ya({segment:s}),i={message:e,metadata:{error:new Error(e),errorType:Bs.Error.StreamingFailedToDecryptSegment,segmentInfo:t,keyInfo:{uri:s.key.resolvedUri||s.map.key.resolvedUri}}};r(i,s)},n.addEventListener("message",o),l=t.bytes.slice?t.bytes.slice():new Uint32Array(Array.prototype.slice.call(t.bytes)),n.postMessage(Yr({source:e,encrypted:i,key:l,iv:t.iv}),[i.buffer,l.buffer])},Aa=({xhr:e,xhrOptions:t,decryptionWorker:i,segment:n,abortFn:s,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:p,dataFn:f,doneFn:g,onTransmuxerLog:m,triggerSegmentEventFn:y})=>{const _=[],v=(({activeXhrs:e,decryptionWorker:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:p})=>{let f=0,g=!1;return(m,y)=>{if(!g){if(m)return g=!0,wa(e),h(m,y);if(f+=1,f===e.length){const f=function(){if(y.encryptedBytes)return(({decryptionWorker:e,segment:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:p})=>{p({type:"segmentdecryptionstart"}),Pa({id:t.requestId,key:t.key,encryptedBytes:t.encryptedBytes,decryptionWorker:e,segment:t,doneFn:h},(e=>{t.bytes=e,p({type:"segmentdecryptioncomplete",segment:t}),Oa({segment:t,bytes:t.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:p})}))})({decryptionWorker:t,segment:y,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:p});Oa({segment:y,bytes:y.bytes,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c,doneFn:h,onTransmuxerLog:d,triggerSegmentEventFn:p})};if(y.endOfAllRequests=Date.now(),y.map&&y.map.encryptedBytes&&!y.map.bytes)return p({type:"segmentdecryptionstart",segment:y}),Pa({decryptionWorker:t,id:y.requestId+"-init",encryptedBytes:y.map.encryptedBytes,key:y.map.key,segment:y,doneFn:h},(t=>{y.map.bytes=t,p({type:"segmentdecryptioncomplete",segment:y}),xa(y,(t=>{if(t)return wa(e),h(t,y);f()}))}));f()}}}})({activeXhrs:_,decryptionWorker:i,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:p,dataFn:f,doneFn:g,onTransmuxerLog:m,triggerSegmentEventFn:y});if(n.key&&!n.key.bytes){const i=[n.key];n.map&&!n.map.bytes&&n.map.key&&n.map.key.resolvedUri===n.key.resolvedUri&&i.push(n.map.key);const s=Gs(t,{uri:n.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),r=Ea(n,i,v,y);y({type:"segmentkeyloadstart",segment:n,keyInfo:{uri:n.key.resolvedUri}});const a=e(s,r);_.push(a)}if(n.map&&!n.map.bytes){if(n.map.key&&(!n.key||n.key.resolvedUri!==n.map.key.resolvedUri)){const i=Gs(t,{uri:n.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}),s=Ea(n,[n.map.key],v,y);y({type:"segmentkeyloadstart",segment:n,keyInfo:{uri:n.map.key.resolvedUri}});const r=e(i,s);_.push(r)}const i=Gs(t,{uri:n.map.resolvedUri,responseType:"arraybuffer",headers:Gr(n.map),requestType:"segment-media-initialization"}),s=(({segment:e,finishProcessingFn:t,triggerSegmentEventFn:i})=>(n,s)=>{const r=Ca(n,s);if(r)return t(r,e);const a=new Uint8Array(s.response);if(i({type:"segmentloaded",segment:e}),e.map.key)return e.map.encryptedBytes=a,t(null,e);e.map.bytes=a,xa(e,(function(i){if(i)return i.xhr=s,i.status=s.status,t(i,e);t(null,e)}))})({segment:n,finishProcessingFn:v,triggerSegmentEventFn:y});y({type:"segmentloadstart",segment:n});const r=e(i,s);_.push(r)}const b=Gs(t,{uri:n.part&&n.part.resolvedUri||n.resolvedUri,responseType:"arraybuffer",headers:Gr(n),requestType:"segment"}),T=(({segment:e,finishProcessingFn:t,responseType:i,triggerSegmentEventFn:n})=>(s,r)=>{const a=Ca(s,r);if(a)return t(a,e);n({type:"segmentloaded",segment:e});const o="arraybuffer"!==i&&r.responseText?(e=>{const t=new Uint8Array(new ArrayBuffer(e.length));for(let i=0;i<e.length;i++)t[i]=e.charCodeAt(i);return t.buffer})(r.responseText.substring(e.lastReachedChar||0)):r.response;return e.stats=(e=>({bandwidth:e.bandwidth,bytesReceived:e.bytesReceived||0,roundTripTime:e.roundTripTime||0}))(r),e.key?e.encryptedBytes=new Uint8Array(o):e.bytes=new Uint8Array(o),t(null,e)})({segment:n,finishProcessingFn:v,responseType:b.responseType,triggerSegmentEventFn:y});y({type:"segmentloadstart",segment:n});const S=e(b,T);S.addEventListener("progress",(({segment:e,progressFn:t,trackInfoFn:i,timingInfoFn:n,videoSegmentTimingInfoFn:s,audioSegmentTimingInfoFn:r,id3Fn:a,captionsFn:o,isEndOfTimeline:l,endedTimelineFn:u,dataFn:c})=>i=>{if(!i.target.aborted)return e.stats=Gs(e.stats,(e=>{const t=e.target,i={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-t.requestTime||0};return i.bytesReceived=e.loaded,i.bandwidth=Math.floor(i.bytesReceived/i.roundTripTime*8*1e3),i})(i)),!e.stats.firstBytesReceivedAt&&e.stats.bytesReceived&&(e.stats.firstBytesReceivedAt=Date.now()),t(i,e)})({segment:n,progressFn:r,trackInfoFn:a,timingInfoFn:o,videoSegmentTimingInfoFn:l,audioSegmentTimingInfoFn:u,id3Fn:c,captionsFn:h,isEndOfTimeline:d,endedTimelineFn:p,dataFn:f})),_.push(S);const k={};return _.forEach((e=>{e.addEventListener("loadend",(({loadendState:e,abortFn:t})=>i=>{i.target.aborted&&t&&!e.calledAbortFn&&(t(),e.calledAbortFn=!0)})({loadendState:k,abortFn:s}))})),()=>wa(_)},La=Ws("PlaylistSelector"),Ma=function(e){if(!e||!e.playlist)return;const t=e.playlist;return JSON.stringify({id:t.id,bandwidth:e.bandwidth,width:e.width,height:e.height,codecs:t.attributes&&t.attributes.CODECS||""})},Da=function(e,t){if(!e)return"";const i=s().getComputedStyle(e);return i?i[t]:""},ja=function(e,t){const i=e.slice();e.sort((function(e,n){const s=t(e,n);return 0===s?i.indexOf(e)-i.indexOf(n):s}))},Ra=function(e,t){let i,n;return e.attributes.BANDWIDTH&&(i=e.attributes.BANDWIDTH),i=i||s().Number.MAX_VALUE,t.attributes.BANDWIDTH&&(n=t.attributes.BANDWIDTH),n=n||s().Number.MAX_VALUE,i-n};let Na=function(e){const{main:t,bandwidth:i,playerWidth:n,playerHeight:r,playerObjectFit:a,limitRenditionByPlayerDimensions:o,playlistController:l}=e;if(!t)return;const u={bandwidth:i,width:n,height:r,limitRenditionByPlayerDimensions:o};let c=t.playlists;Tr.isAudioOnly(t)&&(c=l.getAudioTrackPlaylists_(),u.audioOnly=!0);let h=c.map((e=>{let t;const i=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width,n=e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height;return t=e.attributes&&e.attributes.BANDWIDTH,t=t||s().Number.MAX_VALUE,{bandwidth:t,width:i,height:n,playlist:e}}));ja(h,((e,t)=>e.bandwidth-t.bandwidth)),h=h.filter((e=>!Tr.isIncompatible(e.playlist)));let d=h.filter((e=>Tr.isEnabled(e.playlist)));d.length||(d=h.filter((e=>!Tr.isDisabled(e.playlist))));const p=d.filter((e=>e.bandwidth*ua.BANDWIDTH_VARIANCE<i));let f=p[p.length-1];const g=p.filter((e=>e.bandwidth===f.bandwidth))[0];if(!1===o){const e=g||d[0]||h[0];if(e&&e.playlist){let t="sortedPlaylistReps";return g&&(t="bandwidthBestRep"),d[0]&&(t="enabledPlaylistReps"),La(`choosing ${Ma(e)} using ${t} with options`,u),e.playlist}return La("could not choose a playlist with options",u),null}const m=p.filter((e=>e.width&&e.height));ja(m,((e,t)=>
vendor: 1,149 bytes, line 2
2e.width-t.width));const y=m.filter((e=>e.width===n&&e.height===r));f=y[y.length-1];const _=y.filter((e=>e.bandwidth===f.bandwidth))[0];let v,b,T,S;if(_||(v=m.filter((e=>"cover"===a?e.width>n&&e.height>r:e.width>n||e.height>r)),b=v.filter((e=>e.width===v[0].width&&e.height===v[0].height)),f=b[b.length-1],T=b.filter((e=>e.bandwidth===f.bandwidth))[0]),l.leastPixelDiffSelector){const e=m.map((e=>(e.pixelDiff=Math.abs(e.width-n)+Math.abs(e.height-r),e)));ja(e,((e,t)=>e.pixelDiff===t.pixelDiff?t.bandwidth-e.bandwidth:e.pixelDiff-t.pixelDiff)),S=e[0]}const k=S||T||_||g||d[0]||h[0];if(k&&k.playlist){let e="sortedPlaylistReps";return S?e="leastPixelDiffRep":T?e="resolutionPlusOneRep":_?e="resolutionBestRep":g?e="bandwidthBestRep":d[0]&&(e="enabledPlaylistReps"),La(`choosing ${Ma(k)} using ${e} with options`,u),k.playlist}return La("could not choose a playlist with options",u),null};const Ua=function(){let e=this.useDevicePixelRatio&&s().devicePixelRatio||1;return isNaN(this.customPixelRatio)||(e=this.customPixelRatio),Na({main:this.playlists.main,bandwidth:this.systemBandwidth,playerWidth:parseInt(Da(this.tech_.el(),"width"),10)*e,playerHe
vendor: 5,015 bytes, line 2
2ight:parseInt(Da(this.tech_.el(),"height"),10)*e,playerObjectFit:this.usePlayerObjectFit?Da(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})};function Ba(e){try{return new URL(e).pathname.split("/").slice(-2).join("/")}catch(e){return""}}const Fa={id:"ID",class:"CLASS",startDate:"START-DATE",duration:"DURATION",endDate:"END-DATE",endOnNext:"END-ON-NEXT",plannedDuration:"PLANNED-DURATION",scte35Out:"SCTE35-OUT",scte35In:"SCTE35-IN"},Va=new Set(["id","class","startDate","duration","endDate","endOnNext","startTime","endTime","processDateRange"]),Ha=(e,t,i)=>{e.metadataTrack_||(e.metadataTrack_=i.addRemoteTextTrack({kind:"metadata",label:"Timed Metadata"},!1).track,Bs.browser.IS_ANY_SAFARI||(e.metadataTrack_.inBandMetadataTrackDispatchType=t))},qa=function(e,t,i){let n,s;if(i&&i.cues)for(n=i.cues.length;n--;)s=i.cues[n],s.startTime>=e&&s.endTime<=t&&i.removeCue(s)},$a=e=>"number"==typeof e&&isFinite(e),za=1/60,Wa=e=>{const{startOfSegment:t,duration:i,segment:n,part:s,playlist:{mediaSequence:r,id:a,segments:o=[]},mediaIndex:l,partIndex:u,timeline:c}=e,h=o.length-1;let d="mediaIndex/partIndex increment";e.getMediaInfoForTime?d=`getMediaInfoForTime (${e.getMediaInfoForTime})`:e.isSyncRequest&&(d="getSyncSegmentCandidate (isSyncRequest)"),e.independent&&(d+=` with independent ${e.independent}`);const p="number"==typeof u,f=e.segment.uri?"segment":"pre-segment",g=p?or({preloadSegment:n})-1:0;return`${f} [${r+l}/${r+h}]`+(p?` part [${u}/${g}]`:"")+` segment start/end [${n.start} => ${n.end}]`+(p?` part start/end [${s.start} => ${s.end}]`:"")+` startOfSegment [${t}]`+` duration [${i}]`+` timeline [${c}]`+` selected by [${d}]`+` playlist [${a}]`},Ga=e=>`${e}TimingInfo`,Ka=({timelineChangeController:e,currentTimeline:t,segmentTimeline:i,loaderType:n,audioDisabled:s})=>{if(t===i)return!1;if("audio"===n){const t=e.lastTimelineChange({type:"main"});return!t||t.to!==i}if("main"===n&&s){const t=e.pendingTimelineChange({type:"audio"});return!t||t.to!==i}return!1},Qa=e=>{const t=e.pendingSegment_;if(t&&Ka({timelineChangeController:e.timelineChangeController_,currentTimeline:e.currentTimeline_,segmentTimeline:t.timeline,loaderType:e.loaderType_,audioDisabled:e.audioDisabled_})&&(e=>{if(!e)return!1;const t=e.pendingTimelineChange({type:"audio"}),i=e.pendingTimelineChange({type:"main"}),n=t&&i,s=n&&t.to!==i.to;return!(!n||-1===t.from||-1===i.from||!s)})(e.timelineChangeController_)){if((e=>{const t=e.timelineChangeController_.pendingTimelineChange({type:"audio"}),i=e.timelineChangeController_.pendingTimelineChange({type:"main"});return t&&i&&t.to<i.to})(e))return void e.timelineChangeController_.trigger("audioTimelineBehind");e.timelineChangeController_.trigger("fixBadTimelineChange")}},Xa=({segmentDuration:e,maxDuration:t})=>!!e&&Math.round(e)>t+Qs,Ya=({type:e,segment:t})=>{if(!t)return;const i=Boolean(t.key||t.map&&t.map.ke),n=Boolean(t.map&&!t.map.bytes),s=void 0===t.startOfSegment?t.start:t.startOfSegment;return{type:e||t.type,uri:t.resolvedUri||t.uri,start:s,duration:t.duration,isEncrypted:i,isMediaInitialization:n}};class Ja extends Bs.EventTarget{constructor(e,t={}){if(super(),!e)throw new TypeError("Initialization settings are required");if("function"!=typeof e.currentTime)throw new TypeError("No currentTime getter specified");if(!e.mediaSource)throw new TypeError("No MediaSource specified");this.bandwidth=e.bandwidth,this.throughput={rate:0,count:0},this.roundTrip=NaN,this.resetStats_(),this.mediaIndex=null,this.partIndex=null,this.hasPlayed_=e.hasPlayed,this.currentTime_=e.currentTime,this.seekable_=e.seekable,this.seeking_=e.seeking,this.duration_=e.duration,this.mediaSource_=e.mediaSource,this.vhs_=e.vhs,this.loaderType_=e.loaderType,this.currentMediaInfo_=void 0,this.startingMediaInfo_=void 0,this.segmentMetadataTrack_=e.segmentMetadataTrack,this.goalBufferLength_=e.goalBufferLength,this.sourceType_=e.sourceType,this.sourceUpdater_=e.sourceUpdater,this.inbandTextTracks_=e.inbandTextTracks,this.state_="INIT",this.timelineChangeController_=e.timelineChangeController,this.shouldSaveSegmentTimingInfo_=!0,this.parse708captions_=e.parse708captions,this.useDtsForTimestampOffset_=e.useDtsForTimestampOffset,this.captionServices_=e.captionServices,this.exactManifestTimings=e.exactManifestTimings,this.addMetadataToTextTrack=e.addMetadataToTextTrack,this.checkBufferTimeout_=null,this.error_=void 0,this.currentTimeline_=-1,this.shouldForceTimestampOffsetAfterResync_=!1,this.pendingSegment_=null,this.xhrOptions_=null,this.pendingSegments_=[],this.audioDisabled_=!1,this.isPendingTimestampOffset_=!1,this.gopBuffer_=[],this.timeMapping_=0,this.safeAppend_=!1,this.appendInitSegment_={audio:!0,video:!0},this.playlistOfLastInitSegment_={audio:null,video:null},this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_={id3:[],caption:[]},this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=null,this.activeInitSegmentId_=null,this.initSegments_={}
vendor: 6,844 bytes, line 2
2,this.cacheEncryptionKeys_=e.cacheEncryptionKeys,this.keyCache_={},this.decrypter_=e.decrypter,this.syncController_=e.syncController,this.syncPoint_={segmentIndex:0,time:0},this.transmuxer_=this.createTransmuxer_(),this.triggerSyncInfoUpdate_=()=>this.trigger("syncinfoupdate"),this.syncController_.on("syncinfoupdate",this.triggerSyncInfoUpdate_),this.mediaSource_.addEventListener("sourceopen",(()=>{this.isEndOfStream_()||(this.ended_=!1)})),this.fetchAtBuffer_=!1,this.logger_=Ws(`SegmentLoader[${this.loaderType_}]`),Object.defineProperty(this,"state",{get(){return this.state_},set(e){e!==this.state_&&(this.logger_(`${this.state_} -> ${e}`),this.state_=e,this.trigger("statechange"))}}),this.sourceUpdater_.on("ready",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Qa(this)})),this.sourceUpdater_.on("codecschange",(e=>{this.trigger((0,h.Z)({type:"codecschange"},e))})),"main"===this.loaderType_&&this.timelineChangeController_.on("pendingtimelinechange",(()=>{this.hasEnoughInfoToAppend_()?this.processCallQueue_():Qa(this)})),"audio"===this.loaderType_&&this.timelineChangeController_.on("timelinechange",(e=>{this.trigger((0,h.Z)({type:"timelinechange"},e)),this.hasEnoughInfoToLoad_()?this.processLoadQueue_():Qa(this),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Qa(this)}))}get mediaSequenceSync_(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}createTransmuxer_(){return(e=>{const t=new ga;t.currentTransmux=null,t.transmuxQueue=[];const i=t.terminate;return t.terminate=()=>(t.currentTransmux=null,t.transmuxQueue.length=0,i.call(t)),t.postMessage({action:"init",options:e}),t})({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})}resetStats_(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0,this.mediaAppends=0}dispose(){this.trigger("dispose"),this.state="DISPOSED",this.pause(),this.abort_(),this.transmuxer_&&this.transmuxer_.terminate(),this.resetStats_(),this.checkBufferTimeout_&&s().clearTimeout(this.checkBufferTimeout_),this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_),this.off()}setAudio(e){this.audioDisabled_=!e,e?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())}abort(){if("WAITING"!==this.state)return this.pendingSegment_&&(this.pendingSegment_=null),void this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()}abort_(){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,s().clearTimeout(this.quotaExceededErrorRetryTimeout_),this.quotaExceededErrorRetryTimeout_=null}checkForAbort_(e){return"APPENDING"!==this.state||this.pendingSegment_?!this.pendingSegment_||this.pendingSegment_.requestId!==e:(this.state="READY",!0)}error(e){return void 0!==e&&(this.logger_("error occurred:",e),this.error_=e),this.pendingSegment_=null,this.error_}endOfStream(){this.ended_=!0,this.transmuxer_&&va(this.transmuxer_),this.gopBuffer_.length=0,this.pause(),this.trigger("ended")}buffered_(){const e=this.getMediaInfo_();if(!this.sourceUpdater_||!e)return Ks();if("main"===this.loaderType_){const{hasAudio:t,hasVideo:i,isMuxed:n}=e;if(i&&t&&!this.audioDisabled_&&!n)return this.sourceUpdater_.buffered();if(i)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()}initSegmentForMap(e,t=!1){if(!e)return null;const i=Jr(e);let n=this.initSegments_[i];return t&&!n&&e.bytes&&(this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:e.bytes,tracks:e.tracks,timescales:e.timescales}),n||e}segmentKey(e,t=!1){if(!e)return null;const i=Zr(e);let n=this.keyCache_[i];this.cacheEncryptionKeys_&&t&&!n&&e.bytes&&(this.keyCache_[i]=n={resolvedUri:e.resolvedUri,bytes:e.bytes});const s={resolvedUri:(n||e).resolvedUri};return n&&(s.bytes=n.bytes),s}couldBeginLoading_(){return this.playlist_&&!this.paused()}load(){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"))}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}playlist(e,t={}){if(!e)return;if(this.playlist_&&this.playlist_.endList&&e.endList&&this.playlist_.uri===e.uri)return;const i=this.playlist_,n=this.pendingSegment_;this.playlist_=e,this.xhrOptions_=t,"INIT"===this.state&&(e.syncInfo={mediaSequence:e.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(e));let s=null;if(i&&(i.id?s=i.id:i.uri&&(s=i.uri)),this.logger_(`playlist update [${s} => ${e.id||e.uri}]`),this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(e,this.currentTime_()),this.logger_(`Playlist update:\ncurrentTime: ${this.currentTime_()}\nbufferedEnd: ${ir(this.buffered_())}\n`,this.mediaSequenceSync_.diagnostics)),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(!i||i.uri!==e.uri)return null!==this.mediaIndex&&(e.endList||"number"!=typeof e.partTargetDuration?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,void this.trigger("playlistupdate");const r=e.mediaSequence-i.mediaSequence;if(this.logger_(`live window shift [${r}]`),null!==this.mediaIndex)if(this.mediaIndex-=r,this.mediaIndex<0)this.mediaIndex=null,this.partIndex=null;else{const e=this.playlist_.segments[this.mediaIndex];if(this.partIndex&&(!e.parts||!e.parts.length||!e.parts[this.partIndex])){const e=this.mediaIndex;this.logger_(`currently processing part (index ${this.partIndex}) no longer exists.`),this.resetLoader(),this.mediaIndex=e}}n&&(n.mediaIndex-=r,n.mediaIndex<0?(n.mediaIndex=null,n.partIndex=null):(n.mediaIndex>=0&&(n.segment=e.segments[n.mediaIndex]),n.partIndex>=0&&n.segment.parts&&(n.part=n.segment.parts[n.partIndex]))),this.syncController_.saveExpiredSegmentInfo(i,e)}pause(){this.checkBufferTimeout_&&(s().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}paused(){return null===this.checkBufferTimeout_}resetEverything(e){this.ended_=!1,this.activeInitSegmentId_=null,this.appendInitSegment_={audio:!0,video:!0},this.resetLoader(),this.remove(0,1/0,e),this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))}
vendor: 5,852 bytes, line 2
2resetLoader(){this.fetchAtBuffer_=!1,this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus(),this.resyncLoader()}resyncLoader(){this.transmuxer_&&va(this.transmuxer_),this.mediaIndex=null,this.partIndex=null,this.syncPoint_=null,this.isPendingTimestampOffset_=!1;const e=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4;"hls"===this.sourceType_&&!e&&(this.shouldForceTimestampOffsetAfterResync_=!0),this.callQueue_=[],this.loadQueue_=[],this.metadataQueue_.id3=[],this.metadataQueue_.caption=[],this.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}remove(e,t,i=(()=>{}),n=!1){if(t===1/0&&(t=this.duration_()),t<=e)return void this.logger_("skipping remove because end ${end} is <= start ${start}");if(!this.sourceUpdater_||!this.getMediaInfo_())return void this.logger_("skipping remove because no source updater or starting media info");let s=1;const r=()=>{s--,0===s&&i()};!n&&this.audioDisabled_||(s++,this.sourceUpdater_.removeAudio(e,t,r)),(n||"main"===this.loaderType_)&&(this.gopBuffer_=((e,t,i,n)=>{const s=Math.ceil((t-n)*S.ONE_SECOND_IN_TS),r=Math.ceil((i-n)*S.ONE_SECOND_IN_TS),a=e.slice();let o=e.length;for(;o--&&!(e[o].pts<=r););if(-1===o)return a;let l=o+1;for(;l--&&!(e[l].pts<=s););return l=Math.max(l,0),a.splice(l,o-l+1),a})(this.gopBuffer_,e,t,this.timeMapping_),s++,this.sourceUpdater_.removeVideo(e,t,r));for(const i in this.inbandTextTracks_)qa(e,t,this.inbandTextTracks_[i]);qa(e,t,this.segmentMetadataTrack_),r()}monitorBuffer_(){this.checkBufferTimeout_&&s().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s().setTimeout(this.monitorBufferTick_.bind(this),1)}monitorBufferTick_(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&s().clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=s().setTimeout(this.monitorBufferTick_.bind(this),500)}fillBuffer_(){if(this.sourceUpdater_.updating())return;const e=this.chooseNextRequest_();if(!e)return;const t={segmentInfo:Ya({type:this.loaderType_,segment:e})};this.trigger({type:"segmentselected",metadata:t}),"number"==typeof e.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline})),this.loadSegment_(e)}isEndOfStream_(e=this.mediaIndex,t=this.playlist_,i=this.partIndex){if(!t||!this.mediaSource_)return!1;const n="number"==typeof e&&t.segments[e],s=e+1===t.segments.length,r=!n||!n.parts||i+1===n.parts.length;return t.endList&&"open"===this.mediaSource_.readyState&&s&&r}chooseNextRequest_(){const e=this.buffered_(),t=ir(e)||0,i=nr(e,this.currentTime_()),n=!this.hasPlayed_()&&i>=1,s=i>=this.goalBufferLength_(),r=this.playlist_.segments;if(!r.length||n||s)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);const a={partIndex:null,mediaIndex:null,startOfSegment:null,playlist:this.playlist_,isSyncRequest:Boolean(!this.syncPoint_)};if(a.isSyncRequest)a.mediaIndex=function(e,t,i){t=t||[];const n=[];let s=0;for(let r=0;r<t.length;r++){const a=t[r];if(e===a.timeline&&(n.push(r),s+=a.duration,s>i))return r}return 0===n.length?0:n[n.length-1]}(this.currentTimeline_,r,t),this.logger_(`choose next request. Can not find sync point. Fallback to media Index: ${a.mediaIndex}`);else if(null!==this.mediaIndex){const e=r[this.mediaIndex],i="number"==typeof this.partIndex?this.partIndex:-1;a.startOfSegment=e.end?e.end:t,e.parts&&e.parts[i+1]?(a.mediaIndex=this.mediaIndex,a.partIndex=i+1):a.mediaIndex=this.mediaIndex+1}else{let e,i,n;const s=this.fetchAtBuffer_?t:this.currentTime_();if(this.mediaSequenceSync_&&this.logger_(`chooseNextRequest_ request after Quality Switch:\nFor TargetTime: ${s}.\nCurrentTime: ${this.currentTime_()}\nBufferedEnd: ${t}\nFetch At Buffer: ${this.fetchAtBuffer_}\n`,this.mediaSequenceSync_.diagnostics),this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){const t=this.getSyncInfoFromMediaSequenceSync_(s);if(!t){const e="No sync info found while using media sequence sync";return this.error({message:e,metadata:{errorType:Bs.Error.StreamingFailedToSelectNextSegment,error:new Error(e)}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null}this.logger_(`chooseNextRequest_ mediaSequence syncInfo (${t.start} --\x3e ${t.end})`),e=t.segmentIndex,i=t.partIndex,n=t.start}else{this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint.");const t=Tr.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:s,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time});e=t.segmentIndex,i=t.partIndex,n=t.startTime}a.getMediaInfoForTime=this.fetchAtBuffer_?`bufferedEnd ${s}`:`currentTime ${s}`,a.mediaIndex=e,a.startOfSegment=n,a.partIndex=i,this.logger_(`choose next request. Playlist switched and we have a sync point. Media Index: ${a.mediaIndex} `)}const o=r[a.mediaIndex];let l=o&&"number"==typeof a.partIndex&&o.parts&&o.parts[a.partIndex];if(!o||"number"==typeof a.partIndex&&!l)return null;"number"!=typeof a.partIndex&&o.parts&&(a.partIndex=0,l=o.parts[0]);const u=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;if(!i&&l&&!u&&!l.independent)if(0===a.partIndex){const e=r[a.mediaIndex-1],t=e.parts&&e.parts.length&&e.parts[e.parts.length-1];t&&t.independent&&(a.mediaIndex-=1,a.partIndex=e.parts.length-1,a.independent="previous segment")}else o.parts[a.partIndex-1].independent&&(a.partIndex-=1,a.independent="previous part");const c=this.mediaSource_&&"ended"===this.mediaSource_.readyState;return a.mediaIndex>
vendor: 4,734 bytes, line 2
2=r.length-1&&c&&!this.seeking_()?null:(this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,a.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync")),this.generateSegmentInfo_(a))}getSyncInfoFromMediaSequenceSync_(e){if(!this.mediaSequenceSync_)return null;const t=Math.max(e,this.mediaSequenceSync_.start);e!==t&&this.logger_(`getSyncInfoFromMediaSequenceSync_. Pulled target time from ${e} to ${t}`);const i=this.mediaSequenceSync_.getSyncInfoForTime(t);if(!i)return null;if(!i.isAppended)return i;const n=this.mediaSequenceSync_.getSyncInfoForTime(i.end);return n?(n.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"),n):null}generateSegmentInfo_(e){const{independent:t,playlist:i,mediaIndex:n,startOfSegment:s,isSyncRequest:r,partIndex:a,forceTimestampOffset:o,getMediaInfoForTime:l}=e,u=i.segments[n],c="number"==typeof a&&u.parts[a],h={requestId:"segment-loader-"+Math.random(),uri:c&&c.resolvedUri||u.resolvedUri,mediaIndex:n,partIndex:c?a:null,isSyncRequest:r,startOfSegment:s,playlist:i,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:u.timeline,duration:c&&c.duration||u.duration,segment:u,part:c,byteLength:0,transmuxer:this.transmuxer_,getMediaInfoForTime:l,independent:t},d=void 0!==o?o:this.isPendingTimestampOffset_;h.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:u.timeline,currentTimeline:this.currentTimeline_,startOfSegment:s,buffered:this.buffered_(),overrideCheck:d});const p=ir(this.sourceUpdater_.audioBuffered());return"number"==typeof p&&(h.audioAppendStart=p-this.sourceUpdater_.audioTimestampOffset()),this.sourceUpdater_.videoBuffered().length&&(h.gopsToAlignWith=((e,t,i)=>{if(null==t||!e.length)return[];const n=Math.ceil((t-i+3)*S.ONE_SECOND_IN_TS);let s;for(s=0;s<e.length&&!(e[s].pts>n);s++);return e.slice(s)})(this.gopBuffer_,this.currentTime_()-this.sourceUpdater_.videoTimestampOffset(),this.timeMapping_)),h}timestampOffsetForSegment_(e){return(({segmentTimeline:e,currentTimeline:t,startOfSegment:i,buffered:n,overrideCheck:s})=>s||e!==t?e<t?i:n.length?n.end(n.length-1):i:null)(e)}earlyAbortWhenNeeded_(e){if(this.vhs_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return;if(Date.now()-(e.firstBytesReceivedAt||Date.now())<1e3)return;const t=this.currentTime_(),i=e.bandwidth,n=this.pendingSegment_.duration,s=Tr.estimateSegmentRequestTime(n,i,this.playlist_,e.bytesReceived),r=function(e,t,i=1){return((e.length?e.end(e.length-1):0)-t)/i}(this.buffered_(),t,this.vhs_.tech_.playbackRate())-1;if(s<=r)return;const a=function(e){const{main:t,currentTime:i,bandwidth:n,duration:s,segmentDuration:r,timeUntilRebuffer:a,currentTimeline:o,syncController:l}=e,u=t.playlists.filter((e=>!Tr.isIncompatible(e)));let c=u.filter(Tr.isEnabled);c.length||(c=u.filter((e=>!Tr.isDisabled(e))));const h=c.filter(Tr.hasAttribute.bind(null,"BANDWIDTH")).map((e=>{const t=l.getSyncPoint(e,s,o,i)?1:2;return{playlist:e,rebufferingImpact:Tr.estimateSegmentRequestTime(r,n,e)*t-a}})),d=h.filter((e=>e.rebufferingImpact<=0));return ja(d,((e,t)=>Ra(t.playlist,e.playlist))),d.length?d[0]:(ja(h,((e,t)=>e.rebufferingImpact-t.rebufferingImpact)),h[0]||null)}({main:this.vhs_.playlists.main,currentTime:t,bandwidth:i,duration:this.duration_(),segmentDuration:n,timeUntilRebuffer:r,currentTimeline:this.currentTimeline_,syncController:this.syncController_});if(!a)return;const o=s-r-a.rebufferingImpact;let l=.5;r<=Qs&&(l=1),!a.playlist||a.playlist.uri===this.playlist_.uri||o<l||(this.bandwidth=a.playlist.attributes.BANDWIDTH*ua.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort"))}handleAbort_(e){this.logger_(`Aborting ${Wa(e)}`),this.mediaRequestsAborted+=1}handleProgress_(e,t){this.earlyAbortWhenNeeded_(t.stats),this.checkForAbort_(t.requestId)||this.trigger("progress")}handleTrackInfo_(e,t){const{hasAudio:i,hasVideo:n}=t,s={segmentInfo:Ya({type:this.loaderType_,segment:e}),trackInfo:{hasAudio:i,hasVideo:n}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:s}),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;const i=Object.keys(e).sort(),n=Object.keys(t).sort();if(i.length!==n.length)return!1;for(let s=0;s<i.length;s++){const r=i[s];if(r!==n[s])return!1;if(e[r]!==t[r])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)||
vendor: 9,981 bytes, line 2
2(this.pendingSegment_.trackInfo=t,this.hasEnoughInfoToAppend_()?this.processCallQueue_():Qa(this)))}handleTimingInfo_(e,t,i,n){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;const s=this.pendingSegment_,r=Ga(t);s[r]=s[r]||{},s[r][i]=n,this.logger_(`timinginfo: ${t} - ${i} - ${n}`),this.hasEnoughInfoToAppend_()?this.processCallQueue_():Qa(this)}handleCaptions_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(0===t.length)return void this.logger_("SegmentLoader received no captions from a caption event");if(!this.pendingSegment_.hasAppendedData_)return void this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,e,t));const i=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),n={};t.forEach((e=>{n[e.stream]=n[e.stream]||{startTime:1/0,captions:[],endTime:0};const 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((e=>{const{startTime:t,endTime:r,captions:a}=n[e],o=this.inbandTextTracks_;this.logger_(`adding cues from ${t} -> ${r} for ${e}`),function(e,t,i){if(!e[i]){t.trigger({type:"usage",name:"vhs-608"});let n=i;/^cc708_/.test(i)&&(n="SERVICE"+i.split("_")[1]);const s=t.textTracks().getTrackById(n);if(s)e[i]=s;else{let s=i,r=i,a=!1;const o=(t.options_.vhs&&t.options_.vhs.captionServices||{})[n];o&&(s=o.label,r=o.language,a=o.default),e[i]=t.addRemoteTextTrack({kind:"captions",id:n,default:a,label:s,language:r},!1).track}}}(o,this.vhs_.tech_,e),qa(t,r,o[e]),function({inbandTextTracks:e,captionArray:t,timestampOffset:i}){if(!t)return;const n=s().WebKitDataCue||s().VTTCue;t.forEach((t=>{const s=t.stream;t.content?t.content.forEach((r=>{const a=new n(t.startTime+i,t.endTime+i,r.text);a.line=r.line,a.align="left",a.position=r.position,a.positionAlign="line-left",e[s].addCue(a)})):e[s].addCue(new n(t.startTime+i,t.endTime+i,t.text))}))}({captionArray:a,inbandTextTracks:o,timestampOffset:i})})),this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}handleId3_(e,t,i){this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId)||(this.pendingSegment_.hasAppendedData_?this.addMetadataToTextTrack(i,t,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,e,t,i)))}processMetadataQueue_(){this.metadataQueue_.id3.forEach((e=>e())),this.metadataQueue_.caption.forEach((e=>e())),this.metadataQueue_.id3=[],this.metadataQueue_.caption=[]}processCallQueue_(){const e=this.callQueue_;this.callQueue_=[],e.forEach((e=>e()))}processLoadQueue_(){const e=this.loadQueue_;this.loadQueue_=[],e.forEach((e=>e()))}hasEnoughInfoToLoad_(){if("audio"!==this.loaderType_)return!0;const e=this.pendingSegment_;return!(!e||this.getCurrentMediaInfo_()&&Ka({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}getCurrentMediaInfo_(e=this.pendingSegment_){return e&&e.trackInfo||this.currentMediaInfo_}getMediaInfo_(e=this.pendingSegment_){return this.getCurrentMediaInfo_(e)||this.startingMediaInfo_}getPendingSegmentPlaylist(){return this.pendingSegment_?this.pendingSegment_.playlist:null}hasEnoughInfoToAppend_(){if(!this.sourceUpdater_.ready())return!1;if(this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;const e=this.pendingSegment_,t=this.getCurrentMediaInfo_();if(!e||!t)return!1;const{hasAudio:i,hasVideo:n,isMuxed:s}=t;return!(n&&!e.videoTimingInfo||i&&!this.audioDisabled_&&!s&&!e.audioTimingInfo||Ka({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:e.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_}))}handleData_(e,t){if(this.earlyAbortWhenNeeded_(e.stats),this.checkForAbort_(e.requestId))return;if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())return Qa(this),void this.callQueue_.push(this.handleData_.bind(this,e,t));const i=this.pendingSegment_;if(this.setTimeMapping_(i.timeline),this.updateMediaSecondsLoaded_(i.part||i.segment),"closed"!==this.mediaSource_.readyState){if(e.map&&(e.map=this.initSegmentForMap(e.map,!0),i.segment.map=e.map),e.key&&this.segmentKey(e.key,!0),i.isFmp4=e.isFmp4,i.timingInfo=i.timingInfo||{},i.isFmp4)this.trigger("fmp4"),i.timingInfo.start=i[Ga(t.type)].start;else{const e=this.getCurrentMediaInfo_(),t="main"===this.loaderType_&&e&&e.hasVideo;let n;t&&(n=i.videoTimingInfo.start),i.timingInfo.start=this.trueSegmentStart_({currentStart:i.timingInfo.start,playlist:i.playlist,mediaIndex:i.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:t,firstVideoFrameTimeForData:n,videoTimingInfo:i.videoTimingInfo,audioTimingInfo:i.audioTimingInfo})}if(this.updateAppendInitSegmentStatus(i,t.type),this.updateSourceBufferTimestampOffset_(i),i.isSyncRequest){this.updateTimingInfoEnd_(i),this.syncController_.saveSegmentTimingInfo({segmentInfo:i,shouldSaveTimelineMapping:"main"===this.loaderType_});const e=this.chooseNextRequest_();if(e.mediaIndex!==i.mediaIndex||e.partIndex!==i.partIndex)return void this.logger_("sync segment was incorrect, not appending");this.logger_("sync segment was correct, appending")}i.hasAppendedData_=!0,this.processMetadataQueue_(),this.appendData_(i,t)}}updateAppendInitSegmentStatus(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)}getInitSegmentAndUpdateState_({type:e,initSegment:t,map:i,playlist:n}){if(i){const e=Jr(i);if(this.activeInitSegmentId_===e)return null;t=this.initSegmentForMap(i,!0).bytes,this.activeInitSegmentId_=e}return t&&this.appendInitSegment_[e]?(this.playlistOfLastInitSegment_[e]=n,this.appendInitSegment_[e]=!1,this.activeInitSegmentId_=null,t):null}handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i},n){const r=this.sourceUpdater_.audioBuffered(),a=this.sourceUpdater_.videoBuffered();r.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+tr(r).join(", ")),a.length>1&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+tr(a).join(", "));const o=r.length?r.start(0):0,l=r.length?r.end(r.length-1):0,u=a.length?a.start(0):0,c=a.length?a.end(a.length-1):0;if(l-o<=1&&c-u<=1)return this.logger_(`On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: ${i.byteLength}, audio buffer: ${tr(r).join(", ")}, video buffer: ${tr(a).join(", ")}, `),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:1/0}),void this.trigger("error");this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:e,type:t,bytes:i}));const h=this.currentTime_()-1;this.logger_(`On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to ${h}`),this.remove(0,h,(()=>{this.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"),this.waitingOnRemove_=!1,this.quotaExceededErrorRetryTimeout_=s().setTimeout((()=>{this.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue"),this.quotaExceededErrorRetryTimeout_=null,this.processCallQueue_()}),1e3)}),!0)}handleAppendError_({segmentInfo:e,type:t,bytes:i},n){n&&(22!==n.code?(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",n),this.error({message:`${t} append of ${i.length}b failed for segment #${e.mediaIndex} in playlist ${e.playlist.id}`,metadata:{errorType:Bs.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")):this.handleQuotaExceededError_({segmentInfo:e,type:t,bytes:i}))}appendToSourceBuffer_({segmentInfo:e,type:t,initSegment:i,data:n,bytes:s}){if(!s){const e=[n];let t=n.byteLength;i&&(e.unshift(i),t+=i.byteLength),s=(e=>{let t,i=0;return e.bytes&&(t=new Uint8Array(e.bytes),e.segments.forEach((e=>{t.set(e,i),i+=e.byteLength}))),t})({bytes:t,segments:e})}const r={segmentInfo:Ya({type:this.loaderType_,segment:e})};this.trigger({type:"segmentappendstart",metadata:r}),this.sourceUpdater_.appendBuffer({segmentInfo:e,type:t,bytes:s},this.handleAppendError_.bind(this,{segmentInfo:e,type:t,bytes:s}))}handleSegmentTimingInfo_(e,t,i){if(!this.pendingSegment_||t!==this.pendingSegment_.requestId)return;const n=this.pendingSegment_.segment,s=`${e}TimingInfo`;n[s]||(n[s]={}),n[s].transmuxerPrependedSeconds=i.prependedContentDuration||0,n[s].transmuxedPresentationStart=i.start.presentation,n[s].transmuxedDecodeStart=i.start.decode,n[s].transmuxedPresentationEnd=i.end.presentation,n[s].transmuxedDecodeEnd=i.end.decode,n[s].baseMediaDecodeTime=i.baseMediaDecodeTime}appendData_(e,t){const{type:i,data:n}=t;if(!n||!n.byteLength)return;if("audio"===i&&this.audioDisabled_)return;const s=this.getInitSegmentAndUpdateState_({type:i,initSegment:t.initSegment,playlist:e.playlist,map:e.isFmp4?e.segment.map:null});this.appendToSourceBuffer_({segmentInfo:e,type:i,initSegment:s,data:n})}loadSegment_(e){if(this.state="WAITING",this.pendingSegment_=e,this.trimBackBuffer_(e),"number"==typeof e.timestampOffset&&this.transmuxer_&&this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),!this.hasEnoughInfoToLoad_())return Qa(this),void this.loadQueue_.push((()=>{const t=(0,h.Z)({},e,{forceTimestampOffset:!0});(0,h.Z)(e,this.generateSegmentInfo_(t)),this.isPendingTimestampOffset_=!1,this.updateTransmuxerAndRequestSegment_(e)}));this.updateTransmuxerAndRequestSegment_(e)}updateTransmuxerAndRequestSegment_(e){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}));const t=this.createSimplifiedSegmentObj_(e),i=this.isEndOfStream_
vendor: 4,611 bytes, line 2
2(e.mediaIndex,e.playlist,e.partIndex),n=null!==this.mediaIndex,s=e.timeline!==this.currentTimeline_&&e.timeline>0,r=i||n&&s;this.logger_(`Requesting\n${Ba(e.uri)}\n${Wa(e)}`),t.map&&!t.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0,audio:!0}),e.abortRequests=Aa({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:t,abortFn:this.handleAbort_.bind(this,e),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:r,endedTimelineFn:()=>{this.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:({message:t,level:i,stream:n})=>{this.logger_(`${Wa(e)} logged from transmuxer stream ${n} as a ${i}: ${t}`)},triggerSegmentEventFn:({type:e,segment:t,keyInfo:i,trackInfo:n,timingInfo:s})=>{const r={segmentInfo:Ya({segment:t})};i&&(r.keyInfo=i),n&&(r.trackInfo=n),s&&(r.timingInfo=s),this.trigger({type:e,metadata:r})}})}trimBackBuffer_(e){const t=((e,t,i)=>{let n=t-ua.BACK_BUFFER_LENGTH;e.length&&(n=Math.max(n,e.start(0)));const s=t-i;return Math.min(s,n)})(this.seekable_(),this.currentTime_(),this.playlist_.targetDuration||10);t>0&&this.remove(0,t)}createSimplifiedSegmentObj_(e){const t=e.segment,i=e.part,n=e.segment.key||e.segment.map&&e.segment.map.key,s=e.segment.map&&!e.segment.map.bytes,r={resolvedUri:i?i.resolvedUri:t.resolvedUri,byterange:i?i.byterange:t.byterange,requestId:e.requestId,transmuxer:e.transmuxer,audioAppendStart:e.audioAppendStart,gopsToAlignWith:e.gopsToAlignWith,part:e.part,type:this.loaderType_,start:e.startOfSegment,duration:e.duration,isEncrypted:n,isMediaInitialization:s},a=e.playlist.segments[e.mediaIndex-1];if(a&&a.timeline===t.timeline&&(a.videoTimingInfo?r.baseStartTime=a.videoTimingInfo.transmuxedDecodeEnd:a.audioTimingInfo&&(r.baseStartTime=a.audioTimingInfo.transmuxedDecodeEnd)),t.key){const i=t.key.iv||new Uint32Array([0,0,0,e.mediaIndex+e.playlist.mediaSequence]);r.key=this.segmentKey(t.key),r.key.iv=i}return t.map&&(r.map=this.initSegmentForMap(t.map)),r}saveTransferStats_(e){this.mediaRequests+=1,e&&(this.mediaBytesTransferred+=e.bytesReceived,this.mediaTransferDuration+=e.roundTripTime)}saveBandwidthRelatedStats_(e,t){if(this.pendingSegment_.byteLength=t.bytesReceived,e<za)return void this.logger_(`Ignoring segment's bandwidth because its duration of ${e} is less than the min to record 0.016666666666666666`);const i={bandwidthInfo:{from:this.bandwidth,to:t.bandwidth}};this.trigger({type:"bandwidthupdated",metadata:i}),this.bandwidth=t.bandwidth,this.roundTrip=t.roundTripTime}handleTimeout_(){this.mediaRequestsTimedout+=1,this.bandwidth=1,this.roundTrip=NaN,this.trigger("bandwidthupdate"),this.trigger("timeout")}segmentRequestFinished_(e,t,i){if(this.callQueue_.length)return void this.callQueue_.push(this.segmentRequestFinished_.bind(this,e,t,i));if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return;if(t.requestId!==this.pendingSegment_.requestId)return;if(e){if(this.pendingSegment_=null,this.state="READY",e.code===Sa)return;return this.pause(),e.code===Ta?void this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(e),void this.trigger("error"))}const n=this.pendingSegment_;this.saveBandwidthRelatedStats_(n.duration,t.stats),n.endOfAllRequests=t.endOfAllRequests,i.gopInfo&&(this.gopBuffer_=((e,t,i)=>{if(!t.length)return e;if(i)return t.slice();const n=t[0].pts;let s=0;for(;s<e.length&&!(e[s].pts>=n);s++);return e.slice(0,s).concat(t)})(this.gopBuffer_,i.gopInfo,this.safeAppend_)),this.state="APPENDING",this.trigger("appending"),this.waitForAppendsToComplete_(n)}setTimeMapping_(e){const t=this.syncController_.mappingForTimeline(e);null!==t&&(this.timeMapping_=t)}updateMediaSecondsLoaded_(e){"number"==typeof e.start&&"number"==typeof e.end?this.mediaSecondsLoaded+=e.end-e.start:this.mediaSecondsLoaded+=e.duration}shouldUpdateTransmuxerTimestampOffset_(e){return null!==e&&("main"===this.loaderType_&&e!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&e!==this.sourceUpdater_.audioTimestampOffset())}trueSegmentStart_({currentStart:e,playlist:t,mediaIndex:i,firstVideoFrameTimeForData:n,currentVideoTimestampOffset:s,useVideoTimingInfo:r,videoTimingInfo:a,audioTimingInfo:o}
vendor: 4,638 bytes, line 2
2){if(void 0!==e)return e;if(!r)return o.start;const l=t.segments[i-1];return 0!==i&&l&&void 0!==l.start&&l.end===n+s?a.start:n}waitForAppendsToComplete_(e){const t=this.getCurrentMediaInfo_(e);if(!t)return this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:1/0}),void this.trigger("error");const{hasAudio:i,hasVideo:n,isMuxed:s}=t,r="main"===this.loaderType_&&n,a=!this.audioDisabled_&&i&&!s;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);r&&e.waitingOnAppends++,a&&e.waitingOnAppends++,r&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,e)),a&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,e))}checkAppendsDone_(e){this.checkForAbort_(e.requestId)||(e.waitingOnAppends--,0===e.waitingOnAppends&&this.handleAppendsDone_())}checkForIllegalMediaSwitch(e){const t=((e,t,i)=>"main"===e&&t&&i?i.hasAudio||i.hasVideo?t.hasVideo&&!i.hasVideo?"Only audio found in segment when we expected video. We can't switch to audio only from a stream that had video. To get rid of this message, please add codec information to the manifest.":!t.hasVideo&&i.hasVideo?"Video found in segment when we expected only audio. We can't switch to a stream with video from an audio only stream. To get rid of this message, please add codec information to the manifest.":null:"Neither audio nor video found in segment.":null)(this.loaderType_,this.getCurrentMediaInfo_(),e);return!!t&&(this.error({message:t,playlistExclusionDuration:1/0}),this.trigger("error"),!0)}updateSourceBufferTimestampOffset_(e){if(null===e.timestampOffset||"number"!=typeof e.timingInfo.start||e.changedTimestampOffset||"main"!==this.loaderType_)return;let t=!1;e.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e.segment.videoTimingInfo,audioTimingInfo:e.segment.audioTimingInfo,timingInfo:e.timingInfo}),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")}getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:e,audioTimingInfo:t,timingInfo:i}){return this.useDtsForTimestampOffset_?e&&"number"==typeof e.transmuxedDecodeStart?e.transmuxedDecodeStart:t&&"number"==typeof t.transmuxedDecodeStart?t.transmuxedDecodeStart:i.start:i.start}updateTimingInfoEnd_(e){e.timingInfo=e.timingInfo||{};const t=this.getMediaInfo_(),i="main"===this.loaderType_&&t&&t.hasVideo&&e.videoTimingInfo?e.videoTimingInfo:e.audioTimingInfo;i&&(e.timingInfo.end="number"==typeof i.end?i.end:i.start+e.duration)}handleAppendsDone_(){if(this.pendingSegment_){const e={segmentInfo:Ya({type:this.loaderType_,segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:e})}if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());const e=this.pendingSegment_;e.part&&e.part.syncInfo?e.part.syncInfo.markAppended():e.segment.syncInfo&&e.segment.syncInfo.markAppended(),this.updateTimingInfoEnd_(e),this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:"main"===this.loaderType_});const t=((e,t)=>{if("hls"!==t)return null;const i=(e=>{let t=0;return["video","audio"].forEach((function(i){const n=e[`${i}TimingInfo`];if(!n)return;const{start:r,end:a}=n;let o;"bigint"==typeof r||"bigint"==typeof a?o=s().BigInt(a)-s().BigInt(r):"number"==typeof r&&"number"==typeof a&&(o=a-r),void 0!==o&&o>t&&(t=o)})),"bigint"==typeof t&&t<Number.MAX_SAFE_INTEGER&&(t=Number(t)),t})({audioTimingInfo:e.audioTimingInfo,videoTimingInfo:e.videoTimingInfo});if(!i)return null;const n=e.playlist.targetDuration,r=Xa({segmentDuration:i,maxDuration:2*n}),a=Xa({segmentDuration:i,maxDuration:n}),o=`Segment with index ${e.mediaIndex} from playlist ${e.playlist.id} has a duration of ${i} when the reported duration is ${e.duration} and the target duration is ${n}. 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`;
vendor: 7,136 bytes, line 2
2return r||a?{severity:r?"warn":"info",message:o}:null})(e,this.sourceType_);if(t&&("warn"===t.severity?Bs.log.warn(t.message):this.logger_(t.message)),this.recordThroughput_(e),this.pendingSegment_=null,this.state="READY",e.isSyncRequest&&(this.trigger("syncinfoupdate"),!e.hasAppendedData_))return void this.logger_(`Throwing away un-appended sync request ${Wa(e)}`);this.logger_(`Appended ${Wa(e)}`),this.addSegmentMetadataCue_(e),this.fetchAtBuffer_=!0,this.currentTimeline_!==e.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:e.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:e.timeline})),this.currentTimeline_=e.timeline,this.trigger("syncinfoupdate");const i=e.segment,n=e.part,r=i.end&&this.currentTime_()-i.end>3*e.playlist.targetDuration,a=n&&n.end&&this.currentTime_()-n.end>3*e.playlist.partTargetDuration;if(r||a)return this.logger_(`bad ${r?"segment":"part"} ${Wa(e)}`),void this.resetEverything();null!==this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=e.mediaIndex,this.partIndex=e.partIndex,this.isEndOfStream_(e.mediaIndex,e.playlist,e.partIndex)&&this.endOfStream(),this.trigger("appended"),e.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_()}recordThroughput_(e){if(e.duration<za)return void this.logger_(`Ignoring segment's throughput because its duration of ${e.duration} is less than the min to record 0.016666666666666666`);const t=this.throughput.rate,i=Date.now()-e.endOfAllRequests+1,n=Math.floor(e.byteLength/i*8*1e3);this.throughput.rate+=(n-t)/++this.throughput.count}addSegmentMetadataCue_(e){if(!this.segmentMetadataTrack_)return;const t=e.segment,i=t.start,n=t.end;if(!$a(i)||!$a(n))return;qa(i,n,this.segmentMetadataTrack_);const r=s().WebKitDataCue||s().VTTCue,a={custom:t.custom,dateTimeObject:t.dateTimeObject,dateTimeString:t.dateTimeString,programDateTime:t.programDateTime,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:i,end:n},o=new r(i,n,JSON.stringify(a));o.value=a,this.segmentMetadataTrack_.addCue(o)}}function Za(){}const eo=function(e){return"string"!=typeof e?e:e.replace(/./,(e=>e.toUpperCase()))},to=["video","audio"],io=(e,t)=>{const i=t[`${e}Buffer`];return i&&i.updating||t.queuePending[e]},no=(e,t)=>{if(0===t.queue.length)return;let i=0,n=t.queue[i];if("mediaSource"!==n.type){if("mediaSource"!==e&&t.ready()&&"closed"!==t.mediaSource.readyState&&!io(e,t)){if(n.type!==e){if(i=((e,t)=>{for(let i=0;i<t.length;i++){const n=t[i];if("mediaSource"===n.type)return null;if(n.type===e)return i}return null})(e,t.queue),null===i)return;n=t.queue[i]}return t.queue.splice(i,1),t.queuePending[e]=n,n.action(e,t),n.doneFn?void 0:(t.queuePending[e]=null,void no(e,t))}}else t.updating()||"closed"===t.mediaSource.readyState||(t.queue.shift(),n.action(t),n.doneFn&&n.doneFn(),no("audio",t),no("video",t))},so=(e,t)=>{const i=t[`${e}Buffer`],n=eo(e);i&&(i.removeEventListener("updateend",t[`on${n}UpdateEnd_`]),i.removeEventListener("error",t[`on${n}Error_`]),t.codecs[e]=null,t[`${e}Buffer`]=null)},ro=(e,t)=>e&&t&&-1!==Array.prototype.indexOf.call(e.sourceBuffers,t),ao=(e,t,i)=>(n,s)=>{const r=s[`${n}Buffer`];if(ro(s.mediaSource,r)){s.logger_(`Appending segment ${t.mediaIndex}'s ${e.length} bytes to ${n}Buffer`);try{r.appendBuffer(e)}catch(e){s.logger_(`Error with code ${e.code} `+(22===e.code?"(QUOTA_EXCEEDED_ERR) ":"")+`when appending segment ${t.mediaIndex} to ${n}Buffer`),s.queuePending[n]=null,i(e)}}},oo=(e,t)=>(i,n)=>{const s=n[`${i}Buffer`];if(ro(n.mediaSource,s)){n.logger_(`Removing ${e} to ${t} from ${i}Buffer`);try{s.remove(e,t)}catch(s){n.logger_(`Remove ${e} to ${t} from ${i}Buffer failed`)}}},lo=e=>(t,i)=>{const n=i[`${t}Buffer`];ro(i.mediaSource,n)&&(i.logger_(`Setting ${t}timestampOffset to ${e}`),n.timestampOffset=e)},uo=e=>(t,i)=>{e()},co=e=>t=>{if("open"===t.mediaSource.readyState){t.logger_(`Calling mediaSource endOfStream(${e||""})`);try{t.mediaSource.endOfStream(e)}catch(e){Bs.log.warn("Failed to call media source endOfStream",e)}}},ho=e=>t=>{t.logger_(`Setting mediaSource duration to ${e}`);try{t.mediaSource.duration=e}catch(e){Bs.log.warn("Failed to set media source duration",e)}},po=(e,t)=>i=>{const n=eo(e),s=(0,f._5)(t);i.logger_(`Adding ${e}Buffer with codec ${t} to mediaSource`);const r=i.mediaSource.addSourceBuffer(s);r.addEventListener("updateend",i[`on${n}UpdateEnd_`]),r.addEventListener("error",i[`on${n}Error_`]),i.codecs[e]=t,i[`${e}Buffer`]=r},fo=e=>t=>{const i=t[`${e}Buffer`];if(so(e,t),ro(t.mediaSource,i)){t.logger_(`Removing ${e}Buffer with codec ${t.codecs[e]} from mediaSource`);try{t.mediaSource.removeSourceBuffer(i)}catch(t){Bs.log.warn(`Failed to removeSourceBuffer ${e}Buffer`,t)}}},go=e=>(t,i)=>{const n=i[`${t}Buffer`],s=(0,f._5)(e);if(!ro(i.mediaSource,n))return;const r=e.substring(0,e.indexOf(".")),a=i.codecs[t];if(a.substring(0,a.indexOf("."))===r)return;const o={codecsChangeInfo:{from:a,to:e}};i.trigger({type:"codecschange",metadata:o}),i.logger_(`changing ${t}Buffer codec from ${a} to ${e}`);try{n.changeType(s),i.codecs[t]=e}catch(e){o.errorType=Bs.Error.StreamingCodecsChangeError,o.error=e,e.metadata=o,i.error_=e,i.trigger("error"),Bs.log.warn(`Failed to changeType on ${t}Buffer`,e)}},mo=({type:e,sourceUpdater:t,action:i,doneFn:n,name:s})=>{t.queue.push({type:e,action:i,doneFn:n,name:s}),no(e,t)},yo=(e,t)=>i=>{const n=function(e){if(0===e.length)return"Buffered Ranges are empty";let t="Buffered Ranges: \n";for(let i=0;i<e.length;i++){const n=e.start(i),s=e.end(i);t+=`${n} --\x3e ${s}. Duration (${s-n})\n`}return t}(t[`${e}Buffered`]());if(t.logger_(`received "updateend" event for ${e} Source Buffer: `,n),t.queuePending[e]){const i=t.queuePending[e].doneFn;t.queuePending[e]=null,i&&i(t[`${e}Error_`])}no(e,t)};class _o extends Bs.EventTarget{constructor(e){super(),this.mediaSource=e,this.sourceopenListener_=()=>no("mediaSource",this),this.mediaSource.addEventListener("sourceopen",this.sourceopenListener_),this.logger_=Ws("SourceUpdater"),this.audioTimestampOffset_=0,this.videoTimestampOffset_=0,this.queue=[],this.queuePending={audio:null,video:null},this.delayedAudioAppendQueue_=[],this.videoAppendQueued_=!1,this.codecs={},this.onVideoUpdateEnd_=yo("video",this),this.onAudioUpdateEnd_=yo("audio",this),this.onVideoError_=e=>{this.videoError_=e},this.onAudioError_=e=>{this.audioError_=e},this.createdSourceBuffers_=!1,this.initializedEme_=!1,this.triggeredReady_=!1}initializedEme(){this.initializedEme_=!0,this.triggerReady()}hasCreatedSourceBuffers(){return this.createdSourceBuffers_}hasInitializedAnyEme(){return this.initializedEme_}ready(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}createSourceBuffers(e){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(e),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())}
vendor: 4,889 bytes, line 2
2triggerReady(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))}addSourceBuffer(e,t){mo({type:"mediaSource",sourceUpdater:this,action:po(e,t),name:"addSourceBuffer"})}abort(e){mo({type:e,sourceUpdater:this,action:(e,t)=>{if("open"!==t.mediaSource.readyState)return;const i=t[`${e}Buffer`];if(ro(t.mediaSource,i)){t.logger_(`calling abort on ${e}Buffer`);try{i.abort()}catch(t){Bs.log.warn(`Failed to abort on ${e}Buffer`,t)}}},name:"abort"})}removeSourceBuffer(e){this.canRemoveSourceBuffer()?mo({type:"mediaSource",sourceUpdater:this,action:fo(e),name:"removeSourceBuffer"}):Bs.log.error("removeSourceBuffer is not supported!")}canRemoveSourceBuffer(){return!Bs.browser.IS_FIREFOX&&s().MediaSource&&s().MediaSource.prototype&&"function"==typeof s().MediaSource.prototype.removeSourceBuffer}static canChangeType(){return s().SourceBuffer&&s().SourceBuffer.prototype&&"function"==typeof s().SourceBuffer.prototype.changeType}canChangeType(){return this.constructor.canChangeType()}changeType(e,t){this.canChangeType()?mo({type:e,sourceUpdater:this,action:go(t),name:"changeType"}):Bs.log.error("changeType is not supported!")}addOrChangeSourceBuffers(e){if(!e||"object"!=typeof e||0===Object.keys(e).length)throw new Error("Cannot addOrChangeSourceBuffers to undefined codecs");Object.keys(e).forEach((t=>{const i=e[t];if(!this.hasCreatedSourceBuffers())return this.addSourceBuffer(t,i);this.canChangeType()&&this.changeType(t,i)}))}appendBuffer(e,t){const{segmentInfo:i,type:n,bytes:s}=e;if(this.processedAppend_=!0,"audio"===n&&this.videoBuffer&&!this.videoAppendQueued_)return this.delayedAudioAppendQueue_.push([e,t]),void this.logger_(`delayed audio append of ${s.length} until video append`);if(mo({type:n,sourceUpdater:this,action:ao(s,i||{mediaIndex:-1},t),doneFn:t,name:"appendBuffer"}),"video"===n){if(this.videoAppendQueued_=!0,!this.delayedAudioAppendQueue_.length)return;const e=this.delayedAudioAppendQueue_.slice();this.logger_(`queuing delayed audio ${e.length} appendBuffers`),this.delayedAudioAppendQueue_.length=0,e.forEach((e=>{this.appendBuffer.apply(this,e)}))}}audioBuffered(){return ro(this.mediaSource,this.audioBuffer)&&this.audioBuffer.buffered?this.audioBuffer.buffered:Ks()}videoBuffered(){return ro(this.mediaSource,this.videoBuffer)&&this.videoBuffer.buffered?this.videoBuffer.buffered:Ks()}buffered(){const e=ro(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,t=ro(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return t&&!e?this.audioBuffered():e&&!t?this.videoBuffered():function(e,t){let i=null,n=null,s=0;const r=[],a=[];if(!(e&&e.length&&t&&t.length))return Ks();let o=e.length;for(;o--;)r.push({time:e.start(o),type:"start"}),r.push({time:e.end(o),type:"end"});for(o=t.length;o--;)r.push({time:t.start(o),type:"start"}),r.push({time:t.end(o),type:"end"});for(r.sort((function(e,t){return e.time-t.time})),o=0;o<r.length;o++)"start"===r[o].type?(s++,2===s&&(i=r[o].time)):"end"===r[o].type&&(s--,1===s&&(n=r[o].time)),null!==i&&null!==n&&(a.push([i,n]),i=null,n=null);return Ks(a)}(this.audioBuffered(),this.videoBuffered())}setDuration(e,t=Za){mo({type:"mediaSource",sourceUpdater:this,action:ho(e),name:"duration",doneFn:t})}endOfStream(e=null,t=Za){"string"!=typeof e&&(e=void 0),mo({type:"mediaSource",sourceUpdater:this,action:co(e),name:"endOfStream",doneFn:t})}removeAudio(e,t,i=Za){this.audioBuffered().length&&0!==this.audioBuffered().end(0)?mo({type:"audio",sourceUpdater:this,action:oo(e,t),doneFn:i,name:"remove"}):i()}removeVideo(e,t,i=Za){this.videoBuffered().length&&0!==this.videoBuffered().end(0)?mo({type:"video",sourceUpdater:this,action:oo(e,t),doneFn:i,name:"remove"}):i()}updating(){return!(!io("audio",this)&&!io("video",this))}audioTimestampOffset(e){return void 0!==e&&this.audioBuffer&&this.audioTimestampOffset_!==e&&(mo({type:"audio",sourceUpdater:this,action:lo(e),name:"timestampOffset"}),this.audioTimestampOffset_=e),this.audioTimestampOffset_}videoTimestampOffset(e){return void 0!==e&&this.videoBuffer&&this.videoTimestampOffset_!==e&&(mo({type:"video",sourceUpdater:this,action:lo(e),name:"timestampOffset"}),this.videoTimestampOffset_=e),this.videoTimestampOffset_}audioQueueCallback(e){this.audioBuffer&&mo({type:"audio",sourceUpdater:this,action:uo(e),name:"callback"})}videoQueueCallback(e){this.videoBuffer&&mo({type:"video",sourceUpdater:this,action:uo(e),name:"callback"})}dispose(){this.trigger("dispose"),to.forEach((e=>{this.abort(e),this.canRemoveSourceBuffer()?this.removeSourceBuffer(e):this[`${e}QueueCallback`]((()=>so(e,this)))})),this.videoAppendQueued_=!1,this.delayedAudioAppendQueue_.length=0,this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_),this.off()}}const vo=e=>decodeURIComponent(escape(String.fromCharCode.apply(null,e))),bo=new Uint8Array("\n\n".split("").map((e=>e.charCodeAt(0))));
vendor: 5,054 bytes, line 2
2class To extends Error{constructor(){super("Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.")}}class So extends Ja{constructor(e,t={}){super(e,t),this.mediaSource_=null,this.subtitlesTrack_=null,this.featuresNativeTextTracks_=e.featuresNativeTextTracks,this.loadVttJs=e.loadVttJs,this.shouldSaveSegmentTimingInfo_=!1}buffered_(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return Ks();const e=this.subtitlesTrack_.cues;return Ks([[e[0].startTime,e[e.length-1].startTime]])}initSegmentForMap(e,t=!1){if(!e)return null;const i=Jr(e);let n=this.initSegments_[i];if(t&&!n&&e.bytes){const t=bo.byteLength+e.bytes.byteLength,s=new Uint8Array(t);s.set(e.bytes),s.set(bo,e.bytes.byteLength),this.initSegments_[i]=n={resolvedUri:e.resolvedUri,byterange:e.byterange,bytes:s}}return n||e}couldBeginLoading_(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()}init_(){return this.state="READY",this.resetEverything(),this.monitorBuffer_()}track(e){return void 0===e||(this.subtitlesTrack_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_()),this.subtitlesTrack_}remove(e,t){qa(e,t,this.subtitlesTrack_)}fillBuffer_(){const e=this.chooseNextRequest_();if(e){if(null===this.syncController_.timestampOffsetForTimeline(e.timeline)){const e=()=>{this.state="READY",this.paused()||this.monitorBuffer_()};return this.syncController_.one("timestampoffset",e),void(this.state="WAITING_ON_TIMELINE")}this.loadSegment_(e)}}timestampOffsetForSegment_(){return null}chooseNextRequest_(){return this.skipEmptySegments_(super.chooseNextRequest_())}skipEmptySegments_(e){for(;e&&e.segment.empty;){if(e.mediaIndex+1>=e.playlist.segments.length){e=null;break}e=this.generateSegmentInfo_({playlist:e.playlist,mediaIndex:e.mediaIndex+1,startOfSegment:e.startOfSegment+e.duration,isSyncRequest:e.isSyncRequest})}return e}stopForError(e){this.error(e),this.state="READY",this.pause(),this.trigger("error")}segmentRequestFinished_(e,t,i){if(!this.subtitlesTrack_)return void(this.state="READY");if(this.saveTransferStats_(t.stats),!this.pendingSegment_)return this.state="READY",void(this.mediaRequestsAborted+=1);if(e)return e.code===Ta&&this.handleTimeout_(),e.code===Sa?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,void this.stopForError(e);const n=this.pendingSegment_,r=i.mp4VttCues&&i.mp4VttCues.length;r&&(n.mp4VttCues=i.mp4VttCues),this.saveBandwidthRelatedStats_(n.duration,t.stats),t.key&&this.segmentKey(t.key,!0),this.state="APPENDING",this.trigger("appending");const a=n.segment;if(a.map&&(a.map.bytes=t.map.bytes),n.bytes=t.bytes,"function"!=typeof s().WebVTT&&"function"==typeof this.loadVttJs)return this.state="WAITING_ON_VTTJS",void this.loadVttJs().then((()=>this.segmentRequestFinished_(e,t,i)),(()=>this.stopForError({message:"Error loading vtt.js"})));a.requested=!0;try{this.parseVTTCues_(n)}catch(e){return void this.stopForError({message:e.message,metadata:{errorType:Bs.Error.StreamingVttParserError,error:e}})}if(r||this.updateTimeMapping_(n,this.syncController_.timelines[n.timeline],this.playlist_),n.cues.length?n.timingInfo={start:n.cues[0].startTime,end:n.cues[n.cues.length-1].endTime}:n.timingInfo={start:n.startOfSegment,end:n.startOfSegment+n.duration},n.isSyncRequest)return this.trigger("syncinfoupdate"),this.pendingSegment_=null,void(this.state="READY");n.byteLength=n.bytes.byteLength,this.mediaSecondsLoaded+=a.duration,n.cues.forEach((e=>{this.subtitlesTrack_.addCue(this.featuresNativeTextTracks_?new(s().VTTCue)(e.startTime,e.endTime,e.text):e)})),function(e){const t=e.cues;if(!t)return;const i={};for(let n=t.length-1;n>=0;n--){const s=t[n],r=`${s.startTime}-${s.endTime}-${s.text}`;i[r]?e.removeCue(s):i[r]=s}}(this.subtitlesTrack_),this.handleAppendsDone_()}handleData_(e,t){const i=e&&"vtt"===e.type,n=t&&"text"===t.type;i&&n&&super.handleData_(e,t)}updateTimingInfoEnd_(){}parseMp4VttCues_(e){const t=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();e.mp4VttCues.forEach((i=>{const n=i.start+t,r=i.end+t,a=new(s().VTTCue)(n,r,i.cueText);i.settings&&i.settings.split(" ").forEach((e=>{const t=e.split(":"),i=t[0],n=t[1];a[i]=isNaN(n)?n:Number(n)})),e.cues.push(a)}))}parseVTTCues_(e){let t,i=!1;if("function"!=typeof s().WebVTT)throw new To;if(e.cues=[],e.timestampmap={MPEGTS:0,LOCAL:0},e.mp4VttCues)return void this.parseMp4VttCues_(e);"function"==typeof s().TextDecoder?t=new(s().TextDecoder)("utf8"):(t=s().WebVTT.StringDecoder(),i=!0);const n=new(s().WebVTT.Parser)(s(),s().vttjs,t);if(n.oncue=e.cues.push.bind(e.cues),n.ontimestampmap=t=>{e.timestampmap=t},n.onparsingerror=e=>{Bs.log.warn("Error encountered when parsing cues: "+e.message)},e.segment.map){let t=e.segment.map.bytes;i&&(t=vo(t)),n.parse(t)}let r=e.bytes;i&&(r=vo(r)),n.parse(r),n.flush()}updateTimeMapping_(e,t,i){const n=e.segment;if(!t)return;if(!e.cues.length)return void(n.empty=!0);const{MPEGTS:s,LOCAL:r}=e.timestampmap,a=s/S.ONE_SECOND_IN_TS-r+t.mapping;
vendor: 5,933 bytes, line 2
2if(e.cues.forEach((e=>{const i=e.endTime-e.startTime,n=this.handleRollover_(e.startTime+a,t.time);e.startTime=Math.max(n,0),e.endTime=Math.max(n+i,0)})),!i.syncInfo){const t=e.cues[0].startTime,s=e.cues[e.cues.length-1].startTime;i.syncInfo={mediaSequence:i.mediaSequence+e.mediaIndex,time:Math.min(t,s-n.duration)}}}handleRollover_(e,t){if(null===t)return e;let i=e*S.ONE_SECOND_IN_TS;const n=t*S.ONE_SECOND_IN_TS;let s;for(s=n<i?-8589934592:8589934592;Math.abs(i-n)>4294967296;)i+=s;return i/S.ONE_SECOND_IN_TS}}const ko=function(e,t){const i=e.cues;for(let e=0;e<i.length;e++){const n=i[e];if(t>=n.adStartTime&&t<=n.adEndTime)return n}return null};class wo{constructor({start:e,end:t,segmentIndex:i,partIndex:n=null,appended:s=!1}){this.start_=e,this.end_=t,this.segmentIndex_=i,this.partIndex_=n,this.appended_=s}isInRange(e){return e>=this.start&&e<this.end}markAppended(){this.appended_=!0}resetAppendedStatus(){this.appended_=!1}get isAppended(){return this.appended_}get start(){return this.start_}get end(){return this.end_}get segmentIndex(){return this.segmentIndex_}get partIndex(){return this.partIndex_}}class Co{constructor(e,t=[]){this.segmentSyncInfo_=e,this.partsSyncInfo_=t}get segmentSyncInfo(){return this.segmentSyncInfo_}get partsSyncInfo(){return this.partsSyncInfo_}get hasPartsSyncInfo(){return this.partsSyncInfo_.length>0}resetAppendStatus(){this.segmentSyncInfo_.resetAppendedStatus(),this.partsSyncInfo_.forEach((e=>e.resetAppendedStatus()))}}class Eo{constructor(){this.storage_=new Map,this.diagnostics_="",this.isReliable_=!1,this.start_=-1/0,this.end_=1/0}get start(){return this.start_}get end(){return this.end_}get diagnostics(){return this.diagnostics_}get isReliable(){return this.isReliable_}resetAppendedStatus(){this.storage_.forEach((e=>e.resetAppendStatus()))}update(e,t){const{mediaSequence:i,segments:n}=e;if(this.isReliable_=this.isReliablePlaylist_(i,n),this.isReliable_)return this.updateStorage_(n,i,this.calculateBaseTime_(i,n,t))}getSyncInfoForTime(e){for(const{segmentSyncInfo:t,partsSyncInfo:i}of this.storage_.values())if(i.length){for(const t of i)if(t.isInRange(e))return t}else if(t.isInRange(e))return t;return null}getSyncInfoForMediaSequence(e){return this.storage_.get(e)}updateStorage_(e,t,i){const n=new Map;let s="\n",r=i,a=t;this.start_=r,e.forEach(((e,t)=>{const i=this.storage_.get(a),o=r,l=o+e.duration,u=Boolean(i&&i.segmentSyncInfo&&i.segmentSyncInfo.isAppended),c=new wo({start:o,end:l,appended:u,segmentIndex:t});e.syncInfo=c;let h=r;const d=(e.parts||[]).map(((e,n)=>{const r=h,o=h+e.duration,l=Boolean(i&&i.partsSyncInfo&&i.partsSyncInfo[n]&&i.partsSyncInfo[n].isAppended),u=new wo({start:r,end:o,appended:l,segmentIndex:t,partIndex:n});return h=o,s+=`Media Sequence: ${a}.${n} | Range: ${r} --\x3e ${o} | Appended: ${l}\n`,e.syncInfo=u,u}));n.set(a,new Co(c,d)),s+=`${Ba(e.resolvedUri)} | Media Sequence: ${a} | Range: ${o} --\x3e ${l} | Appended: ${u}\n`,a++,r=l})),this.end_=r,this.storage_=n,this.diagnostics_=s}calculateBaseTime_(e,t,i){if(!this.storage_.size)return 0;if(this.storage_.has(e))return this.storage_.get(e).segmentSyncInfo.start;const n=Math.min(...this.storage_.keys());if(e<n){const i=n-e;let s=this.storage_.get(n).segmentSyncInfo.start;for(let e=0;e<i;e++)s-=t[e].duration;return s}return i}isReliablePlaylist_(e,t){return null!=e&&Array.isArray(t)&&t.length}}class xo extends Eo{constructor(e){super(),this.parent_=e}calculateBaseTime_(e,t,i){if(!this.storage_.size){const t=this.parent_.getSyncInfoForMediaSequence(e);return t?t.segmentSyncInfo.start:0}return super.calculateBaseTime_(e,t,i)}}const Io=[{name:"VOD",run:(e,t,i,n,s)=>i!==1/0?{time:0,segmentIndex:0,partIndex:null}:null},{name:"MediaSequence",run:(e,t,i,n,s,r)=>{const a=e.getMediaSequenceSync(r);if(!a)return null;if(!a.isReliable)return null;const o=a.getSyncInfoForTime(s);return o?{time:o.start,partIndex:o.partIndex,segmentIndex:o.segmentIndex}:null}},{name:"ProgramDateTime",run:(e,t,i,n,s)=>{if(!Object.keys(e.timelineToDatetimeMappings).length)return null;let r=null,a=null;const o=rr(t);s=s||0;for(let i=0;i<o.length;i++){const n=o[t.endList||0===s?i:o.length-(i+1)],l=n.segment,u=e.timelineToDatetimeMappings[l.timeline];if(!u||!l.dateTimeObject)continue;let c=l.dateTimeObject.getTime()/1e3+u;if(l.parts&&"number"==typeof n.partIndex)for(let e=0;e<n.partIndex;e++)c+=l.parts[e].duration;const h=Math.abs(s-c);if(null!==a&&(0===h||a<h))break;a=h,r={time:c,segmentIndex:n.segmentIndex,partIndex:n.partIndex}}return r}},{name:"Segment",run:(e,t,i,n,s)=>{let r=null,a=null;s=s||0;const o=rr(t);for(let e=0;e<o.length;e++){const i=o[t.endList||0===s?e:o.length-(e+1)],l=i.segment,u=i.part&&i.part.start||l&&l.start;if(l.timeline===n&&void 0!==u){const e=Math.abs(s-u);if(null!==a&&a<e)break;(!r||null===a||a>=e)&&(a=e,r={time:u,segmentIndex:i.segmentIndex,partIndex:i.partIndex})}}return r}},{name:"Discontinuity",run:(e,t,i,n,s)=>{let r=null;if(s=s||0,t.discontinuityStarts&&t.discontinuityStarts.length){let i=null;for(let n=0;n<t.discontinuityStarts.length;n++){const a=t.discontinuityStarts[n],o=t.discontinuitySequence+n+1,l=e.discontinuities[o];if(l){const e=Math.abs(s-l.time);if(null!==i&&i<e)break;(!r||null===i||i>=e)&&(i=e,r={time:l.time,segmentIndex:a,partIndex:null})}}}return r}},{name:"Playlist",run:(e,t,i,n,s)=>t.syncInfo?{time:t.syncInfo.time,segmentIndex:t.syncInfo.mediaSequence-t.mediaSequence,partIndex:null}:null}];class Oo extends Bs.EventTarget{constructor(e={}){super(),this.timelines=[],this.discontinuities=[],this.timelineToDatetimeMappings={};const t=new Eo,i=new xo(t),n=new xo(t);this.mediaSequenceStorage_={main:t,audio:i,vtt:n},this.logger_=Ws("SyncController")}getMediaSequenceSync(e){return this.mediaSequenceStorage_[e]||null}getSyncPoint(e,t,i,n,s){if(t!==1/0)return Io.find((({name:e})=>"VOD"===e)).run(this,e,t);const r=this.runStrategies_(e,t,i,n,s);if(!r.length)return null;for(const t of r){const{syncPoint:i,strategy:s}
vendor: 5,113 bytes, line 2
2=t,{segmentIndex:r,time:a}=i;if(r<0)continue;const o=a,l=o+e.segments[r].duration;if(this.logger_(`Strategy: ${s}. Current time: ${n}. selected segment: ${r}. Time: [${o} -> ${l}]}`),n>=o&&n<l)return this.logger_("Found sync point with exact match: ",i),i}return this.selectSyncPoint_(r,{key:"time",value:n})}getExpiredTime(e,t){if(!e||!e.segments)return null;const i=this.runStrategies_(e,t,e.discontinuitySequence,0);if(!i.length)return null;const n=this.selectSyncPoint_(i,{key:"segmentIndex",value:0});return n.segmentIndex>0&&(n.time*=-1),Math.abs(n.time+hr({defaultDuration:e.targetDuration,durationList:e.segments,startIndex:n.segmentIndex,endIndex:0}))}runStrategies_(e,t,i,n,s){const r=[];for(let a=0;a<Io.length;a++){const o=Io[a],l=o.run(this,e,t,i,n,s);l&&(l.strategy=o.name,r.push({strategy:o.name,syncPoint:l}))}return r}selectSyncPoint_(e,t){let i=e[0].syncPoint,n=Math.abs(e[0].syncPoint[t.key]-t.value),s=e[0].strategy;for(let r=1;r<e.length;r++){const a=Math.abs(e[r].syncPoint[t.key]-t.value);a<n&&(n=a,i=e[r].syncPoint,s=e[r].strategy)}return this.logger_(`syncPoint for [${t.key}: ${t.value}] chosen with strategy [${s}]: [time:${i.time}, segmentIndex:${i.segmentIndex}`+("number"==typeof i.partIndex?`,partIndex:${i.partIndex}`:"")+"]"),i}saveExpiredSegmentInfo(e,t){const i=t.mediaSequence-e.mediaSequence;if(i>86400)Bs.log.warn(`Not saving expired segment info. Media sequence gap ${i} is too large.`);else for(let n=i-1;n>=0;n--){const i=e.segments[n];if(i&&void 0!==i.start){t.syncInfo={mediaSequence:e.mediaSequence+n,time:i.start},this.logger_(`playlist refresh sync: [time:${t.syncInfo.time}, mediaSequence: ${t.syncInfo.mediaSequence}]`),this.trigger("syncinfoupdate");break}}}setDateTimeMappingForStart(e){if(this.timelineToDatetimeMappings={},e.segments&&e.segments.length&&e.segments[0].dateTimeObject){const t=e.segments[0],i=t.dateTimeObject.getTime()/1e3;this.timelineToDatetimeMappings[t.timeline]=-i}}saveSegmentTimingInfo({segmentInfo:e,shouldSaveTimelineMapping:t}){const i=this.calculateSegmentTimeMapping_(e,e.timingInfo,t),n=e.segment;i&&(this.saveDiscontinuitySyncInfo_(e),e.playlist.syncInfo||(e.playlist.syncInfo={mediaSequence:e.playlist.mediaSequence+e.mediaIndex,time:n.start}));const s=n.dateTimeObject;n.discontinuity&&t&&s&&(this.timelineToDatetimeMappings[n.timeline]=-s.getTime()/1e3)}timestampOffsetForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].time}mappingForTimeline(e){return void 0===this.timelines[e]?null:this.timelines[e].mapping}calculateSegmentTimeMapping_(e,t,i){const n=e.segment,s=e.part;let r,a,o=this.timelines[e.timeline];if("number"==typeof e.timestampOffset)o={time:e.startOfSegment,mapping:e.startOfSegment-t.start},i&&(this.timelines[e.timeline]=o,this.trigger("timestampoffset"),this.logger_(`time mapping for timeline ${e.timeline}: [time: ${o.time}] [mapping: ${o.mapping}]`)),r=e.startOfSegment,a=t.end+o.mapping;else{if(!o)return!1;r=t.start+o.mapping,a=t.end+o.mapping}return s&&(s.start=r,s.end=a),(!n.start||r<n.start)&&(n.start=r),n.end=a,!0}saveDiscontinuitySyncInfo_(e){const t=e.playlist,i=e.segment;if(i.discontinuity)this.discontinuities[i.timeline]={time:i.start,accuracy:0};else if(t.discontinuityStarts&&t.discontinuityStarts.length)for(let n=0;n<t.discontinuityStarts.length;n++){const s=t.discontinuityStarts[n],r=t.discontinuitySequence+n+1,a=s-e.mediaIndex,o=Math.abs(a);if(!this.discontinuities[r]||this.discontinuities[r].accuracy>o){let n;n=a<0?i.start-hr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex,endIndex:s}):i.end+hr({defaultDuration:t.targetDuration,durationList:t.segments,startIndex:e.mediaIndex+1,endIndex:s}),this.discontinuities[r]={time:n,accuracy:o}}}}dispose(){this.trigger("dispose"),this.off()}}class Po extends Bs.EventTarget{constructor(){super(),this.pendingTimelineChanges_={},this.lastTimelineChanges_={}}clearPendingTimelineChange(e){this.pendingTimelineChanges_[e]=null,this.trigger("pendingtimelinechange")}pendingTimelineChange({type:e,from:t,to:i}){return"number"==typeof t&&"number"==typeof i&&(this.pendingTimelineChanges_[e]={type:e,from:t,to:i},this.trigger("pendingtimelinechange")),this.pendingTimelineChanges_[e]}lastTimelineChange({type:e,from:t,to:i}){if("number"==typeof t&&"number"==typeof i){this.lastTimelineChanges_[e]={type:e,from:t,to:i},delete this.pendingTimelineChanges_[e];const n={timelineChangeInfo:{from:t,to:i}};this.trigger({type:"timelinechange",metadata:n})}return this.lastTimelineChanges_[e]}dispose(){this.trigger("dispose"),this.pendingTimelineChanges_={},this.lastTimelineChanges_={},this.off()}}const Ao=da(pa((function(){var e=function(){function e(){this.listeners={}}var t=e.prototype;return t.on=function(e,t){this.listeners[e]||(this.listeners[e]=[]),this.listeners[e].push(t)},t.off=function(e,t){if(!this.listeners[e])return!1;var i=this.listeners[e].indexOf(t);return this.listeners[e]=this.listeners[e].slice(0),this.listeners[e].splice(i,1),i>-1},t.trigger=function(e){var t=this.listeners[e];if(t)if(2===arguments.length)for(var i=t.length,n=0;n<i;++n)t[n].call(this,arguments[1]);
vendor: 12,800 bytes, line 2
2else for(var s=Array.prototype.slice.call(arguments,1),r=t.length,a=0;a<r;++a)t[a].apply(this,s)},t.dispose=function(){this.listeners={}},t.pipe=function(e){this.on("data",(function(t){e.push(t)}))},e}();let t=null;class n{constructor(e){let i,n,s;t||(t=function(){const e=[[[],[],[],[],[]],[[],[],[],[],[]]],t=e[0],i=e[1],n=t[4],s=i[4];let r,a,o;const l=[],u=[];let c,h,d,p,f,g;for(r=0;r<256;r++)u[(l[r]=r<<1^283*(r>>7))^r]=r;for(a=o=0;!n[a];a^=c||1,o=u[o]||1)for(p=o^o<<1^o<<2^o<<3^o<<4,p=p>>8^255&p^99,n[a]=p,s[p]=a,d=l[h=l[c=l[a]]],g=16843009*d^65537*h^257*c^16843008*a,f=257*l[p]^16843008*p,r=0;r<4;r++)t[r][a]=f=f<<24^f>>>8,i[r][p]=g=g<<24^g>>>8;for(r=0;r<5;r++)t[r]=t[r].slice(0),i[r]=i[r].slice(0);return e}()),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()]];const r=this._tables[0][4],a=this._tables[1],o=e.length;let l=1;if(4!==o&&6!==o&&8!==o)throw new Error("Invalid aes key size");const u=e.slice(0),c=[];for(this._key=[u,c],i=o;i<4*o+28;i++)s=u[i-1],(i%o==0||8===o&&i%o==4)&&(s=r[s>>>24]<<24^r[s>>16&255]<<16^r[s>>8&255]<<8^r[255&s],i%o==0&&(s=s<<8^s>>>24^l<<24,l=l<<1^283*(l>>7))),u[i]=u[i-o]^s;for(n=0;i;n++,i--)s=u[3&n?i:i-4],c[n]=i<=4||n<4?s:a[0][r[s>>>24]]^a[1][r[s>>16&255]]^a[2][r[s>>8&255]]^a[3][r[255&s]]}decrypt(e,t,i,n,s,r){const a=this._key[1];let o,l,u,c=e^a[0],h=n^a[1],d=i^a[2],p=t^a[3];const f=a.length/4-2;let g,m=4;const y=this._tables[1],_=y[0],v=y[1],b=y[2],T=y[3],S=y[4];for(g=0;g<f;g++)o=_[c>>>24]^v[h>>16&255]^b[d>>8&255]^T[255&p]^a[m],l=_[h>>>24]^v[d>>16&255]^b[p>>8&255]^T[255&c]^a[m+1],u=_[d>>>24]^v[p>>16&255]^b[c>>8&255]^T[255&h]^a[m+2],p=_[p>>>24]^v[c>>16&255]^b[h>>8&255]^T[255&d]^a[m+3],m+=4,c=o,h=l,d=u;for(g=0;g<4;g++)s[(3&-g)+r]=S[c>>>24]<<24^S[h>>16&255]<<16^S[d>>8&255]<<8^S[255&p]^a[m++],o=c,c=h,h=d,d=p,p=o}}class s extends e{constructor(){super(e),this.jobs=[],this.delay=1,this.timeout_=null}processJob_(){this.jobs.shift()(),this.jobs.length?this.timeout_=setTimeout(this.processJob_.bind(this),this.delay):this.timeout_=null}push(e){this.jobs.push(e),this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))}}const r=function(e){return e<<24|(65280&e)<<8|(16711680&e)>>8|e>>>24};class a{constructor(e,t,i,n){const o=a.STEP,l=new Int32Array(e.buffer),u=new Uint8Array(e.byteLength);let c=0;for(this.asyncStream_=new s,this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+o),t,i,u)),c=o;c<l.length;c+=o)i=new Uint32Array([r(l[c-4]),r(l[c-3]),r(l[c-2]),r(l[c-1])]),this.asyncStream_.push(this.decryptChunk_(l.subarray(c,c+o),t,i,u));this.asyncStream_.push((function(){var e;n(null,(e=u).subarray(0,e.byteLength-e[e.byteLength-1]))}))}static get STEP(){return 32e3}decryptChunk_(e,t,i,s){return function(){const a=function(e,t,i){const s=new Int32Array(e.buffer,e.byteOffset,e.byteLength>>2),a=new n(Array.prototype.slice.call(t)),o=new Uint8Array(e.byteLength),l=new Int32Array(o.buffer);let u,c,h,d,p,f,g,m,y;for(u=i[0],c=i[1],h=i[2],d=i[3],y=0;y<s.length;y+=4)p=r(s[y]),f=r(s[y+1]),g=r(s[y+2]),m=r(s[y+3]),a.decrypt(p,f,g,m,l,y),l[y]=r(l[y]^u),l[y+1]=r(l[y+1]^c),l[y+2]=r(l[y+2]^h),l[y+3]=r(l[y+3]^d),u=p,c=f,h=g,d=m;return o}(e,t,i);s.set(a,e.byteOffset)}}}var o,l,u="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self?self:{},c=("undefined"!=typeof window?window:void 0!==u?u:"undefined"!=typeof self?self:{}).BigInt||Number;c("0x1"),c("0x100"),c("0x10000"),c("0x1000000"),c("0x100000000"),c("0x10000000000"),c("0x1000000000000"),c("0x100000000000000"),c("0x10000000000000000"),o=new Uint16Array([65484]),255===(l=new Uint8Array(o.buffer,o.byteOffset,o.byteLength))[0]||l[0];self.onmessage=function(e){const t=e.data,i=new Uint8Array(t.encrypted.bytes,t.encrypted.byteOffset,t.encrypted.byteLength),n=new Uint32Array(t.key.bytes,t.key.byteOffset,t.key.byteLength/4),s=new Uint32Array(t.iv.bytes,t.iv.byteOffset,t.iv.byteLength/4);new a(i,n,s,(function(e,i){self.postMessage(function(e){const t={};return Object.keys(e).forEach((i=>{const n=e[i];var s;s=n,("function"===ArrayBuffer.isView?ArrayBuffer.isView(s):s&&s.buffer instanceof ArrayBuffer)?t[i]={bytes:n.buffer,byteOffset:n.byteOffset,byteLength:n.byteLength}:t[i]=n})),t}({source:t.source,decrypted:i}),[i.buffer])}))}})));var Lo=ha(Ao);const Mo=e=>{let t=e.default?"main":"alternative";return e.characteristics&&e.characteristics.indexOf("public.accessibility.describes-video")>=0&&(t="main-desc"),t},Do=(e,t)=>{e.abort(),e.pause(),t&&t.activePlaylistLoader&&(t.activePlaylistLoader.pause(),t.activePlaylistLoader=null)},jo=(e,t)=>{t.activePlaylistLoader=e,e.load()},Ro={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:i},excludePlaylist:n}=t,s=i.activeTrack(),r=i.activeGroup(),a=(r.filter((e=>e.default))[0]||r[0]).id,o=i.tracks[a];if(s!==o){Bs.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(const e in i.tracks)i.tracks[e].enabled=i.tracks[e]===o;i.onTrackChanged()}else n({error:{message:"Problem encountered loading the default audio track."}})},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:i}}=t;Bs.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");const n=i.activeTrack();n&&(n.mode="disabled"),i.onTrackChanged()}},No={AUDIO:(e,t,i)=>{if(!t)return;const{tech:n,requestOptions:s,segmentLoaders:{[e]:r}}=i;t.on("loadedmetadata",(()=>{const e=t.media();r.playlist(e,s),(!n.paused()||e.endList&&"none"!==n.preload())&&r.load()})),t.on("loadedplaylist",(()=>{r.playlist(t.media(),s),n.paused()||r.load()})),t.on("error",Ro[e](e,i))},SUBTITLES:(e,t,i)=>{const{tech:n,requestOptions:s,segmentLoaders:{[e]:r},mediaTypes:{[e]:a}}=i;t.on("loadedmetadata",(()=>{const e=t.media();r.playlist(e,s),r.track(a.activeTrack()),(!n.paused()||e.endList&&"none"!==n.preload())&&r.load()})),t.on("loadedplaylist",(()=>{r.playlist(t.media(),s),n.paused()||r.load()})),t.on("error",Ro[e](e,i))}},Uo={AUDIO:(e,t)=>{const{vhs:i,sourceType:n,segmentLoaders:{[e]:s},requestOptions:r,main:{mediaGroups:a},mediaTypes:{[e]:{groups:o,tracks:l,logger_:u}},mainPlaylistLoader:c}=t,h=br(c.main);a[e]&&0!==Object.keys(a[e]).length||(a[e]={main:{default:{default:!0}}},h&&(a[e].main.default.playlists=c.main.playlists));for(const s in a[e]){o[s]||(o[s]=[]);for(const d in a[e][s]){let p,f=a[e][s][d];if(h?(u(`AUDIO group '${s}' label '${d}' is a main playlist`),f.isMainPlaylist=!0,p=null):p="vhs-json"===n&&f.playlists?new $r(f.playlists[0],i,r):f.resolvedUri?new $r(f.resolvedUri,i,r):f.playlists&&"dash"===n?new la(f.playlists[0],i,r,c):null,f=Gs({id:d,playlistLoader:p},f),No[e](e,f.playlistLoader,t),o[s].push(f),void 0===l[d]){const e=new Bs.AudioTrack({id:d,kind:Mo(f),enabled:!1,language:f.language,default:f.default,label:d});l[d]=e}}}s.on("error",Ro[e](e,t))},SUBTITLES:(e,t)=>{const{tech:i,vhs:n,sourceType:s,segmentLoaders:{[e]:r},requestOptions:a,main:{mediaGroups:o},mediaTypes:{[e]:{groups:l,tracks:u}},mainPlaylistLoader:c}=t;for(const r in o[e]){l[r]||(l[r]=[]);for(const h in o[e][r]){if(!n.options_.useForcedSubtitles&&o[e][r][h].forced)continue;let d,p=o[e][r][h];if("hls"===s)d=new $r(p.resolvedUri,n,a);else if("dash"===s){if(!p.playlists.filter((e=>e.excludeUntil!==1/0)).length)return;d=new la(p.playlists[0],n,a,c)}else"vhs-json"===s&&(d=new $r(p.playlists?p.playlists[0]:p.resolvedUri,n,a));if(p=Gs({id:h,playlistLoader:d},p),No[e](e,p.playlistLoader,t),l[r].push(p),void 0===u[h]){const e=i.addRemoteTextTrack({id:h,kind:"subtitles",default:p.default&&p.autoselect,language:p.language,label:h},!1).track;u[h]=e}}}r.on("error",Ro[e](e,t))},"CLOSED-CAPTIONS":(e,t)=>{const{tech:i,main:{mediaGroups:n},mediaTypes:{[e]:{groups:s,tracks:r}}}=t;for(const t in n[e]){s[t]||(s[t]=[]);for(const a in n[e][t]){const o=n[e][t][a];if(!/^(?:CC|SERVICE)/.test(o.instreamId))continue;const l=i.options_.vhs&&i.options_.vhs.captionServices||{};let u={label:a,language:o.language,instreamId:o.instreamId,default:o.default&&o.autoselect};if(l[u.instreamId]&&(u=Gs(u,l[u.instreamId])),void 0===u.default&&delete u.default,s[t].push(Gs({id:a},o)),void 0===r[a]){const e=i.addRemoteTextTrack({id:u.instreamId,kind:"captions",default:u.default,language:u.language,label:u.label},!1).track;r[a]=e}}}}},Bo=(e,t)=>{for(let i=0;i<e.length;i++){if(_r(t,e[i]))return!0;if(e[i].playlists&&Bo(e[i].playlists,t))return!0}return!1},Fo={AUDIO:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if(i[e].enabled)return i[e];return null},SUBTITLES:(e,t)=>()=>{const{mediaTypes:{[e]:{tracks:i}}}=t;for(const e in i)if("showing"===i[e].mode||"hidden"===i[e].mode)return i[e];return null}};class Vo{constructor(){this.priority_=[],this.pathwayClones_=new Map}set version(e){1===e&&(this.version_=e)}set ttl(e){this.ttl_=e||300}set reloadUri(e){e&&(this.reloadUri_=$s(this.reloadUri_,e))}set priority(e){e&&e.length&&(this.priority_=e)}set pathwayClones(e){e&&e.length&&(this.pathwayClones_=new Map(e.map((e=>[e.ID,e]))))}get version(){return this.version_}get ttl(){return this.ttl_}get reloadUri(){return this.reloadUri_}get priority(){return this.priority_}get pathwayClones(){return this.pathwayClones_}}class Ho extends Bs.EventTarget{constructor(e,t){super(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=!1,this.availablePathways_=new Set,this.steeringManifest=new Vo,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.currentPathwayClones=new Map,this.nextPathwayClones=new Map,this.excludedSteeringManifestURLs=new Set,this.logger_=Ws("Content Steering"),this.xhr_=e,this.getBandwidth_=t}assignTagProperties(e,t){this.manifestType_=t.serverUri?"HLS":"DASH";const i=t.serverUri||t.serverURL;if(!i)return this.logger_(`steering manifest URL is ${i}, cannot request steering manifest.`),void this.trigger("error");i.startsWith("data:")?this.decodeDataUriManifest_(i.substring(i.indexOf(",")+1)):(this.steeringManifest.reloadUri=$s(e,i),this.defaultPathway=t.pathwayId||t.defaultServiceLocation,this.queryBeforeStart=t.queryBeforeStart,this.proxyServerUrl_=t.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering"))}requestSteeringManifest(e){const t=this.steeringManifest.reloadUri;if(!t)return;const i=e?t:this.getRequestURI(t);if(!i)return this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),void this.dispose();const n={contentSteeringInfo:{uri:i}};this.trigger({type:"contentsteeringloadstart",metadata:n}),this.request_=this.xhr_({uri:i,requestType:"content-steering-manifest"},((e,t)=>{if(e){if(410===t.status)return this.logger_(`manifest request 410 ${e}.`),this.logger_(`There will be no more content steering requests to ${i} this session.`),void this.excludedSteeringManifestURLs.add(i);if(429===t.status){const i=t.responseHeaders["retry-after"];return this.logger_(`manifest request 429 ${e}.`),this.logger_(`content steering will retry in ${i} seconds.`),void this.startTTLTimeout_(parseInt(i,10))}return this.logger_(`manifest failed to load ${e}.`),void this.startTTLTimeout_()}let s;this.trigger({type:"contentsteeringloadcomplete",metadata:n});try{s=JSON.parse(this.request_.responseText)}catch(e){const t={errorType:Bs.Error.StreamingContentSteeringParserError,error:e};this.trigger({type:"error",metadata:t})}this.assignSteeringProperties_(s);const r={contentSteeringInfo:n.contentSteeringInfo,contentSteeringManifest:{version:this.steeringManifest.version,reloadUri:this.steeringManifest.reloadUri,priority:this.steeringManifest.priority}};this.trigger({type:"contentsteeringparsed",metadata:r}),this.startTTLTimeout_()}))}setProxyServerUrl_(e){const t=new(s().URL)(e),i=new(s().URL)(this.proxyServerUrl_);return i.searchParams.set("url",encodeURI(t.toString())),this.setSteeringParams_(i.toString())}decodeDataUriManifest_(e){const t=JSON.parse(s().atob(e));this.assignSteeringProperties_(t)}setSteeringParams_(e){const t=new(s().URL)(e),i=this.getPathway(),n=this.getBandwidth_();if(i){const e=`_${this.manifestType_}_pathway`;t.searchParams.set(e,i)}if(n){const e=`_${this.manifestType_}_throughput`;t.searchParams.set(e,n)}return t.toString()}assignSteeringProperties_(e){if(this.steeringManifest.version=e.VERSION,!this.steeringManifest.version)return this.logger_(`manifest version is ${e.VERSION}, which is not supported.`),void this.trigger("error");this.steeringManifest.ttl=e.TTL,this.steeringManifest.reloadUri=e["RELOAD-URI"],this.steeringManifest.priority=e["PATHWAY-PRIORITY"]||e["SERVICE-LOCATION-PRIORITY"],this.steeringManifest.pathwayClones=e["PATHWAY-CLONES"],this.nextPathwayClones=this.steeringManifest.pathwayClones,this.availablePathways_.size||(this.logger_("There are no available pathways for c
2ontent steering. Ending content steering."),this.trigger("error"),this.dispose());const t=(e=>{for(const t of e)if(this.availablePathways_.has(t))return t;return[...this.availablePathways_][0]})(this.steeringManifest.priority);this.currentPathway!==t&&(this.currentPathway=t,this.trigger("content-steering"))}getPathway(){return this.currentPathway||this.defaultPathway}getRequestURI(e){if(!e)return null;const t=e=>this.excludedSteeringManifestURLs.has(e);if(this.proxyServerUrl_){const i=this.setProxyServerUrl_(e);if(!t(i))return i}const i=this.setSteeringParams_(e);return t(i)?null:i}startTTLTimeout_(e=this.steeringManifest.ttl){const t=1e3*e;this.ttlTimeout_=s().setTimeout((()=>{this.requestSteeringManifest()}),t)}clearTTLTimeout_(){s().clearTimeout(this.ttlTimeout_),this.ttlTimeout_=null}abort(){this.request_&&this.request_.abort(),this.request_=null}dispose(){this.off("content-steering"),this.off("error"),this.abort(),this.clearTTLTimeout_(),this.currentPathway=null,this.defaultPathway=null,this.queryBeforeStart=null,this.proxyServerUrl_=null,this.manifestType_=null,this.ttlTimeout_=null,this.request_=null,this.excludedSteeringManifestURLs=new Set,this.availablePathways_=new Set,this.steeringManifest=new Vo}addAvailablePathway(e){e&&this.availablePathways_.add(e)}clearAvailablePathways(){this.availablePathways_.clear()}excludePathway(e){return this.availablePathways_.delete(e)}didDASHTagChange(e,t){return!t&&this.steeringManifest.reloadUri||t&&($s(e,t.serverURL)!==this.steeringManifest.reloadUri||t.defaultServiceLocation!==this.defaultPathway||t.queryBeforeStart!==this.queryBeforeStart||t.proxyServerURL!==this.proxyServerUrl_)}getAvailablePathways(){return this.availablePathways_}}let qo;const $o=["mediaRequests","mediaRequestsAborted","mediaRequestsTimedout","mediaRequestsErrored","mediaTransferDuration","mediaBytesTransferred","mediaAppends"],zo=function(e){return this.audioSegmentLoader_[e]+this.mainSegmentLoader_[e]};class Wo extends Bs.EventTarget{constructor(e){super(),this.fastQualityChange_=((e,t)=>{let i=null;return(...t)=>{clearTimeout(i),i=setTimeout((()=>{e.apply(null,t)}),100)}})(this.fastQualityChange_.bind(this));const{src:t,withCredentials:i,tech:n,bandwidth:r,externVhs:a,useCueTags:o,playlistExclusionDuration:l,enableLowInitialPlaylist:u,sourceType:c,cacheEncryptionKeys:h,bufferBasedABR:d,leastPixelDiffSelector:p,captionServices:f,experimentalUseMMS:g}=e;if(!t)throw new Error("A non-empty playlist URL or JSON manifest string is required");let{maxPlaylistRetries:m}=e;null==m&&(m=1/0),qo=a,this.bufferBasedABR=Boolean(d),this.leastPixelDiffSelector=Boolean(p),this.withCredentials=i,this.tech_=n,this.vhs_=n.vhs,this.player_=e.player_,this.sourceType_=c,this.useCueTags_=o,this.playlistExclusionDuration=l,this.maxPlaylistRetries=m,this.enableLowInitialPlaylist=u,this.usingManagedMediaSource_=!1,this.useCueTags_&&(this.cueTagsTrack_=this.tech_.addTextTrack("metadata","ad-cues"),this.cueTagsTrack_.inBandMetadataTrackDispatchType=""),this.requestOptions_={withCredentials:i,maxPlaylistRetries:m,timeout:null},this.on("error",this.pauseLoading),this.mediaTypes_=(()=>{const e={};return["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{e[t]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Za,activeTrack:Za,getActiveGroup:Za,onGroupChanged:Za,onTrackChanged:Za,lastTrack_:null,logger_:Ws(`MediaGroups[${t}]`)}})),e})(),g&&s().ManagedMediaSource?(this.tech_.el_.disableRemotePlayback=!0,this.mediaSource=new(s().ManagedMediaSource),this.usingManagedMediaSource_=!0,Bs.log("Using ManagedMediaSource")):s().MediaSource&&(this.mediaSource=new(s().MediaSource)),this.handleDurationChange_=this.handleDurationChange_.bind(this),this.handleSourceOpen_=this.handleSourceOpen_.bind(this),this.handleSourceEnded_=this.handleSourceEnded_.bind(this),this.load=this.load.bind(this),this.pause=this.pause.bind(this),this.mediaSource.addEventListener("durationchange",this.handleDurationChange_),this.mediaSource.addEventListener("sourceopen",this.handleSourceOpen_),this.mediaSource.addEventListener("sourceended",this.handleSourceEnded_),this.mediaSource.addEventListener("startstreaming",this.load),this.mediaSource.addEventListener("endstreaming",this.pause),this.seekable_=Ks(),this.hasPlayed_=!1,this.syncController_=new Oo(e),this.segmentMetadataTrack_=n.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track,this.segmentMetadataTrack_.mode="hidden",this.decrypter_=new Lo,this.sourceUpdater_=new _o(this.mediaSource),this.inbandTextTracks_={},this.timelineChangeController_=new Po,this.keyStatusMap_=new Map;const y={vhs:this.vhs_,parse708captions:e.parse708captions,useDtsForTimestampOffset:e.useDtsForTimestampOffset,captionServices:f,mediaSource:this.mediaSource,currentTime:this.tech_.currentTime.bind(this.tech_),seekable:()=>this.seekable(),seeking:()=>this.tech_.seeking(),duration:()=>this.duration(),hasPlayed:()=>this.hasPlayed_,goalBufferLength:()=>this.goalBufferLength(),bandwidth:r,syncController:this.syncController_,decrypter:this.decrypter_,sourceType:this.sourceType_,inbandTextTracks:this.inbandTextTracks_,cacheEncryptionKeys:h,sourceUpdater:this.sourceUpdater_,timelineChangeController:this.timelineChangeController_,exactManifestTimings:e.exactManifestTimings,addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)};this.mainPlaylistLoader_="dash"===this.sourceType_?new la(t,this.vhs_,Gs(this.requestOptions_,{addMetadataToTextTrack:this.addMetadataToTextTrack.bind(this)})):new $r(t,this.vhs_,Gs(this.requestOptions_,{addDateRangesToTextTrack:this.addDateRangesToTextTrack_.bind(this)})),this.setupMainPlaylistLoaderListeners_(),this.mainSegmentLoader_=new Ja(Gs(y,{segmentMetadataTrack:this.segmentMetadataTrack_,loaderType:"main"}),e),this.audioSegmentLoader_=new Ja(Gs(y,{loaderType:"audio"}),e),this.subtitleSegmentLoader_=new So(Gs(y,{loaderType:"vtt",featuresNativeTextTracks:this.tech_.featuresNativeTextTracks,loadVttJs:()=>new Promise(((e,t)=>{function i(){n.off("vttjserror",s),e()}function s(){n.off("vttjsloaded",i),t()}n.one("vttjsloaded",i),n.one("vttjserror",s),n.addWebVttScript_()}))}),e),this.contentSteeringController_=new Ho(this.vhs_.xhr,(()=>this.mainSegmentLoader_.bandwidth)),this.setupSegmentLoaderListeners_(),this.bufferBasedABR&&(this.mainPlaylistLoader_.one("loadedplaylist",(()=>this.startABRTimer_())),this.tech_.on("pause",(()=>this.stopABRTimer_())),this.tech_.on("play",(()=>this.startABRTimer_()))),$o.forEach((e=>{this[e+"_"]=zo.bind(this,e)})),this.logger_=Ws("pc"),this.triggeredFmp4Usage=!1,"none"===this.tech_.preload()?(this.loadOnPlay_=()=>{this.loadOnPlay_=null,this.mainPlaylistLoader_.load()},this.tech_.one("play",this.loadOnPlay_)):this.mainPlaylistLoader_.load(),this.timeToLoadedData__=-1,this.mainAppendsToLoadedData__=-1,this.audioAppendsToLoadedData__=-1;const _="none"===this.tech_.preload()?"play":"loadstart";this.tech_.one(_,(()=>{const e=Date.now();this.tech_.one("loadeddata",(()=>{this.timeToLoadedData__=Date.now()-e,this.mainAppendsToLoadedData__=this.mainSegmentLoader_.mediaAppends,this.audioAppendsToLoadedData__=this.audioSegmentLoader_.mediaAppends}))}
vendor: 9,453 bytes, line 2
2))}mainAppendsToLoadedData_(){return this.mainAppendsToLoadedData__}audioAppendsToLoadedData_(){return this.audioAppendsToLoadedData__}appendsToLoadedData_(){const e=this.mainAppendsToLoadedData_(),t=this.audioAppendsToLoadedData_();return-1===e||-1===t?-1:e+t}timeToLoadedData_(){return this.timeToLoadedData__}checkABR_(e="abr"){const t=this.selectPlaylist();t&&this.shouldSwitchToMedia_(t)&&this.switchMedia_(t,e)}switchMedia_(e,t,i){const n=this.media(),s=n&&(n.id||n.uri),r=e&&(e.id||e.uri);if(s&&s!==r){this.logger_(`switch media ${s} -> ${r} from ${t}`);const i={renditionInfo:{id:r,bandwidth:e.attributes.BANDWIDTH,resolution:e.attributes.RESOLUTION,codecs:e.attributes.CODECS},cause:t};this.trigger({type:"renditionselected",metadata:i}),this.tech_.trigger({type:"usage",name:`vhs-rendition-change-${t}`})}this.mainPlaylistLoader_.media(e,i)}switchMediaForDASHContentSteering_(){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((e=>{const t=this.mediaTypes_[e],i=t?t.activeGroup():null,n=this.contentSteeringController_.getPathway();if(i&&n){const t=(i.length?i[0].playlists:i.playlists).filter((e=>e.attributes.serviceLocation===n));t.length&&this.mediaTypes_[e].activePlaylistLoader.media(t[0])}}))}startABRTimer_(){this.stopABRTimer_(),this.abrTimer_=s().setInterval((()=>this.checkABR_()),250)}stopABRTimer_(){this.tech_.scrubbing&&this.tech_.scrubbing()||(s().clearInterval(this.abrTimer_),this.abrTimer_=null)}getAudioTrackPlaylists_(){const e=this.main(),t=e&&e.playlists||[];if(!e||!e.mediaGroups||!e.mediaGroups.AUDIO)return t;const i=e.mediaGroups.AUDIO,n=Object.keys(i);let s;if(Object.keys(this.mediaTypes_.AUDIO.groups).length)s=this.mediaTypes_.AUDIO.activeTrack();else{const e=i.main||n.length&&i[n[0]];for(const t in e)if(e[t].default){s={label:t};break}}if(!s)return t;const r=[];for(const t in i)if(i[t][s.label]){const n=i[t][s.label];if(n.playlists&&n.playlists.length)r.push.apply(r,n.playlists);else if(n.uri)r.push(n);else if(e.playlists.length)for(let i=0;i<e.playlists.length;i++){const n=e.playlists[i];n.attributes&&n.attributes.AUDIO&&n.attributes.AUDIO===t&&r.push(n)}}return r.length?r:t}setupMainPlaylistLoaderListeners_(){this.mainPlaylistLoader_.on("loadedmetadata",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;yr(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,e.endList&&"none"!==this.tech_.preload()&&(this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.mainSegmentLoader_.load()),(e=>{["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach((t=>{Uo[t](t,e)}));const{mediaTypes:t,mainPlaylistLoader:i,tech:n,vhs:s,segmentLoaders:{AUDIO:r,main:a}}=e;["AUDIO","SUBTITLES"].forEach((i=>{t[i].activeGroup=((e,t)=>i=>{const{mainPlaylistLoader:n,mediaTypes:{[e]:{groups:s}}}=t,r=n.media();if(!r)return null;let a=null;r.attributes[e]&&(a=s[r.attributes[e]]);const o=Object.keys(s);if(!a)if("AUDIO"===e&&o.length>1&&br(t.main))for(let e=0;e<o.length;e++){const t=s[o[e]];if(Bo(t,r)){a=t;break}}else s.main?a=s.main:1===o.length&&(a=s[o[0]]);return void 0===i?a:null!==i&&a&&a.filter((e=>e.id===i.id))[0]||null})(i,e),t[i].activeTrack=Fo[i](i,e),t[i].onGroupChanged=((e,t)=>()=>{const{segmentLoaders:{[e]:i,main:n},mediaTypes:{[e]:s}}=t,r=s.activeTrack(),a=s.getActiveGroup(),o=s.activePlaylistLoader,l=s.lastGroup_;a&&l&&a.id===l.id||(s.lastGroup_=a,s.lastTrack_=r,Do(i,s),a&&!a.isMainPlaylist&&(a.playlistLoader?(i.resyncLoader(),jo(a.playlistLoader,s)):o&&n.resetEverything()))})(i,e),t[i].onGroupChanging=((e,t)=>()=>{const{segmentLoaders:{[e]:i},mediaTypes:{[e]:n}}=t;n.lastGroup_=null,i.abort(),i.pause()})(i,e),t[i].onTrackChanged=((e,t)=>()=>{const{mainPlaylistLoader:i,segmentLoaders:{[e]:n,main:s},mediaTypes:{[e]:r}}=t,a=r.activeTrack(),o=r.getActiveGroup(),l=r.activePlaylistLoader,u=r.lastTrack_;if((!u||!a||u.id!==a.id)&&(r.lastGroup_=o,r.lastTrack_=a,Do(n,r),o)){if(o.isMainPlaylist){if(!a||!u||a.id===u.id)return;const e=t.vhs.playlistController_,n=e.selectPlaylist();if(e.media()===n)return;return r.logger_(`track change. Switching main audio from ${u.id} to ${a.id}`),i.pause(),s.resetEverything(),void e.fastQualityChange_(n)}if("AUDIO"===e){if(!o.playlistLoader)return s.setAudio(!0),void s.resetEverything();n.setAudio(!0),s.setAudio(!1)}l!==o.playlistLoader?(n.track&&n.track(a),n.resetEverything(),jo(o.playlistLoader,r)):jo(o.playlistLoader,r)}})(i,e),t[i].getActiveGroup=((e,{mediaTypes:t})=>()=>{const i=t[e].activeTrack();return i?t[e].activeGroup(i):null})(i,e)}));const o=t.AUDIO.activeGroup();if(o){const e=(o.filter((e=>e.default))[0]||o[0]).id;t.AUDIO.tracks[e].enabled=!0,t.AUDIO.onGroupChanged(),t.AUDIO.onTrackChanged(),t.AUDIO.getActiveGroup().playlistLoader?(a.setAudio(!1),r.setAudio(!0)):a.setAudio(!0)}i.on("mediachange",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanged()))})),i.on("mediachanging",(()=>{["AUDIO","SUBTITLES"].forEach((e=>t[e].onGroupChanging()))}));const l=()=>{t.AUDIO.onTrackChanged(),n.trigger({type:"usage",name:"vhs-audio-change"})};n.audioTracks().addEventListener("change",l),n.remoteTextTracks().addEventListener("change",t.SUBTITLES.onTrackChanged),s.on("dispose",(()=>{n.audioTracks().removeEventListener("change",l),n.remoteTextTracks().removeEventListener("change",t.SUBTITLES.onTrackChanged)})),n.clearTracks("audio");for(const e in t.AUDIO.tracks)n.audioTracks().addTrack(t.AUDIO.tracks[e])})({sourceType:this.sourceType_,segmentLoaders:{AUDIO:this.audioSegmentLoader_,SUBTITLES:this.subtitleSegmentLoader_,main:this.mainSegmentLoader_},tech:this.tech_,requestOptions:this.requestOptions_,mainPlaylistLoader:this.mainPlaylistLoader_,vhs:this.vhs_,main:this.main(),mediaTypes:this.mediaTypes_,excludePlaylist:this.excludePlaylist.bind(this)}),this.triggerPresenceUsage_(this.main(),e),this.setupFirstPlay(),!this.mediaTypes_.AUDIO.activePlaylistLoader||this.mediaTypes_.AUDIO.activePlaylistLoader.media()?this.trigger("selectedinitialmedia"):this.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",(()=>{this.trigger("selectedinitialmedia")}))})),this.mainPlaylistLoader_.on("loadedplaylist",(()=>{this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_);let e=this.mainPlaylistLoader_.media();if(!e){let t;if(this.attachContentSteeringListeners_(),this.initContentSteeringController_(),this.excludeUnsupportedVariants_(),this.enableLowInitialPlaylist&&(t=this.selectInitialPlaylist()),t||(t=this.selectPlaylist()),!t||!this.shouldSwitchToMedia_(t))return;if(this.initialMedia_=t,this.switchMedia_(this.initialMedia_,"initial"),"vhs-json"!==this.sourceType_||!this.initialMedia_.segments)return;e=this.initialMedia_}this.handleUpdatedMediaPlaylist(e)})),this.mainPlaylistLoader_.on("error",(()=>{const e=this.mainPlaylistLoader_.error;this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainPlaylistLoader_.on("mediachanging",(()=>{this.mainSegmentLoader_.abort(),this.mainSegmentLoader_.pause()})),this.mainPlaylistLoader_.on("mediachange",(()=>{const e=this.mainPlaylistLoader_.media(),t=1.5*e.targetDuration*1e3;yr(this.mainPlaylistLoader_.main,this.mainPlaylistLoader_.media())?this.requestOptions_.timeout=0:this.requestOptions_.timeout=t,"dash"===this.sourceType_&&this.mainPlaylistLoader_.isPaused&&this.mainPlaylistLoader_.load(),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_?this.runFastQualitySwitch_():this.mainSegmentLoader_.load(),this.tech_.trigger({type:"mediachange",bubbles:!0})})),this.mainPlaylistLoader_.on("playlistunchanged",(()=>{const e=this.mainPlaylistLoader_.media();"playlist-unchanged"!==e.lastExcludeReason_&&this.stuckAtPlaylistEnd_(e)&&(this.excludePlaylist({error:{message:"Playlist no longer updating.",reason:"playlist-unchanged"}}),this.tech_.trigger("playliststuck"))})),this.mainPlaylistLoader_.on("renditiondisabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})})),this.mainPlaylistLoader_.on("renditionenabled",(()=>{this.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})})),["manifestrequeststart","manifestrequestcomplete","manifestparsestart","manifestparsecomplete","playlistrequeststart","playlistrequestcomplete","playlistparsestart","playlistparsecomplete","renditiondisabled","renditionenabled"].forEach((e=>{this.mainPlaylistLoader_.on(e,(e=>{this.player_.trigger((0,h.Z)({},e))}))}))}handleUpdatedMediaPlaylist(e){this.useCueTags_&&this.updateAdCues_(e),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.playlist(e,this.requestOptions_),this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_(),this.updateDuration(!e.endList),this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())}triggerPresenceUsage_(e,t){const i=e.mediaGroups||{};let n=!0;const s=Object.keys(i.AUDIO);for(const e in i.AUDIO)for(const t in i.AUDIO[e])i.AUDIO[e][t].uri||(n=!1);n&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"}),Object.keys(i.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"}),qo.Playlist.isAes(t)&&this.tech_.trigger({type:"usage",name:"vhs-aes"}),s.length&&Object.keys(i.AUDIO[s[0]]).length>1&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"}),this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}shouldSwitchToMedia_(e){const t=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pen
vendor: 1,433 bytes, line 2
2dingMedia_,i=this.tech_.currentTime(),n=this.bufferLowWaterLine(),s=this.bufferHighWaterLine();return function({currentPlaylist:e,buffered:t,currentTime:i,nextPlaylist:n,bufferLowWaterLine:s,bufferHighWaterLine:r,duration:a,bufferBasedABR:o,log:l}){if(!n)return Bs.log.warn("We received no playlist to switch to. Please check your stream."),!1;const u=`allowing switch ${e&&e.id||"null"} -> ${n.id}`;if(!e)return l(`${u} as current playlist is not set`),!0;if(n.id===e.id)return!1;const c=Boolean(Js(t,i).length);if(!e.endList)return c||"number"!=typeof e.partTargetDuration?(l(`${u} as current playlist is live`),!0):(l(`not ${u} as current playlist is live llhls, but currentTime isn't in buffered.`),!1);const h=nr(t,i),d=o?ua.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:ua.MAX_BUFFER_LOW_WATER_LINE;if(a<d)return l(`${u} as duration < max low water line (${a} < ${d})`),!0;const p=n.attributes.BANDWIDTH,f=e.attributes.BANDWIDTH;if(p<f&&(!o||h<r)){let e=`${u} as next bandwidth < current bandwidth (${p} < ${f})`;return o&&(e+=` and forwardBuffer < bufferHighWaterLine (${h} < ${r})`),l(e),!0}if((!o||p>f)&&h>=s){let e=`${u} as forwardBuffer >= bufferLowWaterLine (${h} >= ${s})`;return o&&(e+=` and next bandwidth > current bandwidth (${p} > ${f})`),l(e),!0}return l(`not ${u} as no switching criteria met`),!1}({buffered:this.tech_.buffered(),currentTime:i,currentPlaylist:t,nextPlaylist:e,bufferLowWaterLine:n,bufferHighWaterLine:s
vendor: 3,289 bytes, line 2
2,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})}setupSegmentLoaderListeners_(){this.mainSegmentLoader_.on("bandwidthupdate",(()=>{this.checkABR_("bandwidthupdate"),this.tech_.trigger("bandwidthupdate")})),this.mainSegmentLoader_.on("timeout",(()=>{this.bufferBasedABR&&this.mainSegmentLoader_.load()})),this.bufferBasedABR||this.mainSegmentLoader_.on("progress",(()=>{this.trigger("progress")})),this.mainSegmentLoader_.on("error",(()=>{const e=this.mainSegmentLoader_.error();this.excludePlaylist({playlistToExclude:e.playlist,error:e})})),this.mainSegmentLoader_.on("appenderror",(()=>{this.error=this.mainSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.mainSegmentLoader_.on("timestampoffset",(()=>{this.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})})),this.audioSegmentLoader_.on("syncinfoupdate",(()=>{this.onSyncInfoUpdate_()})),this.audioSegmentLoader_.on("appenderror",(()=>{this.error=this.audioSegmentLoader_.error_,this.trigger("error")})),this.mainSegmentLoader_.on("ended",(()=>{this.logger_("main segment loader ended"),this.onEndOfStream()})),this.timelineChangeController_.on("audioTimelineBehind",(()=>{const e=this.audioSegmentLoader_.pendingSegment_;if(!e||!e.segment||!e.segment.syncInfo)return;const t=e.segment.syncInfo.end+.01;this.tech_.setCurrentTime(t)})),this.timelineChangeController_.on("fixBadTimelineChange",(()=>{this.logger_("Fix bad timeline change. Restarting al segment loaders..."),this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()})),this.mainSegmentLoader_.on("earlyabort",(e=>{this.bufferBasedABR||(this.delegateLoaders_("all",["abort"]),this.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))}));const e=()=>{if(!this.sourceUpdater_.hasCreatedSourceBuffers())return this.tryToCreateSourceBuffers_();const e=this.getCodecsOrExclude_();e&&this.sourceUpdater_.addOrChangeSourceBuffers(e)};this.mainSegmentLoader_.on("trackinfo",e),this.audioSegmentLoader_.on("trackinfo",e),this.mainSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("fmp4",(()=>{this.triggeredFmp4Usage||(this.tech_.trigger({type:"usage",name:"vhs-fmp4"}),this.triggeredFmp4Usage=!0)})),this.audioSegmentLoader_.on("ended",(()=>{this.logger_("audioSegmentLoader ended"),this.onEndOfStream()})),["segmentselected","segmentloadstart","segmentloaded","segmentkeyloadstart","segmentkeyloadcomplete","segmentdecryptionstart","segmentdecryptioncomplete","segmenttransmuxingstart","segmenttransmuxingcomplete","segmenttransmuxingtrackinfoavailable","segmenttransmuxingtiminginfoavailable","segmentappendstart","appendsdone","bandwidthupdated","timelinechange","codecschange"].forEach((e=>{this.mainSegmentLoader_.on(e,(e=>{this.player_.trigger(
vendor: 11,101 bytes, line 2
2(0,h.Z)({},e))})),this.audioSegmentLoader_.on(e,(e=>{this.player_.trigger((0,h.Z)({},e))})),this.subtitleSegmentLoader_.on(e,(e=>{this.player_.trigger((0,h.Z)({},e))}))}))}mediaSecondsLoaded_(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)}load(){this.mainSegmentLoader_.load(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()}pause(){this.mainSegmentLoader_.pause(),this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause(),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()}fastQualityChange_(e=this.selectPlaylist()){e&&e===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(e,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)}runFastQualitySwitch_(){this.waitingForFastQualityPlaylistReceived_=!1,this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),this.load()}play(){if(this.setupFirstPlay())return;this.tech_.ended()&&this.tech_.setCurrentTime(0),this.hasPlayed_&&this.load();const 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}setupFirstPlay(){const e=this.mainPlaylistLoader_.media();if(!e||this.tech_.paused()||this.hasPlayed_)return!1;if(!e.endList||e.start){const t=this.seekable();if(!t.length)return!1;const i=t.end(0);let n=i;if(e.start){const s=e.start.timeOffset;if(s<0){const r=this.mainPlaylistLoader_.main,a=i+qo.Playlist.liveEdgeDelay(r,e);n=Math.max(Math.min(a+s,i),t.start(0))}else n=Math.min(i,s)}this.trigger("firstplay"),this.tech_.setCurrentTime(n)}return this.hasPlayed_=!0,this.load(),!0}handleSourceOpen_(){if(this.tryToCreateSourceBuffers_(),this.tech_.autoplay()){const e=this.tech_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(e=>{}))}this.trigger("sourceopen")}handleSourceEnded_(){if(!this.inbandTextTracks_.metadataTrack_)return;const e=this.inbandTextTracks_.metadataTrack_.cues;if(!e||!e.length)return;const t=this.duration();e[e.length-1].endTime=isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t}handleDurationChange_(){this.tech_.trigger("durationchange")}onEndOfStream(){let e=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){const t=this.mainSegmentLoader_.getCurrentMediaInfo_();e=!t||t.hasVideo?e&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}e&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())}stuckAtPlaylistEnd_(e){if(!this.seekable().length)return!1;const t=this.syncController_.getExpiredTime(e,this.duration());if(null===t)return!1;const i=qo.Playlist.playlistEnd(e,t),n=this.tech_.currentTime(),s=this.tech_.buffered();if(!s.length)return i-n<=Xs;const r=s.end(s.length-1);return r-n<=Xs&&i-r<=Xs}excludePlaylist({playlistToExclude:e=this.mainPlaylistLoader_.media(),error:t={},playlistExclusionDuration:i}){if(e=e||this.mainPlaylistLoader_.media(),i=i||t.playlistExclusionDuration||this.playlistExclusionDuration,!e)return this.error=t,void("open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network"));e.playlistErrors_++;const n=this.mainPlaylistLoader_.main.playlists,s=n.filter(gr),r=1===s.length&&s[0]===e;if(1===n.length&&i!==1/0)return Bs.log.warn(`Problem encountered with playlist ${e.id}. Trying again since it is the only playlist.`),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(r);if(r){if(this.main().contentSteering){const t=this.pathwayAttribute_(e),i=1e3*this.contentSteeringController_.steeringManifest.ttl;return this.contentSteeringController_.excludePathway(t),this.excludeThenChangePathway_(),void setTimeout((()=>{this.contentSteeringController_.addAvailablePathway(t)}),i)}let t=!1;n.forEach((i=>{if(i===e)return;const n=i.excludeUntil;void 0!==n&&n!==1/0&&(t=!0,delete i.excludeUntil)})),t&&(Bs.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}let a;a=e.playlistErrors_>this.maxPlaylistRetries?1/0:Date.now()+1e3*i,e.excludeUntil=a,t.reason&&(e.lastExcludeReason_=t.reason),this.tech_.trigger("excludeplaylist"),this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});const o=this.selectPlaylist();if(!o)return this.error="Playback cannot continue. No available working or supported playlists.",void this.trigger("error");const l=t.internal?this.logger_:Bs.log.warn,u=t.message?" "+t.message:"";l(`${t.internal?"Internal problem":"Problem"} encountered with playlist ${e.id}.${u} Switching to playlist ${o.id}.`),o.attributes.AUDIO!==e.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),o.attributes.SUBTITLES!==e.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]);const c=o.targetDuration/2*1e3||5e3,h="number"==typeof o.lastRequest&&Date.now()-o.lastRequest<=c;return this.switchMedia_(o,"exclude",r||h)}pauseLoading(){this.delegateLoaders_("all",["abort","pause"]),this.stopABRTimer_()}delegateLoaders_(e,t){const i=[],n="all"===e;(n||"main"===e)&&i.push(this.mainPlaylistLoader_);const s=[];(n||"audio"===e)&&s.push("AUDIO"),(n||"subtitle"===e)&&(s.push("CLOSED-CAPTIONS"),s.push("SUBTITLES")),s.forEach((e=>{const t=this.mediaTypes_[e]&&this.mediaTypes_[e].activePlaylistLoader;t&&i.push(t)})),["main","audio","subtitle"].forEach((t=>{const n=this[`${t}SegmentLoader_`];!n||e!==t&&"all"!==e||i.push(n)})),i.forEach((e=>t.forEach((t=>{"function"==typeof e[t]&&e[t]()}))))}setCurrentTime(e){const t=Js(this.tech_.buffered(),e);return this.mainPlaylistLoader_&&this.mainPlaylistLoader_.media()&&this.mainPlaylistLoader_.media().segments?t&&t.length?e:(this.mainSegmentLoader_.pause(),this.mainSegmentLoader_.resetEverything(),this.mediaTypes_.AUDIO.activePlaylistLoader&&(this.audioSegmentLoader_.pause(),this.audioSegmentLoader_.resetEverything()),this.mediaTypes_.SUBTITLES.activePlaylistLoader&&(this.subtitleSegmentLoader_.pause(),this.subtitleSegmentLoader_.resetEverything()),void this.load()):0}duration(){if(!this.mainPlaylistLoader_)return 0;const e=this.mainPlaylistLoader_.media();return e?e.endList?this.mediaSource?this.mediaSource.duration:qo.Playlist.duration(e):1/0:0}seekable(){return this.seekable_}getSeekableRange_(e,t){const i=e.media();if(!i)return null;const n=this.syncController_.getMediaSequenceSync(t);if(n&&n.isReliable){const e=n.start,t=n.end;if(!isFinite(e)||!isFinite(t))return null;const s=qo.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i);return Ks([[e,Math.max(e,t-s)]])}const s=this.syncController_.getExpiredTime(i,this.duration());if(null===s)return null;const r=qo.Playlist.seekable(i,s,qo.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,i));return r.length?r:null}computeFinalSeekable_(e,t){if(!t)return e;const i=e.start(0),n=e.end(0),s=t.start(0),r=t.end(0);return s>n||i>r?e:Ks([[Math.max(i,s),Math.min(n,r)]])}onSyncInfoUpdate_(){if(!this.mainPlaylistLoader_)return;const e=this.getSeekableRange_(this.mainPlaylistLoader_,"main");if(!e)return;let t;if(this.mediaTypes_.AUDIO.activePlaylistLoader&&(t=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio"),!t))return;const i=this.seekable_;if(this.seekable_=this.computeFinalSeekable_(e,t),!this.seekable_)return;if(i&&i.length&&this.seekable_.length&&i.start(0)===this.seekable_.start(0)&&i.end(0)===this.seekable_.end(0))return;this.logger_(`seekable updated [${er(this.seekable_)}]`);const n={seekableRanges:this.seekable_};this.trigger({type:"seekablerangeschanged",metadata:n}),this.tech_.trigger("seekablechanged")}updateDuration(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){const e=this.seekable();if(!e.length)return;return void((isNaN(this.mediaSource.duration)||this.mediaSource.duration<e.end(e.length-1))&&this.sourceUpdater_.setDuration(e.end(e.length-1)))}const t=this.tech_.buffered();let i=qo.Playlist.duration(this.mainPlaylistLoader_.media());t.length>0&&(i=Math.max(i,t.end(t.length-1))),this.mediaSource.duration!==i&&this.sourceUpdater_.setDuration(i)}dispose(){this.trigger("dispose"),this.decrypter_.terminate(),this.mainPlaylistLoader_.dispose(),this.mainSegmentLoader_.dispose(),this.contentSteeringController_.dispose(),this.keyStatusMap_.clear(),this.loadOnPlay_&&this.tech_.off("play",this.loadOnPlay_),["AUDIO","SUBTITLES"].forEach((e=>{const t=this.mediaTypes_[e].groups;for(const e in t)t[e].forEach((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()}main(){return this.mainPlaylistLoader_.main}media(){return this.mainPlaylistLoader_.media()||this.initialMedia_}areMediaTypesKnown_(){const e=!!this.mediaTypes_.AUDIO.activePlaylistLoader,t=!!this.mainSegmentLoader_.getCurrentMediaInfo_(),i=!e||!!this.audioSegmentLoader_.getCurrentMediaInfo_();return!(!t||!i)}getCodecsOrExclude_(){const e={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},t=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();e.video=e.main;const i=jr(this.main(),t),n={},s=!!this.mediaTypes_.AUDIO.activePlaylistLoader;if(e.main.hasVideo&&(n.video=i.video||e.main.videoCodec||f.xz),e.main.isMuxed&&(n.video+=`,${i.audio||e.main.audioCodec||f.lA}`),(e.main.hasAudio&&!e.main.isMuxed||e.audio.hasAudio||s)&&(n.audio=i.audio||e.main.audioCodec||e.audio.audioCodec||f.lA,e.audio.isFmp4=e.main.hasAudio&&!e.main.isMuxed?e.main.isFmp4:e.audio.isFmp4),!n.audio&&!n.video)return void this.excludePlaylist({playlistToExclude:t,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:1/0});const r=(e,t)=>e?(0,f.p7)(t,this.usingManagedMediaSource_):(0,f.Hi)(t),a={};let o;if(["video","audio"].forEach((function(t){if(n.hasOwnProperty(t)&&!r(e[t].isFmp4,n[t])){const i=e[t].isFmp4?"browser":"muxer";a[i]=a[i]||[],a[i].push(n[t]),"audio"===t&&(o=i)}})),s&&o&&t.attributes.AUDIO){const e=t.attributes.AUDIO;
2this.main().playlists.forEach((i=>{(i.attributes&&i.attributes.AUDIO)===e&&i!==t&&(i.excludeUntil=1/0)})),this.logger_(`excluding audio group ${e} as ${o} does not support codec(s): "${n.audio}"`)}if(!Object.keys(a).length){if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){const e=[];if(["video","audio"].forEach((t=>{const i=((0,f.kS)(this.sourceUpdater_.codecs[t]||"")[0]||{}).type,s=((0,f.kS)(n[t]||"")[0]||{}).type;i&&s&&i.toLowerCase()!==s.toLowerCase()&&e.push(`"${this.sourceUpdater_.codecs[t]}" -> "${n[t]}"`)})),e.length)return void this.excludePlaylist({playlistToExclude:t,error:{message:`Codec switching not supported: ${e.join(", ")}.`,internal:!0},playlistExclusionDuration:1/0})}return n}{const e=Object.keys(a).reduce(((e,t)=>(e&&(e+=", "),e+`${t} does not support codec(s): "${a[t].join(",")}"`)),"")+".";this.excludePlaylist({playlistToExclude:t,error:{internal:!0,message:e},playlistExclusionDuration:1/0})}}tryToCreateSourceBuffers_(){if("open"!==this.mediaSource.readyState||this.sourceUpdater_.hasCreatedSourceBuffers())return;if(!this.areMediaTypesKnown_())return;const e=this.getCodecsOrExclude_();if(!e)return;this.sourceUpdater_.createSourceBuffers(e);const t=[e.video,e.audio].filter(Boolean).join(",");this.excludeIncompatibleVariants_(t)}excludeUnsupportedVariants_(){const e=this.main().playlists,t=[];Object.keys(e).forEach((i=>{const n=e[i];if(-1!==t.indexOf(n.id))return;t.push(n.id);const s=jr(this.main,n),r=[];!s.audio||(0,f.Hi)(s.audio)||(0,f.p7)(s.audio,this.usingManagedMediaSource_)||r.push(`audio codec ${s.audio}`),!s.video||(0,f.Hi)(s.video)||(0,f.p7)(s.video,this.usingManagedMediaSource_)||r.push(`video codec ${s.video}`),s.text&&"stpp.ttml.im1t"===s.text&&r.push(`text codec ${s.text}`),r.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id} for unsupported: ${r.join(", ")}`))}))}excludeIncompatibleVariants_(e){const t=[],i=this.main().playlists,n=Mr((0,f.kS)(e)),s=Dr(n),r=n.video&&(0,f.kS)(n.video)[0]||null,a=n.audio&&(0,f.kS)(n.audio)[0]||null;
vendor: 7,515 bytes, line 2
2Object.keys(i).forEach((e=>{const n=i[e];if(-1!==t.indexOf(n.id)||n.excludeUntil===1/0)return;t.push(n.id);const o=[],l=jr(this.mainPlaylistLoader_.main,n),u=Dr(l);if(l.audio||l.video){if(u!==s&&o.push(`codec count "${u}" !== "${s}"`),!this.sourceUpdater_.canChangeType()){const e=l.video&&(0,f.kS)(l.video)[0]||null,t=l.audio&&(0,f.kS)(l.audio)[0]||null;e&&r&&e.type.toLowerCase()!==r.type.toLowerCase()&&o.push(`video codec "${e.type}" !== "${r.type}"`),t&&a&&t.type.toLowerCase()!==a.type.toLowerCase()&&o.push(`audio codec "${t.type}" !== "${a.type}"`)}o.length&&(n.excludeUntil=1/0,this.logger_(`excluding ${n.id}: ${o.join(" && ")}`))}}))}updateAdCues_(e){let t=0;const i=this.seekable();i.length&&(t=i.start(0)),function(e,t,i=0){if(!e.segments)return;let n,r=i;for(let i=0;i<e.segments.length;i++){const a=e.segments[i];if(n||(n=ko(t,r+a.duration/2)),n){if("cueIn"in a){n.endTime=r,n.adEndTime=r,r+=a.duration,n=null;continue}if(r<n.endTime){r+=a.duration;continue}n.endTime+=a.duration}else if("cueOut"in a&&(n=new(s().VTTCue)(r,r+a.duration,a.cueOut),n.adStartTime=r,n.adEndTime=r+parseFloat(a.cueOut),t.addCue(n)),"cueOutCont"in a){const[e,i]=a.cueOutCont.split("/").map(parseFloat);n=new(s().VTTCue)(r,r+a.duration,""),n.adStartTime=r-e,n.adEndTime=n.adStartTime+i,t.addCue(n)}r+=a.duration}}(e,this.cueTagsTrack_,t)}goalBufferLength(){const e=this.tech_.currentTime(),t=ua.GOAL_BUFFER_LENGTH,i=ua.GOAL_BUFFER_LENGTH_RATE,n=Math.max(t,ua.MAX_GOAL_BUFFER_LENGTH);return Math.min(t+e*i,n)}bufferLowWaterLine(){const e=this.tech_.currentTime(),t=ua.BUFFER_LOW_WATER_LINE,i=ua.BUFFER_LOW_WATER_LINE_RATE,n=Math.max(t,ua.MAX_BUFFER_LOW_WATER_LINE),s=Math.max(t,ua.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(t+e*i,this.bufferBasedABR?s:n)}bufferHighWaterLine(){return ua.BUFFER_HIGH_WATER_LINE}addDateRangesToTextTrack_(e){Ha(this.inbandTextTracks_,"com.apple.streaming",this.tech_),(({inbandTextTracks:e,dateRanges:t})=>{const i=e.metadataTrack_;if(!i)return;const n=s().WebKitDataCue||s().VTTCue;t.forEach((e=>{for(const t of Object.keys(e)){if(Va.has(t))continue;const s=new n(e.startTime,e.endTime,"");s.id=e.id,s.type="com.apple.quicktime.HLS",s.value={key:Fa[t],data:e[t]},"scte35Out"!==t&&"scte35In"!==t||(s.value.data=new Uint8Array(s.value.data.match(/[\da-f]{2}/gi)).buffer),i.addCue(s)}e.processDateRange()}))})({inbandTextTracks:this.inbandTextTracks_,dateRanges:e})}addMetadataToTextTrack(e,t,i){const n=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();Ha(this.inbandTextTracks_,e,this.tech_),(({inbandTextTracks:e,metadataArray:t,timestampOffset:i,videoDuration:n})=>{if(!t)return;const r=s().WebKitDataCue||s().VTTCue,a=e.metadataTrack_;if(!a)return;if(t.forEach((e=>{const t=e.cueTime+i;!("number"!=typeof t||s().isNaN(t)||t<0)&&t<1/0&&e.frames&&e.frames.length&&e.frames.forEach((e=>{const i=new r(t,t,e.value||e.url||e.data||"");i.frame=e,i.value=e,function(e){Object.defineProperties(e.frame,{id:{get(){return Bs.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get(){return Bs.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get(){return Bs.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}})}(i),a.addCue(i)}))})),!a.cues||!a.cues.length)return;const o=a.cues,l=[];for(let e=0;e<o.length;e++)o[e]&&l.push(o[e]);const u=l.reduce(((e,t)=>{const i=e[t.startTime]||[];return i.push(t),e[t.startTime]=i,e}),{}),c=Object.keys(u).sort(((e,t)=>Number(e)-Number(t)));c.forEach(((e,t)=>{const i=u[e],s=isFinite(n)?n:e,r=Number(c[t+1])||s;i.forEach((e=>{e.endTime=r}))}))})({inbandTextTracks:this.inbandTextTracks_,metadataArray:t,timestampOffset:n,videoDuration:i})}pathwayAttribute_(e){return e.attributes["PATHWAY-ID"]||e.attributes.serviceLocation}initContentSteeringController_(){const e=this.main();if(e.contentSteering){for(const t of e.playlists)this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(t));this.contentSteeringController_.assignTagProperties(e.uri,e.contentSteering),this.contentSteeringController_.queryBeforeStart?this.contentSteeringController_.requestSteeringManifest(!0):this.tech_.one("canplay",(()=>{this.contentSteeringController_.requestSteeringManifest()}))}}resetContentSteeringController_(){this.contentSteeringController_.clearAvailablePathways(),this.contentSteeringController_.dispose(),this.initContentSteeringController_()}attachContentSteeringListeners_(){this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this)),["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.contentSteeringController_.on(e,(e=>{this.trigger((0,h.Z)({},e))}))})),"dash"===this.sourceType_&&this.mainPlaylistLoader_.on("loadedplaylist",(()=>{const e=this.main();(this.contentSteeringController_.didDASHTagChange(e.uri,e.contentSteering)||(()=>{const t=this.contentSteeringController_.getAvailablePathways(),i=[];for(const n of e.playlists){const e=n.attributes.serviceLocation;if(e&&(i.push(e),!t.has(e)))return!0}return!(i.length||!t.size)})())&&this.resetContentSteeringController_()}))}excludeThenChangePathway_(){const e=this.contentSteeringController_.getPathway();if(!e)return;this.handlePathwayClones_();const t=this.main().playlists,i=new Set;let n=!1;Object.keys(t).forEach((s=>{const r=t[s],a=this.pathwayAttribute_(r),o=a&&e!==a;r.excludeUntil===1/0&&"content-steering"===r.lastExcludeReason_&&!o&&(delete r.excludeUntil,delete r.lastExcludeReason_,n=!0);const l=!r.excludeUntil&&r.excludeUntil!==1/0;!i.has(r.id)&&o&&l&&(i.add(r.id),r.excludeUntil=1/0,r.lastExcludeReason_="content-steering",this.logger_(`excluding ${r.id} for ${r.lastExcludeReason_}`))})),"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach((t=>{const i=this.mediaTypes_[t];if(i.activePlaylistLoader){const t=i.activePlaylistLoader.media_;t&&t.attributes.serviceLocation!==e&&(n=!0)}})),n&&this.changeSegmentPathway_()}handlePathwayClones_(){const e=this.main().playlists,t=this.contentSteeringController_.currentPathwayClones,i=this.contentSteeringController_.nextPathwayClones;if(t&&t.size||i&&i.size){for(const[e,n]of t.entries())i.get(e)||(this.mainPlaylistLoader_.updateOrDeleteClone(n),this.contentSteeringController_.excludePathway(e));for(const[n,s]of i.entries()){const i=t.get(n);i?this.equalPathwayClones_(i,s)||(this.mainPlaylistLoader_.updateOrDeleteClone(s,!0),this.contentSteeringController_.addAvailablePathway(n)):(e.filter((e=>e.attributes["PATHWAY-ID"]===s["BASE-ID"])).forEach((e=>{this.mainPlaylistLoader_.addClonePathway(s,e)})),this.contentSteeringController_.addAvailablePathway(n))}this.contentSteeringController_.currentPathwayClones=new Map(JSON.parse(JSON.stringify([...i])))}}equalPathwayClones_(e,t){if(e["BASE-ID"]!==t["BASE-ID"]||e.ID!==t.ID||e["URI-REPLACEMENT"].HOST!==t["URI-REPLACEMENT"].HOST)return!1;const i=e["URI-REPLACEMENT"].PARAMS,n=t["URI-REPLACEMENT"].PARAMS;for(const e in i)if(i[e]!==n[e])return!1;for(const e in n)if(i[e]!==n[e])return!1;return!0}changeSegmentPathway_(){const e=this.selectPlaylist();this.pauseLoading(),"DASH"===this.contentSteeringController_.manifestType_&&this.switchMediaForDASHContentSteering_(),this.switchMedia_(e,"content-steering")}excludeNonUsablePlaylistsByKeyId_(){if(!this.mainPlaylistLoader_||!this.mainPlaylistLoader_.main)return;let e=0;const t="non-usable";
vendor: 11,428 bytes, line 2
2this.mainPlaylistLoader_.main.playlists.forEach((i=>{const n=this.mainPlaylistLoader_.getKeyIdSet(i);n&&n.size&&n.forEach((n=>{const s="usable",r=this.keyStatusMap_.has(n)&&this.keyStatusMap_.get(n)===s,a=i.lastExcludeReason_===t&&i.excludeUntil===1/0;r?r&&a&&(delete i.excludeUntil,delete i.lastExcludeReason_,this.logger_(`enabling playlist ${i.id} because key ID ${n} is ${s}`)):(i.excludeUntil!==1/0&&i.lastExcludeReason_!==t&&(i.excludeUntil=1/0,i.lastExcludeReason_=t,this.logger_(`excluding playlist ${i.id} because the key ID ${n} doesn't exist in the keyStatusMap or is not ${s}`)),e++)}))})),e>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach((e=>{const i=e&&e.attributes&&e.attributes.RESOLUTION&&e.attributes.RESOLUTION.height<720,n=e.excludeUntil===1/0&&e.lastExcludeReason_===t;i&&n&&(delete e.excludeUntil,Bs.log.warn(`enabling non-HD playlist ${e.id} because all playlists were excluded due to ${t} key IDs`))}))}addKeyStatus_(e,t){const i=("string"==typeof e?e:(e=>{const t=new Uint8Array(e);return Array.from(t).map((e=>e.toString(16).padStart(2,"0"))).join("")})(e)).slice(0,32).toLowerCase();this.logger_(`KeyStatus '${t}' with key ID ${i} added to the keyStatusMap`),this.keyStatusMap_.set(i,t)}updatePlaylistByKeyStatus(e,t){this.addKeyStatus_(e,t),this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_(),this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this)),this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))}excludeNonUsableThenChangePlaylist_(){this.excludeNonUsablePlaylistsByKeyId_(),this.fastQualityChange_()}}class Go{constructor(e,t,i){const{playlistController_:n}=e,s=n.fastQualityChange_.bind(n);if(t.attributes){const e=t.attributes.RESOLUTION;this.width=e&&e.width,this.height=e&&e.height,this.bandwidth=t.attributes.BANDWIDTH,this.frameRate=t.attributes["FRAME-RATE"]}var r,a,o;this.codecs=jr(n.main(),t),this.playlist=t,this.id=i,this.enabled=(r=e.playlists,a=t.id,o=s,e=>{const t=r.main.playlists[a],i=fr(t),n=gr(t);if(void 0===e)return n;e?delete t.disabled:t.disabled=!0;const s={renditionInfo:{id:a,bandwidth:t.attributes.BANDWIDTH,resolution:t.attributes.RESOLUTION,codecs:t.attributes.CODECS},cause:"fast-quality"};return e===n||i||(e?(o(t),r.trigger({type:"renditionenabled",metadata:s})):r.trigger({type:"renditiondisabled",metadata:s})),e})}}const Ko=["seeking","seeked","pause","playing","error"];class Qo extends Bs.EventTarget{constructor(e){super(),this.playlistController_=e.playlistController,this.tech_=e.tech,this.seekable=e.seekable,this.allowSeeksWithinUnsafeLiveWindow=e.allowSeeksWithinUnsafeLiveWindow,this.liveRangeSafeTimeDelta=e.liveRangeSafeTimeDelta,this.media=e.media,this.playedRanges_=[],this.consecutiveUpdates=0,this.lastRecordedTime=null,this.checkCurrentTimeTimeout_=null,this.logger_=Ws("PlaybackWatcher"),this.logger_("initialize");const t=()=>this.monitorCurrentTime_(),i=()=>this.monitorCurrentTime_(),n=()=>this.techWaiting_(),r=()=>this.resetTimeUpdate_(),a=this.playlistController_,o=["main","subtitle","audio"],l={};o.forEach((e=>{l[e]={reset:()=>this.resetSegmentDownloads_(e),updateend:()=>this.checkSegmentDownloads_(e)},a[`${e}SegmentLoader_`].on("appendsdone",l[e].updateend),a[`${e}SegmentLoader_`].on("playlistupdate",l[e].reset),this.tech_.on(["seeked","seeking"],l[e].reset)}));const u=e=>{["main","audio"].forEach((t=>{a[`${t}SegmentLoader_`][e]("appended",this.seekingAppendCheck_)}))};this.seekingAppendCheck_=()=>{this.fixesBadSeeks_()&&(this.consecutiveUpdates=0,this.lastRecordedTime=this.tech_.currentTime(),u("off"))},this.clearSeekingAppendCheck_=()=>u("off"),this.watchForBadSeeking_=()=>{this.clearSeekingAppendCheck_(),u("on")},this.tech_.on("seeked",this.clearSeekingAppendCheck_),this.tech_.on("seeking",this.watchForBadSeeking_),this.tech_.on("waiting",n),this.tech_.on(Ko,r),this.tech_.on("canplay",i),this.tech_.one("play",t),this.dispose=()=>{this.clearSeekingAppendCheck_(),this.logger_("dispose"),this.tech_.off("waiting",n),this.tech_.off(Ko,r),this.tech_.off("canplay",i),this.tech_.off("play",t),this.tech_.off("seeking",this.watchForBadSeeking_),this.tech_.off("seeked",this.clearSeekingAppendCheck_),o.forEach((e=>{a[`${e}SegmentLoader_`].off("appendsdone",l[e].updateend),a[`${e}SegmentLoader_`].off("playlistupdate",l[e].reset),this.tech_.off(["seeked","seeking"],l[e].reset)})),this.checkCurrentTimeTimeout_&&s().clearTimeout(this.checkCurrentTimeTimeout_),this.resetTimeUpdate_()}}monitorCurrentTime_(){this.checkCurrentTime_(),this.checkCurrentTimeTimeout_&&s().clearTimeout(this.checkCurrentTimeTimeout_),this.checkCurrentTimeTimeout_=s().setTimeout(this.monitorCurrentTime_.bind(this),250)}resetSegmentDownloads_(e){const t=this.playlistController_[`${e}SegmentLoader_`];this[`${e}StalledDownloads_`]>0&&this.logger_(`resetting possible stalled download count for ${e} loader`),this[`${e}StalledDownloads_`]=0,this[`${e}Buffered_`]=t.buffered_()}checkSegmentDownloads_(e){const t=this.playlistController_,i=t[`${e}SegmentLoader_`],n=i.buffered_(),s=function(e,t){if(e===t)return!1;if(!e&&t||!t&&e)return!0;if(e.length!==t.length)return!0;for(let i=0;i<e.length;i++)if(e.start(i)!==t.start(i)||e.end(i)!==t.end(i))return!0;return!1}(this[`${e}Buffered_`],n);if(this[`${e}Buffered_`]=n,s){const i={bufferedRanges:n};return t.trigger({type:"bufferedrangeschanged",metadata:i}),void this.resetSegmentDownloads_(e)}this[`${e}StalledDownloads_`]++,this.logger_(`found #${this[`${e}StalledDownloads_`]} ${e} appends that did not increase buffer (possible stalled download)`,{playlistId:i.playlist_&&i.playlist_.id,buffered:tr(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&&t.excludePlaylist({error:{message:`Excessive ${e} segment downloading detected.`},playlistExclusionDuration:1/0}))}checkCurrentTime_(){if(this.tech_.paused()||this.tech_.seeking())return;const e=this.tech_.currentTime(),t=this.tech_.buffered();if(this.lastRecordedTime===e&&(!t.length||e+Xs>=t.end(t.length-1)))return this.techWaiting_();if(this.consecutiveUpdates>=5&&e===this.lastRecordedTime)this.consecutiveUpdates++,this.waiting_();else if(e===this.lastRecordedTime)this.consecutiveUpdates++;else{this.playedRanges_.push(Ks([this.lastRecordedTime,e]));const t={playedRanges:this.playedRanges_};this.playlistController_.trigger({type:"playedrangeschanged",metadata:t}),this.consecutiveUpdates=0,this.lastRecordedTime=e}}resetTimeUpdate_(){this.consecutiveUpdates=0}fixesBadSeeks_(){if(!this.tech_.seeking())return!1;const e=this.seekable(),t=this.tech_.currentTime();let i;if(this.afterSeekableWindow_(e,t,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(i=e.end(e.length-1)),this.beforeSeekableWindow_(e,t)){const t=e.start(0);i=t+(t===e.end(0)?0:Xs)}if(void 0!==i)return this.logger_(`Trying to seek outside of seekable at time ${t} with seekable range ${er(e)}. Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0;const n=this.playlistController_.sourceUpdater_,s=this.tech_.buffered(),r=n.audioBuffer?n.audioBuffered():null,a=n.videoBuffer?n.videoBuffered():null,o=this.media(),l=o.partTargetDuration?o.partTargetDuration:2*(o.targetDuration-Qs),u=[r,a];for(let e=0;e<u.length;e++)if(u[e]&&nr(u[e],t)<l)return!1;const c=Zs(s,t);return 0!==c.length&&(i=c.start(0)+Xs,this.logger_(`Buffered region starts (${c.start(0)})  just beyond seek point (${t}). Seeking to ${i}.`),this.tech_.setCurrentTime(i),!0)}waiting_(){if(this.techWaiting_())return;const e=this.tech_.currentTime(),t=this.tech_.buffered(),i=Js(t,e);return i.length&&e+3<=i.end(0)?(this.resetTimeUpdate_(),this.tech_.setCurrentTime(e),this.logger_(`Stopped at ${e} while inside a buffered region [${i.start(0)} -> ${i.end(0)}]. Attempting to resume playback by seeking to the current time.`),void this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"})):void 0}techWaiting_(){const e=this.seekable(),t=this.tech_.currentTime();if(this.tech_.seeking())return!0;if(this.beforeSeekableWindow_(e,t)){const i=e.end(e.length-1);return this.logger_(`Fell out of live window at time ${t}. Seeking to live point (seekable end) ${i}`),this.resetTimeUpdate_(),this.tech_.setCurrentTime(i),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0}const i=this.tech_.vhs.playlistController_.sourceUpdater_,n=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:i.audioBuffered(),videoBuffered:i.videoBuffered(),currentTime:t}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(t),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;const s=Zs(n,t);return s.length>0&&(this.logger_(`Stopped at ${t} and seeking to ${s.start(0)}`),this.resetTimeUpdate_(),this.skipTheGap_(t),!0)}afterSeekableWindow_(e,t,i,n=!1){if(!e.length)return!1;let s=e.end(e.length-1)+Xs;const r=!i.endList,a="number"==typeof i.partTargetDuration;return r&&(a||n)&&(s=e.end(e.length-1)+3*i.targetDuration),t>s}beforeSeekableWindow_(e,t){return!!(e.length&&e.start(0)>0&&t<e.start(0)-this.liveRangeSafeTimeDelta)}videoUnderflow_({videoBuffered:e,audioBuffered:t,currentTime:i}){if(!e)return;let n;if(e.length&&t.length){const s=Js(e,i-3),r=Js(e,i),a=Js(t,i);a.length&&!r.length&&s.length&&(n={start:s.end(0),end:a.end(0)})}else Zs(e,i).length||(n=this.gapFromVideoUnderflow_(e,i));return!!n&&(this.logger_(`Encountered a gap in video from ${n.start} to ${n.end}. Seeking to current time ${i}`),!0)}skipTheGap_(e){const t=this.tech_.buffered(),i=this.tech_.currentTime(),n=Zs(t,i);if(this.resetTimeUpdate_(),0===n.length||i!==e)return;this.logger_("skipTheGap_:","currentTime:",i,"scheduled currentTime:",e,"nextRange start:",n.start(0)),this.tech_.setCurrentTime(n.start(0)+Qs);const s={gapInfo:{from:i,to:n.start(0)}};this.playlistController_.trigger({type:"gapjumped",metadata:s}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"})}gapFromVideoUnderflow_(e,t){const i=function(e){if(e.length<2)return Ks();const t=[];for(let i=1;i<e.length;i++){const n=e.end(i-1),s=e.start(i);t.push([n,s])}return Ks(t)}(e);for(let e=0;e<i.length;e++){const n=i.start(e),s=i.end(e);if(t-n<4&&t-n>2)return{start:n,end:s}}return null}}const Xo={errorInterval:30,getSource(e){return e(this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource())}},Yo=function(e,t){let i=0,n=0;const s=Gs(Xo,t);e.ready((()=>{e.trigger({type:"usage",name:"vhs-error-reload-initialized"})}));const r=function(){n&&e.currentTime(n)},a=function(t){null!=t&&(n=e.duration()!==1/0&&e.currentTime()||0,e.one("loadedmetadata",r),e.src(t),e.trigger({type:"usage",name:"vhs-error-reload"}),e.play())},o=function(){if(Date.now()-i<1e3*s.errorInterval)e.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(s.getSource&&"function"==typeof s.getSource)return i=Date.now(),s.getSource.call(e,a);Bs.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},l=function(){e.off("loadedmetadata",r),e.off("error",o),e.off("dispose",l)};e.on("error",o),e.on("dispose",l),e.reloadSourceOnError=function(t){l(),Yo(e,t)}};var Jo="3.17.4";const Zo={PlaylistLoader:$r,Playlist:Tr,utils:ta,STANDARD_PLAYLIST_SELECTOR:Ua,INITIAL_PLAYLIST_SELECTOR:function(){const e=this.playlists.main.playlists.filter(Tr.isEnabled);return ja(e,((e,t)=>
2Ra(e,t))),e.filter((e=>!!jr(this.playlists.main,e).video))[0]||null},lastBandwidthSelector:Ua,movingAverageBandwidthSelector:function(e){let t=-1,i=-1;if(e<0||e>1)throw new Error("Moving average bandwidth decay must be between 0 and 1.");return function(){let n=this.useDevicePixelRatio&&s().devicePixelRatio||1;return isNaN(this.customPixelRatio)||(n=this.customPixelRatio),t<0&&(t=this.systemBandwidth,i=this.systemBandwidth),this.systemBandwidth>0&&this.systemBandwidth!==i&&(t=e*this.systemBandwidth+(1-e)*t,i=this.systemBandwidth),Na({main:this.playlists.main,bandwidth:t,playerWidth:parseInt(Da(this.tech_.el(),"width"),10)*n,playerHeight:parseInt(Da(this.tech_.el(),"height"),10)*n,playerObjectFit:this.usePlayerObjectFit?Da(this.tech_.el(),"objectFit"):"",limitRenditionByPlayerDimensions:this.limitRenditionByPlayerDimensions,playlistController:this.playlistController_})}},comparePlaylistBandwidth:Ra,comparePlaylistResolution:function(e,t){let i,n;return e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(i=e.attributes.RESOLUTION.width),i=i||s().Number.MAX_VALUE,t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(n=t.attributes.RESOLUTION.width),n=n||s().Number.MAX_VALUE,i===n&&e.attributes.BANDWIDTH&&t.attributes.BANDWIDTH?e.attributes.BANDWIDTH-t.attributes.BANDWIDTH:i-n},xhr:Wr()};Object.keys(ua).forEach((e=>{Object.defineProperty(Zo,e,{get(){return Bs.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),ua[e]},set(t){Bs.log.warn(`using Vhs.${e} is UNSAFE be sure you know what you are doing`),"number"!=typeof t||t<0?Bs.log.warn(`value of Vhs.${e} must be greater than or equal to 0`):ua[e]=t}})}));const el="videojs-vhs",tl=function(e,t){const i=t.media();let n=-1;for(let t=0;t<e.length;t++)if(e[t].id===i.id){n=t;break}e.selectedIndex_=n,e.trigger({selectedIndex:n,type:"change"})};Zo.canPlaySource=function(){return Bs.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};const il=()=>{if(!s().localStorage)return null;const e=s().localStorage.getItem(el);if(!e)return null;try{return JSON.parse(e)}catch(e){return null}},nl=(e,t)=>{e._requestCallbackSet||(e._requestCallbackSet=new Set),e._requestCallbackSet.add(t)},sl=(e,t)=>{e._responseCallbackSet||(e._responseCallbackSet=new Set),e._responseCallbackSet.add(t)},rl=(e,t)=>{e._requestCallbackSet&&(e._requestCallbackSet.delete(t),e._requestCallbackSet.size||delete e._requestCallbackSet)},al=(e,t)=>{e._responseCallbackSet&&(e._responseCallbackSet.delete(t),e._responseCallbackSet.size||delete e._responseCallbackSet)};Zo.supportsNativeHls=function(){if(!a()||!a().createElement)return!1;const e=a().createElement("video");return!!Bs.getTech("Html5").isSupported()&&["application/vnd.apple.mpegurl","audio/mpegurl","audio/x-mpegurl","application/x-mpegurl","video/x-mpegurl","video/mpegurl","application/mpegurl"].some((function(t){return/maybe|probably/i.test(e.canPlayType(t))}))}(),Zo.supportsNativeDash=!!(a()&&a().createElement&&Bs.getTech("Html5").isSupported())&&/maybe|probably/i.test(a().createElement("video").canPlayType("application/dash+xml")),Zo.supportsTypeNatively=e=>"hls"===e?Zo.supportsNativeHls:"dash"===e&&Zo.supportsNativeDash,Zo.isSupported=function(){return Bs.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")},Zo.xhr.onRequest=function(e){nl(Zo.xhr,e)},Zo.xhr.onResponse=function(e){sl(Zo.xhr,e)},Zo.xhr.offRequest=function(e){rl(Zo.xhr,e)},Zo.xhr.offResponse=function(e){al(Zo.xhr,e)};const ol=Bs.getComponent("Component");class ll extends ol{constructor(e,t,i){if(super(t,i.vhs),"number"==typeof i.initialBandwidth&&(this.options_.bandwidth=i.initialBandwidth),this.logger_=Ws("VhsHandler"),t.options_&&t.options_.playerId){const e=Bs.getPlayer(t.options_.playerId);this.player_=e}if(this.tech_=t,this.source_=e,this.stats={},this.ignoreNextSeekingEvent_=!1,this.setOptions_(),this.options_.overrideNative&&t.overrideNativeAudioTracks&&t.overrideNativeVideoTracks)t.overrideNativeAudioTracks(!0),t.overrideNativeVideoTracks(!0);else if(this.options_.overrideNative&&(t.featuresNativeVideoTracks||t.featuresNativeAudioTracks))throw new Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");this.on(a(),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"],(e=>{const t=a().fullscreenElement||a().webkitFullscreenElement||a().mozFullScreenElement||a().msFullscreenElement;t&&t.contains(this.tech_.el())?this.playlistController_.fastQualityChange_():this.playlistController_.checkABR_()})),this.on(this.tech_,"seeking",(function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())})),this.on(this.tech_,"error",(function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()})),this.on(this.tech_,"play",this.play)}setOptions_(e={}){if(this.options_=Gs(this.options_,e),this.options_.withCredentials=this.options_.withCredentials||!1,this.options_.limitRenditionByPlayerDimensions=!1!==this.options_.limitRenditionByPlayerDimensions,this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1,this.options_.usePlayerObjectFit=this.options_.usePlayerObjectFit||!1,this.options_.useBandwidthFromLocalStorage=void 0!==this.source_.useBandwidthFromLocalStorage?this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1,this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||
vendor: 8,163 bytes, line 2
2!1,this.options_.useNetworkInformationApi=void 0===this.options_.useNetworkInformationApi||this.options_.useNetworkInformationApi,this.options_.useDtsForTimestampOffset=this.options_.useDtsForTimestampOffset||!1,this.options_.customTagParsers=this.options_.customTagParsers||[],this.options_.customTagMappers=this.options_.customTagMappers||[],this.options_.cacheEncryptionKeys=this.options_.cacheEncryptionKeys||!1,this.options_.llhls=!1!==this.options_.llhls,this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1,"number"!=typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60),"number"!=typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage){const e=il();e&&e.bandwidth&&(this.options_.bandwidth=e.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),e&&e.throughput&&(this.options_.throughput=e.throughput,this.tech_.trigger({type:"usage",name:"vhs-throughput-from-local-storage"}))}"number"!=typeof this.options_.bandwidth&&(this.options_.bandwidth=ua.INITIAL_BANDWIDTH),this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===ua.INITIAL_BANDWIDTH,["withCredentials","useDevicePixelRatio","usePlayerObjectFit","customPixelRatio","limitRenditionByPlayerDimensions","bandwidth","customTagParsers","customTagMappers","cacheEncryptionKeys","playlistSelector","initialPlaylistSelector","bufferBasedABR","liveRangeSafeTimeDelta","llhls","useForcedSubtitles","useNetworkInformationApi","useDtsForTimestampOffset","exactManifestTimings","leastPixelDiffSelector"].forEach((e=>{void 0!==this.source_[e]&&(this.options_[e]=this.source_[e])})),this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions,this.useDevicePixelRatio=this.options_.useDevicePixelRatio,this.usePlayerObjectFit=this.options_.usePlayerObjectFit;const t=this.options_.customPixelRatio;"number"==typeof t&&t>=0&&(this.customPixelRatio=t)}setOptions(e={}){this.setOptions_(e)}src(e,t){if(!e)return;var i;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=Zo,this.options_.sourceType=(0,g.t)(t),this.options_.seekTo=e=>{this.tech_.setCurrentTime(e)},this.options_.player_=this.player_,this.playlistController_=new Wo(this.options_);const n=Gs({liveRangeSafeTimeDelta:Xs},this.options_,{seekable:()=>this.seekable(),media:()=>this.playlistController_.media(),playlistController:this.playlistController_});this.playbackWatcher_=new Qo(n),this.attachStreamingEventListeners_(),this.playlistController_.on("error",(()=>{const e=Bs.players[this.tech_.options_.playerId];let t=this.playlistController_.error;"object"!=typeof t||t.code?"string"==typeof t&&(t={message:t,code:3}):t.code=3,e.error(t)}));const r=this.options_.bufferBasedABR?Zo.movingAverageBandwidthSelector(.55):Zo.STANDARD_PLAYLIST_SELECTOR;this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):r.bind(this),this.playlistController_.selectInitialPlaylist=Zo.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource,Object.defineProperties(this,{selectPlaylist:{get(){return this.playlistController_.selectPlaylist},set(e){this.playlistController_.selectPlaylist=e.bind(this)}},throughput:{get(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set(e){this.playlistController_.mainSegmentLoader_.throughput.rate=e,this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get(){let e=this.playlistController_.mainSegmentLoader_.bandwidth;const t=s().navigator.connection||s().navigator.mozConnection||s().navigator.webkitConnection,i=1e7;if(this.options_.useNetworkInformationApi&&t){const n=1e3*t.downlink*1e3;e=n>=i&&e>=i?Math.max(e,n):n}return e},set(e){this.playlistController_.mainSegmentLoader_.bandwidth=e,this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get(){const e=1/(this.bandwidth||1);let t;return t=this.throughput>0?1/this.throughput:0,Math.floor(1/(e+t))},set(){Bs.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:()=>this.bandwidth||0,enumerable:!0},mediaRequests:{get:()=>this.playlistController_.mediaRequests_()||0,enumerable:!0},mediaRequestsAborted:{get:()=>this.playlistController_.mediaRequestsAborted_()||0,enumerable:!0},mediaRequestsTimedout:{get:()=>this.playlistController_.mediaRequestsTimedout_()||0,enumerable:!0},mediaRequestsErrored:{get:()=>this.playlistController_.mediaRequestsErrored_()||0,enumerable:!0},mediaTransferDuration:{get:()=>this.playlistController_.mediaTransferDuration_()||0,enumerable:!0},mediaBytesTransferred:{get:()=>this.playlistController_.mediaBytesTransferred_()||0,enumerable:!0},mediaSecondsLoaded:{get:()=>this.playlistController_.mediaSecondsLoaded_()||0,enumerable:!0},mediaAppends:{get:()=>this.playlistController_.mediaAppends_()||0,enumerable:!0},mainAppendsToLoadedData:{get:()=>this.playlistController_.mainAppendsToLoadedData_()||0,enumerable:!0},audioAppendsToLoadedData:{get:()=>this.playlistController_.audioAppendsToLoadedData_()||0,enumerable:!0},appendsToLoadedData:{get:()=>this.playlistController_.appendsToLoadedData_()||0,enumerable:!0},timeToLoadedData:{get:()=>this.playlistController_.timeToLoadedData_()||0,enumerable:!0},buffered:{get:()=>tr(this.tech_.buffered()),enumerable:!0},currentTime:{get:()=>this.tech_.currentTime(),enumerable:!0},currentSource:{get:()=>this.tech_.currentSource_,enumerable:!0},currentTech:{get:()=>this.tech_.name_,enumerable:!0},duration:{get:()=>this.tech_.duration(),enumerable:!0},main:{get:()=>this.playlists.main,enumerable:!0},playerDimensions:{get:()=>this.tech_.currentDimensions(),enumerable:!0},seekable:{get:()=>tr(this.tech_.seekable()),enumerable:!0},timestamp:{get:()=>Date.now(),enumerable:!0},videoPlaybackQuality:{get:()=>this.tech_.getVideoPlaybackQuality(),enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",(()=>{this.options_.useBandwidthFromLocalStorage&&(e=>{if(!s().localStorage)return!1;let t=il();t=t?Gs(t,e):e;try{s().localStorage.setItem(el,JSON.stringify(t))}catch(e){return!1}})({bandwidth:this.bandwidth,throughput:Math.round(this.throughput)})})),this.playlistController_.on("selectedinitialmedia",(()=>{var e;(e=this).representations=()=>{const t=e.playlistController_.main(),i=br(t)?e.playlistController_.getAudioTrackPlaylists_():t.playlists;return i?i.filter((e=>!fr(e))).map(((t,i)=>new Go(e,t,t.id))):[]}})),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",(()=>{this.setupEme_()})),this.on(this.playlistController_,"progress",(function(){this.tech_.trigger("progress")})),this.on(this.playlistController_,"firstplay",(function(){this.ignoreNextSeekingEvent_=!0})),this.setupQualityLevels_(),this.tech_.el()&&(this.mediaSourceUrl_=s().URL.createObjectURL(this.playlistController_.mediaSource),(Bs.browser.IS_ANY_SAFARI||Bs.browser.IS_IOS)&&this.options_.overrideNative&&"hls"===this.options_.sourceType&&"function"==typeof this.tech_.addSourceElement?(this.tech_.addSourceElement(this.mediaSourceUrl_),this.tech_.addSourceElement(this.source_.src)):this.tech_.src(this.mediaSourceUrl_))}createKeySessions_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation"),(({player:e,sourceKeySystems:t,audioMedia:i,mainPlaylists:n})=>{if(!e.eme.initializeMediaKeys)return Promise.resolve();const s=(o=i?n.concat([i]):n,l=Object.keys(t),o.reduce(((e,t)=>{if(!t.contentProtection)return e;const i=l.reduce(((e,i)=>{const n=t.contentProtection[i];return n&&n.pssh&&(e[i]={pssh:n.pssh}),e}),{});return Object.keys(i).length&&e.push(i),e}),[])),r=[],a=[];var o,l;
2return s.forEach((t=>{a.push(new Promise(((t,i)=>{e.tech_.one("keysessioncreated",t)}))),r.push(new Promise(((i,n)=>{e.eme.initializeMediaKeys({keySystems:t},(e=>{e?n(e):i()}))})))})),Promise.race([Promise.all(r),Promise.race(a)])})({player:this.player_,sourceKeySystems:this.source_.keySystems,audioMedia:e&&e.media(),mainPlaylists:this.playlists.main.playlists}).then((()=>{this.logger_("created EME key session"),this.playlistController_.sourceUpdater_.initializedEme()})).catch((e=>{this.logger_("error while creating EME key session",e),this.player_.error({message:"Failed to initialize media keys for EME",code:3})}))}handleWaitingForKey_(){this.logger_("waitingforkey fired, attempting to create any new key sessions"),this.createKeySessions_()}setupEme_(){const e=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader,t=(({player:e,sourceKeySystems:t,media:i,audioMedia:n})=>{const s=((e,t,i)=>{if(!e)return e;let n={};t&&t.attributes&&t.attributes.CODECS&&(n=Mr((0,f.kS)(t.attributes.CODECS))),i&&i.attributes&&i.attributes.CODECS&&(n.audio=i.attributes.CODECS);const s=(0,f._5)(n.video),r=(0,f._5)(n.audio),a={};for(const i in e)a[i]={},r&&(a[i].audioContentType=r),s&&(a[i].videoContentType=s),t.contentProtection&&t.contentProtection[i]&&t.contentProtection[i].pssh&&(a[i].pssh=t.contentProtection[i].pssh),"string"==typeof e[i]&&(a[i].url=e[i]);return Gs(e,a)})(t,i,n);return!(!s||(e.currentSource().keySystems=s,s&&!e.eme&&(Bs.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),1)))})({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:e&&e.media()});this.player_.tech_.on("keystatuschange",(e=>{this.playlistController_.updatePlaylistByKeyStatus(e.keyId,e.status)})),this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this),this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_),t?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}setupQualityLevels_(){const e=Bs.players[this.tech_.options_.playerId];
vendor: 4,117 bytes, line 2
2e&&e.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=e.qualityLevels(),this.playlistController_.on("selectedinitialmedia",(()=>{!function(e,t){t.representations().forEach((t=>{e.addQualityLevel(t)})),tl(e,t.playlists)}(this.qualityLevels_,this)})),this.playlists.on("mediachange",(()=>{tl(this.qualityLevels_,this.playlists)})))}static version(){return{"@videojs/http-streaming":Jo,"mux.js":"7.1.0","mpd-parser":"1.3.1","m3u8-parser":"7.2.0","aes-decrypter":"4.0.2"}}version(){return this.constructor.version()}canChangeType(){return _o.canChangeType()}play(){this.playlistController_.play()}setCurrentTime(e){this.playlistController_.setCurrentTime(e)}duration(){return this.playlistController_.duration()}seekable(){return this.playlistController_.seekable()}dispose(){this.playbackWatcher_&&this.playbackWatcher_.dispose(),this.playlistController_&&this.playlistController_.dispose(),this.qualityLevels_&&this.qualityLevels_.dispose(),this.tech_&&this.tech_.vhs&&delete this.tech_.vhs,this.mediaSourceUrl_&&s().URL.revokeObjectURL&&(s().URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null),this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_),super.dispose()}convertToProgramTime(e,t){return(({playlist:e,time:t,callback:i})=>{if(!i)throw new Error("getProgramTime: callback must be provided");if(!e||void 0===t)return i({message:"getProgramTime: playlist and time must be provided"});const n=((e,t)=>{if(!t||!t.segments||0===t.segments.length)return null;let i,n=0;for(let s=0;s<t.segments.length&&(i=t.segments[s],n=i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationEnd:n+i.duration,!(e<=n));s++);const s=t.segments[t.segments.length-1];if(s.videoTimingInfo&&s.videoTimingInfo.transmuxedPresentationEnd<e)return null;if(e>n){if(e>n+.25*s.duration)return null;i=s}return{segment:i,estimatedStart:i.videoTimingInfo?i.videoTimingInfo.transmuxedPresentationStart:n-i.duration,type:i.videoTimingInfo?"accurate":"estimate"}})(t,e);if(!n)return i({message:"valid programTime was not found"});if("estimate"===n.type)return i({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again",seekTime:n.estimatedStart});const s={mediaSeconds:t},r=((e,t)=>{if(!t.dateTimeObject)return null;const i=t.videoTimingInfo.transmuxerPrependedSeconds,n=e-(t.videoTimingInfo.transmuxedPresentationStart+i);return new Date(t.dateTimeObject.getTime()+1e3*n)})(t,n.segment);return r&&(s.programDateTime=r.toISOString()),i(null,s)})({playlist:this.playlistController_.media(),time:e,callback:t})}seekToProgramTime(e,t,i=!0,n=2){return ia({programTime:e,playlist:this.playlistController_.media(),retryCount:n,pauseAfterSeek:i,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:t})}setupXhrHooks_(){this.xhr.onRequest=e=>{nl(this.xhr,e)},this.xhr.onResponse=e=>{sl(this.xhr,e)},this.xhr.offRequest=e=>{rl(this.xhr,e)},this.xhr.offResponse=e=>{al(this.xhr,e)},this.player_.trigger("xhr-hooks-ready")}attachStreamingEventListeners_(){["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach((e=>{this.playlistController_.on(e,(e=>{this.player_.trigger((0,h.Z)({},e))}))})),["gapjumped","playedrangeschanged"].forEach((e=>{this.playbackWatcher_.on(e,(e=>{this.player_.trigger((0,h.Z)({},e))}))}))}}const ul={name:"videojs-http-streaming",VERSION:Jo,canHandleSource(e,t={}){const i=Gs(Bs.options,t);return!(!i.vhs.experimentalUseMMS&&!(0,f.p7)("avc1.4d400d,mp4a.40.2",!1))&&ul.canPlayType(e.type,i)},handleSource(e,t,i={}){const n=Gs(Bs.options,i);return t.vhs=new ll(e,t,n),t.vhs.xhr=Wr(),t.vhs.setupXhrHooks_(),t.vhs.src(e.src,e.type),t.vhs},canPlayType(e,t){const i=(0,g.t)(e);if(!i)return"";const n=ul.getOverrideNative(t);return!Zo.supportsTypeNatively(i)||n?"maybe":""},getOverrideNative(e={}){const{vhs:t={}}=e,i=!(Bs.browser.IS_ANY_SAFARI||Bs.browser.IS_IOS),{overrideNative:n=i}=t;return n}};(0,f.p7)("avc1.4d400d,mp4a.40.2",!0)&&Bs.getTech("Html5").registerSourceHandler(ul,0),Bs.VhsHandler=ll,Bs.VhsSourceHandler=ul,Bs.Vhs=Zo,Bs.use||Bs.registerComponent("
2Vhs",Zo),Bs.options.vhs=Bs.options.vhs||{},Bs.getPlugin&&Bs.getPlugin("reloadSourceOnError")||Bs.registerPlugin("reloadSourceOnError",(function(e){Yo(this,e)}))},87805:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,s=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){for(var n=!0;n;){var s=e,r=t,a=i;n=!1,null===s&&(s=Function.prototype);var o=Object.getOwnPropertyDescriptor(s,r);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(s);if(null===u)return;e=u,t=r,i=a,n=!0,o=u=void 0}},a=(n=i(49067))&&n.__esModule?n:{default:n},o=a.default.getComponent("Component"),l=a.default.getComponent("ControlBar"),u=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,i),this.hide(),this.initializeApi(),i.appId=e.options_.chromecast.appId,e.chromecast=this}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),s(t,[{key:"initializeApi",value:function(){var e,t,i;if(a.default.browser.IS_CHROME&&!a.default.browser.IS_EDGE)return chrome.cast&&chrome.cast.isAvailable?(a.default.log("Cast APIs are available"),t=this.options_.appId||chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,i=new chrome.cast.SessionRequest(t),e=new chrome.cast.ApiConfig(i,this.sessionJoinedListener.bind(this),this.receiverListener.bind(this)),chrome.cast.initialize(e,this.onInitSuccess.bind(this),this.castError.bind(this))):(a.default.log("Cast APIs not available"),this.tryingReconnect<10&&(this.setTimeout(this.initializeApi,1e3),++this.tryingReconnect),void a.default.log("Cast APIs not available. Max reconnect attempt"))}},{key:"castError",value:function(e){var t={code:e.code,message:e.description};switch(e.code){case chrome.cast.ErrorCode.API_NOT_INITIALIZED:case chrome.cast.ErrorCode.EXTENSION_MISSING:case chrome.cast.ErrorCode.EXTENSION_NOT_COMPATIBLE:case chrome.cast.ErrorCode.INVALID_PARAMETER:case chrome.cast.ErrorCode.LOAD_MEDIA_FAILED:case chrome.cast.ErrorCode.RECEIVER_UNAVAILABLE:case chrome.cast.ErrorCode.SESSION_ERROR:case chrome.cast.ErrorCode.CHANNEL_ERROR:case chrome.cast.ErrorCode.TIMEOUT:this.addClass("error");break;case chrome.cast.ErrorCode.CANCEL:break;default:this.player_.error(t)}return a.default.log("Cast Error: "+JSON.stringify(e))}},{key:"onInitSuccess",value:function(){return this.apiInitialized=!0}},{key:"sessionJoinedListener",value:function(e){return e.media.length&&(this.apiSession=e,this.onMediaDiscovered(e.media[0])),console.log("Session joined")}},{key:"receiverListener",value:function(e){if("available"===e)return this.show()}},{key:"doLaunch",value:function(){return a.default.log("Cast video: "+this.player_.cache_.src),this.apiInitialized?chrome.cast.requestSession(this.onSessionSuccess.bind(this),this.castError.bind(this)):a.default.log("Session not initialized")}},{key:"onSessionSuccess",value:function(e){var t=void 0,i=void 0,n=void 0,s=void 0,r=void 0,o=void 0;this.apiSession=e;var l=this.player_.cache_.src,u=this.player_.currentType();if(a.default.log("Session initialized: "+e.sessionId+" source : "+l+" type : "+u),(s=new chrome.cast.media.MediaInfo(l,u)).metadata=new chrome.cast.media.GenericMediaMetadata,this.options_.metadata)for(i in r=this.options_.metadata)o=r[i],s.metadata[i]=o;var c=this.player().poster();c&&(t=new chrome.cast.Image(c),s.metadata.images=[t]);var h=this.player().textTracks(),d=this.player().remoteTextTrackEls(),p=[],f=0,g=void 0,m=void 0,y=0,_=void 0;if(h){for(f=0;f<h.length;f++)m=h.tracks_[f],g=d&&d.trackElements_&&d.trackElements_[f],y++,(_=new chrome.cast.media.Track(y,chrome.cast.media.TrackType.TEXT)).trackContentId=g?g.src:"caption_"+m.language,_.subtype=chrome.cast.media.TextTrackType.CAPTIONS,_.name=m.label,_.language=m.language,_.customData=null,p.push(_);s.textTrackStyle=new chrome.cast.media.TextTrackStyle,s.textTrackStyle.foregroundColor="#FFFFFF",s.textTrackStyle.backgroundColor="#00000060",s.textTrackStyle.edgeType=chrome.cast.media.TextTrackEdgeType.DROP_SHADOW,s.textTrackStyle.windowType=chrome.cast.media.TextTrackWindowType.ROUNDED_CORNERS}
2try{if(h=this.player().audioTracks())for(f=0;f<h.length;f++)m=h.tracks_[f],y++,(_=new chrome.cast.media.Track(y,chrome.cast.media.TrackType.AUDIO)).subtype=null,_.name=m.label,_.language=m.language,_.customData=null,p.push(_)}catch(e){a.default.log("get player audioTracks fail"+e)}p.length&&(s.tracks=p),(n=new chrome.cast.media.LoadRequest(s)).autoplay=!0,n.currentTime=this.player_.currentTime(),this.apiSession.loadMedia(n,this.onMediaDiscovered.bind(this),this.castError.bind(this)),this.apiSession.addUpdateListener(this.onSessionUpdate.bind(this))}},{key:"onMediaDiscovered",value:function(e){this.player_.loadTech_("Chromecast",{type:"cast",apiMedia:e,apiSession:this.apiSession}),this.casting=!0,this.inactivityTimeout=this.player_.options_.inactivityTimeout,this.player_.options_.inactivityTimeout=0,this.player_.userActive(!0),this.addClass("connected"),this.removeClass("error")}},{key:"onSessionUpdate",value:function(e){if(this.player_.apiMedia)return e?void 0:this.onStopAppSuccess()}},{key:"stopCasting",value:function(){return this.apiSession.stop(this.onStopAppSuccess.bind(this),this.castError.bind(this))}},{key:"onStopAppSuccess",value:function(){this.casting=!1;var e=this.player_.currentTime();return this.removeClass("connected"),this.player_.src(this.player_.options_.sources),this.player_.paused()||this.player_.one("seeked",(function(){return this.player_.play()})),this.player_.currentTime(e),this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.apiSession=null}},{key:"buildCSSClass",value:function(){return"vjs-chromecast-button "+r(Object.getPrototypeOf(t.prototype),"buildCSSClass",this).call(this)}},{key:"handleClick",value:function(){return r(Object.getPrototypeOf(t.prototype),"handleClick",this).call(this),this.casting?this.stopCasting():this.doLaunch()}}]),t}(a.default.getComponent("Button"));u.prototype.tryingReconnect=0,u.prototype.inactivityTimeout=2e3,u.prototype.controlText_="Chromecast",l.prototype.options_.children.splice(l.prototype.options_.children.length-1,0,"chromeCastButton"),o.registerComponent("ChromeCastButton",u),t.default=u,e.exports=t.default},80517:function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=n(i(49067)),r=(n(i(60134)),function(e){this.addChild("Chromecast",e)});s.default.plugin("chromecast",r),t.default=r,e.exports=t.default},64495:function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,s=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),r=function(e,t,i){for(var n=!0;n;){var s=e,r=t,a=i;n=!1,null===s&&(s=Function.prototype);var o=Object.getOwnPropertyDescriptor(s,r);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(s);if(null===u)return;e=u,t=r,i=a,n=!0,o=u=void 0}},a=(n=i(49067))&&n.__esModule?n:{default:n},o=a.default.getComponent("Component"),l=a.default.getComponent("Tech"),u=function(e){function t(e,i){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,i),this.apiMedia=this.options_.source.apiMedia,this.apiSession=this.options_.source.apiSession,this.receiver=this.apiSession.receiver.friendlyName;var s=this.onMediaStatusUpdate.bind(this),o=this.onSessionUpdate.bind(this);this.apiMedia.addUpdateListener(s),this.apiSession.addUpdateListener(o),this.on("dispose",(function(){n.apiMedia.removeUpdateListener(s),n.apiSession.removeUpdateListener(o),n.onMediaStatusUpdate(),n.onSessionUpdate(!1)}));var l,u=this.textTracks();u&&(l=n.handleTextTracksChange.bind(n),u.addEventListener("change",l),n.on("dispose",(function(){u.removeEventListener("change",l)})),n.handleTextTracksChange());try{(u=this.audioTracks())&&function(){var e=n.handleAudioTracksChange.bind(n);u.addEventListener("change",e),n.on("dispose",(function(){u.removeEventListener("change",e)}))}()}catch(e){a.default.log("get player audioTracks fail"+e)}try{(u=this.videoTracks())&&function(){var e=n.handleVideoTracksChange.bind(n);u.addEventListener("change",e),n.on("dispose",(function(){u.removeEventListener("change",e)}))}()}catch(e){a.default.log("get player videoTracks fail"+e)}this.update(),this.triggerReady()}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),s(t,[{key:"createEl",value:function(){return a.default.createEl("div",{id:this.options_.techId,className:"vjs-tech vjs-tech-chromecast"})}},{key:"update",value:function(){this.el_.innerHTML='<div class="casting-image" style="background-image: url(\''+this.options_.poster+'\')"></div><div class="casting-overlay"><div class="casting-information"><div class="casting-icon"></div><div class="casting-description"><small>'+this.localize("CASTING TO")+"</small><br>"+this.receiver+"</div></div></div>"}},{key:"onSessionUpdate",value:function(e){if(this.apiMedia)return e?void 0:this.onStopAppSuccess()}},{key:"onStopAppSuccess",value:function(){this.stopTrackingCurrentTime(),this.apiMedia=null}},{key:"onMediaStatusUpdate",value:function(){if(this.apiMedia)switch(this.apiMedia.playerState){case chrome.cast.media.PlayerState.BUFFERING:this.trigger("waiting");break;case chrome.cast.media.PlayerState.IDLE:this.trigger("timeupdate");break;case chrome.cast.media.PlayerState.PAUSED:this.trigger("pause"),this.paused_=!0;break;case chrome.cast.media.PlayerState.PLAYING:this.trigger("playing"),this.trigger("play"),this.paused_=!1}}},{key:"src",value:function(e){}},{key:"currentSrc",value:function(){if(this.apiMedia)return this.apiMedia.media.contentId}},{key:"handleAudioTracksChange",value:function(){var e=[],t=this.textTracks(),i=this.audioTracks();if(i){for(var n=0;n<i.length;n++)i[n].enabled&&e.push(n+1+t.length);return this.apiMedia&&e.length?(this.tracksInfoRequest=new chrome.cast.media.EditTracksInfoRequest(e),this.apiMedia.editTracksInfo(this.tracksInfoRequest,this.onTrackSuccess.bind(this),this.onTrackError.bind(this))):void 0}}},{key:"handleVideoTracksChange",value:function(){}},{key:"handleTextTracksChange",value:function(){var e=[],t=this.textTracks();if(t){for(var i=0;i<t.length;i++)"showing"===t[i].mode&&e.push(i+1);return this.apiMedia&&e.length?(this.tracksInfoRequest=new chrome.cast.media.EditTracksInfoRequest(e),this.apiMedia.editTracksInfo(this.tracksInfoRequest,this.onTrackSuccess.bind(this),this.onTrackError.bind(this))):void 0}}},{key:"onTrackSuccess",value:function(){return a.default.log("track added")}},{key:"onTrackError",value:function(e){return a.default.log("Cast track Error: "+JSON.stringify(e))}},{key:"castError",value:function(e){return a.default.log("Cast Error: "+JSON.stringify(e))}},{key:"play",value:function(){if(this.apiMedia)return this.paused_&&this.apiMedia.play(null,this.mediaCommandSuccessCallback.bind(this,"Playing: "+this.apiMedia.sessionId),this.castError.bind(this)),this.paused_=!1}},{key:"pause",value:function(){if(this.apiMedia)return this.paused_?void 0:(this.apiMedia.pause(null,this.mediaCommandSuccessCallback.bind(this,"Paused: "+this.apiMedia.sessionId),this.castError.bind(this)),this.paused_=!0)}},{key:"paused",value:function(){return this.paused_}},{key:"currentTime",value:function(){return this.apiMedia?this.apiMedia.getEstimatedTime():0}},{key:"setCurrentTime",value:function(e){if(!this.apiMedia)return 0;var t=void 0;return(t=new chrome.cast.media.SeekRequest).currentTime=e,this.apiMedia.seek(t,this.onSeekSuccess.bind(this,e),this.castError.bind(this))}},{key:"onSeekSuccess",value:function(e){a.default.log("seek success"+e)}},{key:"volume",value:function(){return this.volume_}},{key:"duration",value:function(){return this.apiMedia?this.apiMedia.media.duration||1/0:0}},{key:"controls",value:function(){return!1}},{key:"setVolume",value:function(e){var t=!(arguments.length<=1||void 0===arguments[1])&&arguments[1],i=void 0,n=void 0;if(this.apiMedia)return(n=new chrome.cast.Volume).level=e,n.muted=t,this.volume_=n.level,this.muted_=t,(i=new chrome.cast.media.VolumeRequest).volume=n,this.apiMedia.setVolume(i,this.mediaCommandSuccessCallback.bind(this,"Volume changed"),this.castError.bind(this)),this.trigger("volumechange")}},{key:"mediaCommandSuccessCallback",value:function(e){a.default.log(e)}},{key:"muted",value:function(){return this.muted_}},{key:"setMuted",value:function(e){return this.setVolume(this.volume_,e)}},{key:"supportsFullScreen",value:function(){return!1}},{key:"resetSrc_",value:function(e){e()}},{key:"dispose",value:function(){this.resetSrc_(Function.prototype),r(Object.getPrototypeOf(t.prototype),"dis
2pose",this).call(this,this)}}]),t}(l);u.prototype.paused_=!1,u.prototype.options_={},u.prototype.timerStep=1e3,u.isSupported=function(){return!0},l.withSourceHandlers(u),u.nativeSourceHandler={},u.nativeSourceHandler.canPlayType=function(e){return/^application\/(?:dash\+xml|(x-|vnd\.apple\.)mpegurl)/i.test(e)?"probably":/^video\/(mpd|mp4|webm|m3u8)/i.test(e)?"maybe":""},u.nativeSourceHandler.canHandleSource=function(e){return e.type?u.nativeSourceHandler.canPlayType(e.type):e.src?u.nativeSourceHandler.canPlayType(e.src):""},u.nativeSourceHandler.handleSource=function(e,t){t.src(e.src)},u.nativeSourceHandler.dispose=function(){},u.registerSourceHandler(u.nativeSourceHandler),u.prototype.featuresVolumeControl=!0,u.prototype.featuresPlaybackRate=!1,u.prototype.movingMediaElementInDOM=!1,u.prototype.featuresFullscreenResize=!1,u.prototype.featuresTimeupdateEvents=!1,u.prototype.featuresProgressEvents=!1,u.prototype.featuresNativeTextTracks=!0,u.prototype.featuresNativeAudioTracks=!0,u.prototype.featuresNativeVideoTracks=!1,a.default.options.chromecast={},o.registerComponent("Chromecast",u),l.registerTech("Chromecast",u),t.default=u,e.exports=t.default},60134:function(e,t,i){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var s=n(i(49067)),r=(n(i(87805)),n(i(64495)),s.default.getComponent("Component")),a=function(e){function t(e,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,i){for(var n=!0;n;){var s=e,r=t,a=i;n=!1,null===s&&(s=Function.prototype);var o=Object.getOwnPropertyDescriptor(s,r);if(void 0!==o){if("value"in o)return o.value;var l=o.get;if(void 0===l)return;return l.call(a)}var u=Object.getPrototypeOf(s);if(null===u)return;e=u,t=r,i=a,n=!0,o=u=void 0}}(Object.getPrototypeOf(t.prototype),"constructor",this).call(this,e,i)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t}(r);a.prototype.options_={},s.default.options.children.push("chromecast"),s.default.addLanguage("en",{"CASTING TO":"WIEDERGABE AUF"}),s.default.addLanguage("de",{"CASTING TO":"WIEDERGABE AUF"}),s.default.addLanguage("it",{"CASTING TO":"PLAYBACK SU"}),s.default.addLanguage("fr",{"CASTING TO":"CAST EN COURS SUR"});var o=window.navigator.userAgent;s.default.browser.IS_EDGE=/Edge/i.test(o),r.registerComponent("Chromecast",a),t.default=a,e.exports=t.default},38135:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(98076)),s=r(i(93220));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.mouseused_=!1,s.on("mousedown",s.handleMouseDown),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-big-play-button"},t.prototype.handleClick=function(e){var t=this.player_.play();if(!(this.mouseused_&&e.clientX&&e.clientY)){var i=this.player_.getChild("controlBar"),n=i&&i.getChild("playToggle");if(n){var s=function(){return n.focus()};t&&t.then?t.then(s,(function(){})):this.setTimeout(s,1)}else this.player_.focus()}},t.prototype.handleKeyPress=function(t){this.mouseused_=!1,e.prototype.handleKeyPress.call(this,t)},t.prototype.handleMouseDown=function(e){this.mouseused_=!0},t}(n.default);a.prototype.controlText_="Play Video",s.default.registerComponent("BigPlayButton",a),t.default=a},98076:function(e,t,i){"use strict";t.__esModule=!0;var n=o(i(82633)),s=o(i(93220)),r=o(i(33128)),a=i(28645);
2function o(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"button",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};t=(0,a.assign)({className:this.buildCSSClass()},t),"button"!==e&&(r.default.warn("Creating a Button with an HTML element of "+e+" is deprecated; use ClickableComponent instead."),t=(0,a.assign)({tabIndex:0},t),i=(0,a.assign)({role:"button"},i)),i=(0,a.assign)({type:"button","aria-live":"polite"},i);var n=s.default.prototype.createEl.call(this,e,t,i);return this.createControlTextEl(n),n},t.prototype.addChild=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.constructor.name;return r.default.warn("Adding an actionable (user controllable) child to a Button ("+i+") is not supported; use a ClickableComponent instead."),s.default.prototype.addChild.call(this,e,t)},t.prototype.enable=function(){e.prototype.enable.call(this),this.el_.removeAttribute("disabled")},t.prototype.disable=function(){e.prototype.disable.call(this),this.el_.setAttribute("disabled","disabled")},t.prototype.handleKeyPress=function(t){32!==t.which&&13!==t.which&&e.prototype.handleKeyPress.call(this,t)},t}(n.default);s.default.registerComponent("Button",l),t.default=l},82633:function(e,t,i){"use strict";t.__esModule=!0;var n=h(i(93220)),s=c(i(56144)),r=c(i(31222)),a=c(i(667)),o=h(i(33128)),l=h(i(67405)),u=i(28645);function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function h(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.emitTapEvents(),s.enable(),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};i=(0,u.assign)({className:this.buildCSSClass(),tabIndex:0},i),"button"===t&&o.default.error("Creating a ClickableComponent with an HTML element of "+t+" is not supported; use a Button instead."),n=(0,u.assign)({role:"button","aria-live":"polite"},n),this.tabIndex_=i.tabIndex;var s=e.prototype.createEl.call(this,t,i,n);return this.createControlTextEl(s),s},t.prototype.createControlTextEl=function(e){return this.controlTextEl_=s.createEl("span",{className:"vjs-control-text"}),e&&e.appendChild(this.controlTextEl_),this.controlText(this.controlText_,e),this.controlTextEl_},t.prototype.controlText=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.el();if(void 0===e)return this.controlText_||"Need Text";var i=this.localize(e);return this.controlText_=e,this.controlTextEl_.innerHTML=i,this.nonIconControl||t.setAttribute("title",i),this},t.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+e.prototype.buildCSSClass.call(this)},t.prototype.enable=function(){return this.removeClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","false"),void 0!==this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this.on(["tap","click"],this.handleClick),this.on("focus",this.handleFocus),this.on("blur",this.handleBlur),this},t.prototype.disable=function(){return this.addClass("vjs-disabled"),this.el_.setAttribute("aria-disabled","true"),void 0!==this.tabIndex_&&this.el_.removeAttribute("tabIndex"),this.off(["tap","click"],this.handleClick),this.off("focus",this.handleFocus),this.off("blur",this.handleBlur),this},t.prototype.handleClick=function(e){},t.prototype.handleFocus=function(e){r.on(l.default,"keydown",a.bind(this,this.handleKeyPress))},t.prototype.handleKeyPress=function(t){32===t.which||13===t.which?(t.preventDefault(),this.handleClick(t)):e.prototype.handleKeyPress&&e.prototype.handleKeyPress.call(this,t)},t.prototype.handleBlur=function(e){r.off(l.default,"keydown",a.bind(this,this.handleKeyPress))},t}(n.default);n.default.registerComponent("ClickableComponent",d),t.default=d},37751:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(98076)),s=r(i(93220));
2function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.controlText(n&&n.controlText||s.localize("Close")),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-close-button "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.trigger({type:"close",bubbles:!1})},t}(n.default);s.default.registerComponent("CloseButton",a),t.default=a},93220:function(e,t,i){"use strict";t.__esModule=!0;var n=d(i(9331)),s=h(i(56144)),r=h(i(667)),a=h(i(77355)),o=h(i(31222)),l=d(i(33128)),u=d(i(6584)),c=d(i(91908));function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}var p=function(){function e(t,i,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!t&&this.play?this.player_=t=this:this.player_=t,this.options_=(0,c.default)({},this.options_),i=this.options_=(0,c.default)(this.options_,i),this.id_=i.id||i.el&&i.el.id,!this.id_){var s=t&&t.id&&t.id()||"no_player";this.id_=s+"_component_"+a.newGUID()}this.name_=i.name||null,i.el?this.el_=i.el:!1!==i.createEl&&(this.el_=this.createEl()),this.children_=[],this.childIndex_={},this.childNameIndex_={},!1!==i.initChildren&&this.initChildren(),this.ready(n),!1!==i.reportTouchActivity&&this.enableTouchActivity()}return e.prototype.dispose=function(){if(this.trigger({type:"dispose",bubbles:!1}),this.children_)for(var e=this.children_.length-1;e>=0;e--)this.children_[e].dispose&&this.children_[e].dispose();this.children_=null,this.childIndex_=null,this.childNameIndex_=null,this.off(),this.el_.parentNode&&this.el_.parentNode.removeChild(this.el_),s.removeElData(this.el_),this.el_=null},e.prototype.player=function(){return this.player_},e.prototype.options=function(e){return l.default.warn("this.options() has been deprecated and will be moved to the constructor in 6.0"),e?(this.options_=(0,c.default)(this.options_,e),this.options_):this.options_},e.prototype.el=function(){return this.el_},e.prototype.createEl=function(e,t,i){return s.createEl(e,t,i)},e.prototype.localize=function(e){var t=this.player_.language&&this.player_.language(),i=this.player_.languages&&this.player_.languages();if(!t||!i)return e;var n=i[t];if(n&&n[e])return n[e];var s=i[t.split("-")[0]];return s&&s[e]?s[e]:e},e.prototype.contentEl=function(){return this.contentEl_||this.el_},e.prototype.id=function(){return this.id_},e.prototype.name=function(){return this.name_},e.prototype.children=function(){return this.children_},e.prototype.getChildById=function(e){return this.childIndex_[e]},e.prototype.getChild=function(e){if(e)return e=(0,u.default)(e),this.childNameIndex_[e]},e.prototype.addChild=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.children_.length,s=void 0,r=void 0;if("string"==typeof t){r=(0,u.default)(t),i||(i={}),!0===i&&(l.default.warn("Initializing a child component with `true` is deprecated.Children should be defined in an array when possible, but if necessary use an object instead of `true`."),i={});var a=i.componentClass||r;i.name=r;var o=e.getComponent(a);if(!o)throw new Error("Component "+a+" does not exist");if("function"!=typeof o)return null;s=new o(this.player_||this,i)}else s=t;if(this.children_.splice(n,0,s),"function"==typeof s.id&&(this.childIndex_[s.id()]=s),(r=r||s.name&&(0,u.default)(s.name()))&&(this.childNameIndex_[r]=s),"function"==typeof s.el&&s.el()){var c=this.contentEl().children[n]||null;this.contentEl().insertBefore(s.el(),c)}return s},e.prototype.removeChild=function(e){if("string"==typeof e&&(e=this.getChild(e)),e&&this.children_){for(var t=!1,i=this.children_.length-1;i>=0;i--)if(this.children_[i]===e){t=!0,this.children_.splice(i,1);break}if(t){this.childIndex_[e.id()]=null,this.childNameIndex_[e.name()]=null;var n=e.el();n&&n.parentNode===this.contentEl()&&this.contentEl().removeChild(e.el())}}},e.prototype.initChildren=function(){var t=this,i=this.options_.children;if(i){var n=this.options_,s=void 0,r=e.getComponent("Tech");(s=Array.isArray(i)?i:Object.keys(i)).concat(Object.keys(this.options_).filter((function(e){return!s.some((function(t){return"string"==typeof t?e===t:e===t.name}))}))).map((function(e){var n=void 0,s=void 0;return"string"==typeof e?s=i[n=e]||t.options_[n]||{}:(n=e.name,s=e),{name:n,opts:s}})).filter((function(t){var i=e.getComponent(t.opts.componentClass||(0,u.default)(t.name));return i&&!r.isTech(i)}
2)).forEach((function(e){var i=e.name,s=e.opts;if(void 0!==n[i]&&(s=n[i]),!1!==s){!0===s&&(s={}),s.playerOptions=t.options_.playerOptions;var r=t.addChild(i,s);r&&(t[i]=r)}}))}},e.prototype.buildCSSClass=function(){return""},e.prototype.on=function(e,t,i){var n=this;if("string"==typeof e||Array.isArray(e))o.on(this.el_,e,r.bind(this,t));else{var s=e,a=t,l=r.bind(this,i),u=function(){return n.off(s,a,l)};u.guid=l.guid,this.on("dispose",u);var c=function(){return n.off("dispose",u)};c.guid=l.guid,e.nodeName?(o.on(s,a,l),o.on(s,"dispose",c)):"function"==typeof e.on&&(s.on(a,l),s.on("dispose",c))}return this},e.prototype.off=function(e,t,i){if(!e||"string"==typeof e||Array.isArray(e))o.off(this.el_,e,t);else{var n=e,s=t,a=r.bind(this,i);this.off("dispose",a),e.nodeName?(o.off(n,s,a),o.off(n,"dispose",a)):(n.off(s,a),n.off("dispose",a))}return this},e.prototype.one=function(e,t,i){var n=this,s=arguments;if("string"==typeof e||Array.isArray(e))o.one(this.el_,e,r.bind(this,t));else{var a=e,l=t,u=r.bind(this,i),c=function e(){n.off(a,l,e),u.apply(null,s)};c.guid=u.guid,this.on(a,l,c)}return this},e.prototype.trigger=function(e,t){return o.trigger(this.el_,e,t),this},e.prototype.ready=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(this.isReady_?t?e.call(this):this.setTimeout(e,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(e))),this},e.prototype.triggerReady=function(){this.isReady_=!0,this.setTimeout((function(){var e=this.readyQueue_;this.readyQueue_=[],e&&e.length>0&&e.forEach((function(e){e.call(this)}),this),this.trigger("ready")}),1)},e.prototype.$=function(e,t){return s.$(e,t||this.contentEl())},e.prototype.$$=function(e,t){return s.$$(e,t||this.contentEl())},e.prototype.hasClass=function(e){return s.hasElClass(this.el_,e)},e.prototype.addClass=function(e){return s.addElClass(this.el_,e),this},e.prototype.removeClass=function(e){return s.removeElClass(this.el_,e),this},e.prototype.toggleClass=function(e,t){return s.toggleElClass(this.el_,e,t),this},e.prototype.show=function(){return this.removeClass("vjs-hidden"),this},e.prototype.hide=function(){return this.addClass("vjs-hidden"),this},e.prototype.lockShowing=function(){return this.addClass("vjs-lock-showing"),this},e.prototype.unlockShowing=function(){return this.removeClass("vjs-lock-showing"),this},e.prototype.getAttribute=function(e){return s.getAttribute(this.el_,e)},e.prototype.setAttribute=function(e,t){return s.setAttribute(this.el_,e,t),this},e.prototype.removeAttribute=function(e){return s.removeAttribute(this.el_,e),this},e.prototype.width=function(e,t){return this.dimension("width",e,t)},e.prototype.height=function(e,t){return this.dimension("height",e,t)},e.prototype.dimensions=function(e,t){return this.width(e,!0).height(t)},e.prototype.dimension=function(e,t,i){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",i||this.trigger("resize"),this;if(!this.el_)return 0;var n=this.el_.style[e],s=n.indexOf("px");return-1!==s?parseInt(n.slice(0,s),10):parseInt(this.el_["offset"+(0,u.default)(e)],10)},e.prototype.currentDimension=function(e){var t=0;if("width"!==e&&"height"!==e)throw new Error("currentDimension only accepts width or height value");if("function"==typeof n.default.getComputedStyle){var i=n.default.getComputedStyle(this.el_);t=i.getPropertyValue(e)||i[e]}if(0===(t=parseFloat(t))){var s="offset"+(0,u.default)(e);t=this.el_[s]}return t},e.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}},e.prototype.currentWidth=function(){return this.currentDimension("width")},e.prototype.currentHeight=function(){return this.currentDimension("height")},e.prototype.focus=function(){this.el_.focus()},e.prototype.blur=function(){this.el_.blur()},e.prototype.emitTapEvents=function(){var e=0,t=null,i=void 0;this.on("touchstart",(function(n){1===n.touches.length&&(t={pageX:n.touches[0].pageX,pageY:n.touches[0].pageY},e=(new Date).getTime(),i=!0)})),this.on("touchmove",(function(e){if(e.touches.length>1)i=!1;else if(t){var n=e.touches[0].pageX-t.pageX,s=e.touches[0].pageY-t.pageY;Math.sqrt(n*n+s*s)>10&&(i=!1)}}));var n=function(){i=!1};this.on("touchleave",n),this.on("touchcancel",n),this.on("touchend",(function(n){t=null,!0===i&&(new Date).getTime()-e<200&&(n.preventDefault(),this.trigger("tap"))}))},e.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var e=r.bind(this.player(),this.player().reportUserActivity),t=void 0;this.on("touchstart",(function(){e(),this.clearInterval(t),t=this.setInterval(e,250)}));var i=function(i){e(),this.clearInterval(t)};this.on("touchmove",e),this.on("touchend",i),this.on("touchcancel",i)}},e.prototype.setTimeout=function(e,t){e=r.bind(this,e);var i=n.default.setTimeout(e,t),s=function(){this.clearTimeout(i)};return s.guid="vjs-timeout-"+i,this.on("dispose",s),i},e.prototype.clearTimeout=function(e){n.default.clearTimeout(e);var t=function(){};return t.guid="vjs-timeout-"+e,this.off("dispose",t),e},e.prototype.setInterval=function(e,t){e=r.bind(this,e);var i=n.default.setInterval(e,t),s=function(){this.clearInterval(i)};return s.guid="vjs-interval-"+i,this.on("dispose",s),i},e.prototype.clearInterval=function(e){n.default.clearInterval(e);var t=function(){};return t.guid="vjs-interval-"+e,this.off("dispose",t),e},e.registerComponent=function(t,i){if(t){if(t=(0,u.default)(t),e.components_||(e.components_={}),"Player"===t&&e.components_[t]){var n=e.components_[t];if(n.players&&Object.keys(n.players).length>0&&Object.keys(n.players).map((function(e){return n.players[e]})).every(Boolean))throw new Error("Can not register Player component after player has been created")}return e.components_[t]=i,i}},e.getComponent=function(t){if(t)return t=(0,u.default)(t),e.components_&&e.components_[t]?e.components_[t]:n.default&&n.default.videojs&&n.default.videojs[t]?(l.default.warn("The "+t+" component was added to the videojs object when it should be registered using videojs.registerComponent(name, component)"),n.default.videojs[t]):void 0},e.extend=function(t){t=t||{},l.default.warn("Component.extend({}) has been deprecated,  use videojs.extend(Component, {}) instead");var i=t.init||t.init||this.prototype.init||this.prototype.init||function(){},n=function(){i.apply(this,arguments)};for(var s in(n.prototype=Object.create(this.prototype)).constructor=n,n.extend=e.extend,t)t.hasOwnProperty(s)&&(n.prototype[s]=t[s]);return n},e}();p.registerComponent("Component",p),t.default=p},63808:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(16745)),s=a(i(93220)),r=a(i(66344));
2function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.tracks=i.audioTracks&&i.audioTracks();var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.el_.setAttribute("aria-label","Audio Menu"),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-audio-button "+e.prototype.buildCSSClass.call(this)},t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.hideThreshold_=1;var t=this.player_.audioTracks&&this.player_.audioTracks();if(!t)return e;for(var i=0;i<t.length;i++){var n=t[i];e.push(new r.default(this.player_,{track:n,selectable:!0}))}return e},t}(n.default);o.prototype.controlText_="Audio Track",s.default.registerComponent("AudioTrackButton",o),t.default=o},66344:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(10139)),s=a(i(93220)),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=n.track,a=i.audioTracks();n.label=s.label||s.language||"Unknown",n.selected=s.enabled;var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));if(o.track=s,a){var l=r.bind(o,o.handleTracksChange);a.addEventListener("change",l),o.on("dispose",(function(){a.removeEventListener("change",l)}))}return o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.handleClick=function(t){var i=this.player_.audioTracks();if(e.prototype.handleClick.call(this,t),i)for(var n=0;n<i.length;n++){var s=i[n];s.enabled=s===this.track}},t.prototype.handleTracksChange=function(e){this.selected(this.track.enabled)},t}(n.default);s.default.registerComponent("AudioTrackMenuItem",o),t.default=o},98430:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n};i(13068),i(42322),i(91617),i(29692),i(79597),i(65345),i(9831),i(10585),i(88996),i(1743),i(44065),i(53654),i(9953),i(60454),i(58084),i(63808),i(59210),i(97610);var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"},{role:"group"})},t}(s.default);r.prototype.options_={children:["playToggle","volumeMenuButton","currentTimeDisplay","timeDivider","durationDisplay","progressControl","liveDisplay","remainingTimeDisplay","customControlSpacer","playbackRateMenuButton","chaptersButton","descriptionsButton","subtitlesButton","captionsButton","audioTrackButton","fullscreenToggle"]},s.default.registerComponent("ControlBar",r),t.default=r},10585:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(98076)),s=r(i(93220));
2function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"fullscreenchange",s.handleFullscreenChange),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-fullscreen-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleFullscreenChange=function(e){this.player_.isFullscreen()?this.controlText("Non-Fullscreen"):this.controlText("Fullscreen")},t.prototype.handleClick=function(e){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()},t}(n.default);a.prototype.controlText_="Fullscreen",s.default.registerComponent("FullscreenToggle",a),t.default=a},65345:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n},r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144)),a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.updateShowing(),s.on(s.player(),"durationchange",s.updateShowing),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});return this.contentEl_=r.createEl("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},t.prototype.updateShowing=function(e){this.player().duration()===1/0?this.show():this.hide()},t}(s.default);s.default.registerComponent("LiveDisplay",a),t.default=a},44065:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(98076)),s=a(i(93220)),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"volumechange",s.update),i.tech_&&!1===i.tech_.featuresVolumeControl&&s.addClass("vjs-hidden"),s.on(i,"loadstart",(function(){this.update(),!1===i.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-mute-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.muted(!this.player_.muted())},t.prototype.update=function(e){var t=this.player_.volume(),i=3;this.player_.muted()?i=0:t<.33?i=1:t<.67&&(i=2);var n=this.player_.muted()?"Unmute":"Mute";this.controlText()!==n&&this.controlText(n);for(var s=0;s<4;s++)r.removeElClass(this.el_,"vjs-vol-"+s);r.addElClass(this.el_,"vjs-vol-"+i)},t}(n.default);o.prototype.controlText_="Mute",s.default.registerComponent("MuteToggle",o),t.default=o},13068:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(98076)),s=r(i(93220));
2function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"play",s.handlePlay),s.on(i,"pause",s.handlePause),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-play-control "+e.prototype.buildCSSClass.call(this)},t.prototype.handleClick=function(e){this.player_.paused()?this.player_.play():this.player_.pause()},t.prototype.handlePlay=function(e){this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.controlText("Pause")},t.prototype.handlePause=function(e){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.controlText("Play")},t}(n.default);a.prototype.controlText_="Play",s.default.registerComponent("PlayToggle",a),t.default=a},59210:function(e,t,i){"use strict";t.__esModule=!0;var n=l(i(10649)),s=l(i(22510)),r=l(i(91552)),a=l(i(93220)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144));function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.updateVisibility(),s.updateLabel(),s.on(i,"loadstart",s.updateVisibility),s.on(i,"ratechange",s.updateLabel),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this);return this.labelEl_=o.createEl("div",{className:"vjs-playback-rate-value",innerHTML:1}),t.appendChild(this.labelEl_),t},t.prototype.buildCSSClass=function(){return"vjs-playback-rate "+e.prototype.buildCSSClass.call(this)},t.prototype.createMenu=function(){var e=new s.default(this.player()),t=this.playbackRates();if(t)for(var i=t.length-1;i>=0;i--)e.addChild(new r.default(this.player(),{rate:t[i]+"x"}));return e},t.prototype.updateARIAAttributes=function(){this.el().setAttribute("aria-valuenow",this.player().playbackRate())},t.prototype.handleClick=function(e){for(var t=this.player().playbackRate(),i=this.playbackRates(),n=i[0],s=0;s<i.length;s++)if(i[s]>t){n=i[s];break}this.player().playbackRate(n)},t.prototype.playbackRates=function(){return this.options_.playbackRates||this.options_.playerOptions&&this.options_.playerOptions.playbackRates},t.prototype.playbackRateSupported=function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&this.playbackRates().length>0},t.prototype.updateVisibility=function(e){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")},t.prototype.updateLabel=function(e){this.playbackRateSupported()&&(this.labelEl_.innerHTML=this.player().playbackRate()+"x")},t}(n.default);u.prototype.controlText_="Playback Rate",a.default.registerComponent("PlaybackRateMenuButton",u),t.default=u},91552:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(10139)),s=r(i(93220));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=n.rate,r=parseFloat(s,10);n.label=s,n.selected=1===r,n.selectable=!0;var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return a.label=s,a.rate=r,a.on(i,"ratechange",a.update),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player().playbackRate(this.rate)},t.prototype.update=function(e){this.selected(this.player().playbackRate()===this.rate)},t}(n.default);a.prototype.contentElType="button",s.default.registerComponent("PlaybackRateMenuItem",a),t.default=a},878:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n}
2,r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144)),a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.partEls_=[],s.on(i,"progress",s.update),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-load-progress",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Loaded")+"</span>: 0%</span>"})},t.prototype.update=function(e){var t=this.player_.buffered(),i=this.player_.duration(),n=this.player_.bufferedEnd(),s=this.partEls_,a=function(e,t){var i=e/t||0;return 100*(i>=1?1:i)+"%"};this.el_.style.width=a(n,i);for(var o=0;o<t.length;o++){var l=t.start(o),u=t.end(o),c=s[o];c||(c=this.el_.appendChild(r.createEl()),s[o]=c),c.style.left=a(l,n),c.style.width=a(u-l,n)}for(var h=s.length;h>t.length;h--)this.el_.removeChild(s[h-1]);s.length=t.length},t}(s.default);s.default.registerComponent("LoadProgressBar",a),t.default=a},12054:function(e,t,i){"use strict";t.__esModule=!0;var n=u(i(93220)),s=l(i(56144)),r=l(i(667)),a=u(i(20460)),o=u(i(51282));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(a.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),a.keepTooltipsInside&&(a.tooltip=s.createEl("div",{className:"vjs-time-tooltip"}),a.el().appendChild(a.tooltip),a.addClass("vjs-keep-tooltips-inside")),a.update(0,0),i.on("ready",(function(){a.on(i.controlBar.progressControl.el(),"mousemove",r.throttle(r.bind(a,a.handleMouseMove),25))})),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})},t.prototype.handleMouseMove=function(e){var t=this.player_.duration(),i=this.calculateDistance(e)*t,n=e.pageX-s.findElPosition(this.el().parentNode).left;this.update(i,n)},t.prototype.update=function(e,t){var i=(0,a.default)(e,this.player_.duration());if(this.el().style.left=t+"px",this.el().setAttribute("data-current-time",i),this.keepTooltipsInside){var n=t-this.clampPosition_(t)+1,s=parseFloat((0,o.default)(this.tooltip,"width"))/2;this.tooltip.innerHTML=i,this.tooltip.style.right="-"+(s-n)+"px"}},t.prototype.calculateDistance=function(e){return s.getPointerPosition(this.el().parentNode,e).x},t.prototype.clampPosition_=function(e){if(!this.keepTooltipsInside)return e;var t=parseFloat((0,o.default)(this.player().el(),"width")),i=parseFloat((0,o.default)(this.tooltip,"width"))/2,n=e;return e<i?n=Math.ceil(i):e>t-i&&(n=Math.floor(t-i)),n},t}(n.default);n.default.registerComponent("MouseTimeDisplay",c),t.default=c},75402:function(e,t,i){"use strict";t.__esModule=!0;
2var n=a(i(93220)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667)),r=a(i(20460));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return r.updateDataAttr(),r.on(i,"timeupdate",r.updateDataAttr),i.ready(s.bind(r,r.updateDataAttr)),n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(r.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),r.keepTooltipsInside&&r.addClass("vjs-keep-tooltips-inside"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-play-progress vjs-slider-bar",innerHTML:'<span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"})},t.prototype.updateDataAttr=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.el_.setAttribute("data-current-time",(0,r.default)(t,this.player_.duration()))},t}(n.default);n.default.registerComponent("PlayProgressBar",o),t.default=o},9831:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n};i(25358),i(12054);var r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})},t}(s.default);r.prototype.options_={children:["seekBar"]},s.default.registerComponent("ProgressControl",r),t.default=r},25358:function(e,t,i){"use strict";t.__esModule=!0;var n=l(i(84084)),s=l(i(93220)),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667)),a=l(i(20460)),o=l(i(51282));function l(e){return e&&e.__esModule?e:{default:e}}i(878),i(75402),i(51488);var u=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"timeupdate",s.updateProgress),s.on(i,"ended",s.updateProgress),i.ready(r.bind(s,s.updateProgress)),n.playerOptions&&n.playerOptions.controlBar&&n.playerOptions.controlBar.progressControl&&n.playerOptions.controlBar.progressControl.keepTooltipsInside&&(s.keepTooltipsInside=n.playerOptions.controlBar.progressControl.keepTooltipsInside),s.keepTooltipsInside&&(s.tooltipProgressBar=s.addChild("TooltipProgressBar")),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":"progress bar"})},t.prototype.updateProgress=function(e){if(this.updateAriaAttributes(this.el_),this.keepTooltipsInside){this.updateAriaAttributes(this.tooltipProgressBar.el_),this.tooltipProgressBar.el_.style.width=this.bar.el_.style.width;var t=parseFloat((0,o.default)(this.player().el(),"width")),i=parseFloat((0,o.default)(this.tooltipProgressBar.tooltip,"width")),n=this.tooltipProgressBar.el().style;n.maxWidth=Math.floor(t-i/2)+"px",n.minWidth=Math.ceil(i/2)+"px",n.right="-"+i/2+"px"}},t.prototype.updateAriaAttributes=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();e.setAttribute("aria-valuenow",(100*this.getPercent()).toFixed(2)),e.setAttribute("aria-valuetext",(0,a.default)(t,this.player_.duration()))},t.prototype.getPercent=function(){var e=this.player_.currentTime()/this.player_.duration();return e>=1?1:e},t.prototype.handleMouseDown=function(t){this.player_.scrubbing(!0),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),e.prototype.handleMouseDown.call(this,t)},t.prototype.handleMouseMove=function(e){var t=this.calculateDistance(e)*this.player_.duration();t===this.player_.duration()&&(t-=.1),this.player_.currentTime(t)},t.prototype.handleMouseUp=function(t){e.prototype.handleMouseUp.call(this,t),this.player_.scrubbing(!1),this.videoWasPlaying&&this.player_.play()},t.prototype.stepForward=function(){this.player_.currentTime(this.player_.currentTime()+5)},t.prototype.stepBack=function(){this.player_.currentTime(this.player_.currentTime()-5)},t}(n.default);u.prototype.options_={children:["loadProgressBar","mouseTimeDisplay","playProgressBar"],barName:"playProgressBar"},u.prototype.playerEvent="timeupdate",s.default.registerComponent("SeekBar",u),t.default=u},51488:function(e,t,i){"use strict";t.__esModule=!0;
2var n=a(i(93220)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667)),r=a(i(20460));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return r.updateDataAttr(),r.on(i,"timeupdate",r.updateDataAttr),i.ready(s.bind(r,r.updateDataAttr)),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-tooltip-progress-bar vjs-slider-bar",innerHTML:'<div class="vjs-time-tooltip"></div>\n        <span class="vjs-control-text"><span>'+this.localize("Progress")+"</span>: 0%</span>"});return this.tooltip=t.querySelector(".vjs-time-tooltip"),t},t.prototype.updateDataAttr=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),i=(0,r.default)(t,this.player_.duration());this.el_.setAttribute("data-current-time",i),this.tooltip.innerHTML=i},t}(n.default);n.default.registerComponent("TooltipProgressBar",o),t.default=o},97610:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(73436)),s=r(i(93220));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,{className:this.buildCSSClass()});return t.innerHTML="&nbsp;",t},t}(n.default);s.default.registerComponent("CustomControlSpacer",a),t.default=a},73436:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n},r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-spacer "+e.prototype.buildCSSClass.call(this)},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t}(s.default);s.default.registerComponent("Spacer",r),t.default=r},41316:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(50823)),s=r(i(93220));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.track={player:i,kind:n.kind,label:n.kind+" settings",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1;var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.addClass("vjs-texttrack-settings"),s.controlText(", opens "+n.kind+" settings dialog"),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.handleClick=function(e){this.player().getChild("textTrackSettings").show(),this.player().getChild("textTrackSettings").el_.focus()},t}(n.default);s.default.registerComponent("CaptionSettingsMenuItem",a),t.default=a},58084:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(23557)),s=a(i(93220)),r=a(i(41316));
2function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n,s));return r.el_.setAttribute("aria-label","Captions Menu"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-captions-button "+e.prototype.buildCSSClass.call(this)},t.prototype.createItems=function(){var t=[];return this.player().tech_&&this.player().tech_.featuresNativeTextTracks||(t.push(new r.default(this.player_,{kind:this.kind_})),this.hideThreshold_+=1),e.prototype.createItems.call(this,t)},t}(n.default);o.prototype.kind_="captions",o.prototype.controlText_="Captions",s.default.registerComponent("CaptionsButton",o),t.default=o},53654:function(e,t,i){"use strict";t.__esModule=!0;var n=o(i(23557)),s=o(i(93220)),r=o(i(7286)),a=o(i(6584));function o(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(i,n,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}
vendor: 1,147 bytes, line 2
2(this,e.call(this,i,n,s));return r.el_.setAttribute("aria-label","Chapters Menu"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-chapters-button "+e.prototype.buildCSSClass.call(this)},t.prototype.update=function(t){this.track_&&(!t||"addtrack"!==t.type&&"removetrack"!==t.type)||this.setTrack(this.findChaptersTrack()),e.prototype.update.call(this)},t.prototype.setTrack=function(e){if(this.track_!==e){if(this.updateHandler_||(this.updateHandler_=this.update.bind(this)),this.track_){var t=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);t&&t.removeEventListener("load",this.updateHandler_),this.track_=null}if(this.track_=e,this.track_){this.track_.mode="hidden";var i=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);i&&i.addEventListener("load",this.updateHandler_)}}}
2,t.prototype.findChaptersTrack=function(){for(var e=this.player_.textTracks()||[],t=e.length-1;t>=0;t--){var i=e[t];if(i.kind===this.kind_)return i}},t.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize((0,a.default)(this.kind_))},t.prototype.createMenu=function(){return this.options_.title=this.getMenuCaption(),e.prototype.createMenu.call(this)},t.prototype.createItems=function(){var e=[];if(!this.track_)return e;var t=this.track_.cues;if(!t)return e;for(var i=0,n=t.length;i<n;i++){var s=t[i],a=new r.default(this.player_,{track:this.track_,cue:s});e.push(a)}return e},t}(n.default);l.prototype.kind_="chapters",l.prototype.controlText_="Chapters",s.default.registerComponent("ChaptersButton",l),t.default=l},7286:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(10139)),s=a(i(93220)),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=n.track,a=n.cue,o=i.currentTime();n.selectable=!0,n.label=a.text,n.selected=a.startTime<=o&&o<a.endTime;var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return l.track=s,l.cue=a,s.addEventListener("cuechange",r.bind(l,l.update)),l}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.handleClick=function(t){e.prototype.handleClick.call(this),this.player_.currentTime(this.cue.startTime),this.update(this.cue.startTime)},t.prototype.update=function(e){var t=this.cue,i=this.player_.currentTime();this.selected(t.startTime<=i&&i<t.endTime)},t}(n.default);s.default.registerComponent("ChaptersTrackMenuItem",o),t.default=o},9953:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(23557)),s=a(i(93220)),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}
2(this,e.call(this,i,n,s));a.el_.setAttribute("aria-label","Descriptions Menu");var o=i.textTracks();if(o){var l=r.bind(a,a.handleTracksChange);o.addEventListener("change",l),a.on("dispose",(function(){o.removeEventListener("change",l)}))}return a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!1,n=0,s=t.length;n<s;n++){var r=t[n];if(r.kind!==this.kind_&&"showing"===r.mode){i=!0;break}}i?this.disable():this.enable()},t.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+e.prototype.buildCSSClass.call(this)},t}(n.default);o.prototype.kind_="descriptions",o.prototype.controlText_="Descriptions",s.default.registerComponent("DescriptionsButton",o),t.default=o},55714:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(50823)),s=r(i(93220));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.track={player:i,kind:n.kind,label:n.kind+" off",default:!1,mode:"disabled"},n.selectable=!0;var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.selected(!0),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.handleTracksChange=function(e){for(var t=this.player().textTracks(),i=!0,n=0,s=t.length;n<s;n++){var r=t[n];if(r.kind===this.track.kind&&"showing"===r.mode){i=!1;break}}this.selected(i)},t}(n.default);s.default.registerComponent("OffTextTrackMenuItem",a),t.default=a},60454:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(23557)),s=r(i(93220));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i,n,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}
2(this,e.call(this,i,n,s));return r.el_.setAttribute("aria-label","Subtitles Menu"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+e.prototype.buildCSSClass.call(this)},t}(n.default);a.prototype.kind_="subtitles",a.prototype.controlText_="Subtitles",s.default.registerComponent("SubtitlesButton",a),t.default=a},23557:function(e,t,i){"use strict";t.__esModule=!0;var n=o(i(16745)),s=o(i(93220)),r=o(i(50823)),a=o(i(55714));function o(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),n.tracks=i.textTracks(),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createItems=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e.push(new a.default(this.player_,{kind:this.kind_})),this.hideThreshold_+=1;var t=this.player_.textTracks();if(!t)return e;for(var i=0;i<t.length;i++){var n=t[i];n.kind===this.kind_&&e.push(new r.default(this.player_,{track:n,selectable:!0}))}return e},t}(n.default);s.default.registerComponent("TextTrackButton",l),t.default=l},50823:function(e,t,i){"use strict";t.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=u(i(10139)),r=u(i(93220)),a=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667)),o=u(i(9331)),l=u(i(67405));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(i,s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=s.track,u=i.textTracks();s.label=r.label||r.language||"Unknown",s.selected=r.default||"showing"===r.mode;var c=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,s));if(c.track=r,u){var h=a.bind(c,c.handleTracksChange);i.on(["loadstart","texttrackchange"],h),u.addEventListener("change",h),c.on("dispose",(function(){u.removeEventListener("change",h)}))}if(u&&void 0===u.onchange){var d=void 0;c.on(["tap","click"],(function(){if("object"!==n(o.default.Event))try{d=new o.default.Event("change")}catch(e){}d||(d=l.default.createEvent("Event")).initEvent("change",!0,!0),u.dispatchEvent(d)}))}return c}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.handleClick=function(t){var i=this.track.kind,n=this.player_.textTracks();if(e.prototype.handleClick.call(this,t),n)for(var s=0;s<n.length;s++){var r=n[s];r.kind===i&&(r===this.track?"showing"!==r.mode&&(r.mode="showing"):"disabled"!==r.mode&&(r.mode="disabled"))}},t.prototype.handleTracksChange=function(e){this.selected("showing"===this.track.mode)},t}(s.default);r.default.registerComponent("TextTrackMenuItem",c),t.default=c},42322:function(e,t,i){"use strict";t.__esModule=!0;
2var n=a(i(93220)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144)),r=a(i(20460));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"timeupdate",s.updateContent),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-current-time vjs-time-control vjs-control"});return this.contentEl_=s.createEl("div",{className:"vjs-current-time-display",innerHTML:'<span class="vjs-control-text">Current Time </span>0:00'},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(e){var t=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime(),i=this.localize("Current Time"),n=(0,r.default)(t,this.player_.duration());n!==this.formattedTime_&&(this.formattedTime_=n,this.contentEl_.innerHTML='<span class="vjs-control-text">'+i+"</span> "+n)},t}(n.default);n.default.registerComponent("CurrentTimeDisplay",o),t.default=o},91617:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(93220)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144)),r=a(i(20460));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"durationchange",s.updateContent),s.on(i,"timeupdate",s.updateContent),s.on(i,"loadedmetadata",s.updateContent),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-duration vjs-time-control vjs-control"});return this.contentEl_=s.createEl("div",{className:"vjs-duration-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Duration Time")+"</span> 0:00"},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(e){var t=this.player_.duration();if(t&&this.duration_!==t){this.duration_=t;var i=this.localize("Duration Time"),n=(0,r.default)(t);this.contentEl_.innerHTML='<span class="vjs-control-text">'+i+"</span> "+n}},t}(n.default);n.default.registerComponent("DurationDisplay",o),t.default=o},79597:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(93220)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144)),r=a(i(20460));function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"timeupdate",s.updateContent),s.on(i,"durationchange",s.updateContent),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var t=e.prototype.createEl.call(this,"div",{className:"vjs-remaining-time vjs-time-control vjs-control"});return this.contentEl_=s.createEl("div",{className:"vjs-remaining-time-display",innerHTML:'<span class="vjs-control-text">'+this.localize("Remaining Time")+"</span> -0:00"},{"aria-live":"off"}),t.appendChild(this.contentEl_),t},t.prototype.updateContent=function(e){if(this.player_.duration()){var t=this.localize("Remaining Time"),i=(0,r.default)(this.player_.remainingTime());i!==this.formattedTime_&&(this.formattedTime_=i,this.contentEl_.innerHTML='<span class="vjs-control-text">'+t+"</span> -"+i)}},t}(n.default);n.default.registerComponent("RemainingTimeDisplay",o),t.default=o},29692:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n},r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider",innerHTML:"<div><span>/</span></div>"})},t}(s.default);s.default.registerComponent("TimeDivider",r),t.default=r},16745:function(e,t,i){"use strict";t.__esModule=!0;
2var n=a(i(10649)),s=a(i(93220)),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=n.tracks,a=o(this,e.call(this,i,n));if(a.items.length<=1&&a.hide(),!s)return o(a);var l=r.bind(a,a.update);return s.addEventListener("removetrack",l),s.addEventListener("addtrack",l),a.player_.on("dispose",(function(){s.removeEventListener("removetrack",l),s.removeEventListener("addtrack",l)})),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t}(n.default);s.default.registerComponent("TrackButton",l),t.default=l},13047:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(84084)),s=a(i(93220)),r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667));function a(e){return e&&e.__esModule?e:{default:e}}i(52691);var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"volumechange",s.updateARIAAttributes),i.ready(r.bind(s,s.updateARIAAttributes)),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":"volume level"})},t.prototype.handleMouseMove=function(e){this.checkMuted(),this.player_.volume(this.calculateDistance(e))},t.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)},t.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()},t.prototype.stepForward=function(){this.checkMuted(),this.player_.volume(this.player_.volume()+.1)},t.prototype.stepBack=function(){this.checkMuted(),this.player_.volume(this.player_.volume()-.1)},t.prototype.updateARIAAttributes=function(e){var t=(100*this.player_.volume()).toFixed(2);this.el_.setAttribute("aria-valuenow",t),this.el_.setAttribute("aria-valuetext",t+"%")},t}(n.default);o.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"},o.prototype.playerEvent="volumechange",s.default.registerComponent("VolumeBar",o),t.default=o},88996:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n};i(13047);var r=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return i.tech_&&!1===i.tech_.featuresVolumeControl&&s.addClass("vjs-hidden"),s.on(i,"loadstart",(function(){!1===i.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")})),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control"})},t}(s.default);r.prototype.options_={children:["volumeBar"]}
2,s.default.registerComponent("VolumeControl",r),t.default=r},52691:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n},r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-volume-level",innerHTML:'<span class="vjs-control-text"></span>'})},t}(s.default);s.default.registerComponent("VolumeLevel",r),t.default=r},1743:function(e,t,i){"use strict";t.__esModule=!0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667)),s=u(i(93220)),r=u(i(3785)),a=u(i(3902)),o=u(i(44065)),l=u(i(13047));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),void 0===n.inline&&(n.inline=!0),void 0===n.vertical&&(n.inline?n.vertical=!1:n.vertical=!0),n.volumeBar=n.volumeBar||{},n.volumeBar.vertical=!!n.vertical;var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));function r(){i.tech_&&!1===i.tech_.featuresVolumeControl?this.addClass("vjs-hidden"):this.removeClass("vjs-hidden")}return s.on(i,"volumechange",s.volumeUpdate),s.on(i,"loadstart",s.volumeUpdate),r.call(s),s.on(i,"loadstart",r),s.on(s.volumeBar,["slideractive","focus"],(function(){this.addClass("vjs-slider-active")})),s.on(s.volumeBar,["sliderinactive","blur"],(function(){this.removeClass("vjs-slider-active")})),s.on(s.volumeBar,["focus"],(function(){this.addClass("vjs-lock-showing")})),s.on(s.volumeBar,["blur"],(function(){this.removeClass("vjs-lock-showing")})),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){var t;return t=this.options_.vertical?"vjs-volume-menu-button-vertical":"vjs-volume-menu-button-horizontal","vjs-volume-menu-button "+e.prototype.buildCSSClass.call(this)+" "+t},t.prototype.createPopup=function(){var e=new r.default(this.player_,{contentElType:"div"}),t=new l.default(this.player_,this.options_.volumeBar);return e.addChild(t),this.menuContent=e,this.volumeBar=t,this.attachVolumeBarEvents(),e},t.prototype.handleClick=function(t){o.default.prototype.handleClick.call(this),e.prototype.handleClick.call(this)},t.prototype.attachVolumeBarEvents=function(){this.menuContent.on(["mousedown","touchdown"],n.bind(this,this.handleMouseDown))},t.prototype.handleMouseDown=function(e){this.on(["mousemove","touchmove"],n.bind(this.volumeBar,this.volumeBar.handleMouseMove)),this.on(this.el_.ownerDocument,["mouseup","touchend"],this.handleMouseUp)},t.prototype.handleMouseUp=function(e){this.off(["mousemove","touchmove"],n.bind(this.volumeBar,this.volumeBar.handleMouseMove))},t}(a.default);c.prototype.volumeUpdate=o.default.prototype.update,c.prototype.controlText_="Mute",s.default.registerComponent("VolumeMenuButton",c),t.default=c},11101:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(93220)),s=a(i(38458)),r=a(i(91908));
2function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.on(i,"error",s.open),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.buildCSSClass=function(){return"vjs-error-display "+e.prototype.buildCSSClass.call(this)},t.prototype.content=function(){var e=this.player().error();return e?this.localize(e.message):""},t}(s.default);o.prototype.options_=(0,r.default)(s.default.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0}),n.default.registerComponent("ErrorDisplay",o),t.default=o},43744:function(e,t,i){"use strict";t.__esModule=!0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(31222)),s=function(){};s.prototype.allowedEvents_={},s.prototype.on=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},n.on(this,e,t),this.addEventListener=i},s.prototype.addEventListener=s.prototype.on,s.prototype.off=function(e,t){n.off(this,e,t)},s.prototype.removeEventListener=s.prototype.off,s.prototype.one=function(e,t){var i=this.addEventListener;this.addEventListener=function(){},n.one(this,e,t),this.addEventListener=i},s.prototype.trigger=function(e){var t=e.type||e;"string"==typeof e&&(e={type:t}),e=n.fixEvent(e),this.allowedEvents_[t]&&this["on"+t]&&this["on"+t](e),n.trigger(this,e)},s.prototype.dispatchEvent=s.prototype.trigger,t.default=s},89994:function(e,t,i){"use strict";t.__esModule=!0;var n,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=(n=i(33128))&&n.__esModule?n:{default:n},a=i(28645);t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=function(){e.apply(this,arguments)},n={};for(var o in(0,a.isObject)(t)?("function"==typeof t.init&&(r.default.warn("Constructor logic via init() is deprecated; please use constructor() instead."),t.constructor=t.init),t.constructor!==Object.prototype.constructor&&(i=t.constructor),n=t):"function"==typeof t&&(i=t),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&&(e.super_=t)}(i,e),n)n.hasOwnProperty(o)&&(i.prototype[o]=n[o]);return i}},29953:function(e,t,i){"use strict";t.__esModule=!0;for(var n,s=(n=i(67405))&&n.__esModule?n:{default:n},r={},a=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],o=a[0],l=void 0,u=0;u<a.length;u++)if(a[u][1]in s.default){l=a[u];break}if(l)for(var c=0;c<l.length;c++)r[o[c]]=l[c];t.default=r},3982:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n},r=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"})},t}(s.default);s.default.registerComponent("LoadingSpinner",r),t.default=r},64055:function(e,t,i){"use strict";t.__esModule=!0;var n=i(28645);function s(e){if(e instanceof s)return e;"number"==typeof e?this.code=e:"string"==typeof e?this.message=e:(0,n.isObject)(e)&&("number"==typeof e.code&&(this.code=e.code),(0,n.assign)(this,e)),this.message||(this.message=s.defaultMessages[this.code]||"")}s.prototype.code=0,s.prototype.message="",s.prototype.status=null,s.errorTypes=["MEDIA_ERR_CUSTOM","MEDIA_ERR_ABORTED","MEDIA_ERR_NETWORK","MEDIA_ERR_DECODE","MEDIA_ERR_SRC_NOT_SUPPORTED","MEDIA_ERR_ENCRYPTED"],s.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(var r=0;r<s.errorTypes.length;r++)s[s.errorTypes[r]]=r,s.prototype[s.errorTypes[r]]=r;t.default=s},10649:function(e,t,i){"use strict";t.__esModule=!0;var n=c(i(82633)),s=c(i(93220)),r=c(i(22510)),a=u(i(56144)),o=u(i(667)),l=c(i(6584));
2function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}var h=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.update(),s.enabled_=!0,s.el_.setAttribute("aria-haspopup","true"),s.el_.setAttribute("role","menuitem"),s.on("keydown",s.handleSubmenuKeyPress),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.update=function(){var e=this.createMenu();this.menu&&this.removeChild(this.menu),this.menu=e,this.addChild(e),this.buttonPressed_=!1,this.el_.setAttribute("aria-expanded","false"),this.items&&this.items.length<=this.hideThreshold_?this.hide():this.show()},t.prototype.createMenu=function(){var e=new r.default(this.player_);if(this.hideThreshold_=0,this.options_.title){var t=a.createEl("li",{className:"vjs-menu-title",innerHTML:(0,l.default)(this.options_.title),tabIndex:-1});this.hideThreshold_+=1,e.children_.unshift(t),a.insertElFirst(t,e.contentEl())}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e},t.prototype.createItems=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t.prototype.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.prototype.handleClick=function(e){this.one(this.menu.contentEl(),"mouseleave",o.bind(this,(function(e){this.unpressButton(),this.el_.blur()}))),this.buttonPressed_?this.unpressButton():this.pressButton()},t.prototype.handleKeyPress=function(t){27===t.which||9===t.which?(this.buttonPressed_&&this.unpressButton(),9!==t.which&&t.preventDefault()):38===t.which||40===t.which?this.buttonPressed_||(this.pressButton(),t.preventDefault()):e.prototype.handleKeyPress.call(this,t)},t.prototype.handleSubmenuKeyPress=function(e){27!==e.which&&9!==e.which||(this.buttonPressed_&&this.unpressButton(),9!==e.which&&e.preventDefault())},t.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.lockShowing(),this.el_.setAttribute("aria-expanded","true"),this.menu.focus())},t.prototype.unpressButton=function(){this.enabled_&&(this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.el_.focus())},t.prototype.disable=function(){return this.buttonPressed_=!1,this.menu.unlockShowing(),this.el_.setAttribute("aria-expanded","false"),this.enabled_=!1,e.prototype.disable.call(this)},t.prototype.enable=function(){return this.enabled_=!0,e.prototype.enable.call(this)},t}(n.default);s.default.registerComponent("MenuButton",h),t.default=h},10139:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(82633)),s=a(i(93220)),r=i(28645);function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.selectable=n.selectable,s.selected(n.selected),s.selectable?s.el_.setAttribute("role","menuitemcheckbox"):s.el_.setAttribute("role","menuitem"),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(t,i,n){return this.nonIconControl
2=!0,e.prototype.createEl.call(this,"li",(0,r.assign)({className:"vjs-menu-item",innerHTML:this.localize(this.options_.label),tabIndex:-1},i),n)},t.prototype.handleClick=function(e){this.selected(!0)},t.prototype.selected=function(e){this.selectable&&(e?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected")):(this.removeClass("vjs-selected"),this.el_.setAttribute("aria-checked","false"),this.controlText("")))},t}(n.default);s.default.registerComponent("MenuItem",o),t.default=o},22510:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n},r=l(i(56144)),a=l(i(667)),o=l(i(31222));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}var u=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.focusedChild_=-1,s.on("keydown",s.handleKeyPress),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",a.bind(this,(function(e){this.unlockShowing()})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=r.createEl(t,{className:"vjs-menu-content"}),this.contentEl_.setAttribute("role","menu");var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.setAttribute("role","presentation"),i.appendChild(this.contentEl_),o.on(i,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),i},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepForward()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepBack())},t.prototype.stepForward=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_+1),this.focus(e)},t.prototype.stepBack=function(){var e=0;void 0!==this.focusedChild_&&(e=this.focusedChild_-1),this.focus(e)},t.prototype.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.children().slice();t.length&&t[0].className&&/vjs-menu-title/.test(t[0].className)&&t.shift(),t.length>0&&(e<0?e=0:e>=t.length&&(e=t.length-1),this.focusedChild_=e,t[e].el_.focus())},t}(s.default);s.default.registerComponent("Menu",u),t.default=u},38458:function(e,t,i){"use strict";t.__esModule=!0;var n,s=o(i(56144)),r=o(i(667)),a=(n=i(93220))&&n.__esModule?n:{default:n};function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}var l="vjs-modal-dialog",u=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return r.opened_=r.hasBeenOpened_=r.hasBeenFilled_=!1,r.closeable(!r.options_.uncloseable),r.content(r.options_.content),r.contentEl_=s.createEl("div",{className:l+"-content"},{role:"document"}),r.descEl_=s.createEl("p",{className:l+"-description vjs-offscreen",id:r.el().getAttribute("aria-describedby")}),s.textContent(r.descEl_,r.description()),r.el_.appendChild(r.descEl_),r.el_.appendChild(r.contentEl_),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.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"})},t.prototype.buildCSSClass=function(){return l+" vjs-hidden "+e.prototype.buildCSSClass.call(this)},t.prototype.handleKeyPress=function(e){27===e.which&&this.closeable()&&this.close()},t.prototype.label=function(){return this.options_.label||this.localize("Modal Window")},t.prototype.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},t.prototype.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_.pauseOnOpe
2n&&this.wasPlaying_&&e.pause(),this.closeable()&&this.on(this.el_.ownerDocument,"keydown",r.bind(this,this.handleKeyPress)),e.controls(!1),this.show(),this.el().setAttribute("aria-hidden","false"),this.trigger("modalopen"),this.hasBeenOpened_=!0}return this},t.prototype.opened=function(e){return"boolean"==typeof e&&this[e?"open":"close"](),this.opened_},t.prototype.close=function(){if(this.opened_){var e=this.player();this.trigger("beforemodalclose"),this.opened_=!1,this.wasPlaying_&&this.options_.pauseOnOpen&&e.play(),this.closeable()&&this.off(this.el_.ownerDocument,"keydown",r.bind(this,this.handleKeyPress)),e.controls(!0),this.hide(),this.el().setAttribute("aria-hidden","true"),this.trigger("modalclose"),this.options_.temporary&&this.dispose()}return this},t.prototype.closeable=function(e){if("boolean"==typeof e){var t=this.closeable_=!!e,i=this.getChild("closeButton");if(t&&!i){var n=this.contentEl_;this.contentEl_=this.el_,i=this.addChild("closeButton",{controlText:"Close Modal Dialog"}),this.contentEl_=n,this.on(i,"close",this.close)}!t&&i&&(this.off(i,"close",this.close),this.removeChild(i),i.dispose())}return this.closeable_},t.prototype.fill=function(){return this.fillWith(this.content())},t.prototype.fillWith=function(e){var t=this.contentEl(),i=t.parentNode,n=t.nextSibling;return this.trigger("beforemodalfill"),this.hasBeenFilled_=!0,i.removeChild(t),this.empty(),s.insertContent(t,e),this.trigger("modalfill"),n?i.insertBefore(t,n):i.appendChild(t),this},t.prototype.empty=function(){return this.trigger("beforemodalempty"),s.emptyEl(this.contentEl()),this.trigger("modalempty"),this},t.prototype.content=function(e){return void 0!==e&&(this.content_=e),this.content_},t}(a.default);u.prototype.options_={pauseOnOpen:!0,temporary:!0},a.default.registerComponent("ModalDialog",u),t.default=u},72822:function(e,t,i){"use strict";t.__esModule=!0;var n=x(i(93220)),s=x(i(67405)),r=x(i(9331)),a=E(i(31222)),o=E(i(56144)),l=E(i(667)),u=E(i(77355)),c=E(i(88223)),h=x(i(33128)),d=x(i(6584)),p=i(94037),f=i(96604),g=E(i(59104)),m=x(i(29953)),y=x(i(64055)),_=x(i(75974)),v=i(28645),b=x(i(91908)),T=x(i(94054)),S=x(i(38458)),k=x(i(28705)),w=x(i(75903)),C=x(i(44381));function E(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function x(e){return e&&e.__esModule?e:{default:e}}i(60690),i(83914),i(43197),i(89312),i(3982),i(38135),i(37751),i(98430),i(11101),i(84702),i(12566);var I=["progress","abort","suspend","emptied","stalled","loadedmetadata","loadeddata","timeupdate","ratechange","volumechange","texttrackchange"],O=function(e){function t(i,n,s){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i.id=i.id||"vjs_video_"+u.newGUID(),(n=(0,v.assign)(t.getTagSettings(i),n)).initChildren=!1,n.createEl=!1,n.reportTouchActivity=!1,!n.language)if("function"==typeof i.closest){var r=i.closest("[lang]");r&&(n.language=r.getAttribute("lang"))}else for(var a=i;a&&1===a.nodeType;){if(o.getElAttributes(a).hasOwnProperty("lang")){n.language=a.getAttribute("lang");break}a=a.parentNode}var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,null,n,s));if(!l.options_||!l.options_.techOrder||!l.options_.techOrder.length)throw new Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");if(l.tag=i,l.tagAttributes=i&&o.getElAttributes(i),l.language(l.options_.language),n.languages){var d={};Object.getOwnPropertyNames(n.languages).forEach((function(e){d[e.toLowerCase()]=n.languages[e]})),l.languages_=d}else l.languages_=t.prototype.options_.languages;l.cache_={},l.poster_=n.poster||"",l.controls_=!!n.controls,i.controls=!1,l.scrubbing_=!1,l.el_=l.createEl();var p=(0,b.default)(l.options_);if(n.plugins){var f=n.plugins;Object.getOwnPropertyNames(f).forEach((function(e){"function"==typeof this[e]?this[e](f[e]):h.default.error("Unable to find plugin:",e)}),l)}
2l.options_.playerOptions=p,l.initChildren(),l.isAudio("audio"===i.nodeName.toLowerCase()),l.controls()?l.addClass("vjs-controls-enabled"):l.addClass("vjs-controls-disabled"),l.el_.setAttribute("role","region"),l.isAudio()?l.el_.setAttribute("aria-label","audio player"):l.el_.setAttribute("aria-label","video player"),l.isAudio()&&l.addClass("vjs-audio"),l.flexNotSupported_()&&l.addClass("vjs-no-flex"),c.IS_IOS||l.addClass("vjs-workinghover"),t.players[l.id_]=l;var g="5.20.5".split(".")[0];return l.addClass("vjs-v"+g),l.userActive(!0),l.reportUserActivity(),l.listenForUserActivity_(),l.on("fullscreenchange",l.handleFullscreenChange_),l.on("stageclick",l.handleStageClick_),l}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.dispose=function(){this.trigger("dispose"),this.off("dispose"),this.styleEl_&&this.styleEl_.parentNode&&this.styleEl_.parentNode.removeChild(this.styleEl_),t.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(),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var t=this.tag,i=void 0,n=this.playerElIngest_=t.parentNode&&t.parentNode.hasAttribute&&t.parentNode.hasAttribute("data-vjs-player");i=this.el_=n?t.parentNode:e.prototype.createEl.call(this,"div"),t.setAttribute("tabindex","-1"),t.removeAttribute("width"),t.removeAttribute("height");var s=o.getElAttributes(t);if(Object.getOwnPropertyNames(s).forEach((function(e){"class"===e?i.className+=" "+s[e]:i.setAttribute(e,s[e])})),t.playerId=t.id,t.id+="_html5_api",t.className="vjs-tech",t.player=i.player=this,this.addClass("vjs-paused"),!0!==r.default.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=g.createStyleElement("vjs-styles-dimensions");var a=o.$(".vjs-styles-defaults"),l=o.$("head");l.insertBefore(this.styleEl_,a?a.nextSibling:l.firstChild)}this.width(this.options_.width),this.height(this.options_.height),this.fluid(this.options_.fluid),this.aspectRatio(this.options_.aspectRatio);for(var u=t.getElementsByTagName("a"),c=0;c<u.length;c++){var h=u.item(c);o.addElClass(h,"vjs-hidden"),h.setAttribute("hidden","hidden")}return t.initNetworkState_=t.networkState,t.parentNode&&!n&&t.parentNode.insertBefore(i,t),o.insertElFirst(t,i),this.children_.unshift(t),this.el_=i,i},t.prototype.width=function(e){return this.dimension("width",e)},t.prototype.height=function(e){return this.dimension("height",e)},t.prototype.dimension=function(e,t){var i=e+"_";if(void 0===t)return this[i]||0;if(""===t)this[i]=void 0;else{var n=parseFloat(t);if(isNaN(n))return h.default.error('Improper value "'+t+'" supplied for for '+e),this;this[i]=n}return this.updateStyleEl_(),this},t.prototype.fluid=function(e){if(void 0===e)return!!this.fluid_;this.fluid_=!!e,e?this.addClass("vjs-fluid"):this.removeClass("vjs-fluid"),this.updateStyleEl_()},t.prototype.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_()},t.prototype.updateStyleEl_=function(){if(!0!==r.default.VIDEOJS_NO_DYNAMIC_STYLE){var e,t,i,n=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9").split(":"),s=n[1]/n[0];e=void 0!==this.width_?this.width_:void 0!==this.height_?this.height_/s:this.videoWidth()||300,t=void 0!==this.height_?this.height_:e*s,i=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions",this.addClass(i),g.setTextContent(this.styleEl_,"\n      ."+i+" {\n        width: "+e+"px;\n        height: "+t+"px;\n      }\n\n      ."+i+".vjs-fluid {\n        padding-top: "+100*s+"%;\n      }\n    ")}else{var a="number"==typeof this.width_?this.width_:this.options_.width,o="number"==typeof this.height_?this.height_:this.options_.height,l=this.tech_&&this.tech_.el();l&&(a>=0&&(l.width=a),o>
2=0&&(l.height=o))}},t.prototype.loadTech_=function(e,t){var i=this;this.tech_&&this.unloadTech_(),"Html5"!==e&&this.tag&&(k.default.getTech("Html5").disposeMediaElement(this.tag),this.tag.player=null,this.tag=null),this.techName_=e,this.isReady_=!1;var s=(0,v.assign)({source:t,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+e+"_api",videoTracks:this.videoTracks_,textTracks:this.textTracks_,audioTracks:this.audioTracks_,autoplay:this.options_.autoplay,playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,muted:this.options_.muted,poster:this.poster(),language:this.language(),playerElIngest:this.playerElIngest_||!1,"vtt.js":this.options_["vtt.js"]},this.options_[e.toLowerCase()]);this.tag&&(s.tag=this.tag),t&&(this.currentType_=t.type,t.src===this.cache_.src&&this.cache_.currentTime>0&&(s.startTime=this.cache_.currentTime),this.cache_.sources=null,this.cache_.source=t,this.cache_.src=t.src);var r=k.default.getTech(e);r||(r=n.default.getComponent(e)),this.tech_=new r(s),this.tech_.ready(l.bind(this,this.handleTechReady_),!0),T.default.jsonToTextTracks(this.textTracksJson_||[],this.tech_),I.forEach((function(e){i.on(i.tech_,e,i["handleTech"+(0,d.default)(e)+"_"])})),this.on(this.tech_,"loadstart",this.handleTechLoadStart_),this.on(this.tech_,"waiting",this.handleTechWaiting_),this.on(this.tech_,"canplay",this.handleTechCanPlay_),this.on(this.tech_,"canplaythrough",this.handleTechCanPlayThrough_),this.on(this.tech_,"playing",this.handleTechPlaying_),this.on(this.tech_,"ended",this.handleTechEnded_),this.on(this.tech_,"seeking",this.handleTechSeeking_),this.on(this.tech_,"seeked",this.handleTechSeeked_),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_,"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.usingNativeControls(this.techGet_("controls")),this.controls()&&!this.usingNativeControls()&&this.addTechControlsListeners_(),this.tech_.el().parentNode===this.el()||"Html5"===e&&this.tag||o.insertElFirst(this.tech_.el(),this.el()),this.tag&&(this.tag.player=null,this.tag=null)},t.prototype.unloadTech_=function(){this.videoTracks_=this.videoTracks(),this.textTracks_=this.textTracks(),this.audioTracks_=this.audioTracks(),this.textTracksJson_=T.default.textTracksToJson(this.tech_),this.isReady_=!1,this.tech_.dispose(),this.tech_=!1},t.prototype.tech=function(e){if(e&&e.IWillNotUseThisInPlugins)return this.tech_;var t="\n      Please make sure that you are not using this inside of a plugin.\n      To disable this alert and error, please pass in an object with\n      `IWillNotUseThisInPlugins` to the `tech` method. See\n      https://github.com/videojs/video.js/issues/2617 for more info.\n    ";throw r.default.alert(t),new Error(t)},t.prototype.addTechControlsListeners_=function(){this.removeTechControlsListeners_(),this.on(this.tech_,"mousedown",this.handleTechClick_),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_)},t.prototype.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_,"mousedown",this.handleTechClick_)},t.prototype.handleTechReady_=function(){if(this.triggerReady(),this.cache_.volume&&this.techCall_("setVolume",this.cache_.volume),this.handleTechPosterChange_(),this.handleTechDurationChange_(),(this.src()||this.currentSrc())&&this.tag&&this.options_.autoplay&&this.paused()){try{delete this.tag.poster}catch(e){(0,h.default)("deleting tag.poster throws in some browsers",e)}this.play()}},t.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-seeking"),this.error(null),this.paused()?(this.hasStarted(!1),this.trigger("loadstart")):(this.trigger("loadstart"),this.trigger("firstplay"))},t.prototype.hasStarted=function(e){return void 0!==e?(this.hasStarted_!==e&&(this.hasStarted_=e,e?(this.addClass("vjs-has-started"),this.trigger("firstplay")):this.removeClass("vjs-has-started")),this):!!this.hasStarted_},t.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended"),this.removeClass("vjs-paused"),this.addClass("vjs-playing"),this.hasStarted(!0),this.trigger("play")},t.prototype.handleTechWaiting_=function(){var e=this;this.addClass("vjs-waiting"),this.trigger("waiting"),this.one("timeupdate",(function(){return e.removeClass("vjs-waiting")}))},t.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting"),this.trigger("canplay")},t.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting"),this.trigger("canplaythrough")},t.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting"),this.trigger("playing")},t.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking"),this.trigger("seeking")},t.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking"),this.trigger("seeked")},t.prototype.handleTechFirstPlay_=function(){this.options_.starttime&&(h.default.warn("Passing the `starttime` option to the player will be deprecated 
2in 6.0"),this.currentTime(this.options_.starttime)),this.addClass("vjs-has-started"),this.trigger("firstplay")},t.prototype.handleTechPause_=function(){this.removeClass("vjs-playing"),this.addClass("vjs-paused"),this.trigger("pause")},t.prototype.handleTechEnded_=function(){this.addClass("vjs-ended"),this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause(),this.trigger("ended")},t.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))},t.prototype.handleTechClick_=function(e){0===e.button&&this.controls()&&(this.paused()?this.play():this.pause())},t.prototype.handleTechTap_=function(){this.userActive(!this.userActive())},t.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()},t.prototype.handleTechTouchMove_=function(){this.userWasActive&&this.reportUserActivity()},t.prototype.handleTechTouchEnd_=function(e){e.preventDefault()},t.prototype.handleFullscreenChange_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")},t.prototype.handleStageClick_=function(){this.reportUserActivity()},t.prototype.handleTechFullscreenChange_=function(e,t){t&&this.isFullscreen(t.isFullscreen),this.trigger("fullscreenchange")},t.prototype.handleTechError_=function(){var e=this.tech_.error();this.error(e)},t.prototype.handleTechTextData_=function(){var e=null;arguments.length>1&&(e=arguments[1]),this.trigger("textdata",e)},t.prototype.getCache=function(){return this.cache_},t.prototype.techCall_=function(e,t){if(this.tech_&&!this.tech_.isReady_)this.tech_.ready((function(){this[e](t)}),!0);else try{this.tech_&&this.tech_[e](t)}catch(e){throw(0,h.default)(e),e}},t.prototype.techGet_=function(e){if(this.tech_&&this.tech_.isReady_)try{return this.tech_[e]()}catch(t){throw void 0===this.tech_[e]?(0,h.default)("Video.js: "+e+" method not defined for "+this.techName_+" playback technology.",t):"TypeError"===t.name?((0,h.default)("Video.js: "+e+" unavailable on "+this.techName_+" playback technology element.",t),this.tech_.isReady_=!1):(0,h.default)(t),t}},t.prototype.play=function(){return this.src()||this.currentSrc()?this.techCall_("play"):this.tech_.one("loadstart",(function(){this.play()})),this},t.prototype.pause=function(){return this.techCall_("pause"),this},t.prototype.paused=function(){return!1!==this.techGet_("paused")},t.prototype.scrubbing=function(e){return void 0!==e?(this.scrubbing_=!!e,e?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing"),this):this.scrubbing_},t.prototype.currentTime=function(e){return void 0!==e?(this.techCall_("setCurrentTime",e),this):(this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime)},t.prototype.duration=function(e){return void 0===e?void 0!==this.cache_.duration?this.cache_.duration:NaN:((e=parseFloat(e))<0&&(e=1/0),e!==this.cache_.duration&&(this.cache_.duration=e,e===1/0?this.addClass("vjs-live"):this.removeClass("vjs-live"),this.trigger("durationchange")),this)},t.prototype.remainingTime=function(){return this.duration()-this.currentTime()},t.prototype.buffered=function(){var e=this.techGet_("buffered");return e&&e.length||(e=(0,p.createTimeRange)(0,0)),e},t.prototype.bufferedPercent=function(){return(0,f.bufferedPercent)(this.buffered(),this.duration())},t.prototype.bufferedEnd=function(){var e=this.buffered(),t=this.duration(),i=e.end(e.length-1);return i>t&&(i=t),i},t.prototype.volume=function(e){var t=void 0;return void 0!==e?(t=Math.max(0,Math.min(1,parseFloat(e))),this.cache_.volume=t,this.techCall_("setVolume",t),this):(t=parseFloat(this.techGet_("volume")),isNaN(t)?1:t)},t.prototype.muted=function(e){return void 0!==e?(this.techCall_("setMuted",e),this):this.techGet_("muted")||!1},t.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1},t.prototype.isFullscreen=function(e){return void 0!==e?(this.isFullscreen_=!!e,this):!!this.isFullscreen_},t.prototype.requestFullscreen=function(){var e=m.default;return this.isFullscreen(!0),e.requestFullscreen?(a.on(s.default,e.fullscreenchange,l.bind(this,(function t(i){this.isFullscreen(s.default[e.fullscreenElement]),!1===this.isFullscreen()&&a.off(s.default,e.fullscreenchange,t),this.trigger("fullscreenchange")}))),this.el_[e.requestFullscreen]()):this.tech_.supportsFullScreen()?this.techCall_("enterFullScreen"):(this.enterFullWindow(),this.trigger("fullscreenchange")),this},t.prototype.exitFullscreen=function(){var e=m.default;return this.isFullscreen(!1),e.requestFullscreen?s.default[e.exitFullscreen]():this.tech_.supportsFullScreen()?this.techCall_("exitFullScreen"):(this.exitFullWindow(),this.trigger("fullscreenchange")),this},t.prototype.enterFullWindow=function(){this.isFullWindow=!0,this.docOrigOverflow=s.default.documentElement.style.overflow,a.on(s.default,"keydown",l.bind(this,this.fullWindowOnEscKey)),s.default.documentElement.style.overflow="hidden",o.addElClass(s.default.body,"vjs-full-window"),this.trigger("enterFullWindow")}
2,t.prototype.fullWindowOnEscKey=function(e){27===e.keyCode&&(!0===this.isFullscreen()?this.exitFullscreen():this.exitFullWindow())},t.prototype.exitFullWindow=function(){this.isFullWindow=!1,a.off(s.default,"keydown",this.fullWindowOnEscKey),s.default.documentElement.style.overflow=this.docOrigOverflow,o.removeElClass(s.default.body,"vjs-full-window"),this.trigger("exitFullWindow")},t.prototype.canPlayType=function(e){for(var t=void 0,i=0,s=this.options_.techOrder;i<s.length;i++){var r=(0,d.default)(s[i]),a=k.default.getTech(r);if(a||(a=n.default.getComponent(r)),a){if(a.isSupported()&&(t=a.canPlayType(e)))return t}else h.default.error('The "'+r+'" tech is undefined. Skipped browser support check for that tech.')}return""},t.prototype.selectSource=function(e){var t,i=this,s=this.options_.techOrder.map(d.default).map((function(e){return[e,k.default.getTech(e)||n.default.getComponent(e)]})).filter((function(e){var t=e[0],i=e[1];return i?i.isSupported():(h.default.error('The "'+t+'" tech is undefined. Skipped browser support check for that tech.'),!1)})),r=function(e,t,i){var n=void 0;return e.some((function(e){return t.some((function(t){if(n=i(e,t))return!0}))})),n},a=function(e,t){var n=e[0];if(e[1].canPlaySource(t,i.options_[n.toLowerCase()]))return{source:t,tech:n}};return(this.options_.sourceOrder?r(e,s,(t=a,function(e,i){return t(i,e)})):r(s,e,a))||!1},t.prototype.src=function(e){if(void 0===e)return this.techGet_("src");var t=k.default.getTech(this.techName_);return t||(t=n.default.getComponent(this.techName_)),Array.isArray(e)?this.sourceList_(e):"string"==typeof e?this.src({src:e}):e instanceof Object&&(e.type&&!t.canPlaySource(e,this.options_[this.techName_.toLowerCase()])?this.sourceList_([e]):(this.cache_.sources=null,this.cache_.source=e,this.cache_.src=e.src,this.currentType_=e.type||"",this.ready((function(){t.prototype.hasOwnProperty("setSource")?this.techCall_("setSource",e):this.techCall_("src",e.src),"auto"===this.options_.preload&&this.load(),this.options_.autoplay&&this.play()}),!0))),this},t.prototype.sourceList_=function(e){var t=this.selectSource(e);t?(t.tech===this.techName_?this.src(t.source):this.loadTech_(t.tech,t.source),this.cache_.sources=e):(this.setTimeout((function(){this.error({code:4,message:this.localize(this.options_.notSupportedMessage)})}),0),this.triggerReady())},t.prototype.load=function(){return this.techCall_("load"),this},t.prototype.reset=function(){return this.loadTech_((0,d.default)(this.options_.techOrder[0]),null),this.techCall_("reset"),this},t.prototype.currentSources=function(){var e=this.currentSource(),t=[];return 0!==Object.keys(e).length&&t.push(e),this.cache_.sources||t},t.prototype.currentSource=function(){var e={},t=this.currentSrc();return t&&(e.src=t),this.cache_.source||e},t.prototype.currentSrc=function(){return this.techGet_("currentSrc")||this.cache_.src||""},t.prototype.currentType=function(){return this.currentType_||""},t.prototype.preload=function(e){return void 0!==e?(this.techCall_("setPreload",e),this.options_.preload=e,this):this.techGet_("preload")},t.prototype.autoplay=function(e){return void 0!==e?(this.techCall_("setAutoplay",e),this.options_.autoplay=e,this):this.techGet_("autoplay",e)},t.prototype.playsinline=function(e){return void 0!==e?(this.techCall_("setPlaysinline",e),this.options_.playsinline=e,this):this.techGet_("playsinline")},t.prototype.loop=function(e){return void 0!==e?(this.techCall_("setLoop",e),this.options_.loop=e,this):this.techGet_("loop")},t.prototype.poster=function(e){return void 0===e?this.poster_:(e||(e=""),this.poster_=e,this.techCall_("setPoster",e),this.trigger("posterchange"),this)},t.prototype.handleTechPosterChange_=function(){!this.poster_&&this.tech_&&this.tech_.poster&&(this.poster_=this.tech_.poster()||"",this.trigger("posterchange"))},t.prototype.controls=function(e){return void 0!==e?(e=!!e,this.controls_!==e&&(this.controls_=e,this.usingNativeControls()&&this.techCall_("setControls",e),e?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControl
2sListeners_()):(this.removeClass("vjs-controls-enabled"),this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_())),this):!!this.controls_},t.prototype.usingNativeControls=function(e){return void 0!==e?(e=!!e,this.usingNativeControls_!==e&&(this.usingNativeControls_=e,e?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols"))),this):!!this.usingNativeControls_},t.prototype.error=function(e){return void 0===e?this.error_||null:null===e?(this.error_=e,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close(),this):(this.error_=new y.default(e),this.addClass("vjs-error"),h.default.error("(CODE:"+this.error_.code+" "+y.default.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),this)},t.prototype.reportUserActivity=function(e){this.userActivity_=!0},t.prototype.userActive=function(e){return void 0!==e?((e=!!e)!==this.userActive_&&(this.userActive_=e,e?(this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive")):(this.userActivity_=!1,this.tech_&&this.tech_.one("mousemove",(function(e){e.stopPropagation(),e.preventDefault()})),this.removeClass("vjs-user-active"),this.addClass("vjs-user-inactive"),this.trigger("userinactive"))),this):this.userActive_},t.prototype.listenForUserActivity_=function(){var e=void 0,t=void 0,i=void 0,n=l.bind(this,this.reportUserActivity);this.on("mousedown",(function(){n(),this.clearInterval(e),e=this.setInterval(n,250)})),this.on("mousemove",(function(e){e.screenX===t&&e.screenY===i||(t=e.screenX,i=e.screenY,n())})),this.on("mouseup",(function(t){n(),this.clearInterval(e)})),this.on("keydown",n),this.on("keyup",n);var s=void 0;this.setInterval((function(){if(this.userActivity_){this.userActivity_=!1,this.userActive(!0),this.clearTimeout(s);var e=this.options_.inactivityTimeout;e>0&&(s=this.setTimeout((function(){this.userActivity_||this.userActive(!1)}),e))}}),250)},t.prototype.playbackRate=function(e){return void 0!==e?(this.techCall_("setPlaybackRate",e),this):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("playbackRate"):1},t.prototype.isAudio=function(e){return void 0!==e?(this.isAudio_=!!e,this):!!this.isAudio_},t.prototype.videoTracks=function(){return this.tech_?this.tech_.videoTracks():(this.videoTracks_=this.videoTracks_||new C.default,this.videoTracks_)},t.prototype.audioTracks=function(){return this.tech_?this.tech_.audioTracks():(this.audioTracks_=this.audioTracks_||new w.default,this.audioTracks_)},t.prototype.textTracks=function(){if(this.tech_)return this.tech_.textTracks()},t.prototype.remoteTextTracks=function(){if(this.tech_)return this.tech_.remoteTextTracks()},t.prototype.remoteTextTrackEls=function(){if(this.tech_)return this.tech_.remoteTextTrackEls()},t.prototype.addTextTrack=function(e,t,i){if(this.tech_)return this.tech_.addTextTrack(e,t,i)},t.prototype.addRemoteTextTrack=function(e,t){if(this.tech_)return this.tech_.addRemoteTextTrack(e,t)},t.prototype.removeRemoteTextTrack=function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).track,t=void 0===e?arguments[0]:e;if(this.tech_)return this.tech_.removeRemoteTextTrack(t)},t.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")},t.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0},t.prototype.videoHeight=function(){return this.tech_&&this.tech_.videoHeight&&this.tech_.videoHeight()||0},t.prototype.language=function(e){return void 0===e?this.language_:(this.language_=String(e).toLowerCase(),this)},t.prototype.languages=function(){return(0,b.default)(t.prototype.options_.languages,this.languages_)},t.prototype.toJSON=function(){var e=(0,b.default)(this.options_),t=e.tracks;e.tracks=[];for(var i=0;i<t.length;i++){var n=t[i];(n=(0,b.default)(n)).player=void 0,e.tracks[i]=n}return e},t.prototype.createModal=function(e,t){var i=this;(t=t||{}).content=e||"";var n=new S.default(this,t);return this.addChild(n),n.on("dispose",(function(){i.removeChild(n)})),n.open()},t.getTagSettings=function(e){var t={sources:[],tracks:[]},i=o.getElAttributes(e),n=i["data-setup"];if(o.hasElClass(e,"vjs-fluid")&&(i.fluid=!0),null!==n){var s=(0,_.default)(n||"{}"),r=s[0],a=s[1];r&&h.default.error(r),(0,v.assign)(i,a)}if((0,v.assign)(t,i),e.hasChildNodes())for(var l=e.childNodes,u=0,c=l.length;u<c;u++){var d=l[u],p=d.nodeName.toLowerCase();"source"===p?t.sources.push(o.getElAttributes(d)):"track"===p&&t.tracks.push(o.getElAttributes(d))}return t},t.prototype.flexNotSupported_=function(){var e=s.default.createElement("i");
2return!("flexBasis"in e.style||"webkitFlexBasis"in e.style||"mozFlexBasis"in e.style||"msFlexBasis"in e.style||"msFlexOrder"in e.style)},t}(n.default);O.players={};var P=r.default.navigator;O.prototype.options_={techOrder:["html5","flash"],html5:{},flash:{},defaultVolume:0,inactivityTimeout:2e3,playbackRates:[],children:["mediaLoader","posterImage","textTrackDisplay","loadingSpinner","bigPlayButton","controlBar","errorDisplay","textTrackSettings"],language:P&&(P.languages&&P.languages[0]||P.userLanguage||P.language)||"en",languages:{},notSupportedMessage:"No compatible source was found for this media."},["ended","seeking","seekable","networkState","readyState"].forEach((function(e){O.prototype[e]=function(){return this.techGet_(e)}})),I.forEach((function(e){O.prototype["handleTech"+(0,d.default)(e)+"_"]=function(){return this.trigger(e)}})),n.default.registerComponent("Player",O),t.default=O},83869:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(72822))&&n.__esModule?n:{default:n};t.default=function(e,t){s.default.prototype[e]=t}},3902:function(e,t,i){"use strict";t.__esModule=!0;var n=r(i(82633)),s=r(i(93220));function r(e){return e&&e.__esModule?e:{default:e}}var a=function(e){function t(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.update(),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.update=function(){var e=this.createPopup();this.popup&&this.removeChild(this.popup),this.popup=e,this.addChild(e),this.items&&0===this.items.length?this.hide():this.items&&this.items.length>1&&this.show()},t.prototype.createPopup=function(){},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:this.buildCSSClass()})},t.prototype.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}(n.default);s.default.registerComponent("PopupButton",a),t.default=a},3785:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n},r=l(i(56144)),a=l(i(667)),o=l(i(31222));function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}var u=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.addItem=function(e){this.addChild(e),e.on("click",a.bind(this,(function(){this.unlockShowing()})))},t.prototype.createEl=function(){var t=this.options_.contentElType||"ul";this.contentEl_=r.createEl(t,{className:"vjs-menu-content"});var i=e.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});return i.appendChild(this.contentEl_),o.on(i,"click",(function(e){e.preventDefault(),e.stopImmediatePropagation()})),i},t}(s.default);s.default.registerComponent("Popup",u),t.default=u},43197:function(e,t,i){"use strict";t.__esModule=!0;var n=u(i(82633)),s=u(i(93220)),r=l(i(667)),a=l(i(56144)),o=l(i(88223));
2function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.update(),i.on("posterchange",r.bind(s,s.update)),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.dispose=function(){this.player().off("posterchange",this.update),e.prototype.dispose.call(this)},t.prototype.createEl=function(){var e=a.createEl("div",{className:"vjs-poster",tabIndex:-1});return o.BACKGROUND_SIZE_SUPPORTED||(this.fallbackImg_=a.createEl("img"),e.appendChild(this.fallbackImg_)),e},t.prototype.update=function(e){var t=this.player().poster();this.setSrc(t),t?this.show():this.hide()},t.prototype.setSrc=function(e){if(this.fallbackImg_)this.fallbackImg_.src=e;else{var t="";e&&(t='url("'+e+'")'),this.el_.style.backgroundImage=t}},t.prototype.handleClick=function(e){this.player_.controls()&&(this.player_.paused()?this.player_.play():this.player_.pause())},t}(n.default);s.default.registerComponent("PosterImage",c),t.default=c},59333:function(e,t,i){"use strict";t.__esModule=!0,t.hasLoaded=t.autoSetupTimeout=t.autoSetup=void 0;var n=l(i(56144)),s=l(i(31222)),r=o(i(67405)),a=o(i(9331));function o(e){return e&&e.__esModule?e:{default:e}}function l(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}var u=!1,c=void 0,h=function(){if(n.isReal()){var e=r.default.getElementsByTagName("video"),t=r.default.getElementsByTagName("audio"),i=[];if(e&&e.length>0)for(var s=0,a=e.length;s<a;s++)i.push(e[s]);if(t&&t.length>0)for(var o=0,l=t.length;o<l;o++)i.push(t[o]);if(i&&i.length>0)for(var h=0,p=i.length;h<p;h++){var f=i[h];if(!f||!f.getAttribute){d(1);break}void 0===f.player&&null!==f.getAttribute("data-setup")&&c(f)}else u||d(1)}};function d(e,t){t&&(c=t),a.default.setTimeout(h,e)}n.isReal()&&"complete"===r.default.readyState?u=!0:s.one(a.default,"load",(function(){u=!0})),t.autoSetup=h,t.autoSetupTimeout=d,t.hasLoaded=function(){return u}},84084:function(e,t,i){"use strict";t.__esModule=!0;var n,s=(n=i(93220))&&n.__esModule?n:{default:n},r=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144)),a=i(28645),o=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.bar=s.getChild(s.options_.barName),s.vertical(!!s.options_.vertical),s.on("mousedown",s.handleMouseDown),s.on("touchstart",s.handleMouseDown),s.on("focus",s.handleFocus),s.on("blur",s.handleBlur),s.on("click",s.handleClick),s.on(i,"controlsvisible",s.update),s.on(i,s.playerEvent,s.update),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return i.className=i.className+" vjs-slider",i=(0,a.assign)({tabIndex:0},i),n=(0,a.assign)({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100,tabIndex:0},n),e.prototype.createEl.call(this,t,i,n)},t.prototype.handleMouseDown=function(e){var t=this.bar.el_.ownerDocument;e.preventDefault(),r.blockTextSelection(),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.prototype.handleMouseMove=function(e){},t.prototype.handleMouseUp=function(){var e=this.bar.el_.ownerDocument;r.unblockTextSelection(),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.prototype.update=function(){if(this.el_){var e=this.getPercent(),t=this.bar;if(t){("number"!=typeof e||e!=e||e<0||e===1/0)&&(e=0);var i=(100*e).toFixed(2)+"%";this.vertical()?t.el().style.height=i:t.el().style.width=i}}},t.prototype.calculateDistance=function(e){var t=r.getPointerPosition(this.el_,e);return this.vertical()?t.y:t.x},t.prototype.handleFocus=function(){this.on(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleKeyPress=function(e){37===e.which||40===e.which?(e.preventDefault(),this.stepBack()):38!==e.which&&39!==e.which||(e.preventDefault(),this.stepForward())},t.prototype.handleBlur=function(){this.off(this.bar.el_.ownerDocument,"keydown",this.handleKeyPress)},t.prototype.handleClick=function(e){e.stopImmediatePropagation(),e.preventDefault()},t.prototype.vertical=function(e){return void 0===e?this.vertical_||!1:(this.vertical_=!!e,this.vertical_?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal"),this)},t}(s.default);s.default.registerComponent("Slider",o),t.default=o},79157:function(e,t){"use strict";t.__esModule=!0,t.default=function(e){return e.streamingFormats={"rtmp/mp4":"MP4","rtmp/flv":"FLV"},e.streamFromParts=function(e,t){return e+"&"+t},e.streamToParts=function(e){var t={connection:"",stream:""};if(!e)return t;var i=e.search(/&(?!\w+=)/),n=void 0;return-1!==i?n=i+1:0===(i=n=e.lastIndexOf("/")+1)&&(i=n=e.length),t.connection=e.substring(0,i),t.stream=e.substring(n,e.length),t},e.isStreamingType=function(t){return t in e.streamingFormats},e.RTMP_RE=/^rtmp[set]?:\/\//i,e.isStreamingSrc=function(t){return e.RTMP_RE.test(t)},e.rtmpSourceHandler={},e.rtmpSourceHandler.canPlayType=function(t){return e.isStreamingType(t)?"maybe":""},e.rtmpSourceHandler.canHandleSource=function(t,i){return e.rtmpSourceHandler.canPlayType(t.type)||(e.isStreamingSrc(t.src)?"maybe":"")},e.rtmpSourceHandler.handleSource=function(t,i,n){var s=e.streamToParts(t.src);i.setRtmpConnection(s.connection),i.setRtmpStream(s.stream)},e.registerSourceHandler(e.rtmpSourceHandler),e}},83914:function(e,t,i){"use strict";t.__esModule=!0;var n=d(i(28705)),s=h(i(56144)),r=h(i(20475)),a=i(94037),o=d(i(79157)),l=d(i(93220)),u=d(i(9331)),c=i(28645);
2function h(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function d(e){return e&&e.__esModule?e:{default:e}}var p=u.default.navigator,f=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return i.source&&s.ready((function(){this.setSource(i.source)}),!0),i.startTime&&s.ready((function(){this.load(),this.play(),this.currentTime(i.startTime)}),!0),u.default.videojs=u.default.videojs||{},u.default.videojs.Flash=u.default.videojs.Flash||{},u.default.videojs.Flash.onReady=t.onReady,u.default.videojs.Flash.onEvent=t.onEvent,u.default.videojs.Flash.onError=t.onError,s.on("seeked",(function(){this.lastSeekTarget_=void 0})),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createEl=function(){var e=this.options_;e.swf||(e.swf="//vjs.zencdn.net/swf/5.4.1/video-js.swf");var i=e.techId,n=(0,c.assign)({readyFunction:"videojs.Flash.onReady",eventProxyFunction:"videojs.Flash.onEvent",errorEventProxyFunction:"videojs.Flash.onError",autoplay:e.autoplay,preload:e.preload,loop:e.loop,muted:e.muted},e.flashVars),s=(0,c.assign)({wmode:"opaque",bgcolor:"#000000"},e.params),r=(0,c.assign)({id:i,name:i,class:"vjs-tech"},e.attributes);return this.el_=t.embed(e.swf,n,s,r),this.el_.tech=this,this.el_},t.prototype.play=function(){this.ended()&&this.setCurrentTime(0),this.el_.vjs_play()},t.prototype.pause=function(){this.el_.vjs_pause()},t.prototype.src=function(e){return void 0===e?this.currentSrc():this.setSrc(e)},t.prototype.setSrc=function(e){var t=this;e=r.getAbsoluteURL(e),this.el_.vjs_src(e),this.autoplay()&&this.setTimeout((function(){return t.play()}),0)},t.prototype.seeking=function(){return void 0!==this.lastSeekTarget_},t.prototype.setCurrentTime=function(t){var i=this.seekable();i.length&&(t=(t=t>i.start(0)?t:i.start(0))<i.end(i.length-1)?t:i.end(i.length-1),this.lastSeekTarget_=t,this.trigger("seeking"),this.el_.vjs_setProperty("currentTime",t),e.prototype.setCurrentTime.call(this))},t.prototype.currentTime=function(){return this.seeking()?this.lastSeekTarget_||0:this.el_.vjs_getProperty("currentTime")},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.vjs_getProperty("currentSrc")},t.prototype.duration=function(){if(0===this.readyState())return NaN;var e=this.el_.vjs_getProperty("duration");return e>=0?e:1/0},t.prototype.load=function(){this.el_.vjs_load()},t.prototype.poster=function(){this.el_.vjs_getProperty("poster")},t.prototype.setPoster=function(){},t.prototype.seekable=function(){var e=this.duration();return 0===e?(0,a.createTimeRange)():(0,a.createTimeRange)(0,e)},t.prototype.buffered=function(){var e=this.el_.vjs_getProperty("buffered");return 0===e.length?(0,a.createTimeRange)():(0,a.createTimeRange)(e[0][0],e[0][1])},t.prototype.supportsFullScreen=function(){return!1},t.prototype.enterFullScreen=function(){return!1},t.prototype.getVideoPlaybackQuality=function(){var e=this.el_.vjs_getProperty("getVideoPlaybackQuality");return u.default.performance&&"function"==typeof u.default.performance.now?e.creationTime=u.default.performance.now():u.default.performance&&u.default.performance.timing&&"number"==typeof u.default.performance.timing.navigationStart&&(e.creationTime=u.default.Date.now()-u.default.performance.timing.navigationStart),e},t}(n.default),g=f.prototype,m="rtmpConnection,rtmpStream,preload,defaultPlaybackRate,playbackRate,autoplay,loop,mediaGroup,controller,controls,volume,muted,defaultMuted".split(","),y="networkState,readyState,initialTime,startOffsetTime,paused,ended,videoWidth,videoHeight".split(",");function _(e){var t=e.charAt(0).toUpperCase()+e.slice(1);g["set"+t]=function(t){return this.el_.vjs_setProperty(e,t)}}function v(e){g[e]=function(){return this.el_.vjs_getProperty(e)}}for(var b=0;b<m.length;b++)v(m[b]),_(m[b]);for(var T=0;T<y.length;T++)v(y[T]);f.isSupported=function(){return f.version()[0]>=10},n.default.withSourceHandlers(f),f.nativeSourceHandler={},f.nativeSourceHandler.canPlayType=function(e){return e in f.formats?"maybe":""},f.nativeSourceHandler.canHandleSource=function(e,t){var i,n,s=void 0;return e.type?s=e.type.replace(/;.*/,"").toLowerCase():(i=e.src,s=(n=r.getFileExtension(i))?"video/"+n:""),f.nativeSourceHandler.canPlayType(s)},f.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},f.nativeSourceHandler.dispose=function(){},f.registerSourceHandler(f.nativeSourceHandler),f.formats={"video/flv":"FLV","video/x-flv":"FLV","video/mp4":"MP4","video/m4v":"MP4"},f.onReady=function(e){var t=s.getEl(e),i=t&&t.tech;i&&i.el()&&f.checkReady(i)},f.checkReady=function(e){e.el()&&(e.el().vjs_getProperty?e.triggerReady():this.setTimeout((function(){f.checkReady(e)}),50))},f.onEvent=function(e,t){var i=s.getEl(e).tech,n=Array.prototype.slice.call(arguments,2);i.setTimeout((function(){i.trigger(t,n)}),1)},f.onError=function(e,t){var i=s.getEl(e).tech;if("srcnotfound"===t)return i.error(4);i.error("FLASH: "+t)},f.version=function(){var e="0,0,0";try{e=new u.default.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch(t){try{p.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(e=(p.plugins["Shockwave Flash 2.0"]||p.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch(e){}}return e.split(",")},f.embed=function(e,t,i,n){var r=f.getEmbedCode(e,t,i,n);return s.createEl("div",{innerHTML:r}).childNodes[0]},f.getEmbedCode=function(e,t,i,n){var s="",r="",a="";return t&&Object.getOwnPropertyNames(t).forEach((function(e){s+=e+"="+t[e]+"&amp;"})),i=(0,c.assign)({movie:e,flashvars:s,allowScriptAccess:"always",allowNetworking:"all"}
2,i),Object.getOwnPropertyNames(i).forEach((function(e){r+='<param name="'+e+'" value="'+i[e]+'" />'})),n=(0,c.assign)({data:e,width:"100%",height:"100%"},n),Object.getOwnPropertyNames(n).forEach((function(e){a+=e+'="'+n[e]+'" '})),'<object type="application/x-shockwave-flash" '+a+">"+r+"</object>"},(0,o.default)(f),l.default.registerComponent("Flash",f),n.default.registerTech("Flash",f),t.default=f},12566:function(e,t,i){"use strict";t.__esModule=!0;var n,s=((n=["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."]).raw=["Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\n            This may prevent text tracks from loading."],n),r=v(i(28705)),a=v(i(93220)),o=_(i(56144)),l=_(i(20475)),u=_(i(667)),c=v(i(33128)),h=v(i(7753)),d=_(i(88223)),p=v(i(67405)),f=v(i(9331)),g=i(28645),m=v(i(91908)),y=v(i(6584));function _(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function v(e){return e&&e.__esModule?e:{default:e}}var b=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n)),a=i.source,o=!1;if(a&&(r.el_.currentSrc!==a.src||i.tag&&3===i.tag.initNetworkState_)?r.setSource(a):r.handleLateInit_(r.el_),r.el_.hasChildNodes()){for(var p=r.el_.childNodes,f=p.length,g=[];f--;){var m=p[f];"track"===m.nodeName.toLowerCase()&&(r.featuresNativeTextTracks?(r.remoteTextTrackEls().addTrackElement_(m),r.remoteTextTracks().addTrack_(m.track),o||r.el_.hasAttribute("crossorigin")||!l.isCrossOrigin(m.src)||(o=!0)):g.push(m))}for(var _=0;_<g.length;_++)r.el_.removeChild(g[_])}return["audio","video"].forEach((function(e){var t=r.el()[e+"Tracks"],i=r[e+"Tracks"](),n=(0,y.default)(e);r["featuresNative"+n+"Tracks"]&&t&&t.addEventListener&&(r["handle"+n+"TrackChange_"]=function(e){i.trigger({type:"change",target:i,currentTarget:i,srcElement:i})},r["handle"+n+"TrackAdd_"]=function(e){return i.addTrack(e.track)},r["handle"+n+"TrackRemove_"]=function(e){return i.removeTrack(e.track)},t.addEventListener("change",r["handle"+n+"TrackChange_"]),t.addEventListener("addtrack",r["handle"+n+"TrackAdd_"]),t.addEventListener("removetrack",r["handle"+n+"TrackRemove_"]),r["removeOld"+n+"Tracks_"]=function(e){return r.removeOldTracks_(i,t)},r.on("loadstart",r["removeOld"+n+"Tracks_"]))})),r.featuresNativeTextTracks&&(o&&c.default.warn((0,h.default)(s)),r.handleTextTrackChange_=u.bind(r,r.handleTextTrackChange),r.handleTextTrackAdd_=u.bind(r,r.handleTextTrackAdd),r.handleTextTrackRemove_=u.bind(r,r.handleTextTrackRemove),r.proxyNativeTextTracks_()),r.restoreMetadataTracksInIOSNativePlayer_(),(d.TOUCH_ENABLED||d.IS_IPHONE||d.IS_NATIVE_ANDROID)&&!0===i.nativeControlsForTouch&&r.setControls(!0),r.proxyWebkitFullscreen_(),r.triggerReady(),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.dispose=function(){var i=this;["audio","video","text"].forEach((function(e){var t=(0,y.default)(e),n=i.el_[e+"Tracks"];n&&n.removeEventListener&&(n.removeEventListener("change",i["handle"+t+"TrackChange_"]),n.removeEventListener("addtrack",i["handle"+t+"TrackAdd_"]),n.removeEventListener("removetrack",i["handle"+t+"TrackRemove_"])),n&&i.off("loadstart",i["removeOld"+t+"Tracks_"])})),t.disposeMediaElement(this.el_),e.prototype.dispose.call(this)},t.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var e=this.textTracks(),t=void 0,i=function(){t=[];for(var i=0;i<e.length;i++){var n=e[i];"metadata"===n.kind&&t.push({track:n,storedMode:n.mode})}};
2i(),e.addEventListener("change",i);var n=function i(){for(var n=0;n<t.length;n++){var s=t[n];"disabled"===s.track.mode&&s.track.mode!==s.storedMode&&(s.track.mode=s.storedMode)}e.removeEventListener("change",i)};this.on("webkitbeginfullscreen",(function(){e.removeEventListener("change",i),e.removeEventListener("change",n),e.addEventListener("change",n)})),this.on("webkitendfullscreen",(function(){e.removeEventListener("change",i),e.addEventListener("change",i),e.removeEventListener("change",n)}))},t.prototype.createEl=function(){var e=this.options_.tag;if(!e||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(e){var i=e.cloneNode(!0);e.parentNode&&e.parentNode.insertBefore(i,e),t.disposeMediaElement(e),e=i}else{e=p.default.createElement("video");var n=this.options_.tag&&o.getElAttributes(this.options_.tag),s=(0,m.default)({},n);d.TOUCH_ENABLED&&!0===this.options_.nativeControlsForTouch||delete s.controls,o.setElAttributes(e,(0,g.assign)(s,{id:this.options_.techId,class:"vjs-tech"}))}e.playerId=this.options_.playerId}void 0!==this.options_.preload&&o.setAttribute(e,"preload",this.options_.preload);for(var r=["loop","muted","playsinline","autoplay"],a=r.length-1;a>=0;a--){var l=r[a],u=this.options_[l];void 0!==u&&(u?o.setAttribute(e,l,l):o.removeAttribute(e,l),e[l]=u)}return e},t.prototype.handleLateInit_=function(e){if(0!==e.networkState&&3!==e.networkState){if(0===e.readyState){var t=!1,i=function(){t=!0};this.on("loadstart",i);var n=function(){t||this.trigger("loadstart")};return this.on("loadedmetadata",n),void this.ready((function(){this.off("loadstart",i),this.off("loadedmetadata",n),t||this.trigger("loadstart")}))}var s=["loadstart"];s.push("loadedmetadata"),e.readyState>=2&&s.push("loadeddata"),e.readyState>=3&&s.push("canplay"),e.readyState>=4&&s.push("canplaythrough"),this.ready((function(){s.forEach((function(e){this.trigger(e)}),this)}))}},t.prototype.proxyNativeTextTracks_=function(){var e=this.el().textTracks;if(e){for(var t=0;t<e.length;t++)this.textTracks().addTrack_(e[t]);e.addEventListener&&(e.addEventListener("change",this.handleTextTrackChange_),e.addEventListener("addtrack",this.handleTextTrackAdd_),e.addEventListener("removetrack",this.handleTextTrackRemove_)),this.on("loadstart",this.removeOldTextTracks_)}},t.prototype.handleTextTrackChange=function(e){var t=this.textTracks();this.textTracks().trigger({type:"change",target:t,currentTarget:t,srcElement:t})},t.prototype.handleTextTrackAdd=function(e){this.textTracks().addTrack_(e.track)},t.prototype.handleTextTrackRemove=function(e){this.textTracks().removeTrack_(e.track)},t.prototype.removeOldTracks_=function(e,t){var i=[];if(t){for(var n=0;n<e.length;n++){for(var s=e[n],r=!1,a=0;a<t.length;a++)if(t[a]===s){r=!0;break}r||i.push(s)}for(var o=0;o<i.length;o++){var l=i[o];e.removeTrack_(l)}}},t.prototype.removeOldTextTracks_=function(e){var t=this.textTracks(),i=this.el().textTracks;this.removeOldTracks_(t,i)},t.prototype.play=function(){var e=this.el_.play();void 0!==e&&"function"==typeof e.then&&e.then(null,(function(e){}))},t.prototype.setCurrentTime=function(e){try{this.el_.currentTime=e}catch(e){(0,c.default)(e,"Video is not ready. (Video.js)")}},t.prototype.duration=function(){var e=this;return this.el_.duration===1/0&&d.IS_ANDROID&&d.IS_CHROME&&0===this.el_.currentTime?(this.on("timeupdate",(function t(){e.el_.currentTime>0&&(e.el_.duration===1/0&&e.trigger("durationchange"),e.off("timeupdate",t))})),NaN):this.el_.duration||NaN},t.prototype.width=function(){return this.el_.offsetWidth},t.prototype.height=function(){return this.el_.offsetHeight},t.prototype.proxyWebkitFullscreen_=function(){var e=this;if("webkitDisplayingFullscreen"in this.el_){var t=function(){this.trigger("fullscreenchange",{isFullscreen:!1})},i=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",t),this.trigger("fullscreenchange",{isFullscreen:!0}))};this.on("webkitbeginfullscreen",i),this.on("dispose",(function(){e.off("webkitbeginfullscreen",i),e.off("webkitendfullscreen",t)}))}},t.prototype.supportsFullScreen=function(){if("function"==typeof this.el_.webkitEnterFullScreen){var e=f.default.navigator&&f.default.navigator.userAgent||"";if(/Android/.test(e)||!/Chrome|Mac OS X 10.5/.test(e))return!0}return!1},t.prototype.enterFullScreen=function(){var e=this.el_;e.paused&&e.networkState<=e.HAVE_METADATA?(this.el_.play(),this.setTimeout((function(){e.pause(),e.webkitEnterFullScreen()}),0)):e.webkitEnterFullScreen()},t.prototype.exitFullScreen=function(){this.el_.webkitExitFullScreen()},t.prototype.src=function(e){if(void 0===e)return this.el_.src;this.setSrc(e)},t.prototype.reset=function(){t.resetMediaElement(this.el_)},t.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc},t.prototype.setControls=function(e){this.el_.controls=!!e},t.prototype.addTextTrack=function(t,i,n){return this.featuresNativeTextTracks?this.el_.addTextTrack(t,i,n):e.prototype.addTextTrack.call(this,t,i,n)},t.prototype.createRemoteTextTrack=function(t){if(!this.featuresNativeTextTracks)return e.prototype.createRemoteTextTrack.call(this,t);var i=p.default.createElement("track");return t.kind&&(i.kind=t.kind),t.label&&(i.label=t.label),(t.language||t.srclang)&&(i.srclang=t.language||t.srclang),t.default&&(i.default=t.default),t.id&&(i.id=t.id),t.src&&(i.src=t.src),i},t.prototype.addRemoteTextTrack=function(t,i){var n=e.prototype.addRemoteTextTrack.call(this,t,i);return this.featuresNativeTextTracks&&this.el().appendChild(n),n},t.prototype.removeRemoteTextTrack=function(t){if(e.prototype.removeRemoteTextTrack.call(this,t),this.featuresNativeTextTracks)for(var i=this.$$("track"),n=i.length;n--;)t!==i[n]&&t!==i[n].track||this.el().removeChild(i[n])},t.prototype.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),f.default.performance&&"function"==typeof f.default.performance.now?e.creationTime=f.default.performance.now():f.default.performance&&f.default.performance.timing&&"number"==typeof f.default.performance.timing.navigationStart&&(e.creationTime=f.default.Date.now()-f.default.performance.timing.navigationStart),e},t}(r.default);
2if(o.isReal()){b.TEST_VID=p.default.createElement("video");var T=p.default.createElement("track");T.kind="captions",T.srclang="en",T.label="English",b.TEST_VID.appendChild(T)}b.isSupported=function(){try{b.TEST_VID.volume=.5}catch(e){return!1}return!(!b.TEST_VID||!b.TEST_VID.canPlayType)},b.canControlVolume=function(){try{var e=b.TEST_VID.volume;return b.TEST_VID.volume=e/2+.1,e!==b.TEST_VID.volume}catch(e){return!1}},b.canControlPlaybackRate=function(){if(d.IS_ANDROID&&d.IS_CHROME&&d.CHROME_VERSION<58)return!1;try{var e=b.TEST_VID.playbackRate;return b.TEST_VID.playbackRate=e/2+.1,e!==b.TEST_VID.playbackRate}catch(e){return!1}},b.supportsNativeTextTracks=function(){return d.IS_ANY_SAFARI},b.supportsNativeVideoTracks=function(){return!(!b.TEST_VID||!b.TEST_VID.videoTracks)},b.supportsNativeAudioTracks=function(){return!(!b.TEST_VID||!b.TEST_VID.audioTracks)},b.Events=["loadstart","suspend","abort","error","emptied","stalled","loadedmetadata","loadeddata","canplay","canplaythrough","playing","waiting","seeking","seeked","ended","durationchange","timeupdate","progress","play","pause","ratechange","volumechange"],b.prototype.featuresVolumeControl=b.canControlVolume(),b.prototype.featuresPlaybackRate=b.canControlPlaybackRate(),b.prototype.movingMediaElementInDOM=!d.IS_IOS,b.prototype.featuresFullscreenResize=!0,b.prototype.featuresProgressEvents=!0,b.prototype.featuresTimeupdateEvents=!0,b.prototype.featuresNativeTextTracks=b.supportsNativeTextTracks(),b.prototype.featuresNativeVideoTracks=b.supportsNativeVideoTracks(),b.prototype.featuresNativeAudioTracks=b.supportsNativeAudioTracks();var S=b.TEST_VID&&b.TEST_VID.constructor.prototype.canPlayType,k=/^application\/(?:x-|vnd\.apple\.)mpegurl/i,w=/^video\/mp4/i;b.patchCanPlayType=function(){d.ANDROID_VERSION>=4&&!d.IS_FIREFOX?b.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&k.test(e)?"maybe":S.call(this,e)}:d.IS_OLD_ANDROID&&(b.TEST_VID.constructor.prototype.canPlayType=function(e){return e&&w.test(e)?"maybe":S.call(this,e)})},b.unpatchCanPlayType=function(){var e=b.TEST_VID.constructor.prototype.canPlayType;return b.TEST_VID.constructor.prototype.canPlayType=S,e},b.patchCanPlayType(),b.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(e){}}()}},b.resetMediaElement=function(e){if(e){for(var t=e.querySelectorAll("source"),i=t.length;i--;)e.removeChild(t[i]);e.removeAttribute("src"),"function"==typeof e.load&&function(){try{e.load()}catch(e){}}()}},["muted","defaultMuted","autoplay","controls","loop","playsinline"].forEach((function(e){b.prototype[e]=function(){return this.el_[e]||this.el_.hasAttribute(e)}})),["muted","defaultMuted","autoplay","loop","playsinline"].forEach((function(e){b.prototype["set"+(0,y.default)(e)]=function(t){this.el_[e]=t,t?this.el_.setAttribute(e,e):this.el_.removeAttribute(e)}})),["paused","currentTime","buffered","volume","poster","preload","error","seeking","seekable","ended","playbackRate","played","networkState","readyState","videoWidth","videoHeight"].forEach((function(e){b.prototype[e]=function(){return this.el_[e]}})),["volume","src","poster","preload","playbackRate"].forEach((function(e){b.prototype["set"+(0,y.default)(e)]=function(t){this.el_[e]=t}})),["pause","load"].forEach((function(e){b.prototype[e]=function(){return this.el_[e]()}})),r.default.withSourceHandlers(b),b.nativeSourceHandler={},b.nativeSourceHandler.canPlayType=function(e){try{return b.TEST_VID.canPlayType(e)}catch(e){return""}},b.nativeSourceHandler.canHandleSource=function(e,t){if(e.type)return b.nativeSourceHandler.canPlayType(e.type);if(e.src){var i=l.getFileExtension(e.src);return b.nativeSourceHandler.canPlayType("video/"+i)}return""},b.nativeSourceHandler.handleSource=function(e,t,i){t.setSrc(e.src)},b.nativeSourceHandler.dispose=function(){},b.registerSourceHandler(b.nativeSourceHandler),a.default.registerComponent("Html5",b),r.default.registerTech("Html5",b),t.default=b},60690:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(93220)),s=a(i(28705)),r=a(i(6584));
2function a(e){return e&&e.__esModule?e:{default:e}}var o=function(e){function t(i,a,o){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var l=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,a,o));if(a.playerOptions.sources&&0!==a.playerOptions.sources.length)i.src(a.playerOptions.sources);else for(var u=0,c=a.playerOptions.techOrder;u<c.length;u++){var h=(0,r.default)(c[u]),d=s.default.getTech(h);if(h||(d=n.default.getComponent(h)),d&&d.isSupported()){i.loadTech_(h);break}}return l}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t}(n.default);n.default.registerComponent("MediaLoader",o),t.default=o},28705:function(e,t,i){"use strict";t.__esModule=!0;var n=v(i(93220)),s=v(i(13175)),r=v(i(56167)),a=v(i(91908)),o=v(i(76353)),l=v(i(18746)),u=v(i(44381)),c=v(i(75903)),h=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667)),d=v(i(33128)),p=i(94037),f=i(96604),g=v(i(64055)),m=v(i(9331)),y=v(i(67405)),_=i(28645);function v(e){return e&&e.__esModule?e:{default:e}}var b=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),i.reportTouchActivity=!1;var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,null,i,n));return s.hasStarted_=!1,s.on("playing",(function(){this.hasStarted_=!0})),s.on("loadstart",(function(){this.hasStarted_=!1})),s.textTracks_=i.textTracks,s.videoTracks_=i.videoTracks,s.audioTracks_=i.audioTracks,s.featuresProgressEvents||s.manualProgressOn(),s.featuresTimeupdateEvents||s.manualTimeUpdatesOn(),["Text","Audio","Video"].forEach((function(e){!1===i["native"+e+"Tracks"]&&(s["featuresNative"+e+"Tracks"]=!1)})),!1===i.nativeCaptions&&(s.featuresNativeTextTracks=!1),s.featuresNativeTextTracks||s.emulateTextTracks(),s.autoRemoteTextTracks_=new l.default,s.initTextTrackListeners(),s.initTrackListeners(),i.nativeControlsForTouch||s.emitTapEvents(),s.constructor&&(s.name_=s.constructor.name||"Unknown Tech"),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange),this.manualProgress=!0,this.one("ready",this.trackProgress)},t.prototype.manualProgressOff=function(){this.manualProgress=!1,this.stopTrackingProgress(),this.off("durationchange",this.onDurationChange)},t.prototype.trackProgress=function(e){this.stopTrackingProgress(),this.progressInterval=this.setInterval(h.bind(this,(function(){var e=this.bufferedPercent();this.bufferedPercent_!==e&&this.trigger("progress"),this.bufferedPercent_=e,1===e&&this.stopTrackingProgress()})),500)},t.prototype.onDurationChange=function(e){this.duration_=this.duration()},t.prototype.buffered=function(){return(0,p.createTimeRange)(0,0)},t.prototype.bufferedPercent=function(){return(0,f.bufferedPercent)(this.buffered(),this.duration_)},t.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)},t.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0,this.on("play",this.trackCurrentTime),this.on("pause",this.stopTrackingCurrentTime)},t.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1,this.stopTrackingCurrentTime(),this.off("play",this.trackCurrentTime),this.off("pause",this.stopTrackingCurrentTime)},t.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime(),this.currentTimeInterval=this.setInterval((function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})}),250)},t.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval),this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.dispose=function(){this.clearTracks(["audio","video","text"]),this.manualProgress&&this.manualProgressOff(),this.manualTimeUpdates&&this.manualTimeUpdatesOff(),e.prototype.dispose.call(this)},t.prototype.clearTracks=function(e){var t=this;
2(e=[].concat(e)).forEach((function(e){for(var i=t[e+"Tracks"]()||[],n=i.length;n--;){var s=i[n];"text"===e&&t.removeRemoteTextTrack(s),i.removeTrack_(s)}}))},t.prototype.cleanupAutoTextTracks=function(){for(var e=this.autoRemoteTextTracks_||[],t=e.length;t--;){var i=e[t];this.removeRemoteTextTrack(i)}},t.prototype.reset=function(){},t.prototype.error=function(e){return void 0!==e&&(this.error_=new g.default(e),this.trigger("error")),this.error_},t.prototype.played=function(){return this.hasStarted_?(0,p.createTimeRange)(0,0):(0,p.createTimeRange)()},t.prototype.setCurrentTime=function(){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},t.prototype.initTextTrackListeners=function(){var e=h.bind(this,(function(){this.trigger("texttrackchange")})),t=this.textTracks();t&&(t.addEventListener("removetrack",e),t.addEventListener("addtrack",e),this.on("dispose",h.bind(this,(function(){t.removeEventListener("removetrack",e),t.removeEventListener("addtrack",e)}))))},t.prototype.initTrackListeners=function(){var e=this;["video","audio"].forEach((function(t){var i=function(){e.trigger(t+"trackchange")},n=e[t+"Tracks"]();n.addEventListener("removetrack",i),n.addEventListener("addtrack",i),e.on("dispose",(function(){n.removeEventListener("removetrack",i),n.removeEventListener("addtrack",i)}))}))},t.prototype.addWebVttScript_=function(){var e=this;if(!m.default.WebVTT)if(y.default.body.contains(this.el())){var t=i(49343);if(!this.options_["vtt.js"]&&(0,_.isPlain)(t)&&Object.keys(t).length>0)return void this.trigger("vttjsloaded");var n=y.default.createElement("script");n.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.12.4/vtt.min.js",n.onload=function(){e.trigger("vttjsloaded")},n.onerror=function(){e.trigger("vttjserror")},this.on("dispose",(function(){n.onload=null,n.onerror=null})),m.default.WebVTT=!0,this.el().parentNode.appendChild(n)}else this.ready(this.addWebVttScript_)},t.prototype.emulateTextTracks=function(){var e=this,t=this.textTracks();if(t){var i=this.remoteTextTracks(),n=function(e){return t.addTrack_(e.track)},s=function(e){return t.removeTrack_(e.track)};i.on("addtrack",n),i.on("removetrack",s),this.addWebVttScript_();var r=function(){return e.trigger("texttrackchange")},a=function(){r();for(var e=0;e<t.length;e++){var i=t[e];i.removeEventListener("cuechange",r),"showing"===i.mode&&i.addEventListener("cuechange",r)}};a(),t.addEventListener("change",a),t.addEventListener("addtrack",a),t.addEventListener("removetrack",a),this.on("dispose",(function(){i.off("addtrack",n),i.off("removetrack",s),t.removeEventListener("change",a),t.removeEventListener("addtrack",a),t.removeEventListener("removetrack",a);for(var e=0;e<t.length;e++)t[e].removeEventListener("cuechange",r)}))}},t.prototype.videoTracks=function(){return this.videoTracks_=this.videoTracks_||new u.default,this.videoTracks_},t.prototype.audioTracks=function(){return this.audioTracks_=this.audioTracks_||new c.default,this.audioTracks_},t.prototype.textTracks=function(){return this.textTracks_=this.textTracks_||new l.default,this.textTracks_},t.prototype.remoteTextTracks=function(){return this.remoteTextTracks_=this.remoteTextTracks_||new l.default,this.remoteTextTracks_},t.prototype.remoteTextTrackEls=function(){return this.remoteTextTrackEls_=this.remoteTextTrackEls_||new r.default,this.remoteTextTrackEls_},t.prototype.addTextTrack=function(e,t,i){if(!e)throw new Error("TextTrack kind is required but was not provided");return function(e,t,i,n){var s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=e.textTracks();s.kind=t,i&&(s.label=i),n&&(s.language=n),s.tech=e;var a=new o.default(s);return r.addTrack_(a),a}(this,e,t,i)},t.prototype.createRemoteTextTrack=function(e){var t=(0,a.default)(e,{tech:this});return new s.default(t)},t.prototype.addRemoteTextTrack=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments[1],i=this.createRemoteTextTrack(e);return!0!==t&&!1!==t&&(d.default.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_(i),this.remoteTextTracks().addTrack_(i.track),!0!==t&&this.autoRemoteTextTracks_.addTrack_(i.track),i},t.prototype.removeRemoteTextTrack=function(e){var t=this.remoteTextTrackEls().getTrackElementByTrack_(e);this.remoteTextTrackEls().removeTrackElement_(t),this.remoteTextTracks().removeTrack_(e),this.autoRemoteTextTracks_.removeTrack_(e)},t.prototype.getVideoPlaybackQuality=function(){return{}},t.prototype.setPoster=function(){},t.prototype.playsinline=function(){},t.prototype.setPlaysinline=function(){},t.prototype.canPlayType=function(){return""},t.isTech=function(e){return e.prototype instanceof t||e instanceof t||e===t},t.registerTech=function(e,i){if(t.techs_||(t.techs_={}),!t.isTech(i))throw new Error("Tech "+e+" must be a Tech");return t.techs_[e]=i,i},t.getTech=function(e){return t.techs_&&t.techs_[e]?t.techs_[e]:m.default&&m.default.videojs&&m.default.videojs[e]?(d.default.warn("The "+e+" tech w
2as added to the videojs object when it should be registered using videojs.registerTech(name, tech)"),m.default.videojs[e]):void 0},t}(n.default);b.prototype.textTracks_,b.prototype.audioTracks_,b.prototype.videoTracks_,b.prototype.featuresVolumeControl=!0,b.prototype.featuresFullscreenResize=!1,b.prototype.featuresPlaybackRate=!1,b.prototype.featuresProgressEvents=!1,b.prototype.featuresTimeupdateEvents=!1,b.prototype.featuresNativeTextTracks=!1,b.withSourceHandlers=function(e){e.registerSourceHandler=function(t,i){var n=e.sourceHandlers;n||(n=e.sourceHandlers=[]),void 0===i&&(i=n.length),n.splice(i,0,t)},e.canPlayType=function(t){for(var i=e.sourceHandlers||[],n=void 0,s=0;s<i.length;s++)if(n=i[s].canPlayType(t))return n;return""},e.selectSourceHandler=function(t,i){for(var n=e.sourceHandlers||[],s=0;s<n.length;s++)if(n[s].canHandleSource(t,i))return n[s];return null},e.canPlaySource=function(t,i){var n=e.selectSourceHandler(t,i);return n?n.canHandleSource(t,i):""},["seekable","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 i=e.selectSourceHandler(t,this.options_);return i||(e.nativeSourceHandler?i=e.nativeSourceHandler:d.default.error("No source hander found for the current source.")),this.disposeSourceHandler(),this.off("dispose",this.disposeSourceHandler),i!==e.nativeSourceHandler&&(this.currentSource_=t,this.off(this.el_,"loadstart",e.prototype.firstLoadStartListener_),this.off(this.el_,"loadstart",e.prototype.successiveLoadStartListener_),this.one(this.el_,"loadstart",e.prototype.firstLoadStartListener_)),this.sourceHandler_=i.handleSource(t,this,this.options_),this.on("dispose",this.disposeSourceHandler),this},e.prototype.firstLoadStartListener_=function(){this.one(this.el_,"loadstart",e.prototype.successiveLoadStartListener_)},e.prototype.successiveLoadStartListener_=function(){this.disposeSourceHandler(),this.one(this.el_,"loadstart",e.prototype.successiveLoadStartListener_)},e.prototype.disposeSourceHandler=function(){this.currentSource_&&(this.clearTracks(["audio","video"]),this.currentSource_=null),this.cleanupAutoTextTracks(),this.sourceHandler_&&(this.off(this.el_,"loadstart",e.prototype.firstLoadStartListener_),this.off(this.el_,"loadstart",e.prototype.successiveLoadStartListener_),this.sourceHandler_.dispose&&this.sourceHandler_.dispose(),this.sourceHandler_=null)}},n.default.registerComponent("Tech",b),n.default.registerComponent("MediaTechController",b),b.registerTech("Tech",b),t.default=b},75903:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(83994)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(88223)),r=a(i(67405));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e,t){for(var i=0;i<e.length;i++)t.id!==e[i].id&&(e[i].enabled=!1)},u=function(e){function t(){var i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var u=void 0,c=a.length-1;c>=0;c--)if(a[c].enabled){l(a,a[c]);break}if(s.IS_IE8){for(var h in u=r.default.createElement("custom"),n.default.prototype)"constructor"!==h&&(u[h]=n.default.prototype[h]);for(var d in t.prototype)"constructor"!==d&&(u[d]=t.prototype[d])}return(u=i=o(this,e.call(this,a,u))).changing_=!1,o(i,u)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.addTrack_=function(t){var i=this;t.enabled&&l(this,t),e.prototype.addTrack_.call(this,t),t.addEventListener&&t.addEventListener("enabledchange",(function(){i.changing_||(i.changing_=!0,l(i,t),i.changing_=!1,i.trigger("change"))}))},t.prototype.addTrack=function(e){this.addTrack_(e)},t.prototype.removeTrack=function(t){e.prototype.removeTrack_.call(this,t)},t}(n.default);t.default=u},28417:function(e,t,i){"use strict";t.__esModule=!0;var n=i(85531),s=o(i(34973)),r=o(i(91908)),a=function(e){if(e&&e.__esMo
2dule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(88223));function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){var i,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=(0,r.default)(s,{kind:n.AudioTrackKind[s.kind]||""}),u=i=l(this,e.call(this,o)),c=!1;if(a.IS_IE8)for(var h in t.prototype)"constructor"!==h&&(u[h]=t.prototype[h]);return Object.defineProperty(u,"enabled",{get:function(){return c},set:function(e){"boolean"==typeof e&&e!==c&&(c=e,this.trigger("enabledchange"))}}),o.enabled&&(u.enabled=o.enabled),u.loaded_=!0,l(i,u)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t}(s.default);t.default=u},56167:function(e,t,i){"use strict";t.__esModule=!0;var n,s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(88223)),r=(n=i(67405))&&n.__esModule?n:{default:n},a=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i=this;if(s.IS_IE8)for(var n in i=r.default.createElement("custom"),e.prototype)"constructor"!==n&&(i[n]=e.prototype[n]);i.trackElements_=[],Object.defineProperty(i,"length",{get:function(){return this.trackElements_.length}});for(var a=0,o=t.length;a<o;a++)i.addTrackElement_(t[a]);if(s.IS_IE8)return i}return e.prototype.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.prototype.getTrackElementByTrack_=function(e){for(var t=void 0,i=0,n=this.trackElements_.length;i<n;i++)if(e===this.trackElements_[i].track){t=this.trackElements_[i];break}return t},e.prototype.removeTrackElement_=function(e){for(var t=0,i=this.trackElements_.length;t<i;t++)if(e===this.trackElements_[t]){this.trackElements_.splice(t,1);break}},e}();t.default=a},13175:function(e,t,i){"use strict";t.__esModule=!0;var n=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(88223)),s=o(i(67405)),r=o(i(43744)),a=o(i(76353));function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=l(this,e.call(this)),o=void 0,u=r;if(n.IS_IE8)for(var c in u=s.default.createElement("custom"),t.prototype)"constructor"!==c&&(u[c]=t.prototype[c]);var h=new a.default(i);return u.kind=h.kind,u.src=h.src,u.srclang=h.language,u.label=h.label,u.default=h.default,Object.defineProperty(u,"readyState",{get:function(){return o}}),Object.defineProperty(u,"track",{get:function(){return h}}),o=0,h.addEventListener("loadeddata",(function(){o=2,u.trigger({type:"load",target:u})})),n.IS_IE8?l(r,u):r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t}(r.default);u.prototype.allowedEvents_={load:"load"},u.NONE=0,u.LOADING=1,u.LOADED=2,u.ERROR=3,t.default=u},50481:function(e,t,i){"use strict";t.__esModule=!0;
2var n,s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(88223)),r=(n=i(67405))&&n.__esModule?n:{default:n},a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i=this;if(s.IS_IE8)for(var n in i=r.default.createElement("custom"),e.prototype)"constructor"!==n&&(i[n]=e.prototype[n]);if(e.prototype.setCues_.call(i,t),Object.defineProperty(i,"length",{get:function(){return this.length_}}),s.IS_IE8)return i}return e.prototype.setCues_=function(e){var t=this.length||0,i=0,n=e.length;this.cues_=e,this.length_=e.length;var s=function(e){""+e in this||Object.defineProperty(this,""+e,{get:function(){return this.cues_[e]}})};if(t<n)for(i=t;i<n;i++)s.call(this,i)},e.prototype.getCueById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var s=this[i];if(s.id===e){t=s;break}}return t},e}();t.default=a},89312:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(93220)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(667)),r=a(i(9331));function a(e){return e&&e.__esModule?e:{default:e}}var o="#222",l={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 u(e,t){return"rgba("+parseInt(e[1]+e[1],16)+","+parseInt(e[2]+e[2],16)+","+parseInt(e[3]+e[3],16)+","+t+")"}function c(e,t,i){try{e.style[t]=i}catch(e){return}}var h=function(e){function t(i,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n,r));return i.on("loadstart",s.bind(a,a.toggleDisplay)),i.on("texttrackchange",s.bind(a,a.updateDisplay)),i.ready(s.bind(a,(function(){if(i.tech_&&i.tech_.featuresNativeTextTracks)this.hide();else{i.on("fullscreenchange",s.bind(this,this.updateDisplay));for(var e=this.options_.playerOptions.tracks||[],t=0;t<e.length;t++)this.player_.addRemoteTextTrack(e[t],!0);var n={captions:1,subtitles:1},r=this.player_.textTracks(),a=void 0,o=void 0;if(r){for(var l=0;l<r.length;l++){var u=r[l];u.default&&("descriptions"!==u.kind||a?u.kind in n&&!o&&(o=u):a=u)}o?o.mode="showing":a&&(a.mode="showing")}}}))),a}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.toggleDisplay=function(){this.player_.tech_&&this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()},t.prototype.createEl=function(){return e.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{"aria-live":"off","aria-atomic":"true"})},t.prototype.clearDisplay=function(){"function"==typeof r.default.WebVTT&&r.default.WebVTT.processCues(r.default,[],this.el_)},t.prototype.updateDisplay=function(){var e=this.player_.textTracks();if(this.clearDisplay(),e){for(var t=null,i=null,n=e.length;n--;){var s=e[n];"showing"===s.mode&&("descriptions"===s.kind?t=s:i=s)}i?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(i)):t&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(t))}},t.prototype.updateForTrack=function(e){if("function"==typeof r.default.WebVTT&&e.activeCues){for(var t=this.player_.textTrackSettings.getValues(),i=[],n=0;n<e.activeCues.length;n++)i.push(e.activeCues[n]);r.default.WebVTT.processCues(r.default,i,this.el_);for(var s=i.length;s--;){var a=i[s];if(a){var h=a.displayState;if(t.color&&(h.firstChild.style.color=t.color),t.textOpacity&&c(h.firstChild,"color",u(t.color||"#fff",t.textOpacity)),t.backgroundColor&&(h.firstChild.style.backgroundColor=t.backgroundColor),t.backgroundOpacity&&c(h.firstChild,"backgroundColor",u(t.backgroundColor||"#000",t.backgroundOpacity)),t.windowColor&&(t.windowOpacity?c(h,"backgroundColor",u(t.windowColor,t.windowOpacity)):h.style.backgroundColor=t.windowColor),t.edgeStyle&&("dropshadow"===t.edgeStyle?h.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px "+o:"raised"===t.edgeStyle?h.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px "+o:"depressed"===t.edgeStyle?h.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px "+o:"uniform"===t.edgeStyle&&(h.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px "+o)),t.fontPercent&&1!==t.fontPercent){var d=r.default.parseFloat(h.style.fontSize);h.style.fontSize=d*t.fontPercent+"px",h.style.height="auto",h.style.top="auto",h.style.bottom="2px"}
2t.fontFamily&&"default"!==t.fontFamily&&("small-caps"===t.fontFamily?h.firstChild.style.fontVariant="small-caps":h.firstChild.style.fontFamily=l[t.fontFamily])}}}},t}(n.default);n.default.registerComponent("TextTrackDisplay",h),t.default=h},94054:function(e,t){"use strict";t.__esModule=!0;var i=function(e){return["kind","label","language","id","inBandMetadataTrackDispatchType","mode","src"].reduce((function(t,i,n){return e[i]&&(t[i]=e[i]),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}}))})};t.default={textTracksToJson: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=i(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(i))},jsonToTextTracks:function(e,t){return e.forEach((function(e){var i=t.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach((function(e){return i.addCue(e)}))})),t.textTracks()},trackToJson_:i}},18746:function(e,t,i){"use strict";t.__esModule=!0;var n=l(i(83994)),s=o(i(667)),r=o(i(88223)),a=l(i(67405));function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=function(e){function t(){var i,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=void 0;if(r.IS_IE8){for(var l in o=a.default.createElement("custom"),n.default.prototype)"constructor"!==l&&(o[l]=n.default.prototype[l]);for(var c in t.prototype)"constructor"!==c&&(o[c]=t.prototype[c])}return i=u(this,e.call(this,s,o)),u(i,o=i)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.addTrack_=function(t){e.prototype.addTrack_.call(this,t),t.addEventListener("modechange",s.bind(this,(function(){this.trigger("change")})))},t}(n.default);t.default=c},84702:function(e,t,i){"use strict";t.__esModule=!0;var n=c(i(9331)),s=c(i(93220)),r=i(56144),a=u(i(667)),o=u(i(28645)),l=c(i(33128));function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function c(e){return e&&e.__esModule?e:{default:e}}var h="vjs-text-track-settings",d=["#000","Black"],p=["#00F","Blue"],f=["#0FF","Cyan"],g=["#0F0","Green"],m=["#F0F","Magenta"],y=["#F00","Red"],_=["#FFF","White"],v=["#FF0","Yellow"],b=["1","Opaque"],T=["0.5","Semi-Transparent"],S=["0","Transparent"],k={backgroundColor:{selector:".vjs-bg-color > select",id:"captions-background-color-%s",label:"Color",options:[d,_,y,g,p,v,m,f]},backgroundOpacity:{selector:".vjs-bg-opacity > select",id:"captions-background-opacity-%s",label:"Transparency",options:[b,T,S]},color:{selector:".vjs-fg-color > select",id:"captions-foreground-color-%s",label:"Color",options:[_,d,y,g,p,v,m,f]},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 >
2 select",id:"captions-foreground-opacity-%s",label:"Transparency",options:[b,T]},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:[S,T,b]}};function w(e,t){if(t&&(e=t(e)),e&&"none"!==e)return e}k.windowColor.options=k.backgroundColor.options;var C=function(e){function t(i,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,e.call(this,i,n));return s.setDefaults(),s.hide(),s.updateDisplay=a.bind(s,s.updateDisplay),void 0===n.persistTextTrackSettings&&(s.options_.persistTextTrackSettings=s.options_.playerOptions.persistTextTrackSettings),s.on(s.$(".vjs-done-button"),"click",(function(){s.saveSettings(),s.hide()})),s.on(s.$(".vjs-default-button"),"click",(function(){s.setDefaults(),s.updateDisplay()})),o.each(k,(function(e){s.on(s.$(e.selector),"change",s.updateDisplay)})),s.options_.persistTextTrackSettings&&s.restoreSettings(),s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.createElSelect_=function(e){var t=this,i=k[e],n=i.id.replace("%s",this.id_);return[(0,r.createEl)("label",{className:"vjs-label",textContent:i.label},{for:n}),(0,r.createEl)("select",{id:n},void 0,i.options.map((function(e){return(0,r.createEl)("option",{textContent:t.localize(e[1]),value:e[0]})})))]},t.prototype.createElFgColor_=function(){var e=(0,r.createEl)("legend",{textContent:this.localize("Text")}),t=this.createElSelect_("color"),i=(0,r.createEl)("span",{className:"vjs-text-opacity vjs-opacity"},void 0,this.createElSelect_("textOpacity"));return(0,r.createEl)("fieldset",{className:"vjs-fg-color vjs-tracksetting"},void 0,[e].concat(t,i))},t.prototype.createElBgColor_=function(){var e=(0,r.createEl)("legend",{textContent:this.localize("Background")}),t=this.createElSelect_("backgroundColor"),i=(0,r.createEl)("span",{className:"vjs-bg-opacity vjs-opacity"},void 0,this.createElSelect_("backgroundOpacity"));return(0,r.createEl)("fieldset",{className:"vjs-bg-color vjs-tracksetting"},void 0,[e].concat(t,i))},t.prototype.createElWinColor_=function(){var e=(0,r.createEl)("legend",{textContent:this.localize("Window")}),t=this.createElSelect_("windowColor"),i=(0,r.createEl)("span",{className:"vjs-window-opacity vjs-opacity"},void 0,this.createElSelect_("windowOpacity"));return(0,r.createEl)("fieldset",{className:"vjs-window-color vjs-tracksetting"},void 0,[e].concat(t,i))},t.prototype.createElColors_=function(){return(0,r.createEl)("div",{className:"vjs-tracksettings-colors"},void 0,[this.createElFgColor_(),this.createElBgColor_(),this.createElWinColor_()])},t.prototype.createElFont_=function(){var e=(0,r.createEl)("div",{className:"vjs-font-percent vjs-tracksetting"},void 0,this.createElSelect_("fontPercent")),t=(0,r.createEl)("div",{className:"vjs-edge-style vjs-tracksetting"},void 0,this.createElSelect_("edgeStyle")),i=(0,r.createEl)("div",{className:"vjs-font-family vjs-tracksetting"},void 0,this.createElSelect_("fontFamily"));return(0,r.createEl)("div",{className:"vjs-tracksettings-font"},void 0,[e,t,i])},t.prototype.createElControls_=function(){var e=(0,r.createEl)("button",{className:"vjs-default-button",textContent:this.localize("Defaults")}),t=(0,r.createEl)("button",{className:"vjs-done-button",textContent:"Done"});return(0,r.createEl)("div",{className:"vjs-tracksettings-controls"},void 0,[e,t])},t.prototype.createEl=function(){var e=(0,r.createEl)("div",{className:"vjs-tracksettings"},void 0,[this.createElColors_(),this.createElFont_(),this.createElControls_()]),t=(0,r.createEl)("div",{className:"vjs-control-text",id:"TTsettingsDialogLabel-"+this.id_,textContent:"Caption Settings Dialog"},{"aria-level":"1",role:"heading"}),i=(0,r.createEl)("div",{className:"vjs-control-text",id:"TTsettingsDialogDescription-"+this.id_,textContent:"Beginning of dialog window. Escape will cancel and close the window."}),n=(0,r.createEl)("div",void 0,{role:"document"},[t,i,e]);return(0,r.createEl)("div",{className:"vjs-caption-settings vjs-modal-overlay",tabIndex:-1},{role:"dialog","aria-labelledby":t.id,"aria-describedby":i.id},n)},t.prototype.getValues=function(){var e=this;return o.reduce(k,(function(t,i,n){var s,r,a=(s=e.$(i.selector),r=i.parser,w(s.options[s.options.selectedIndex].value,r));return void 0!==a&&(t[n]=a),t}),{})},t.prototype.setValues=function(e){var t=this;o.each(k,(function(i,n){!function(e,t,i){if(t)for(var n=0;n<e.options.length;n++)if(w(e.options[n].value,i)===t){e.selectedIndex=n;break}}(t.$(i.selector),e[n],i.parser)}))},t.prototype.setDefaults=function(){var e=this;o.each(k,(function(t){var i=t.hasOwnProperty("default")?t.default:0;e.$(t.selector).selectedIndex=i}))},t.prototype.restoreSettings=function(){var e=void 0;try{e=JSON.parse(n.default.localStorage.getItem(h))}catch(e){l.default.warn(e)}e&&this.setValues(e)},t.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var e=this.getValues();try{Object.keys(e).length?n.default.localStorage.setItem(h,JSON.stringify(e)):n.default.localStorage.removeItem(h)}catch(e){l.default.warn(e)}}},t.prototype.updateDisplay=function(){var e=this.player_.getChild("textTrackDisplay");e&&e.updateDisplay()},t}(s.default);s.default.registerComponent("TextTrackSettings",C),t.default=C},76353:function(e,t,i){"use strict";t.__esModule=!0;var n=f(i(50481)),s=p(i(667)),r=i(85531),a=f(i(33128)),o=f(i(9331)),l=f(i(34973)),u=i(20475),c=f(i(41875)),h=f(i(91908)),d=p(i(88223));
2function p(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function f(e){return e&&e.__esModule?e:{default:e}}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var m=function(e,t){var i=new o.default.WebVTT.Parser(o.default,o.default.vttjs,o.default.WebVTT.StringDecoder()),n=[];i.oncue=function(e){t.addCue(e)},i.onparsingerror=function(e){n.push(e)},i.onflush=function(){t.trigger({type:"loadeddata",target:t})},i.parse(e),n.length>0&&(o.default.console&&o.default.console.groupCollapsed&&o.default.console.groupCollapsed("Text Track parsing errors for "+t.src),n.forEach((function(e){return a.default.error(e)})),o.default.console&&o.default.console.groupEnd&&o.default.console.groupEnd()),i.flush()},y=function(e){function t(){var i,l=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),!l.tech)throw new Error("A tech was not provided.");var p=(0,h.default)(l,{kind:r.TextTrackKind[l.kind]||"subtitles",language:l.language||l.srclang||""}),f=r.TextTrackMode[p.mode]||"disabled",y=p.default;"metadata"!==p.kind&&"chapters"!==p.kind||(f="hidden");var _=i=g(this,e.call(this,p));if(_.tech_=p.tech,d.IS_IE8)for(var v in t.prototype)"constructor"!==v&&(_[v]=t.prototype[v]);_.cues_=[],_.activeCues_=[];var b=new n.default(_.cues_),T=new n.default(_.activeCues_),S=!1,k=s.bind(_,(function(){this.activeCues,S&&(this.trigger("cuechange"),S=!1)}));return"disabled"!==f&&_.tech_.ready((function(){_.tech_.on("timeupdate",k)}),!0),Object.defineProperty(_,"default",{get:function(){return y},set:function(){}}),Object.defineProperty(_,"mode",{get:function(){return f},set:function(e){var t=this;r.TextTrackMode[e]&&("showing"===(f=e)&&this.tech_.ready((function(){t.tech_.on("timeupdate",k)}),!0),this.trigger("modechange"))}}),Object.defineProperty(_,"cues",{get:function(){return this.loaded_?b:null},set:function(){}}),Object.defineProperty(_,"activeCues",{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return T;for(var e=this.tech_.currentTime(),t=[],i=0,n=this.cues.length;i<n;i++){var s=this.cues[i];(s.startTime<=e&&s.endTime>=e||s.startTime===s.endTime&&s.startTime<=e&&s.startTime+.5>=e)&&t.push(s)}if(S=!1,t.length!==this.activeCues_.length)S=!0;else for(var r=0;r<t.length;r++)-1===this.activeCues_.indexOf(t[r])&&(S=!0);return this.activeCues_=t,T.setCues_(this.activeCues_),T},set:function(){}}),p.src?(_.src=p.src,function(e,t){var i={uri:e},n=(0,u.isCrossOrigin)(e);n&&(i.cors=n),(0,c.default)(i,s.bind(this,(function(e,i,n){if(e)return a.default.error(e,i);if(t.loaded_=!0,"function"!=typeof o.default.WebVTT){if(t.tech_){var s=function(){return m(n,t)};t.tech_.on("vttjsloaded",s),t.tech_.on("vttjserror",(function(){a.default.error("vttjs failed to load, stopping trying to process "+t.src),t.tech_.off("vttjsloaded",s)}))}}else m(n,t)})))}(p.src,_)):_.loaded_=!0,g(i,_)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.addCue=function(e){var t=e;if(o.default.vttjs&&!(e instanceof o.default.vttjs.VTTCue)){for(var i in t=new o.default.vttjs.VTTCue(e.startTime,e.endTime,e.text),e)i in t||(t[i]=e[i]);t.id=e.id,t.originalCue_=e}var n=this.tech_.textTracks();if(n)for(var s=0;s<n.length;s++)n[s]!==this&&n[s].removeCue(t);this.cues_.push(t),this.cues.setCues_(this.cues_)},t.prototype.removeCue=function(e){for(var t=this.cues_.length;t--;){var i=this.cues_[t];if(i===e||i.originalCue_&&i.originalCue_===e){this.cues_.splice(t,1),this.cues.setCues_(this.cues_);break}}},t}(l.default);y.prototype.allowedEvents_={cuechange:"cuechange"},t.default=y},85531:function(e,t){"use strict";t.__esModule=!0,t.VideoTrackKind={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},t.AudioTrackKind={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},t.TextTrackKind={subtitles:"subtitles",captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},t.TextTrackMode={disabled:"disabled",hidden:"hidden",showing:"showing"}},83994:function(e,t,i){"use strict";t.__esModule=!0;
2var n=a(i(43744)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(88223)),r=a(i(67405));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=o(this,e.call(this));if(!n&&(n=a,s.IS_IE8))for(var l in n=r.default.createElement("custom"),t.prototype)"constructor"!==l&&(n[l]=t.prototype[l]);n.tracks_=[],Object.defineProperty(n,"length",{get:function(){return this.tracks_.length}});for(var u=0;u<i.length;u++)n.addTrack_(i[u]);return o(a,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.addTrack_=function(e){var 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"}))},t.prototype.removeTrack_=function(e){for(var t=void 0,i=0,n=this.length;i<n;i++)if(this[i]===e){(t=this[i]).off&&t.off(),this.tracks_.splice(i,1);break}t&&this.trigger({track:t,type:"removetrack"})},t.prototype.getTrackById=function(e){for(var t=null,i=0,n=this.length;i<n;i++){var s=this[i];if(s.id===e){t=s;break}}return t},t}(n.default);for(var u in l.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack"},l.prototype.allowedEvents_)l.prototype["on"+u]=null;t.default=l},34973:function(e,t,i){"use strict";t.__esModule=!0;var n=o(i(88223)),s=a(i(67405)),r=o(i(77355));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var a=l(this,e.call(this)),o=a;if(n.IS_IE8)for(var u in o=s.default.createElement("custom"),t.prototype)"constructor"!==u&&(o[u]=t.prototype[u]);var c={id:i.id||"vjs_track_"+r.newGUID(),kind:i.kind||"",label:i.label||"",language:i.language||""},h=function(e){Object.defineProperty(o,e,{get:function(){return c[e]},set:function(){}})};for(var d in c)h(d);return l(a,o)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t}(a(i(43744)).default);t.default=u},44381:function(e,t,i){"use strict";t.__esModule=!0;var n=a(i(83994)),s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(88223)),r=a(i(67405));function a(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=function(e,t){for(var i=0;i<e.length;i++)t.id!==e[i].id&&(e[i].selected=!1)},u=function(e){function t(){var i,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);for(var u=void 0,c=a.length-1;c>=0;c--)if(a[c].selected){l(a,a[c]);break}if(s.IS_IE8){for(var h in u=r.default.createElement("custom"),n.default.prototype)"constructor"!==h&&(u[h]=n.default.prototype[h]);for(var d in t.prototype)"constructor"!==d&&(u[d]=t.prototype[d])}return(u=i=o(this,e.call(this,a,u))).changing_=!1,Object.defineProperty(u,"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}}),o(i,u)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t.prototype.addTrack_=function(t){var i=this;t.selected&&l(this,t),e.prototype.addTrack_.call(this,t),t.addEventListener&&t.addEventListener("selectedchange",(function(){i.changing_||(i.changing_=!0,l(i,t),i.changing_=!1,i.trigger("change"))}))},t.prototype.addTrack=function(e){this.addTrack_(e)},t.prototype.removeTrack=function(t){e.prototype.removeTrack_.call(this,t)},t}(n.default);t.default=u},62721:function(e,t,i){"use strict";t.__esModule=!0;var n=i(85531),s=o(i(34973)),r=o(i(91908)),a=function(e){if(e&&e.__esMo
2dule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(88223));function o(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var u=function(e){function t(){var i,s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=(0,r.default)(s,{kind:n.VideoTrackKind[s.kind]||""}),u=i=l(this,e.call(this,o)),c=!1;if(a.IS_IE8)for(var h in t.prototype)"constructor"!==h&&(u[h]=t.prototype[h]);return Object.defineProperty(u,"selected",{get:function(){return c},set:function(e){"boolean"==typeof e&&e!==c&&(c=e,this.trigger("selectedchange"))}}),o.selected&&(u.selected=o.selected),l(i,u)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof 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,e),t}(s.default);t.default=u},88223:function(e,t,i){"use strict";t.__esModule=!0,t.BACKGROUND_SIZE_SUPPORTED=t.TOUCH_ENABLED=t.IS_ANY_SAFARI=t.IS_SAFARI=t.IE_VERSION=t.IS_IE8=t.CHROME_VERSION=t.IS_CHROME=t.IS_EDGE=t.IS_FIREFOX=t.IS_NATIVE_ANDROID=t.IS_OLD_ANDROID=t.ANDROID_VERSION=t.IS_ANDROID=t.IOS_VERSION=t.IS_IOS=t.IS_IPOD=t.IS_IPHONE=t.IS_IPAD=void 0;var n,s,r,a,o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(56144)),l=(n=i(9331))&&n.__esModule?n:{default:n},u=l.default.navigator&&l.default.navigator.userAgent||"",c=/AppleWebKit\/([\d.]+)/i.exec(u),h=c?parseFloat(c.pop()):null,d=t.IS_IPAD=/iPad/i.test(u),p=t.IS_IPHONE=/iPhone/i.test(u)&&!d,f=t.IS_IPOD=/iPod/i.test(u),g=t.IS_IOS=p||d||f,m=(t.IOS_VERSION=(s=u.match(/OS (\d+)_/i))&&s[1]?s[1]:null,t.IS_ANDROID=/Android/i.test(u)),y=t.ANDROID_VERSION=function(){var e=u.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);return t&&i?parseFloat(e[1]+"."+e[2]):t||null}(),_=(t.IS_OLD_ANDROID=m&&/webkit/i.test(u)&&y<2.3,t.IS_NATIVE_ANDROID=m&&y<5&&h<537,t.IS_FIREFOX=/Firefox/i.test(u),t.IS_EDGE=/Edge/i.test(u)),v=t.IS_CHROME=!_&&/Chrome/i.test(u),b=(t.CHROME_VERSION=function(){var e=u.match(/Chrome\/(\d+)/);return e&&e[1]?parseFloat(e[1]):null}(),t.IS_IE8=/MSIE\s8\.0/.test(u),t.IE_VERSION=(!(a=(r=/MSIE\s(\d+)\.\d/.exec(u))&&parseFloat(r[1]))&&/Trident\/7.0/i.test(u)&&/rv:11.0/.test(u)&&(a=11),a),t.IS_SAFARI=/Safari/i.test(u)&&!v&&!m&&!_);t.IS_ANY_SAFARI=b||g,t.TOUCH_ENABLED=o.isReal()&&("ontouchstart"in l.default||l.default.DocumentTouch&&l.default.document instanceof l.default.DocumentTouch),t.BACKGROUND_SIZE_SUPPORTED=o.isReal()&&"backgroundSize"in l.default.document.createElement("video").style},96604:function(e,t,i){"use strict";t.__esModule=!0,t.bufferedPercent=function(e,t){var i=0,s=void 0,r=void 0;if(!t)return 0;e&&e.length||(e=(0,n.createTimeRange)(0,0));for(var a=0;a<e.length;a++)s=e.start(a),(r=e.end(a))>t&&(r=t),i+=r-s;return i/t};var n=i(94037)},51282:function(e,t,i){"use strict";t.__esModule=!0,t.default=function(e,t){if(!e||!t)return"";if("function"==typeof s.default.getComputedStyle){var i=s.default.getComputedStyle(e);return i?i[t]:""}return e.currentStyle[t]||""};var n,s=(n=i(9331))&&n.__esModule?n:{default:n}},56144:function(e,t,i){"use strict";t.__esModule=!0,t.$$=t.$=void 0;var n,s=((n=["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."]).raw=["Setting attributes in the second argument of createEl()\n                has been deprecated. Use the third argument instead.\n                createEl(type, properties, attributes). Attempting to set "," to ","."],n);t.isReal=function(){return r.default===a.default.document&&void 0!==r.default.createElement},t.isEl=f,t.getEl=function(e){return 0===e.indexOf("#")&&(e=e.slice(1)),r.default.getElementById(e)},t.createEl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments[3],a=r.default.createElement(e);return Object.getOwnPropertyNames(t).forEach((function(e){var i=t[e];-1!==e.indexOf("aria-")||"role"===e||"type"===e?(l.default.warn((0,u.default)(s,e,i)),a.setAttribute(e,i)):"textContent"===e?m(a,i):a[e]=i}
2)),Object.getOwnPropertyNames(i).forEach((function(e){a.setAttribute(e,i[e])})),n&&E(a,n),a},t.textContent=m,t.insertElFirst=function(e,t){t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)},t.getElData=function(e){var t=e[_];return t||(t=e[_]=o.newGUID()),y[t]||(y[t]={}),y[t]},t.hasElData=function(e){var t=e[_];return!!t&&!!Object.getOwnPropertyNames(y[t]).length},t.removeElData=function(e){var t=e[_];if(t){delete y[t];try{delete e[_]}catch(t){e.removeAttribute?e.removeAttribute(_):e[_]=null}}},t.hasElClass=v,t.addElClass=b,t.removeElClass=T,t.toggleElClass=function(e,t,i){var n=v(e,t);if("function"==typeof i&&(i=i(e,t)),"boolean"!=typeof i&&(i=!n),i!==n)return i?b(e,t):T(e,t),e},t.setElAttributes=function(e,t){Object.getOwnPropertyNames(t).forEach((function(i){var n=t[i];null==n||!1===n?e.removeAttribute(i):e.setAttribute(i,!0===n?"":n)}))},t.getElAttributes=function(e){var t={};if(e&&e.attributes&&e.attributes.length>0)for(var i=e.attributes,n=i.length-1;n>=0;n--){var s=i[n].name,r=i[n].value;"boolean"!=typeof e[s]&&-1===",auto
2play,controls,playsinline,loop,muted,default,defaultMuted,".indexOf(","+s+",")||(r=null!==r),t[s]=r}return t},t.getAttribute=function(e,t){return e.getAttribute(t)},t.setAttribute=function(e,t,i){e.setAttribute(t,i)},t.removeAttribute=function(e,t){e.removeAttribute(t)},t.blockTextSelection=function(){r.default.body.focus(),r.default.onselectstart=function(){return!1}},t.unblockTextSelection=function(){r.default.onselectstart=function(){return!0}},t.findElPosition=S,t.getPointerPosition=function(e,t){var i={},n=S(e),s=e.offsetWidth,r=e.offsetHeight,a=n.top,o=n.left,l=t.pageY,u=t.pageX;return t.changedTouches&&(u=t.changedTouches[0].pageX,l=t.changedTouches[0].pageY),i.y=Math.max(0,Math.min(1,(a-l+r)/r)),i.x=Math.max(0,Math.min(1,(u-o)/s)),i},t.isTextNode=k,t.emptyEl=w,t.normalizeContent=C,t.appendContent=E,t.insertContent=function(e,t){return E(w(e),t)};var r=h(i(67405)),a=h(i(9331)),o=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}(i(77355)),l=h(i(33128)),u=h(i(7753)),c=i(28645);function h(e){return e&&e.__esModule?e:{default:e}}function d(e){return"string"==typeof e&&/\S/.test(e)}function p(e){if(/\s/.test(e))throw new Error("class has illegal whitespace characters")}function f(e){return(0,c.isObject)(e)&&1===e.nodeType}function g(e){return function(t,i){if(!d(t))return r.default[e](null);d(i)&&(i=r.default.querySelector(i));var n=f(i)?i:r.default;return n[e]&&n[e](t)}}function m(e,t){return void 0===e.textContent?e.innerText=t:e.textContent=t,e}var y={},_="vdata"+(new Date).getTime();function v(e,t){return p(t),e.classList?e.classList.contains(t):(i=t,new RegExp("(^|\\s)"+i+"($|\\s)")).test(e.className);var i}function b(e,t){return e.classList?e.classList.add(t):v(e,t)||(e.className=(e.className+" "+t).trim()),e}function T(e,t){return e.classList?e.classList.remove(t):(p(t),e.className=e.className.split(/\s+/).filter((function(e){return e!==t})).join(" ")),e}function S(e){var t=void 0;if(e.getBoundingClientRect&&e.parentNode&&(t=e.getBoundingClientRect()),!t)return{left:0,top:0};var i=r.default.documentElement,n=r.default.body,s=i.clientLeft||n.clientLeft||0,o=a.default.pageXOffset||n.scrollLeft,l=t.left+o-s,u=i.clientTop||n.clientTop||0,c=a.default.pageYOffset||n.scrollTop,h=t.top+c-u;return{left:Math.round(l),top:Math.round(h)}}function k(e){return(0,c.isObject)(e)&&3===e.nodeType}function w(e){for(;e.firstChild;)e.removeChild(e.firstChild);return e}function C(e){return"function"==typeof e&&(e=e()),(Array.isArray(e)?e:[e]).map((function(e){return"function"==typeof e&&(e=e()),f(e)||k(e)?e:"string"==typeof e&&/\S/.test(e)?r.default.createTextNode(e):void 0})).filter((function(e){return e}))}function E(e,t){return C(t).forEach((function(t){return e.appendChild(t)})),e}t.$=g("querySelector"),t.$$=g("querySelectorAll")},31222:function(e,t,i){"use strict";t.__esModule=!0,t.fixEvent=d,t.on=g,t.off=m,t.trigger=function e(t,i,s){var r=n.hasElData(t)?n.getElData(t):{},a=t.parentNode||t.ownerDocument;if("string"==typeof i&&(i={type:i,target:t}),i=d(i),r.dispatcher&&r.dispatcher.call(t,i,s),a&&!i.isPropagationStopped()&&!0===i.bubbles)e.call(null,a,i,s);else if(!a&&!i.defaultPrevented){var o=n.getElData(i.target);i.target[i.type]&&(o.disabled=!0,"function"==typeof i.target[i.type]&&i.target[i.type](),o.disabled=!1)}return!i.defaultPrevented},t.one=function e(t,i,n){if(Array.isArray(i))return h(e,t,i,n);var r=function e(){m(t,i,e),n.apply(this,arguments)};r.guid=n.guid=n.guid||s.newGUID(),g(t,i,r)};var n=u(i(56144)),s=u(i(77355)),r=l(i(33128)),a=l(i(9331)),o=l(i(67405));function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function c(e,t){var i=n.getElData(e);0===i.handlers[t].length&&(delete i.handlers[t],e.removeEventListener?e.removeEventListener(t,i.dispatcher,!1):e.detachEvent&&e.detachEvent("on"+t,i.dispatcher)),Object.getOwnPropertyNames(i.handlers).length<=0&&(delete i.handlers,delete i.dispatcher,delete i.disabled),0===Object.getOwnPropertyNames(i).length&&n.removeElData(e)}
2function h(e,t,i,n){i.forEach((function(i){e(t,i,n)}))}function d(e){function t(){return!0}function i(){return!1}if(!e||!e.isPropagationStopped){var n=e||a.default.event;for(var s in e={},n)"layerX"!==s&&"layerY"!==s&&"keyLocation"!==s&&"webkitMovementX"!==s&&"webkitMovementY"!==s&&("returnValue"===s&&n.preventDefault||(e[s]=n[s]));if(e.target||(e.target=e.srcElement||o.default),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=t},e.isPropagationStopped=i,e.stopImmediatePropagation=function(){n.stopImmediatePropagation&&n.stopImmediatePropagation(),e.isImmediatePropagationStopped=t,e.stopPropagation()},e.isImmediatePropagationStopped=i,null!==e.clientX&&void 0!==e.clientX){var r=o.default.documentElement,l=o.default.body;e.pageX=e.clientX+(r&&r.scrollLeft||l&&l.scrollLeft||0)-(r&&r.clientLeft||l&&l.clientLeft||0),e.pageY=e.clientY+(r&&r.scrollTop||l&&l.scrollTop||0)-(r&&r.clientTop||l&&l.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}var p=!1;!function(){try{var e=Object.defineProperty({},"passive",{get:function(){p=!0}});a.default.addEventListener("test",null,e)}catch(e){}}();var f=["touchstart","touchmove"];function g(e,t,i){if(Array.isArray(t))return h(g,e,t,i);var a=n.getElData(e);if(a.handlers||(a.handlers={}
2),a.handlers[t]||(a.handlers[t]=[]),i.guid||(i.guid=s.newGUID()),a.handlers[t].push(i),a.dispatcher||(a.disabled=!1,a.dispatcher=function(t,i){if(!a.disabled){t=d(t);var n=a.handlers[t.type];if(n)for(var s=n.slice(0),o=0,l=s.length;o<l&&!t.isImmediatePropagationStopped();o++)try{s[o].call(e,t,i)}catch(e){r.default.error(e)}}}),1===a.handlers[t].length)if(e.addEventListener){var o=!1;p&&f.indexOf(t)>-1&&(o={passive:!0}),e.addEventListener(t,a.dispatcher,o)}else e.attachEvent&&e.attachEvent("on"+t,a.dispatcher)}function m(e,t,i){if(n.hasElData(e)){var s=n.getElData(e);if(s.handlers){if(Array.isArray(t))return h(m,e,t,i);var r=function(t){s.handlers[t]=[],c(e,t)};if(t){var a=s.handlers[t];if(a)if(i){if(i.guid)for(var o=0;o<a.length;o++)a[o].guid===i.guid&&a.splice(o--,1);c(e,t)}else r(t)}else for(var l in s.handlers)r(l)}}}},667:function(e,t,i){"use strict";t.__esModule=!0,t.throttle=t.bind=void 0;var n=i(77355);t.bind=function(e,t,i){t.guid||(t.guid=(0,n.newGUID)());var s=function(){return t.apply(e,arguments)};return s.guid=i?i+"_"+t.guid:t.guid,s},t.throttle=function(e,t){var i=Date.now();return function(){var n=Date.now();n-i>=t&&(e.apply(void 0,arguments),i=n)}}},20460:function(e,t){"use strict";t.__esModule=!0,t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;e=e<0?0:e;var i=Math.floor(e%60),n=Math.floor(e/60%60),s=Math.floor(e/3600),r=Math.floor(t/60%60),a=Math.floor(t/3600);return(isNaN(e)||e===1/0)&&(s=n=i="-"),(s=s>0||a>0?s+":":"")+(n=((s||r>=10)&&n<10?"0"+n:n)+":")+(i<10?"0"+i:i)}},77355:function(e,t){"use strict";t.__esModule=!0,t.newGUID=function(){return i++};var i=1},33128:function(e,t,i){"use strict";t.__esModule=!0,t.logByType=void 0;var n,s=(n=i(9331))&&n.__esModule?n:{default:n},r=i(88223),a=i(28645),o=void 0,l=t.logByType=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:!!r.IE_VERSION&&r.IE_VERSION<11;"log"!==e&&t.unshift(e.toUpperCase()+":"),o.history.push(t),t.unshift("VIDEOJS:");var n=s.default.console&&s.default.console[e];n&&(i&&(t=t.map((function(e){if((0,a.isObject)(e)||Array.isArray(e))try{return JSON.stringify(e)}catch(t){return String(e)}return String(e)})).join(" ")),n.apply?n[Array.isArray(t)?"apply":"call"](s.default.console,t):n(t))};o=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];l("log",t)},o.history=[],o.error=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return l("error",t)},o.warn=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return l("warn",t)},t.default=o},91908:function(e,t,i){"use strict";t.__esModule=!0,t.default=function e(){for(var t={},i=arguments.length,s=Array(i),r=0;r<i;r++)s[r]=arguments[r];return s.forEach((function(i){i&&(0,n.each)(i,(function(i,s){(0,n.isPlain)(i)?((0,n.isPlain)(t[s])||(t[s]={}),t[s]=e(t[s],i)):t[s]=i}))})),t};var n=i(28645)},28645:function(e,t){"use strict";t.__esModule=!0;var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};t.each=r,t.reduce=function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return s(e).reduce((function(i,n){return t(i,e[n],n)}),i)},t.assign=function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return Object.assign?Object.assign.apply(Object,[e].concat(i)):(i.forEach((function(t){t&&r(t,(function(t,i){e[i]=t}))})),e)},t.isObject=a,t.isPlain=function(e){return a(e)&&"[object Object]"===n.call(e)&&e.constructor===Object};var n=Object.prototype.toString,s=function(e){return a(e)?Object.keys(e):[]};function r(e,t){s(e).forEach((function(i){return t(e[i],i)}))}function a(e){return!!e&&"object"===(void 0===e?"undefined":i(e))}},59104:function(e,t,i){"use strict";t.__esModule=!0,t.setTextContent=t.createStyleElement=void 0;var n,s=(n=i(67405))&&n.__esModule?n:{default:n};t.createStyleElement=function(e){var t=s.default.createElement("style");return t.className=e,t},t.setTextContent=function(e,t){e.styleSheet?e.styleSheet.cssText=t:e.textContent=t}},94037:function(e,t,i){"use strict";t.__esModule=!0,t.createTimeRange=void 0,t.createTimeRanges=o;var n,s=(n=i(33128))&&n.__esModule?n:{default:n};function r(e,t,i,n){return void 0===n&&(s.default.warn("DEPRECATED: Function '"+e+"' on 'TimeRanges' called without an index argument."),n=0),function(e,t,i){if(t<0||t>i)throw new Error("Failed to execute '"+e+"' on 'TimeRanges': The index provided ("+t+") is greater than or equal to the maximum bound ("+i+").")}(e,n,i.length-1),i[n][t]}function a(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:r.bind(null,"start",0,e),end:r.bind(null,"end",1,e)}}function o(e,t){return Array.isArray(e)?a(e):void 0===e||void 0===t?a():a([[e,t]])}t.createTimeRange=o},6584:function(e,t){"use strict";t.__esModule=!0,t.default=function(e){return"string"!=typeof e?e:e.charAt(0).toUpperCase()+e.slice(1)}},20475:function(e,t,i){"use strict";t.__esModule=!0,t.isCrossOrigin=t.getFileExtension=t.getAbsoluteURL=t.parseUrl=void 0;var n=r(i(67405)),s=r(i(9331));
2function r(e){return e&&e.__esModule?e:{default:e}}var a=t.parseUrl=function(e){var t=["protocol","hostname","port","pathname","search","hash","host"],i=n.default.createElement("a");i.href=e;var s=""===i.host&&"file:"!==i.protocol,r=void 0;s&&((r=n.default.createElement("div")).innerHTML='<a href="'+e+'"></a>',i=r.firstChild,r.setAttribute("style","display:none; position:absolute;"),n.default.body.appendChild(r));for(var a={},o=0;o<t.length;o++)a[t[o]]=i[t[o]];return"http:"===a.protocol&&(a.host=a.host.replace(/:80$/,"")),"https:"===a.protocol&&(a.host=a.host.replace(/:443$/,"")),s&&n.default.body.removeChild(r),a};t.getAbsoluteURL=function(e){if(!e.match(/^https?:\/\//)){var t=n.default.createElement("div");t.innerHTML='<a href="'+e+'">x</a>',e=t.firstChild.href}return e},t.getFileExtension=function(e){if("string"==typeof e){var t=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/i.exec(e);if(t)return t.pop().toLowerCase()}return""},t.isCrossOrigin=function(e){var t=s.default.location,i=a(e);return(":"===i.protocol?t.protocol:i.protocol)+i.host!==t.protocol+t.host}},49067:function(e,t,i){"use strict";e=i.nmd(e),t.__esModule=!0;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s=P(i(9331)),r=P(i(67405)),a=O(i(88223)),o=O(i(56144)),l=O(i(59333)),u=O(i(59104)),c=P(i(93220)),h=P(i(43744)),d=O(i(31222)),p=P(i(72822)),f=P(i(83869)),g=P(i(91908)),m=O(i(667)),y=P(i(76353)),_=P(i(28417)),v=P(i(62721)),b=i(94037),T=P(i(20460)),S=P(i(33128)),k=O(i(20475)),w=i(28645),C=P(i(51282)),E=P(i(89994)),x=P(i(41875)),I=P(i(28705));function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t.default=e,t}function P(e){return e&&e.__esModule?e:{default:e}}function A(e,t,i){var n=void 0;if("string"==typeof e){if(0===e.indexOf("#")&&(e=e.slice(1)),A.getPlayers()[e])return t&&S.default.warn('Player "'+e+'" is already initialised. Options will not be applied.'),i&&A.getPlayers()[e].ready(i),A.getPlayers()[e];n=o.getEl(e)}else n=e;if(!n||!n.nodeName)throw new TypeError("The element or ID supplied is not valid. (videojs)");if(n.player||p.default.players[n.playerId])return n.player||p.default.players[n.playerId];t=t||{},A.hooks("beforesetup").forEach((function(e){var i=e(n,(0,g.default)(t));(0,w.isObject)(i)&&!Array.isArray(i)?t=(0,g.default)(t,i):S.default.error("please return an object in beforesetup hooks")}));var s=new(c.default.getComponent("Player"))(n,t,i);return A.hooks("setup").forEach((function(e){return e(s)})),s}if("undefined"==typeof HTMLVideoElement&&o.isReal()&&(r.default.createElement("video"),r.default.createElement("audio"),r.default.createElement("track")),A.hooks_={},A.hooks=function(e,t){return A.hooks_[e]=A.hooks_[e]||[],t&&(A.hooks_[e]=A.hooks_[e].concat(t)),A.hooks_[e]},A.hook=function(e,t){A.hooks(e,t)},A.removeHook=function(e,t){var i=A.hooks(e).indexOf(t);return!(i<=-1||(A.hooks_[e]=A.hooks_[e].slice(),A.hooks_[e].splice(i,1),0))},!0!==s.default.VIDEOJS_NO_DYNAMIC_STYLE&&o.isReal()){var L=o.$(".vjs-styles-defaults");if(!L){L=u.createStyleElement("vjs-styles-defaults");var M=o.$("head");M&&M.insertBefore(L,M.firstChild),u.setTextContent(L,"\n      .video-js {\n        width: 300px;\n        height: 150px;\n      }\n\n      .vjs-fluid {\n        padding-top: 56.25%\n      }\n    ")}}l.autoSetupTimeout(1,A),A.VERSION="5.20.5",A.options=p.default.prototype.options_,A.getPlayers=function(){return p.default.players},A.players=p.default.players,A.getComponent=c.default.getComponent,A.registerComponent=function(e,t){I.default.isTech(t)&&S.default.warn("The "+e+" tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"),c.default.registerComponent.call(c.default,e,t)},A.getTech=I.default.getTech,A.registerTech=I.default.registerTech,A.browser=a,A.TOUCH_ENABLED=a.TOUCH_ENABLED,A.extend=E.default,A.mergeOptions=g.default,A.bind=m.bind,A.plugin=f.default,A.addLanguage=function(e,t){var i;return e=(""+e).toLowerCase(),A.options.languages=(0,g.default)(A.options.languages,((i={})[e]=t,i)),A.options.languages[e]},A.log=S.default,A.createTimeRange=A.createTimeRanges=b.createTimeRanges,A.formatTime=T.default,A.parseUrl=k.parseUrl,A.isCrossOrigin=k.isCrossOrigin,A.EventTarget=h.default,A.on=d.on,A.one=d.one,A.off=d.off,A.trigger=d.trigger,A.xhr=x.default,A.TextTrack=y.default,A.AudioTrack=_.default,A.VideoTrack=v.default,A.isEl=o.isEl,A.isTextNode=o.isTextNode,A.createEl=o.createEl,A.hasClass=o.hasElClass,A.addClass=o.addElClass,A.removeClass=o.removeElClass,A.toggleClass=o.toggleElClass,A.setAttributes=o.setElAttributes,A.getAttributes=o.getElAttributes,A.emptyEl=o.emptyEl,A.appendContent=o.appendContent,A.insertContent=o.insertContent,A.computedStyle=C.default,"function"==typeof define&&define.amd?define("videojs",[],(function(){return A})):"object"===n(t)&&"object"===n(e)&&(e.exports=A),t.default=A},67405:function(e,t,i){var n=void 0!==i.g?i.g:"undefined"!=typeof window?window:{},s=i(62142);if("undefined"!=typeof document)e.exports=document;else{var r=n["__GLOBAL_DOCUMENT_CACHE@4"];r||(r=n["__GLOBAL_DOCUMENT_CACHE@4"]=s),e.exports=r}},9331:function(e,t,i){"undefined"!=typeof window?e.exports=window:void 0!==i.g?e.exports=i.g:"undefined"!=typeof self?e.exports=self:e.exports={}},49343:function(e,t,i){var n=i(58908),s=e.exports={WebVTT:i(35417),VTTCue:i(67506),VTTRegion:i(21666)};n.vttjs=s,n.WebVTT=s.WebVTT;var r=s.VTTCue,a=s.VTTRegion,o=n.VTTCue,l=n.VTTRegion;s.shim=function(){n.VTTCue=r,n.VTTRegion=a},s.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||s.shim()},35417:function(e){var t=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();
vendor: 5,000 bytes, line 2
2function i(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function n(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function s(){this.values=t(null)}function r(e,t,i,n){var s=n?e.split(n):[e];for(var r in s)if("string"==typeof s[r]){var a=s[r].split(i);2===a.length&&t(a[0],a[1])}}function a(e,t,a){var o=e;function l(){var t=n(e);if(null===t)throw new i(i.Errors.BadTimeStamp,"Malformed timestamp: "+o);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=l(),u(),"--\x3e"!==e.substr(0,3))throw new i(i.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+o);e=e.substr(3),u(),t.endTime=l(),u(),function(e,t){var i=new s;r(e,(function(e,t){switch(e){case"region":for(var n=a.length-1;n>=0;n--)if(a[n].id===t){i.set(e,a[n].region);break}break;case"vertical":i.alt(e,t,["rl","lr"]);break;case"line":var s=t.split(","),r=s[0];i.integer(e,r),i.percent(e,r)&&i.set("snapToLines",!1),i.alt(e,r,["auto"]),2===s.length&&i.alt("lineAlign",s[1],["start","middle","end"]);break;case"position":s=t.split(","),i.percent(e,s[0]),2===s.length&&i.alt("positionAlign",s[1],["start","middle","end"]);break;case"size":i.percent(e,t);break;case"align":i.alt(e,t,["start","middle","end","left","right"])}}),/:/,/\s/),t.region=i.get("region",null),t.vertical=i.get("vertical",""),t.line=i.get("line","auto"),t.lineAlign=i.get("lineAlign","start"),t.snapToLines=i.get("snapToLines",!0),t.size=i.get("size",100),t.align=i.get("align","middle"),t.position=i.get("position",{start:0,left:0,middle:50,end:100,right:100},t.align),t.positionAlign=i.get("positionAlign",{start:"start",left:"start",middle:"middle",end:"end",right:"end"},t.align)}(e,t)}i.prototype=t(Error.prototype),i.prototype.constructor=i,i.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},s.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){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]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var o={"&amp;":"&","&lt;":"<","&gt;":">","&lrm;":"‎","&rlm;":"‏","&nbsp;":" "},l={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},u={v:"title",lang:"lang"},c={rt:"ruby"};function h(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function s(e){return o[e]}function r(e){for(;_=e.match(/&(amp|lt|gt|lrm|rlm|nbsp);/);)e=e.replace(_[0],s);return e}function a(e,t){return!c[t.localName]||c[t.localName]===e.localName}function h(t,i){var n=l[t];if(!n)return null;var s=e.document.createElement(n);s.localName=n;var r=u[t];return r&&i&&(s[r]=i.trim()),s}for(var d,p=e.document.createElement("div"),f=p,g=[];null!==(d=i());)if("<"!==d[0])f.appendChild(e.document.createTextNode(r(d)));else{if("/"===d[1]){g.length&&g[g.length-1]===d.substr(2).replace(">","")&&(g.pop(),f=f.parentNode);continue}var m,y=n(d.substr(1,d.length-2));if(y){m=e.document.createProcessingInstruction("timestamp",y),f.appendChild(m);continue}var _=d.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!_)continue;if(!(m=h(_[1],_[3])))continue;if(!a(f,m))continue;_[2]&&(m.className=_[2].substr(1).replace("."," ")),g.push(_[1]),f.appendChild(m),f=m}return p}var d=[[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
vendor: 8,026 bytes, line 2
2],[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 p(e){for(var t=0;t<d.length;t++){var i=d[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function f(){}function g(e,t,i){var n=/MSIE\s8\.0/.test(navigator.userAgent),s="rgba(255, 255, 255, 1)",r="rgba(0, 0, 0, 0.8)";n&&(s="rgb(255, 255, 255)",r="rgb(0, 0, 0)"),f.call(this),this.cue=t,this.cueDiv=h(e,t.text);var a={color:s,backgroundColor:r,position:"relative",left:0,right:0,top:0,bottom:0,display:"inline"};n||(a.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",a.unicodeBidi="plaintext"),this.applyStyles(a,this.cueDiv),this.div=e.document.createElement("div"),a={textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},n||(a.direction=function(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function s(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\n|\r)/);return r?(e.length=0,r[0]):i}return"ruby"===t.tagName?s(e):t.childNodes?(n(e,t),s(e)):void 0}for(n(t,e);i=s(t);)for(var r=0;r<i.length;r++)if(p(i.charCodeAt(r)))return"rtl";return"ltr"}(this.cueDiv),a.writingMode=""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl".stylesunicodeBidi="plaintext"),this.applyStyles(a),this.div.appendChild(this.cueDiv);var o=0;switch(t.positionAlign){case"start":o=t.position;break;case"middle":o=t.position-t.size/2;break;case"end":o=t.position-t.size}""===t.vertical?this.applyStyles({left:this.formatStyle(o,"%"),width:this.formatStyle(t.size,"%")}):this.applyStyles({top:this.formatStyle(o,"%"),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 m(e){var t,i,n,s,r=/MSIE\s8\.0/.test(navigator.userAgent);if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,s=e.div.offsetTop;var a=(a=e.div.childNodes)&&(a=a[0])&&a.getClientRects&&a.getClientRects();e=e.div.getBoundingClientRect(),t=a?Math.max(a[0]&&a[0].height||0,e.height/a.length):0}this.left=e.left,this.right=e.right,this.top=e.top||s,this.height=e.height||i,this.bottom=e.bottom||s+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight,r&&!this.lineHeight&&(this.lineHeight=13)}function y(e,t,i,n){var s=new m(t),r=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,s=0;s<i.length&&i[s]!==t;s++)"showing"===i[s].mode&&n++;return-1*++n}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var u=s.lineHeight,c=u*Math.round(a),h=i[l]+u,d=o[0];Math.abs(c)>h&&(c=c<0?-1:1,c*=Math.ceil(h/u)*u),a<0&&(c+=""===r.vertical?i.height:i.width,o=o.reverse()),s.move(d,c)}else{var p=s.lineHeight/i.height*100;switch(r.lineAlign){case"middle":a-=p/2;break;case"end":a-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],s=new m(t)}var f=function(e,t){for(var s,r=new m(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(s=new m(e),a=l),e=new m(r)}return s||r}(s,o);t.move(f.toCSSCompatValues(i))}function _(){}f.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},f.prototype.formatStyle=function(e,t){return 0===e?0:e+t},g.prototype=t(f.prototype),g.prototype.constructor=g,m.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}},m.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},m.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},m.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},m.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}},m.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)},m.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}},m.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=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||i}},_.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},_.convertCueToDOMTree=function(e,t){return e&&t?h(e,t):null},_.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=e.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var s=[],r=m.getSimpleBoxPosition(n),a={font:Math.round(.05*r.height*100)/100+"px sans-serif"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new g(e,o,a),n.appendChild(i.div),y(0,i,r,s),o.displayState=i.div,s.push(m.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)n.appendChild(t[o].displayState)},_.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},_.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof i))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,o=this;function l(){for(var e=o.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var i=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,o.buffer=e.substr(t),i}e&&(o.buffer+=o.decoder.decode(e,{stream:!0}));try{var u;if("INITIAL"===o.state){if(!/\r\n|\n/.test(o.buffer))return this;var c=(u=l()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new i(i.Errors.BadSignature);o.state="HEADER"}for(var h=!1;o.buffer;){if(!/\r\n|\n/.test(o.buffer))return this;switch(h?h=!1:u=l(),o.state){case"HEADER":/:/.test(u)?(t=u).match(/X-TIMESTAMP-MAP/)?r(t,(function(e,t){"X-TIMESTAMP-MAP"===e&&function(e){var t=new s;r(e,(function(e,i){switch(e){case"MPEGT":t.integer(e+"S",i);break;case"LOCA":t.set(e+"L",n(i))}}),/[^\d]:/,/,/),o.ontimestampmap&&o.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(t)}),/=/):r(t,(function(e,t){"Region"===e&&function(e){var t=new s;if(r(e,(function(e,i){switch(e){case"id":t.set(e,i);break;case"width":t.percent(e,i);break;
2case"lines":t.integer(e,i);break;case"regionanchor":case"viewportanchor":var n=i.split(",");if(2!==n.length)break;var r=new s;if(r.percent("x",n[0]),r.percent("y",n[1]),!r.has("x")||!r.has("y"))break;t.set(e+"X",r.get("x")),t.set(e+"Y",r.get("y"));break;case"scroll":t.alt(e,i,["up"])}}),/=/,/\s/),t.has("id")){var i=new(o.vttjs.VTTRegion||o.window.VTTRegion);i.width=t.get("width",100),i.lines=t.get("lines",3),i.regionAnchorX=t.get("regionanchorX",0),i.regionAnchorY=t.get("regionanchorY",100),i.viewportAnchorX=t.get("viewportanchorX",0),i.viewportAnchorY=t.get("viewportanchorY",100),i.scroll=t.get("scroll",""),o.onregion&&o.onregion(i),o.regionList.push({id:t.get("id"),region:i})}}(t)}),/:/):u||(o.state="ID");continue;case"NOTE":u||(o.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(u)){o.state="NOTE";break}if(!u)continue;if(o.cue=new(o.vttjs.VTTCue||o.window.VTTCue)(0,0,""),o.state="CUE",-1===u.indexOf("--\x3e")){o.cue.id=u;continue}case"CUE":try{a(u,o.cue,o.regionList)}catch(e){o.reportOrThrowError(e),o.cue=null,o.state="BADCUE";continue}o.state="CUETEXT";continue;case"CUETEXT":var d=-1!==u.indexOf("--\x3e");if(!u||d&&(h=!0)){o.oncue&&o.oncue(o.cue),o.cue=null,o.state="ID";continue}o.cue.text&&(o.cue.text+="\n"),o.cue.text+=u;continue;case"BADCUE":u||(o.state="ID");continue}}}catch(e){o.reportOrThrowError(e),"CUETEXT"===o.state&&o.cue&&o.oncue&&o.oncue(o.cue),o.cue=null,o.state="INITIAL"===o.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new i(i.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=_},67506:function(e){var t={"":!0,lr:!0,rl:!0},i={start:!0,middle:!0,end:!0,left:!0,right:!0};function n(e){return"string"==typeof e&&!!i[e.toLowerCase()]&&e.toLowerCase()}function s(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)e[n]=i[n]}return e}function r(e,i,r){var a=this,o=/MSIE\s8\.0/.test(navigator.userAgent),l={};o?a=document.createElement("custom"):l.enumerable=!0,a.hasBeenReset=!1;var u="",c=!1,h=e,d=i,p=r,f=null,g="",m=!0,y="auto",_="start",v=50,b="middle",T=50,S="middle";if(Object.defineProperty(a,"id",s({},l,{get:function(){return u},set:function(e){u=""+e}})),Object.defineProperty(a,"pauseOnExit",s({},l,{get:function(){return c},set:function(e){c=!!e}})),Object.defineProperty(a,"startTime",s({},l,{get:function(){return h},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");h=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",s({},l,{get:function(){return d},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");d=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",s({},l,{get:function(){return p},set:function(e){p=""+e,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",s({},l,{get:function(){return f},set:function(e){f=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",s({},l,{get:function(){return g},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");g=i,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",s({},l,{get:function(){return m},set:function(e){m=!!e,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",s({},l,{get:function(){return y},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("An invalid number or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",s({},l,{get:function(){return _},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");_=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",s({},l,{get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");v=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",s({},l,{get:function(){return b},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");b=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",s({},l,{get:function(){return T},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");T=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",s({},l,{get:function(){return S},set:function(e){var t=n(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");S=t,this.hasBeenReset=!0}})),a.displayState=void 0,o)return a}r.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=r},21666:function(e){var t={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,n=3,s=0,r=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");n=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");s=e}},viewportAnchorY:{enumerable:!0,get:function(){return o}
2,set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a},set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");l=i}}})}},78984:function(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e);class n{constructor(e){let t=this;return t.id=e.id,t.label=t.id,t.width=e.width,t.height=e.height,t.bitrate=e.bandwidth,t.frameRate=e.frameRate,t.enabled_=e.enabled,Object.defineProperty(t,"enabled",{get(){return t.enabled_()},set(e){t.enabled_(e)}}),t}}class s extends i.default.EventTarget{constructor(){super();let e=this;return e.levels_=[],e.selectedIndex_=-1,Object.defineProperty(e,"selectedIndex",{get(){return e.selectedIndex_}}),Object.defineProperty(e,"length",{get(){return e.levels_.length}}),e[Symbol.iterator]=()=>e.levels_.values(),e}addQualityLevel(e){let t=this.getQualityLevelById(e.id);if(t)return t;const i=this.levels_.length;return t=new n(e),""+i in this||Object.defineProperty(this,i,{get(){return this.levels_[i]}}),this.levels_.push(t),this.trigger({qualityLevel:t,type:"addqualitylevel"}),t}removeQualityLevel(e){let t=null;for(let i=0,n=this.length;i<n;i++)if(this[i]===e){t=this.levels_.splice(i,1)[0],this.selectedIndex_===i?this.selectedIndex_=-1:this.selectedIndex_>i&&this.selectedIndex_--;break}return t&&this.trigger({qualityLevel:e,type:"removequalitylevel"}),t}getQualityLevelById(e){for(let t=0,i=this.length;t<i;t++){const i=this[t];if(i.id===e)return i}return null}dispose(){this.selectedIndex_=-1,this.levels_.length=0}}s.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(const e in s.prototype.allowedEvents_)s.prototype["on"+e]=null;var r="4.1.0";const a=function(e){return function(e,t){const i=e.qualityLevels,n=new s,a=function(){n.dispose(),e.qualityLevels=i,e.off("dispose",a)};return e.on("dispose",a),e.qualityLevels=()=>n,e.qualityLevels.VERSION=r,n}(this,i.default.obj.merge({},e))};return i.default.registerPlugin("qualityLevels",a),a.VERSION=r,a}(i(85215))},97612:function(e,t,i){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=t(e);const n=i.default.getComponent("MenuButton"),s=i.default.getComponent("Menu"),r=i.default.getComponent("Component"),a=i.default.dom;class o extends n{constructor(e){super(e,{title:e.localize("Quality"),name:"QualityButton"})}createItems(){return[]}createMenu(){const e=new s(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){const i=a.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.charAt(0).toUpperCase()+t.slice(1)),tabIndex:-1}),n=new r(this.player_,{el:i});this.hideThreshold_+=1,e.addItem(n)}var t;if(this.items=this.createItems(),this.items)for(let t=0;t<this.items.length;t++)e.addItem(this.items[t]);return e}}const l=i.default.getComponent("MenuItem");class u extends l{constructor(e,t,i,n){super(e,{label:t.label,selectable:!0,selected:t.selected||!1}),this.item=t,this.qualityButton=i,this.plugin=n}handleClick(){for(let e=0;e<this.qualityButton.items.length;++e)this.qualityButton.items[e].selected(!1);this.plugin.setQuality(this.item.value),this.selected(!0)}}const c=i.default.getPlugin("plugin"),h={};class d extends c{constructor(e,t){super(e),this.options=i.default.obj.merge(h,t),this.player.ready((()=>{this.player.qualityLevels&&(this.player.addClass("vjs-hls-quality-selector"),this.createQualityButton(),this.bindPlayerEvents())}))}bindPlayerEvents(){this.player.qualityLevels().on("addqualitylevel",this.onAddQualityLevel.bind(this))}createQualityButton(){const e=this.player;this._qualityButton=new o(e);const t=e.controlBar.children().length-2,i=e.controlBar.addChild(this._qualityButton,{componentClass:"qualitySelector"},this.options.placementIndex||t);if(i.addClass("vjs-quality-selector"),this.options.displayCurrentQuality)this.setButtonInnerText(e.localize("Auto"));else{const e=` ${this.options.vjsIconClass||"vjs-icon-hd"}`;i.menuButton_.$(".vjs-icon-placeholder").className+=e}i.removeClass("vjs-hidden")}setButtonInnerText(e){this._qualityButton.menuButton_.$(".vjs-icon-placeholder").innerHTML=e}getQualityMenuItem(e){const t=this.player;return new u(t,e,this._qualityButton,this)}onAddQualityLevel(){const e=this.player.qualityLevels().levels_||[],t=[];for(let i=0;i<e.length;++i){const{width:n,height:s}=e[i],r=n>s?s:n;if(r&&!t.filter((e=>e.item&&e.item.value===r)).length){const e=this.getQualityMenuItem.call(this,{label:r+"p",value:r});t.push(e)}}t.sort(((e,t)=>"object"!=typeof e||"object"!=typeof t||e.item.value<t.item.value?-1:e.item.value>t.item.value?1:0)),t.push(this.getQualityMenuItem.call(this,{label:this.player.localize("Auto"),value:"auto",selected:!0})),this._qualityButton&&(this._qualityButton.createItems=()=>t,this._qualityButton.update())}setQuality(e){const t=this.player.qualityLevels();this._currentQuality=e,this.options.displayCurrentQuality&&this.setButtonInnerText("auto"===e?this.player.localize("Auto"):`${e}p`);for(let i=0;i<t.length;++i){const{width:n,height:s}=t[i],r=n>s?s:n;t[i].enabled=r===e||"auto"===e}this._qualityButton.unpressButton()}getCurrentQuality(){return this._currentQuality||"auto"}}return d.VERSION="2.0.0",i.default.registerPlugin("hlsQualitySelector",d),d}(i(85215))},13407:function(e,t,i){var n=i(58908),s=e.exports={WebVTT:i(63706),VTTCue:i(22230),VTTRegion:i(13710)};n.vttjs=s,n.WebVTT=s.WebVTT;var r=s.VTTCue,a=s.VTTRegion,o=n.VTTCue,l=n.VTTRegion;s.shim=function(){n.VTTCue=r,n.VTTRegion=a},s.restore=function(){n.VTTCue=o,n.VTTRegion=l},n.VTTCue||s.shim()},63706:function(e,t,i){var n=i(89144),s=Object.create||function(){function e(){}return function(t){if(1!==arguments.length)throw new Error("Object.create shim only accepts one parameter.");return e.prototype=t,new e}}();
vendor: 5,387 bytes, line 2
2function r(e,t){this.name="ParsingError",this.code=e.code,this.message=t||e.message}function a(e){function t(e,t,i,n){return 3600*(0|e)+60*(0|t)+(0|i)+(0|n)/1e3}var i=e.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);return i?i[3]?t(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?t(i[1],i[2],0,i[4]):t(0,i[1],i[2],i[4]):null}function o(){this.values=s(null)}function l(e,t,i,n){var s=n?e.split(n):[e];for(var r in s)if("string"==typeof s[r]){var a=s[r].split(i);2===a.length&&t(a[0].trim(),a[1].trim())}}function u(e,t,i){var n=e;function s(){var t=a(e);if(null===t)throw new r(r.Errors.BadTimeStamp,"Malformed timestamp: "+n);return e=e.replace(/^[^\sa-zA-Z-]+/,""),t}function u(){e=e.replace(/^\s+/,"")}if(u(),t.startTime=s(),u(),"--\x3e"!==e.substr(0,3))throw new r(r.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);e=e.substr(3),u(),t.endTime=s(),u(),function(e,t){var n=new o;l(e,(function(e,t){switch(e){case"region":for(var s=i.length-1;s>=0;s--)if(i[s].id===t){n.set(e,i[s].region);break}break;case"vertical":n.alt(e,t,["rl","lr"]);break;case"line":var r=t.split(","),a=r[0];n.integer(e,a),n.percent(e,a)&&n.set("snapToLines",!1),n.alt(e,a,["auto"]),2===r.length&&n.alt("lineAlign",r[1],["start","center","end"]);break;case"position":r=t.split(","),n.percent(e,r[0]),2===r.length&&n.alt("positionAlign",r[1],["start","center","end"]);break;case"size":n.percent(e,t);break;case"align":n.alt(e,t,["start","center","end","left","right"])}}),/:/,/\s/),t.region=n.get("region",null),t.vertical=n.get("vertical","");try{t.line=n.get("line","auto")}catch(e){}t.lineAlign=n.get("lineAlign","start"),t.snapToLines=n.get("snapToLines",!0),t.size=n.get("size",100);try{t.align=n.get("align","center")}catch(e){t.align=n.get("align","middle")}try{t.position=n.get("position","auto")}catch(e){t.position=n.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},t.align)}t.positionAlign=n.get("positionAlign",{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},t.align)}(e,t)}r.prototype=s(Error.prototype),r.prototype.constructor=r,r.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}},o.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,i){return i?this.has(e)?this.values[e]:t[i]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,i){for(var n=0;n<i.length;++n)if(t===i[n]){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]*)?%$/)&&(t=parseFloat(t))>=0&&t<=100)&&(this.set(e,t),!0)}};var c=n.createElement&&n.createElement("textarea"),h={c:"span",i:"i",b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},d={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)"},p={v:"title",lang:"lang"},f={rt:"ruby"};function g(e,t){function i(){if(!t)return null;var e,i=t.match(/^([^<]*)(<[^>]*>?)?/);return e=i[1]?i[1]:i[2],t=t.substr(e.length),e}function n(e,t){return!f[t.localName]||f[t.localName]===e.localName}function s(t,i){var n=h[t];if(!n)return null;var s=e.document.createElement(n),r=p[t];return r&&i&&(s[r]=i.trim()),s}for(var r,o,l=e.document.createElement("div"),u=l,g=[];null!==(r=i());)if("<"!==r[0])u.appendChild(e.document.createTextNode((o=r,c.innerHTML=o,o=c.textContent,c.textContent="",o)));else{if("/"===r[1]){g.length&&g[g.length-1]===r.substr(2).replace(">","")&&(g.pop(),u=u.parentNode);continue}var m,y=a(r.substr(1,r.length-2));if(y){m=e.document.createProcessingInstruction("timestamp",y),u.appendChild(m);continue}var _=r.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/);if(!_)continue;if(!(m=s(_[1],_[3])))continue;if(!n(u,m))continue;if(_[2]){var v=_[2].split(".");v.forEach((function(e){var t=/^bg_/.test(e),i=t?e.slice(3):e;if(d.hasOwnProperty(i)){var n=t?"background-color":"color",s=d[i];m.style[n]=s}})),m.className=v.join(" ")}g.push(_[1]),u.appendChild(m),u=m}return l}var m=[[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
vendor: 7,857 bytes, line 2
2],[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 y(e){for(var t=0;t<m.length;t++){var i=m[t];if(e>=i[0]&&e<=i[1])return!0}return!1}function _(e){var t=[],i="";if(!e||!e.childNodes)return"ltr";function n(e,t){for(var i=t.childNodes.length-1;i>=0;i--)e.push(t.childNodes[i])}function s(e){if(!e||!e.length)return null;var t=e.pop(),i=t.textContent||t.innerText;if(i){var r=i.match(/^.*(\n|\r)/);return r?(e.length=0,r[0]):i}return"ruby"===t.tagName?s(e):t.childNodes?(n(e,t),s(e)):void 0}for(n(t,e);i=s(t);)for(var r=0;r<i.length;r++)if(y(i.charCodeAt(r)))return"rtl";return"ltr"}function v(){}function b(e,t,i){v.call(this),this.cue=t,this.cueDiv=g(e,t.text);var n={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"};this.applyStyles(n,this.cueDiv),this.div=e.document.createElement("div"),n={direction:_(this.cueDiv),writingMode:""===t.vertical?"horizontal-tb":"lr"===t.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===t.align?"center":t.align,font:i.font,whiteSpace:"pre-line",position:"absolute"},this.applyStyles(n),this.div.appendChild(this.cueDiv);var s=0;switch(t.positionAlign){case"start":case"line-left":s=t.position;break;case"center":s=t.position-t.size/2;break;case"end":case"line-right":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 T(e){var t,i,n,s;if(e.div){i=e.div.offsetHeight,n=e.div.offsetWidth,s=e.div.offsetTop;var r=(r=e.div.childNodes)&&(r=r[0])&&r.getClientRects&&r.getClientRects();e=e.div.getBoundingClientRect(),t=r?Math.max(r[0]&&r[0].height||0,e.height/r.length):0}this.left=e.left,this.right=e.right,this.top=e.top||s,this.height=e.height||i,this.bottom=e.bottom||s+(e.height||i),this.width=e.width||n,this.lineHeight=void 0!==t?t:e.lineHeight}function S(e,t,i,n){var s=new T(t),r=t.cue,a=function(e){if("number"==typeof e.line&&(e.snapToLines||e.line>=0&&e.line<=100))return e.line;if(!e.track||!e.track.textTrackList||!e.track.textTrackList.mediaElement)return-1;for(var t=e.track,i=t.textTrackList,n=0,s=0;s<i.length&&i[s]!==t;s++)"showing"===i[s].mode&&n++;return-1*++n}(r),o=[];if(r.snapToLines){var l;switch(r.vertical){case"":o=["+y","-y"],l="height";break;case"rl":o=["+x","-x"],l="width";break;case"lr":o=["-x","+x"],l="width"}var u=s.lineHeight,c=u*Math.round(a),h=i[l]+u,d=o[0];Math.abs(c)>h&&(c=c<0?-1:1,c*=Math.ceil(h/u)*u),a<0&&(c+=""===r.vertical?i.height:i.width,o=o.reverse()),s.move(d,c)}else{var p=s.lineHeight/i.height*100;switch(r.lineAlign){case"center":a-=p/2;break;case"end":a-=p}switch(r.vertical){case"":t.applyStyles({top:t.formatStyle(a,"%")});break;case"rl":t.applyStyles({left:t.formatStyle(a,"%")});break;case"lr":t.applyStyles({right:t.formatStyle(a,"%")})}o=["+y","-x","+x","-y"],s=new T(t)}var f=function(e,t){for(var s,r=new T(e),a=1,o=0;o<t.length;o++){for(;e.overlapsOppositeAxis(i,t[o])||e.within(i)&&e.overlapsAny(n);)e.move(t[o]);if(e.within(i))return e;var l=e.intersectPercentage(i);a>l&&(s=new T(e),a=l),e=new T(r)}return s||r}(s,o);t.move(f.toCSSCompatValues(i))}function k(){}v.prototype.applyStyles=function(e,t){for(var i in t=t||this.div,e)e.hasOwnProperty(i)&&(t.style[i]=e[i])},v.prototype.formatStyle=function(e,t){return 0===e?0:e+t},b.prototype=s(v.prototype),b.prototype.constructor=b,T.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}},T.prototype.overlaps=function(e){return this.left<e.right&&this.right>e.left&&this.top<e.bottom&&this.bottom>e.top},T.prototype.overlapsAny=function(e){for(var t=0;t<e.length;t++)if(this.overlaps(e[t]))return!0;return!1},T.prototype.within=function(e){return this.top>=e.top&&this.bottom<=e.bottom&&this.left>=e.left&&this.right<=e.right},T.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}},T.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)},T.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}},T.getSimpleBoxPosition=function(e){var t=e.div?e.div.offsetHeight:e.tagName?e.offsetHeight:0,i=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||i}},k.StringDecoder=function(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}},k.convertCueToDOMTree=function(e,t){return e&&t?g(e,t):null},k.processCues=function(e,t,i){if(!e||!t||!i)return null;for(;i.firstChild;)i.removeChild(i.firstChild);var n=e.document.createElement("div");if(n.style.position="absolute",n.style.left="0",n.style.right="0",n.style.top="0",n.style.bottom="0",n.style.margin="1.5%",i.appendChild(n),function(e){for(var t=0;t<e.length;t++)if(e[t].hasBeenReset||!e[t].displayState)return!0;return!1}(t)){var s=[],r=T.getSimpleBoxPosition(n),a={font:Math.round(.05*r.height*100)/100+"px sans-serif"};!function(){for(var i,o,l=0;l<t.length;l++)o=t[l],i=new b(e,o,a),n.appendChild(i.div),S(0,i,r,s),o.displayState=i.div,s.push(T.getSimpleBoxPosition(i))}()}else for(var o=0;o<t.length;o++)n.appendChild(t[o].displayState)},k.Parser=function(e,t,i){i||(i=t,t={}),t||(t={}),this.window=e,this.vttjs=t,this.state="INITIAL",this.buffer="",this.decoder=i||new TextDecoder("utf8"),this.regionList=[]},k.Parser.prototype={reportOrThrowError:function(e){if(!(e instanceof r))throw e;this.onparsingerror&&this.onparsingerror(e)},parse:function(e){var t,i=this;function n(){for(var e=i.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,i.buffer=e.substr(t),n}e&&(i.buffer+=i.decoder.decode(e,{stream:!0}));try{var s;if("INITIAL"===i.state){if(!/\r\n|\n/.test(i.buffer))return this;var c=(s=n()).match(/^WEBVTT([ \t].*)?$/);if(!c||!c[0])throw new r(r.Errors.BadSignature);i.state="HEADER"}for(var h=!1;i.buffer;){if(!/\r\n|\n/.test(i.buffer))return this;switch(h?h=!1:s=n(),i.state){case"HEADER":/:/.test(s)?(t=s).match(/X-TIMESTAMP-MAP/)?l(t,(function(e,t){"X-TIMESTAMP-MAP"===e&&function(e){var t=new o;l(e,(function(e,i){switch(e){case"MPEGT":t.integer(e+"S",i);break;case"LOCA":t.set(e+"L",a(i))}}),/[^\d]:/,/,/),i.ontimestampmap&&i.ontimestampmap({MPEGTS:t.get("MPEGTS"),LOCAL:t.get("LOCAL")})}(t)}),/=/):l(t,(function(e,t){"Region"===e&&function(e){var t=new o;if(l(e,(function(e,i){switch(e){case"id":t.set(e,i);break;case"width":t.percent(e,i);break;
vendor: 5,382 bytes, line 2
2case"lines":t.integer(e,i);break;case"regionanchor":case"viewportanchor":var n=i.split(",");if(2!==n.length)break;var s=new o;if(s.percent("x",n[0]),s.percent("y",n[1]),!s.has("x")||!s.has("y"))break;t.set(e+"X",s.get("x")),t.set(e+"Y",s.get("y"));break;case"scroll":t.alt(e,i,["up"])}}),/=/,/\s/),t.has("id")){var n=new(i.vttjs.VTTRegion||i.window.VTTRegion);n.width=t.get("width",100),n.lines=t.get("lines",3),n.regionAnchorX=t.get("regionanchorX",0),n.regionAnchorY=t.get("regionanchorY",100),n.viewportAnchorX=t.get("viewportanchorX",0),n.viewportAnchorY=t.get("viewportanchorY",100),n.scroll=t.get("scroll",""),i.onregion&&i.onregion(n),i.regionList.push({id:t.get("id"),region:n})}}(t)}),/:/):s||(i.state="ID");continue;case"NOTE":s||(i.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(s)){i.state="NOTE";break}if(!s)continue;i.cue=new(i.vttjs.VTTCue||i.window.VTTCue)(0,0,"");try{i.cue.align="center"}catch(e){i.cue.align="middle"}if(i.state="CUE",-1===s.indexOf("--\x3e")){i.cue.id=s;continue}case"CUE":try{u(s,i.cue,i.regionList)}catch(e){i.reportOrThrowError(e),i.cue=null,i.state="BADCUE";continue}i.state="CUETEXT";continue;case"CUETEXT":var d=-1!==s.indexOf("--\x3e");if(!s||d&&(h=!0)){i.oncue&&i.oncue(i.cue),i.cue=null,i.state="ID";continue}i.cue.text&&(i.cue.text+="\n"),i.cue.text+=s.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case"BADCUE":s||(i.state="ID");continue}}}catch(e){i.reportOrThrowError(e),"CUETEXT"===i.state&&i.cue&&i.oncue&&i.oncue(i.cue),i.cue=null,i.state="INITIAL"===i.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var e=this;try{if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse()),"INITIAL"===e.state)throw new r(r.Errors.BadSignature)}catch(t){e.reportOrThrowError(t)}return e.onflush&&e.onflush(),this}},e.exports=k},22230:function(e){var t={"":1,lr:1,rl:1},i={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};function n(e){return"string"==typeof e&&!!i[e.toLowerCase()]&&e.toLowerCase()}function s(e,i,s){this.hasBeenReset=!1;var r="",a=!1,o=e,l=i,u=s,c=null,h="",d=!0,p="auto",f="start",g="auto",m="auto",y=100,_="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return r},set:function(e){r=""+e}},pauseOnExit:{enumerable:!0,get:function(){return a},set:function(e){a=!!e}},startTime:{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");o=e,this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return u},set:function(e){u=""+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 h},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===i)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified.");h=i,this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return d},set:function(e){d=!!e,this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&"auto"!==e)throw new SyntaxError("Line: an invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return f},set:function(e){var t=n(e);t?(f=t,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}},position:{enumerable:!0,get:function(){return g},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");g=e,this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return m},set:function(e){var t=n(e);t?(m=t,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return y},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");y=e,this.hasBeenReset=!0}},align:{enumerable:!0,get:function(){return _},set:function(e){var t=n(e);if(!t)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");_=t,this.hasBeenReset=!0}}}),this.displayState=void 0}s.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)},e.exports=s},13710:function(e){var t={"":!0,up:!0};function i(e){return"number"==typeof e&&e>=0&&e<=100}e.exports=function(){var e=100,n=3,s=0,r=100,a=0,o=100,l="";Object.defineProperties(this,{width:{enumerable:!0,get:function(){return e},set:function(t){if(!i(t))throw new Error("Width must be between 0 and 100.");e=t}},lines:{enumerable:!0,get:function(){return n},set:function(e){if("number"!=typeof e)throw new TypeError("Lines must be set to a number.");n=e}},regionAnchorY:{enumerable:!0,get:function(){return r},set:function(e){if(!i(e))throw new Error("RegionAnchorX must be between 0 and 100.");r=e}},regionAnchorX:{enumerable:!0,get:function(){return s},set:function(e){if(!i(e))throw new Error("RegionAnchorY must be between 0 and 100.");s=e}},viewportAnchorY:{enumerable:!0,get:function(){return o},set:function(e){if(!i(e))throw new Error("ViewportAnchorY must be between 0 and 100.");o=e}},viewportAnchorX:{enumerable:!0,get:function(){return a}
2,set:function(e){if(!i(e))throw new Error("ViewportAnchorX must be between 0 and 100.");a=e}},scroll:{enumerable:!0,get:function(){return l},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);!1===i?console.warn("Scroll: an invalid or illegal string was specified."):l=i}}})}},32213:function(e,t,i){"use strict";i.d(t,{MD:function(){return c},rO:function(){return s}});var n=i(85215),s=(i(78984),i(97612),i(80517),class{#e;constructor(e){this.#e=e.baseUrl.replace(/\/$/,"")}resolve(e){return{src:`${this.#e}/${e}/manifest/video.m3u8`,type:"application/x-mpegURL"}}});const r=n.default,a=new Set,o="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";let l=null;function u(){return l||(l=new Promise((e=>{if(window.cast?.framework)return void e();const t=document.createElement("script");t.src=o,t.onload=()=>e(),t.onerror=()=>e(),document.head.appendChild(t)})),l)}function c(e,t,i={}){const{autoplay:n=!1,poster:o,onTrack:l,skin:c="vjs-erf-skin",initialTime:h}=i,d=function(e){if(e.provider)return e.provider;if(e.streamBaseUrl)return new s({baseUrl:e.streamBaseUrl});throw new Error("[erf/player] No provider configured. Pass a provider or streamBaseUrl option.")}(i),p=document.createElement("video");p.className=`video-js vjs-default-skin ${c}`,p.setAttribute("x-webkit-airplay","allow"),e.classList.add("erf-player-container"),e.appendChild(p);const f=r(p,{autoplay:n,poster:o,controls:!0,fluid:!0});u();const g=new Map;function m(e){g.get(e)?.forEach((e=>e()))}function y(e){Promise.resolve(d.resolve(e)).then((e=>{f.src(e)}))}f.ready((()=>{f.hlsQualitySelector({displayCurrentQuality:!1}),l&&function(e,t){const i=e.el().querySelector("video");i&&i.addEventListener("webkitcurrentplaybacktargetisairplaychanged",(()=>{const e=i.webkitCurrentPlaybackTargetIsAirPlay;t({type:e?"airplay_start":"airplay_end"})}))}(f,l),u().then((()=>{try{const e=window,t=f.getChild("ControlBar");e.chrome?.cast&&t&&(t.addChild("ChromeCastButton",{},t.children().length-2),l&&function(e){const t=window.cast?.framework;if(!t?.CastContext||!t.CastContextEventType||!t.SessionState)return;const i=t.CastContext.getInstance(),{SESSION_STATE_CHANGED:n}=t.CastContextEventType,{SESSION_STARTED:s,SESSION_RESUMED:r,SESSION_ENDED:a}=t.SessionState;i.addEventListener(n,(t=>{const i=t.detail?.sessionState;i===s||i===r?e({type:"cast_start"}):i===a&&e({type:"cast_end"})}))}(l))}catch{}})),h&&f.currentTime(h),m("ready")})),f.on("play",(()=>{!function(e){for(const t of a)t!==e&&t.pause()}(_),m("play")})),f.on("pause",(()=>m("pause"))),f.on("ended",(()=>m("complete"))),l&&function(e,t){e.on("play",(()=>{t({type:"play",duration:e.duration()??void 0,currentTime:e.currentTime()??void 0})})),e.on("pause",(()=>{t({type:"pause",currentTime:e.currentTime()??void 0,percent:e.duration()?Math.round((e.currentTime()??0)/e.duration()*100):void 0})})),e.on("ended",(()=>{t({type:"ended",duration:e.duration()??void 0})})),e.on("seeked",(()=>{t({type:"seek",currentTime:e.currentTime()??void 0})}))}(f,l),y(t);const _={changeSource(e){y(e)},pause(){f.pause()},seekTo(e){f.currentTime(e)},on(e,t){return g.has(e)||g.set(e,new Set),g.get(e).add(t),()=>g.get(e)?.delete(t)},dispose(){!function(e){a.delete(e)}(_),f.dispose()}};return function(e){a.add(e)}(_),_}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.