vendor: 4,383 bytes, lines 1-25
1/* 2 3 Video.js 8.20.0 <http://videojs.com/> 4 Copyright Brightcove, Inc. <https://www.brightcove.com/> 5 Available under Apache License Version 2.0 6 <https://github.com/videojs/video.js/blob/main/LICENSE> 7 8 Includes vtt.js <https://github.com/mozilla/vtt.js> 9 Available under Apache License Version 2.0 10 <https://github.com/mozilla/vtt.js/blob/main/LICENSE> 11 12 slighly modified parse-headers 2.0.2 <https://github.com/kesla/parse-headers/> 13 Copyright (c) 2014 David Björklund 14 Available under the MIT license 15 <https://github.com/kesla/parse-headers/blob/master/LICENCE> 16 @name videojs-contrib-quality-levels @version 4.1.0 @license Apache-2.0 @name m3u8-parser @version 7.2.0 @license Apache-2.0 @name mpd-parser @version 1.3.1 @license Apache-2.0 @name @videojs/http-streaming @version 3.16.0 @license Apache-2.0 @name pkcs7 @version 1.0.4 @license Apache-2.0 @name aes-decrypter @version 4.0.2 @license Apache-2.0 @name videojs-overlay @version 2.1.4 @license Apache-2.0 */ 17var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(w){var C=0;return function(){return C<w.length?{done:!1,value:w[C++]}:{done:!0}}};$jscomp.arrayIterator=function(w){return{next:$jscomp.arrayIteratorImpl(w)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1; 18$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(w,C,K){if(w==Array.prototype||w==Object.prototype)return w;w[C]=K.value;return w};$jscomp.getGlobal=function(w){w=["object"==typeof globalThis&&globalThis,w,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var C=0;C<w.length;++C){var K=w[C];if(K&&K.Math==Math)return K}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this); 19$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(w,C){var K=$jscomp.propertyToPolyfillSymbol[C];if(null==K)return w[C];K=w[K];return void 0!==K?K:w[C]}; 20$jscomp.polyfill=function(w,C,K,R){C&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(w,C,K,R):$jscomp.polyfillUnisolated(w,C,K,R))};$jscomp.polyfillUnisolated=function(w,C,K,R){K=$jscomp.global;w=w.split(".");for(R=0;R<w.length-1;R++){var Z=w[R];if(!(Z in K))return;K=K[Z]}w=w[w.length-1];R=K[w];C=C(R);C!=R&&null!=C&&$jscomp.defineProperty(K,w,{configurable:!0,writable:!0,value:C})}; 21$jscomp.polyfillIsolated=function(w,C,K,R){var Z=w.split(".");w=1===Z.length;R=Z[0];R=!w&&R in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var B=0;B<Z.length-1;B++){var da=Z[B];if(!(da in R))return;R=R[da]}Z=Z[Z.length-1];K=$jscomp.IS_SYMBOL_NATIVE&&"es6"===K?R[Z]:null;C=C(K);null!=C&&(w?$jscomp.defineProperty($jscomp.polyfills,Z,{configurable:!0,writable:!0,value:C}):C!==K&&(void 0===$jscomp.propertyToPolyfillSymbol[Z]&&($jscomp.propertyToPolyfillSymbol[Z]=$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(Z): 22$jscomp.POLYFILL_PREFIX+Z),Z=$jscomp.propertyToPolyfillSymbol[Z],$jscomp.defineProperty(R,Z,{configurable:!0,writable:!0,value:C})))};$jscomp.initSymbol=function(){}; 23$jscomp.polyfill("Symbol",function(w){if(w)return w;var C=function(Z,B){this.$jscomp$symbol$id_=Z;$jscomp.defineProperty(this,"description",{configurable:!0,writable:!0,value:B})};C.prototype.toString=function(){return this.$jscomp$symbol$id_};var K=0,R=function(Z){if(this instanceof R)throw new TypeError("Symbol is not a constructor");return new C("jscomp_symbol_"+(Z||"")+"_"+K++,Z)};return R},"es6","es3"); 24$jscomp.polyfill("Symbol.iterator",function(w){if(w)return w;w=Symbol("Symbol.iterator");for(var C="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),K=0;K<C.length;K++){var R=$jscomp.global[C[K]];"function"===typeof R&&"function"!=typeof R.prototype[w]&&$jscomp.defineProperty(R.prototype,w,{configurable:!0,writable:!0,value:function(){return $jscomp.iteratorPrototype($jscomp.arrayIteratorImpl(this))}})}return w},"es6", 25"es3");
25$jscomp.iteratorPrototype=function(w){w={next:w};w[Symbol.iterator]=function(){return this};return w};$jscomp.createTemplateTagFirstArg=function(w){return w.raw=w};$jscomp.createTemplateTagFirstArgWithRaw=function(w,C){w.raw=C;return w};$jscomp.makeIterator=function(w){var C="undefined"!=typeof Symbol&&Symbol.iterator&&w[Symbol.iterator];return C?C.call(w):$jscomp.arrayIterator(w)};$jscomp.arrayFromIterator=function(w){for(var C,K=[];!(C=w.next()).done;)K.push(C.value);return K}; 26$jscomp.arrayFromIterable=function(w){return w instanceof Array?w:$jscomp.arrayFromIterator($jscomp.makeIterator(w))};$jscomp.objectCreate=$jscomp.ASSUME_ES5||"function"==typeof Object.create?Object.create:function(w){var C=function(){};C.prototype=w;return new C}; 27$jscomp.getConstructImplementation=function(){function w(){function K(){}new K;Reflect.construct(K,[],function(){});return new K instanceof K}if($jscomp.TRUST_ES6_POLYFILLS&&"undefined"!=typeof Reflect&&Reflect.construct){if(w())return Reflect.construct;var C=Reflect.construct;return function(K,R,Z){K=C(K,R);Z&&Reflect.setPrototypeOf(K,Z.prototype);return K}}return function(K,R,Z){void 0===Z&&(Z=K);Z=$jscomp.objectCreate(Z.prototype||Object.prototype);return Function.prototype.apply.call(K,Z,R)|| 28Z}};$jscomp.construct={valueOf:$jscomp.getConstructImplementation}.valueOf();$jscomp.underscoreProtoCanBeSet=function(){var w={a:!0},C={};try{return C.__proto__=w,C.a}catch(K){}return!1};$jscomp.setPrototypeOf=$jscomp.TRUST_ES6_POLYFILLS&&"function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(w,C){w.__proto__=C;if(w.__proto__!==C)throw new TypeError(w+" is not extensible");return w}:null; 29$jscomp.inherits=function(w,C){w.prototype=$jscomp.objectCreate(C.prototype);w.prototype.constructor=w;if($jscomp.setPrototypeOf){var K=$jscomp.setPrototypeOf;K(w,C)}else for(K in C)if("prototype"!=K)if(Object.defineProperties){var R=Object.getOwnPropertyDescriptor(C,K);R&&Object.defineProperty(w,K,R)}else w[K]=C[K];w.superClass_=C.prototype}; 30(function(w,C){"object"===typeof exports&&"undefined"!==typeof module?module.exports=C():"function"===typeof define&&define.amd?define(C):(w="undefined"!==typeof globalThis?globalThis:w||self,w.videojs=C())})(this,function(){function w(a,c,e){function g(d){for(var f=[],h=0;h<arguments.length;++h)f[h-0]=arguments[h];b("log",l,f)}c=void 0===c?":":c;e=void 0===e?"":e;var l="info";var b=Om(a,g,e);g.createLogger=function(d,f,h){f=void 0!==f?f:c;return w("QVC AEM Commerce Package - Designs Non Transactional "+ 31f+" "+d,f,void 0!==h?h:e)};g.createNewLogger=function(d,f,h){return w(d,f,h)};g.levels={all:"debug|log|warn|error",off:"",debug:"debug|log|warn|error",info:"log|warn|error",warn:"warn|error",error:"error",DEFAULT:l};g.level=function(d){if("string"===typeof d){if(!g.levels.hasOwnProperty(d))throw Error('"'+d+'" in not a valid log level');l=d}return l};g.history=function(){return Jb?[].concat(Jb):[]};g.history.filter=function(d){return(Jb||[]).filter(function(f){return(new RegExp(".*"+d+".*")).test(f[0])})}; 32g.history.clear=function(){Jb&&(Jb.length=0)};g.history.disable=function(){null!==Jb&&(Jb.length=0,Jb=null)};g.history.enable=function(){null===Jb&&(Jb=[])};g.error=function(d){for(var f=[],h=0;h<arguments.length;++h)f[h-0]=arguments[h];return b("error",l,f)};g.warn=function(d){for(var f=[],h=0;h<arguments.length;++h)f[h-0]=arguments[h];return b("warn",l,f)};g.debug=function(d){for(var f=[],h=0;h<arguments.length;++h)f[h-0]=arguments[h];return b("debug",l,f)};return g}function C(a,c){Ei(a).forEach(function(e){return c(a[e], 33e)})}function K(a,c,e){e=void 0===e?0:e;return Ei(a).reduce(function(g,l){return c(g,a[l],l)},e)}function R(a){return!!a&&"object"===typeof a}function Z(a){return R(a)&&"[object Object]"===Pm.call(a)&&a.constructor===Object}function B(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];var g={};
33c.forEach(function(l){l&&C(l,function(b,d){Z(b)?(Z(g[d])||(g[d]={}),g[d]=B(g[d],b)):g[d]=b})});return g}function da(a){a=void 0===a?{}:a;var c=[],e;for(e in a)a.hasOwnProperty(e)&&c.push(a[e]);return c} 34function pa(a,c,e,g){var l=function(d){return Object.defineProperty(a,c,{value:d,enumerable:!0,writable:!0})},b={configurable:!0,enumerable:!0,get:function(){var d=e();l(d);return d}};if(void 0===g||g)b.set=l;return Object.defineProperty(a,c,b)}function va(){return document===window.document}function Y(a){return R(a)&&1===a.nodeType}function aa(){try{return window.parent!==window.self}catch(a){return!0}}function qa(a){return function(c,e){if("string"!==typeof c||!c.trim())return document[a](null); 35"string"===typeof e&&e.trim()&&(e=document.querySelector(e));e=Y(e)?e:document;return e[a]&&e[a](c)}}function Q(a,c,e,g){c=void 0===c?{}:c;e=void 0===e?{}:e;var l=document.createElement(void 0===a?"div":a);Object.getOwnPropertyNames(c).forEach(function(b){var d=c[b];if("textContent"===b)la(l,d);else if(l[b]!==d||"tabIndex"===b)l[b]=d});Object.getOwnPropertyNames(e).forEach(function(b){l.setAttribute(b,e[b])});g&&Kg(l,g);return l}function la(a,c){"undefined"===typeof a.textContent?a.innerText=c:a.textContent= 36c;return a}function na(a,c){c.firstChild?c.insertBefore(a,c.firstChild):c.appendChild(a)}function Ca(a,c){if(0<=c.indexOf(" "))throw Error("class has illegal whitespace characters");return a.classList.contains(c)}function Ya(a,c){for(var e=[],g=1;g<arguments.length;++g)e[g-1]=arguments[g];a.classList.add.apply(a.classList,$jscomp.arrayFromIterable(e.reduce(function(l,b){return l.concat(b.split(/\s+/))},[])));return a}function ic(a,c){for(var e=[],g=1;g<arguments.length;++g)e[g-1]=arguments[g];if(!a)return sa.warn("removeClass was called with an element that doesn't exist"), 37null;a.classList.remove.apply(a.classList,$jscomp.arrayFromIterable(e.reduce(function(l,b){return l.concat(b.split(/\s+/))},[])));return a}function gf(a,c,e){"function"===typeof e&&(e=e(a,c));"boolean"!==typeof e&&(e=void 0);c.split(/\s+/).forEach(function(g){return a.classList.toggle(g,e)});return a}function Fi(a,c){Object.getOwnPropertyNames(c).forEach(function(e){var g=c[e];null===g||"undefined"===typeof g||!1===g?a.removeAttribute(e):a.setAttribute(e,!0===g?"":g)})}function Nc(a){var c={},e="autoplay controls playsinline loop muted default defaultMuted".split(" "); 38if(a&&a.attributes&&0<a.attributes.length){a=a.attributes;for(var g=a.length-1;0<=g;g--){var l=a[g].name,b=a[g].value;e.includes(l)&&(b=null!==b?!0:!1);c[l]=b}}return c}function Gi(){document.body.focus();document.onselectstart=function(){return!1}}function Hi(){document.onselectstart=function(){return!0}}function yd(a){if(a&&a.getBoundingClientRect&&a.parentNode){var c=a.getBoundingClientRect(),e={};"bottom height left right top width".split(" ").forEach(function(g){void 0!==c[g]&&(e[g]=c[g])}); 39e.height||(e.height=parseFloat(zd(a,"height")));e.width||(e.width=parseFloat(zd(a,"width")));return e}}function oe(a){if(!a||a&&!a.offsetParent)return{left:0,top:0,width:0,height:0};for(var c=a.offsetWidth,e=a.offsetHeight,g=0,l=0;a.offsetParent&&a!==document[hf.fullscreenElement];)g+=a.offsetLeft,l+=a.offsetTop,a=a.offsetParent;return{left:g,top:l,width:c,height:e}}function jf(a,c){var e=0,g=0;if(yb)for(var l=a;l&&"html"!==l.nodeName.toLowerCase();){var b=zd(l,"transform");/^matrix/.test(b)?(b=b.slice(7,
40-1).split(/,\s/).map(Number),e+=b[4],g+=b[5]):/^matrix3d/.test(b)&&(b=b.slice(9,-1).split(/,\s/).map(Number),e+=b[12],g+=b[13]);l.assignedSlot&&l.assignedSlot.parentElement&&window.WebKitCSSMatrix&&(b=window.getComputedStyle(l.assignedSlot.parentElement).transform,b=new window.WebKitCSSMatrix(b),e+=b.m41,g+=b.m42);l=l.parentNode||l.host}l={};b=oe(c.target);a=oe(a);var d=a.width,f=a.height,h=c.offsetY-(a.top-b.top);b=c.offsetX-(a.left-b.left);c.changedTouches&&(b=c.changedTouches[0].pageX-a.left,h= 41c.changedTouches[0].pageY+a.top,yb&&(b-=e,h-=g));l.y=1-Math.max(0,Math.min(1,h/f));l.x=Math.max(0,Math.min(1,b/d));return l}function Ii(a){return R(a)&&3===a.nodeType}function kf(a){for(;a.firstChild;)a.removeChild(a.firstChild);return a}function Ji(a){"function"===typeof a&&(a=a());return(Array.isArray(a)?a:[a]).map(function(c){"function"===typeof c&&(c=c());if(Y(c)||Ii(c))return c;if("string"===typeof c&&/\S/.test(c))return document.createTextNode(c)}).filter(function(c){return c})}function Kg(a, 42c){Ji(c).forEach(function(e){return a.appendChild(e)});return a}function Ki(a,c){return Kg(kf(a),c)}function pe(a){return void 0===a.button&&void 0===a.buttons||0===a.button&&void 0===a.buttons||"mouseup"===a.type&&0===a.button&&0===a.buttons||"mousedown"===a.type&&0===a.button&&0===a.buttons?!0:0!==a.button||1!==a.buttons?!1:!0}function zd(a,c){if(!a||!c)return"";if("function"===typeof window.getComputedStyle){try{var e=window.getComputedStyle(a)}catch(g){return""}return e?e.getPropertyValue(c)|| 43e[c]:""}return""}function Li(a){[].concat($jscomp.arrayFromIterable(document.styleSheets)).forEach(function(c){try{var e=[].concat($jscomp.arrayFromIterable(c.cssRules)).map(function(l){return l.cssText}).join(""),g=document.createElement("style");g.textContent=e;a.document.head.appendChild(g)}catch(l){e=document.createElement("link"),e.rel="stylesheet",e.type=c.type,e.media=c.media.mediaText,e.href=c.href,a.document.head.appendChild(e)}})}function Lg(a,c){va()&&(c&&(Mg=c),window.setTimeout(Qm,a))} 44function Ng(){Mi=!0;window.removeEventListener("load",Ng)}function Ni(a,c){if(zb.has(a)){var e=zb.get(a);0===e.handlers[c].length&&(delete e.handlers[c],a.removeEventListener?a.removeEventListener(c,e.dispatcher,!1):a.detachEvent&&a.detachEvent("on"+c,e.dispatcher));0>=Object.getOwnPropertyNames(e.handlers).length&&(delete e.handlers,delete e.dispatcher,delete e.disabled);0===Object.getOwnPropertyNames(e).length&&zb.delete(a)}}function Og(a,c,e,g){e.forEach(function(l){a(c,l,g)})}function lf(a){function c(){return!0} 45function e(){return!1}if(a.fixed_)return a;
45if(!a||!a.isPropagationStopped||!a.isImmediatePropagationStopped){var g=a||window.event;a={};var l="layerX layerY keyLocation path webkitMovementX webkitMovementY mozPressure mozInputSource".split(" ");for(b in g)l.includes(b)||"returnValue"===b&&g.preventDefault||(a[b]=g[b]);a.target||(a.target=a.srcElement||document);a.relatedTarget||(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);a.preventDefault=function(){g.preventDefault&&g.preventDefault(); 46a.returnValue=!1;g.returnValue=!1;a.defaultPrevented=!0};a.defaultPrevented=!1;a.stopPropagation=function(){g.stopPropagation&&g.stopPropagation();a.cancelBubble=!0;g.cancelBubble=!0;a.isPropagationStopped=c};a.isPropagationStopped=e;a.stopImmediatePropagation=function(){g.stopImmediatePropagation&&g.stopImmediatePropagation();a.isImmediatePropagationStopped=c;a.stopPropagation()};a.isImmediatePropagationStopped=e;if(null!==a.clientX&&void 0!==a.clientX){l=document.documentElement;var b=document.body; 47a.pageX=a.clientX+(l&&l.scrollLeft||b&&b.scrollLeft||0)-(l&&l.clientLeft||b&&b.clientLeft||0);a.pageY=a.clientY+(l&&l.scrollTop||b&&b.scrollTop||0)-(l&&l.clientTop||b&&b.clientTop||0)}a.which=a.charCode||a.keyCode;null!==a.button&&void 0!==a.button&&(a.button=a.button&1?0:a.button&4?1:a.button&2?2:0)}a.fixed_=!0;return a}function Qb(a,c,e){if(Array.isArray(c))return Og(Qb,a,c,e);zb.has(a)||zb.set(a,{});var g=zb.get(a);g.handlers||(g.handlers={});g.handlers[c]||(g.handlers[c]=[]);e.guid||(e.guid=Vb++); 48g.handlers[c].push(e);
48g.dispatcher||(g.disabled=!1,g.dispatcher=function(l,b){if(!g.disabled){l=lf(l);var d=g.handlers[l.type];if(d){d=d.slice(0);for(var f=0,h=d.length;f<h&&!l.isImmediatePropagationStopped();f++)try{d[f].call(a,l,b)}catch(m){sa.error(m)}}}});1===g.handlers[c].length&&(a.addEventListener?(e=!1,Rm()&&-1<Sm.indexOf(c)&&(e={passive:!0}),a.addEventListener(c,g.dispatcher,e)):a.attachEvent&&a.attachEvent("on"+c,g.dispatcher))}function tb(a,c,e){if(zb.has(a)){var g=zb.get(a);if(g.handlers){if(Array.isArray(c))return Og(tb, 49a,c,e);if(void 0===c)for(var l in g.handlers)Object.prototype.hasOwnProperty.call(g.handlers||{},l)&&(c=a,e=l,g.handlers[e]=[],Ni(c,e));else if(l=g.handlers[c]){if(!e)g.handlers[c]=[];else if(e.guid)for(g=0;g<l.length;g++)l[g].guid===e.guid&&l.splice(g--,1);Ni(a,c)}}}}function Ad(a,c,e){var g=zb.has(a)?zb.get(a):{},l=a.parentNode||a.ownerDocument;"string"===typeof c?c={type:c,target:a}:c.target||(c.target=a);c=lf(c);g.dispatcher&&g.dispatcher.call(a,c,e);if(l&&!c.isPropagationStopped()&&!0===c.bubbles)Ad.call(null, 50l,c,e);else if(!l&&!c.defaultPrevented&&c.target&&c.target[c.type]&&(zb.has(c.target)||zb.set(c.target,{}),a=zb.get(c.target),c.target[c.type])){a.disabled=!0;if("function"===typeof c.target[c.type])c.target[c.type]();a.disabled=!1}return!c.defaultPrevented}function mf(a,c,e){if(Array.isArray(c))return Og(mf,a,c,e);var g=function(){tb(a,c,g);e.apply(this,arguments)};g.guid=e.guid=e.guid||Vb++;Qb(a,c,g)}function Pg(a,c,e){var g=function(){tb(a,c,g);e.apply(this,arguments)};g.guid=e.guid=e.guid||Vb++; 51Qb(a,c,g)}function Qg(a,c){c=void 0===c?{}:c;if(c=c.eventBusKey){if(!a[c].nodeName)throw Error('The eventBusKey "'+c+'" does not refer to an element.');a.eventBusEl_=a[c]}else a.eventBusEl_=Q("span",{className:"vjs-event-bus"});Object.assign(a,Tm);a.eventedCallbacks&&a.eventedCallbacks.forEach(function(e){e()});a.on("dispose",function(){a.off();[a,a.el_,a.eventBusEl_].forEach(function(e){e&&zb.has(e)&&zb.delete(e)});window.setTimeout(function(){a.eventBusEl_=null},0)});return a}function Oi(a,c){Object.assign(a, 52Um);a.state=Object.assign({},a.state,c);if("function"===typeof a.handleStateChanged&&zc(a))a.on("statechanged",a.handleStateChanged);return a}function Pi(a,c,e,g){var l=e.length-1;if("number"!==typeof g||0>g||g>l)throw Error("Failed to execute '"+a+"' on 'TimeRanges': The index provided ("+g+") is non-numeric or out of bounds (0-"+l+").");return e[g][c]}function Rg(a){var c=void 0===a||0===a.length?{length:0,start:function(){throw Error("This TimeRanges object is empty");},end:function(){throw Error("This TimeRanges object is empty"); 53}}:{length:a.length,start:Pi.bind(null,"start",0,a),end:Pi.bind(null,"end",1,a)};window.Symbol&&window.Symbol.iterator&&(c[window.Symbol.iterator]=function(){return(a||[]).values()});return c}function dc(a,c){return Array.isArray(a)?Rg(a):void 0===a||void 0===c?Rg():Rg([[a,c]])}function Qi(a){Sg=a}function Ri(){Sg=Si}function bd(a,c){return Sg(a,void 0===c?a:c)}function Ti(a,c){var e=0;if(!c)return 0;a&&a.length||(a=dc(0,0));for(var g=0;g<a.length;g++){var l=a.start(g);var b=a.end(g);b>c&&(b=c);e+= 54b-l}return e/c}function Sa(a){if(a instanceof Sa)return a;"number"===typeof a?this.code=a:"string"===typeof a?this.message=a:R(a)&&("number"===typeof a.code&&(this.code=a.code),Object.assign(this,a));this.message||(this.message=Sa.defaultMessages[this.code]||"")}function qe(a){return void 0!==a&&null!==a&&"function"===typeof a.then}function jc(a){qe(a)&&a.then(null,function(c){})}function nf(a,c){return c={exports:{}},a(c,c.exports),c.exports}function Vm(a,c){var e="undefined"!==typeof Symbol&&a[Symbol.iterator]|| 55a["@@iterator"];if(e)return(e=e.call(a)).next.bind(e);if(Array.isArray(a)||(e=Wm(a))||c&&a&&"number"===typeof a.length){e&&(a=e);var g=0;return function(){return g>=a.length?{done:!0}:{done:!1,value:a[g++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function Wm(a,c){if(a){if("string"===typeof a)return Ui(a,c);var e=Object.prototype.toString.call(a).slice(8,-1);"Object"===e&&a.constructor&& 56(e=a.constructor.name);if("Map"===e||"Set"===e)return Array.from(a);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return Ui(a,c)}}function Ui(a,c){if(null==c||c>a.length)c=a.length;for(var e=0,g=Array(c);e<c;e++)g[e]=a[e];return g}function Xm(a){void 0===a&&(a="");return a.toLowerCase().split(";").reduce(function(c,e){e=e.split("\x3d");var g=e[1];return"charset"===e[0].trim()?g.trim():c},"utf-8")}function Ym(a){for(var c in a)if(a.hasOwnProperty(c))return!1;return!0}function Vi(a, 57c,e){var g=a;if(c){var l=Zm.call(c);l="[object Function]"===l||"function"===typeof c&&"[object RegExp]"!==l||"undefined"!==typeof window&&(c===window.setTimeout||c===window.alert||c===window.confirm||c===window.prompt)}else l=!1;l?(e=c,"string"===typeof a&&(g={uri:a})):g=Wi({},c,{uri:a});g.callback=e;return g}function Ta(a,c,e){c=Vi(a,c,e);return Tg(c)}function Tg(a){function c(F){clearTimeout(z);clearTimeout(a.retryTimeout);F instanceof Error||(F=Error(""+(F||"Unknown XMLHttpRequest Error")));F.statusCode= 580;
58if(!h&&Ta.retryManager.getIsEnabled()&&a.retry&&a.retry.shouldRetry())a.retryTimeout=setTimeout(function(){a.retry.moveToNextAttempt();a.xhr=d;Tg(a)},a.retry.getCurrentFuzzedDelay());else{if(a.requestType&&Ta.responseInterceptorsStorage.getIsEnabled()){var H=Ta.responseInterceptorsStorage.execute(a.requestType,{headers:A.headers||{},body:A.body,responseUrl:d.responseURL,responseType:d.responseType});A.body=H.body;A.headers=H.headers}return b(F,A)}}function e(){if(!h){clearTimeout(z);clearTimeout(a.retryTimeout); 59var F=a.useXDR&&void 0===d.status?200:1223===d.status?204:d.status;var H=A,L=null;if(0!==F){if(d.response)H=d.response;else if(!(H=d.responseText))a:{try{if("document"===d.responseType){H=d.responseXML;break a}var I=d.responseXML&&"parsererror"===d.responseXML.documentElement.nodeName;if(""===d.responseType&&!I){H=d.responseXML;break a}}catch(N){}H=null}if(u)try{H=JSON.parse(H)}catch(N){}H={body:H,statusCode:F,method:p,headers:{},url:m,rawRequest:d};d.getAllResponseHeaders&&(H.headers=$m(d.getAllResponseHeaders()))}else L= 60Error("Internal XMLHttpRequest Error");a.requestType&&Ta.responseInterceptorsStorage.getIsEnabled()&&(F=Ta.responseInterceptorsStorage.execute(a.requestType,{headers:H.headers||{},body:H.body,responseUrl:d.responseURL,responseType:d.responseType}),H.body=F.body,H.headers=F.headers);return b(L,H,H.body)}}if("undefined"===typeof a.callback)throw Error("callback argument missing");if(a.requestType&&Ta.requestInterceptorsStorage.getIsEnabled()){var g=Ta.requestInterceptorsStorage.execute(a.requestType, 61{uri:a.uri||a.url,headers:a.headers||{},body:a.body,metadata:a.metadata||{},retry:a.retry,timeout:a.timeout});a.uri=g.uri;a.headers=g.headers;a.body=g.body;a.metadata=g.metadata;a.retry=g.retry;a.timeout=g.timeout}var l=!1,b=function(F,H,L){l||(l=!0,a.callback(F,H,L))},d=a.xhr||null;d||(d=a.cors||a.useXDR?new Ta.XDomainRequest:new Ta.XMLHttpRequest);var f,h,m=d.url=a.uri||a.url,p=d.method=a.method||"GET";g=a.body||a.data;var t=d.headers=a.headers||{},x=!!a.sync,u=!1,z,A={body:void 0,headers:{},statusCode:0, 62method:p,url:m,rawRequest:d};"json"in a&&!1!==a.json&&(u=!0,t.accept||t.Accept||(t.Accept="application/json"),"GET"!==p&&"HEAD"!==p&&(t["content-type"]||t["Content-Type"]||(t["Content-Type"]="application/json"),g=JSON.stringify(!0===a.json?g:a.json)));d.onreadystatechange=function(){4!==d.readyState||Ta.responseInterceptorsStorage.getIsEnabled()||setTimeout(e,0)};d.onload=e;d.onerror=c;d.onprogress=function(){};d.onabort=function(){h=!0;clearTimeout(a.retryTimeout)};d.ontimeout=c;d.open(p,m,!x,a.username, 63a.password);x||(d.withCredentials=!!a.withCredentials);!x&&0<a.timeout&&(z=setTimeout(function(){if(!h){h=!0;d.abort("timeout");var F=Error("XMLHttpRequest timeout");F.code="ETIMEDOUT";c(F)}},a.timeout));if(d.setRequestHeader)for(f in t)t.hasOwnProperty(f)&&d.setRequestHeader(f,t[f]);else if(a.headers&&!Ym(a.headers))throw Error("Headers cannot be set on an XDomainRequest object");"responseType"in a&&(d.responseType=a.responseType);"beforeSend"in a&&"function"===typeof a.beforeSend&&a.beforeSend(d); 64d.send(g||null);return d}function an(){}function Rb(a,c){this.name="ParsingError";this.code=a.code;this.message=c||a.message}function Ug(a){a=a.match(/^(\d+):(\d{1,2})(:\d{1,2})?\.(\d{3})/);if(!a)return null;if(a[3]){var c=a[3].replace(":","");return 3600*(a[1]|0)+60*(a[2]|0)+(c|0)+(a[4]|0)/1E3}return 59<a[1]?3600*(a[1]|0)+60*(a[2]|0)+(a[4]|0)/1E3:60*(a[1]|0)+(a[2]|0)+(a[4]|0)/1E3}function re(){this.values=Vg(null)}function se(a,c,e,g){a=g?a.split(g):[a];for(var l in a)if("string"===typeof a[l]){var b= 65a[l].split(e);2===b.length&&(g=b[0].trim(),b=b[1].trim(),c(g,b))}}function bn(a,c,e){function g(){var d=Ug(a);if(null===d)throw new Rb(Rb.Errors.BadTimeStamp,"Malformed timestamp: "+b);a=a.replace(/^[^\sa-zA-Z-]+/,"");return d}function l(){a=a.replace(/^\s+/,"")}var b=a;l();c.startTime=g();l();if("--\x3e"!==a.substr(0,3))throw new Rb(Rb.Errors.BadTimeStamp,"Malformed time stamp (time stamps must be separated by '--\x3e'): "+b);a=a.substr(3);l();c.endTime=g();l();(function(d,f){var h=new re;se(d,function(m, 66p){switch(m){case "region":for(var t=e.length-1;0<=t;t--)if(e[t].id===p){h.set(m,e[t].region);break}break;case "vertical":h.alt(m,p,["rl","lr"]);break;case "line":p=p.split(",");t=p[0];h.integer(m,t);h.percent(m,t)?h.set("snapToLines",!1):null;h.alt(m,t,["auto"]);2===p.length&&h.alt("lineAlign",p[1],["start","center","end"]);break;case "position":p=p.split(",");h.percent(m,p[0]);
662===p.length&&h.alt("positionAlign",p[1],["start","center","end"]);break;case "size":h.percent(m,p);break;case "align":h.alt(m, 67p,["start","center","end","left","right"])}},/:/,/\s/);f.region=h.get("region",null);f.vertical=h.get("vertical","");try{f.line=h.get("line","auto")}catch(m){}f.lineAlign=h.get("lineAlign","start");f.snapToLines=h.get("snapToLines",!0);f.size=h.get("size",100);try{f.align=h.get("align","center")}catch(m){f.align=h.get("align","middle")}try{f.position=h.get("position","auto")}catch(m){f.position=h.get("position",{start:0,left:0,center:50,middle:50,end:100,right:100},f.align)}f.positionAlign=h.get("positionAlign", 68{start:"start",left:"start",center:"center",middle:"center",end:"end",right:"end"},f.align)})(a,c)}function Xi(a,c){function e(){if(!c)return null;var t=c.match(/^([^<]*)(<[^>]*>?)?/);t=t[1]?t[1]:t[2];c=c.substr(t.length);return t}function g(t){Wg.innerHTML=t;t=Wg.textContent;Wg.textContent="";return t}function l(t,x){var u=cn[t];if(!u)return null;u=a.document.createElement(u);(t=dn[t])&&x&&(u[t]=x.trim());return u}for(var b=a.document.createElement("div"),d=b,f,h=[];null!==(f=e());)if("\x3c"===f[0])if("/"=== 69f[1])h.length&&h[h.length-1]===f.substr(2).replace("\x3e","")&&(h.pop(),d=d.parentNode);else{var m=Ug(f.substr(1,f.length-2));if(m){var p=a.document.createProcessingInstruction("timestamp",m);d.appendChild(p)}else if(f=f.match(/^<([^.\s/0-9>]+)(\.[^\s\\>]+)?([^>\\]+)?(\\?)>?$/))!(p=l(f[1],f[3]))||Yi[p.localName]&&Yi[p.localName]!==d.localName||(f[2]&&(m=f[2].split("."),m.forEach(function(t){var x=/^bg_/.test(t);t=x?t.slice(3):t;Zi.hasOwnProperty(t)&&(p.style[x?"background-color":"color"]=Zi[t])}), 70p.className=m.join(" ")),h.push(f[1]),d.appendChild(p),d=p)}else d.appendChild(a.document.createTextNode(g(f)));return b}function en(a){for(var c=0;c<$i.length;c++){var e=$i[c];if(a>=e[0]&&a<=e[1])return!0}return!1}function fn(a){function c(d,f){for(var h=f.childNodes.length-1;0<=h;h--)d.push(f.childNodes[h])}function e(d){if(!d||!d.length)return null;var f=d.pop(),h=f.textContent||f.innerText;if(h)return(f=h.match(/^.*(\n|\r)/))?(d.length=0,f[0]):h;if("ruby"===f.tagName)return e(d);if(f.childNodes)return c(d, 71f),e(d)}var g=[],l="";if(!a||!a.childNodes)return"ltr";for(c(g,a);l=e(g);)for(var b=0;b<l.length;b++)if(a=l.charCodeAt(b),en(a))return"rtl";return"ltr"}function Xg(){}function of(a,c,e){this.cue=c;this.cueDiv=Xi(a,c.text);var g={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:""===c.vertical?"horizontal-tb":"lr"===c.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext"};this.applyStyles(g,this.cueDiv); 72this.div=a.document.createElement("div");g={direction:fn(this.cueDiv),writingMode:""===c.vertical?"horizontal-tb":"lr"===c.vertical?"vertical-lr":"vertical-rl",unicodeBidi:"plaintext",textAlign:"middle"===c.align?"center":c.align,font:e.font,whiteSpace:"pre-line",position:"absolute"};this.applyStyles(g);this.div.appendChild(this.cueDiv);a=0;switch(c.positionAlign){case "start":case "line-left":a=c.position;break;case "center":a=c.position-c.size/2;break;case "end":case "line-right":a=c.position-c.size}""=== 73c.vertical?this.applyStyles({left:this.formatStyle(a,"%"),width:this.formatStyle(c.size,"%")}):this.applyStyles({top:this.formatStyle(a,"%"),height:this.formatStyle(c.size,"%")});this.move=function(l){this.applyStyles({top:this.formatStyle(l.top,"px"),bottom:this.formatStyle(l.bottom,"px"),left:this.formatStyle(l.left,"px"),right:this.formatStyle(l.right,"px"),height:this.formatStyle(l.height,"px"),width:this.formatStyle(l.width,"px")})}}function Ab(a){if(a.div){var c=a.div.offsetHeight;var e=a.div.offsetWidth; 74var g=a.div.offsetTop;var l=(l=a.div.childNodes)&&(l=l[0])&&l.getClientRects&&l.getClientRects();a=a.div.getBoundingClientRect();var b=l?Math.max(l[0]&&l[0].height||0,a.height/l.length):0}this.left=a.left;this.right=a.right;this.top=a.top||g;this.height=a.height||c;this.bottom=a.bottom||g+(a.height||c);this.width=a.width||e;this.lineHeight=void 0!==b?b:a.lineHeight}function Bd(){}function Yg(a){return"string"!==typeof a?!1:gn[a.toLowerCase()]?a.toLowerCase():!1}function aj(a,c,e){this.hasBeenReset= 75!1;var g="",l=!1,b=a,d=c,f=e,h=null,m="",p=!0,t="auto",x="start",u="auto",z="auto",A=100,F="center";Object.defineProperties(this,{id:{enumerable:!0,get:function(){return g},set:function(H){g=""+H}},pauseOnExit:{enumerable:!0,get:function(){return l},set:function(H){l=!!H}},startTime:{enumerable:!0,get:function(){return b},set:function(H){if("number"!==typeof H)throw new TypeError("Start time must be set to a number.");b=H;this.hasBeenReset=!0}},endTime:{enumerable:!0,get:function(){return d}
75,set:function(H){if("number"!== 76typeof H)throw new TypeError("End time must be set to a number.");d=H;this.hasBeenReset=!0}},text:{enumerable:!0,get:function(){return f},set:function(H){f=""+H;this.hasBeenReset=!0}},region:{enumerable:!0,get:function(){return h},set:function(H){h=H;this.hasBeenReset=!0}},vertical:{enumerable:!0,get:function(){return m},set:function(H){H="string"!==typeof H?!1:hn[H.toLowerCase()]?H.toLowerCase():!1;if(!1===H)throw new SyntaxError("Vertical: an invalid or illegal direction string was specified."); 77m=H;this.hasBeenReset=!0}},snapToLines:{enumerable:!0,get:function(){return p},set:function(H){p=!!H;this.hasBeenReset=!0}},line:{enumerable:!0,get:function(){return t},set:function(H){if("number"!==typeof H&&"auto"!==H)throw new SyntaxError("Line: an invalid number or illegal string was specified.");t=H;this.hasBeenReset=!0}},lineAlign:{enumerable:!0,get:function(){return x},set:function(H){(H=Yg(H))?(x=H,this.hasBeenReset=!0):console.warn("lineAlign: an invalid or illegal string was specified.")}}, 78position:{enumerable:!0,get:function(){return u},set:function(H){if(0>H||100<H)throw Error("Position must be between 0 and 100.");u=H;this.hasBeenReset=!0}},positionAlign:{enumerable:!0,get:function(){return z},set:function(H){(H=Yg(H))?(z=H,this.hasBeenReset=!0):console.warn("positionAlign: an invalid or illegal string was specified.")}},size:{enumerable:!0,get:function(){return A},set:function(H){if(0>H||100<H)throw Error("Size must be between 0 and 100.");A=H;this.hasBeenReset=!0}},align:{enumerable:!0, 79get:function(){return F},set:function(H){H=Yg(H);if(!H)throw new SyntaxError("align: an invalid or illegal alignment string was specified.");F=H;this.hasBeenReset=!0}}});this.displayState=void 0}function te(a){return"number"===typeof a&&0<=a&&100>=a}function jn(a,c,e){a.setTimeout(function(){return cd(c,dd[c.type],e,a)},1)}function kn(a,c){a.forEach(function(e){return e.setTech&&e.setTech(c)})}function bj(a,c,e,g){g=void 0===g?null:g;var l="call"+Za(e);l=a.reduce(Zg(l),g);c=(g=l===pf)?null:c[e](l); 80for(l=a.length-1;0<=l;l--){var b=a[l];if(b[e])b[e](g,c)}return c}function Zg(a){return function(c,e){return c===pf?pf:e[a]?e[a](c):c}}function ln(a,c){var e=qf[a.id()],g=null;if(void 0===e||null===e)return g=c(a),qf[a.id()]=[[c,g]],g;for(var l=0;l<e.length;l++){var b=$jscomp.makeIterator(e[l]),d=b.next().value;b=b.next().value;d===c&&(g=b)}null===g&&(g=c(a),e.push([c,g]));return g}function cd(a,c,e,g,l,b){a=void 0===a?{}:a;c=void 0===c?[]:c;l=void 0===l?[]:l;b=void 0===b?!1:b;c=$jscomp.makeIterator(c); 81var d=c.next().value,f=$jscomp.arrayFromIterator(c);if("string"===typeof d)cd(a,dd[d],e,g,l,b);else if(d){var h=ln(g,d);if(!h.setSource)return l.push(h),cd(a,f,e,g,l,b);h.setSource(Object.assign({},a),function(m,p){if(m)return cd(a,f,e,g,l,b);l.push(h);cd(p,a.type===p.type?f:dd[p.type],e,g,l,b)})}else f.length?cd(a,f,e,g,l,b):b?e(a,l):cd(a,dd["*"],e,g,l,!0)}function cj(a){if(!a.type){var c=rf(a.src);c&&(a.type=c)}return a}function $g(a,c){if(4===a.length)a=a[1]+a[1]+a[2]+a[2]+a[3]+a[3];else if(7=== 82a.length)a=a.slice(1);else throw Error("Invalid color code provided, "+a+"; must be formatted as e.g. #f0e or #f604e2.");return"rgba("+parseInt(a.slice(0,2),16)+","+parseInt(a.slice(2,4),16)+","+parseInt(a.slice(4,6),16)+","+c+")"}function kc(a,c,e){try{a.style[c]=e}catch(g){}}function ed(a,c,e){a=Number(a);return Math.min(e,Math.max(c,isNaN(a)?c:a))}function dj(a,c){c&&(a=c(a));if(a&&"none"!==a)return a}function mn(a,c){var e=!1;return function(g){for(var l=[],b=0;b<arguments.length;++b)l[b-0]=arguments[b]; 83e||sa.warn(a);e=!0;return c.apply(this,l)}}function ec(a,c,e,g){return mn(c+" is deprecated and will be removed in "+a+".0; please use "+e+" instead.",g)}function O(a,c,e){var g=O.getPlayer(a);if(g)return c&&sa.warn('Player "com.qvc.commerce.cpm:designs-non-transactional:content-package:26.09.7" is already initialised. Options will not be applied.'),e&&g.ready(e),g;var l="string"===typeof a?Oc("#"+ej(a)):a;if(!Y(l))throw new TypeError("The element or ID supplied is not valid. (videojs)");a="getRootNode"in 84l&&l.getRootNode()instanceof window.ShadowRoot?l.getRootNode():l.ownerDocument.body;l.ownerDocument.defaultView&&a.contains(l)||sa.warn("The element supplied is not included in the DOM");c=c||{};!0===c.restoreEl&&(c.restoreEl=(l.parentNode&&l.parentNode.hasAttribute&&l.parentNode.hasAttribute("data-vjs-player")?l.parentNode:l).cloneNode(!0));
84Pc("beforesetup").forEach(function(b){b=b(l,B(c));!R(b)||Array.isArray(b)?sa.error("please return an object in beforesetup hooks"):c=B(c,b)});g=new (D.getComponent("Player"))(l, 85c,e);Pc("setup").forEach(function(b){return b(g)});return g}function fj(a){a=window.atob?window.atob(a):Buffer.from(a,"base64").toString("binary");for(var c=new Uint8Array(a.length),e=0;e<a.length;e++)c[e]=a.charCodeAt(e);return c}function sf(a,c){void 0===c&&(c=Object);return c&&"function"===typeof c.freeze?c.freeze(a):a}function nn(a){return""!==a}function on(a,c){a.hasOwnProperty(c)||(a[c]=!0);return a}function gj(a){if(!a)return[];a=a?a.split(/[\t\n\f\r ]+/).filter(nn):[];return Object.keys(a.reduce(on, 86{}))}function pn(a){return function(c){return a&&-1!==a.indexOf(c)}}function ue(a,c){for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&(c[e]=a[e])}function Kb(a,c){var e=a.prototype;if(!(e instanceof c)){var g=function(){};g.prototype=c.prototype;g=new g;ue(e,g);a.prototype=e=g}e.constructor!=a&&("function"!=typeof a&&console.error("unknown Class:"+a),e.constructor=a)}function bb(a,c){if(c instanceof Error)var e=c;else e=this,Error.call(this,lb[a]),this.message=lb[a],Error.captureStackTrace&& 87Error.captureStackTrace(this,bb);e.code=a;c&&(this.message=this.message+": "+c);return e}function Qc(){}function Cd(a,c){this._node=a;this._refresh=c;ah(this)}function ah(a){var c=a._node._inc||a._node.ownerDocument._inc;if(a._inc!==c){var e=a._refresh(a._node);hj(a,"length",e.length);if(!a.$$length||e.length<a.$$length)for(var g=e.length;g in a;g++)Object.prototype.hasOwnProperty.call(a,g)&&delete a[g];ue(e,a);a._inc=c}}function tf(){}function ij(a,c){for(var e=a.length;e--;)if(a[e]===c)return e} 88function jj(a,c,e,g){g?c[ij(c,g)]=e:c[c.length++]=e;a&&(e.ownerElement=a,c=a.ownerDocument)&&(g&&(c&&c._inc++,g.namespaceURI===Dd.XMLNS&&delete a._nsMap[g.prefix?g.localName:""]),c&&c._inc++,e.namespaceURI===Dd.XMLNS&&(a._nsMap[e.prefix?e.localName:""]=e.value))}function kj(a,c,e){var g=ij(c,e);if(0<=g){for(var l=c.length-1;g<l;)c[g]=c[++g];c.length=l;a&&(c=a.ownerDocument)&&(c&&c._inc++,e.namespaceURI===Dd.XMLNS&&delete a._nsMap[e.prefix?e.localName:""],e.ownerElement=null)}else throw new bb(lj, 89Error(a.tagName+"@"+e));}function mj(){}function Ha(){}function nj(a){return"\x3c"==a&&"\x26lt;"||"\x3e"==a&&"\x26gt;"||"\x26"==a&&"\x26amp;"||'"'==a&&"\x26quot;"||"\x26#"+a.charCodeAt()+";"}function ve(a,c){if(c(a))return!0;if(a=a.firstChild){do if(ve(a,c))return!0;while(a=a.nextSibling)}}function we(){this.ownerDocument=this}function bh(a,c,e){if(a&&a._inc)if(a._inc++,a=c.childNodes,e)a[a.length++]=e;else{c=c.firstChild;for(e=0;c;)a[e++]=c,c=c.nextSibling;a.length=e;delete a[a.length]}}function oj(a, 90c){var e=c.previousSibling,g=c.nextSibling;e?e.nextSibling=g:a.firstChild=g;g?g.previousSibling=e:a.lastChild=e;c.parentNode=null;c.previousSibling=null;c.nextSibling=null;bh(a.ownerDocument,a);return c}function Ac(a){return a&&a.nodeType===Ha.DOCUMENT_TYPE_NODE}function lc(a){return a&&a.nodeType===Ha.ELEMENT_NODE}function ch(a){return a&&a.nodeType===Ha.TEXT_NODE}function pj(a,c){a=a.childNodes||[];if(mc(a,lc)||Ac(c))return!1;var e=mc(a,Ac);return!(c&&e&&a.indexOf(e)>a.indexOf(c))}function qj(a, 91c){a=a.childNodes||[];if(mc(a,function(g){return lc(g)&&g!==c}))return!1;var e=mc(a,Ac);return!(c&&e&&a.indexOf(e)>a.indexOf(c))}function qn(a,c,e){var g=a.childNodes||[],l=c.childNodes||[];if(c.nodeType===Ha.DOCUMENT_FRAGMENT_NODE){var b=l.filter(lc);if(1<b.length||mc(l,ch))throw new bb(Lb,"More than one element or text in fragment");if(1===b.length&&!pj(a,e))throw new bb(Lb,"Element in fragment can not be inserted before doctype");}if(lc(c)&&!pj(a,e))throw new bb(Lb,"Only one element can be added and only after doctype"); 92if(Ac(c)){if(mc(g,Ac))throw new bb(Lb,"Only one doctype is allowed");a=mc(g,lc);if(e&&g.indexOf(a)<g.indexOf(e))throw new bb(Lb,"Doctype can only be inserted before an element");if(!e&&a)throw new bb(Lb,"Doctype can not be appended since element is present");}}function rj(a,c,e){var g=a.childNodes||[],l=c.childNodes||[];if(c.nodeType===Ha.DOCUMENT_FRAGMENT_NODE){var b=l.filter(lc);if(1<b.length||mc(l,ch))throw new bb(Lb,"More than one element or text in fragment");
92if(1===b.length&&!qj(a,e))throw new bb(Lb, 93"Element in fragment can not be inserted before doctype");}if(lc(c)&&!qj(a,e))throw new bb(Lb,"Only one element can be added and only after doctype");if(Ac(c)){if(mc(g,function(d){return Ac(d)&&d!==e}))throw new bb(Lb,"Only one doctype is allowed");a=mc(g,lc);if(e&&g.indexOf(a)<g.indexOf(e))throw new bb(Lb,"Doctype can only be inserted before an element");}}function uf(a,c,e,g){if(!a||a.nodeType!==Ha.DOCUMENT_NODE&&a.nodeType!==Ha.DOCUMENT_FRAGMENT_NODE&&a.nodeType!==Ha.ELEMENT_NODE)throw new bb(Lb, 94"Unexpected parent node type "+a.nodeType);if(e&&e.parentNode!==a)throw new bb(lj,"child not in parent");if(!c||!(lc(c)||ch(c)||Ac(c)||c.nodeType===Ha.DOCUMENT_FRAGMENT_NODE||c.nodeType===Ha.COMMENT_NODE||c.nodeType===Ha.PROCESSING_INSTRUCTION_NODE)||Ac(c)&&a.nodeType!==Ha.DOCUMENT_NODE)throw new bb(Lb,"Unexpected node type "+c.nodeType+" for parent node type "+a.nodeType);a.nodeType===Ha.DOCUMENT_NODE&&(g||qn)(a,c,e);(g=c.parentNode)&&g.removeChild(c);if(c.nodeType===Bc){g=c.firstChild;if(null== 95g)return c;var l=c.lastChild}else g=l=c;var b=e?e.previousSibling:a.lastChild;g.previousSibling=b;l.nextSibling=e;b?b.nextSibling=g:a.firstChild=g;null==e?a.lastChild=l:e.previousSibling=l;do g.parentNode=a;while(g!==l&&(g=g.nextSibling));bh(a.ownerDocument||a,a);c.nodeType==Bc&&(c.firstChild=c.lastChild=null);return c}function Ed(){this._nsMap={}}function vf(){}function xe(){}function dh(){}function eh(){}function fh(){}function gh(){}function sj(){}function tj(){}function hh(){}function wf(){}function ih(){} 96function uj(a,c,e){c=a.prefix||"";a=a.namespaceURI;if(!a||"xml"===c&&a===Dd.XML||a===Dd.XMLNS)return!1;for(var g=e.length;g--;){var l=e[g];if(l.prefix===c)return l.namespace!==a}return!0}function jh(a,c,e){a.push(" ",c,'\x3d"',e.replace(/[<>&"\t\n\r]/g,nj),'"')}function Fd(a,c,e,g,l){l||(l=[]);if(g)if(a=g(a)){if("string"==typeof a){c.push(a);return}}else return;switch(a.nodeType){case fc:var b=a.attributes,d=b.length,f=a.firstChild,h=a.tagName;e=Dd.isHTML(a.namespaceURI)||e;var m=h;if(!e&&!a.prefix&& 97a.namespaceURI){for(var p,t=0;t<b.length;t++)if("xmlns"===b.item(t).name){p=b.item(t).value;break}if(!p)for(t=l.length-1;0<=t;t--){var x=l[t];if(""===x.prefix&&x.namespace===a.namespaceURI){p=x.namespace;break}}if(p!==a.namespaceURI)for(t=l.length-1;0<=t;t--)if(x=l[t],x.namespace===a.namespaceURI){x.prefix&&(m=x.prefix+":"+h);break}}c.push("\x3c",m);for(p=0;p<d;p++)t=b.item(p),"xmlns"==t.prefix?l.push({prefix:t.localName,namespace:t.value}):"xmlns"==t.nodeName&&l.push({prefix:"",namespace:t.value}); 98for(p=0;p<d;p++){t=b.item(p);if(uj(t,e,l)){x=t.prefix||"";var u=t.namespaceURI;jh(c,x?"xmlns:"+x:"xmlns",u);l.push({prefix:x,namespace:u})}Fd(t,c,e,g,l)}h===m&&uj(a,e,l)&&(x=a.prefix||"",u=a.namespaceURI,jh(c,x?"xmlns:"+x:"xmlns",u),l.push({prefix:x,namespace:u}));if(f||e&&!/^(?:meta|link|img|br|hr|input)$/i.test(h)){c.push("\x3e");if(e&&/^script$/i.test(h))for(;f;)f.data?c.push(f.data):Fd(f,c,e,g,l.slice()),f=f.nextSibling;else for(;f;)Fd(f,c,e,g,l.slice()),f=f.nextSibling;c.push("\x3c/",m,"\x3e")}else c.push("/\x3e"); 99break;case vj:case Bc:for(f=a.firstChild;f;)Fd(f,c,e,g,l.slice()),f=f.nextSibling;break;case Gd:return jh(c,a.name,a.value);case xf:return c.push(a.data.replace(/[<&>]/g,nj));case wj:return c.push("\x3c![CDATA[",a.data,"]]\x3e");case xj:return c.push("\x3c!--",a.data,"--\x3e");case yj:e=a.publicId;g=a.systemId;c.push("\x3c!DOCTYPE ",a.name);e?(c.push(" PUBLIC ",e),g&&"."!=g&&c.push(" ",g),c.push("\x3e")):g&&"."!=g?c.push(" SYSTEM ",g,"\x3e"):((a=a.internalSubset)&&c.push(" [",a,"]"),
99c.push("\x3e")); 100break;case zj:return c.push("\x3c?",a.target," ",a.data,"?\x3e");case Aj:return c.push("\x26",a.nodeName,";");default:c.push("??",a.nodeName)}}function Bj(a,c,e){switch(c.nodeType){case fc:var g=c.cloneNode(!1);g.ownerDocument=a;case Bc:break;case Gd:e=!0}g||(g=c.cloneNode(!1));g.ownerDocument=a;g.parentNode=null;if(e)for(c=c.firstChild;c;)g.appendChild(Bj(a,c,e)),c=c.nextSibling;return g}function kh(a,c,e){var g=new c.constructor;for(b in c)if(Object.prototype.hasOwnProperty.call(c,b)){var l=c[b]; 101"object"!=typeof l&&l!=g[b]&&(g[b]=l)}c.childNodes&&(g.childNodes=new Qc);g.ownerDocument=a;switch(g.nodeType){case fc:var b=c.attributes;var d=g.attributes=new tf;l=b.length;d._ownerElement=g;for(d=0;d<l;d++)g.setAttributeNode(kh(a,b.item(d),!0));break;case Gd:e=!0}if(e)for(c=c.firstChild;c;)g.appendChild(kh(a,c,e)),c=c.nextSibling;return g}function hj(a,c,e){a[c]=e}function Hd(a,c){this.message=a;this.locator=c;Error.captureStackTrace&&Error.captureStackTrace(this,Hd)}function Cj(){}function rn(a, 102c,e,g,l){function b(ta){var mb=ta.slice(1,-1);if(Object.hasOwnProperty.call(e,mb))return e[mb];if("#"===mb.charAt(0))return ta=parseInt(mb.substr(1).replace("x","0x")),65535<ta?(ta-=65536,ta=String.fromCharCode(55296+(ta>>10),56320+(ta&1023))):ta=String.fromCharCode(ta),ta;l.error("entity not found:"+ta);return ta}function d(ta){if(ta>u){var mb=a.substring(u,ta).replace(/&#?\w+;/g,b);t&&f(u);g.characters(mb,0,ta-u);u=ta}}function f(ta,mb){for(;ta>=m&&(mb=p.exec(a));)h=mb.index,m=h+mb[0].length,t.lineNumber++; 103t.columnNumber=ta-h+1}var h=0,m=0,p=/.*(?:\r\n?|\n)|.*$/g,t=g.locator;c=[{currentNSMap:c}];for(var x={},u=0;;){try{var z=a.indexOf("\x3c",u);if(0>z){if(!a.substr(u).match(/^\s*$/)){var A=g.doc,F=A.createTextNode(a.substr(u));A.appendChild(F);g.currentElement=F}break}z>u&&d(z);switch(a.charAt(z+1)){case "/":var H=a.indexOf("\x3e",z+3),L=a.substring(z+2,H).replace(/[ \t\n\r]+$/g,""),I=c.pop();0>H?(L=a.substring(z+2).replace(/[\s<].*/,""),l.error("end tag name: "+L+" is not complete:"+I.tagName),H=z+ 1041+L.length):L.match(/\s</)&&(L=L.replace(/[\s<].*/,""),l.error("end tag name: "+L+" maybe not complete"),H=z+1+L.length);var N=I.localNSMap,T=I.tagName==L;if(T||I.tagName&&I.tagName.toLowerCase()==L.toLowerCase()){g.endElement(I.uri,I.localName,L);if(N)for(var fa in N)Object.prototype.hasOwnProperty.call(N,fa)&&g.endPrefixMapping(fa);T||l.fatalError("end tag name: "+L+" is not match the current start tagName:"+I.tagName)}else c.push(I);H++;break;case "?":t&&f(z);H=sn(a,z,g);break;case "!":t&&f(z); 105H=tn(a,z,g,l);break;default:t&&f(z);var X=new Dj,ra=c[c.length-1].currentNSMap;H=un(a,z,X,ra,b,l);var ca=X.length;!X.closed&&vn(a,H,X.tagName,x)&&(X.closed=!0,e.nbsp||l.warning("unclosed xml attribute"));if(t&&ca){for(var ea=Ej(t,{}),ja=0;ja<ca;ja++){var Aa=X[ja];f(Aa.offset);Aa.locator=Ej(t,{})}g.locator=ea;Fj(X,g,ra)&&c.push(X);g.locator=t}else Fj(X,g,ra)&&c.push(X);ye.isHTML(X.uri)&&!X.closed?H=wn(a,H,X.tagName,b,g):H++}}catch(ta){if(ta instanceof Hd)throw ta;l.error("element parse error: "+ta); 106H=-1}H>u?u=H:d(Math.max(z,u)+1)}}function Ej(a,c){c.lineNumber=a.lineNumber;c.columnNumber=a.columnNumber;return c}function un(a,c,e,g,l,b){function d(x,u,z){e.attributeNames.hasOwnProperty(x)&&b.fatalError("Attribute "+x+" redefined");e.addValue(x,u.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,l),z)}for(var f,h,m=++c,p=0;;){var t=a.charAt(m);switch(t){case "\x3d":if(1===p)f=a.slice(c,m),p=3;else if(2===p)p=3;else throw Error("attribute equal must after attrName");break;
106case "'":case '"':if(3===p|| 1071===p)if(1===p&&(b.warning('attribute value must after "\x3d"'),f=a.slice(c,m)),c=m+1,m=a.indexOf(t,c),0<m)h=a.slice(c,m),d(f,h,c-1),p=5;else throw Error("attribute value no end '"+t+"' match");else if(4==p)h=a.slice(c,m),d(f,h,c),b.warning('attribute "'+f+'" missed start quot('+t+")!!"),c=m+1,p=5;else throw Error('attribute value must after "\x3d"');break;case "/":switch(p){case 0:e.setTagName(a.slice(c,m));case 5:case 6:case 7:p=7,e.closed=!0;case 4:case 1:break;case 2:e.closed=!0;break;default:throw Error("attribute invalid close char('/')"); 108}break;case "":return b.error("unexpected end of input"),0==p&&e.setTagName(a.slice(c,m)),m;case "\x3e":switch(p){case 0:e.setTagName(a.slice(c,m));case 5:case 6:case 7:break;case 4:case 1:h=a.slice(c,m),"/"===h.slice(-1)&&(e.closed=!0,h=h.slice(0,-1));case 2:2===p&&(h=f);4==p?(b.warning('attribute "'+h+'" missed quot(")!'),d(f,h,c)):(ye.isHTML(g[""])&&h.match(/^(?:disabled|checked|selected)$/i)||b.warning('attribute "'+h+'" missed value!! "'+h+'" instead!!'),d(h,h,c));break;case 3:throw Error("attribute value missed!!"); 109}return m;case "\u0080":t=" ";default:if(" ">=t)switch(p){case 0:e.setTagName(a.slice(c,m));p=6;break;case 1:f=a.slice(c,m);p=2;break;case 4:h=a.slice(c,m),b.warning('attribute "'+h+'" missed quot(")!!'),d(f,h,c);case 5:p=6}else switch(p){case 2:e.tagName;ye.isHTML(g[""])&&f.match(/^(?:disabled|checked|selected)$/i)||b.warning('attribute "'+f+'" missed value!! "'+f+'" instead2!!');d(f,f,c);c=m;p=1;break;case 5:b.warning('attribute space is required"'+f+'"!!');case 6:p=1;c=m;break;case 3:p=4;c=m;break; 110case 7:throw Error("elements closed character '/' and '\x3e' must be connected to");}}m++}}function Fj(a,c,e){for(var g=a.tagName,l=null,b=a.length;b--;){var d=a[b],f=d.qName,h=d.value,m=f.indexOf(":");if(0<m){var p=d.prefix=f.slice(0,m);m=f.slice(m+1);p="xmlns"===p&&m}else m=f,p="xmlns"===f&&"";d.localName=m;!1!==p&&(null==l&&(l={},Gj(e,e={})),e[p]=l[p]=h,d.uri=ye.XMLNS,c.startPrefixMapping(p,h))}for(b=a.length;b--;)if(d=a[b],p=d.prefix)"xml"===p&&(d.uri=ye.XML),"xmlns"!==p&&(d.uri=e[p||""]);m=g.indexOf(":"); 1110<m?(p=a.prefix=g.slice(0,m),m=a.localName=g.slice(m+1)):(p=null,m=a.localName=g);b=a.uri=e[p||""];c.startElement(b,m,g,a);if(a.closed){if(c.endElement(b,m,g),l)for(p in l)Object.prototype.hasOwnProperty.call(l,p)&&c.endPrefixMapping(p)}else return a.currentNSMap=e,a.localNSMap=l,!0}function wn(a,c,e,g,l){if(/^(?:script|textarea)$/i.test(e)){var b=a.indexOf("\x3c/"+e+"\x3e",c);a=a.substring(c+1,b);if(/[&<]/.test(a)){if(/^script$/i.test(e))return l.characters(a,0,a.length),b;a=a.replace(/&#?\w+;/g, 112g);l.characters(a,0,a.length);return b}}return c+1}function vn(a,c,e,g){var l=g[e];null==l&&(l=a.lastIndexOf("\x3c/"+e+"\x3e"),l<c&&(l=a.lastIndexOf("\x3c/"+e)),g[e]=l);return l<c}function Gj(a,c){for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&(c[e]=a[e])}function tn(a,c,e,g){switch(a.charAt(c+2)){case "-":if("-"===a.charAt(c+3)){var l=a.indexOf("--\x3e",c+4);if(l>c)return e.comment(a,c+4,l-c-4),l+3;g.error("Unclosed comment")}break;default:if("CDATA["==a.substr(c+3,6))return l=a.indexOf("]]\x3e", 113c+9),e.startCDATA(),e.characters(a,c+9,l-c-9),e.endCDATA(),l+3;a:{g=[];l=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;l.lastIndex=c;for(l.exec(a);c=l.exec(a);)if(g.push(c),c[1]){l=g;break a}l=void 0}var b=l.length;if(1<b&&/!doctype/i.test(l[0][0]))return a=l[1][0],g=c=!1,3<b&&(/^public$/i.test(l[2][0])?(c=l[3][0],g=4<b&&l[4][0]):/^system$/i.test(l[2][0])&&(g=l[3][0])),l=l[b-1],e.startDTD(a,c,g),e.endDTD(),l.index+l[0].length}return-1}function sn(a,c,e){var g=a.indexOf("?\x3e",c);return g&&(a=a.substring(c, 114g).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/))?(a[0].length,e.processingInstruction(a[1],a[2]),g+2):-1}function Dj(){this.attributeNames={}}function xn(a){return a.replace(/\r[\n\u0085]/g,"\n").replace(/[\r\u0085\u2028]/g,"\n")}function Hj(a){this.options=a||{locator:{}}}function yn(a,c,e){function g(d){var f=a[d];!f&&b&&(f=2==a.length?function(h){a(d,h)}:a);l[d]=f&&function(h){f("[xmldom "+d+"]\t"+h+lh(e))}||function(){}}if(!a){if(c instanceof yf)return c;a=c}var l={},b=a instanceof Function;e=e||{};g("warning"); 115g("error");g("fatalError");return l}function yf(){this.cdata=!1}function Id(a,c){c.lineNumber=a.lineNumber;c.columnNumber=a.columnNumber}function lh(a){if(a)return"\n@"+(a.systemId||"")+"#[line:"+a.lineNumber+",col:"+a.columnNumber+"]"}function Ij(a,c,e){return"string"==typeof a?a.substr(c,e):a.length>=c+e||c?new java.lang.String(a,c,e)+"":a}function zf(a,c){a.currentElement?a.currentElement.appendChild(c):a.doc.appendChild(c)}function Ba(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e]; 116e=O.obj||O;return(e.merge||e.mergeOptions).apply(e,c)}function nb(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];e=O.time||O;return(e.createTimeRanges||e.createTimeRanges).apply(e,c)}function Jj(a){try{return(new URL(a)).pathname.split("/").slice(-2).join("/")}catch(c){return""}}function Cc(){}for(var Dc={},Pc=function(a,c){Dc[a]=Dc[a]||[];c&&(Dc[a]=Dc[a].concat(c));return Dc[a]},Kj=function(a,c){c=Pc(a).indexOf(c);if(-1>=c)return!1;Dc[a]=Dc[a].slice();Dc[a].splice(c,1);return!0}, 117hf={prefixed:!0},Af=["requestFullscreen exitFullscreen fullscreenElement fullscreenEnabled fullscreenchange fullscreenerror fullscreen".split(" "),"webkitRequestFullscreen webkitExitFullscreen webkitFullscreenElement webkitFullscreenEnabled
117webkitfullscreenchange webkitfullscreenerror -webkit-full-screen".split(" ")],Lj=Af[0],ze,Bf=0;Bf<Af.length;Bf++)if(Af[Bf][1]in document){ze=Af[Bf];break}if(ze){for(var Cf=0;Cf<ze.length;Cf++)hf[Lj[Cf]]=ze[Cf];hf.prefixed=ze[0]!==Lj[0]}var Jb=[],Om=function(a, 118c,e){return function(g,l,b){l=c.levels[l];var d=new RegExp("^("+l+")$"),f=a;"log"!==g&&b.unshift(g.toUpperCase()+":");e&&(f="%cQVC AEM Commerce Package - Designs Non Transactional",b.unshift(e));b.unshift(f+":");Jb&&(Jb.push([].concat(b)),f=Jb.length-1E3,Jb.splice(0,0<f?f:0));if(window.console&&((f=window.console[g])||"debug"!==g||(f=window.console.info||window.console.log),f&&l&&d.test(g)))f[Array.isArray(b)?"apply":"call"](window.console,b)}},sa=w("VIDEOJS"),Mj=sa.createLogger,Pm=Object.prototype.toString, 119Ei=function(a){return R(a)?Object.keys(a):[]},zn=Object.freeze({__proto__:null,each:C,reduce:K,isObject:R,isPlain:Z,merge:B,values:da,defineLazyProperty:pa}),mh=!1,Nj=null,nc=!1,Oj=!1,Jd=!1,Kd=!1,oc=!1,nh=null,Df=null,An=!!(window.cast&&window.cast.framework&&window.cast.framework.CastReceiverContext),Pj=null,Ef=!1,Ff=!1,Gf=!1,Hf=!1,If=!1,Jf=!1,Kf=!1,Ae=!(!va()||!("ontouchstart"in window||window.navigator.maxTouchPoints||window.DocumentTouch&&window.document instanceof window.DocumentTouch)),Rc=window.navigator&& 120window.navigator.userAgentData;Rc&&Rc.platform&&Rc.brands&&(nc="Android"===Rc.platform,Jd=!!Rc.brands.find(function(a){return"Microsoft Edge"===a.brand}),Kd=!!Rc.brands.find(function(a){return"Chromium"===a.brand}),oc=!Jd&&Kd,nh=Df=(Rc.brands.find(function(a){return"Chromium"===a.brand})||{}).version||null,Ff="Windows"===Rc.platform);if(!Kd){var gb=window.navigator&&window.navigator.userAgent||"";mh=/iPod/i.test(gb);Nj=function(){var a=gb.match(/OS (\d+)_/i);return a&&a[1]?a[1]:null}();nc=/Android/i.test(gb); 121var Bn=function(){var a=gb.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!a)return null;var c=a[1]&&parseFloat(a[1]),e=a[2]&&parseFloat(a[2]);return c&&e?parseFloat(a[1]+"."+a[2]):c?c:null}();Oj=/Firefox/i.test(gb);Jd=/Edg/i.test(gb);Kd=/Chrome/i.test(gb)||/CriOS/i.test(gb);oc=!Jd&&Kd;nh=Df=function(){var a=gb.match(/(Chrome|CriOS)\/(\d+)/);return a&&a[2]?parseFloat(a[2]):null}();Pj=function(){var a=/MSIE\s(\d+)\.\d/.exec(gb);a=a&&parseFloat(a[1]);!a&&/Trident\/7.0/i.test(gb)&&/rv:11.0/.test(gb)&& 122(a=11);return a}();If=/Tizen/i.test(gb);Jf=/Web0S/i.test(gb);Kf=If||Jf;Ef=/Safari/i.test(gb)&&!oc&&!nc&&!Jd&&!Kf;Ff=/Windows/i.test(gb);Gf=/iPad/i.test(gb)||Ef&&Ae&&!/iPhone/i.test(gb);Hf=/iPhone/i.test(gb)&&!Gf}var yb=Hf||Gf||mh,Lf=(Ef||yb)&&!oc,Qj=Object.freeze({__proto__:null,get IS_IPOD(){return mh},get IOS_VERSION(){return Nj},get IS_ANDROID(){return nc},get ANDROID_VERSION(){return Bn},get IS_FIREFOX(){return Oj},get IS_EDGE(){return Jd},get IS_CHROMIUM(){return Kd},get IS_CHROME(){return oc}, 123get CHROMIUM_VERSION(){return nh},get CHROME_VERSION(){return Df},IS_CHROMECAST_RECEIVER:An,get IE_VERSION(){return Pj},get IS_SAFARI(){return Ef},get IS_WINDOWS(){return Ff},get IS_IPAD(){return Gf},get IS_IPHONE(){return Hf},get IS_TIZEN(){return If},get IS_WEBOS(){return Jf},get IS_SMART_TV(){return Kf},TOUCH_ENABLED:Ae,IS_IOS:yb,IS_ANY_SAFARI:Lf}),Oc=qa("querySelector"),Rj=qa("querySelectorAll"),Sj=Object.freeze({__proto__:null,isReal:va,isEl:Y,isInFrame:aa,createEl:Q,textContent:la,prependTo:na, 124hasClass:Ca,addClass:Ya,removeClass:ic,toggleClass:gf,setAttributes:Fi,getAttributes:Nc,getAttribute:function(a,c){return a.getAttribute(c)},setAttribute:function(a,c,e){a.setAttribute(c,e)},removeAttribute:function(a,c){a.removeAttribute(c)},blockTextSelection:Gi,unblockTextSelection:Hi,getBoundingClientRect:yd,findPosition:oe,getPointerPosition:jf,isTextNode:Ii,emptyEl:kf,normalizeContent:Ji,appendContent:Kg,insertContent:Ki,isSingleLeftClick:pe,$:Oc,$$:Rj,computedStyle:zd,copyStyleSheetsToWindow:Li}), 125Mi=!1,Mg,Qm=function(){if(!1!==Mg.options.autoSetup){var a=Array.prototype.slice.call(document.getElementsByTagName("video")),c=Array.prototype.slice.call(document.getElementsByTagName("audio")),e=Array.prototype.slice.call(document.getElementsByTagName("video-js"));if((a=a.concat(c,e))&&0<a.length)for(c=0,e=a.length;c<e;c++){var g=a[c];if(g&&g.getAttribute)void 0===g.player&&null!==g.getAttribute("data-setup")&&Mg(g);else{Lg(1);break}}else Mi||Lg(1)}};va()&&("complete"===document.readyState?Ng(): 126window.addEventListener("load",Ng));var Tj=function(a){var c=document.createElement("style");c.className=a;return c},Uj=function(a,c){a.styleSheet?a.styleSheet.cssText=c:a.textContent=c},zb=new WeakMap,Vb=3,Mf,Rm=function(){if("boolean"!==typeof Mf){Mf=!1;try{var a=Object.defineProperty({},"passive",{get:function(){Mf=!0}});window.addEventListener("test",null,a);window.removeEventListener("test",null,a)}catch(c){}}return Mf},Sm=["touchstart","touchmove"],Cn=Object.freeze({__proto__:null,fixEvent:lf, 127on:Qb,off:tb,trigger:Ad,one:mf,any:Pg}),Ka=function(a,c,e){c.guid||(c.guid=Vb++);a=c.bind(a);a.guid=e?e+"_"+c.guid:c.guid;return a},pc=function(a,c){var e=window.performance.now();return function(g){for(var l=[],b=0;b<arguments.length;++b)l[b-0]=arguments[b];b=window.performance.now();b-e>=c&&(a.apply(null,$jscomp.arrayFromIterable(l)),e=b)}},Vj=function(a,c,e,g){g=void 0===g?window:g;var l,b=function(){var d=this,f=arguments,h=function(){h=l=null;e||a.apply(d,f)};!l&&e&&a.apply(d,f);g.clearTimeout(l);
128l=g.setTimeout(h,c)};b.cancel=function(){g.clearTimeout(l);l=null};return b},Dn=Object.freeze({__proto__:null,UPDATE_REFRESH_INTERVAL:30,bind_:Ka,throttle:pc,debounce:Vj}),Be,hb=function(){};hb.prototype.on=function(a,c){var e=this.addEventListener;this.addEventListener=function(){};Qb(this,a,c);this.addEventListener=e};hb.prototype.off=function(a,c){tb(this,a,c)};hb.prototype.one=function(a,c){var e=this.addEventListener;this.addEventListener=function(){};mf(this,a,c);this.addEventListener=e};hb.prototype.any= 129function(a,c){var e=this.addEventListener;this.addEventListener=function(){};Pg(this,a,c);this.addEventListener=e};hb.prototype.trigger=function(a){var c=a.type||a;"string"===typeof a&&(a={type:c});a=lf(a);if(this.allowedEvents_[c]&&this["on"+c])this["on"+c](a);Ad(this,a)};hb.prototype.queueTrigger=function(a){var c=this;Be||(Be=new Map);var e=a.type||a,g=Be.get(this);g||(g=new Map,Be.set(this,g));var l=g.get(e);g.delete(e);window.clearTimeout(l);l=window.setTimeout(function(){g.delete(e);0===g.size&& 130(g=null,Be.delete(c));c.trigger(a)},0);g.set(e,l)};hb.prototype.allowedEvents_={};hb.prototype.addEventListener=hb.prototype.on;hb.prototype.removeEventListener=hb.prototype.off;hb.prototype.dispatchEvent=hb.prototype.trigger;var Nf=function(a){return"function"===typeof a.name?a.name():"string"===typeof a.name?a.name:a.name_?a.name_:a.constructor&&a.constructor.name?a.constructor.name:typeof a},zc=function(a){return a instanceof hb||!!a.eventBusEl_&&["on","one","off","trigger"].every(function(c){return"function"=== 131typeof a[c]})},En=function(a,c){zc(a)?c():(a.eventedCallbacks||(a.eventedCallbacks=[]),a.eventedCallbacks.push(c))},oh=function(a){return"string"===typeof a&&/\S/.test(a)||Array.isArray(a)&&!!a.length},Of=function(a,c,e){if(!a||!a.nodeName&&!zc(a))throw Error("Invalid target for "+Nf(c)+"#"+e+"; must be a DOM node or evented object.");},Wj=function(a,c,e){if(!oh(a))throw Error("Invalid event type for "+Nf(c)+"#"+e+"; must be a non-empty string or array.");},Xj=function(a,c,e){if("function"!==typeof a)throw Error("Invalid listener for "+ 132Nf(c)+"#"+e+"; must be a function.");},ph=function(a,c,e){var g=3>c.length||c[0]===a||c[0]===a.eventBusEl_;if(g){var l=a.eventBusEl_;3<=c.length&&c.shift();c=$jscomp.makeIterator(c);var b=c.next().value;c=c.next().value}else l=c[0],b=c[1],c=c[2];Of(l,a,e);Wj(b,a,e);Xj(c,a,e);c=Ka(a,c);return{isTargetingSelf:g,target:l,type:b,listener:c}},fd=function(a,c,e,g){Of(a,a,c);if(a.nodeName)Cn[c](a,e,g);else a[c](e,g)},Tm={on:function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];var g=this; 133c=ph(this,c,"on");e=c.isTargetingSelf;var l=c.target,b=c.type,d=c.listener;fd(l,"on",b,d);if(!e){var f=function(){return g.off(l,b,d)};f.guid=d.guid;c=function(){return g.off("dispose",f)};c.guid=d.guid;fd(this,"on","dispose",f);fd(l,"on","dispose",c)}},one:function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];var g=this;c=ph(this,c,"one");var l=c.target,b=c.type,d=c.listener;if(c.isTargetingSelf)fd(l,"one",b,d);else{var f=function(h){for(var m=[],p=0;p<arguments.length;++p)m[p- 1340]=arguments[p];g.off(l,b,f);d.apply(null,m)};f.guid=d.guid;fd(l,"one",b,f)}},any:function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];var g=this;c=ph(this,c,"any");var l=c.target,b=c.type,d=c.listener;if(c.isTargetingSelf)fd(l,"any",b,d);else{var f=function(h){for(var m=[],p=0;p<arguments.length;++p)m[p-0]=arguments[p];g.off(l,b,f);d.apply(null,m)};f.guid=d.guid;fd(l,"any",b,f)}},off:function(a,c,e){!a||oh(a)?tb(this.eventBusEl_,a,c):(Of(a,this,"off"),Wj(c,this,"off"),Xj(e,this, 135"off"),e=Ka(this,e),this.off("dispose",e),a.nodeName?(tb(a,c,e),tb(a,"dispose",e)):zc(a)&&(a.off(c,e),a.off("dispose",e)))},trigger:function(a,c){Of(this.eventBusEl_,this,"trigger");if(!oh(a&&"string"!==typeof a?a.type:a))throw Error("Invalid event type for "+Nf(this)+"#trigger; must be a non-empty string or object with a type key that has a non-empty value.");return Ad(this.eventBusEl_,a,c)}},Um={state:{},setState:function(a){var c=this;"function"===typeof a&&(a=a());var e;C(a,function(g,l){c.state[l]!== 136g&&(e=e||{},e[l]={from:c.state[l],to:g});c.state[l]=g});e&&zc(this)&&this.trigger({changes:e,type:"statechanged"});return e}},Ce=function(a){return"string"!==typeof a?a:a.replace(/./,function(c){return c.toLowerCase()})},Za=function(a){return"string"!==typeof a?a:a.replace(/./,function(c){return c.toUpperCase()})},Yj=function(a,c){return Za(a)===Za(c)},Fn=Object.freeze({__proto__:null,toLowerCase:Ce,toTitleCase:Za,titleCaseEquals:Yj}),D=function(a,c,e){var g=this;this.player_=!a&&this.play?a=this: 137a;this.isDisposed_=!1;this.parentComponent_=null;this.options_=B({},this.options_);c=this.options_=B(this.options_,c);this.id_=c.id||c.el&&c.el.id;this.id_||(a&&a.id&&a.id(),this.id_="com.qvc.commerce.cpm:designs-non-transactional:content-package:26.09.7_component_"+Vb++);this.name_=c.name||null;c.el?this.el_=c.el:!1!==c.createEl&&(this.el_=this.createEl());c.className&&this.el_&&c.className.split(" ").forEach(function(l){return g.addClass(l)});["on","off","one","any","trigger"].forEach(function(l){g[l]= 138void 0});!1!==c.evented&&(Qg(this,{eventBusKey:this.el_?"el_":null}),this.handleLanguagechange=this.handleLanguagechange.bind(this),this.on(this.player_,"languagechange",this.handleLanguagechange));Oi(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!==c.initChildren&&this.initChildren();this.ready(e);!1!==c.reportTouchActivity&& 139this.enableTouchActivity()};D.prototype.dispose=function(a){a=void 0===a?{}:a;if(!this.isDisposed_){this.readyQueue_&&(this.readyQueue_.length=0);this.trigger({type:"dispose",bubbles:!1});this.isDisposed_=!0;if(this.children_)for(var c=this.children_.length-1;0<=c;c--)this.children_[c].dispose&&this.children_[c].dispose();this.parentComponent_=this.childNameIndex_=this.childIndex_=this.children_=null;this.el_&&(this.el_.parentNode&&(a.restoreEl?this.el_.parentNode.replaceChild(a.restoreEl,this.el_): 140this.el_.parentNode.removeChild(this.el_)),this.el_=null);this.player_=null}};D.prototype.isDisposed=function(){return!!this.isDisposed_};D.prototype.player=function(){return this.player_};D.prototype.options=function(a){return a?this.options_=B(this.options_,a):this.options_};D.prototype.el=function(){return this.el_};D.prototype.createEl=function(a,c,e){return Q(a,c,e)};D.prototype.localize=function(a,c,e){e=void 0===e?a:e;var g=this.player_.language&&this.player_.language(),l=this.player_.languages&& 141this.player_.languages(),b=l&&l[g];g=g&&g.split("-")[0];l=l&&l[g];b&&b[a]?e=b[a]:l&&l[a]&&(e=l[a]);c&&(e=e.replace(/\{(\d+)\}/g,function(d,f){var h=f=c[f-1];"undefined"===typeof f&&(h=d);return h}));return e};D.prototype.handleLanguagechange=function(){};D.prototype.contentEl=function(){return this.contentEl_||this.el_};D.prototype.id=function(){return this.id_};D.prototype.name=function(){return this.name_};D.prototype.children=function(){return this.children_};D.prototype.getChildById=function(a){return this.childIndex_[a]};
142D.prototype.getChild=function(a){if(a)return this.childNameIndex_[a]};D.prototype.getDescendant=function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];c=c.reduce(function(l,b){return l.concat(b)},[]);e=this;for(var g=0;g<c.length;g++)if(e=e.getChild(c[g]),!e||!e.getChild)return;return e};D.prototype.setIcon=function(a,c){c=void 0===c?this.el():c;if(this.player_.options_.experimentalSvgIcons){var e=Q("span",{className:"vjs-icon-placeholder vjs-svg-icon"},{"aria-hidden":"true"}),g= 143document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttributeNS(null,"viewBox","0 0 512 512");var l=document.createElementNS("http://www.w3.org/2000/svg","use");g.appendChild(l);l.setAttributeNS(null,"href","#vjs-icon-"+a);e.appendChild(g);this.iconIsSet_?c.replaceChild(e,c.querySelector(".vjs-icon-placeholder")):c.appendChild(e);this.iconIsSet_=!0;return e}};D.prototype.addChild=function(a,c,e){c=void 0===c?{}:c;e=void 0===e?this.children_.length:e;if("string"===typeof a){var g=Za(a); 144a=c.componentClass||g;c.name=g;var l=D.getComponent(a);if(!l)throw Error("Component "+a+" does not exist");if("function"!==typeof l)return null;c=new l(this.player_||this,c)}else c=a;c.parentComponent_&&c.parentComponent_.removeChild(c);this.children_.splice(e,0,c);c.parentComponent_=this;"function"===typeof c.id&&(this.childIndex_[c.id()]=c);if(g=g||c.name&&Za(c.name()))this.childNameIndex_[g]=c,this.childNameIndex_[Ce(g)]=c;"function"===typeof c.el&&c.el()&&(g=null,this.children_[e+1]&&(this.children_[e+ 1451].el_?g=this.children_[e+1].el_:Y(this.children_[e+1])&&(g=this.children_[e+1])),this.contentEl().insertBefore(c.el(),g));return c};D.prototype.removeChild=function(a){"string"===typeof a&&(a=this.getChild(a));if(a&&this.children_){for(var c=!1,e=this.children_.length-1;0<=e;e--)if(this.children_[e]===a){c=!0;this.children_.splice(e,1);break}c&&(a.parentComponent_=null,this.childIndex_[a.id()]=null,this.childNameIndex_[Za(a.name())]=null,this.childNameIndex_[Ce(a.name())]=null,(c=a.el())&&c.parentNode=== 146this.contentEl()&&this.contentEl().removeChild(a.el()))}};D.prototype.initChildren=function(){var a=this,c=this.options_.children;if(c){var e=this.options_,g=D.getComponent("Tech");var l=Array.isArray(c)?c:Object.keys(c);l.concat(Object.keys(this.options_).filter(function(b){return!l.some(function(d){return"string"===typeof d?b===d:b===d.name})})).map(function(b){if("string"===typeof b){var d=b;b=c[d]||a.options_[d]||{}}else d=b.name;return{name:d,opts:b}}).filter(function(b){return(b=D.getComponent(b.opts.componentClass|| 147Za(b.name)))&&!g.isTech(b)}).forEach(function(b){var d=b.name;b=b.opts;void 0!==e[d]&&(b=e[d]);!1!==b&&(!0===b&&(b={}),b.playerOptions=a.options_.playerOptions,(b=a.addChild(d,b))&&(a[d]=b))})}};D.prototype.buildCSSClass=function(){return""};D.prototype.ready=function(a,c){c=void 0===c?!1:c;a&&(this.isReady_?c?a.call(this):this.setTimeout(a,1):(this.readyQueue_=this.readyQueue_||[],this.readyQueue_.push(a)))};D.prototype.triggerReady=function(){this.isReady_=!0;this.setTimeout(function(){var a=this.readyQueue_; 148this.readyQueue_=[];a&&0<a.length&&a.forEach(function(c){c.call(this)},this);this.trigger("ready")},1)};D.prototype.$=function(a,c){return Oc(a,c||this.contentEl())};D.prototype.$$=function(a,c){return Rj(a,c||this.contentEl())};D.prototype.hasClass=function(a){return Ca(this.el_,a)};D.prototype.addClass=function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];Ya.apply(null,[this.el_].concat($jscomp.arrayFromIterable(c)))};D.prototype.removeClass=function(a){for(var c=[],e=0;e<arguments.length;++e)c[e- 1490]=arguments[e];ic.apply(null,[this.el_].concat($jscomp.arrayFromIterable(c)))};D.prototype.toggleClass=function(a,c){gf(this.el_,a,c)};D.prototype.show=function(){this.removeClass("vjs-hidden")};D.prototype.hide=function(){this.addClass("vjs-hidden")};D.prototype.lockShowing=function(){this.addClass("vjs-lock-showing")};D.prototype.unlockShowing=function(){this.removeClass("vjs-lock-showing")};D.prototype.getAttribute=function(a){return this.el_.getAttribute(a)};D.prototype.setAttribute=function(a, 150c){this.el_.setAttribute(a,c)};D.prototype.removeAttribute=function(a){this.el_.removeAttribute(a)};D.prototype.width=function(a,c){return this.dimension("width",a,c)};D.prototype.height=function(a,c){return this.dimension("height",a,c)};D.prototype.dimensions=function(a,c){this.width(a,!0);this.height(c)};D.prototype.dimension=function(a,c,e){if(void 0!==c){if(null===c||c!==c)c=0;-1!==(""+c).indexOf("%")||-1!==(""+c).indexOf("px")?this.el_.style[a]=c:this.el_.style[a]="auto"===c?"":c+"px";e||this.trigger("componentresize")}else{if(!this.el_)return 0; 151c=this.el_.style[a];e=c.indexOf("px");return-1!==e?parseInt(c.slice(0,e),10):parseInt(this.el_["offset"+Za(a)],10)}};
151D.prototype.currentDimension=function(a){if("width"!==a&&"height"!==a)throw Error("currentDimension only accepts width or height value");var c=zd(this.el_,a);c=parseFloat(c);if(0===c||isNaN(c))a="offset"+Za(a),c=this.el_[a];return c};D.prototype.currentDimensions=function(){return{width:this.currentDimension("width"),height:this.currentDimension("height")}};D.prototype.currentWidth= 152function(){return this.currentDimension("width")};D.prototype.currentHeight=function(){return this.currentDimension("height")};D.prototype.getPositions=function(){var a=this.el_.getBoundingClientRect();return{boundingClientRect:{x:a.x,y:a.y,width:a.width,height:a.height,top:a.top,right:a.right,bottom:a.bottom,left:a.left},center:{x:a.left+a.width/2,y:a.top+a.height/2,width:0,height:0,top:a.top+a.height/2,right:a.left+a.width/2,bottom:a.top+a.height/2,left:a.left+a.width/2}}};D.prototype.focus=function(){this.el_.focus()}; 153D.prototype.blur=function(){this.el_.blur()};D.prototype.handleKeyDown=function(a){this.player_&&("Tab"===a.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled||a.stopPropagation(),this.player_.handleKeyDown(a))};D.prototype.handleKeyPress=function(a){this.handleKeyDown(a)};D.prototype.emitTapEvents=function(){var a=0,c=null,e;this.on("touchstart",function(l){1===l.touches.length&&(c={pageX:l.touches[0].pageX,pageY:l.touches[0].pageY}, 154a=window.performance.now(),e=!0)});this.on("touchmove",function(l){if(1<l.touches.length)e=!1;else if(c){var b=l.touches[0].pageX-c.pageX;l=l.touches[0].pageY-c.pageY;10<Math.sqrt(b*b+l*l)&&(e=!1)}});var g=function(){e=!1};this.on("touchleave",g);this.on("touchcancel",g);this.on("touchend",function(l){c=null;!0===e&&200>window.performance.now()-a&&(l.preventDefault(),this.trigger("tap"))})};D.prototype.enableTouchActivity=function(){if(this.player()&&this.player().reportUserActivity){var a=Ka(this.player(), 155this.player().reportUserActivity),c;this.on("touchstart",function(){a();this.clearInterval(c);c=this.setInterval(a,250)});var e=function(g){a();this.clearInterval(c)};this.on("touchmove",a);this.on("touchend",e);this.on("touchcancel",e)}};D.prototype.setTimeout=function(a,c){var e=this;a=Ka(this,a);this.clearTimersOnDispose_();var g=window.setTimeout(function(){e.setTimeoutIds_.has(g)&&e.setTimeoutIds_.delete(g);a()},c);this.setTimeoutIds_.add(g);return g};D.prototype.clearTimeout=function(a){this.setTimeoutIds_.has(a)&& 156(this.setTimeoutIds_.delete(a),window.clearTimeout(a));return a};D.prototype.setInterval=function(a,c){a=Ka(this,a);this.clearTimersOnDispose_();a=window.setInterval(a,c);this.setIntervalIds_.add(a);return a};D.prototype.clearInterval=function(a){this.setIntervalIds_.has(a)&&(this.setIntervalIds_.delete(a),window.clearInterval(a));return a};D.prototype.requestAnimationFrame=function(a){var c=this;this.clearTimersOnDispose_();a=Ka(this,a);var e=window.requestAnimationFrame(function(){c.rafIds_.has(e)&& 157c.rafIds_.delete(e);a()});this.rafIds_.add(e);return e};D.prototype.requestNamedAnimationFrame=function(a,c){var e=this;this.namedRafs_.has(a)&&this.cancelNamedAnimationFrame(a);this.clearTimersOnDispose_();c=Ka(this,c);var g=this.requestAnimationFrame(function(){c();e.namedRafs_.has(a)&&e.namedRafs_.delete(a)});this.namedRafs_.set(a,g);return a};D.prototype.cancelNamedAnimationFrame=function(a){this.namedRafs_.has(a)&&(this.cancelAnimationFrame(this.namedRafs_.get(a)),this.namedRafs_.delete(a))}; 158D.prototype.cancelAnimationFrame=function(a){this.rafIds_.has(a)&&(this.rafIds_.delete(a),window.cancelAnimationFrame(a));return a};D.prototype.clearTimersOnDispose_=function(){var a=this;this.clearingTimersOnDispose_||(this.clearingTimersOnDispose_=!0,this.one("dispose",function(){[["namedRafs_","cancelNamedAnimationFrame"],["rafIds_","cancelAnimationFrame"],["setTimeoutIds_","clearTimeout"],["setIntervalIds_","clearInterval"]].forEach(function(c){c=$jscomp.makeIterator(c);var e=c.next().value,g= 159c.next().value;a[e].forEach(function(l,b){return a[g](b)})});a.clearingTimersOnDispose_=!1}))};D.prototype.getIsDisabled=function(){return!!this.el_.disabled};D.prototype.getIsExpresslyInert=function(){return this.el_.inert&&!this.el_.ownerDocument.documentElement.inert};D.prototype.getIsFocusable=function(a){return 0<=(a||this.el_).tabIndex&&!(this.getIsDisabled()||this.getIsExpresslyInert())};D.prototype.getIsAvailableToBeFocused=function(a){function c(g){g=window.getComputedStyle(g,null);var l= 160g.getPropertyValue("visibility"),b=["hidden","collapse"];return"none"!==g.getPropertyValue("display")&&!b.includes(l)}function e(g){return c(g.parentElement)&&c(g)&&"0"!==g.style.opacity&&"0px"!==window.getComputedStyle(g).height&&"0px"!==window.getComputedStyle(g).width?!0:!1}a||(a=this.el());return function(g){if(0===g.offsetWidth+g.offsetHeight+g.getBoundingClientRect().height+g.getBoundingClientRect().width)return!1;var l=g.getBoundingClientRect().left+g.offsetWidth/2,b=g.getBoundingClientRect().top+ 161g.offsetHeight/2;if(0>l||l>(document.documentElement.clientWidth||window.innerWidth)||0>b||b>(document.documentElement.clientHeight||window.innerHeight))return!1;for(l=document.elementFromPoint(l,b);l;){if(l===g)return!0;
161if(l.parentNode)l=l.parentNode;else return!1}}(a)&&e(a)&&(!a.parentElement||0<=a.tabIndex)?!0:!1};D.registerComponent=function(a,c){if("string"!==typeof a||!a)throw Error('Illegal component name, "QVC AEM Commerce Package - Designs Non Transactional"; must be a non-empty string.'); 162var e=D.getComponent("Tech");e=e&&e.isTech(c);var g=D===c||D.prototype.isPrototypeOf(c.prototype);if(e||!g)throw Error('Illegal component, "QVC AEM Commerce Package - Designs Non Transactional"; '+(e?"techs must be registered using Tech.registerTech()":"must be a Component subclass")+".");a=Za(a);D.components_||(D.components_={});e=D.getComponent("Player");if("Player"===a&&e&&e.players){var l=e.players;e=Object.keys(l);if(l&&0<e.length&&e.map(function(b){return l[b]}).every(Boolean))throw Error("Can not register Player component after player has been created."); 163}D.components_[a]=c;return D.components_[Ce(a)]=c};D.getComponent=function(a){if(a&&D.components_)return D.components_[a]};D.registerComponent("Component",D);var Si=function(a,c){a=0>a?0:a;var e=Math.floor(a%60),g=Math.floor(a/60%60),l=Math.floor(a/3600),b=Math.floor(c/60%60);c=Math.floor(c/3600);if(isNaN(a)||Infinity===a)l=g=e="-";l=0<l||0<c?l+":":"";return l+(((l||10<=b)&&10>g?"0"+g:g)+":")+(10>e?"0"+e:e)},Sg=Si,Gn=Object.freeze({__proto__:null,createTimeRanges:dc,createTimeRange:dc,setFormatTime:Qi, 164resetFormatTime:Ri,formatTime:bd});Sa.prototype.code=0;Sa.prototype.message="";Sa.prototype.status=null;Sa.prototype.metadata=null;Sa.errorTypes="MEDIA_ERR_CUSTOM MEDIA_ERR_ABORTED MEDIA_ERR_NETWORK MEDIA_ERR_DECODE MEDIA_ERR_SRC_NOT_SUPPORTED MEDIA_ERR_ENCRYPTED".split(" ");Sa.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.", 1654:"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."};Sa.MEDIA_ERR_CUSTOM=0;Sa.prototype.MEDIA_ERR_CUSTOM=0;Sa.MEDIA_ERR_ABORTED=1;Sa.prototype.MEDIA_ERR_ABORTED=1;Sa.MEDIA_ERR_NETWORK=2;Sa.prototype.MEDIA_ERR_NETWORK=2;Sa.MEDIA_ERR_DECODE=3;Sa.prototype.MEDIA_ERR_DECODE=3;Sa.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Sa.prototype.MEDIA_ERR_SRC_NOT_SUPPORTED=4;Sa.MEDIA_ERR_ENCRYPTED= 1665;Sa.prototype.MEDIA_ERR_ENCRYPTED=5;var qh=function(a){return"kind label language id inBandMetadataTrackDispatchType mode src".split(" ").reduce(function(c,e,g){a[e]&&(c[e]=a[e]);return c},{cues:a.cues&&Array.prototype.map.call(a.cues,function(c){return{startTime:c.startTime,endTime:c.endTime,text:c.text,id:c.id}})})},Zj={textTracksToJson:function(a){var c=a.$$("track"),e=Array.prototype.map.call(c,function(g){return g.track});return Array.prototype.map.call(c,function(g){var l=qh(g.track);g.src&& 167(l.src=g.src);return l}).concat(Array.prototype.filter.call(a.textTracks(),function(g){return-1===e.indexOf(g)}).map(qh))},jsonToTextTracks:function(a,c){a.forEach(function(e){var g=c.addRemoteTextTrack(e).track;!e.src&&e.cues&&e.cues.forEach(function(l){return g.addCue(l)})});return c.textTracks()},trackToJson_:qh},Da=function(a,c){var e=D.call(this,a,c)||this;e.handleKeyDown_=function(g){return e.handleKeyDown(g)};e.close_=function(g){return e.close(g)};e.opened_=e.hasBeenOpened_=e.hasBeenFilled_= 168!1;e.closeable(!e.options_.uncloseable);e.content(e.options_.content);e.contentEl_=Q("div",{className:"vjs-modal-dialog-content"},{role:"document"});e.descEl_=Q("p",{className:"vjs-modal-dialog-description vjs-control-text",id:e.el().getAttribute("aria-describedby")});la(e.descEl_,e.description());e.el_.appendChild(e.descEl_);e.el_.appendChild(e.contentEl_);return e};$jscomp.inherits(Da,D);Da.prototype.createEl=function(){return D.prototype.createEl.call(this,"div",{className:this.buildCSSClass(), 169tabIndex:-1},{"aria-describedby":this.id()+"_description","aria-hidden":"true","aria-label":this.label(),role:"dialog","aria-live":"polite"})};Da.prototype.dispose=function(){this.previouslyActiveEl_=this.descEl_=this.contentEl_=null;D.prototype.dispose.call(this)};Da.prototype.buildCSSClass=function(){return"vjs-modal-dialog vjs-hidden "+D.prototype.buildCSSClass.call(this)};Da.prototype.label=function(){return this.localize(this.options_.label||"Modal Window")};Da.prototype.description=function(){var a= 170this.options_.description||this.localize("This is a modal window.");this.closeable()&&(a+=" "+this.localize("This modal can be closed by pressing the Escape key or activating the close button."));return a};Da.prototype.open=function(){if(this.opened_)this.options_.fillAlways&&this.fill();else{var a=this.player();this.trigger("beforemodalopen");this.opened_=!0;(this.options_.fillAlways||!this.hasBeenOpened_&&!this.hasBeenFilled_)&&this.fill();this.wasPlaying_=!a.paused();
170this.options_.pauseOnOpen&& 171this.wasPlaying_&&a.pause();this.on("keydown",this.handleKeyDown_);this.hadControls_=a.controls();a.controls(!1);this.show();this.conditionalFocus_();this.el().setAttribute("aria-hidden","false");this.trigger("modalopen");this.hasBeenOpened_=!0}};Da.prototype.opened=function(a){if("boolean"===typeof a)this[a?"open":"close"]();return this.opened_};Da.prototype.close=function(){if(this.opened_){var a=this.player();this.trigger("beforemodalclose");this.opened_=!1;this.wasPlaying_&&this.options_.pauseOnOpen&& 172a.play();this.off("keydown",this.handleKeyDown_);this.hadControls_&&a.controls(!0);this.hide();this.el().setAttribute("aria-hidden","true");this.trigger({type:"modalclose",bubbles:!0});this.conditionalBlur_();this.options_.temporary&&this.dispose()}};Da.prototype.closeable=function(a){if("boolean"===typeof a){a=this.closeable_=!!a;var c=this.getChild("closeButton");if(a&&!c){var e=this.contentEl_;this.contentEl_=this.el_;c=this.addChild("closeButton",{controlText:"Close Modal Dialog"});this.contentEl_= 173e;this.on(c,"close",this.close_)}!a&&c&&(this.off(c,"close",this.close_),this.removeChild(c),c.dispose())}return this.closeable_};Da.prototype.fill=function(){this.fillWith(this.content())};Da.prototype.fillWith=function(a){var c=this.contentEl(),e=c.parentNode,g=c.nextSibling;this.trigger("beforemodalfill");this.hasBeenFilled_=!0;e.removeChild(c);this.empty();Ki(c,a);this.trigger("modalfill");g?e.insertBefore(c,g):e.appendChild(c);(a=this.getChild("closeButton"))&&e.appendChild(a.el_);this.trigger("aftermodalfill")}; 174Da.prototype.empty=function(){this.trigger("beforemodalempty");kf(this.contentEl());this.trigger("modalempty")};Da.prototype.content=function(a){"undefined"!==typeof a&&(this.content_=a);return this.content_};Da.prototype.conditionalFocus_=function(){var a=document.activeElement,c=this.player_.el_;this.previouslyActiveEl_=null;if(c.contains(a)||c===a)this.previouslyActiveEl_=a,this.focus()};Da.prototype.conditionalBlur_=function(){this.previouslyActiveEl_&&(this.previouslyActiveEl_.focus(),this.previouslyActiveEl_= 175null)};Da.prototype.handleKeyDown=function(a){this.trigger({type:"modalKeydown",originalEvent:a,target:this,bubbles:!0});a.stopPropagation();if("Escape"===a.key&&this.closeable())a.preventDefault(),this.close();else if("Tab"===a.key){for(var c=this.focusableEls_(),e=this.el_.querySelector(":focus"),g,l=0;l<c.length;l++)if(e===c[l]){g=l;break}document.activeElement===this.el_&&(g=0);a.shiftKey&&0===g?(c[c.length-1].focus(),a.preventDefault()):a.shiftKey||g!==c.length-1||(c[0].focus(),a.preventDefault())}}; 176Da.prototype.focusableEls_=function(){var a=this.el_.querySelectorAll("*");return Array.prototype.filter.call(a,function(c){return(c instanceof window.HTMLAnchorElement||c instanceof window.HTMLAreaElement)&&c.hasAttribute("href")||(c instanceof window.HTMLInputElement||c instanceof window.HTMLSelectElement||c instanceof window.HTMLTextAreaElement||c instanceof window.HTMLButtonElement)&&!c.hasAttribute("disabled")||c instanceof window.HTMLIFrameElement||c instanceof window.HTMLObjectElement||c instanceof 177window.HTMLEmbedElement||c.hasAttribute("tabindex")&&-1!==c.getAttribute("tabindex")||c.hasAttribute("contenteditable")})};Da.prototype.options_={pauseOnOpen:!0,temporary:!0};D.registerComponent("ModalDialog",Da);var ib=function(a){a=void 0===a?[]:a;this.tracks_=[];Object.defineProperty(this,"length",{get:function(){return this.tracks_.length}});for(var c=0;c<a.length;c++)this.addTrack(a[c]);return this};$jscomp.inherits(ib,hb);ib.prototype.addTrack=function(a){var c=this,e=this.tracks_.length;""+ 178e in this||Object.defineProperty(this,e,{get:function(){return this.tracks_[e]}});-1===this.tracks_.indexOf(a)&&(this.tracks_.push(a),this.trigger({track:a,type:"addtrack",target:this}));a.labelchange_=function(){c.trigger({track:a,type:"labelchange",target:c})};zc(a)&&a.addEventListener("labelchange",a.labelchange_)};ib.prototype.removeTrack=function(a){for(var c,e=0,g=this.length;e<g;e++)if(this[e]===a){c=this[e];c.off&&c.off();this.tracks_.splice(e,1);break}c&&this.trigger({track:c,type:"removetrack", 179target:this})};ib.prototype.getTrackById=function(a){for(var c=null,e=0,g=this.length;e<g;e++){var l=this[e];if(l.id===a){c=l;break}}return c};ib.prototype.allowedEvents_={change:"change",addtrack:"addtrack",removetrack:"removetrack",labelchange:"labelchange"};for(var Hn in ib.prototype.allowedEvents_)ib.prototype["on"+Hn]=null;var rh=function(a,c){for(var e=0;e<a.length;e++)Object.keys(a[e]).length&&c.id!==a[e].id&&(a[e].enabled=!1)},Pf=function(a){a=void 0===a?[]:a;for(var c=a.length-1;0<=c;c--)if(a[c].enabled){rh(a, 180a[c]);break}a=ib.call(this,a)||this;a.changing_=!1;return a};$jscomp.inherits(Pf,ib);Pf.prototype.addTrack=function(a){var c=this;a.enabled&&rh(this,a);ib.prototype.addTrack.call(this,a);a.addEventListener&&(a.enabledChange_=function(){c.changing_||(c.changing_=!0,rh(c,a),c.changing_=!1,c.trigger("change"))},a.addEventListener("enabledchange",a.enabledChange_))};Pf.prototype.removeTrack=function(a){ib.prototype.removeTrack.call(this,a);a.removeEventListener&&a.enabledChange_&&(a.removeEventListener("enabledchange", 181a.enabledChange_),a.enabledChange_=null)};var sh=function(a,c){for(var e=0;e<a.length;e++)Object.keys(a[e]).length&&c.id!==a[e].id&&(a[e].selected=!1)},Qf=function(a){a=void 0===a?[]:a;for(var c=a.length-1;0<=c;c--)if(a[c].selected){sh(a,a[c]);break}a=ib.call(this,a)||this;a.changing_=!1;Object.defineProperty(a,"selectedIndex",{get:function(){for(var e=0;e<this.length;e++)if(this[e].selected)return e;return-1},set:function(){}});return a};$jscomp.inherits(Qf,ib);Qf.prototype.addTrack=function(a){var c= 182this;a.selected&&sh(this,a);ib.prototype.addTrack.call(this,a);a.addEventListener&&(a.selectedChange_=function(){c.changing_||(c.changing_=!0,sh(c,a),c.changing_=!1,c.trigger("change"))},a.addEventListener("selectedchange",a.selectedChange_))};Qf.prototype.removeTrack=function(a){ib.prototype.removeTrack.call(this,a);a.removeEventListener&&a.selectedChange_&&(a.removeEventListener("selectedchange",a.selectedChange_),a.selectedChange_=null)};var De=function(){return ib.apply(this,arguments)||this}; 183$jscomp.inherits(De,ib);De.prototype.addTrack=function(a){var c=this;ib.prototype.addTrack.call(this,a);this.queueChange_||(this.queueChange_=function(){return c.queueTrigger("change")});this.triggerSelectedlanguagechange||(this.triggerSelectedlanguagechange_=function(){return c.trigger("selectedlanguagechange")});a.addEventListener("modechange",this.queueChange_);-1===["metadata","chapters"].indexOf(a.kind)&&a.addEventListener("modechange",this.triggerSelectedlanguagechange_)};De.prototype.removeTrack= 184function(a){ib.prototype.removeTrack.call(this,a);a.removeEventListener&&(this.queueChange_&&a.removeEventListener("modechange",this.queueChange_),this.selectedlanguagechange_&&a.removeEventListener("modechange",this.triggerSelectedlanguagechange_))};var Rf=function(a){a=void 0===a?[]:a;this.trackElements_=[];Object.defineProperty(this,"length",{get:function(){return this.trackElements_.length}});for(var c=0,e=a.length;c<e;c++)this.addTrackElement_(a[c])};Rf.prototype.addTrackElement_=function(a){var c= 185this.trackElements_.length;""+c in this||Object.defineProperty(this,c,{get:function(){return this.trackElements_[c]}});
185-1===this.trackElements_.indexOf(a)&&this.trackElements_.push(a)};Rf.prototype.getTrackElementByTrack_=function(a){for(var c,e=0,g=this.trackElements_.length;e<g;e++)if(a===this.trackElements_[e].track){c=this.trackElements_[e];break}return c};Rf.prototype.removeTrackElement_=function(a){for(var c=0,e=this.trackElements_.length;c<e;c++)if(a===this.trackElements_[c]){this.trackElements_[c].track&& 186"function"===typeof this.trackElements_[c].track.off&&this.trackElements_[c].track.off();"function"===typeof this.trackElements_[c].off&&this.trackElements_[c].off();this.trackElements_.splice(c,1);break}};var Ee=function(a){Ee.prototype.setCues_.call(this,a);Object.defineProperty(this,"length",{get:function(){return this.length_}})};Ee.prototype.setCues_=function(a){var c=this.length||0,e=0,g=a.length;this.cues_=a;this.length_=a.length;a=function(l){""+l in this||Object.defineProperty(this,""+l, 187{get:function(){return this.cues_[l]}})};if(c<g)for(e=c;e<g;e++)a.call(this,e)};Ee.prototype.getCueById=function(a){for(var c=null,e=0,g=this.length;e<g;e++){var l=this[e];if(l.id===a){c=l;break}}return c};var In={alternative:"alternative",captions:"captions",main:"main",sign:"sign",subtitles:"subtitles",commentary:"commentary"},Jn={alternative:"alternative",descriptions:"descriptions",main:"main","main-desc":"main-desc",translation:"translation",commentary:"commentary"},Kn={subtitles:"subtitles", 188captions:"captions",descriptions:"descriptions",chapters:"chapters",metadata:"metadata"},ak={disabled:"disabled",hidden:"hidden",showing:"showing"},gd=function(a){a=void 0===a?{}:a;var c={id:a.id||"vjs_track_"+Vb++,kind:a.kind||"",language:a.language||""},e=a.label||"";a={};for(var g in c)a.$jscomp$loop$prop$key$245=g,Object.defineProperty(this,a.$jscomp$loop$prop$key$245,{get:function(l){return function(){return c[l.$jscomp$loop$prop$key$245]}}
188(a),set:function(){}}),a={$jscomp$loop$prop$key$245:a.$jscomp$loop$prop$key$245}; 189Object.defineProperty(this,"label",{get:function(){return e},set:function(l){l!==e&&(e=l,this.trigger("labelchange"))}});return this};$jscomp.inherits(gd,hb);var th=function(a){return new URL(a,document.baseURI)},bk=function(a){return(new URL(a,document.baseURI)).href},uh=function(a){return"string"===typeof a&&(a=/^(\/?)([\s\S]*?)((?:\.{1,2}|[^\/]+?)(\.([^\.\/\?]+)))(?:[\/]*|[\?].*)$/.exec(a))?a.pop().toLowerCase():""},Sf=function(a,c){c=void 0===c?window.location:c;return th(a).origin!==c.origin}, 190Ln=Object.freeze({__proto__:null,parseUrl:th,getAbsoluteURL:bk,getFileExtension:uh,isCrossOrigin:Sf}),Fe="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},Wb="undefined"!==typeof window?window:"undefined"!==typeof Fe?Fe:"undefined"!==typeof self?self:{},Wi=nf(function(a){function c(){return a.exports=c=Object.assign?Object.assign.bind():function(e){for(var g=1;g<arguments.length;g++){var l=arguments[g], 191b;for(b in l)({}).hasOwnProperty.call(l,b)&&(e[b]=l[b])}return e},a.exports.__esModule=!0,a.exports["default"]=a.exports,c.apply(null,arguments)}a.exports=c;a.exports.__esModule=!0;a.exports["default"]=a.exports}),jb=function(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a["default"]:a}(Wi),Zm=Object.prototype.toString,ck=function(){function a(){this.typeToInterceptorsMap_=new Map;this.enabled_=!1}var c=a.prototype;c.getIsEnabled=function(){return this.enabled_};c.enable= 192function(){this.enabled_=!0};c.disable=function(){this.enabled_=!1};c.reset=function(){this.typeToInterceptorsMap_=new Map;this.enabled_=!1};c.addInterceptor=function(e,g){this.typeToInterceptorsMap_.has(e)||this.typeToInterceptorsMap_.set(e,new Set);e=this.typeToInterceptorsMap_.get(e);if(e.has(g))return!1;e.add(g);return!0};c.removeInterceptor=function(e,g){return(e=this.typeToInterceptorsMap_.get(e))&&e.has(g)?(e.delete(g),!0):!1};c.clearInterceptorsByType=function(e){if(!this.typeToInterceptorsMap_.get(e))return!1; 193this.typeToInterceptorsMap_.delete(e);this.typeToInterceptorsMap_.set(e,new Set);return!0};c.clear=function(){if(!this.typeToInterceptorsMap_.size)return!1;this.typeToInterceptorsMap_=new Map;return!0};c.getForType=function(e){return this.typeToInterceptorsMap_.get(e)||new Set};c.execute=function(e,g){e=this.getForType(e);e=Vm(e);for(var l;!(l=e()).done;){l=l.value;try{g=l(g)}catch(b){}}return g};return a}(),Nn=function(){function a(){this.maxAttempts_=1;this.fuzzFactor_=this.delayFactor_=.1;this.initialDelay_= 1941E3;this.enabled_=!1}var c=a.prototype;c.getIsEnabled=function(){return this.enabled_};c.enable=function(){this.enabled_=!0};c.disable=function(){this.enabled_=!1};c.reset=function(){this.maxAttempts_=1;this.fuzzFactor_=this.delayFactor_=.1;this.initialDelay_=1E3;this.enabled_=!1};c.getMaxAttempts=function(){return this.maxAttempts_};c.setMaxAttempts=function(e){this.maxAttempts_=e};c.getDelayFactor=function(){return this.delayFactor_};c.setDelayFactor=function(e){this.delayFactor_=e};c.getFuzzFactor= 195function(){return this.fuzzFactor_};c.setFuzzFactor=function(e){this.fuzzFactor_=e};c.getInitialDelay=function(){return this.initialDelay_};c.setInitialDelay=function(e){this.initialDelay_=e};c.createRetry=function(e){e=void 0===e?{}:e;return new Mn({maxAttempts:e.maxAttempts||this.maxAttempts_,delayFactor:e.delayFactor||this.delayFactor_,fuzzFactor:e.fuzzFactor||this.fuzzFactor_,initialDelay:e.initialDelay||this.initialDelay_})};return a}(),Mn=function(){function a(e){this.maxAttempts_=e.maxAttempts; 196this.delayFactor_=e.delayFactor;this.fuzzFactor_=e.fuzzFactor;this.currentDelay_=e.initialDelay;this.currentAttempt_=1}var c=a.prototype;c.moveToNextAttempt=function(){this.currentAttempt_++;this.currentDelay_+=this.currentDelay_*this.delayFactor_};c.shouldRetry=function(){return this.currentAttempt_<this.maxAttempts_};c.getCurrentDelay=function(){return this.currentDelay_};c.getCurrentMinPossibleDelay=function(){return(1-this.fuzzFactor_)*this.currentDelay_};c.getCurrentMaxPossibleDelay=function(){return(1+ 197this.fuzzFactor_)*this.currentDelay_};c.getCurrentFuzzedDelay=function(){var e=this.getCurrentMinPossibleDelay(),g=this.getCurrentMaxPossibleDelay();return e+Math.random()*(g-e)};return a}();Ta.httpHandler=function(a,c){void 0===c&&(c=!1);return function(e,g,l){if(e)a(e);else if(400<=g.statusCode&&599>=g.statusCode){e=l;if(c)if(Wb.TextDecoder){g=Xm(g.headers&&g.headers["content-type"]);try{e=(new TextDecoder(g)).decode(l)}catch(b){}}else e=String.fromCharCode.apply(null,new Uint8Array(l));a({cause:e})}else a(null, 198l)}};Ta.requestInterceptorsStorage=new ck;Ta.responseInterceptorsStorage=new ck;Ta.retryManager=new Nn;var $m=function(a){var c={};if(!a)return c;a.trim().split("\n").forEach(function(e){var g=e.indexOf(":"),l=e.slice(0,g).trim().toLowerCase();e=e.slice(g+1).trim();"undefined"===typeof c[l]?c[l]=e:Array.isArray(c[l])?c[l].push(e):c[l]=[c[l],e]});return c};Ta.XMLHttpRequest=Wb.XMLHttpRequest||an;Ta.XDomainRequest="withCredentials"in new Ta.XMLHttpRequest?Ta.XMLHttpRequest:Wb.XDomainRequest;(function(a, 199c){for(var e=0;e<a.length;e++)c(a[e])})("get put post patch head delete".split(" "),function(a){Ta["delete"===a?"del":a]=function(c,e,g){e=Vi(c,e,g);e.method=a.toUpperCase();return Tg(e)}});Ta.default=Ta;var dk=function(a,c){var e=new window.WebVTT.Parser(window,window.vttjs,window.WebVTT.StringDecoder()),g=[];e.oncue=function(l){c.addCue(l)};e.onparsingerror=function(l){g.push(l)};e.onflush=function(){c.trigger({type:"loadeddata",target:c})};e.parse(a);0<g.length&&(window.console&&window.console.groupCollapsed&& 200window.console.groupCollapsed("Text Track parsing errors for "+c.src),g.forEach(function(l){return sa.error(l)}),window.console&&window.console.groupEnd&&window.console.groupEnd());e.flush()},ek=function(a,c){var e={uri:a};if(a=Sf(a))e.cors=a;if(a="use-credentials"===c.tech_.crossOrigin())e.withCredentials=a;Ta(e,Ka(this,function(g,l,b){if(g)return sa.error(g,l);c.loaded_=!0;"function"!==typeof window.WebVTT?c.tech_&&c.tech_.any(["vttjsloaded","vttjserror"],function(d){if("vttjserror"===d.type)sa.error("vttjs failed to load, stopping trying to process "+ 201c.src);else return dk(b,c)}):dk(b,c)}))},qc=function(a){a=void 0===a?{}:a;
201if(!a.tech)throw Error("A tech was not provided.");a=B(a,{kind:Kn[a.kind]||"subtitles",language:a.language||a.srclang||""});var c=ak[a.mode]||"disabled",e=a.default;if("metadata"===a.kind||"chapters"===a.kind)c="hidden";var g=gd.call(this,a)||this;g.tech_=a.tech;g.cues_=[];g.activeCues_=[];g.preload_=!1!==g.tech_.preloadTextTracks;var l=new Ee(g.cues_),b=new Ee(g.activeCues_),d=!1;g.timeupdateHandler=Ka(g,function(f){f=void 0=== 202f?{}:f;this.tech_.isDisposed()||(this.tech_.isReady_&&(this.activeCues=this.activeCues,d&&(this.trigger("cuechange"),d=!1)),"timeupdate"!==f.type&&(this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler)))});g.tech_.one("dispose",function(){g.stopTracking()});"disabled"!==c&&g.startTracking();Object.defineProperties(g,{default:{get:function(){return e},set:function(){}},mode:{get:function(){return c},set:function(f){ak[f]&&c!==f&&(c=f,this.preload_||"disabled"===c||0!==this.cues.length|| 203ek(this.src,this),this.stopTracking(),"disabled"!==c&&this.startTracking(),this.trigger("modechange"))}},cues:{get:function(){return this.loaded_?l:null},set:function(){}},activeCues:{get:function(){if(!this.loaded_)return null;if(0===this.cues.length)return b;for(var f=this.tech_.currentTime(),h=[],m=0,p=this.cues.length;m<p;m++){var t=this.cues[m];t.startTime<=f&&t.endTime>=f&&h.push(t)}d=!1;if(h.length!==this.activeCues_.length)d=!0;else for(f=0;f<h.length;f++)-1===this.activeCues_.indexOf(h[f])&& 204(d=!0);this.activeCues_=h;b.setCues_(this.activeCues_);return b},set:function(){}}});a.src?(g.src=a.src,g.preload_||(g.loaded_=!0),(g.preload_||"subtitles"!==a.kind&&"captions"!==a.kind)&&ek(g.src,g)):g.loaded_=!0;return g};$jscomp.inherits(qc,gd);qc.prototype.startTracking=function(){this.rvf_=this.tech_.requestVideoFrameCallback(this.timeupdateHandler);this.tech_.on("timeupdate",this.timeupdateHandler)};qc.prototype.stopTracking=function(){this.rvf_&&(this.tech_.cancelVideoFrameCallback(this.rvf_), 205this.rvf_=void 0);this.tech_.off("timeupdate",this.timeupdateHandler)};qc.prototype.addCue=function(a){var c=a;if(!("getCueAsHTML"in c)){c=new window.vttjs.VTTCue(a.startTime,a.endTime,a.text);for(var e in a)e in c||(c[e]=a[e]);c.id=a.id;c.originalCue_=a}a=this.tech_.textTracks();for(e=0;e<a.length;e++)a[e]!==this&&a[e].removeCue(c);this.cues_.push(c);this.cues.setCues_(this.cues_)};qc.prototype.removeCue=function(a){for(var c=this.cues_.length;c--;){var e=this.cues_[c];if(e===a||e.originalCue_&& 206e.originalCue_===a){this.cues_.splice(c,1);this.cues.setCues_(this.cues_);break}}};qc.prototype.allowedEvents_={cuechange:"cuechange"};var vh=function(a){a=void 0===a?{}:a;var c=B(a,{kind:Jn[a.kind]||""});a=gd.call(this,c)||this;var e=!1;Object.defineProperty(a,"enabled",{get:function(){return e},set:function(g){"boolean"===typeof g&&g!==e&&(e=g,this.trigger("enabledchange"))}});c.enabled&&(a.enabled=c.enabled);a.loaded_=!0;return a};$jscomp.inherits(vh,gd);var wh=function(a){a=void 0===a?{}:a;var c= 207B(a,{kind:In[a.kind]||""});a=gd.call(this,c)||this;var e=!1;Object.defineProperty(a,"selected",{get:function(){return e},set:function(g){"boolean"===typeof g&&g!==e&&(e=g,this.trigger("selectedchange"))}});c.selected&&(a.selected=c.selected);return a};$jscomp.inherits(wh,gd);var Ec=function(a){a=void 0===a?{}:a;var c=this;var e=new qc(a);c.kind=e.kind;c.src=e.src;c.srclang=e.language;c.label=e.label;c.default=e.default;Object.defineProperties(c,{readyState:{get:function(){return g}},track:{get:function(){return e}}}); 208var g=Ec.NONE;e.addEventListener("loadeddata",function(){g=Ec.LOADED;c.trigger({type:"load",target:c})});return c};$jscomp.inherits(Ec,hb);Ec.prototype.allowedEvents_={load:"load"};Ec.NONE=0;Ec.LOADING=1;Ec.LOADED=2;Ec.ERROR=3;var Xb={audio:{ListClass:Pf,TrackClass:vh,capitalName:"Audio"},video:{ListClass:Qf,TrackClass:wh,capitalName:"Video"},text:{ListClass:De,TrackClass:qc,capitalName:"Text"}};Object.keys(Xb).forEach(function(a){Xb[a].getterName=a+"Tracks";Xb[a].privateName=a+"Tracks_"});var Ld= 209{remoteText:{ListClass:De,TrackClass:qc,capitalName:"RemoteText",getterName:"remoteTextTracks",privateName:"remoteTextTracks_"},remoteTextEl:{ListClass:Rf,TrackClass:Ec,capitalName:"RemoteTextTrackEls",getterName:"remoteTextTrackEls",privateName:"remoteTextTrackEls_"}},Bb=Object.assign({}
209,Xb,Ld);Ld.names=Object.keys(Ld);Xb.names=Object.keys(Xb);Bb.names=[].concat(Ld.names).concat(Xb.names);var On={},fk="undefined"!==typeof Fe?Fe:"undefined"!==typeof window?window:{};if("undefined"!==typeof document)var xh= 210document;else(xh=fk["__GLOBAL_DOCUMENT_CACHE@4"])||(xh=fk["__GLOBAL_DOCUMENT_CACHE@4"]=On);var gk=xh,Vg=Object.create||function(){function a(){}return function(c){if(1!==arguments.length)throw Error("Object.create shim only accepts one parameter.");a.prototype=c;return new a}}();Rb.prototype=Vg(Error.prototype);Rb.prototype.constructor=Rb;Rb.Errors={BadSignature:{code:0,message:"Malformed WebVTT signature."},BadTimeStamp:{code:1,message:"Malformed time stamp."}};re.prototype={set:function(a,c){this.get(a)|| 211""===c||(this.values[a]=c)},get:function(a,c,e){return e?this.has(a)?this.values[a]:c[e]:this.has(a)?this.values[a]:c},has:function(a){return a in this.values},alt:function(a,c,e){for(var g=0;g<e.length;++g)if(c===e[g]){this.set(a,c);break}},integer:function(a,c){/^-?\d+$/.test(c)&&this.set(a,parseInt(c,10))},percent:function(a,c){return c.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(c=parseFloat(c),0<=c&&100>=c)?(this.set(a,c),!0):!1}};var Wg=gk.createElement&&gk.createElement("textarea"),cn={c:"span",i:"i", 212b:"b",u:"u",ruby:"ruby",rt:"rt",v:"span",lang:"span"},Zi={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)"},dn={v:"title",lang:"lang"},Yi={rt:"ruby"},$i=[[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, 2131808],[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], 214[67872,67897],[67903,67903],[67968,68023],[68030,68031],[68096,68096],[68112,68115],[68117,68119],[68121,68147],[68160,68167],[68176,68184],[68192,68223],[68352,68405],[68416,68437],[68440,68466],[68472,68479],[68608,68680],[126464,126467],[126469,126495],[126497,126498],[126500,126500],[126503,126503],[126505,126514],[126516,126519],[126521,126521],[126523,126523],[126530,126530],[126535,126535],[126537,126537],[126539,126539],[126541,126543],[126545,126546],[126548,126548],[126551,126551],[126553, 215126553],[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]];Xg.prototype.applyStyles=function(a,c){c=c||this.div;for(var e in a)a.hasOwnProperty(e)&&(c.style[e]=a[e])};Xg.prototype.formatStyle=function(a,c){return 0===a?0:a+c};of.prototype=Vg(Xg.prototype);of.prototype.constructor=of;Ab.prototype.move= 216function(a,c){c=void 0!==c?c:this.lineHeight;switch(a){case "+x":this.left+=c;this.right+=c;break;case "-x":this.left-=c;this.right-=c;break;case "+y":this.top+=c;this.bottom+=c;break;case "-y":this.top-=c,this.bottom-=c}};Ab.prototype.overlaps=function(a){return this.left<a.right&&this.right>a.left&&this.top<a.bottom&&this.bottom>a.top};Ab.prototype.overlapsAny=function(a){for(var c=0;c<a.length;c++)if(this.overlaps(a[c]))return!0;return!1};Ab.prototype.within=function(a){return this.top>=a.top&& 217this.bottom<=a.bottom&&this.left>=a.left&&this.right<=a.right};Ab.prototype.overlapsOppositeAxis=function(a,c){switch(c){case "+x":return this.left<a.left;case "-x":return this.right>a.right;case "+y":return this.top<a.top;case "-y":return this.bottom>a.bottom}};Ab.prototype.intersectPercentage=function(a){return Math.max(0,Math.min(this.right,a.right)-Math.max(this.left,a.left))*Math.max(0,Math.min(this.bottom,a.bottom)-Math.max(this.top,a.top))/(this.height*this.width)};Ab.prototype.toCSSCompatValues= 218function(a){return{top:this.top-a.top,bottom:a.bottom-this.bottom,left:this.left-a.left,right:a.right-this.right,height:this.height,width:this.width}};Ab.getSimpleBoxPosition=function(a){var c=a.div?a.div.offsetHeight:a.tagName?a.offsetHeight:0,e=a.div?a.div.offsetWidth:a.tagName?a.offsetWidth:0,g=a.div?a.div.offsetTop:a.tagName?a.offsetTop:0;a=a.div?a.div.getBoundingClientRect():a.tagName?a.getBoundingClientRect():a;return{left:a.left,right:a.right,top:a.top||g,height:a.height||c,bottom:a.bottom|| 219g+(a.height||c),width:a.width||e}};
219Bd.StringDecoder=function(){return{decode:function(a){if(!a)return"";if("string"!==typeof a)throw Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(a))}}};Bd.convertCueToDOMTree=function(a,c){return a&&c?Xi(a,c):null};Bd.processCues=function(a,c,e){if(!a||!c||!e)return null;for(;e.firstChild;)e.removeChild(e.firstChild);var g=a.document.createElement("div");g.style.position="absolute";g.style.left="0";g.style.right="0";g.style.top= 220"0";g.style.bottom="0";g.style.margin="1.5%";e.appendChild(g);if(function(f){for(var h=0;h<f.length;h++)if(f[h].hasBeenReset||!f[h].displayState)return!0;return!1}(c)){var l=[],b=Ab.getSimpleBoxPosition(g),d={font:Math.round(5*b.height)/100+"px sans-serif"};(function(){for(var f,h,m=0;m<c.length;m++){h=c[m];f=new of(a,h,d);g.appendChild(f.div);var p=void 0,t=void 0,x=f,u=b,z=l,A=new Ab(x),F=x.cue;if("number"===typeof F.line&&(F.snapToLines||0<=F.line&&100>=F.line))var H=F.line;else if(F.track&&F.track.textTrackList&& 221F.track.textTrackList.mediaElement){H=F.track;for(var L=H.textTrackList,I=0,N=0;N<L.length&&L[N]!==H;N++)"showing"===L[N].mode&&I++;H=-1*++I}else H=-1;L=[];if(F.snapToLines){switch(F.vertical){case "":L=["+y","-y"];t="height";break;case "rl":L=["+x","-x"];t="width";break;case "lr":L=["-x","+x"],t="width"}I=A.lineHeight;N=I*Math.round(H);t=u[t]+I;var T=L[0];Math.abs(N)>t&&(N=(0>N?-1:1)*Math.ceil(t/I)*I);0>H&&(N+=""===F.vertical?u.height:u.width,L=L.reverse());A.move(T,N)}else{A=A.lineHeight/u.height* 222100;switch(F.lineAlign){case "center":H-=A/2;break;case "end":H-=A}switch(F.vertical){case "":x.applyStyles({top:x.formatStyle(H,"%")});break;case "rl":x.applyStyles({left:x.formatStyle(H,"%")});break;case "lr":x.applyStyles({right:x.formatStyle(H,"%")})}L=["+y","-x","+x","-y"];A=new Ab(x)}a:{F=A;A=L;t=new Ab(F);H=1;for(L=0;L<A.length;L++){for(;F.overlapsOppositeAxis(u,A[L])||F.within(u)&&F.overlapsAny(z);)F.move(A[L]);if(F.within(u)){p=F;break a}I=F.intersectPercentage(u);H>I&&(p=new Ab(F),H=I); 223F=new Ab(t)}p=p||t}x.move(p.toCSSCompatValues(u));h.displayState=f.div;l.push(Ab.getSimpleBoxPosition(f))}})()}else for(e=0;e<c.length;e++)g.appendChild(c[e].displayState)};Bd.Parser=function(a,c,e){e||(e=c,c={});c||(c={});this.window=a;this.vttjs=c;this.state="INITIAL";this.buffer="";this.decoder=e||new TextDecoder("utf8");this.regionList=[]};Bd.Parser.prototype={reportOrThrowError:function(a){if(a instanceof Rb)this.onparsingerror&&this.onparsingerror(a);else throw a;},parse:function(a){function c(){for(var m= 224b.buffer,p=0;p<m.length&&"\r"!==m[p]&&"\n"!==m[p];)++p;var t=m.substr(0,p);"\r"===m[p]&&++p;"\n"===m[p]&&++p;b.buffer=m.substr(p);return t}function e(m){var p=new re;se(m,function(t,x){switch(t){case "id":p.set(t,x);break;case "width":p.percent(t,x);break;case "lines":p.integer(t,x);break;case "regionanchor":case "viewportanchor":x=x.split(",");if(2!==x.length)break;var u=new re;u.percent("x",x[0]);u.percent("y",x[1]);if(!u.has("x")||!u.has("y"))break;p.set(t+"X",u.get("x"));p.set(t+"Y",u.get("y")); 225break;case "scroll":p.alt(t,x,["up"])}},/=/,/\s/);p.has("id")&&(m=new (b.vttjs.VTTRegion||b.window.VTTRegion),m.width=p.get("width",100),m.lines=p.get("lines",3),m.regionAnchorX=p.get("regionanchorX",0),m.regionAnchorY=p.get("regionanchorY",100),m.viewportAnchorX=p.get("viewportanchorX",0),m.viewportAnchorY=p.get("viewportanchorY",100),m.scroll=p.get("scroll",""),b.onregion&&b.onregion(m),b.regionList.push({id:p.get("id"),region:m}))}function g(m){var p=new re;se(m,function(t,x){switch(t){case "MPEGT":p.integer(t+ 226"S",x);break;case "LOCA":p.set(t+"L",Ug(x))}},/[^\d]:/,/,/);b.ontimestampmap&&b.ontimestampmap({MPEGTS:p.get("MPEGTS"),LOCAL:p.get("LOCAL")})}function l(m){m.match(/X-TIMESTAMP-MAP/)?se(m,function(p,t){switch(p){case "X-TIMESTAMP-MAP":g(t)}},/=/):se(m,function(p,t){switch(p){case "Region":e(t)}},/:/)}var b=this;a&&(b.buffer+=b.decoder.decode(a,{stream:!0}));try{if("INITIAL"===b.state){if(!/\r\n|\n/.test(b.buffer))return this;var d=c();var f=d.match(/^WEBVTT([ \t].*)?$/);if(!f||!f[0])throw new Rb(Rb.Errors.BadSignature); 227b.state="HEADER"}for(a=!1;b.buffer;){if(!/\r\n|\n/.test(b.buffer))return this;a?a=!1:d=c();switch(b.state){case "HEADER":/:/.test(d)?l(d):d||(b.state="ID");continue;case "NOTE":d||(b.state="ID");continue;case "ID":if(/^NOTE($|[ \t])/.test(d)){b.state="NOTE";break}if(!d)continue;
227b.cue=new (b.vttjs.VTTCue||b.window.VTTCue)(0,0,"");try{b.cue.align="center"}catch(m){b.cue.align="middle"}b.state="CUE";if(-1===d.indexOf("--\x3e")){b.cue.id=d;continue}case "CUE":try{bn(d,b.cue,b.regionList)}catch(m){b.reportOrThrowError(m); 228b.cue=null;b.state="BADCUE";continue}b.state="CUETEXT";continue;case "CUETEXT":var h=-1!==d.indexOf("--\x3e");if(!d||h&&(a=!0)){b.oncue&&b.oncue(b.cue);b.cue=null;b.state="ID";continue}b.cue.text&&(b.cue.text+="\n");b.cue.text+=d.replace(/\u2028/g,"\n").replace(/u2029/g,"\n");continue;case "BADCUE":d||(b.state="ID")}}}catch(m){b.reportOrThrowError(m);if("CUETEXT"===b.state&&b.cue&&b.oncue)b.oncue(b.cue);b.cue=null;b.state="INITIAL"===b.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){try{this.buffer+= 229this.decoder.decode();if(this.cue||"HEADER"===this.state)this.buffer+="\n\n",this.parse();if("INITIAL"===this.state)throw new Rb(Rb.Errors.BadSignature);}catch(a){this.reportOrThrowError(a)}this.onflush&&this.onflush();return this}};var hn={"":1,lr:1,rl:1},gn={start:1,center:1,end:1,left:1,right:1,auto:1,"line-left":1,"line-right":1};aj.prototype.getCueAsHTML=function(){return WebVTT.convertCueToDOMTree(window,this.text)};var Pn={"":!0,up:!0},Qn=function(){var a=100,c=3,e=0,g=100,l=0,b=100,d="";Object.defineProperties(this, 230{width:{enumerable:!0,get:function(){return a}
230,set:function(f){if(!te(f))throw Error("Width must be between 0 and 100.");a=f}},lines:{enumerable:!0,get:function(){return c},set:function(f){if("number"!==typeof f)throw new TypeError("Lines must be set to a number.");c=f}},regionAnchorY:{enumerable:!0,get:function(){return g},set:function(f){if(!te(f))throw Error("RegionAnchorX must be between 0 and 100.");g=f}},regionAnchorX:{enumerable:!0,get:function(){return e},set:function(f){if(!te(f))throw Error("RegionAnchorY must be between 0 and 100."); 231e=f}},viewportAnchorY:{enumerable:!0,get:function(){return b},set:function(f){if(!te(f))throw Error("ViewportAnchorY must be between 0 and 100.");b=f}},viewportAnchorX:{enumerable:!0,get:function(){return l},set:function(f){if(!te(f))throw Error("ViewportAnchorX must be between 0 and 100.");l=f}},scroll:{enumerable:!0,get:function(){return d},set:function(f){f="string"!==typeof f?!1:Pn[f.toLowerCase()]?f.toLowerCase():!1;!1===f?console.warn("Scroll: an invalid or illegal string was specified."):d= 232f}}})},Ge=nf(function(a){a=a.exports={WebVTT:Bd,VTTCue:aj,VTTRegion:Qn};Wb.vttjs=a;Wb.WebVTT=a.WebVTT;var c=a.VTTCue,e=a.VTTRegion,g=Wb.VTTCue,l=Wb.VTTRegion;a.shim=function(){Wb.VTTCue=c;Wb.VTTRegion=e};a.restore=function(){Wb.VTTCue=g;Wb.VTTRegion=l};Wb.VTTCue||a.shim()});Ge.WebVTT;Ge.VTTCue;Ge.VTTRegion;var W=function(a,c){a=void 0===a?{}:a;a.reportTouchActivity=!1;var e=D.call(this,null,a,void 0===c?function(){}:c)||this;e.onDurationChange_=function(g){return e.onDurationChange(g)};e.trackProgress_= 233function(g){return e.trackProgress(g)};e.trackCurrentTime_=function(g){return e.trackCurrentTime(g)};e.stopTrackingCurrentTime_=function(g){return e.stopTrackingCurrentTime(g)};e.disposeSourceHandler_=function(g){return e.disposeSourceHandler(g)};
233e.queuedHanders_=new Set;e.hasStarted_=!1;e.on("playing",function(){this.hasStarted_=!0});e.on("loadstart",function(){this.hasStarted_=!1});Bb.names.forEach(function(g){g=Bb[g];a&&a[g.getterName]&&(e[g.privateName]=a[g.getterName])});e.featuresProgressEvents|| 234e.manualProgressOn();e.featuresTimeupdateEvents||e.manualTimeUpdatesOn();["Text","Audio","Video"].forEach(function(g){!1===a["native"+g+"Tracks"]&&(e["featuresNative"+g+"Tracks"]=!1)});if(!1===a.nativeCaptions||!1===a.nativeTextTracks)e.featuresNativeTextTracks=!1;else if(!0===a.nativeCaptions||!0===a.nativeTextTracks)e.featuresNativeTextTracks=!0;e.featuresNativeTextTracks||e.emulateTextTracks();e.preloadTextTracks=!1!==a.preloadTextTracks;e.autoRemoteTextTracks_=new Bb.text.ListClass;e.initTrackListeners(); 235a.nativeControlsForTouch||e.emitTapEvents();e.constructor&&(e.name_=e.constructor.name||"Unknown Tech");return e};$jscomp.inherits(W,D);W.prototype.triggerSourceset=function(a){var c=this;if(!this.isReady_)this.one("ready",function(){return c.setTimeout(function(){return c.triggerSourceset(a)},1)});this.trigger({src:a,type:"sourceset"})};W.prototype.manualProgressOn=function(){this.on("durationchange",this.onDurationChange_);this.manualProgress=!0;this.one("ready",this.trackProgress_)};W.prototype.manualProgressOff= 236function(){this.manualProgress=!1;this.stopTrackingProgress();this.off("durationchange",this.onDurationChange_)};W.prototype.trackProgress=function(a){this.stopTrackingProgress();this.progressInterval=this.setInterval(Ka(this,function(){var c=this.bufferedPercent();this.bufferedPercent_!==c&&this.trigger("progress");this.bufferedPercent_=c;1===c&&this.stopTrackingProgress()}),500)};W.prototype.onDurationChange=function(a){this.duration_=this.duration()};W.prototype.buffered=function(){return dc(0, 2370)};W.prototype.bufferedPercent=function(){return Ti(this.buffered(),this.duration_)};W.prototype.stopTrackingProgress=function(){this.clearInterval(this.progressInterval)};W.prototype.manualTimeUpdatesOn=function(){this.manualTimeUpdates=!0;this.on("play",this.trackCurrentTime_);this.on("pause",this.stopTrackingCurrentTime_)};W.prototype.manualTimeUpdatesOff=function(){this.manualTimeUpdates=!1;this.stopTrackingCurrentTime();this.off("play",this.trackCurrentTime_);this.off("pause",this.stopTrackingCurrentTime_)}; 238W.prototype.trackCurrentTime=function(){this.currentTimeInterval&&this.stopTrackingCurrentTime();this.currentTimeInterval=this.setInterval(function(){this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})},250)};W.prototype.stopTrackingCurrentTime=function(){this.clearInterval(this.currentTimeInterval);this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})};W.prototype.dispose=function(){this.clearTracks(Xb.names);this.manualProgress&&this.manualProgressOff();this.manualTimeUpdates&& 239this.manualTimeUpdatesOff();D.prototype.dispose.call(this)};W.prototype.clearTracks=function(a){var c=this;a=[].concat(a);a.forEach(function(e){for(var g=c[e+"Tracks"]()||[],l=g.length;l--;){var b=g[l];"text"===e&&c.removeRemoteTextTrack(b);g.removeTrack(b)}})};W.prototype.cleanupAutoTextTracks=function(){for(var a=this.autoRemoteTextTracks_||[],c=a.length;c--;)this.removeRemoteTextTrack(a[c])};W.prototype.reset=function(){};W.prototype.crossOrigin=function(){};W.prototype.setCrossOrigin=function(){}; 240W.prototype.error=function(a){void 0!==a&&(this.error_=new Sa(a),this.trigger("error"));return this.error_};W.prototype.played=function(){return this.hasStarted_?dc(0,0):dc()};W.prototype.play=function(){};W.prototype.setScrubbing=function(a){};W.prototype.scrubbing=function(){};W.prototype.setCurrentTime=function(a){this.manualTimeUpdates&&this.trigger({type:"timeupdate",target:this,manuallyTriggered:!0})};W.prototype.initTrackListeners=function(){var a=this;Xb.names.forEach(function(c){var e=function(){a.trigger("QVC AEM Commerce Package - Designs Non Transactionaltrackchange")}, 241g=a[Xb[c].getterName]();g.addEventListener("removetrack",e);g.addEventListener("addtrack",e);a.on("dispose",function(){g.removeEventListener("removetrack",e);g.removeEventListener("addtrack",e)})})};W.prototype.addWebVttScript_=function(){var a=this;if(!window.WebVTT)if(document.body.contains(this.el()))if(!this.options_["vtt.js"]&&Z(Ge)&&0<Object.keys(Ge).length)this.trigger("vttjsloaded");else{var c=document.createElement("script");c.src=this.options_["vtt.js"]||"https://vjs.zencdn.net/vttjs/0.14.1/vtt.min.js"; 242c.onload=function(){a.trigger("vttjsloaded")};c.onerror=function(){a.trigger("vttjserror")};this.on("dispose",function(){c.onload=null;c.onerror=null});window.WebVTT=!0;this.el().parentNode.appendChild(c)}else this.ready(this.addWebVttScript_)};W.prototype.emulateTextTracks=function(){var a=this,c=this.textTracks(),e=this.remoteTextTracks(),g=function(f){return c.addTrack(f.track)},l=function(f){return c.removeTrack(f.track)};e.on("addtrack",g);e.on("removetrack",l);this.addWebVttScript_();var b= 243function(){return a.trigger("texttrackchange")},d=function(){b();for(var f=0;f<c.length;f++){var h=c[f];h.removeEventListener("cuechange",b);"showing"===h.mode&&h.addEventListener("cuechange",b)}};d();c.addEventListener("change",d);c.addEventListener("addtrack",d);c.addEventListener("removetrack",d);this.on("dispose",function(){e.off("addtrack",g);e.off("removetrack",l);c.removeEventListener("change",d);c.removeEventListener("addtrack",d);c.removeEventListener("removetrack",d);for(var f=0;f<c.length;f++)c[f].removeEventListener("cuechange", 244b)})};W.prototype.addTextTrack=function(a,c,e){if(!a)throw Error("TextTrack kind is required but was not provided");var g=void 0;g=void 0===g?{}:g;var l=this.textTracks();g.kind=a;c&&(g.label=c);e&&(g.language=e);g.tech=this;a=new Bb.text.TrackClass(g);l.addTrack(a);return a};W.prototype.createRemoteTextTrack=function(a){a=B(a,{tech:this});return new Ld.remoteTextEl.TrackClass(a)};W.prototype.addRemoteTextTrack=function(a,c){var e=this;a=void 0===a?{}:a;var g=this.createRemoteTextTrack(a);"boolean"!== 245typeof c&&(c=!1);this.remoteTextTrackEls().addTrackElement_(g);this.remoteTextTracks().addTrack(g.track);!1===c&&this.ready(function(){return e.autoRemoteTextTracks_.addTrack(g.track)});return g};W.prototype.removeRemoteTextTrack=function(a){var c=this.remoteTextTrackEls().getTrackElementByTrack_(a);this.remoteTextTrackEls().removeTrackElement_(c);this.remoteTextTracks().removeTrack(a);this.autoRemoteTextTracks_.removeTrack(a)};W.prototype.getVideoPlaybackQuality=function(){return{}};W.prototype.requestPictureInPicture= 246function(){return Promise.reject()};W.prototype.disablePictureInPicture=function(){return!0};W.prototype.setDisablePictureInPicture=function(){};W.prototype.requestVideoFrameCallback=function(a){var c=this,e=Vb++;!this.isReady_||this.paused()?(this.queuedHanders_.add(e),this.one("playing",function(){c.queuedHanders_.has(e)&&(c.queuedHanders_.delete(e),a())})):this.requestNamedAnimationFrame(e,a);return e};W.prototype.cancelVideoFrameCallback=function(a){this.queuedHanders_.has(a)?this.queuedHanders_.delete(a): 247this.cancelNamedAnimationFrame(a)};W.prototype.setPoster=function(){};W.prototype.playsinline=function(){};W.prototype.setPlaysinline=function(){};W.prototype.overrideNativeAudioTracks=function(a){};W.prototype.overrideNativeVideoTracks=function(a){};W.prototype.canPlayType=function(a){return""};W.canPlayType=function(a){return""};W.canPlaySource=function(a,c){return W.canPlayType(a.type)};W.isTech=function(a){return a.prototype instanceof W||a instanceof W||a===W};W.registerTech=function(a,c){W.techs_|| 248(W.techs_={});if(!W.isTech(c))throw Error("Tech QVC AEM Commerce Package - Designs Non Transactional must be a Tech");if(!W.canPlayType)throw Error("Techs must have a static canPlayType method on them");if(!W.canPlaySource)throw Error("Techs must have a static canPlaySource method on them");a=Za(a);W.techs_[a]=c;W.techs_[Ce(a)]=c;"Tech"!==a&&W.defaultTechOrder_.push(a);return c};
248W.getTech=function(a){if(a){if(W.techs_&&W.techs_[a])return W.techs_[a];a=Za(a);if(window&&window.videojs&&window.videojs[a])return sa.warn("The QVC AEM Commerce Package - Designs Non Transactional tech was added to the videojs object when it should be registered using videojs.registerTech(name, tech)"), 249window.videojs[a]}};Bb.names.forEach(function(a){var c=Bb[a];W.prototype[c.getterName]=function(){this[c.privateName]=this[c.privateName]||new c.ListClass;return this[c.privateName]}});W.prototype.featuresVolumeControl=!0;W.prototype.featuresMuteControl=!0;W.prototype.featuresFullscreenResize=!1;W.prototype.featuresPlaybackRate=!1;W.prototype.featuresProgressEvents=!1;W.prototype.featuresSourceset=!1;W.prototype.featuresTimeupdateEvents=!1;W.prototype.featuresNativeTextTracks=!1;W.prototype.featuresVideoFrameCallback= 250!1;W.withSourceHandlers=function(a){a.registerSourceHandler=function(c,e){var g=a.sourceHandlers;g||(g=a.sourceHandlers=[]);void 0===e&&(e=g.length);g.splice(e,0,c)};a.canPlayType=function(c){for(var e=a.sourceHandlers||[],g,l=0;l<e.length;l++)if(g=e[l].canPlayType(c))return g;return""};a.selectSourceHandler=function(c,e){for(var g=a.sourceHandlers||[],l,b=0;b<g.length;b++)if(l=g[b].canHandleSource(c,e))return g[b];return null};a.canPlaySource=function(c,e){var g=a.selectSourceHandler(c,e);return g? 251g.canHandleSource(c,e):""};["seekable","seeking","duration"].forEach(function(c){var e=this[c];"function"===typeof e&&(this[c]=function(){return this.sourceHandler_&&this.sourceHandler_[c]?this.sourceHandler_[c].apply(this.sourceHandler_,arguments):e.apply(this,arguments)})},a.prototype);a.prototype.setSource=function(c){var e=a.selectSourceHandler(c,this.options_);e||(a.nativeSourceHandler?e=a.nativeSourceHandler:sa.error("No source handler found for the current source."));this.disposeSourceHandler(); 252this.off("dispose",this.disposeSourceHandler_);e!==a.nativeSourceHandler&&(this.currentSource_=c);this.sourceHandler_=e.handleSource(c,this,this.options_);this.one("dispose",this.disposeSourceHandler_)};a.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)}};D.registerComponent("Tech",W);W.registerTech("Tech", 253W);W.defaultTechOrder_=[];var dd={},qf={},pf={},Rn={buffered:1,currentTime:1,duration:1,muted:1,played:1,paused:1,seekable:1,volume:1,ended:1},Sn={setCurrentTime:1,setMuted:1,setVolume:1},hk={play:1,pause:1},Tn={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", 254jpeg:"image/jpeg",gif:"image/gif",png:"image/png",svg:"image/svg+xml",webp:"image/webp"},rf=function(a){a=uh(void 0===a?"":a);return Tn[a.toLowerCase()]||""},Un=function(a,c){if(!c)return"";if(a.cache_.source.src===c&&a.cache_.source.type)return a.cache_.source.type;var e=a.cache_.sources.filter(function(l){return l.src===c});if(e.length)return e[0].type;a=a.$$("source");for(e=0;e<a.length;e++){var g=a[e];if(g.type&&g.src&&g.src===c)return g.type}return rf(c)},ik=function(a){if(Array.isArray(a)){var c= 255[];a.forEach(function(e){e=ik(e);Array.isArray(e)?c=c.concat(e):R(e)&&c.push(e)});a=c}else a="string"===typeof a&&a.trim()?[cj({src:a})]:R(a)&&"string"===typeof a.src&&a.src&&a.src.trim()?[cj(a)]:[];return a},jk=If?10009:Jf?461:8,Md={},Nd={codes:{play:415,pause:19,ff:417,rw:412,back:jk},names:(Md["415"]="play",Md["19"]="pause",Md["417"]="ff",Md["412"]="rw",Md[jk]="back",Md),isEventKey:function(a,c){c=c.toLowerCase();return this.names[a.keyCode]&&this.names[a.keyCode]===c?!0:!1},getEventName:function(a){return this.names[a.keyCode]? 256this.names[a.keyCode]:this.codes[a.code]?this.names[this.codes[a.code]]:null}},Ma=function(a){this.player_=a;this.focusableComponents=[];this.isPaused_=this.isListening_=!1;this.onKeyDown_=this.onKeyDown_.bind(this);this.lastFocusedComponent_=null;return this};$jscomp.inherits(Ma,hb);Ma.prototype.start=function(){var a=this;
256if(!this.isListening_&&(this.player_.on("keydown",this.onKeyDown_),this.player_.on("modalKeydown",this.onKeyDown_),this.player_.on("loadedmetadata",function(){a.focus(a.updateFocusableComponents()[0])}), 257this.player_.on("modalclose",function(){a.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",function(){a.updateFocusableComponents();a.focusableComponents.length&&(1<a.focusableComponents.length?a.focusableComponents[1].focus():a.focusableComponents[0].focus())})};Ma.prototype.stop=function(){this.player_.off("keydown", 258this.onKeyDown_);this.isListening_=!1};Ma.prototype.onKeyDown_=function(a){var c=a.originalEvent?a.originalEvent:a;["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(c.key)?this.isPaused_||(c.preventDefault(),a=c.key.substring(5).toLowerCase(),this.move(a)):Nd.isEventKey(c,"play")||Nd.isEventKey(c,"pause")||Nd.isEventKey(c,"ff")||Nd.isEventKey(c,"rw")?(c.preventDefault(),a=Nd.getEventName(c),this.performMediaAction_(a)):Nd.isEventKey(c,"Back")&&a.target&&"function"===typeof a.target.closeable&& 259a.target.closeable()&&(c.preventDefault(),a.target.close())};Ma.prototype.performMediaAction_=function(a){if(this.player_)switch(a){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)}};Ma.prototype.userSeek_=function(a){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser(); 260this.player_.currentTime(a)};Ma.prototype.pause=function(){this.isPaused_=!0};Ma.prototype.resume=function(){this.isPaused_=!1};Ma.prototype.handlePlayerBlur_=function(a){var c=a.relatedTarget,e=null,g=this.getCurrentComponent(a.target);c&&(e=!!c.closest(".video-js"),c.classList.contains("vjs-text-track-settings")&&!this.isPaused_&&this.searchForTrackSelect_());(a.currentTarget.contains(a.relatedTarget)||e)&&c||(g&&"CloseButton"===g.name()?this.refocusComponent():(this.pause(),g&&g.el()&&(this.lastFocusedComponent_= 261g)))};Ma.prototype.handlePlayerFocus_=function(){this.getCurrentComponent()&&this.getCurrentComponent().getIsFocusable()&&this.resume()};Ma.prototype.updateFocusableComponents=function(){function a(g){g=$jscomp.makeIterator(g);for(var l=g.next();!l.done;l=g.next())l=l.value,l.hasOwnProperty("el_")&&l.getIsFocusable()&&l.getIsAvailableToBeFocused(l.el())&&e.push(l),l.hasOwnProperty("children_")&&0<l.children_.length&&a(l.children_)}var c=this,e=[];this.player_.children_.forEach(function(g){if(g.hasOwnProperty("el_")){if(g.getIsFocusable&& 262g.getIsAvailableToBeFocused&&g.getIsFocusable()&&g.getIsAvailableToBeFocused(g.el())){e.push(g);return}g.hasOwnProperty("children_")&&0<g.children_.length?a(g.children_):g.hasOwnProperty("items")&&0<g.items.length?a(g.items):c.findSuitableDOMChild(g)&&e.push(g)}"ErrorDisplay"===g.name_&&g.opened_&&(g=g.el_.querySelector(".vjs-errors-ok-button-container"))&&g.querySelectorAll("button").forEach(function(l,b){e.push({name:function(){return"ModalButton"+(b+1)},el:function(){return l},getPositions:function(){var d= 263l.getBoundingClientRect();return{boundingClientRect:{x:d.x,y:d.y,width:d.width,height:d.height,top:d.top,right:d.right,bottom:d.bottom,left:d.left},center:{x:d.left+d.width/2,y:d.top+d.height/2,width:0,height:0,top:d.top+d.height/2,right:d.left+d.width/2,bottom:d.top+d.height/2,left:d.left+d.width/2}}},getIsAvailableToBeFocused:function(){return!0},getIsFocusable:function(d){return!0},focus:function(){return l.focus()}})})});return this.focusableComponents=e};Ma.prototype.findSuitableDOMChild=function(a){function c(e){if(a.getIsFocusable(e)&& 264a.getIsAvailableToBeFocused(e))return e;for(var g=0;g<e.children.length;g++){var l=c(e.children[g]);if(l)return l}return null}return a.el()?c(a.el()):null};Ma.prototype.getCurrentComponent=function(a){this.updateFocusableComponents();a=a||document.activeElement;if(this.focusableComponents.length)for(var c=$jscomp.makeIterator(this.focusableComponents),e=c.next();!e.done;e=c.next())if(e=e.value,e.el()===a)return e};Ma.prototype.add=function(a){var c=[].concat($jscomp.arrayFromIterable(this.focusableComponents)); 265a.hasOwnProperty("el_")&&a.getIsFocusable()&&a.getIsAvailableToBeFocused(a.el())&&c.push(a);this.focusableComponents=c;this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents})};Ma.prototype.remove=function(a){for(var c=0;c<this.focusableComponents.length;c++)if(this.focusableComponents[c].name()===a.name()){this.focusableComponents.splice(c,1);this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents});break}};Ma.prototype.clear= 266function(){0<this.focusableComponents.length&&(this.focusableComponents=[],this.trigger({type:"focusableComponentsChanged",focusableComponents:this.focusableComponents}))};Ma.prototype.move=function(a){var c=this,e=this.getCurrentComponent();if(e){var g=e.getPositions(),l=this.focusableComponents.filter(function(b){return b!==e&&c.isInDirection_(g.boun
266dingClientRect,b.getPositions().boundingClientRect,a)});(l=this.findBestCandidate_(g.center,l,a))?this.focus(l):this.trigger({type:"endOfFocusableComponents", 267direction:a,focusedComponent:e})}};Ma.prototype.findBestCandidate_=function(a,c,e){var g=Infinity,l=null;c=$jscomp.makeIterator(c);for(var b=c.next();!b.done;b=c.next()){b=b.value;var d=b.getPositions().center;d=this.calculateDistance_(a,d,e);d<g&&(g=d,l=b)}return l};Ma.prototype.isInDirection_=function(a,c,e){switch(e){case "right":return c.left>=a.right;case "left":return c.right<=a.left;case "down":return c.top>=a.bottom;case "up":return c.bottom<=a.top;default:return!1}};Ma.prototype.refocusComponent= 268function(){if(this.lastFocusedComponent_){this.player_.userActive()||this.player_.userActive(!0);this.updateFocusableComponents();for(var a=0;a<this.focusableComponents.length;a++)if(this.focusableComponents[a].name()===this.lastFocusedComponent_.name()){this.focus(this.focusableComponents[a]);break}}else this.focus(this.updateFocusableComponents()[0])};Ma.prototype.focus=function(a){"object"===typeof a&&(a.getIsAvailableToBeFocused(a.el())?a.focus():this.findSuitableDOMChild(a)&&this.findSuitableDOMChild(a).focus())}; 269Ma.prototype.calculateDistance_=function(a,c,e){var g=Math.abs(a.x-c.x);a=Math.abs(a.y-c.y);switch(e){case "right":case "left":e=g+100*a;break;case "up":e=2*a+.5*g;break;case "down":e=5*a+g;break;default:e=g+a}return e};Ma.prototype.searchForTrackSelect_=function(){for(var a=$jscomp.makeIterator(this.updateFocusableComponents()),c=a.next();!c.done;c=a.next())if(c=c.value,"TextTrackSelect"===c.constructor.name){this.focus(c);break}};var kk=function(a,c,e){var g=B({createEl:!1},c);e=D.call(this,a,g, 270e)||this;if(c.playerOptions.sources&&0!==c.playerOptions.sources.length)a.src(c.playerOptions.sources);else for(g=0,c=c.playerOptions.techOrder;g<c.length;g++){var l=Za(c[g]),b=W.getTech(l);l||(b=D.getComponent(l));if(b&&b.isSupported()){a.loadTech_(l);break}}return e};$jscomp.inherits(kk,D);D.registerComponent("MediaLoader",kk);var Na=function(a,c){var e=D.call(this,a,c)||this;e.options_.controlText&&e.controlText(e.options_.controlText);e.handleMouseOver_=function(g){return e.handleMouseOver(g)}; 271e.handleMouseOut_=function(g){return e.handleMouseOut(g)};e.handleClick_=function(g){return e.handleClick(g)};e.handleKeyDown_=function(g){return e.handleKeyDown(g)};e.emitTapEvents();e.enable();return e};$jscomp.inherits(Na,D);Na.prototype.createEl=function(a,c,e){a=void 0===a?"div":a;c=void 0===c?{}:c;e=void 0===e?{}:e;c=Object.assign({className:this.buildCSSClass(),tabIndex:0},c);"button"===a&&sa.error("Creating a ClickableComponent with an HTML element of "+a+" is not supported; use a Button instead."); 272e=Object.assign({role:"button"},e);this.tabIndex_=c.tabIndex;a=Q(a,c,e);this.player_.options_.experimentalSvgIcons||a.appendChild(Q("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0}));this.createControlTextEl(a);return a};Na.prototype.dispose=function(){this.controlTextEl_=null;D.prototype.dispose.call(this)};Na.prototype.createControlTextEl=function(a){this.controlTextEl_=Q("span",{className:"vjs-control-text"},{"aria-live":"polite"});a&&a.appendChild(this.controlTextEl_);this.controlText(this.controlText_, 273a);return this.controlTextEl_};Na.prototype.controlText=function(a,c){c=void 0===c?this.el():c;if(void 0===a)return this.controlText_||"Need Text";var e=this.localize(a);this.controlText_=a;la(this.controlTextEl_,e);this.nonIconControl||this.player_.options_.noUITitleAttributes||c.setAttribute("title",e)};Na.prototype.buildCSSClass=function(){return"vjs-control vjs-button "+D.prototype.buildCSSClass.call(this)};Na.prototype.enable=function(){this.enabled_||(this.enabled_=!0,this.removeClass("vjs-disabled"), 274this.el_.setAttribute("aria-disabled","false"),"undefined"!==typeof this.tabIndex_&&this.el_.setAttribute("tabIndex",this.tabIndex_),this.on(["tap","click"],this.handleClick_),this.on("keydown",this.handleKeyDown_))};Na.prototype.disable=function(){this.enabled_=!1;this.addClass("vjs-disabled");this.el_.setAttribute("aria-disabled","true");"undefined"!==typeof this.tabIndex_&&this.el_.removeAttribute("tabIndex");this.off("mouseover",this.handleMouseOver_);this.off("mouseout",this.handleMouseOut_); 275this.off(["tap","click"],this.handleClick_);this.off("keydown",this.handleKeyDown_)};Na.prototype.handleLanguagechange=function(){this.controlText(this.controlText_)};Na.prototype.handleClick=function(a){this.options_.clickHandler&&this.options_.clickHandler.call(this,arguments)};Na.prototype.handleKeyDown=function(a){" "===a.key||"Enter"===a.key?(a.preventDefault(),a.stopPropagation(),this.trigger("click")):D.prototype.handleKeyDown.call(this,a)};D.registerComponent("ClickableComponent",Na);var rc= 276function(a,c){var e=Na.call(this,a,c)||this;
276e.update();e.update_=function(g){return e.update(g)};a.on("posterchange",e.update_);return e};$jscomp.inherits(rc,Na);rc.prototype.dispose=function(){this.player().off("posterchange",this.update_);Na.prototype.dispose.call(this)};rc.prototype.createEl=function(){return Q("div",{className:"vjs-poster"})};rc.prototype.crossOrigin=function(a){if("undefined"===typeof a)return this.$("img")?this.$("img").crossOrigin:this.player_.tech_&&this.player_.tech_.isReady_? 277this.player_.crossOrigin():this.player_.options_.crossOrigin||this.player_.options_.crossorigin||null;null!==a&&"anonymous"!==a&&"use-credentials"!==a?this.player_.log.warn('crossOrigin must be null, "anonymous" or "use-credentials", given "'+a+'"'):this.$("img")&&(this.$("img").crossOrigin=a)};rc.prototype.update=function(a){a=this.player().poster();this.setSrc(a);a?this.show():this.hide()};rc.prototype.setSrc=function(a){a?(this.$("img")||this.el_.appendChild(Q("picture",{className:"vjs-poster", 278tabIndex:-1},{},Q("img",{loading:"lazy",crossOrigin:this.crossOrigin()},{alt:""}))),this.$("img").src=a):this.el_.textContent=""};rc.prototype.handleClick=function(a){this.player_.controls()&&(this.player_.tech(!0)&&this.player_.tech(!0).focus(),this.player_.paused()?jc(this.player_.play()):this.player_.pause())};rc.prototype.crossorigin=rc.prototype.crossOrigin;D.registerComponent("PosterImage",rc);var Vn={monospace:"monospace",sansSerif:"sans-serif",serif:"serif",monospaceSansSerif:'"Andale Mono", "Lucida Console", monospace', 279monospaceSerif:'"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'},sc=function(a,c,e){var g=D.call(this,a,c,e)||this;var l=function(b){g.updateDisplayOverlay();g.updateDisplay(b)};a.on("loadstart",function(b){return g.toggleDisplay(b)});a.on("texttrackchange",function(b){return g.updateDisplay(b)});a.on("loadedmetadata", 280function(b){g.updateDisplayOverlay();g.preselectTrack(b)});a.ready(Ka(g,function(){if(a.tech_&&a.tech_.featuresNativeTextTracks)this.hide();else{a.on("fullscreenchange",l);a.on("playerresize",l);var b=window.screen.orientation||window,d=window.screen.orientation?"change":"orientationchange";b.addEventListener(d,l);a.on("dispose",function(){return b.removeEventListener(d,l)});for(var f=this.options_.playerOptions.tracks||[],h=0;h<f.length;h++)this.player_.addRemoteTextTrack(f[h],!0);this.preselectTrack()}})); 281return g};$jscomp.inherits(sc,D);sc.prototype.preselectTrack=function(){for(var a={captions:1,subtitles:1},c=this.player_.textTracks(),e=this.player_.cache_.selectedLanguage,g,l,b,d=0;d<c.length;d++){var f=c[d];e&&e.enabled&&e.language&&e.language===f.language&&f.kind in a?f.kind===e.kind?b=f:b||(b=f):e&&!e.enabled?l=g=b=null:f.default&&("descriptions"!==f.kind||g?f.kind in a&&!l&&(l=f):g=f)}b?b.mode="showing":l?l.mode="showing":g&&(g.mode="showing")};sc.prototype.toggleDisplay=function(){this.player_.tech_&& 282this.player_.tech_.featuresNativeTextTracks?this.hide():this.show()};sc.prototype.createEl=function(){return D.prototype.createEl.call(this,"div",{className:"vjs-text-track-display"},{translate:"yes","aria-live":"off","aria-atomic":"true"})};sc.prototype.clearDisplay=function(){"function"===typeof window.WebVTT&&window.WebVTT.processCues(window,[],this.el_)};sc.prototype.updateDisplay=function(){var a=this.player_.textTracks(),c=this.options_.allowMultipleShowingTracks;this.clearDisplay();if(c){c= 283[];for(var e=0;e<a.length;++e){var g=a[e];"showing"===g.mode&&c.push(g)}this.updateForTrack(c)}else{e=c=null;for(g=a.length;g--;){var l=a[g];"showing"===l.mode&&("descriptions"===l.kind?c=l:e=l)}e?("off"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","off"),this.updateForTrack(e)):c&&("assertive"!==this.getAttribute("aria-live")&&this.setAttribute("aria-live","assertive"),this.updateForTrack(c));window.CSS.supports("inset","10px")||(a=this.el_,c=a.querySelectorAll(".vjs-text-track-cue"), 284e=this.player_.controlBar.el_.getBoundingClientRect().height,g=this.player_.el_.getBoundingClientRect().height,a.style="",kc(a,"position","relative"),kc(a,"height",g-e+"px"),kc(a,"top","unset"),Kf?kc(a,"bottom",g+"px"):kc(a,"bottom","0px"),0<c.length&&c.forEac
284h(function(b){if(b.style.inset){var d=b.style.inset.split(" ");3===d.length&&Object.assign(b.style,{top:d[0],right:d[1],bottom:d[2],left:"unset"})}}))}};sc.prototype.updateDisplayOverlay=function(){if(this.player_.videoHeight()&&window.CSS.supports("inset-inline: 10px")){var a= 285this.player_.currentWidth(),c=this.player_.currentHeight(),e=a/c,g=this.player_.videoWidth()/this.player_.videoHeight(),l=0,b=0;.1<Math.abs(e-g)&&(e>g?l=Math.round((a-c*g)/2):b=Math.round((c-a/g)/2));kc(this.el_,"insetInline",l?l+"px":"");kc(this.el_,"insetBlock",b?b+"px":"")}};sc.prototype.updateDisplayState=function(a){var c=this.player_.textTrackSettings.getValues();a=a.activeCues;for(var e=a.length;e--;){var g=a[e];if(g){g=g.displayState;c.color&&(g.firstChild.style.color=c.color);c.textOpacity&& 286kc(g.firstChild,"color",$g(c.color||"#fff",c.textOpacity));c.backgroundColor&&(g.firstChild.style.backgroundColor=c.backgroundColor);c.backgroundOpacity&&kc(g.firstChild,"backgroundColor",$g(c.backgroundColor||"#000",c.backgroundOpacity));c.windowColor&&(c.windowOpacity?kc(g,"backgroundColor",$g(c.windowColor,c.windowOpacity)):g.style.backgroundColor=c.windowColor);c.edgeStyle&&("dropshadow"===c.edgeStyle?g.firstChild.style.textShadow="2px 2px 3px #222, 2px 2px 4px #222, 2px 2px 5px #222":"raised"=== 287c.edgeStyle?g.firstChild.style.textShadow="1px 1px #222, 2px 2px #222, 3px 3px #222":"depressed"===c.edgeStyle?g.firstChild.style.textShadow="1px 1px #ccc, 0 1px #ccc, -1px -1px #222, 0 -1px #222":"uniform"===c.edgeStyle&&(g.firstChild.style.textShadow="0 0 4px #222, 0 0 4px #222, 0 0 4px #222, 0 0 4px #222"));if(c.fontPercent&&1!==c.fontPercent){var l=window.parseFloat(g.style.fontSize);g.style.fontSize=l*c.fontPercent+"px";g.style.height="auto";g.style.top="auto"}c.fontFamily&&"default"!==c.fontFamily&& 288("small-caps"===c.fontFamily?g.firstChild.style.fontVariant="small-caps":g.firstChild.style.fontFamily=Vn[c.fontFamily])}}};sc.prototype.updateForTrack=function(a){Array.isArray(a)||(a=[a]);if("function"===typeof window.WebVTT&&!a.every(function(b){return!b.activeCues})){for(var c=[],e=0;e<a.length;++e)for(var g=a[e],l=0;l<g.activeCues.length;++l)c.push(g.activeCues[l]);window.WebVTT.processCues(window,c,this.el_);for(c=0;c<a.length;++c){e=a[c];for(g=0;g<e.activeCues.length;++g)l=e.activeCues[g].displayState, 289Ya(l,"vjs-text-track-cue","vjs-text-track-cue-"+(e.language?e.language:c)),e.language&&l.setAttribute("lang",e.language);this.player_.textTrackSettings&&this.updateDisplayState(e)}}};D.registerComponent("TextTrackDisplay",sc);var Tf=function(){return D.apply(this,arguments)||this};$jscomp.inherits(Tf,D);Tf.prototype.createEl=function(){var a=this.player_.isAudio();a=this.localize(a?"Audio Player":"Video Player");a=Q("span",{className:"vjs-control-text",textContent:this.localize("{1} is loading.", 290[a])});var c=D.prototype.createEl.call(this,"div",{className:"vjs-loading-spinner",dir:"ltr"});c.appendChild(a);return c};Tf.prototype.handleLanguagechange=function(){this.$(".vjs-control-text").textContent=this.localize("{1} is loading.",[this.player_.isAudio()?"Audio Player":"Video Player"])};D.registerComponent("LoadingSpinner",Tf);var ma=function(){return Na.apply(this,arguments)||this};$jscomp.inherits(ma,Na);ma.prototype.createEl=function(a,c,e){c=void 0===c?{}:c;e=void 0===e?{}:e;a="button"; 291c=Object.assign({className:this.buildCSSClass()},c);e=Object.assign({type:"button"},e);a=Q(a,c,e);this.player_.options_.experimentalSvgIcons||a.appendChild(Q("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0}));this.createControlTextEl(a);return a};ma.prototype.addChild=function(a,c){c=void 0===c?{}:c;sa.warn("Adding an actionable (user controllable) child to a Button ("+this.constructor.name+") is not supported; use a ClickableComponent instead.");return D.prototype.addChild.call(this, 292a,c)};ma.prototype.enable=function(){Na.prototype.enable.call(this);this.el_.removeAttribute("disabled")};ma.prototype.disable=function(){Na.prototype.disable.call(this);this.el_.setAttribute("disabled","disabled")};ma.prototype.handleKeyDown=function(a){" "===a.key||"Enter"===a.key?a.stopPropagation():Na.prototype.handleKeyDown.call(this,a)};D.registerComponent("Button",ma);var hd=function(a,c){var e=ma.call(this,a,c)||this;e.mouseused_=!1;e.setIcon("play");e.on("mousedown",function(g){return e.handleMouseDown(g)}); 293return e};$jscomp.inherits(hd,ma);hd.prototype.buildCSSClass=function(){return"vjs-big-play-button"};hd.prototype.handleClick=function(a){var c=this.player_.play();if(this.mouseused_&&"clientX"in a&&"clientY"in a)jc(c),this.player_.tech(!0)&&this.player_.tech(!0).focus();else{var e=(a=this.player_.getChild("controlBar"))&&a.getChild("playToggle");e?(a=function(){return e.focus()},qe(c)?c.then(a,function(){}):this.setTimeout(a,1)):this.player_.tech(!0).focus()}};hd.prototype.handleKeyDown=function(a){this.mouseused_= 294!1;ma.prototype.handleKeyDown.call(this,a)};hd.prototype.handleMouseDown=function(a){this.mouseused_=!0};hd.prototype.controlText_="Play Video";D.registerComponent("BigPlayButton",hd);var He=function(a,c){a=ma.call(this,a,c)||this;a.setIcon("cancel");a.controlText(c&&c.controlText||a.localize("Close"));return a};$jscomp.inherits(He,ma);He.prototype.buildCSSClass=function(){return"vjs-close-button "+ma.prototype.buildCSSClass.call(this)};He.prototype.handleClick=function(a){this.trigger({type:"close", 295bubbles:!1})};He.prototype.handleKeyDown=function(a){"Escape"===a.key?(a.preventDefault(),a.stopPropagation(),this.trigger("click")):ma.prototype.handleKeyDown.call(this,a)};D.registerComponent("CloseButton",He);var Fc=function(a,c){c=void 0===c?{}:c;var e=ma.call(this,a,c)||this;c.replay=void 0===c.replay||c.replay;e.setIcon("play");e.on(a,"play",function(g){return e.handlePlay(g)});e.on(a,"pause",function(g){return e.handlePause(g)});if(c.replay)e.on(a,"ended",function(g){return e.handleEnded(g)}); 296return e};$jscomp.inherits(Fc,ma);Fc.prototype.buildCSSClass=function(){return"vjs-play-control "+ma.prototype.buildCSSClass.call(this)};Fc.prototype.handleClick=function(a){this.player_.paused()?jc(this.player_.play()):this.player_.pause()};Fc.prototype.handleSeeked=function(a){this.removeClass("vjs-ended");this.player_.paused()?this.handlePause(a):this.handlePlay(a)};Fc.prototype.handlePlay=function(a){this.removeClass("vjs-ended","vjs-paused");this.addClass("vjs-playing");this.setIcon("pause"); 297this.controlText("Pause")};Fc.prototype.handlePause=function(a){this.removeClass("vjs-playing");this.addClass("vjs-paused");this.setIcon("play");this.controlText("Play")};Fc.prototype.handleEnded=function(a){var c=this;this.removeClass("vjs-playing");this.addClass("vjs-ended");this.setIcon("replay");this.controlText("Replay");this.one(this.player_,"seeked",function(e){return c.handleSeeked(e)})};Fc.prototype.controlText_="Play";D.registerComponent("PlayToggle",Fc);
297var ub=function(a,c){var e=D.call(this, 298a,c)||this;e.on(a,["timeupdate","ended","seeking"],function(g){return e.update(g)});e.updateTextNode_();return e};$jscomp.inherits(ub,D);ub.prototype.createEl=function(){var a=this.buildCSSClass(),c=D.prototype.createEl.call(this,"div",{className:a+" vjs-time-control vjs-control"}),e=Q("span",{className:"vjs-control-text",textContent:this.localize(this.labelText_)+"\u00a0"},{role:"presentation"});c.appendChild(e);this.contentEl_=Q("span",{className:a+"-display"},{role:"presentation"});c.appendChild(this.contentEl_); 299return c};ub.prototype.dispose=function(){this.textNode_=this.contentEl_=null;D.prototype.dispose.call(this)};ub.prototype.update=function(a){(this.player_.options_.enableSmoothSeeking||"seeking"!==a.type)&&this.updateContent(a)};ub.prototype.updateTextNode_=function(a){var c=this;a=bd(void 0===a?0:a);this.formattedTime_!==a&&(this.formattedTime_=a,this.requestNamedAnimationFrame("TimeDisplay#updateTextNode_",function(){if(c.contentEl_){var e=c.textNode_;e&&c.contentEl_.firstChild!==e&&(e=null,sa.warn("TimeDisplay#updateTextnode_: Prevented replacement of text node element since it was no longer a child of this node. Appending a new node instead.")); 300c.textNode_=document.createTextNode(c.formattedTime_);c.textNode_&&(e?c.contentEl_.replaceChild(c.textNode_,e):c.contentEl_.appendChild(c.textNode_))}}))};ub.prototype.updateContent=function(a){};ub.prototype.labelText_="Time";ub.prototype.controlText_="Time";D.registerComponent("TimeDisplay",ub);var Od=function(){return ub.apply(this,arguments)||this};$jscomp.inherits(Od,ub);Od.prototype.buildCSSClass=function(){return"vjs-current-time"};Od.prototype.updateContent=function(a){a=this.player_.ended()? 301this.player_.duration():this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();this.updateTextNode_(a)};Od.prototype.labelText_="Current Time";Od.prototype.controlText_="Current Time";D.registerComponent("CurrentTimeDisplay",Od);var Pd=function(a,c){var e=ub.call(this,a,c)||this;c=function(g){return e.updateContent(g)};e.on(a,"durationchange",c);e.on(a,"loadstart",c);e.on(a,"loadedmetadata",c);return e};$jscomp.inherits(Pd,ub);Pd.prototype.buildCSSClass=function(){return"vjs-duration"}; 302Pd.prototype.updateContent=function(a){a=this.player_.duration();this.updateTextNode_(a)};Pd.prototype.labelText_="Duration";Pd.prototype.controlText_="Duration";D.registerComponent("DurationDisplay",Pd);var yh=function(){return D.apply(this,arguments)||this};$jscomp.inherits(yh,D);yh.prototype.createEl=function(){var a=D.prototype.createEl.call(this,"div",{className:"vjs-time-control vjs-time-divider"},{"aria-hidden":!0}),c=D.prototype.createEl.call(this,"div"),e=D.prototype.createEl.call(this,"span", 303{textContent:"/"});c.appendChild(e);a.appendChild(c);return a};D.registerComponent("TimeDivider",yh);var id=function(a,c){var e=ub.call(this,a,c)||this;e.on(a,"durationchange",function(g){return e.updateContent(g)});return e};$jscomp.inherits(id,ub);id.prototype.buildCSSClass=function(){return"vjs-remaining-time"};id.prototype.createEl=function(){var a=ub.prototype.createEl.call(this);!1!==this.options_.displayNegative&&a.insertBefore(Q("span",{},{"aria-hidden":!0},"-"),this.contentEl_);return a}; 304id.prototype.updateContent=function(a){"number"===typeof this.player_.duration()&&(a=this.player_.ended()?0:this.player_.remainingTimeDisplay?this.player_.remainingTimeDisplay():this.player_.remainingTime(),this.updateTextNode_(a))};id.prototype.labelText_="Remaining Time";id.prototype.controlText_="Remaining Time";D.registerComponent("RemainingTimeDisplay",id);var Ie=function(a,c){var e=D.call(this,a,c)||this;e.updateShowing();e.on(e.player(),"durationchange",function(g){return e.updateShowing(g)}); 305return e};$jscomp.inherits(Ie,D);Ie.prototype.createEl=function(){var a=D.prototype.createEl.call(this,"div",{className:"vjs-live-control vjs-control"});this.contentEl_=Q("div",{className:"vjs-live-display"},{"aria-live":"off"});this.contentEl_.appendChild(Q("span",{className:"vjs-control-text",textContent:this.localize("Stream Type")+"\u00a0"}));this.contentEl_.appendChild(document.createTextNode(this.localize("LIVE")));a.appendChild(this.contentEl_);return a};Ie.prototype.dispose=function(){this.contentEl_= 306null;D.prototype.dispose.call(this)};Ie.prototype.updateShowing=function(a){Infinity===this.player().duration()?this.show():this.hide()};D.registerComponent("LiveDisplay",Ie);var jd=function(a,c){var e=ma.call(this,a,c)||this;e.updateLiveEdgeStatus();e.player_.liveTracker&&(e.updateLiveEdgeStatusHandler_=function(g){return e.updateLiveEdgeStatus(g)},e.on(e.player_.liveTracker,"liveedgechange",e.updateLiveEdgeStatusHandler_));return e};$jscomp.inherits(jd,ma);jd.prototype.createEl=function(){var a= 307ma.prototype.createEl.call(this,"button",{className:"vjs-seek-to-live-control vjs-control"});this.setIcon("circle",a);this.textEl_=Q("span",{className:"vjs-seek-to-live-text",textContent:this.localize("LIVE")},{"aria-hidden":"true"});a.appendChild(this.textEl_);return a};jd.prototype.updateLiveEdgeStatus=function(){!this.player_.liveTracker||this.player_.liveTracker.atLiveEdge()?(this.setAttribute("aria-disabled",!0),this.addClass("vjs-at-live-edge"),this.controlText("Seek to live, currently playing live")): 308(this.setAttribute("aria-disabled",!1),this.removeClass("vjs-at-live-edge"),this.controlText("Seek to live, currently behind live"))};jd.prototype.handleClick=function(){this.player_.liveTracker.seekToLiveEdge()};jd.prototype.dispose=function(){this.player_.liveTracker&&this.off(this.player_.liveTracker,"liveedgechange",this.updateLiveEdgeStatusHandler_);this.textEl_=null;ma.prototype.dispose.call(this)};jd.prototype.controlText_="Seek to live, currently playing live";D.registerComponent("SeekToLive", 309jd);var Wn=Object.freeze({__proto__:null,clamp:ed}
309),Ea=function(a,c){var e=D.call(this,a,c)||this;e.handleMouseDown_=function(g){return e.handleMouseDown(g)};e.handleMouseUp_=function(g){return e.handleMouseUp(g)};e.handleKeyDown_=function(g){return e.handleKeyDown(g)};e.handleClick_=function(g){return e.handleClick(g)};e.handleMouseMove_=function(g){return e.handleMouseMove(g)};e.update_=function(g){return e.update(g)};e.bar=e.getChild(e.options_.barName);e.vertical(!!e.options_.vertical);e.enable(); 310return e};$jscomp.inherits(Ea,D);Ea.prototype.enabled=function(){return this.enabled_};Ea.prototype.enable=function(){if(!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);if(this.playerEvent)this.on(this.player_,this.playerEvent,this.update);this.removeClass("disabled");this.setAttribute("tabindex",0);this.enabled_=!0}}; 311Ea.prototype.disable=function(){if(this.enabled()){var a=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(a,"mousemove",this.handleMouseMove_);this.off(a,"mouseup",this.handleMouseUp_);this.off(a,"touchmove",this.handleMouseMove_);this.off(a,"touchend",this.handleMouseUp_);this.removeAttribute("tabindex"); 312this.addClass("disabled");this.playerEvent&&this.off(this.player_,this.playerEvent,this.update);this.enabled_=!1}};Ea.prototype.createEl=function(a,c,e){c=void 0===c?{}:c;e=void 0===e?{}:e;c.className+=" vjs-slider";c=Object.assign({tabIndex:0},c);e=Object.assign({role:"slider","aria-valuenow":0,"aria-valuemin":0,"aria-valuemax":100},e);return D.prototype.createEl.call(this,a,c,e)};Ea.prototype.handleMouseDown=function(a){var c=this.bar.el_.ownerDocument;"mousedown"===a.type&&a.preventDefault();"touchstart"!== 313a.type||oc||a.preventDefault();Gi();this.addClass("vjs-sliding");this.trigger("slideractive");this.on(c,"mousemove",this.handleMouseMove_);this.on(c,"mouseup",this.handleMouseUp_);this.on(c,"touchmove",this.handleMouseMove_);this.on(c,"touchend",this.handleMouseUp_);this.handleMouseMove(a,!0)};Ea.prototype.handleMouseMove=function(a){};Ea.prototype.handleMouseUp=function(a){a=this.bar.el_.ownerDocument;Hi();this.removeClass("vjs-sliding");this.trigger("sliderinactive");this.off(a,"mousemove",this.handleMouseMove_); 314this.off(a,"mouseup",this.handleMouseUp_);this.off(a,"touchmove",this.handleMouseMove_);this.off(a,"touchend",this.handleMouseUp_);this.update()};Ea.prototype.update=function(){var a=this;if(this.el_&&this.bar){var c=this.getProgress();if(c===this.progress_)return c;this.progress_=c;this.requestNamedAnimationFrame("Slider#update",function(){var e=a.vertical()?"height":"width";a.bar.el().style[e]=(100*c).toFixed(2)+"%"});return c}};Ea.prototype.getProgress=function(){return Number(ed(this.getPercent(), 3150,1).toFixed(4))};Ea.prototype.calculateDistance=function(a){a=jf(this.el_,a);return this.vertical()?a.y:a.x};Ea.prototype.handleKeyDown=function(a){var c=this.options_.playerOptions.spatialNavigation,e=c&&c.horizontalSeek;c&&c.enabled?e&&"ArrowLeft"===a.key||!e&&"ArrowDown"===a.key?(a.preventDefault(),a.stopPropagation(),this.stepBack()):e&&"ArrowRight"===a.key||!e&&"ArrowUp"===a.key?(a.preventDefault(),a.stopPropagation(),this.stepForward()):D.prototype.handleKeyDown.call(this,a):"ArrowLeft"=== 316a.key||"ArrowDown"===a.key?(a.preventDefault(),a.stopPropagation(),this.stepBack()):"ArrowUp"===a.key||"ArrowRight"===a.key?(a.preventDefault(),a.stopPropagation(),this.stepForward()):D.prototype.handleKeyDown.call(this,a)};Ea.prototype.handleClick=function(a){a.stopPropagation();a.preventDefault()};Ea.prototype.vertical=function(a){if(void 0===a)return this.vertical_||!1;(this.vertical_=!!a)?this.addClass("vjs-slider-vertical"):this.addClass("vjs-slider-horizontal")};D.registerComponent("Slider", 317Ea);var Je=function(a,c){var e=D.call(this,a,c)||this;e.partEls_=[];e.on(a,"progress",function(g){return e.update(g)});return e};$jscomp.inherits(Je,D);Je.prototype.createEl=function(){var a=D.prototype.createEl.call(this,"div",{className:"vjs-load-progress"}),c=Q("span",{className:"vjs-control-text"}),e=Q("span",{textContent:this.localize("Loaded")}),g=document.createTextNode(": ");this.percentageEl_=Q("span",{className:"vjs-control-text-loaded-percentage",textContent:"0%"});a.appendChild(c);c.appendChild(e); 318c.appendChild(g);c.appendChild(this.percentageEl_);return a};Je.prototype.dispose=function(){this.percentageEl_=this.partEls_=null;D.prototype.dispose.call(this)};Je.prototype.update=function(a){var c=this;this.requestNamedAnimationFrame("LoadProgressBar#update",function(){var e=c.player_.liveTracker,g=c.player_.buffered(),l=e&&e.isLive()?e.seekableEnd():c.player_.duration(),b=c.player_.bufferedEnd();e=c.partEls_;l=ed(b/l*100,0,100).toFixed(2)+"%";c.percent_!==l&&(c.el_.style.width=l,la(c.percentageEl_, 319l),c.percent_=l);for(l=0;l<g.length;l++){var d=g.start(l),f=g.end(l),h=e[l];h||(h=c.el_.appendChild(Q()),e[l]=h);if(h.dataset.start!==d||h.dataset.end!==f)h.dataset.start=d,h.dataset.end=f,h.style.left=ed(d/b*100,0,100).toFixed(2)+"%",h.style.width=ed((f-d)/b*100,0,100).toFixed(2)+"%"}for(b=e.length;b>g.length;b--)c.el_.removeChild(e[b-1]);e.length=g.length})};D.registerComponent("LoadProgressBar",Je);var Qd=function(a,c){a=D.call(this,a,c)||this;a.update=pc(Ka(a,a.update),30);return a};$jscomp.inherits(Qd, 320D);Qd.prototype.createEl=function(){return D.prototype.createEl.call(this,"div",{className:"vjs-time-tooltip"},{"aria-hidden":"true"})};Qd.prototype.update=function(a,c,e){var g=oe(this.el_),l=yd(this.player_.el()),b=a.width*c;l&&g&&(c=a.left-l.left+b,l=a.width-b+(l.right-a.right),l||(l=a.width-b,c=b),a=g.width/2,c<a?a+=a-c:l<a&&(a=l),0>a?a=0:a>g.width&&(a=g.width),a=Math.round(a),this.el_.style.right="-"+a+"px",this.write(e))};Qd.prototype.write=function(a){la(this.el_,a)};Qd.prototype.updateTime= 321function(a,c,e,g){var l=this;this.requestNamedAnimationFrame("TimeTooltip#updateTime",function(){var b=l.player_.duration();if(l.player_.liveTracker&&l.player_.liveTracker.isLive()){b=l.player_.liveTracker.liveWindow();var d=b-c*b;b=(1>d?"":"-")+bd(d,b)}else b=bd(e,b);l.update(a,c,b);g&&g()})};D.registerComponent("TimeTooltip",Qd);var Rd=function(a,c){a=D.call(this,a,c)||this;a.setIcon("circle");a.update=pc(Ka(a,a.update),30);return a};$jscomp.inherits(Rd,D);Rd.prototype.createEl=function(){return D.prototype.createEl.call(this, 322"div",{className:"vjs-play-progress vjs-slider-bar"},{"aria-hidden":"true"})};Rd.prototype.update=function(a,c){var e=this.getChild("timeTooltip");if(e){var g=this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime();e.updateTime(a,c,g)}};Rd.prototype.options_={children:[]};yb||nc||Rd.prototype.options_.children.push("timeTooltip");D.registerComponent("PlayProgressBar",Rd);var Ke=function(a,c){a=D.call(this,a,c)||this;a.update=pc(Ka(a,a.update),30);return a};$jscomp.inherits(Ke,
323D);Ke.prototype.createEl=function(){return D.prototype.createEl.call(this,"div",{className:"vjs-mouse-display"})};Ke.prototype.update=function(a,c){var e=this,g=c*this.player_.duration();this.getChild("timeTooltip").updateTime(a,c,g,function(){e.el_.style.left=a.width*c+"px"})};Ke.prototype.options_={children:["timeTooltip"]};D.registerComponent("MouseTimeDisplay",Ke);var Ua=function(a,c){a=Ea.call(this,a,c)||this;a.setEventHandlers_();return a};$jscomp.inherits(Ua,Ea);Ua.prototype.setEventHandlers_= 324function(){var a=this;this.update_=Ka(this,this.update);this.update=pc(this.update_,30);this.on(this.player_,["durationchange","timeupdate"],this.update);this.on(this.player_,["ended"],this.update_);if(this.player_.liveTracker)this.on(this.player_.liveTracker,"liveedgechange",this.update);this.updateInterval=null;this.enableIntervalHandler_=function(c){return a.enableInterval_(c)};this.disableIntervalHandler_=function(c){return a.disableInterval_(c)};this.on(this.player_,["playing"],this.enableIntervalHandler_); 325this.on(this.player_,["ended","pause","waiting"],this.disableIntervalHandler_);if("hidden"in document&&"visibilityState"in document)this.on(document,"visibilitychange",this.toggleVisibility_)};Ua.prototype.toggleVisibility_=function(a){"hidden"===document.visibilityState?(this.cancelNamedAnimationFrame("SeekBar#update"),this.cancelNamedAnimationFrame("Slider#update"),this.disableInterval_(a)):(this.player_.ended()||this.player_.paused()||this.enableInterval_(),this.update())};Ua.prototype.enableInterval_= 326function(){this.updateInterval||(this.updateInterval=this.setInterval(this.update,30))};Ua.prototype.disableInterval_=function(a){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&a&&"ended"!==a.type||!this.updateInterval||(this.clearInterval(this.updateInterval),this.updateInterval=null)};Ua.prototype.createEl=function(){return Ea.prototype.createEl.call(this,"div",{className:"vjs-progress-holder"},{"aria-label":this.localize("Progress Bar")})};Ua.prototype.update=function(a){var c=this; 327if("hidden"!==document.visibilityState){var e=Ea.prototype.update.call(this);this.requestNamedAnimationFrame("SeekBar#update",function(){var g=c.player_.ended()?c.player_.duration():c.getCurrentTime_(),l=c.player_.liveTracker,b=c.player_.duration();l&&l.isLive()&&(b=c.player_.liveTracker.liveCurrentTime());c.percent_!==e&&(c.el_.setAttribute("aria-valuenow",(100*e).toFixed(2)),c.percent_=e);if(c.currentTime_!==g||c.duration_!==b)c.el_.setAttribute("aria-valuetext",c.localize("progress bar timing: currentTime\x3d{1} duration\x3d{2}", 328[bd(g,b),bd(b,b)],"{1} of {2}")),c.currentTime_=g,c.duration_=b;c.bar&&c.bar.update(yd(c.el()),c.getProgress())});return e}};Ua.prototype.userSeek_=function(a){this.player_.liveTracker&&this.player_.liveTracker.isLive()&&this.player_.liveTracker.nextSeekedFromUser();this.player_.currentTime(a)};Ua.prototype.getCurrentTime_=function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()};Ua.prototype.getPercent=function(){var a=this.getCurrentTime_(),c=this.player_.liveTracker; 329c&&c.isLive()?(a=(a-c.seekableStart())/c.liveWindow(),c.atLiveEdge()&&(a=1)):a/=this.player_.duration();return a};Ua.prototype.handleMouseDown=function(a){pe(a)&&(a.stopPropagation(),this.videoWasPlaying=!this.player_.paused(),this.player_.pause(),Ea.prototype.handleMouseDown.call(this,a))};Ua.prototype.handleMouseMove=function(a,c){c=void 0===c?!1:c;if(pe(a)&&!isNaN(this.player_.duration())){c||this.player_.scrubbing()||this.player_.scrubbing(!0);var e=this.calculateDistance(a);var g=this.player_.liveTracker; 330if(g&&g.isLive()){if(.99<=e){g.seekToLiveEdge();return}a=g.seekableStart();c=g.liveCurrentTime();e=a+e*g.liveWindow();e>=c&&(e=c);e<=a&&(e=a+.1);if(Infinity===e)return}else e*=this.player_.duration(),e===this.player_.duration()&&(e-=.1);this.userSeek_(e);this.player_.options_.enableSmoothSeeking&&this.update()}};Ua.prototype.enable=function(){Ea.prototype.enable.call(this);var a=this.getChild("mouseTimeDisplay");a&&a.show()};Ua.prototype.disable=function(){Ea.prototype.disable.call(this);var a=this.getChild("mouseTimeDisplay"); 331a&&a.hide()};Ua.prototype.handleMouseUp=function(a){Ea.prototype.handleMouseUp.call(this,a);a&&a.stopPropagation();this.player_.scrubbing(!1);this.player_.trigger({type:"timeupdate",target:this,manuallyTriggered:!0});this.videoWasPlaying?jc(this.player_.play()):this.update_()};Ua.prototype.stepForward=function(){this.userSeek_(this.player_.currentTime()+5)};Ua.prototype.stepBack=function(){this.userSeek_(this.player_.currentTime()-5)};Ua.prototype.handleAction=function(a){this.player_.paused()?this.player_.play(): 332this.player_.pause()};Ua.prototype.handleKeyDown=function(a){var c=this.player_.liveTracker;" "===a.key||"Enter"===a.key?(a.preventDefault(),a.stopPropagation(),this.handleAction(a)):"Home"===a.key?(a.preventDefault(),a.stopPropagation(),this.userSeek_(0)):"End"===a.key?(a.preventDefault(),a.stopPropagation(),c&&c.isLive
332()?this.userSeek_(c.liveCurrentTime()):this.userSeek_(this.player_.duration())):/^[0-9]$/.test(a.key)?(a.preventDefault(),a.stopPropagation(),a=.1*parseInt(a.key,10),c&&c.isLive()? 333this.userSeek_(c.seekableStart()+c.liveWindow()*a):this.userSeek_(this.player_.duration()*a)):"PageDown"===a.key?(a.preventDefault(),a.stopPropagation(),this.userSeek_(this.player_.currentTime()-60)):"PageUp"===a.key?(a.preventDefault(),a.stopPropagation(),this.userSeek_(this.player_.currentTime()+60)):Ea.prototype.handleKeyDown.call(this,a)};Ua.prototype.dispose=function(){this.disableInterval_();this.off(this.player_,["durationchange","timeupdate"],this.update);this.off(this.player_,["ended"],this.update_); 334this.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 document&&"visibilityState"in document&&this.off(document,"visibilitychange",this.toggleVisibility_);Ea.prototype.dispose.call(this)};Ua.prototype.options_={children:["loadProgressBar","playProgressBar"],barName:"playProgressBar"};yb||nc||Ua.prototype.options_.children.splice(1, 3350,"mouseTimeDisplay");D.registerComponent("SeekBar",Ua);var Yb=function(a,c){var e=D.call(this,a,c)||this;e.handleMouseMove=pc(Ka(e,e.handleMouseMove),30);e.throttledHandleMouseSeek=pc(Ka(e,e.handleMouseSeek),30);e.handleMouseUpHandler_=function(g){return e.handleMouseUp(g)};e.handleMouseDownHandler_=function(g){return e.handleMouseDown(g)};e.enable();return e};$jscomp.inherits(Yb,D);Yb.prototype.createEl=function(){return D.prototype.createEl.call(this,"div",{className:"vjs-progress-control vjs-control"})}; 336Yb.prototype.handleMouseMove=function(a){var c=this.getChild("seekBar");if(c){var e=c.getChild("playProgressBar"),g=c.getChild("mouseTimeDisplay");if(e||g){var l=c.el(),b=oe(l);a=jf(l,a).x;a=ed(a,0,1);g&&g.update(b,a);e&&e.update(b,c.getProgress())}}};Yb.prototype.handleMouseSeek=function(a){var c=this.getChild("seekBar");c&&c.handleMouseMove(a)};Yb.prototype.enabled=function(){return this.enabled_};
336Yb.prototype.disable=function(){this.children().forEach(function(c){return c.disable&&c.disable()}); 337if(this.enabled()&&(this.off(["mousedown","touchstart"],this.handleMouseDownHandler_),this.off(this.el_,"mousemove",this.handleMouseMove),this.removeListenersAddedOnMousedownAndTouchstart(),this.addClass("disabled"),this.enabled_=!1,this.player_.scrubbing())){var a=this.getChild("seekBar");this.player_.scrubbing(!1);a.videoWasPlaying&&jc(this.player_.play())}};Yb.prototype.enable=function(){this.children().forEach(function(a){return a.enable&&a.enable()});this.enabled()||(this.on(["mousedown","touchstart"], 338this.handleMouseDownHandler_),this.on(this.el_,"mousemove",this.handleMouseMove),this.removeClass("disabled"),this.enabled_=!0)};Yb.prototype.removeListenersAddedOnMousedownAndTouchstart=function(){var a=this.el_.ownerDocument;this.off(a,"mousemove",this.throttledHandleMouseSeek);this.off(a,"touchmove",this.throttledHandleMouseSeek);this.off(a,"mouseup",this.handleMouseUpHandler_);this.off(a,"touchend",this.handleMouseUpHandler_)};Yb.prototype.handleMouseDown=function(a){var c=this.el_.ownerDocument, 339e=this.getChild("seekBar");e&&e.handleMouseDown(a);this.on(c,"mousemove",this.throttledHandleMouseSeek);this.on(c,"touchmove",this.throttledHandleMouseSeek);this.on(c,"mouseup",this.handleMouseUpHandler_);this.on(c,"touchend",this.handleMouseUpHandler_)};Yb.prototype.handleMouseUp=function(a){var c=this.getChild("seekBar");c&&c.handleMouseUp(a);this.removeListenersAddedOnMousedownAndTouchstart()};Yb.prototype.options_={children:["seekBar"]};D.registerComponent("ProgressControl",Yb);var Gc=function(a, 340c){var e=ma.call(this,a,c)||this;e.setIcon("picture-in-picture-enter");e.on(a,["enterpictureinpicture","leavepictureinpicture"],function(g){return e.handlePictureInPictureChange(g)});e.on(a,["disablepictureinpicturechanged","loadedmetadata"],function(g){return e.handlePictureInPictureEnabledChange(g)});e.on(a,["loadedmetadata","audioonlymodechange","audiopostermodechange"],function(){return e.handlePictureInPictureAudioModeChange()});e.disable();return e};$jscomp.inherits(Gc,ma);Gc.prototype.buildCSSClass= 341function(){return"vjs-picture-in-picture-control vjs-hidden "+ma.prototype.buildCSSClass.call(this)};Gc.prototype.handlePictureInPictureAudioModeChange=function(){"audio"===this.player_.currentType().substring(0,5)||this.player_.audioPosterMode()||this.player_.audioOnlyMode()?(this.player_.isInPictureInPicture()&&this.player_.exitPictureInPicture(),this.hide()):this.show()};Gc.prototype.handlePictureInPictureEnabledChange=function(){document.pictureInPictureEnabled&&!1===this.player_.disablePictureInPicture()|| 342this.player_.options_.enableDocumentPictureInPicture&&"documentPictureInPicture"in window?this.enable():this.disable()};Gc.prototype.handlePictureInPictureChange=function(a){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()};Gc.prototype.handleClick=function(a){this.player_.isInPictureInPicture()?this.player_.exitPictureInPicture(): 343this.player_.requestPictureInPicture()};Gc.prototype.show=function(){"function"===typeof document.exitPictureInPicture&&ma.prototype.show.call(this)};Gc.prototype.controlText_="Picture-in-Picture";D.registerComponent("PictureInPictureToggle",Gc);var Sd=function(a,c){var e=ma.call(this,a,c)||this;e.setIcon("fullscreen-enter");e.on(a,"fullscreenchange",function(g){return e.handleFullscreenChange(g)});!1===document[a.fsApi_.fullscreenEnabled]&&e.disable();return e};$jscomp.inherits(Sd,ma);Sd.prototype.buildCSSClass= 344function(){return"vjs-fullscreen-control "+ma.prototype.buildCSSClass.call(this)};Sd.prototype.handleFullscreenChange=function(a){this.player_.isFullscreen()?(this.controlText("Exit Fullscreen"),this.setIcon("fullscreen-exit")):(this.controlText("Fullscreen"),this.setIcon("fullscreen-enter"))};Sd.prototype.handleClick=function(a){this.player_.isFullscreen()?this.player_.exitFullscreen():this.player_.requestFullscreen()};Sd.prototype.controlText_="Fullscreen";D.registerComponent("FullscreenToggle", 345Sd);var Xn=function(a,c){c.tech_&&!c.tech_.featuresVolumeControl&&a.addClass("vjs-hidden");a.on(c,"loadstart",function(){c.tech_.featuresVolumeControl?a.removeClass("vjs-hidden"):a.addClass("vjs-hidden")})},zh=function(){return D.apply(this,arguments)||this};$jscomp.inherits(zh,D);zh.prototype.createEl=function(){var a=D.prototype.createEl.call(this,"div",{className:"vjs-volume-level"});this.setIcon("circle",a);a.appendChild(D.prototype.createEl.call(this,"span",{className:"vjs-control-text"}));return a};
346D.registerComponent("VolumeLevel",zh);var Td=function(a,c){a=D.call(this,a,c)||this;a.update=pc(Ka(a,a.update),30);return a};$jscomp.inherits(Td,D);Td.prototype.createEl=function(){return D.prototype.createEl.call(this,"div",{className:"vjs-volume-tooltip"},{"aria-hidden":"true"})};Td.prototype.update=function(a,c,e,g){if(!e){e=yd(this.el_);var l=yd(this.player_.el()),b=a.width*c;if(!l||!e)return;c=a.left-l.left+b;a=a.width-b+(l.right-a.right);l=e.width/2;c<l?l+=l-c:a<l&&(l=a);0>l?l=0:l>e.width&& 347(l=e.width);this.el_.style.right="-"+l+"px"}this.write(g+"%")};Td.prototype.write=function(a){la(this.el_,a)};Td.prototype.updateVolume=function(a,c,e,g,l){var b=this;this.requestNamedAnimationFrame("VolumeLevelTooltip#updateVolume",function(){b.update(a,c,e,g.toFixed(0));l&&l()})};D.registerComponent("VolumeLevelTooltip",Td);var Le=function(a,c){a=D.call(this,a,c)||this;a.update=pc(Ka(a,a.update),30);return a};$jscomp.inherits(Le,D);Le.prototype.createEl=function(){return D.prototype.createEl.call(this, 348"div",{className:"vjs-mouse-display"})};Le.prototype.update=function(a,c,e){var g=this,l=100*c;this.getChild("volumeLevelTooltip").updateVolume(a,c,e,l,function(){e?g.el_.style.bottom=a.height*c+"px":g.el_.style.left=a.width*c+"px"})};Le.prototype.options_={children:["volumeLevelTooltip"]};D.registerComponent("MouseVolumeLevelDisplay",Le);var Cb=function(a,c){var e=Ea.call(this,a,c)||this;e.on("slideractive",function(g){return e.updateLastVolume_(g)});e.on(a,"volumechange",function(g){return e.updateARIAAttributes(g)}); 349a.ready(function(){return e.updateARIAAttributes()});return e};$jscomp.inherits(Cb,Ea);Cb.prototype.createEl=function(){return Ea.prototype.createEl.call(this,"div",{className:"vjs-volume-bar vjs-slider-bar"},{"aria-label":this.localize("Volume Level"),"aria-live":"polite"})};Cb.prototype.handleMouseDown=function(a){pe(a)&&Ea.prototype.handleMouseDown.call(this,a)};Cb.prototype.handleMouseMove=function(a){var c=this.getChild("mouseVolumeLevelDisplay");if(c){var e=this.el(),g=yd(e),l=this.vertical(); 350e=jf(e,a);e=l?e.y:e.x;e=ed(e,0,1);c.update(g,e,l)}pe(a)&&(this.checkMuted(),this.player_.volume(this.calculateDistance(a)))};Cb.prototype.checkMuted=function(){this.player_.muted()&&this.player_.muted(!1)};Cb.prototype.getPercent=function(){return this.player_.muted()?0:this.player_.volume()};Cb.prototype.stepForward=function(){this.checkMuted();this.player_.volume(this.player_.volume()+.1)};Cb.prototype.stepBack=function(){this.checkMuted();this.player_.volume(this.player_.volume()-.1)};Cb.prototype.updateARIAAttributes= 351function(a){a=this.player_.muted()?0:this.volumeAsPercentage_();this.el_.setAttribute("aria-valuenow",a);this.el_.setAttribute("aria-valuetext",a+"%")};Cb.prototype.volumeAsPercentage_=function(){return Math.round(100*this.player_.volume())};Cb.prototype.updateLastVolume_=function(){var a=this,c=this.player_.volume();this.one("sliderinactive",function(){0===a.player_.volume()&&a.player_.lastVolume_(c)})};Cb.prototype.options_={children:["volumeLevel"],barName:"volumeLevel"};yb||nc||Cb.prototype.options_.children.splice(0, 3520,"mouseVolumeLevelDisplay");Cb.prototype.playerEvent="volumechange";D.registerComponent("VolumeBar",Cb);var kd=function(a,c){c=void 0===c?{}:c;c.vertical=c.vertical||!1;if("undefined"===typeof c.volumeBar||Z(c.volumeBar))c.volumeBar=c.volumeBar||{},c.volumeBar.vertical=c.vertical;var e=D.call(this,a,c)||this;Xn(e,a);e.throttledHandleMouseMove=pc(Ka(e,e.handleMouseMove),30);e.handleMouseUpHandler_=function(g){return e.handleMouseUp(g)};e.on("mousedown",function(g){return e.handleMouseDown(g)});e.on("touchstart", 353function(g){return e.handleMouseDown(g)});e.on("mousemove",function(g){return e.handleMouseMove(g)});e.on(e.volumeBar,["focus","slideractive"],function(){e.volumeBar.addClass("vjs-slider-active");e.addClass("vjs-slider-active");e.trigger("slideractive")});e.on(e.volumeBar,["blur","sliderinactive"],function(){e.volumeBar.removeClass("vjs-slider-active");e.removeClass("vjs-slider-active");e.trigger("sliderinactive")});return e};$jscomp.inherits(kd,D);kd.prototype.createEl=function(){var a="vjs-volume-horizontal"; 354this.options_.vertical&&(a="vjs-volume-vertical");return D.prototype.createEl.call(this,"div",{className:"vjs-volume-control vjs-control "+a})};kd.prototype.handleMouseDown=function(a){a=this.el_.ownerDocument;this.on(a,"mousemove",this.throttledHandleMouseMove);this.on(a,"touchmove",this.throttledHandleMouseMove);this.on(a,"mouseup",this.handleMouseUpHandler_);this.on(a,"touchend",this.handleMouseUpHandler_)};kd.prototype.handleMouseUp=function(a){a=this.el_.ownerDocument;this.off(a,"mousemove", 355this.throttledHandleMouseMove);this.off(a,"touchmove",this.throttledHandleMouseMove);this.off(a,"mouseup",this.handleMouseUpHandler_);this.off(a,"touchend",this.handleMouseUpHandler_)};kd.prototype.handleMouseMove=function(a){this.volumeBar.handleMouseMove(a)};kd.prototype.options_={children:["volumeBar"]};
355D.registerComponent("VolumeControl",kd);var Yn=function(a,c){c.tech_&&!c.tech_.featuresMuteControl&&a.addClass("vjs-hidden");a.on(c,"loadstart",function(){c.tech_.featuresMuteControl?a.removeClass("vjs-hidden"): 356a.addClass("vjs-hidden")})},Sc=function(a,c){var e=ma.call(this,a,c)||this;Yn(e,a);e.on(a,["loadstart","volumechange"],function(g){return e.update(g)});return e};$jscomp.inherits(Sc,ma);Sc.prototype.buildCSSClass=function(){return"vjs-mute-control "+ma.prototype.buildCSSClass.call(this)};Sc.prototype.handleClick=function(a){a=this.player_.volume();var c=this.player_.lastVolume_();0===a?(this.player_.volume(.1>c?.1:c),this.player_.muted(!1)):this.player_.muted(this.player_.muted()?!1:!0)};Sc.prototype.update= 357function(a){this.updateIcon_();this.updateControlText_()};Sc.prototype.updateIcon_=function(){var a=this.player_.volume(),c=3;this.setIcon("volume-high");yb&&this.player_.tech_&&this.player_.tech_.el_&&this.player_.muted(this.player_.tech_.el_.muted);0===a||this.player_.muted()?(this.setIcon("volume-mute"),c=0):.33>a?(this.setIcon("volume-low"),c=1):.67>a&&(this.setIcon("volume-medium"),c=2);ic(this.el_,[0,1,2,3].reduce(function(e,g){return e+((g?" ":"")+"vjs-vol-"+g)},""));Ya(this.el_,"vjs-vol-"+ 358c)};Sc.prototype.updateControlText_=function(){var a=this.player_.muted()||0===this.player_.volume()?"Unmute":"Mute";this.controlText()!==a&&this.controlText(a)};Sc.prototype.controlText_="Mute";D.registerComponent("MuteToggle",Sc);var Zb=function(a,c){c=void 0===c?{}:c;c.inline="undefined"!==typeof c.inline?c.inline:!0;if("undefined"===typeof c.volumeControl||Z(c.volumeControl))c.volumeControl=c.volumeControl||{},c.volumeControl.vertical=!c.inline;var e=D.call(this,a,c)||this;e.handleKeyPressHandler_= 359function(g){return e.handleKeyPress(g)};e.on(a,["loadstart"],function(g){return e.volumePanelState_(g)});e.on(e.muteToggle,"keyup",function(g){return e.handleKeyPress(g)});e.on(e.volumeControl,"keyup",function(g){return e.handleVolumeControlKeyUp(g)});e.on("keydown",function(g){return e.handleKeyPress(g)});e.on("mouseover",function(g){return e.handleMouseOver(g)});e.on("mouseout",function(g){return e.handleMouseOut(g)});e.on(e.volumeControl,["slideractive"],e.sliderActive_);e.on(e.volumeControl,["sliderinactive"], 360e.sliderInactive_);return e};$jscomp.inherits(Zb,D);Zb.prototype.sliderActive_=function(){this.addClass("vjs-slider-active")};Zb.prototype.sliderInactive_=function(){this.removeClass("vjs-slider-active")};Zb.prototype.volumePanelState_=function(){this.volumeControl.hasClass("vjs-hidden")&&this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-hidden");this.volumeControl.hasClass("vjs-hidden")&&!this.muteToggle.hasClass("vjs-hidden")&&this.addClass("vjs-mute-toggle-only")};Zb.prototype.createEl= 361function(){var a="vjs-volume-panel-horizontal";this.options_.inline||(a="vjs-volume-panel-vertical");return D.prototype.createEl.call(this,"div",{className:"vjs-volume-panel vjs-control "+a})};Zb.prototype.dispose=function(){this.handleMouseOut();D.prototype.dispose.call(this)};Zb.prototype.handleVolumeControlKeyUp=function(a){"Escape"===a.key&&this.muteToggle.focus()};Zb.prototype.handleMouseOver=function(a){this.addClass("vjs-hover");Qb(document,"keyup",this.handleKeyPressHandler_)};Zb.prototype.handleMouseOut= 362function(a){this.removeClass("vjs-hover");tb(document,"keyup",this.handleKeyPressHandler_)};Zb.prototype.handleKeyPress=function(a){"Escape"===a.key&&this.handleMouseOut()};Zb.prototype.options_={children:["muteToggle","volumeControl"]};D.registerComponent("VolumePanel",Zb);var ld=function(a,c){c=ma.call(this,a,c)||this;
362c.validOptions=[5,10,30];c.skipTime=c.getSkipForwardTime();c.skipTime&&c.validOptions.includes(c.skipTime)?(c.setIcon("forward-"+c.skipTime),c.controlText(c.localize("Skip forward {1} seconds", 363[c.skipTime.toLocaleString(a.language())])),c.show()):c.hide();return c};$jscomp.inherits(ld,ma);ld.prototype.getSkipForwardTime=function(){var a=this.options_.playerOptions;return a.controlBar&&a.controlBar.skipButtons&&a.controlBar.skipButtons.forward};ld.prototype.buildCSSClass=function(){return"vjs-skip-forward-"+this.getSkipForwardTime()+" "+ma.prototype.buildCSSClass.call(this)};ld.prototype.handleClick=function(a){if(!isNaN(this.player_.duration())){a=this.player_.currentTime();var c=this.player_.liveTracker; 364c=c&&c.isLive()?c.seekableEnd():this.player_.duration();this.player_.currentTime(a+this.skipTime<=c?a+this.skipTime:c)}};ld.prototype.handleLanguagechange=function(){this.controlText(this.localize("Skip forward {1} seconds",[this.skipTime]))};ld.prototype.controlText_="Skip Forward";D.registerComponent("SkipForward",ld);var md=function(a,c){c=ma.call(this,a,c)||this;
364c.validOptions=[5,10,30];c.skipTime=c.getSkipBackwardTime();c.skipTime&&c.validOptions.includes(c.skipTime)?(c.setIcon("replay-"+c.skipTime), 365c.controlText(c.localize("Skip backward {1} seconds",[c.skipTime.toLocaleString(a.language())])),c.show()):c.hide();return c};$jscomp.inherits(md,ma);md.prototype.getSkipBackwardTime=function(){var a=this.options_.playerOptions;return a.controlBar&&a.controlBar.skipButtons&&a.controlBar.skipButtons.backward};md.prototype.buildCSSClass=function(){return"vjs-skip-backward-"+this.getSkipBackwardTime()+" "+ma.prototype.buildCSSClass.call(this)};md.prototype.handleClick=function(a){a=this.player_.currentTime(); 366var c=this.player_.liveTracker;c=c&&c.isLive()&&c.seekableStart();this.player_.currentTime(c&&a-this.skipTime<=c?c:a>=this.skipTime?a-this.skipTime:0)};md.prototype.handleLanguagechange=function(){this.controlText(this.localize("Skip backward {1} seconds",[this.skipTime]))};md.prototype.controlText_="Skip Backward";D.registerComponent("SkipBackward",md);var Db=function(a,c){var e=D.call(this,a,c)||this;c&&(e.menuButton_=c.menuButton);e.focusedChild_=-1;e.on("keydown",function(g){return e.handleKeyDown(g)}); 367e.boundHandleBlur_=function(g){return e.handleBlur(g)};e.boundHandleTapClick_=function(g){return e.handleTapClick(g)};return e};$jscomp.inherits(Db,D);Db.prototype.addEventListenerForItem=function(a){a instanceof D&&(this.on(a,"blur",this.boundHandleBlur_),this.on(a,["tap","click"],this.boundHandleTapClick_))};Db.prototype.removeEventListenerForItem=function(a){a instanceof D&&(this.off(a,"blur",this.boundHandleBlur_),this.off(a,["tap","click"],this.boundHandleTapClick_))};Db.prototype.removeChild= 368function(a){"string"===typeof a&&(a=this.getChild(a));this.removeEventListenerForItem(a);D.prototype.removeChild.call(this,a)};Db.prototype.addItem=function(a){(a=this.addChild(a))&&this.addEventListenerForItem(a)};Db.prototype.createEl=function(){this.contentEl_=Q(this.options_.contentElType||"ul",{className:"vjs-menu-content"});this.contentEl_.setAttribute("role","menu");var a=D.prototype.createEl.call(this,"div",{append:this.contentEl_,className:"vjs-menu"});a.appendChild(this.contentEl_);Qb(a, 369"click",function(c){c.preventDefault();c.stopImmediatePropagation()});return a};Db.prototype.dispose=function(){this.boundHandleTapClick_=this.boundHandleBlur_=this.contentEl_=null;D.prototype.dispose.call(this)};Db.prototype.handleBlur=function(a){var c=a.relatedTarget||document.activeElement;this.children().some(function(e){return e.el()===c})||(a=this.menuButton_)&&a.buttonPressed_&&c!==a.el().firstChild&&a.unpressButton()};Db.prototype.handleTapClick=function(a){if(this.menuButton_){this.menuButton_.unpressButton(); 370var c=this.children();Array.isArray(c)&&(c=c.filter(function(e){return e.el()===a.target})[0])&&"CaptionSettingsMenuItem"!==c.name()&&this.menuButton_.focus()}};Db.prototype.handleKeyDown=function(a){if("ArrowLeft"===a.key||"ArrowDown"===a.key)a.preventDefault(),a.stopPropagation(),this.stepForward();else if("ArrowRight"===a.key||"ArrowUp"===a.key)a.preventDefault(),a.stopPropagation(),this.stepBack()};Db.prototype.stepForward=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_+ 3711);this.focus(a)};Db.prototype.stepBack=function(){var a=0;void 0!==this.focusedChild_&&(a=this.focusedChild_-1);this.focus(a)};Db.prototype.focus=function(a){a=void 0===a?0:a;var c=this.children().slice();c.length&&c[0].hasClass("vjs-menu-title")&&c.shift();0<c.length&&(0>a?a=0:a>=c.length&&(a=c.length-1),this.focusedChild_=a,c[a].el_.focus())};D.registerComponent("Menu",Db);var xa=function(a,c){c=void 0===c?{}:c;var e=D.call(this,a,c)||this;e.menuButton_=new ma(a,c);e.menuButton_.controlText(e.controlText_); 372e.menuButton_.el_.setAttribute("aria-haspopup","true");a=ma.prototype.buildCSSClass();e.menuButton_.el_.className=e.buildCSSClass()+" "+a;e.menuButton_.removeClass("vjs-control");e.addChild(e.menuButton_);e.update();e.enabled_=!0;a=function(g){return e.handleClick(g)};e.handleMenuKeyUp_=function(g){return e.handleMenuKeyUp(g)};e.on(e.menuButton_,"tap",a);e.on(e.menuButton_,"click",a);e.on(e.menuButton_,"keydown",function(g){return e.handleKeyDown(g)});e.on(e.menuButton_,"mouseenter",function(){e.addClass("vjs-hover"); 373e.menu.show();Qb(document,"keyup",e.handleMenuKeyUp_)}
373);e.on("mouseleave",function(g){return e.handleMouseLeave(g)});e.on("keydown",function(g){return e.handleSubmenuKeyDown(g)});return e};$jscomp.inherits(xa,D);xa.prototype.update=function(){var a=this.createMenu();this.menu&&(this.menu.dispose(),this.removeChild(this.menu));this.menu=a;this.addChild(a);this.buttonPressed_=!1;this.menuButton_.el_.setAttribute("aria-expanded","false");this.items&&this.items.length<=this.hideThreshold_?(this.hide(), 374this.menu.contentEl_.removeAttribute("role")):(this.show(),this.menu.contentEl_.setAttribute("role","menu"))};xa.prototype.createMenu=function(){var a=new Db(this.player_,{menuButton:this});this.hideThreshold_=0;if(this.options_.title){var c=Q("li",{className:"vjs-menu-title",textContent:Za(this.options_.title),tabIndex:-1});c=new D(this.player_,{el:c});a.addItem(c)}if(this.items=this.createItems())for(c=0;c<this.items.length;c++)a.addItem(this.items[c]);return a};xa.prototype.createItems=function(){}; 375xa.prototype.createEl=function(){return D.prototype.createEl.call(this,"div",{className:this.buildWrapperCSSClass()},{})};xa.prototype.setIcon=function(a){D.prototype.setIcon.call(this,a,this.menuButton_.el_)};xa.prototype.buildWrapperCSSClass=function(){var a="vjs-menu-button";a=!0===this.options_.inline?a+"-inline":a+"-popup";var c=ma.prototype.buildCSSClass();return"vjs-menu-button "+a+" "+c+" "+D.prototype.buildCSSClass.call(this)};xa.prototype.buildCSSClass=function(){var a="vjs-menu-button"; 376a=!0===this.options_.inline?a+"-inline":a+"-popup";return"vjs-menu-button "+a+" "+D.prototype.buildCSSClass.call(this)};xa.prototype.controlText=function(a,c){c=void 0===c?this.menuButton_.el():c;return this.menuButton_.controlText(a,c)};xa.prototype.dispose=function(){this.handleMouseLeave();D.prototype.dispose.call(this)};xa.prototype.handleClick=function(a){this.buttonPressed_?this.unpressButton():this.pressButton()};xa.prototype.handleMouseLeave=function(a){this.removeClass("vjs-hover");tb(document, 377"keyup",this.handleMenuKeyUp_)};xa.prototype.focus=function(){this.menuButton_.focus()};xa.prototype.blur=function(){this.menuButton_.blur()};xa.prototype.handleKeyDown=function(a){"Escape"===a.key||"Tab"===a.key?this.buttonPressed_&&this.unpressButton():"Up"!==a.key&&("Down"!==a.key||this.player_.options_.playerOptions.spatialNavigation&&this.player_.options_.playerOptions.spatialNavigation.enabled)||this.buttonPressed_||(a.preventDefault(),this.pressButton())};xa.prototype.handleMenuKeyUp=function(a){"Escape"!== 378a.key&&"Tab"!==a.key||this.removeClass("vjs-hover")};xa.prototype.handleSubmenuKeyPress=function(a){this.handleSubmenuKeyDown(a)};xa.prototype.handleSubmenuKeyDown=function(a){("Escape"===a.key||"Tab"===a.key)&&this.buttonPressed_&&this.unpressButton()};xa.prototype.pressButton=function(){this.enabled_&&(this.buttonPressed_=!0,this.menu.show(),this.menu.lockShowing(),this.menuButton_.el_.setAttribute("aria-expanded","true"),yb&&aa()||this.menu.focus())};xa.prototype.unpressButton=function(){this.enabled_&& 379(this.buttonPressed_=!1,this.menu.unlockShowing(),this.menu.hide(),this.menuButton_.el_.setAttribute("aria-expanded","false"))};xa.prototype.disable=function(){this.unpressButton();this.enabled_=!1;this.addClass("vjs-disabled");this.menuButton_.disable()};xa.prototype.enable=function(){this.enabled_=!0;this.removeClass("vjs-disabled");this.menuButton_.enable()};D.registerComponent("MenuButton",xa);var Tc=function(a,c){var e=c.tracks;a=xa.call(this,a,c)||this;1>=a.items.length&&a.hide();if(!e)return a; 380var g=Ka(a,a.update);e.addEventListener("removetrack",g);e.addEventListener("addtrack",g);e.addEventListener("labelchange",g);a.player_.on("ready",g);a.player_.on("dispose",function(){e.removeEventListener("removetrack",g);e.removeEventListener("addtrack",g);e.removeEventListener("labelchange",g)});return a};$jscomp.inherits(Tc,xa);D.registerComponent("TrackButton",Tc);var cb=function(a,c){a=Na.call(this,a,c)||this;a.selectable=c.selectable;a.isSelected_=c.selected||!1;a.multiSelectable=c.multiSelectable; 381a.selected(a.isSelected_);a.selectable?a.multiSelectable?a.el_.setAttribute("role","menuitemcheckbox"):a.el_.setAttribute("role","menuitemradio"):a.el_.setAttribute("role","menuitem");return a};$jscomp.inherits(cb,Na);
381cb.prototype.createEl=function(a,c,e){this.nonIconControl=!0;a=Na.prototype.createEl.call(this,"li",Object.assign({className:"vjs-menu-item",tabIndex:-1},c),e);c=Q("span",{className:"vjs-menu-item-text",textContent:this.localize(this.options_.label)});this.player_.options_.experimentalSvgIcons? 382a.appendChild(c):a.replaceChild(c,a.querySelector(".vjs-icon-placeholder"));return a};cb.prototype.handleKeyDown=function(a){"Tab Escape ArrowUp ArrowLeft ArrowRight ArrowDown".split(" ").includes(a.key)||Na.prototype.handleKeyDown.call(this,a)};cb.prototype.handleClick=function(a){this.selected(!0)};cb.prototype.selected=function(a){this.selectable&&(a?(this.addClass("vjs-selected"),this.el_.setAttribute("aria-checked","true"),this.controlText(", selected"),this.isSelected_=!0):(this.removeClass("vjs-selected"), 383this.el_.setAttribute("aria-checked","false"),this.controlText(""),this.isSelected_=!1))};D.registerComponent("MenuItem",cb);var vb=function(a,c){var e=c.track,g=a.textTracks();c.label=e.label||e.language||"Unknown";c.selected="showing"===e.mode;var l=cb.call(this,a,c)||this;l.track=e;l.kinds=(c.kinds||[c.kind||l.track.kind]).filter(Boolean);var b=function(h){for(var m=[],p=0;p<arguments.length;++p)m[p-0]=arguments[p];l.handleTracksChange.apply(l,m)},d=function(h){for(var m=[],p=0;p<arguments.length;++p)m[p- 3840]=arguments[p];l.handleSelectedLanguageChange.apply(l,m)};a.on(["loadstart","texttrackchange"],b);g.addEventListener("change",b);g.addEventListener("selectedlanguagechange",d);l.on("dispose",function(){a.off(["loadstart","texttrackchange"],b);g.removeEventListener("change",b);g.removeEventListener("selectedlanguagechange",d)});if(void 0===g.onchange){var f;l.on(["tap","click"],function(){if("object"!==typeof window.Event)try{f=new window.Event("change")}catch(h){}f||(f=document.createEvent("Event"), 385f.initEvent("change",!0,!0));g.dispatchEvent(f)})}l.handleTracksChange();return l};$jscomp.inherits(vb,cb);vb.prototype.handleClick=function(a){var c=this.track,e=this.player_.textTracks();cb.prototype.handleClick.call(this,a);if(e)for(a=0;a<e.length;a++){var g=e[a];-1!==this.kinds.indexOf(g.kind)&&(g===c?"showing"!==g.mode&&(g.mode="showing"):"disabled"!==g.mode&&(g.mode="disabled"))}};vb.prototype.handleTracksChange=function(a){a="showing"===this.track.mode;a!==this.isSelected_&&this.selected(a)}; 386vb.prototype.handleSelectedLanguageChange=function(a){"showing"===this.track.mode&&(a=this.player_.cache_.selectedLanguage,a&&a.enabled&&a.language===this.track.language&&a.kind!==this.track.kind||(this.player_.cache_.selectedLanguage={enabled:!0,language:this.track.language,kind:this.track.kind}))};vb.prototype.dispose=function(){this.track=null;cb.prototype.dispose.call(this)};D.registerComponent("TextTrackMenuItem",vb);var Ud=function(a,c){c.track={player:a,kind:c.kind,kinds:c.kinds,default:!1, 387mode:"disabled"};c.kinds||(c.kinds=[c.kind]);c.track.label=c.label?c.label:c.kinds.join(" and ")+" off";c.selectable=!0;c.multiSelectable=!1;return vb.call(this,a,c)||this};$jscomp.inherits(Ud,vb);Ud.prototype.handleTracksChange=function(a){a=this.player().textTracks();for(var c=!0,e=0,g=a.length;e<g;e++){var l=a[e];if(-1<this.options_.kinds.indexOf(l.kind)&&"showing"===l.mode){c=!1;break}}c!==this.isSelected_&&this.selected(c)};Ud.prototype.handleSelectedLanguageChange=function(a){a=this.player().textTracks(); 388for(var c=!0,e=0,g=a.length;e<g;e++){var l=a[e];if(-1<["captions","descriptions","subtitles"].indexOf(l.kind)&&"showing"===l.mode){c=!1;break}}c&&(this.player_.cache_.selectedLanguage={enabled:!1})};Ud.prototype.handleLanguagechange=function(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.label);vb.prototype.handleLanguagechange.call(this)};D.registerComponent("OffTextTrackMenuItem",Ud);var Ia=function(a,c){c=void 0===c?{}:c;c.tracks=a.textTracks();return Tc.call(this, 389a,c)||this};$jscomp.inherits(Ia,Tc);Ia.prototype.createItems=function(a,c){a=void 0===a?[]:a;c=void 0===c?vb:c;var e;this.label_&&(e=this.label_+" off");a.push(new Ud(this.player_,{kinds:this.kinds_,kind:this.kind_,label:e}));this.hideThreshold_+=1;e=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var g=0;g<e.length;g++){var l=e[g];if(-1<this.kinds_.indexOf(l.kind)){var b=new c(this.player_,{track:l,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1}); 390b.addClass("vjs-"+l.kind+"-menu-item");a.push(b)}}return a};D.registerComponent("TextTrackButton",Ia);var Uf=function(a,c){var e=c.track,g=c.cue,l=a.currentTime();c.selectable=!0;c.multiSelectable=!1;c.label=g.text;c.selected=g.startTime<=l&&l<g.endTime;a=cb.call(this,a,c)||this;a.track=e;a.cue=g;return a};$jscomp.inherits(Uf,cb);Uf.prototype.handleClick=function(a){cb.prototype.handleClick.call(this);this.player_.currentTime(this.cue.startTime)};D.registerComponent("ChaptersTrackMenuItem",Uf);var $b= 391function(a,c,e){var g=Ia.call(this,a,c,e)||this;g.setIcon("chapters");
391g.selectCurrentItem_=function(){g.items.forEach(function(l){l.selected(g.track_.activeCues[0]===l.cue)})};return g};$jscomp.inherits($b,Ia);$b.prototype.buildCSSClass=function(){return"vjs-chapters-button "+Ia.prototype.buildCSSClass.call(this)};$b.prototype.buildWrapperCSSClass=function(){return"vjs-chapters-button "+Ia.prototype.buildWrapperCSSClass.call(this)};$b.prototype.update=function(a){a&&a.track&&"chapters"!==a.track.kind|| 392(a=this.findChaptersTrack(),a!==this.track_?(this.setTrack(a),Ia.prototype.update.call(this)):(!this.items||a&&a.cues&&a.cues.length!==this.items.length)&&Ia.prototype.update.call(this))};$b.prototype.setTrack=function(a){if(this.track_!==a){this.updateHandler_||(this.updateHandler_=this.update.bind(this));if(this.track_){var c=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_);c&&c.removeEventListener("load",this.updateHandler_);this.track_.removeEventListener("cuechange",this.selectCurrentItem_); 393this.track_=null}if(this.track_=a)this.track_.mode="hidden",(a=this.player_.remoteTextTrackEls().getTrackElementByTrack_(this.track_))&&a.addEventListener("load",this.updateHandler_),this.track_.addEventListener("cuechange",this.selectCurrentItem_)}};
393$b.prototype.findChaptersTrack=function(){for(var a=this.player_.textTracks()||[],c=a.length-1;0<=c;c--){var e=a[c];if(e.kind===this.kind_)return e}};$b.prototype.getMenuCaption=function(){return this.track_&&this.track_.label?this.track_.label:this.localize(Za(this.kind_))}; 394$b.prototype.createMenu=function(){this.options_.title=this.getMenuCaption();return Ia.prototype.createMenu.call(this)};$b.prototype.createItems=function(){var a=[];if(!this.track_)return a;var c=this.track_.cues;if(!c)return a;for(var e=0,g=c.length;e<g;e++){var l=new Uf(this.player_,{track:this.track_,cue:c[e]});a.push(l)}return a};$b.prototype.kind_="chapters";$b.prototype.controlText_="Chapters";D.registerComponent("ChaptersButton",$b);var nd=function(a,c,e){c=Ia.call(this,a,c,e)||this;c.setIcon("audio-description"); 395var g=a.textTracks(),l=Ka(c,c.handleTracksChange);g.addEventListener("change",l);c.on("dispose",function(){g.removeEventListener("change",l)});return c};$jscomp.inherits(nd,Ia);nd.prototype.handleTracksChange=function(a){a=this.player().textTracks();for(var c=!1,e=0,g=a.length;e<g;e++){var l=a[e];if(l.kind!==this.kind_&&"showing"===l.mode){c=!0;break}}c?this.disable():this.enable()};nd.prototype.buildCSSClass=function(){return"vjs-descriptions-button "+Ia.prototype.buildCSSClass.call(this)};nd.prototype.buildWrapperCSSClass= 396function(){return"vjs-descriptions-button "+Ia.prototype.buildWrapperCSSClass.call(this)};nd.prototype.kind_="descriptions";nd.prototype.controlText_="Descriptions";D.registerComponent("DescriptionsButton",nd);var Vd=function(a,c,e){a=Ia.call(this,a,c,e)||this;a.setIcon("subtitles");return a};$jscomp.inherits(Vd,Ia);Vd.prototype.buildCSSClass=function(){return"vjs-subtitles-button "+Ia.prototype.buildCSSClass.call(this)};Vd.prototype.buildWrapperCSSClass=function(){return"vjs-subtitles-button "+Ia.prototype.buildWrapperCSSClass.call(this)}; 397Vd.prototype.kind_="subtitles";Vd.prototype.controlText_="Subtitles";D.registerComponent("SubtitlesButton",Vd);var Wd=function(a,c){c.track={player:a,kind:c.kind,label:c.kind+" settings",selectable:!1,default:!1,mode:"disabled"};c.selectable=!1;c.name="CaptionSettingsMenuItem";a=vb.call(this,a,c)||this;a.addClass("vjs-texttrack-settings");a.controlText(", opens "+c.kind+" settings dialog");return a};$jscomp.inherits(Wd,vb);Wd.prototype.handleClick=function(a){this.player().getChild("textTrackSettings").open()}; 398Wd.prototype.handleLanguagechange=function(){this.$(".vjs-menu-item-text").textContent=this.player_.localize(this.options_.kind+" settings");vb.prototype.handleLanguagechange.call(this)};D.registerComponent("CaptionSettingsMenuItem",Wd);var od=function(a,c,e){a=Ia.call(this,a,c,e)||this;a.setIcon("captions");return a};$jscomp.inherits(od,Ia);od.prototype.buildCSSClass=function(){return"vjs-captions-button "+Ia.prototype.buildCSSClass.call(this)};od.prototype.buildWrapperCSSClass=function(){return"vjs-captions-button "+ 399Ia.prototype.buildWrapperCSSClass.call(this)};od.prototype.createItems=function(){var a=[];this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(a.push(new Wd(this.player_,{kind:this.kind_})),this.hideThreshold_+=1);return Ia.prototype.createItems.call(this,a)};od.prototype.kind_="captions";od.prototype.controlText_="Captions";D.registerComponent("CaptionsButton",od);var Vf=function(){return vb.apply(this,arguments)||this};$jscomp.inherits(Vf, 400vb);Vf.prototype.createEl=function(a,c,e){a=vb.prototype.createEl.call(this,a,c,e);c=a.querySelector(".vjs-menu-item-text");"captions"===this.options_.track.kind&&(this.player_.options_.experimentalSvgIcons?this.setIcon("captions",a):c.appendChild(Q("span",{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),c.appendChild(Q("span",{className:"vjs-control-text",textContent:" "+this.localize("Captions")})));return a};D.registerComponent("SubsCapsMenuItem",Vf);var pd=function(a,c){c=void 0===c?{}: 401c;a=Ia.call(this,a,c)||this;a.label_="subtitles";a.setIcon("subtitles");-1<["en","en-us","en-ca","fr-ca"].indexOf(a.player_.language_)&&(a.label_="captions",a.setIcon("captions"));a.menuButton_.controlText(Za(a.label_));return a};$jscomp.inherits(pd,Ia);pd.prototype.buildCSSClass=function(){return"vjs-subs-caps-button "+Ia.prototype.buildCSSClass.call(this)};pd.prototype.buildWrapperCSSClass=function(){return"vjs-subs-caps-button "+Ia.prototype.buildWrapperCSSClass.call(this)};pd.prototype.createItems= 402function(){var a=[];this.player().tech_&&this.player().tech_.featuresNativeTextTracks||!this.player().getChild("textTrackSettings")||(a.push(new Wd(this.player_,{kind:this.label_})),this.hideThreshold_+=1);return a=Ia.prototype.createItems.call(this,a,Vf)};pd.prototype.kinds_=["captions","subtitles"];pd.prototype.controlText_="Subtitles";D.registerComponent("SubsCapsButton",pd);
402var Xd=function(a,c){var e=c.track,g=a.audioTracks();c.label=e.label||e.language||"Unknown";c.selected=e.enabled;var l=cb.call(this, 403a,c)||this;l.track=e;l.addClass("vjs-"+e.kind+"-menu-item");var b=function(d){for(var f=[],h=0;h<arguments.length;++h)f[h-0]=arguments[h];l.handleTracksChange.apply(l,f)};g.addEventListener("change",b);l.on("dispose",function(){g.removeEventListener("change",b)});return l};$jscomp.inherits(Xd,cb);Xd.prototype.createEl=function(a,c,e){a=cb.prototype.createEl.call(this,a,c,e);c=a.querySelector(".vjs-menu-item-text");0<=["main-desc","descriptions"].indexOf(this.options_.track.kind)&&(c.appendChild(Q("span", 404{className:"vjs-icon-placeholder"},{"aria-hidden":!0})),c.appendChild(Q("span",{className:"vjs-control-text",textContent:" "+this.localize("Descriptions")})));return a};Xd.prototype.handleClick=function(a){cb.prototype.handleClick.call(this,a);this.track.enabled=!0;if(this.player_.tech_.featuresNativeAudioTracks){a=this.player_.audioTracks();for(var c=0;c<a.length;c++){var e=a[c];e!==this.track&&(e.enabled=e===this.track)}}};Xd.prototype.handleTracksChange=function(a){this.selected(this.track.enabled)}; 405D.registerComponent("AudioTrackMenuItem",Xd);var Yd=function(a,c){c=void 0===c?{}:c;c.tracks=a.audioTracks();a=Tc.call(this,a,c)||this;a.setIcon("audio");return a};$jscomp.inherits(Yd,Tc);Yd.prototype.buildCSSClass=function(){return"vjs-audio-button "+Tc.prototype.buildCSSClass.call(this)};Yd.prototype.buildWrapperCSSClass=function(){return"vjs-audio-button "+Tc.prototype.buildWrapperCSSClass.call(this)};Yd.prototype.createItems=function(a){a=void 0===a?[]:a;this.hideThreshold_=1;for(var c=this.player_.audioTracks(), 406e=0;e<c.length;e++)a.push(new Xd(this.player_,{track:c[e],selectable:!0,multiSelectable:!1}));return a};Yd.prototype.controlText_="Audio Track";D.registerComponent("AudioTrackButton",Yd);var Zd=function(a,c){var e=c.rate,g=parseFloat(e,10);c.label=e;c.selected=g===a.playbackRate();c.selectable=!0;c.multiSelectable=!1;var l=cb.call(this,a,c)||this;l.label=e;l.rate=g;l.on(a,"ratechange",function(b){return l.update(b)});return l};$jscomp.inherits(Zd,cb);Zd.prototype.handleClick=function(a){cb.prototype.handleClick.call(this); 407this.player().playbackRate(this.rate)};Zd.prototype.update=function(a){this.selected(this.player().playbackRate()===this.rate)};Zd.prototype.contentElType="button";D.registerComponent("PlaybackRateMenuItem",Zd);var Sb=function(a,c){var e=xa.call(this,a,c)||this;e.menuButton_.el_.setAttribute("aria-describedby",e.labelElId_);e.updateVisibility();e.updateLabel();e.on(a,"loadstart",function(g){return e.updateVisibility(g)});e.on(a,"ratechange",function(g){return e.updateLabel(g)});e.on(a,"playbackrateschange", 408function(g){return e.handlePlaybackRateschange(g)});return e};$jscomp.inherits(Sb,xa);Sb.prototype.createEl=function(){var a=xa.prototype.createEl.call(this);this.labelElId_="vjs-playback-rate-value-label-"+this.id_;this.labelEl_=Q("div",{className:"vjs-playback-rate-value",id:this.labelElId_,textContent:"1x"});a.appendChild(this.labelEl_);return a};Sb.prototype.dispose=function(){this.labelEl_=null;xa.prototype.dispose.call(this)};Sb.prototype.buildCSSClass=function(){return"vjs-playback-rate "+ 409xa.prototype.buildCSSClass.call(this)};Sb.prototype.buildWrapperCSSClass=function(){return"vjs-playback-rate "+xa.prototype.buildWrapperCSSClass.call(this)};Sb.prototype.createItems=function(){for(var a=this.playbackRates(),c=[],e=a.length-1;0<=e;e--)c.push(new Zd(this.player(),{rate:a[e]+"x"}));return c};Sb.prototype.handlePlaybackRateschange=function(a){this.update()};Sb.prototype.playbackRates=function(){var a=this.player();return a.playbackRates&&a.playbackRates()||[]};Sb.prototype.playbackRateSupported= 410function(){return this.player().tech_&&this.player().tech_.featuresPlaybackRate&&this.playbackRates()&&0<this.playbackRates().length};Sb.prototype.updateVisibility=function(a){this.playbackRateSupported()?this.removeClass("vjs-hidden"):this.addClass("vjs-hidden")};Sb.prototype.updateLabel=function(a){this.playbackRateSupported()&&(this.labelEl_.textContent=this.player().playbackRate()+"x")};Sb.prototype.controlText_="Playback Rate";D.registerComponent("PlaybackRateMenuButton",Sb);var Uc=function(){return D.apply(this, 411arguments)||this};$jscomp.inherits(Uc,D);Uc.prototype.buildCSSClass=function(){return"vjs-spacer "+D.prototype.buildCSSClass.call(this)};Uc.prototype.createEl=function(a,c,e){a=void 0===a?"div":a;c=void 0===c?{}:c;e=void 0===e?{}:e;c.className||(c.className=this.buildCSSClass());return D.prototype.createEl.call(this,a,c,e)};D.registerComponent("Spacer",Uc);var Wf=function(){return Uc.apply(this,arguments)||this};$jscomp.inherits(Wf,Uc);Wf.prototype.buildCSSClass=function(){return"vjs-custom-control-spacer "+ 412Uc.prototype.buildCSSClass.call(this)};Wf.prototype.createEl=function(){return Uc.prototype.createEl.call(this,"div",{className:this.buildCSSClass(),textContent:"\u00a0"})};D.registerComponent("CustomControlSpacer",Wf);var Xf=function(){return D.apply(this,arguments)||this};$jscomp.inherits(Xf,D);Xf.prototype.createEl=function(){return D.prototype.createEl.call(this,"div",{className:"vjs-control-bar",dir:"ltr"})};Xf.prototype.options_={children:"playToggle skipBackward skipForward volumePanel currentTimeDisplay timeDivider durationDisplay progressControl liveDisplay seekToLive remainingTimeDisplay customControlSpacer playbackRateMenuButton chaptersButton descriptionsButton subsCapsButton audioTrackButton pictureInPictureToggle fullscreenToggle".split(" ")}; 413D.registerComponent("ControlBar",Xf);var Me=function(a,c){var e=Da.call(this,a,c)||this;e.on(a,"error",function(g){e.open(g)});return e};$jscomp.inherits(Me,Da);Me.prototype.buildCSSClass=function(){return"vjs-error-display "+Da.prototype.buildCSSClass.call(this)};Me.prototype.content=function(){var a=this.player().error();return a?this.localize(a.message):""};Me.prototype.options_=Object.assign({}
413,Da.prototype.options_,{pauseOnOpen:!1,fillAlways:!0,temporary:!1,uncloseable:!0});D.registerComponent("ErrorDisplay", 414Me);var Yf=function(a,c){c=void 0===c?{}:c;a=D.call(this,a,c)||this;a.el_.setAttribute("aria-labelledby",a.selectLabelledbyIds);return a};$jscomp.inherits(Yf,D);Yf.prototype.createEl=function(){var a=this;this.selectLabelledbyIds=[this.options_.legendId,this.options_.labelId].join(" ").trim();return Q("select",{id:this.options_.id},{},this.options_.SelectOptions.map(function(c){var e=(a.options_.labelId?a.options_.labelId:"vjs-track-option-"+Vb++)+"-"+c[1].replace(/\W+/g,"");c=Q("option",{id:e,value:a.localize(c[0]), 415textContent:a.localize(c[1])});c.setAttribute("aria-labelledby",a.selectLabelledbyIds+" "+e);return c}))};D.registerComponent("TextTrackSelect",Yf);var Hc=function(a,c){c=void 0===c?{}:c;c=D.call(this,a,c)||this;var e=Q("legend",{textContent:c.localize(c.options_.legendText),id:c.options_.legendId});c.el().appendChild(e);e=$jscomp.makeIterator(c.options_.selects);for(var g=e.next();!g.done;g=e.next()){var l=c.options_.selectConfigs[g.value],b=l.className,d=l.id.replace("%s",c.options_.id_);g=null; 416var f="vjs_select_"+Vb++;"colors"===c.options_.type&&(g=Q("span",{className:b}),b=Q("label",{id:d,className:"vjs-label",textContent:c.localize(l.label)}),b.setAttribute("for",f),g.appendChild(b));l=new Yf(a,{SelectOptions:l.options,legendId:c.options_.legendId,id:f,labelId:d});c.addChild(l);"colors"===c.options_.type&&(g.appendChild(l.el()),c.el().appendChild(g))}return c};$jscomp.inherits(Hc,D);Hc.prototype.createEl=function(){return Q("fieldset",{className:this.options_.className})};D.registerComponent("TextTrackFieldset", 417Hc);var Zf=function(a,c){c=void 0===c?{}:c;c=D.call(this,a,c)||this;var e=c.options_.textTrackComponentid,g=new Hc(a,{id_:e,legendId:"captions-text-legend-"+e,legendText:c.localize("Text"),className:"vjs-fg vjs-track-setting",selects:c.options_.fieldSets[0],selectConfigs:c.options_.selectConfigs,type:"colors"});c.addChild(g);g=new Hc(a,{id_:e,legendId:"captions-background-"+e,legendText:c.localize("Text Background"),className:"vjs-bg vjs-track-setting",selects:c.options_.fieldSets[1],selectConfigs:c.options_.selectConfigs, 418type:"colors"});c.addChild(g);a=new Hc(a,{id_:e,legendId:"captions-window-"+e,legendText:c.localize("Caption Area Background"),className:"vjs-window vjs-track-setting",selects:c.options_.fieldSets[2],selectConfigs:c.options_.selectConfigs,type:"colors"});c.addChild(a);return c};$jscomp.inherits(Zf,D);Zf.prototype.createEl=function(){return Q("div",{className:"vjs-track-settings-colors"})};D.registerComponent("TextTrackSettingsColors",Zf);var $f=function(a,c){c=void 0===c?{}:c;c=D.call(this,a,c)|| 419this;var e=c.options_.textTrackComponentid,g=new Hc(a,{id_:e,legendId:"captions-font-size-"+e,legendText:"Font Size",className:"vjs-font-percent vjs-track-setting",selects:c.options_.fieldSets[0],selectConfigs:c.options_.selectConfigs,type:"font"});c.addChild(g);g=new Hc(a,{id_:e,legendId:"captions-edge-style-"+e,legendText:c.localize("Text Edge Style"),className:"vjs-edge-style vjs-track-setting",selects:c.options_.fieldSets[1],selectConfigs:c.options_.selectConfigs,type:"font"});c.addChild(g);a= 420new Hc(a,{id_:e,legendId:"captions-font-family-"+e,legendText:c.localize("Font Family"),className:"vjs-font-family vjs-track-setting",selects:c.options_.fieldSets[2],selectConfigs:c.options_.selectConfigs,type:"font"});c.addChild(a);return c};$jscomp.inherits($f,D);$f.prototype.createEl=function(){return Q("div",{className:"vjs-track-settings-font"})};D.registerComponent("TextTrackSettingsFont",$f);var ag=function(a,c){c=void 0===c?{}:c;c=D.call(this,a,c)||this;var e=c.localize("restore all settings to the default values"), 421g=new ma(a,{controlText:e,className:"vjs-default-button"});g.el().classList.remove("vjs-control","vjs-button");g.el().textContent=c.localize("Reset");c.addChild(g);a=new ma(a,{controlText:e,className:"vjs-done-button"});a.el().classList.remove("vjs-control","vjs-button");a.el().textContent=c.localize("Done");c.addChild(a);return c};$jscomp.inherits(ag,D);ag.prototype.createEl=function(){return Q("div",{className:"vjs-track-settings-controls"})};
421D.registerComponent("TrackSettingsControls",ag);var lk= 422["#000","Black"],mk=["#00F","Blue"],nk=["#0FF","Cyan"],ok=["#0F0","Green"],pk=["#F0F","Magenta"],qk=["#F00","Red"],rk=["#FFF","White"],sk=["#FF0","Yellow"],Ah=["1","Opaque"],Bh=["0.5","Semi-Transparent"],tk=["0","Transparent"],Vc={backgroundColor:{selector:".vjs-bg-color \x3e select",id:"captions-background-color-%s",label:"Color",options:[lk,rk,qk,ok,mk,sk,pk,nk],className:"vjs-bg-color"},backgroundOpacity:{selector:".vjs-bg-opacity \x3e select",id:"captions-background-opacity-%s",label:"Opacity", 423options:[Ah,Bh,tk],className:"vjs-bg-opacity vjs-opacity"},color:{selector:".vjs-text-color \x3e select",id:"captions-foreground-color-%s",label:"Color",options:[rk,lk,qk,ok,mk,sk,pk,nk],className:"vjs-text-color"},edgeStyle:{selector:".vjs-edge-style \x3e select",id:"",label:"Text Edge Style",options:[["none","None"],["raised","Raised"],["depressed","Depressed"],["uniform","Uniform"],["dropshadow","Drop shadow"]]},fontFamily:{selector:".vjs-font-family \x3e select",id:"",label:"Font Family",options:[["proportionalSansSerif", 424"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 \x3e 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:function(a){return"1.00"===a?null: 425Number(a)}},textOpacity:{selector:".vjs-text-opacity \x3e select",id:"captions-foreground-opacity-%s",label:"Opacity",options:[Ah,Bh],className:"vjs-text-opacity vjs-opacity"},windowColor:{selector:".vjs-window-color \x3e select",id:"captions-window-color-%s",label:"Color",className:"vjs-window-color"},windowOpacity:{selector:".vjs-window-opacity \x3e select",id:"captions-window-opacity-%s",label:"Opacity",options:[tk,Bh,Ah],className:"vjs-window-opacity vjs-opacity"}};Vc.windowColor.options=Vc.backgroundColor.options; 426var Eb=function(a,c){c.temporary=!1;var e=Da.call(this,a,c)||this;e.updateDisplay=e.updateDisplay.bind(e);e.fill();e.hasBeenOpened_=e.hasBeenFilled_=!0;e.renderModalComponents(a);e.endDialog=Q("p",{className:"vjs-control-text",textContent:e.localize("End of dialog window.")});e.el().appendChild(e.endDialog);e.setDefaults();void 0===c.persistTextTrackSettings&&(e.options_.persistTextTrackSettings=e.options_.playerOptions.persistTextTrackSettings);e.bindFunctionsToSelectsAndButtons();e.options_.persistTextTrackSettings&& 427e.restoreSettings();return e};$jscomp.inherits(Eb,Da);Eb.prototype.renderModalComponents=function(a){var c=new Zf(a,{textTrackComponentid:this.id_,selectConfigs:Vc,fieldSets:[["color","textOpacity"],["backgroundColor","backgroundOpacity"],["windowColor","windowOpacity"]]});this.addChild(c);c=new $f(a,{textTrackComponentid:this.id_,selectConfigs:Vc,fieldSets:[["fontPercent"],["edgeStyle"],["fontFamily"]]});this.addChild(c);a=new ag(a);this.addChild(a)};Eb.prototype.bindFunctionsToSelectsAndButtons= 428function(){var a=this;this.on(this.$(".vjs-done-button"),["click","tap"],function(){a.saveSettings();a.close()});this.on(this.$(".vjs-default-button"),["click","tap"],function(){a.setDefaults();a.updateDisplay()});C(Vc,function(c){a.on(a.$(c.selector),"change",a.updateDisplay)})};Eb.prototype.dispose=function(){this.endDialog=null;Da.prototype.dispose.call(this)};Eb.prototype.label=function(){return this.localize("Caption Settings Dialog")};Eb.prototype.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")}; 429Eb.prototype.buildCSSClass=function(){return Da.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"};Eb.prototype.getValues=function(){var a=this;return K(Vc,function(c,e,g){var l=a.$(e.selector);e=dj(l.options[l.options.selectedIndex].value,e.parser);void 0!==e&&(c[g]=e);return c},{})};Eb.prototype.setValues=function(a){var c=this;C(Vc,function(e,g){var l=c.$(e.selector);g=a[g];e=e.parser;if(g)for(var b=0;b<l.options.length;b++)if(dj(l.options[b].value,e)===g){l.selectedIndex=b;break}})}; 430Eb.prototype.setDefaults=function(){var a=this;C(Vc,function(c){var e=c.hasOwnProperty("default")?c.default:0;a.$(c.selector).selectedIndex=e})};Eb.prototype.restoreSettings=function(){try{var a=JSON.parse(window.localStorage.getItem("vjs-text-track-settings"))}catch(c){sa.warn(c)}a&&this.setValues(a)};Eb.prototype.saveSettings=function(){if(this.options_.persistTextTrackSettings){var a=this.getValues();try{Object.keys(a).length?window.localStorage.setItem("vjs-text-track-settings",JSON.stringify(a)): 431window.localStorage.removeItem("vjs-text-track-settings")}catch(c){sa.warn(c)}}};Eb.prototype.updateDisplay=function(){var a=this.player_.getChild("textTrackDisplay");a&&a.updateDisplay()};Eb.prototype.handleLanguagechange=function(){this.fill();this.renderModalComponents(this.player_);this.bindFunctionsToSelectsAndButtons()};D.registerComponent("TextTrackSettings",Eb);var Ne=function(a,c){var e=c.ResizeObserver||window.ResizeObserver;null===c.ResizeObserver&&(e=!1);var g=B({createEl:!e,reportTouchActivity:!1}, 432c);
432var l=D.call(this,a,g)||this;l.ResizeObserver=c.ResizeObserver||window.ResizeObserver;l.loadListener_=null;l.resizeObserver_=null;l.debouncedHandler_=Vj(function(){l.resizeHandler()},100,!1,l);e?(l.resizeObserver_=new l.ResizeObserver(l.debouncedHandler_),l.resizeObserver_.observe(a.el())):(l.loadListener_=function(){if(l.el_&&l.el_.contentWindow){var b=l.debouncedHandler_,d=l.unloadListener_=function(){tb(this,"resize",b);tb(this,"unload",d);d=null};Qb(l.el_.contentWindow,"unload",d);Qb(l.el_.contentWindow, 433"resize",b)}},l.one("load",l.loadListener_));return l};$jscomp.inherits(Ne,D);Ne.prototype.createEl=function(){return D.prototype.createEl.call(this,"iframe",{className:"vjs-resize-manager",tabIndex:-1,title:this.localize("No content")},{"aria-hidden":"true"})};Ne.prototype.resizeHandler=function(){this.player_&&this.player_.trigger&&this.player_.trigger("playerresize")};Ne.prototype.dispose=function(){this.debouncedHandler_&&this.debouncedHandler_.cancel();this.resizeObserver_&&(this.player_.el()&& 434this.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.loadListener_=this.debouncedHandler_=this.resizeObserver=this.ResizeObserver=null;D.prototype.dispose.call(this)};D.registerComponent("ResizeManager",Ne);var Zn={trackingThreshold:20,liveTolerance:15},Va=function(a,c){c=B(Zn,c,{createEl:!1});var e=D.call(this, 435a,c)||this;e.trackLiveHandler_=function(){return e.trackLive_()};e.handlePlay_=function(g){return e.handlePlay(g)};e.handleFirstTimeupdate_=function(g){return e.handleFirstTimeupdate(g)};e.handleSeeked_=function(g){return e.handleSeeked(g)};e.seekToLiveEdge_=function(g){return e.seekToLiveEdge(g)};e.reset_();e.on(e.player_,"durationchange",function(g){return e.handleDurationchange(g)});e.on(e.player_,"canplay",function(){return e.toggleTracking()});return e};$jscomp.inherits(Va,D);Va.prototype.trackLive_= 436function(){var a=this.player_.seekable();if(a&&a.length){a=Number(window.performance.now().toFixed(4));var c=-1===this.lastTime_?0:(a-this.lastTime_)/1E3;this.lastTime_=a;this.pastSeekEnd_=this.pastSeekEnd()+c;a=this.liveCurrentTime();c=this.player_.currentTime();c=this.player_.paused()||this.seekedBehindLive_||Math.abs(a-c)>this.options_.liveTolerance;this.timeupdateSeen_&&Infinity!==a||(c=!1);c!==this.behindLiveEdge_&&(this.behindLiveEdge_=c,this.trigger("liveedgechange"))}};Va.prototype.handleDurationchange= 437function(){this.toggleTracking()};Va.prototype.toggleTracking=function(){Infinity===this.player_.duration()&&this.liveWindow()>=this.options_.trackingThreshold?(this.player_.options_.liveui&&this.player_.addClass("vjs-liveui"),this.startTracking()):(this.player_.removeClass("vjs-liveui"),this.stopTracking())};Va.prototype.startTracking=function(){if(!this.isTracking())if(this.timeupdateSeen_||(this.timeupdateSeen_=this.player_.hasStarted()),this.trackingInterval_=this.setInterval(this.trackLiveHandler_, 43830),this.trackLive_(),this.on(this.player_,["play","pause"],this.trackLiveHandler_),this.timeupdateSeen_)this.on(this.player_,"seeked",this.handleSeeked_);else this.one(this.player_,"play",this.handlePlay_),this.one(this.player_,"timeupdate",this.handleFirstTimeupdate_)};Va.prototype.handleFirstTimeupdate=function(){this.timeupdateSeen_=!0;this.on(this.player_,"seeked",this.handleSeeked_)};Va.prototype.handleSeeked=function(){var a=Math.abs(this.liveCurrentTime()-this.player_.currentTime());this.seekedBehindLive_= 439this.nextSeekedFromUser_&&2<a;this.nextSeekedFromUser_=!1;this.trackLive_()};Va.prototype.handlePlay=function(){this.one(this.player_,"timeupdate",this.seekToLiveEdge_)};Va.prototype.reset_=function(){this.lastTime_=-1;this.pastSeekEnd_=0;this.lastSeekEnd_=-1;this.behindLiveEdge_=!0;this.nextSeekedFromUser_=this.seekedBehindLive_=this.timeupdateSeen_=!1;this.clearInterval(this.trackingInterval_);this.trackingInterval_=null;this.off(this.player_,["play","pause"],this.trackLiveHandler_);this.off(this.player_, 440"seeked",this.handleSeeked_);this.off(this.player_,"play",this.handlePlay_);this.off(this.player_,"timeupdate",this.handleFirstTimeupdate_);this.off(this.player_,"timeupdate",this.seekToLiveEdge_)};Va.prototype.nextSeekedFromUser=function(){this.nextSeekedFromUser_=!0};Va.prototype.stopTracking=function(){this.isTracking()&&(this.reset_(),this.trigger("liveedgechange"))};Va.prototype.seekableEnd=function(){for(var a=this.player_.seekable(),c=[],e=a?a.length:0;e--;)c.push(a.end(e));return c.length?
441c.sort()[c.length-1]:Infinity};Va.prototype.seekableStart=function(){for(var a=this.player_.seekable(),c=[],e=a?a.length:0;e--;)c.push(a.start(e));return c.length?c.sort()[0]:0};Va.prototype.liveWindow=function(){var a=this.liveCurrentTime();return Infinity===a?0:a-this.seekableStart()};Va.prototype.isLive=function(){return this.isTracking()};Va.prototype.atLiveEdge=function(){return!this.behindLiveEdge()};Va.prototype.liveCurrentTime=function(){return this.pastSeekEnd()+this.seekableEnd()};Va.prototype.pastSeekEnd= 442function(){var a=this.seekableEnd();-1!==this.lastSeekEnd_&&a!==this.lastSeekEnd_&&(this.pastSeekEnd_=0);this.lastSeekEnd_=a;return this.pastSeekEnd_};Va.prototype.behindLiveEdge=function(){return this.behindLiveEdge_};Va.prototype.isTracking=function(){return"number"===typeof this.trackingInterval_};Va.prototype.seekToLiveEdge=function(){this.seekedBehindLive_=!1;this.atLiveEdge()||(this.nextSeekedFromUser_=!1,this.player_.currentTime(this.liveCurrentTime()))};Va.prototype.dispose=function(){this.stopTracking(); 443D.prototype.dispose.call(this)};D.registerComponent("LiveTracker",Va);var $d=function(a,c){var e=D.call(this,a,c)||this;e.on("statechanged",function(g){return e.updateDom_()});e.updateDom_();return e};$jscomp.inherits($d,D);$d.prototype.createEl=function(){this.els={title:Q("div",{className:"vjs-title-bar-title",id:"vjs-title-bar-title-"+Vb++}),description:Q("div",{className:"vjs-title-bar-description",id:"vjs-title-bar-description-"+Vb++})};return Q("div",{className:"vjs-title-bar"},{},da(this.els))}; 444$d.prototype.updateDom_=function(){var a=this,c=this.player_.tech_,e=c&&c.el_,g={title:"aria-labelledby",description:"aria-describedby"};["title","description"].forEach(function(l){var b=a.state[l],d=a.els[l];l=g[l];kf(d);b&&la(d,b);e&&(e.removeAttribute(l),b&&e.setAttribute(l,d.id))});this.state.title||this.state.description?this.show():this.hide()};$d.prototype.update=function(a){this.setState(a)};$d.prototype.dispose=function(){var a=this.player_.tech_;if(a=a&&a.el_)a.removeAttribute("aria-labelledby"), 445a.removeAttribute("aria-describedby");D.prototype.dispose.call(this);this.els=null};D.registerComponent("TitleBar",$d);var $n={initialDisplay:4E3,position:[],takeFocus:!1},qd=function(a,c){c=B($n,c);var e=ma.call(this,a,c)||this;e.controlText(c.controlText);e.hide();e.on(e.player_,["useractive","userinactive"],function(g){e.removeClass("force-display")});return e};$jscomp.inherits(qd,ma);qd.prototype.buildCSSClass=function(){return"vjs-transient-button focus-visible "+this.options_.position.map(function(a){return"vjs-"+ 446a}).join(" ")};qd.prototype.createEl=function(){var a=Q("button",{},{type:"button",class:this.buildCSSClass()},Q("span"));this.controlTextEl_=a.querySelector("span");return a};qd.prototype.show=function(){var a=this;ma.prototype.show.call(this);this.addClass("force-display");this.options_.takeFocus&&this.el().focus({preventScroll:!0});this.forceDisplayTimeout=this.player_.setTimeout(function(){a.removeClass("force-display")},this.options_.initialDisplay)};qd.prototype.hide=function(){this.removeClass("force-display"); 447ma.prototype.hide.call(this)};qd.prototype.dispose=function(){this.player_.clearTimeout(this.forceDisplayTimeout);ma.prototype.dispose.call(this)};D.registerComponent("TransientButton",qd);var Ch=function(a){var c=a.el();if(c.hasAttribute("src"))return a.triggerSourceset(c.src),!0;c=a.$$("source");var e=[],g="";if(!c.length)return!1;for(var l=0;l<c.length;l++){var b=c[l].src;b&&-1===e.indexOf(b)&&e.push(b)}if(!e.length)return!1;1===e.length&&(g=e[0]);a.triggerSourceset(g);return!0},ao=Object.defineProperty({}, 448"innerHTML",{get:function(){return this.cloneNode(!0).innerHTML},set:function(a){var c=document.createElement(this.nodeName.toLowerCase());c.innerHTML=a;for(a=document.createDocumentFragment();c.childNodes.length;)a.appendChild(c.childNodes[0]);this.innerText="";window.Element.prototype.appendChild.call(this,a);return this.innerHTML}}),uk=function(a,c){for(var e={},g=0;g<a.length&&!((e=Object.getOwnPropertyDescriptor(a[g],c))&&e.set&&e.get);g++);e.enumerable=!0;e.configurable=!0;return e},vk=function(a){var c= 449a.el();if(!c.resetSourceWatch_){var e={},g=uk([a.el(),window.HTMLMediaElement.prototype,window.Element.prototype,ao],"innerHTML"),l=function(b){return function(d){for(var f=[],h=0;h<arguments.length;++h)f[h-0]=arguments[h];f=b.apply(c,f);Ch(a);return f}};["append","appendChild","insertAdjacentHTML"].forEach(function(b){c[b]&&(e[b]=c[b],c[b]=l(e[b]))});Object.defineProperty(c,"innerHTML",B(g,{set:l(g.set)}));c.resetSourceWatch_=function(){c.resetSourceWatch_=null;Object.keys(e).forEach(function(b){c[b]= 450e[b]});Object.defineProperty(c,"innerHTML",g)};a.one("sourceset",c.resetSourceWatch_)}},bo=Object.defineProperty({},"src",{get:function(){return this.hasAttribute("src")?bk(window.Element.prototype.getAttribute.call(this,"src")):""},set:function(a){window.Element.prototype.setAttribute.call(this,"src",a);return a}}
450),co=function(a){if(a.featuresSourceset){var c=a.el();if(!c.resetSourceset_){var e=uk([a.el(),window.HTMLMediaElement.prototype,bo],"src"),g=c.setAttribute,l=c.load;Object.defineProperty(c, 451"src",B(e,{set:function(b){b=e.set.call(c,b);a.triggerSourceset(c.src);return b}}));c.setAttribute=function(b,d){d=g.call(c,b,d);/src/i.test(b)&&a.triggerSourceset(c.src);return d};c.load=function(){var b=l.call(c);Ch(a)||(a.triggerSourceset(""),vk(a));return b};c.currentSrc?a.triggerSourceset(c.currentSrc):Ch(a)||vk(a);c.resetSourceset_=function(){c.resetSourceset_=null;c.load=l;c.setAttribute=g;Object.defineProperty(c,"src",e);c.resetSourceWatch_&&c.resetSourceWatch_()}}}},V=function(a,c){c=W.call(this, 452a,c)||this;var e=a.source,g=!1;c.featuresVideoFrameCallback=c.featuresVideoFrameCallback&&"VIDEO"===c.el_.tagName;e&&(c.el_.currentSrc!==e.src||a.tag&&3===a.tag.initNetworkState_)?c.setSource(e):c.handleLateInit_(c.el_);a.enableSourceset&&c.setupSourcesetHandling_();c.isScrubbing_=!1;if(c.el_.hasChildNodes()){var l=c.el_.childNodes,b=l.length;for(e=[];b--;){var d=l[b];"track"===d.nodeName.toLowerCase()&&(c.featuresNativeTextTracks?(c.remoteTextTrackEls().addTrackElement_(d),c.remoteTextTracks().addTrack(d.track), 453c.textTracks().addTrack(d.track),g||c.el_.hasAttribute("crossorigin")||!Sf(d.src)||(g=!0)):e.push(d))}for(l=0;l<e.length;l++)c.el_.removeChild(e[l])}c.proxyNativeTracks_();c.featuresNativeTextTracks&&g&&sa.warn("Text Tracks are being loaded from another origin but the crossorigin attribute isn't used.\nThis may prevent text tracks from loading.");c.restoreMetadataTracksInIOSNativePlayer_();(Ae||Hf)&&!0===a.nativeControlsForTouch&&c.setControls(!0);c.proxyWebkitFullscreen_();c.triggerReady();return c}; 454$jscomp.inherits(V,W);V.prototype.dispose=function(){this.el_&&this.el_.resetSourceset_&&this.el_.resetSourceset_();V.disposeMediaElement(this.el_);this.options_=null;W.prototype.dispose.call(this)};V.prototype.setupSourcesetHandling_=function(){co(this)};V.prototype.restoreMetadataTracksInIOSNativePlayer_=function(){var a=this.textTracks(),c,e=function(){c=[];for(var l=0;l<a.length;l++){var b=a[l];"metadata"===b.kind&&c.push({track:b,storedMode:b.mode})}};e();a.addEventListener("change",e);this.on("dispose", 455function(){return a.removeEventListener("change",e)});var g=function(){for(var l=0;l<c.length;l++){var b=c[l];"disabled"===b.track.mode&&b.track.mode!==b.storedMode&&(b.track.mode=b.storedMode)}a.removeEventListener("change",g)};this.on("webkitbeginfullscreen",function(){a.removeEventListener("change",e);a.removeEventListener("change",g);a.addEventListener("change",g)});this.on("webkitendfullscreen",function(){a.removeEventListener("change",e);a.addEventListener("change",e);a.removeEventListener("change", 456g)})};V.prototype.overrideNative_=function(a,c){var e=this;if(c===this["featuresNative"+a+"Tracks"]){var g=a.toLowerCase();this[g+"TracksListeners_"]&&Object.keys(this[g+"TracksListeners_"]).forEach(function(l){e.el()[g+"Tracks"].removeEventListener(l,e[g+"TracksListeners_"][l])});this["featuresNative"+a+"Tracks"]=!c;this[g+"TracksListeners_"]=null;this.proxyNativeTracksForType_(g)}};V.prototype.overrideNativeAudioTracks=function(a){this.overrideNative_("Audio",a)};V.prototype.overrideNativeVideoTracks= 457function(a){this.overrideNative_("Video",a)};V.prototype.proxyNativeTracksForType_=function(a){var c=this,e=Xb[a],g=this.el()[e.getterName],l=this[e.getterName]();if(this["featuresNative"+e.capitalName+"Tracks"]&&g&&g.addEventListener){var b={change:function(f){f={type:"change",target:l,currentTarget:l,srcElement:l};l.trigger(f);"text"===a&&c[Ld.remoteText.getterName]().trigger(f)},addtrack:function(f){l.addTrack(f.track)},removetrack:function(f){l.removeTrack(f.track)}},d=function(){for(var f=[], 458h=0;h<l.length;h++){for(var m=!1,p=0;p<g.length;p++)if(g[p]===l[h]){m=!0;break}m||f.push(l[h])}for(;f.length;)l.removeTrack(f.shift())};this[e.getterName+"Listeners_"]=b;Object.keys(b).forEach(function(f){var h=b[f];g.addEventListener(f,h);c.on("dispose",function(m){return g.removeEventListener(f,h)})});this.on("loadstart",d);this.on("dispose",function(f){return c.off("loadstart",d)})}};V.prototype.proxyNativeTracks_=function(){var a=this;
458Xb.names.forEach(function(c){a.proxyNativeTracksForType_(c)})}; 459V.prototype.createEl=function(){var a=this.options_.tag;if(!a||!this.options_.playerElIngest&&!this.movingMediaElementInDOM){if(a){var c=a.cloneNode(!0);a.parentNode&&a.parentNode.insertBefore(c,a);V.disposeMediaElement(a);a=c}else a=document.createElement("video"),c=this.options_.tag&&Nc(this.options_.tag),c=B({},c),Ae&&!0===this.options_.nativeControlsForTouch||delete c.controls,Fi(a,Object.assign(c,{id:this.options_.techId,class:"vjs-tech"}));a.playerId=this.options_.playerId}"undefined"!==typeof this.options_.preload&& 460a.setAttribute("preload",this.options_.preload);void 0!==this.options_.disablePictureInPicture&&(a.disablePictureInPicture=this.options_.disablePictureInPicture);c=["loop","muted","playsinline","autoplay"];for(var e=0;e<c.length;e++){var g=c[e],l=this.options_[g];"undefined"!==typeof l&&(l?a.setAttribute(g,g):a.removeAttribute(g),a[g]=l)}return a};V.prototype.handleLateInit_=function(a){if(0!==a.networkState&&3!==a.networkState)if(0===a.readyState){var c=!1,e=function(){c=!0};this.on("loadstart", 461e);var g=function(){c||this.trigger("loadstart")};this.on("loadedmetadata",g);this.ready(function(){this.off("loadstart",e);this.off("loadedmetadata",g);c||this.trigger("loadstart")})}else{var l=["loadstart"];l.push("loadedmetadata");2<=a.readyState&&l.push("loadeddata");3<=a.readyState&&l.push("canplay");4<=a.readyState&&l.push("canplaythrough");this.ready(function(){l.forEach(function(b){this.trigger(b)},this)})}};V.prototype.setScrubbing=function(a){this.isScrubbing_=a};V.prototype.scrubbing=function(){return this.isScrubbing_}; 462V.prototype.setCurrentTime=function(a){try{this.isScrubbing_&&this.el_.fastSeek&&Lf?this.el_.fastSeek(a):this.el_.currentTime=a}catch(c){sa(c,"Video is not ready. (Video.js)")}};V.prototype.duration=function(){var a=this;if(Infinity===this.el_.duration&&nc&&oc&&0===this.el_.currentTime){var c=function(){0<a.el_.currentTime&&(Infinity===a.el_.duration&&a.trigger("durationchange"),a.off("timeupdate",c))};this.on("timeupdate",c);return NaN}return this.el_.duration||NaN};V.prototype.width=function(){return this.el_.offsetWidth}; 463V.prototype.height=function(){return this.el_.offsetHeight};V.prototype.proxyWebkitFullscreen_=function(){var a=this;if("webkitDisplayingFullscreen"in this.el_){var c=function(){this.trigger("fullscreenchange",{isFullscreen:!1});this.el_.controls&&!this.options_.nativeControlsForTouch&&this.controls()&&(this.el_.controls=!1)},e=function(){"webkitPresentationMode"in this.el_&&"picture-in-picture"!==this.el_.webkitPresentationMode&&(this.one("webkitendfullscreen",c),this.trigger("fullscreenchange", 464{isFullscreen:!0,nativeIOSFullscreen:!0}))};this.on("webkitbeginfullscreen",e);this.on("dispose",function(){a.off("webkitbeginfullscreen",e);a.off("webkitendfullscreen",c)})}};V.prototype.supportsFullScreen=function(){return"function"===typeof this.el_.webkitEnterFullScreen};V.prototype.enterFullScreen=function(){var a=this.el_;if(a.paused&&a.networkState<=a.HAVE_METADATA)jc(this.el_.play()),this.setTimeout(function(){a.pause();try{a.webkitEnterFullScreen()}catch(c){this.trigger("fullscreenerror", 465c)}},0);else try{a.webkitEnterFullScreen()}catch(c){this.trigger("fullscreenerror",c)}};V.prototype.exitFullScreen=function(){this.el_.webkitDisplayingFullscreen?this.el_.webkitExitFullScreen():this.trigger("fullscreenerror",Error("The video is not fullscreen"))};V.prototype.requestPictureInPicture=function(){return this.el_.requestPictureInPicture()};V.prototype.requestVideoFrameCallback=function(a){return this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.requestVideoFrameCallback(a): 466W.prototype.requestVideoFrameCallback.call(this,a)};V.prototype.cancelVideoFrameCallback=function(a){this.featuresVideoFrameCallback&&!this.el_.webkitKeys?this.el_.cancelVideoFrameCallback(a):W.prototype.cancelVideoFrameCallback.call(this,a)};V.prototype.src=function(a){if(void 0===a)return this.el_.src;this.setSrc(a)};V.prototype.addSourceElement=function(a,c){if(!a)return sa.error("Invalid source URL."),!1;a={src:a};c&&(a.type=c);c=Q("source",{},a);this.el_.appendChild(c);return!0};V.prototype.removeSourceElement=
467function(a){if(!a)return sa.error("Source URL is required to remove the source element."),!1;var c=this.el_.querySelectorAll("source");c=$jscomp.makeIterator(c);for(var e=c.next();!e.done;e=c.next())if(e=e.value,e.src===a)return this.el_.removeChild(e),!0;sa.warn("No matching source element found with src: "+a);return!1};V.prototype.reset=function(){V.resetMediaElement(this.el_)};V.prototype.currentSrc=function(){return this.currentSource_?this.currentSource_.src:this.el_.currentSrc};V.prototype.setControls= 468function(a){this.el_.controls=!!a};V.prototype.addTextTrack=function(a,c,e){return this.featuresNativeTextTracks?this.el_.addTextTrack(a,c,e):W.prototype.addTextTrack.call(this,a,c,e)};V.prototype.createRemoteTextTrack=function(a){if(!this.featuresNativeTextTracks)return W.prototype.createRemoteTextTrack.call(this,a);var c=document.createElement("track");a.kind&&(c.kind=a.kind);a.label&&(c.label=a.label);if(a.language||a.srclang)c.srclang=a.language||a.srclang;a.default&&(c.default=a.default);a.id&& 469(c.id=a.id);a.src&&(c.src=a.src);return c};V.prototype.addRemoteTextTrack=function(a,c){a=W.prototype.addRemoteTextTrack.call(this,a,c);this.featuresNativeTextTracks&&this.el().appendChild(a);return a};V.prototype.removeRemoteTextTrack=function(a){W.prototype.removeRemoteTextTrack.call(this,a);if(this.featuresNativeTextTracks)for(var c=this.$$("track"),e=c.length;e--;)a!==c[e]&&a!==c[e].track||this.el().removeChild(c[e])};V.prototype.getVideoPlaybackQuality=function(){if("function"===typeof this.el().getVideoPlaybackQuality)return this.el().getVideoPlaybackQuality(); 470var a={};"undefined"!==typeof this.el().webkitDroppedFrameCount&&"undefined"!==typeof this.el().webkitDecodedFrameCount&&(a.droppedVideoFrames=this.el().webkitDroppedFrameCount,a.totalVideoFrames=this.el().webkitDecodedFrameCount);window.performance&&(a.creationTime=window.performance.now());return a};pa(V,"TEST_VID",function(){if(va()){var a=document.createElement("video"),c=document.createElement("track");c.kind="captions";c.srclang="en";c.label="English";a.appendChild(c);return a}});V.isSupported= 471function(){try{V.TEST_VID.volume=.5}catch(a){return!1}return!(!V.TEST_VID||!V.TEST_VID.canPlayType)};V.canPlayType=function(a){return V.TEST_VID.canPlayType(a)};V.canPlaySource=function(a,c){return V.canPlayType(a.type)};V.canControlVolume=function(){try{var a=V.TEST_VID.volume;V.TEST_VID.volume=a/2+.1;var c=a!==V.TEST_VID.volume;return c&&yb?(window.setTimeout(function(){V&&V.prototype&&(V.prototype.featuresVolumeControl=a!==V.TEST_VID.volume)}),!1):c}catch(e){return!1}};V.canMuteVolume=function(){try{var a= 472V.TEST_VID.muted;V.TEST_VID.muted=!a;V.TEST_VID.muted?V.TEST_VID.setAttribute("muted","muted"):V.TEST_VID.removeAttribute("muted");return a!==V.TEST_VID.muted}catch(c){return!1}};V.canControlPlaybackRate=function(){if(nc&&oc&&58>Df)return!1;try{var a=V.TEST_VID.playbackRate;V.TEST_VID.playbackRate=a/2+.1;return a!==V.TEST_VID.playbackRate}catch(c){return!1}};V.canOverrideAttributes=function(){try{var a=function(){};Object.defineProperty(document.createElement("video"),"src",{get:a,set:a});Object.defineProperty(document.createElement("audio"), 473"src",{get:a,set:a});Object.defineProperty(document.createElement("video"),"innerHTML",{get:a,set:a});Object.defineProperty(document.createElement("audio"),"innerHTML",{get:a,set:a})}catch(c){return!1}return!0};V.supportsNativeTextTracks=function(){return Lf||yb&&oc};V.supportsNativeVideoTracks=function(){return!(!V.TEST_VID||!V.TEST_VID.videoTracks)};V.supportsNativeAudioTracks=function(){return!(!V.TEST_VID||!V.TEST_VID.audioTracks)};V.Events="loadstart suspend abort error emptied stalled loadedmetadata loadeddata canplay canplaythrough playing waiting seeking seeked ended durationchange timeupdate progress play pause ratechange resize volumechange".split(" "); 474[["featuresMuteControl","canMuteVolume"],["featuresPlaybackRate","canControlPlaybackRate"],["featuresSourceset","canOverrideAttributes"],["featuresNativeTextTracks","supportsNativeTextTracks"],["featuresNativeVideoTracks","supportsNativeVideoTracks"],["featuresNativeAudioTracks","supportsNativeAudioTracks"]].forEac
474h(function(a){a=$jscomp.makeIterator(a);var c=a.next().value,e=a.next().value;pa(V.prototype,c,function(){return V[e]()},!0)});V.prototype.featuresVolumeControl=V.canControlVolume();V.prototype.movingMediaElementInDOM= 475!yb;V.prototype.featuresFullscreenResize=!0;V.prototype.featuresProgressEvents=!0;V.prototype.featuresTimeupdateEvents=!0;V.prototype.featuresVideoFrameCallback=!(!V.TEST_VID||!V.TEST_VID.requestVideoFrameCallback);V.disposeMediaElement=function(a){if(a){for(a.parentNode&&a.parentNode.removeChild(a);a.hasChildNodes();)a.removeChild(a.firstChild);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(c){}}};V.resetMediaElement=function(a){if(a){for(var c=a.querySelectorAll("source"), 476e=c.length;e--;)a.removeChild(c[e]);a.removeAttribute("src");if("function"===typeof a.load)try{a.load()}catch(g){}}};"muted defaultMuted autoplay controls loop playsinline".split(" ").forEach(function(a){V.prototype[a]=function(){return this.el_[a]||this.el_.hasAttribute(a)}});["muted","defaultMuted","autoplay","loop","playsinline"].forEach(function(a){V.prototype["set"+Za(a)]=function(c){(this.el_[a]=c)?this.el_.setAttribute(a,a):this.el_.removeAttribute(a)}});"paused currentTime buffered volume poster preload error seeking seekable ended playbackRate defaultPlaybackRate disablePictureInPicture played networkState readyState videoWidth videoHeight crossOrigin".split(" ").forEach(function(a){V.prototype[a]= 477function(){return this.el_[a]}});"volume src poster preload playbackRate defaultPlaybackRate disablePictureInPicture crossOrigin".split(" ").forEach(function(a){V.prototype["set"+Za(a)]=function(c){this.el_[a]=c}});["pause","load","play"].forEach(function(a){V.prototype[a]=function(){return this.el_[a]()}});W.withSourceHandlers(V);V.nativeSourceHandler={};V.nativeSourceHandler.canPlayType=function(a){try{return V.TEST_VID.canPlayType(a)}catch(c){return""}};V.nativeSourceHandler.canHandleSource=function(a, 478c){return a.type?V.nativeSourceHandler.canPlayType(a.type):a.src?(a=uh(a.src),V.nativeSourceHandler.canPlayType("video/"+a)):""};V.nativeSourceHandler.handleSource=function(a,c,e){c.setSrc(a.src)};V.nativeSourceHandler.dispose=function(){};V.registerSourceHandler(V.nativeSourceHandler);W.registerTech("Html5",V);var wk="progress abort suspend emptied stalled loadedmetadata loadeddata timeupdate resize volumechange texttrackchange".split(" "),Dh={canplay:"CanPlay",canplaythrough:"CanPlayThrough",playing:"Playing", 479seeked:"Seeked"},Eh="tiny xsmall small medium large xlarge huge".split(" "),bg={};Eh.forEach(function(a){var c="x"===a.charAt(0)?"x-"+a.substring(1):a;bg[a]="vjs-layout-"+c});var eo={tiny:210,xsmall:320,small:425,medium:768,large:1440,xlarge:2560,huge:Infinity},M=function(a,c,e){a.id=a.id||c.id||"vjs_video_"+Vb++;c=Object.assign(M.getTagSettings(a),c);c.initChildren=!1;c.createEl=!1;c.evented=!1;c.reportTouchActivity=!1;if(!c.language){var g=a.closest("[lang]");g&&(c.language=g.getAttribute("lang"))}var l= 480D.call(this,null,c,e)||this;l.boundDocumentFullscreenChange_=function(d){return l.documentFullscreenChange_(d)};l.boundFullWindowOnEscKey_=function(d){return l.fullWindowOnEscKey(d)};l.boundUpdateStyleEl_=function(d){return l.updateStyleEl_(d)};l.boundApplyInitTime_=function(d){return l.applyInitTime_(d)};l.boundUpdateCurrentBreakpoint_=function(d){return l.updateCurrentBreakpoint_(d)};l.boundHandleTechClick_=function(d){return l.handleTechClick_(d)};l.boundHandleTechDoubleClick_=function(d){return l.handleTechDoubleClick_(d)}; 481l.boundHandleTechTouchStart_=function(d){return l.handleTechTouchStart_(d)};l.boundHandleTechTouchMove_=function(d){return l.handleTechTouchMove_(d)};l.boundHandleTechTouchEnd_=function(d){return l.handleTechTouchEnd_(d)};l.boundHandleTechTap_=function(d){return l.handleTechTap_(d)};l.boundUpdatePlayerHeightOnAudioOnlyMode_=function(d){return l.updatePlayerHeightOnAudioOnlyMode_(d)};l.isFullscreen_=!1;l.log=Mj(l.id_);l.fsApi_=hf;l.isPosterFromTech_=!1;l.queuedCallbacks_=[];l.isReady_=!1;l.hasStarted_= 482!1;l.userActive_=!1;l.debugEnabled_=!1;l.audioOnlyMode_=!1;l.audioPosterMode_=!1;
482l.audioOnlyCache_={controlBarHeight:null,playerHeight:null,hiddenChildren:[]};if(!l.options_||!l.options_.techOrder||!l.options_.techOrder.length)throw Error("No techOrder specified. Did you overwrite videojs.options instead of just changing the properties you want to override?");l.tag=a;l.tagAttributes=a&&Nc(a);l.language(l.options_.language);if(c.languages){var b={};Object.getOwnPropertyNames(c.languages).forEach(function(d){b[d.toLowerCase()]= 483c.languages[d]});l.languages_=b}else l.languages_=M.prototype.options_.languages;l.resetCache_();l.poster_=c.poster||"";l.controls_=!!c.controls;a.controls=!1;a.removeAttribute("controls");l.changingSrc_=!1;l.playCallbacks_=[];l.playTerminatedQueue_=[];a.hasAttribute("autoplay")?l.autoplay(!0):l.autoplay(l.options_.autoplay);c.plugins&&Object.keys(c.plugins).forEach(function(d){if("function"!==typeof l[d])throw Error('plugin "QVC AEM Commerce Package - Designs Non Transactional" does not exist'); 484});l.scrubbing_=!1;l.el_=l.createEl();Qg(l,{eventBusKey:"el_"});l.fsApi_.requestFullscreen&&(Qb(document,l.fsApi_.fullscreenchange,l.boundDocumentFullscreenChange_),l.on(l.fsApi_.fullscreenchange,l.boundDocumentFullscreenChange_));if(l.fluid_)l.on(["playerreset","resize"],l.boundUpdateStyleEl_);e=B(l.options_);c.plugins&&Object.keys(c.plugins).forEach(function(d){l[d](c.plugins[d])});c.debug&&l.debug(!0);l.options_.playerOptions=e;l.middleware_=[];l.playbackRates(c.playbackRates);c.experimentalSvgIcons&& 485(e=(new window.DOMParser).parseFromString('\x3csvg xmlns\x3d"http://www.w3.org/2000/svg"\x3e\n \x3cdefs\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-play"\x3e\n \x3cpath d\x3d"M16 10v28l22-14z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-pause"\x3e\n \x3cpath d\x3d"M12 38h8V10h-8v28zm16-28v28h8V10h-8z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-audio"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-captions"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-subtitles"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-fullscreen-enter"\x3e\n \x3cpath d\x3d"M14 28h-4v10h10v-4h-6v-6zm-4-8h4v-6h6v-4H10v10zm24 14h-6v4h10V28h-4v6zm-6-24v4h6v6h4V10H28z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-fullscreen-exit"\x3e\n \x3cpath d\x3d"M10 32h6v6h4V28H10v4zm6-16h-6v4h10V10h-4v6zm12 22h4v-6h6v-4H28v10zm4-22v-6h-4v10h10v-4h-6z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-play-circle"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-volume-mute"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-volume-low"\x3e\n \x3cpath d\x3d"M14 18v12h8l10 10V8L22 18h-8z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-volume-medium"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-volume-high"\x3e\n \x3cpath d\x3d"M6 18v
48512h8l10 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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-spinner"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 24 24" id\x3d"vjs-icon-hd"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-chapters"\x3e\n \x3cpath d\x3d"M6 26h4v-4H6v4zm0 8h4v-4H6v4zm0-16h4v-4H6v4zm8 8h28v-4H14v4zm0 8h28v-4H14v4zm0-20v4h28v-4H14z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 40 40" id\x3d"vjs-icon-downloading"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-file-download"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-file-download-done"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-file-download-off"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-share"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-cog"\x3e\n \x3cpath d\x3d"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-
4855.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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-square"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-circle"\x3e\n \x3ccircle cx\x3d"24" cy\x3d"24" r\x3d"20"\x3e\x3c/circle\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-circle-outline"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-circle-inner-circle"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-cancel"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-replay"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-repeat"\x3e\n \x3cpath d\x3d"M14 14h20v6l8-8-8-8v6H10v12h4v-8zm20 20H14v-6l-8 8 8 8v-6h24V26h-4v8z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 96 48 48" id\x3d"vjs-icon-replay-5"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 96 48 48" id\x3d"vjs-icon-replay-10"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 96 48 48" id\x3d"vjs-icon-replay-30"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 96 48 48" id\x3d"vjs-icon-forward-5"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 96 48 48" id\x3d"vjs-icon-forward-10"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 96 48 48" id\x3d"vjs-icon-forward-30"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 512 512" id\x3d"vjs-icon-audio-description"\x3e\n \x3cg fill-rule\x3d"evenodd"\x3e\x3cpath d\x3d"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"\x3e\x3c/path\x3e\x3cpath d\x3d"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"\x3e\x3c/path\x3e\x3cpath d\x3d"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"\x3e\x3c/path\x3e\x3cpath d\x3d"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"\x3e\x3c/path\x3e\x3c/g\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-next-item"\x3e\n \x3cpath d\x3d"M12 36l17-12-17-12v24zm20-24v24h4V12h-4z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-previous-item"\x3e\n \x3cpath d\x3d"M12 12h4v24h-4zm7 12l17 12V12z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-s
485huffle"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-cast"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 48 48" id\x3d"vjs-icon-picture-in-picture-enter"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 22 18" id\x3d"vjs-icon-picture-in-picture-exit"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3cpath fill\x3d"none" d\x3d"M-1-3h24v24H-1z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 1792 1792" id\x3d"vjs-icon-facebook"\x3e\n \x3cpath d\x3d"M1343 12v264h-157q-86 0-116 36t-30 108v189h293l-39 296h-254v759H734V905H479V609h255V391q0-186 104-288.5T1115 0q147 0 228 12z"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 1792 1792" id\x3d"vjs-icon-linkedin"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 1200 1227" id\x3d"vjs-icon-twitter"\x3e\n \x3cpath d\x3d"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"/\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 1792 1792" id\x3d"vjs-icon-tumblr"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3csymbol viewBox\x3d"0 0 1792 1792" id\x3d"vjs-icon-pinterest"\x3e\n \x3cpath d\x3d"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"\x3e\x3c/path\x3e\n \x3c/symbol\x3e\n \x3c/defs\x3e\n\x3c/svg\x3e', 486"image/svg+xml"),e.querySelector("parsererror")?(sa.warn("Failed to load SVG Icons. Falling back to Font Icons."),l.options_.experimentalSvgIcons=null):(e=e.documentElement,e.style.display="none",l.el_.appendChild(e),l.addClass("vjs-svg-icons-enabled")));l.initChildren();l.isAudio("audio"===a.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",l.localize("Audio Player")): 487l.el_.setAttribute("aria-label",l.localize("Video Player"));l.isAudio()&&l.addClass("vjs-audio");c.spatialNavigation&&c.spatialNavigation.enabled&&(l.spatialNavigation=new Ma(l),l.addClass("vjs-spatial-navigation-enabled"));Ae&&l.addClass("vjs-touch-enabled");yb||l.addClass("vjs-workinghover");M.players[l.id_]=l;l.addClass("vjs-v8");l.userActive(!0);
487l.reportUserActivity();l.one("play",function(d){return l.listenForUserActivity_(d)});l.on("keydown",function(d){return l.handleKeyDown(d)});l.on("languagechange", 488function(d){return l.handleLanguagechange(d)});l.breakpoints(l.options_.breakpoints);l.responsive(l.options_.responsive);l.on("ready",function(){l.audioPosterMode(l.options_.audioPosterMode);l.audioOnlyMode(l.options_.audioOnlyMode)});return l};$jscomp.inherits(M,D);M.prototype.dispose=function(){var a=this;this.trigger("dispose");this.off("dispose");tb(document,this.fsApi_.fullscreenchange,this.boundDocumentFullscreenChange_);tb(document,"keydown",this.boundFullWindowOnEscKey_);this.styleEl_&&this.styleEl_.parentNode&& 489(this.styleEl_.parentNode.removeChild(this.styleEl_),this.styleEl_=null);M.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);qf.hasOwnProperty(this.id())&&delete qf[this.id()];Bb.names.forEach(function(c){(c=a[Bb[c].getterName]())&&c.off&&c.off()});D.prototype.dispose.call(this, 490{restoreEl:this.options_.restoreEl})};M.prototype.createEl=function(){var a=this.tag,c=this.playerElIngest_=a.parentNode&&a.parentNode.hasAttribute&&a.parentNode.hasAttribute("data-vjs-player"),e="video-js"===this.tag.tagName.toLowerCase();if(c)var g=this.el_=a.parentNode;else e||(g=this.el_=D.prototype.createEl.call(this,"div"));var l=Nc(a);if(e){g=this.el_=a;for(a=this.tag=document.createElement("video");g.children.length;)a.appendChild(g.firstChild);Ca(g,"video-js")||Ya(g,"video-js");g.appendChild(a); 491c=this.playerElIngest_=g;Object.keys(g).forEach(function(h){try{a[h]=g[h]}catch(m){}})}a.setAttribute("tabindex","-1");l.tabindex="-1";oc&&Ff&&(a.setAttribute("role","application"),l.role="application");a.removeAttribute("width");a.removeAttribute("height");"width"in l&&delete l.width;"height"in l&&delete l.height;Object.getOwnPropertyNames(l).forEach(function(h){e&&"class"===h||g.setAttribute(h,l[h]);e&&a.setAttribute(h,l[h])});a.playerId=a.id;a.id+="_html5_api";a.className="vjs-tech";a.player=g.player= 492this;this.addClass("vjs-paused");var b="IS_SMART_TV IS_TIZEN IS_WEBOS IS_ANDROID IS_IPAD IS_IPHONE IS_CHROMECAST_RECEIVER".split(" ").filter(function(h){return Qj[h]}).map(function(h){return"vjs-device-"+h.substring(3).toLowerCase().replace(/_/g,"-")});this.addClass.apply(this,$jscomp.arrayFromIterable(b));if(!0!==window.VIDEOJS_NO_DYNAMIC_STYLE){this.styleEl_=Tj("vjs-styles-dimensions");b=Oc(".vjs-styles-defaults");var d=Oc("head");d.insertBefore(this.styleEl_,b?b.nextSibling:d.firstChild)}this.fluid_= 493this.fill_=!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);b=a.getElementsByTagName("a");for(d=0;d<b.length;d++){var f=b.item(d);Ya(f,"vjs-hidden");f.setAttribute("hidden","hidden")}a.initNetworkState_=a.networkState;a.parentNode&&!c&&a.parentNode.insertBefore(g,a);na(a,g);this.children_.unshift(a);this.el_.setAttribute("lang", 494this.language_);this.el_.setAttribute("translate","no");return this.el_=g};M.prototype.crossOrigin=function(a){if("undefined"===typeof a)return this.techGet_("crossOrigin");null!==a&&"anonymous"!==a&&"use-credentials"!==a?sa.warn('crossOrigin must be null, "anonymous" or "use-credentials", given "'+a+'"'):(this.techCall_("setCrossOrigin",a),this.posterImage&&this.posterImage.crossOrigin(a))};M.prototype.width=function(a){return this.dimension("width",a)};M.prototype.height=function(a){return this.dimension("height", 495a)};M.prototype.dimension=function(a,c){var e=a+"_";if(void 0===c)return this[e]||0;if(""===c||"auto"===c)this[e]=void 0,this.updateStyleEl_();else{var g=parseFloat(c);isNaN(g)?sa.error('Improper value "'+c+'" supplied for for '+a):(this[e]=g,this.updateStyleEl_())}};M.prototype.fluid=function(a){var c=this;if(void 0===a)return!!this.fluid_;this.fluid_=!!a;zc(this)&&this.off(["playerreset","resize"],this.boundUpdateStyleEl_);a?(this.addClass("vjs-fluid"),this.fill(!1),En(this,function(){c.on(["playerreset", 496"resize"],c.boundUpdateStyleEl_)})):this.removeClass("vjs-fluid");this.updateStyleEl_()};
496M.prototype.fill=function(a){if(void 0===a)return!!this.fill_;this.fill_=!!a;a?(this.addClass("vjs-fill"),this.fluid(!1)):this.removeClass("vjs-fill")};M.prototype.aspectRatio=function(a){if(void 0===a)return this.aspectRatio_;if(!/^\d+:\d+$/.test(a))throw Error("Improper value supplied for aspect ratio. The format should be width:height, for example 16:9.");this.aspectRatio_=a;this.fluid(!0);this.updateStyleEl_()}; 497M.prototype.updateStyleEl_=function(){if(!0===window.VIDEOJS_NO_DYNAMIC_STYLE){var a="number"===typeof this.width_?this.width_:this.options_.width,c="number"===typeof this.height_?this.height_:this.options_.height,e=this.tech_&&this.tech_.el();e&&(0<=a&&(e.width=a),0<=c&&(e.height=c))}else{a=(void 0!==this.aspectRatio_&&"auto"!==this.aspectRatio_?this.aspectRatio_:0<this.videoWidth()?this.videoWidth()+":"+this.videoHeight():"16:9").split(":");var g=a[1]/a[0];a=void 0!==this.width_?this.width_:void 0!== 498this.height_?this.height_/g:this.videoWidth()||300;c=void 0!==this.height_?this.height_:a*g;e=/^[^a-zA-Z]/.test(this.id())?"dimensions-"+this.id():this.id()+"-dimensions";this.addClass(e);Uj(this.styleEl_,"\n ."+e+" {\n width: "+a+"px;\n height: "+c+"px;\n }\n\n ."+e+".vjs-fluid:not(.vjs-audio-only-mode) {\n padding-top: "+100*g+"%;\n }\n ")}};M.prototype.loadTech_=function(a,c){var e=this;this.tech_&&this.unloadTech_();var g=Za(a),l=a.charAt(0).toLowerCase()+ 499a.slice(1);"Html5"!==g&&this.tag&&(W.getTech("Html5").disposeMediaElement(this.tag),this.tag=this.tag.player=null);this.techName_=g;this.isReady_=!1;var b=this.autoplay();if("string"===typeof this.autoplay()||!0===this.autoplay()&&this.options_.normalizeAutoplay)b=!1;var d={source:c,autoplay:b,nativeControlsForTouch:this.options_.nativeControlsForTouch,playerId:this.id(),techId:this.id()+"_"+l+"_api",playsinline:this.options_.playsinline,preload:this.options_.preload,loop:this.options_.loop,disablePictureInPicture:this.options_.disablePictureInPicture, 500muted: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};Bb.names.forEach(function(f){f=Bb[f];d[f.getterName]=e[f.privateName]});Object.assign(d,this.options_[g]);Object.assign(d,this.options_[l]);Object.assign(d,this.options_[a.toLowerCase()]);this.tag&&(d.tag=this.tag);c&&c.src===this.cache_.src&&0<this.cache_.currentTime&& 501(d.startTime=this.cache_.currentTime);a=W.getTech(a);if(!a)throw Error("No Tech named '"+g+"' exists! '"+g+"' should be registered using videojs.registerTech()'");this.tech_=new a(d);this.tech_.ready(Ka(this,this.handleTechReady_),!0);Zj.jsonToTextTracks(this.textTracksJson_||[],this.tech_);wk.forEach(function(f){e.on(e.tech_,f,function(h){return e["handleTech"+Za(f)+"_"](h)})});Object.keys(Dh).forEach(function(f){e.on(e.tech_,f,function(h){if(0===e.tech_.playbackRate()&&e.tech_.seeking())e.queuedCallbacks_.push({callback:e["handleTech"+ 502Dh[f]+"_"].bind(e),event:h});else e["handleTech"+Dh[f]+"_"](h)})});this.on(this.tech_,"loadstart",function(f){return e.handleTechLoadStart_(f)});this.on(this.tech_,"sourceset",function(f){return e.handleTechSourceset_(f)});this.on(this.tech_,"waiting",function(f){return e.handleTechWaiting_(f)});this.on(this.tech_,"ended",function(f){return e.handleTechEnded_(f)});this.on(this.tech_,"seeking",function(f){return e.handleTechSeeking_(f)});this.on(this.tech_,"play",function(f){return e.handleTechPlay_(f)}); 503this.on(this.tech_,"pause",function(f){return e.handleTechPause_(f)});this.on(this.tech_,"durationchange",function(f){return e.handleTechDurationChange_(f)});this.on(this.tech_,"fullscreenchange",function(f,h){return e.handleTechFullscreenChange_(f,h)});this.on(this.tech_,"fullscreenerror",function(f,h){return e.handleTechFullscreenError_(f,h)});this.on(this.tech_,"enterpictureinpicture",function(f){return e.handleTechEnterPictureInPicture_(f)});this.on(this.tech_,"leavepictureinpicture",function(f){return e.handleTechLeavePictureInPicture_(f)}); 504this.on(this.tech_,"error",function(f){return e.handleTechError_(f)});this.on(this.tech_,"posterchange",function(f){return e.handleTechPosterChange_(f)});this.on(this.tech_,"textdata",function(f){return e.handleTechTextData_(f)});this.on(this.tech_,"ratechange",function(f){return e.handleTechRateChange_(f)});this.on(this.tech_,"loadedmetadata",this.boundUpdateStyleEl_);this.usingNativeControls(this.techGet_("controls"));this.controls()&&!this.usingNativeControls()&&this.addTechControl
504sListeners_(); 505this.tech_.el().parentNode===this.el()||"Html5"===g&&this.tag||na(this.tech_.el(),this.el());this.tag&&(this.tag=this.tag.player=null)};M.prototype.unloadTech_=function(){var a=this;Bb.names.forEach(function(c){c=Bb[c];a[c.privateName]=a[c.getterName]()});this.textTracksJson_=Zj.textTracksToJson(this.tech_);this.isReady_=!1;this.tech_.dispose();this.tech_=!1;this.isPosterFromTech_&&(this.poster_="",this.trigger("posterchange"));this.isPosterFromTech_=!1};M.prototype.tech=function(a){void 0===a&&sa.warn("Using the tech directly can be dangerous. I hope you know what you're doing.\nSee https://github.com/videojs/video.js/issues/2617 for more info.\n"); 506return this.tech_};M.prototype.version=function(){return{"video.js":"8.20.0"}};M.prototype.addTechControlsListeners_=function(){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_)}; 507M.prototype.removeTechControlsListeners_=function(){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_)};M.prototype.handleTechReady_=function(){this.triggerReady();this.cache_.volume&&this.techCall_("setVolume", 508this.cache_.volume);this.handleTechPosterChange_();this.handleTechDurationChange_()};M.prototype.handleTechLoadStart_=function(){this.removeClass("vjs-ended","vjs-seeking");this.error(null);this.handleTechDurationChange_();this.paused()&&this.hasStarted(!1);this.trigger("loadstart");this.manualAutoplay_(!0===this.autoplay()&&this.options_.normalizeAutoplay?"play":this.autoplay())};M.prototype.manualAutoplay_=function(a){var c=this;if(this.tech_&&"string"===typeof a){var e=function(){var l=c.muted(); 509c.muted(!0);var b=function(){c.muted(l)};c.playTerminatedQueue_.push(b);var d=c.play();if(qe(d))return d.catch(function(f){b();throw Error("Rejection at manualAutoplay. Restoring muted value. "+(f?f:""));})};if("any"!==a||this.muted())var g="muted"!==a||this.muted()?this.play():e();else g=this.play(),qe(g)&&(g=g.catch(e));if(qe(g))return g.then(function(){c.trigger({type:"autoplay-success",autoplay:a})}).catch(function(){c.trigger({type:"autoplay-failure",autoplay:a})})}};M.prototype.updateSourceCaches_= 510function(a){var c=a=void 0===a?"":a,e="";"string"!==typeof c&&(c=a.src,e=a.type);this.cache_.source=this.cache_.source||{};this.cache_.sources=this.cache_.sources||[];c&&!e&&(e=Un(this,c));this.cache_.source=B({},a,{src:c,type:e});a=this.cache_.sources.filter(function(f){return f.src&&f.src===c});e=[];for(var g=this.$$("source"),l=[],b=0;b<g.length;b++){var d=Nc(g[b]);e.push(d);d.src&&d.src===c&&l.push(d.src)}l.length&&!a.length?this.cache_.sources=e:a.length||(this.cache_.sources=[this.cache_.source]); 511this.cache_.src=c};M.prototype.handleTechSourceset_=function(a){var c=this;if(!this.changingSrc_){var e=function(b){return c.updateSourceCaches_(b)},g=this.currentSource().src,l=a.src;g&&!/^blob:/.test(g)&&/^blob:/.test(l)&&(!this.lastSource_||this.lastSource_.tech!==l&&this.lastSource_.player!==g)&&(e=function(){});e(l);a.src||this.tech_.any(["sourceset","loadstart"],function(b){"sourceset"!==b.type&&(b=c.techGet_("currentSrc"),c.lastSource_.tech=b,c.updateSourceCaches_(b))})}this.lastSource_={player:this.currentSource().src, 512tech:a.src};this.trigger({src:a.src,type:"sourceset"})};M.prototype.hasStarted=function(a){if(void 0===a)return this.hasStarted_;a!==this.hasStarted_&&((this.hasStarted_=a)?this.addClass("vjs-has-started"):this.removeClass("vjs-has-started"))};M.prototype.handleTechPlay_=function(){this.removeClass("vjs-ended","vjs-paused");this.addClass("vjs-playing");this.hasStarted(!0);this.trigger("play")};M.prototype.handleTechRateChange_=function(){0<this.tech_.playbackRate()&&0===this.cache_.lastPlaybackRate&& 513(this.queuedCallbacks_.forEach(function(a){return a.callback(a.event)}),this.queuedCallbacks_=[]);this.cache_.lastPlaybackRate=this.tech_.playbackRate();this.trigger("ratechange")};M.prototype.handleTechWaiting_=function(){var a=this;this.addClass("vjs-waiting");this.trigger("waiting");var c=this.currentTime(),e=function(){c!==a.currentTime()&&(a.removeClass("vjs-waiting"),a.off("timeupdate",e))};this.on("timeupdate",e)};M.prototype.handleTechCanPlay_=function(){this.removeClass("vjs-waiting");this.trigger("canplay")}; 514M.prototype.handleTechCanPlayThrough_=function(){this.removeClass("vjs-waiting");this.trigger("canplaythrough")};M.prototype.handleTechPlaying_=function(){this.removeClass("vjs-waiting");this.trigger("playing")};M.prototype.handleTechSeeking_=function(){this.addClass("vjs-seeking");this.trigger("seeking")};M.prototype.handleTechSeeked_=function(){this.removeClass("vjs-seeking","vjs-e
514nded");this.trigger("seeked")};M.prototype.handleTechPause_=function(){this.removeClass("vjs-playing");this.addClass("vjs-paused"); 515this.trigger("pause")};M.prototype.handleTechEnded_=function(){this.addClass("vjs-ended");this.removeClass("vjs-waiting");this.options_.loop?(this.currentTime(0),this.play()):this.paused()||this.pause();this.trigger("ended")};M.prototype.handleTechDurationChange_=function(){this.duration(this.techGet_("duration"))};M.prototype.handleTechClick_=function(a){!this.controls_||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.click&&!1===this.options_.userActions.click|| 516(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.click?this.options_.userActions.click.call(this,a):this.paused()?jc(this.play()):this.pause())};M.prototype.handleTechDoubleClick_=function(a){this.controls_&&(Array.prototype.some.call(this.$$(".vjs-control-bar, .vjs-modal-dialog"),function(c){return c.contains(a.target)})||void 0!==this.options_&&void 0!==this.options_.userActions&&void 0!==this.options_.userActions.doubleClick&&!1===this.options_.userActions.doubleClick|| 517(void 0!==this.options_&&void 0!==this.options_.userActions&&"function"===typeof this.options_.userActions.doubleClick?this.options_.userActions.doubleClick.call(this,a):this.isInPictureInPicture()&&!document.pictureInPictureElement?this.exitPictureInPicture():this.isFullscreen()?this.exitFullscreen():this.requestFullscreen()))};M.prototype.handleTechTap_=function(){this.userActive(!this.userActive())};M.prototype.handleTechTouchStart_=function(){this.userWasActive=this.userActive()};M.prototype.handleTechTouchMove_= 518function(){this.userWasActive&&this.reportUserActivity()};M.prototype.handleTechTouchEnd_=function(a){a.cancelable&&a.preventDefault()};M.prototype.toggleFullscreenClass_=function(){this.isFullscreen()?this.addClass("vjs-fullscreen"):this.removeClass("vjs-fullscreen")};M.prototype.documentFullscreenChange_=function(a){a=a.target.player;if(!a||a===this){a=this.el();var c=document[this.fsApi_.fullscreenElement]===a;!c&&a.matches&&(c=a.matches(":"+this.fsApi_.fullscreen));this.isFullscreen(c)}};M.prototype.handleTechFullscreenChange_= 519function(a,c){var e=this;c&&(c.nativeIOSFullscreen&&(this.addClass("vjs-ios-native-fs"),this.tech_.one("webkitendfullscreen",function(){e.removeClass("vjs-ios-native-fs")})),this.isFullscreen(c.isFullscreen))};M.prototype.handleTechFullscreenError_=function(a,c){this.trigger("fullscreenerror",c)};M.prototype.togglePictureInPictureClass_=function(){this.isInPictureInPicture()?this.addClass("vjs-picture-in-picture"):this.removeClass("vjs-picture-in-picture")};M.prototype.handleTechEnterPictureInPicture_= 520function(a){this.isInPictureInPicture(!0)};M.prototype.handleTechLeavePictureInPicture_=function(a){this.isInPictureInPicture(!1)};M.prototype.handleTechError_=function(){var a=this.tech_.error();a&&this.error(a)};M.prototype.handleTechTextData_=function(){var a=null;1<arguments.length&&(a=arguments[1]);this.trigger("textdata",a)};M.prototype.getCache=function(){return this.cache_};M.prototype.resetCache_=function(){this.cache_={currentTime:0,initTime:0,inactivityTimeout:this.options_.inactivityTimeout, 521duration:NaN,lastVolume:1,lastPlaybackRate:this.defaultPlaybackRate(),media:null,src:"",source:{},sources:[],playbackRates:[],volume:1}};M.prototype.techCall_=function(a,c){this.ready(function(){if(a in Sn)return this.tech_[a](this.middleware_.reduce(Zg(a),c));if(a in hk)return bj(this.middleware_,this.tech_,a,c);try{if(this.tech_)this.tech_[a](c)}catch(e){throw sa(e),e;}},!0)};M.prototype.techGet_=function(a){if(this.tech_&&this.tech_.isReady_){if(a in Rn){var c=this.tech_;return this.middleware_.reduceRight(Zg(a), 522c[a]())}if(a in hk)return bj(this.middleware_,this.tech_,a);try{return this.tech_[a]()}catch(e){if(void 0===this.tech_[a])throw sa("Video.js: "+a+" method not defined for "+this.techName_+" playback technology.",e),e;if("TypeError"===e.name)throw sa("Video.js: "+a+" unavailable on "+this.techName_+" playback technology element.",e),this.tech_.isReady_=!1,e;sa(e);throw e;}}};M.prototype.play=function(){var a=this;return new Promise(function(c){a.play_(c)})};M.prototype.play_=function(a){var c=this; 523a=void 0===a?jc:a;this.playCallbacks_.push(a);var e=!(this.changingSrc_||!this.src()&&!this.currentSrc());a=!(!Lf&&!yb);this.waitToPlay_&&(this.off(["ready","loadstart"],this.waitToPlay_),this.waitToPlay_=null);this.isReady_&&e?(e=this.techGet_("play"),a&&this.hasClass("vjs-ended")&&this.resetProgressBar_(),null===e?this.runPlayTerminatedQueue_():this.runPlayCallbacks_(e)):(this.waitToPlay_=function(g){c.play_()},this.one(["ready","loadstart"],this.waitToPlay_),!e&&a&&this.load())};M.prototype.runPlayTerminatedQueue_= 524function(){var a=this.playTerminatedQueue_.slice(0);this.playTerminatedQueue_=[];a.forEach(function(c){c()})};M.prototype.runPlayCallbacks_=function(a){var c=this.playCallbacks_.slice(0);this.playCallbacks_=[];this.playTerminatedQueue_=[];
524c.forEach(function(e){e(a)})};M.prototype.pause=function(){this.techCall_("pause")};M.prototype.paused=function(){return!1===this.techGet_("paused")?!1:!0};M.prototype.played=function(){return this.techGet_("played")||dc(0,0)};M.prototype.scrubbing=function(a){if("undefined"=== 525typeof a)return this.scrubbing_;this.scrubbing_=!!a;this.techCall_("setScrubbing",this.scrubbing_);a?this.addClass("vjs-scrubbing"):this.removeClass("vjs-scrubbing")};M.prototype.currentTime=function(a){if(void 0===a)return this.cache_.currentTime=this.techGet_("currentTime")||0,this.cache_.currentTime;0>a&&(a=0);this.isReady_&&!this.changingSrc_&&this.tech_&&this.tech_.isReady_?(this.techCall_("setCurrentTime",a),this.cache_.initTime=0,isFinite(a)&&(this.cache_.currentTime=Number(a))):(this.cache_.initTime= 526a,this.off("canplay",this.boundApplyInitTime_),this.one("canplay",this.boundApplyInitTime_))};M.prototype.applyInitTime_=function(){this.currentTime(this.cache_.initTime)};M.prototype.duration=function(a){if(void 0===a)return void 0!==this.cache_.duration?this.cache_.duration:NaN;a=parseFloat(a);0>a&&(a=Infinity);a!==this.cache_.duration&&(this.cache_.duration=a,Infinity===a?this.addClass("vjs-live"):this.removeClass("vjs-live"),isNaN(a)||this.trigger("durationchange"))};M.prototype.remainingTime= 527function(){return this.duration()-this.currentTime()};M.prototype.remainingTimeDisplay=function(){return Math.floor(this.duration())-Math.floor(this.currentTime())};M.prototype.buffered=function(){var a=this.techGet_("buffered");a&&a.length||(a=dc(0,0));return a};M.prototype.seekable=function(){var a=this.techGet_("seekable");a&&a.length||(a=dc(0,0));return a};M.prototype.seeking=function(){return this.techGet_("seeking")};M.prototype.ended=function(){return this.techGet_("ended")};M.prototype.networkState= 528function(){return this.techGet_("networkState")};M.prototype.readyState=function(){return this.techGet_("readyState")};M.prototype.bufferedPercent=function(){return Ti(this.buffered(),this.duration())};M.prototype.bufferedEnd=function(){var a=this.buffered(),c=this.duration();a=a.end(a.length-1);a>c&&(a=c);return a};M.prototype.volume=function(a){if(void 0!==a)a=Math.max(0,Math.min(1,a)),this.cache_.volume=a,this.techCall_("setVolume",a),0<a&&this.lastVolume_(a);else return a=parseFloat(this.techGet_("volume")), 529isNaN(a)?1:a};M.prototype.muted=function(a){if(void 0!==a)this.techCall_("setMuted",a);else return this.techGet_("muted")||!1};M.prototype.defaultMuted=function(a){void 0!==a&&this.techCall_("setDefaultMuted",a);return this.techGet_("defaultMuted")||!1};M.prototype.lastVolume_=function(a){if(void 0!==a&&0!==a)this.cache_.lastVolume=a;else return this.cache_.lastVolume};M.prototype.supportsFullScreen=function(){return this.techGet_("supportsFullScreen")||!1};M.prototype.isFullscreen=function(a){if(void 0!== 530a){var c=this.isFullscreen_;this.isFullscreen_=!!a;this.isFullscreen_!==c&&this.fsApi_.prefixed&&this.trigger("fullscreenchange");this.toggleFullscreenClass_()}else return this.isFullscreen_};M.prototype.requestFullscreen=function(a){this.isInPictureInPicture()&&this.exitPictureInPicture();var c=this;return new Promise(function(e,g){function l(){c.off("fullscreenerror",d);c.off("fullscreenchange",b)}function b(){l();e()}function d(h,m){l();g(m)}c.one("fullscreenchange",b);c.one("fullscreenerror", 531d);var f=c.requestFullscreenHelper_(a);f&&(f.then(l,l),f.then(e,g))})};M.prototype.requestFullscreenHelper_=function(a){var c=this;if(!this.fsApi_.prefixed){var e=this.options_.fullscreen&&this.options_.fullscreen.options||{};void 0!==a&&(e=a)}if(this.fsApi_.requestFullscreen)return(a=this.el_[this.fsApi_.requestFullscreen](e))&&a.then(function(){return c.isFullscreen(!0)},function(){return c.isFullscreen(!1)}),a;this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("enterFullScreen"): 532this.enterFullWindow()};M.prototype.exitFullscreen=function(){var a=this;return new Promise(function(c,e){function g(){a.off("fullscreenerror",b);a.off("fullscreenchange",l)}function l(){g();c()}function b(f,h){g();e(h)}a.one("fullscreenchange",l);a.one("fullscreenerror",b);var d=a.exitFullscreenHelper_();d&&(d.then(g,g),d.then(c,e))})};M.prototype.exitFullscreenHelper_=function(){var a=this;if(this.fsApi_.requestFullscreen){var c=document[this.fsApi_.exitFullscreen]();c&&jc(c.then(function(){return a.isFullscreen(!1)})); 533return c}this.tech_.supportsFullScreen()&&!0===!this.options_.preferFullWindow?this.techCall_("exitFullScreen"):this.exitFullWindow()};M.prototype.enterFullWindow=function(){this.isFullscreen(!0);this.isFullWindow=!0;this.docOrigOverflow=document.documentElement.style.overflow;Qb(document,"keydown",this.boundFullWindowOnEscKey_);document.documentElement.style.overflow="hidden";Ya(document.body,"vjs-full-window");this.trigger("enterFullWindow")};M.prototype.fullWindowOnEscKey=function(a){"Escape"=== 534a.key&&!0===this.isFullscreen()&&(this.isFullWindow?this.exitFullWindow():this.exitFullscreen())};M.prototype.exitFullWindow=function(){this.isFullscreen(!1);this.isFullWindow=!1;tb(document,"keydown",this.boundFullWindowOnEscKey_);document.documentElement.style.overflow=this.docOrigOverflow;ic(document.body,"vjs-full-window");this.trigger("exitFullWindow")};
534M.prototype.disablePictureInPicture=function(a){if(void 0===a)return this.techGet_("disablePictureInPicture");this.techCall_("setDisablePictureInPicture", 535a);this.options_.disablePictureInPicture=a;this.trigger("disablepictureinpicturechanged")};M.prototype.isInPictureInPicture=function(a){if(void 0!==a)this.isInPictureInPicture_=!!a,this.togglePictureInPictureClass_();else return!!this.isInPictureInPicture_};M.prototype.requestPictureInPicture=function(){var a=this;if(this.options_.enableDocumentPictureInPicture&&window.documentPictureInPicture){var c=document.createElement(this.el().tagName);c.classList=this.el().classList;c.classList.add("vjs-pip-container"); 536this.posterImage&&c.appendChild(this.posterImage.el().cloneNode(!0));this.titleBar&&c.appendChild(this.titleBar.el().cloneNode(!0));c.appendChild(Q("p",{className:"vjs-pip-text"},{},this.localize("Playing in picture-in-picture")));return window.documentPictureInPicture.requestWindow({width:this.videoWidth(),height:this.videoHeight()}).then(function(e){Li(e);a.el_.parentNode.insertBefore(c,a.el_);e.document.body.appendChild(a.el_);e.document.body.classList.add("vjs-pip-window");a.player_.isInPictureInPicture(!0); 537a.player_.trigger({type:"enterpictureinpicture",pipWindow:e});e.addEventListener("pagehide",function(g){g=g.target.querySelector(".video-js");c.parentNode.replaceChild(g,c);a.player_.isInPictureInPicture(!1);a.player_.trigger("leavepictureinpicture")});return e})}return"pictureInPictureEnabled"in document&&!1===this.disablePictureInPicture()?this.techGet_("requestPictureInPicture"):Promise.reject("No PiP mode is available")};M.prototype.exitPictureInPicture=function(){if(window.documentPictureInPicture&& 538window.documentPictureInPicture.window)return window.documentPictureInPicture.window.close(),Promise.resolve();if("pictureInPictureEnabled"in document)return document.exitPictureInPicture()};M.prototype.handleKeyDown=function(a){var c=this.options_.userActions;if(c&&c.hotkeys){var e=this.el_.ownerDocument.activeElement;var g=e.tagName.toLowerCase();if(e.isContentEditable)e=!0;else{var l="button checkbox hidden radio reset submit".split(" ");e="input"===g?-1===l.indexOf(e.type):-1!==["textarea"].indexOf(g)}e|| 539("function"===typeof c.hotkeys?c.hotkeys.call(this,a):this.handleHotkeys(a))}};M.prototype.handleHotkeys=function(a){var c=this.options_.userActions?this.options_.userActions.hotkeys:{},e=void 0===c.muteKey?function(l){return"m"===a.key.toLowerCase()}:c.muteKey,g=void 0===c.playPauseKey?function(l){return"k"===a.key.toLowerCase()||" "===a.key.toLowerCase()}:c.playPauseKey;(void 0===c.fullscreenKey?function(l){return"f"===a.key.toLowerCase()}:c.fullscreenKey).call(this,a)?(a.preventDefault(),a.stopPropagation(), 540c=D.getComponent("FullscreenToggle"),!1!==document[this.fsApi_.fullscreenEnabled]&&c.prototype.handleClick.call(this,a)):e.call(this,a)?(a.preventDefault(),a.stopPropagation(),D.getComponent("MuteToggle").prototype.handleClick.call(this,a)):g.call(this,a)&&(a.preventDefault(),a.stopPropagation(),D.getComponent("PlayToggle").prototype.handleClick.call(this,a))};M.prototype.canPlayType=function(a){for(var c,e=0,g=this.options_.techOrder;e<g.length;e++){c=g[e];var l=W.getTech(c);l||(l=D.getComponent(c)); 541if(!l)sa.error('The "'+c+'" tech is undefined. Skipped browser support check for that tech.');else if(l.isSupported()&&(c=l.canPlayType(a)))return c}return""};M.prototype.selectSource=function(a){var c=this,e=this.options_.techOrder.map(function(d){return[d,W.getTech(d)]}).filter(function(d){var f=$jscomp.makeIterator(d);d=f.next().value;if(f=f.next().value)return f.isSupported();sa.error('The "'+d+'" tech is undefined. Skipped browser support check for that tech.');return!1}),g=function(d,f,h){var m; 542d.some(function(p){return f.some(function(t){if(m=h(p,t))return!0})});return m},l=function(d){return function(f,h){return d(h,f)}},b=function(d,f){d=$jscomp.makeIterator(d);var h=d.next().value;if(d.next().value.canPlaySource(f,c.options_[h.toLowerCase()]))return{source:f,tech:h}};return(this.options_.sourceOrder?g(a,e,l(b)):g(e,a,b))||!1};M.prototype.handleSrc_=function(a,c){var e=this;if("undefined"===typeof a)return this.cache_.src||"";this.resetRetryOnError_&&this.resetRetryOnError_();var g=ik(a); 543if(g.length){if(this.changingSrc_=!0,c||(this.cache_.sources=g),this.updateSourceCaches_(g[0]),jn(this,g[0],function(d,f){e.middleware_=f;
543c||(e.cache_.sources=g);e.updateSourceCaches_(d);if(e.src_(d)){if(1<g.length)return e.handleSrc_(g.slice(1));e.changingSrc_=!1;e.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0);e.triggerReady()}else kn(f,e.tech_)}),1<g.length){var l=function(){e.error(null);e.handleSrc_(g.slice(1),!0)},b=function(){e.off("error",l)};this.one("error", 544l);this.one("playing",b);this.resetRetryOnError_=function(){e.off("error",l);e.off("playing",b)}}}else this.setTimeout(function(){this.error({code:4,message:this.options_.notSupportedMessage})},0)};M.prototype.src=function(a){return this.handleSrc_(a,!1)};M.prototype.src_=function(a){var c=this,e=this.selectSource([a]);if(!e)return!0;if(!Yj(e.tech,this.techName_))return this.changingSrc_=!0,this.loadTech_(e.tech,e.source),this.tech_.ready(function(){c.changingSrc_=!1}),!1;this.ready(function(){this.tech_.constructor.prototype.hasOwnProperty("setSource")? 545this.techCall_("setSource",a):this.techCall_("src",a.src);this.changingSrc_=!1},!0);return!1};M.prototype.addSourceElement=function(a,c){return this.tech_?this.tech_.addSourceElement(a,c):!1};M.prototype.removeSourceElement=function(a){return this.tech_?this.tech_.removeSourceElement(a):!1};M.prototype.load=function(){this.tech_&&this.tech_.vhs?this.src(this.currentSource()):this.techCall_("load")};M.prototype.reset=function(){var a=this;if(this.paused())this.doReset_();else{var c=this.play();jc(c.then(function(){return a.doReset_()}))}}; 546M.prototype.doReset_=function(){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});zc(this)&&this.trigger("playerreset")};M.prototype.resetControlBarUI_=function(){this.resetProgressBar_();this.resetPlaybackRate_();this.resetVolumeBar_()}; 547M.prototype.resetProgressBar_=function(){this.currentTime(0);var a=this.controlBar||{},c=a.currentTimeDisplay,e=a.durationDisplay,g=a.remainingTimeDisplay;a=(a.progressControl||{}).seekBar;c&&c.updateContent();e&&e.updateContent();g&&g.updateContent();a&&(a.update(),a.loadProgressBar&&a.loadProgressBar.update())};M.prototype.resetPlaybackRate_=function(){this.playbackRate(this.defaultPlaybackRate());this.handleTechRateChange_()};M.prototype.resetVolumeBar_=function(){this.volume(1);this.trigger("volumechange")}; 548M.prototype.currentSources=function(){var a=this.currentSource(),c=[];0!==Object.keys(a).length&&c.push(a);return this.cache_.sources||c};M.prototype.currentSource=function(){return this.cache_.source||{}};M.prototype.currentSrc=function(){return this.currentSource()&&this.currentSource().src||""};M.prototype.currentType=function(){return this.currentSource()&&this.currentSource().type||""};M.prototype.preload=function(a){if(void 0!==a)this.techCall_("setPreload",a),this.options_.preload=a;else return this.techGet_("preload")}; 549M.prototype.autoplay=function(a){if(void 0===a)return this.options_.autoplay||!1;if("string"===typeof a&&/(any|play|muted)/.test(a)||!0===a&&this.options_.normalizeAutoplay){this.options_.autoplay=a;this.manualAutoplay_("string"===typeof a?a:"play");var c=!1}else this.options_.autoplay=a?!0:!1;c="undefined"===typeof c?this.options_.autoplay:c;this.tech_&&this.techCall_("setAutoplay",c)};M.prototype.playsinline=function(a){void 0!==a&&(this.techCall_("setPlaysinline",a),this.options_.playsinline=a); 550return this.techGet_("playsinline")};M.prototype.loop=function(a){if(void 0!==a)this.techCall_("setLoop",a),this.options_.loop=a;else return this.techGet_("loop")};M.prototype.poster=function(a){if(void 0===a)return this.poster_;a||(a="");a!==this.poster_&&(this.poster_=a,this.techCall_("setPoster",a),this.isPosterFromTech_=!1,this.trigger("posterchange"))};M.prototype.handleTechPosterChange_=function(){if((!this.poster_||this.options_.techCanOverridePoster)&&this.tech_&&this.tech_.poster){var a= 551this.tech_.poster()||"";a!==this.poster_&&(this.poster_=a,this.isPosterFromTech_=!0,this.trigger("posterchange"))}};
551M.prototype.controls=function(a){if(void 0===a)return!!this.controls_;a=!!a;this.controls_!==a&&(this.controls_=a,this.usingNativeControls()&&this.techCall_("setControls",a),this.controls_?(this.removeClass("vjs-controls-disabled"),this.addClass("vjs-controls-enabled"),this.trigger("controlsenabled"),this.usingNativeControls()||this.addTechControlsListeners_()):(this.removeClass("vjs-controls-enabled"), 552this.addClass("vjs-controls-disabled"),this.trigger("controlsdisabled"),this.usingNativeControls()||this.removeTechControlsListeners_()))};M.prototype.usingNativeControls=function(a){if(void 0===a)return!!this.usingNativeControls_;a=!!a;this.usingNativeControls_!==a&&((this.usingNativeControls_=a)?(this.addClass("vjs-using-native-controls"),this.trigger("usingnativecontrols")):(this.removeClass("vjs-using-native-controls"),this.trigger("usingcustomcontrols")))};M.prototype.error=function(a){var c= 553this;if(void 0===a)return this.error_||null;Pc("beforeerror").forEach(function(g){g=g(c,a);R(g)&&!Array.isArray(g)||"string"===typeof g||"number"===typeof g||null===g?a=g:c.log.error("please return a value that MediaError expects in beforeerror hooks")});if(this.options_.suppressNotSupportedError&&a&&4===a.code){var e=function(){this.error(a)};this.options_.suppressNotSupportedError=!1;this.any(["click","touchstart"],e);this.one("loadstart",function(){this.off(["click","touchstart"],e)})}else null=== 554a?(this.error_=null,this.removeClass("vjs-error"),this.errorDisplay&&this.errorDisplay.close()):(this.error_=new Sa(a),this.addClass("vjs-error"),sa.error("(CODE:"+this.error_.code+" "+Sa.errorTypes[this.error_.code]+")",this.error_.message,this.error_),this.trigger("error"),Pc("error").forEach(function(g){return g(c,c.error_)}))};M.prototype.reportUserActivity=function(a){this.userActivity_=!0};M.prototype.userActive=function(a){if(void 0===a)return this.userActive_;a=!!a;if(a!==this.userActive_)if(this.userActive_= 555a)this.userActivity_=!0,this.removeClass("vjs-user-inactive"),this.addClass("vjs-user-active"),this.trigger("useractive");else{if(this.tech_)this.tech_.one("mousemove",function(c){c.stopPropagation();c.preventDefault()});this.userActivity_=!1;this.removeClass("vjs-user-active");this.addClass("vjs-user-inactive");this.trigger("userinactive")}};M.prototype.listenForUserActivity_=function(){var a,c,e,g=Ka(this,this.reportUserActivity),l=function(d){g();this.clearInterval(a)};this.on("mousedown",function(){g(); 556this.clearInterval(a);a=this.setInterval(g,250)});this.on("mousemove",function(d){if(d.screenX!==c||d.screenY!==e)c=d.screenX,e=d.screenY,g()});this.on("mouseup",l);this.on("mouseleave",l);!(l=this.getChild("controlBar"))||yb||nc||(l.on("mouseenter",function(d){0!==this.player().options_.inactivityTimeout&&(this.player().cache_.inactivityTimeout=this.player().options_.inactivityTimeout);this.player().options_.inactivityTimeout=0}),l.on("mouseleave",function(d){this.player().options_.inactivityTimeout= 557this.player().cache_.inactivityTimeout}));this.on("keydown",g);this.on("keyup",g);var b;this.setInterval(function(){if(this.userActivity_){this.userActivity_=!1;this.userActive(!0);this.clearTimeout(b);var d=this.options_.inactivityTimeout;0>=d||(b=this.setTimeout(function(){this.userActivity_||this.userActive(!1)},d))}},250)};M.prototype.playbackRate=function(a){if(void 0!==a)this.techCall_("setPlaybackRate",a);else return this.tech_&&this.tech_.featuresPlaybackRate?this.cache_.lastPlaybackRate|| 558this.techGet_("playbackRate"):1};M.prototype.defaultPlaybackRate=function(a){return void 0!==a?this.techCall_("setDefaultPlaybackRate",a):this.tech_&&this.tech_.featuresPlaybackRate?this.techGet_("defaultPlaybackRate"):1};M.prototype.isAudio=function(a){if(void 0!==a)this.isAudio_=!!a;else return!!this.isAudio_};M.prototype.updatePlayerHeightOnAudioOnlyMode_=function(){var a=this.getChild("ControlBar");a&&this.audioOnlyCache_.controlBarHeight!==a.currentHeight()&&(this.audioOnlyCache_.controlBarHeight= 559a.currentHeight(),this.height(this.audioOnlyCache_.controlBarHeight))};M.prototype.enableAudioOnlyUI_=function(){var a=this;this.addClass("vjs-audio-only-mode");var c=this.children(),e=this.getChild("ControlBar"),g=e&&e.currentHeight();
559c.forEach(function(l){l!==e&&l.el_&&!l.hasClass("vjs-hidden")&&(l.hide(),a.audioOnlyCache_.hiddenChildren.push(l))});this.audioOnlyCache_.playerHeight=this.currentHeight();this.audioOnlyCache_.controlBarHeight=g;this.on("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_); 560this.height(g);this.trigger("audioonlymodechange")};M.prototype.disableAudioOnlyUI_=function(){this.removeClass("vjs-audio-only-mode");this.off("playerresize",this.boundUpdatePlayerHeightOnAudioOnlyMode_);this.audioOnlyCache_.hiddenChildren.forEach(function(a){return a.show()});this.height(this.audioOnlyCache_.playerHeight);this.trigger("audioonlymodechange")};M.prototype.audioOnlyMode=function(a){var c=this;return"boolean"!==typeof a||a===this.audioOnlyMode_?this.audioOnlyMode_:(this.audioOnlyMode_= 561a)?(a=[],this.isInPictureInPicture()&&a.push(this.exitPictureInPicture()),this.isFullscreen()&&a.push(this.exitFullscreen()),this.audioPosterMode()&&a.push(this.audioPosterMode(!1)),Promise.all(a).then(function(){return c.enableAudioOnlyUI_()})):Promise.resolve().then(function(){return c.disableAudioOnlyUI_()})};M.prototype.enablePosterModeUI_=function(){(this.tech_&&this.tech_).hide();this.addClass("vjs-audio-poster-mode");this.trigger("audiopostermodechange")};M.prototype.disablePosterModeUI_=function(){(this.tech_&& 562this.tech_).show();this.removeClass("vjs-audio-poster-mode");this.trigger("audiopostermodechange")};M.prototype.audioPosterMode=function(a){var c=this;return"boolean"!==typeof a||a===this.audioPosterMode_?this.audioPosterMode_:(this.audioPosterMode_=a)?this.audioOnlyMode()?this.audioOnlyMode(!1).then(function(){c.enablePosterModeUI_()}):Promise.resolve().then(function(){c.enablePosterModeUI_()}):Promise.resolve().then(function(){c.disablePosterModeUI_()})};M.prototype.addTextTrack=function(a,c,e){if(this.tech_)return this.tech_.addTextTrack(a, 563c,e)};M.prototype.addRemoteTextTrack=function(a,c){if(this.tech_)return this.tech_.addRemoteTextTrack(a,c)};M.prototype.removeRemoteTextTrack=function(a){a=void 0===a?{}:a;var c=a.track;c||(c=a);if(this.tech_)return this.tech_.removeRemoteTextTrack(c)};M.prototype.getVideoPlaybackQuality=function(){return this.techGet_("getVideoPlaybackQuality")};M.prototype.videoWidth=function(){return this.tech_&&this.tech_.videoWidth&&this.tech_.videoWidth()||0};M.prototype.videoHeight=function(){return this.tech_&& 564this.tech_.videoHeight&&this.tech_.videoHeight()||0};M.prototype.language=function(a){if(void 0===a)return this.language_;this.language_!==String(a).toLowerCase()&&(this.language_=String(a).toLowerCase(),zc(this)&&this.trigger("languagechange"))};M.prototype.languages=function(){return B(M.prototype.options_.languages,this.languages_)};M.prototype.toJSON=function(){var a=B(this.options_),c=a.tracks;a.tracks=[];for(var e=0;e<c.length;e++){var g=c[e];g=B(g);g.player=void 0;a.tracks[e]=g}return a};M.prototype.createModal= 565function(a,c){var e=this;c=c||{};c.content=a||"";var g=new Da(this,c);this.addChild(g);g.on("dispose",function(){e.removeChild(g)});g.open();return g};M.prototype.updateCurrentBreakpoint_=function(){if(this.responsive())for(var a=this.currentBreakpoint(),c=this.currentWidth(),e=0;e<Eh.length;e++){var g=Eh[e];if(c<=this.breakpoints_[g]){if(a===g)break;a&&this.removeClass(bg[a]);this.addClass(bg[g]);this.breakpoint_=g;break}}};M.prototype.removeCurrentBreakpoint_=function(){var a=this.currentBreakpointClass(); 566this.breakpoint_="";a&&this.removeClass(a)};M.prototype.breakpoints=function(a){if(void 0===a)return Object.assign(this.breakpoints_);this.breakpoint_="";this.breakpoints_=Object.assign({},eo,a);this.updateCurrentBreakpoint_();return Object.assign(this.breakpoints_)};M.prototype.responsive=function(a){if(void 0===a)return this.responsive_;a=!!a;if(a!==this.responsive_)return(this.responsive_=a)?(this.on("playerresize",this.boundUpdateCurrentBreakpoint_),this.updateCurrentBreakpoint_()):(this.off("playerresize", 567this.boundUpdateCurrentBreakpoint_),this.removeCurrentBreakpoint_()),a};M.prototype.currentBreakpoint=function(){return this.breakpoint_};M.prototype.currentBreakpointClass=function(){return bg[this.breakpoint_]||""};M.prototype.loadMedia=function(a,c){var e=this;if(a&&"object"===typeof a){var g=this.crossOrigin();this.reset();this.cache_.media=B(a);a=this.cache_.media;var l=a.artist,b=a.description,d=a.poster,f=a.src,h=a.textTracks,m=a.title;!a.artwork&&d&&(this.cache_.media.artwork=[{src:d,type:rf(d)}]); 568g&&this.crossOrigin(g);f&&this.src(f);d&&this.poster(d);Array.isArray(h)&&h.forEach(function(p){return e.addRemoteTextTrack(p,!1)});this.titleBar&&this.titleBar.update({title:m,description:b||l||""});this.ready(c)}};M.prototype.getMedia=function(){if(!this.cache_.media){var a=this.poster(),c=this.currentSources(),e=Array.prototype.map.call(this.remoteTextTracks(),function(g){return{kind:g.kind,label:g.label,language:g.language,src:g.src}});c={src:c,textTracks:e};a&&(c.poster=a,c.artwork=[{src:c.poster, 569type:rf(c.poster)}]);return c}return B(this.cache_.media)};M.getTagSettings=function(a){var c={sources:[],tracks:[]},e=Nc(a),g=e["data-setup"];Ca(a,"vjs-fill")&&(e.fill=!0);Ca(a,"vjs-fluid")&&(e.fluid=!0);if(null!==g)try{Object.assign(e,JSON.parse(g||"{}"))}catch(d){sa.error("data-setup",d)}Object.assign(c,e);if(a.hasChildNodes())for(a=a.childNodes,e=0,g=a.length;e<g;e++){var l=a[e],b=l.nodeName.toLowerCase();"source"===b?c.sources.push(Nc(l)):"track"===b&&c.tracks.push(Nc(l))}return c};M.prototype.debug=
570function(a){if(void 0===a)return this.debugEnabled_;a?(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)};M.prototype.playbackRates=function(a){if(void 0===a)return this.cache_.playbackRates;Array.isArray(a)&&a.every(function(c){return"number"===typeof c})&&(this.cache_.playbackRates=a,this.trigger("playbackrateschange"))}; 571Bb.names.forEach(function(a){var c=Bb[a];M.prototype[c.getterName]=function(){if(this.tech_)return this.tech_[c.getterName]();this[c.privateName]=this[c.privateName]||new c.ListClass;return this[c.privateName]}});M.prototype.crossorigin=M.prototype.crossOrigin;M.players={};var Oe=window.navigator;M.prototype.options_={techOrder:W.defaultTechOrder_,html5:{},enableSourceset:!0,inactivityTimeout:2E3,playbackRates:[],liveui:!1,children:"mediaLoader posterImage titleBar textTrackDisplay loadingSpinner bigPlayButton liveTracker controlBar errorDisplay textTrackSettings resizeManager".split(" "), 572language:Oe&&(Oe.languages&&Oe.languages[0]||Oe.userLanguage||Oe.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};wk.forEach(function(a){M.prototype["handleTech"+Za(a)+"_"]=function(){return this.trigger(a)}});D.registerComponent("Player",M);var Ic={}, 573cg=function(a){return Ic.hasOwnProperty(a)?Ic[a]:void 0},dg=function(a,c,e){e=(e?"before":"")+"pluginsetup";a.trigger(e,c);a.trigger(e+":"+c.name,c)},fo=function(a,c){var e=function(){dg(this,{name:a,plugin:c,instance:null},!0);var g=c.apply(this,arguments);this.activePlugins_=this.activePlugins_||{};this.activePlugins_[a]=!0;dg(this,{name:a,plugin:c,instance:g});return g};Object.keys(c).forEach(function(g){e[g]=c[g]});return e},xk=function(a,c){c.prototype.name=a;return function(e){for(var g=[], 574l=0;l<arguments.length;++l)g[l-0]=arguments[l];dg(this,{name:a,plugin:c,instance:null},!0);var b=new (Function.prototype.bind.apply(c,[null].concat($jscomp.arrayFromIterable([this].concat($jscomp.arrayFromIterable(g))))));this[a]=function(){return b};dg(this,b.getEventHash());return b}},Wa=function(a){if(this.constructor===Wa)throw Error("Plugin must be sub-classed; not directly instantiated.");this.player=a;this.log||(this.log=this.player.log.createLogger(this.name));Qg(this);delete this.trigger; 575Oi(this,this.constructor.defaultState);var c=this.name;a.activePlugins_=a.activePlugins_||{};a.activePlugins_[c]=!0;this.dispose=this.dispose.bind(this);a.on("dispose",this.dispose)};Wa.prototype.version=function(){return this.constructor.VERSION};Wa.prototype.getEventHash=function(a){a=void 0===a?{}:a;a.name=this.name;a.plugin=this.constructor;a.instance=this;return a};Wa.prototype.trigger=function(a,c){c=void 0===c?{}:c;return Ad(this.eventBusEl_,a,this.getEventHash(c))};Wa.prototype.handleStateChanged= 576function(a){};Wa.prototype.dispose=function(){var a=this.name,c=this.player;this.trigger("dispose");this.off();c.off("dispose",this.dispose);c.activePlugins_[a]=!1;this.player=this.state=null;c[a]=xk(a,Ic[a])};Wa.isBasic=function(a){a="string"===typeof a?cg(a):a;return"function"===typeof a&&!Wa.prototype.isPrototypeOf(a.prototype)};Wa.registerPlugin=function(a,c){if("string"!==typeof a)throw Error('Illegal plugin name, "QVC AEM Commerce Package - Designs Non Transactional", must be a string, was '+ 577typeof a+".");if(Ic.hasOwnProperty(a))sa.warn('A plugin named "QVC AEM Commerce Package - Designs Non Transactional" already exists. You may want to avoid re-registering plugins!');else if(M.prototype.hasOwnProperty(a))throw Error('Illegal plugin name, "QVC AEM Commerce Package - Designs Non Transactional", cannot share a name with an existing player method!');if("function"!==typeof c)throw Error('Illegal plugin for "QVC AEM Commerce Package - Designs Non Transactional", must be a function, was '+ 578typeof c+".");Ic[a]=c;
578"plugin"!==a&&(Wa.isBasic(c)?M.prototype[a]=fo(a,c):M.prototype[a]=xk(a,c));return c};Wa.deregisterPlugin=function(a){if("plugin"===a)throw Error("Cannot de-register base plugin.");Ic.hasOwnProperty(a)&&(delete Ic[a],delete M.prototype[a])};Wa.getPlugins=function(a){a=void 0===a?Object.keys(Ic):a;var c;a.forEach(function(e){var g=cg(e);g&&(c=c||{},c[e]=g)});return c};Wa.getPluginVersion=function(a){return(a=cg(a))&&a.VERSION||""};Wa.getPlugin=cg;Wa.BASE_PLUGIN_NAME="plugin"; 579Wa.registerPlugin("plugin",Wa);M.prototype.usingPlugin=function(a){return!!this.activePlugins_&&!0===this.activePlugins_[a]};M.prototype.hasPlugin=function(a){return!!Ic.hasOwnProperty(a)};var ej=function(a){return 0===a.indexOf("#")?a.slice(1):a};O.hooks_=Dc;O.hooks=Pc;O.hook=function(a,c){Pc(a,c)};O.hookOnce=function(a,c){Pc(a,[].concat(c).map(function(e){var g=function(l){for(var b=[],d=0;d<arguments.length;++d)b[d-0]=arguments[d];Kj(a,g);return e.apply(null,$jscomp.arrayFromIterable(b))};return g}))}; 580O.removeHook=Kj;if(!0!==window.VIDEOJS_NO_DYNAMIC_STYLE&&va()){var eg=Oc(".vjs-styles-defaults");if(!eg){eg=Tj("vjs-styles-defaults");var Fh=Oc("head");Fh&&Fh.insertBefore(eg,Fh.firstChild);Uj(eg,"\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 ")}}Lg(1,O);O.VERSION="8.20.0";O.options=M.prototype.options_;O.getPlayers=function(){return M.players};O.getPlayer=function(a){var c=M.players; 581if("string"===typeof a){a=ej(a);var e=c[a];if(e)return e;a=Oc("#"+a)}if(Y(a)&&(e=a,a=e.player,e=e.playerId,a||c[e]))return a||c[e]};O.getAllPlayers=function(){return Object.keys(M.players).map(function(a){return M.players[a]}).filter(Boolean)};O.players=M.players;O.getComponent=D.getComponent;O.registerComponent=function(a,c){W.isTech(c)&&sa.warn("The QVC AEM Commerce Package - Designs Non Transactional tech was registered as a component. It should instead be registered using videojs.registerTech(name, tech)"); 582return D.registerComponent.call(D,a,c)};O.getTech=W.getTech;O.registerTech=W.registerTech;O.use=function(a,c){dd[a]=dd[a]||[];dd[a].push(c)};Object.defineProperty(O,"middleware",{value:{},writeable:!1,enumerable:!0});Object.defineProperty(O.middleware,"TERMINATOR",{value:pf,writeable:!1,enumerable:!0});O.browser=Qj;O.obj=zn;O.mergeOptions=ec(9,"videojs.mergeOptions","videojs.obj.merge",B);O.defineLazyProperty=ec(9,"videojs.defineLazyProperty","videojs.obj.defineLazyProperty",pa);O.bind=ec(9,"videojs.bind", 583"native Function.prototype.bind",Ka);O.registerPlugin=Wa.registerPlugin;O.deregisterPlugin=Wa.deregisterPlugin;O.plugin=function(a,c){sa.warn("videojs.plugin() is deprecated; use videojs.registerPlugin() instead");return Wa.registerPlugin(a,c)};O.getPlugins=Wa.getPlugins;O.getPlugin=Wa.getPlugin;O.getPluginVersion=Wa.getPluginVersion;O.addLanguage=function(a,c){a=(""+a).toLowerCase();var e={};O.options.languages=B(O.options.languages,(e[a]=c,e));return O.options.languages[a]};O.log=sa;O.createLogger= 584Mj;O.time=Gn;O.createTimeRange=ec(9,"videojs.createTimeRange","videojs.time.createTimeRanges",dc);O.createTimeRanges=ec(9,"videojs.createTimeRanges","videojs.time.createTimeRanges",dc);O.formatTime=ec(9,"videojs.formatTime","videojs.time.formatTime",bd);O.setFormatTime=ec(9,"videojs.setFormatTime","videojs.time.setFormatTime",Qi);O.resetFormatTime=ec(9,"videojs.resetFormatTime","videojs.time.resetFormatTime",Ri);O.parseUrl=ec(9,"videojs.parseUrl","videojs.url.parseUrl",th);O.isCrossOrigin=ec(9,"videojs.isCrossOrigin", 585"videojs.url.isCrossOrigin",Sf);O.EventTarget=hb;O.any=Pg;O.on=Qb;O.one=mf;O.off=tb;O.trigger=Ad;O.xhr=Ta;O.TextTrack=qc;O.AudioTrack=vh;O.VideoTrack=wh;"isEl isTextNode createEl hasClass addClass removeClass toggleClass setAttributes getAttributes emptyEl appendContent insertContent".split(" ").forEach(function(a){O[a]=function(){sa.warn("videojs."+a+"() is deprecated; use videojs.dom."+a+"() instead");return Sj[a].apply(null,arguments)}});O.computedStyle=ec(9,"videojs.computedStyle","videojs.dom.computedStyle", 586zd);O.dom=Sj;O.fn=Dn;O.num=Wn;O.str=Fn;O.url=Ln;O.Error={NetworkBadStatus:"networkbadstatus",NetworkRequestFailed:"networkrequestfailed",NetworkRequestAborted:"networkrequestaborted",NetworkRequestTimeout:"networkrequesttimeout",NetworkBodyParserFailed:"networkbodyparserfailed",StreamingHlsPlaylistParserError:"streaminghlsplaylistparsererror",StreamingDashManifestParserError:"streamingdashmanifestparsererror",StreamingContentSteeringParserError:"streamingcontentsteeringparsererror",StreamingVttParserError:"streamingvttparsererror", 587StreamingFailedToSelectNextSegment:"streamingfailedtoselectnextsegment",StreamingFailedToDecryptSegment:"streamingfailedtodecryptsegment",StreamingFailedToTransmuxSegment:"streamingfailedtotransmuxsegment",StreamingFailedToAppendSegment:"streamingfailedtoappendsegment",StreamingCodecsChangeError:"streamingcodecschangeerror"};nf(function(a,c){(function(e,g){a.exports=g(O)})(Fe,function(e){var g=e&&"object"===typeof e&&"default"in e?e:{"default":e},l=function(m){var p=this;p.id=m.id;p.label=p.id;p.width= 588m.width;p.height=m.height;p.bitrate=m.bandwidth;p.frameRate=m.frameRate;p.enabled_=m.enabled;Object.defineProperty(p,"enabled",{get:function(){return p.enabled_()},set:function(t){p.enabled_(t)}});return p},b=g["default"].EventTarget,d=function(){var m=b.call(this)||this;m.levels_=[];m.selectedIndex_=-1;Object.defineProperty(m,"selectedIndex",{get:function(){return m.selectedIndex_}});Object.defineProperty(m,"length",{get:function(){return m.levels_.length}});m[Symbol.iterator]=function(){return m.levels_.values()}; 589return m};$jscomp.inherits(d,b);d.prototype.addQualityLevel=function(m){var p=this.getQualityLevelById(m.id);if(p)return p;var t=this.levels_.length;p=new l(m);""+t in this||Object.defineProperty(this,t,{get:function(){return this.levels_[t]}});this.levels_.push(p);this.trigger({qualityLevel:p,type:"addqualitylevel"});return p};d.prototype.removeQualityLevel=function(m){for(var p=null,t=0,x=this.length;t<x;t++)if(this[t]===m){p=this.levels_.splice(t,1)[0];this.selectedIndex_===t?this.selectedIndex_= 590-1:this.selectedIndex_>t&&this.selectedIndex_--;break}p&&this.trigger({qualityLevel:m,type:"removequalitylevel"});return p};d.prototype.getQualityLevelById=function(m){for(var p=0,t=this.length;p<t;p++){var x=this[p];if(x.id===m)return x}return null};d.prototype.dispose=function(){this.selectedIndex_=-1;this.levels_.length=0};d.prototype.allowedEvents_={change:"change",addqualitylevel:"addqualitylevel",removequalitylevel:"removequalitylevel"};for(var f in d.prototype.allowedEvents_)d.prototype["on"+ 591f]=null;var h=function(m,p){var t=m.qualityLevels,x=new d,u=function(){x.dispose();m.qualityLevels=t;m.off("dispose",u)};m.on("dispose",u);m.qualityLevels=function(){return x};m.qualityLevels.VERSION="4.1.0";return x};e=function(m){return h(this,g["default"].obj.merge({},m))};g["default"].registerPlugin("qualityLevels",e);e.VERSION="4.1.0";return e})});var qb=function(a,c){if(/^[a-z]+:/i.test(c))return c;/^data:/.test(a)&&(a=window.location&&window.location.href||"");var e=/^\/\//.test(a),g=!window.location&& 592!/\/\//i.test(a);a=new window.URL(a,window.location||"https://example.com");a=new URL(c,a);return g?a.href.slice(19):e?a.href.slice(a.protocol.length):a.href},ae=function(){function a(){this.listeners={}}var c=a.prototype;c.on=function(e,g){this.listeners[e]||(this.listeners[e]=[]);this.listeners[e].push(g)};c.off=function(e,g){if(!this.listeners[e])return!1;g=this.listeners[e].indexOf(g);this.listeners[e]=this.listeners[e].slice(0);this.listeners[e].splice(g,1);return-1<g};c.trigger=function(e){var g= 593this.listeners[e];if(g)if(2===arguments.length)for(var l=g.length,b=0;b<l;++b)g[b].call(this,arguments[1]);
593else{l=Array.prototype.slice.call(arguments,1);b=g.length;for(var d=0;d<b;++d)g[d].apply(this,l)}};c.dispose=function(){this.listeners={}};c.pipe=function(e){this.on("data",function(g){e.push(g)})};return a}(),Gh=function(){var a=ae.call(this)||this;a.buffer="";return a};$jscomp.inherits(Gh,ae);Gh.prototype.push=function(a){this.buffer+=a;for(a=this.buffer.indexOf("\n");-1<a;a=this.buffer.indexOf("\n"))this.trigger("data", 594this.buffer.substring(0,a)),this.buffer=this.buffer.substring(a+1)};var go=String.fromCharCode(9),Hh=function(a){a=/([0-9.]*)?@?([0-9.]*)?/.exec(a||"");var c={};a[1]&&(c.length=parseInt(a[1],10));a[2]&&(c.offset=parseInt(a[2],10));return c},Fb=function(a){var c={};if(!a)return c;a=a.split.call(a,/(?:^|,)((?:[^=]*)=(?:"[^"]*"|[^,]*))/);for(var e=a.length,g;e--;)""!==a[e]&&(g=/([^=]*)=(.*)/.exec(a[e]).slice(1),g[0]=g[0].replace(/^\s+|\s+$/g,""),g[1]=g[1].replace(/^\s+|\s+$/g,""),g[1]=g[1].replace(/^['"](.*)['"]$/g, 595"$1"),c[g[0]]=g[1]);return c},yk=function(a){a=a.split("x");var c={};a[0]&&(c.width=parseInt(a[0],10));a[1]&&(c.height=parseInt(a[1],10));return c},Pe=function(){var a=ae.call(this)||this;a.customParsers=[];a.tagMappers=[];return a};$jscomp.inherits(Pe,ae);Pe.prototype.push=function(a){var c=this,e,g;a=a.trim();0!==a.length&&("#"!==a[0]?this.trigger("data",{type:"uri",uri:a}):this.tagMappers.reduce(function(l,b){b=b(a);return b===a?l:l.concat([b])},[a]).forEach(function(l){for(var b=0;b<c.customParsers.length;b++)if(c.customParsers[b].call(c, 596l))return;if(0!==l.indexOf("#EXT"))c.trigger("data",{type:"comment",text:l.slice(1)});else if(l=l.replace("\r",""),e=/^#EXTM3U/.exec(l))c.trigger("data",{type:"tag",tagType:"m3u"});else if(e=/^#EXTINF:([0-9\.]*)?,?(.*)?$/.exec(l))g={type:"tag",tagType:"inf"},e[1]&&(g.duration=parseFloat(e[1])),e[2]&&(g.title=e[2]),c.trigger("data",g);else if(e=/^#EXT-X-TARGETDURATION:([0-9.]*)?/.exec(l))g={type:"tag",tagType:"targetduration"},e[1]&&(g.duration=parseInt(e[1],10)),c.trigger("data",g);else if(e=/^#EXT-X-VERSION:([0-9.]*)?/.exec(l))g= 597{type:"tag",tagType:"version"},e[1]&&(g.version=parseInt(e[1],10)),c.trigger("data",g);else if(e=/^#EXT-X-MEDIA-SEQUENCE:(\-?[0-9.]*)?/.exec(l))g={type:"tag",tagType:"media-sequence"},e[1]&&(g.number=parseInt(e[1],10)),c.trigger("data",g);else if(e=/^#EXT-X-DISCONTINUITY-SEQUENCE:(\-?[0-9.]*)?/.exec(l))g={type:"tag",tagType:"discontinuity-sequence"},e[1]&&(g.number=parseInt(e[1],10)),c.trigger("data",g);else if(e=/^#EXT-X-PLAYLIST-TYPE:(.*)?$/.exec(l))g={type:"tag",tagType:"playlist-type"},e[1]&& 598(g.playlistType=e[1]),c.trigger("data",g);else if(e=/^#EXT-X-BYTERANGE:(.*)?$/.exec(l))g=jb(Hh(e[1]),{type:"tag",tagType:"byterange"}),c.trigger("data",g);else if(e=/^#EXT-X-ALLOW-CACHE:(YES|NO)?/.exec(l))g={type:"tag",tagType:"allow-cache"},e[1]&&(g.allowed=!/NO/.test(e[1])),c.trigger("data",g);else if(e=/^#EXT-X-MAP:(.*)$/.exec(l)){g={type:"tag",tagType:"map"};if(e[1]){var d=Fb(e[1]);d.URI&&(g.uri=d.URI);d.BYTERANGE&&(g.byterange=Hh(d.BYTERANGE))}c.trigger("data",g)}else if(e=/^#EXT-X-STREAM-INF:(.*)$/.exec(l))g= 599{type:"tag",tagType:"stream-inf"},e[1]&&(g.attributes=Fb(e[1]),g.attributes.RESOLUTION&&(g.attributes.RESOLUTION=yk(g.attributes.RESOLUTION)),g.attributes.BANDWIDTH&&(g.attributes.BANDWIDTH=parseInt(g.attributes.BANDWIDTH,10)),g.attributes["FRAME-RATE"]&&(g.attributes["FRAME-RATE"]=parseFloat(g.attributes["FRAME-RATE"])),g.attributes["PROGRAM-ID"]&&(g.attributes["PROGRAM-ID"]=parseInt(g.attributes["PROGRAM-ID"],10))),c.trigger("data",g);else if(e=/^#EXT-X-MEDIA:(.*)$/.exec(l))g={type:"tag",tagType:"media"}, 600e[1]&&(g.attributes=Fb(e[1])),c.trigger("data",g);else if(e=/^#EXT-X-ENDLIST/.exec(l))c.trigger("data",{type:"tag",tagType:"endlist"});else if(e=/^#EXT-X-DISCONTINUITY/.exec(l))c.trigger("data",{type:"tag",tagType:"discontinuity"});else if(e=/^#EXT-X-PROGRAM-DATE-TIME:(.*)$/.exec(l))g={type:"tag",tagType:"program-date-time"},e[1]&&(g.dateTimeString=e[1],g.dateTimeObject=new Date(e[1])),c.trigger("data",g);else if(e=/^#EXT-X-KEY:(.*)$/.exec(l))g={type:"tag",tagType:"key"},e[1]&&(g.attributes=Fb(e[1]), 601g.attributes.IV&&("0x"===g.attributes.IV.substring(0,2).toLowerCase()&&(g.attributes.IV=g.attributes.IV.substring(2)),g.attributes.IV=g.attributes.IV.match(/.{8}/g),g.attributes.IV[0]=parseInt(g.attributes.IV[0],16),g.attributes.IV[1]=parseInt(g.attributes.IV[1],16),g.attributes.IV[2]=parseInt(g.attributes.IV[2],16),g.attributes.IV[3]=parseInt(g.attributes.IV[3],16),g.attributes.IV=new Uint32Array(g.attributes.IV))),c.trigger("data",g);else if(e=/^#EXT-X-START:(.*)$/.exec(l))g={type:"tag",tagType:"start"}, 602e[1]&&(g.attributes=Fb(e[1]),g.attributes["TIME-OFFSET"]=parseFloat(g.attributes["TIME-OFFSET"]),g.attributes.PRECISE=/YES/.test(g.attributes.PRECISE)),c.trigger("data",g);else if(e=/^#EXT-X-CUE-OUT-CONT:(.*)?$/.exec(l))g={type:"tag",tagType:"cue-out-cont"},g.data=e[1]?e[1]:"",c.trigger("data",g);else if(e=/^#EXT-X-CUE-OUT:(.*)?$/.exec(l))g={type:"tag",tagType:"cue-out"},g.data=e[1]?e[1]:"",c.trigger("data",g);else if(e=/^#EXT-X-CUE-IN:?(.*)?$/.exec(l))g={type:"tag",tagType:"cue-in"},g.data=e[1]? 603e[1]:"",c.trigger("data",g);else if((e=/^#EXT-X-SKIP:(.*)$/.exec(l))&&e[1])g={type:"tag",tagType:"skip"},g.attributes=Fb(e[1]),g.attributes.hasOwnProperty("SKIPPED-SEGMENTS")&&(g.attributes["SKIPPED-SEGMENTS"]=parseInt(g.attributes["SKIPPED-SEGMENTS"],10)),g.attributes.hasOwnProperty("RECENTLY-REMOVED-DATERANGES")&&(g.attributes["RECENTLY-REMOVED-DATERANGES"]=g.attributes["RECENTLY-REMOVED-DATERANGES"].split(go)),c.trigger("data",g);
603else if((e=/^#EXT-X-PART:(.*)$/.exec(l))&&e[1])g={type:"tag",tagType:"part"}, 604g.attributes=Fb(e[1]),["DURATION"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=parseFloat(g.attributes[h]))}),["INDEPENDENT","GAP"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=/YES/.test(g.attributes[h]))}),g.attributes.hasOwnProperty("BYTERANGE")&&(g.attributes.byterange=Hh(g.attributes.BYTERANGE)),c.trigger("data",g);else if((e=/^#EXT-X-SERVER-CONTROL:(.*)$/.exec(l))&&e[1])g={type:"tag",tagType:"server-control"},g.attributes=Fb(e[1]),["CAN-SKIP-UNTIL", 605"PART-HOLD-BACK","HOLD-BACK"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=parseFloat(g.attributes[h]))}),["CAN-SKIP-DATERANGES","CAN-BLOCK-RELOAD"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=/YES/.test(g.attributes[h]))}),c.trigger("data",g);else if((e=/^#EXT-X-PART-INF:(.*)$/.exec(l))&&e[1])g={type:"tag",tagType:"part-inf"},g.attributes=Fb(e[1]),["PART-TARGET"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=parseFloat(g.attributes[h]))}), 606c.trigger("data",g);else if((e=/^#EXT-X-PRELOAD-HINT:(.*)$/.exec(l))&&e[1])g={type:"tag",tagType:"preload-hint"},g.attributes=Fb(e[1]),["BYTERANGE-START","BYTERANGE-LENGTH"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=parseInt(g.attributes[h],10),g.attributes.byterange=g.attributes.byterange||{},g.attributes.byterange["BYTERANGE-LENGTH"===h?"length":"offset"]=g.attributes[h],delete g.attributes[h])}),c.trigger("data",g);else if((e=/^#EXT-X-RENDITION-REPORT:(.*)$/.exec(l))&& 607e[1])g={type:"tag",tagType:"rendition-report"},g.attributes=Fb(e[1]),["LAST-MSN","LAST-PART"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=parseInt(g.attributes[h],10))}),c.trigger("data",g);else if((e=/^#EXT-X-DATERANGE:(.*)$/.exec(l))&&e[1]){g={type:"tag",tagType:"daterange"};g.attributes=Fb(e[1]);["ID","CLASS"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=String(g.attributes[h]))});["START-DATE","END-DATE"].forEach(function(h){g.attributes.hasOwnProperty(h)&& 608(g.attributes[h]=new Date(g.attributes[h]))});["DURATION","PLANNED-DURATION"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=parseFloat(g.attributes[h]))});["END-ON-NEXT"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=/YES/i.test(g.attributes[h]))});["SCTE35-CMD"," SCTE35-OUT","SCTE35-IN"].forEach(function(h){g.attributes.hasOwnProperty(h)&&(g.attributes[h]=g.attributes[h].toString(16))});l=/^X-([A-Z]+-)+[A-Z]+$/;for(d in g.attributes)if(l.test(d)){b=/[0-9A-Fa-f]{6}/g.test(g.attributes[d]); 609var f=/^\d+(\.\d+)?$/.test(g.attributes[d]);g.attributes[d]=b?g.attributes[d].toString(16):f?parseFloat(g.attributes[d]):String(g.attributes[d])}c.trigger("data",g)}else(e=/^#EXT-X-INDEPENDENT-SEGMENTS/.exec(l))?c.trigger("data",{type:"tag",tagType:"independent-segments"}):(e=/^#EXT-X-I-FRAMES-ONLY/.exec(l))?c.trigger("data",{type:"tag",tagType:"i-frames-only"}):(e=/^#EXT-X-CONTENT-STEERING:(.*)$/.exec(l))?(g={type:"tag",tagType:"content-steering"},g.attributes=Fb(e[1]),c.trigger("data",g)):(e=/^#EXT-X-I-FRAME-STREAM-INF:(.*)$/.exec(l))? 610(g={type:"tag",tagType:"i-frame-playlist"},g.attributes=Fb(e[1]),g.attributes.URI&&(g.uri=g.attributes.URI),g.attributes.BANDWIDTH&&(g.attributes.BANDWIDTH=parseInt(g.attributes.BANDWIDTH,10)),g.attributes.RESOLUTION&&(g.attributes.RESOLUTION=yk(g.attributes.RESOLUTION)),g.attributes["AVERAGE-BANDWIDTH"]&&(g.attributes["AVERAGE-BANDWIDTH"]=parseInt(g.attributes["AVERAGE-BANDWIDTH"],10)),g.attributes["FRAME-RATE"]&&(g.attributes["FRAME-RATE"]=parseFloat(g.attributes["FRAME-RATE"])),c.trigger("data", 611g)):(e=/^#EXT-X-DEFINE:(.*)$/.exec(l))?(g={type:"tag",tagType:"define"},g.attributes=Fb(e[1]),c.trigger("data",g)):c.trigger("data",{type:"tag",data:l.slice(4)})}))};Pe.prototype.addParser=function(a){var c=this,e=a.expression,g=a.customType,l=a.dataParser,b=a.segment;"function"!==typeof l&&(l=function(d){return d});this.customParsers.push(function(d){if(e.exec(d))return c.trigger("data",{type:"custom",data:l(d),customType:g,segment:b}),!0})};Pe.prototype.addTagMapper=function(a){var c=a.expression, 612e=a.map;this.tagMappers.push(function(g){return c.test(g)?e(g):g})};var ho=function(a){return a.toLowerCase().replace(/-(\w)/g,function(c){return c[1].toUpperCase()})},Wc=function(a){var c={};
612Object.keys(a).forEach(function(e){c[ho(e)]=a[e]});return c},Ih=function(a){var c=a.serverControl,e=a.targetDuration;a=a.partTargetDuration;if(c){var g=e&&3*e,l=a&&2*a;e&&!c.hasOwnProperty("holdBack")&&(c.holdBack=g,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting HOLD-BACK to targetDuration * 3 ("+ 613g+")."}));g&&c.holdBack<g&&(this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL clamping HOLD-BACK ("+c.holdBack+") to targetDuration * 3 ("+g+")"}),c.holdBack=g);a&&!c.hasOwnProperty("partHoldBack")&&(c.partHoldBack=3*a,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting PART-HOLD-BACK to partTargetDuration * 3 ("+c.partHoldBack+")."}));a&&c.partHoldBack<l&&(this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL clamping PART-HOLD-BACK ("+c.partHoldBack+") to partTargetDuration * 2 ("+l+ 614")."}),c.partHoldBack=l)}},Xc=function(a){a=void 0===a?{}:a;var c=ae.call(this)||this;c.lineStream=new Gh;c.parseStream=new Pe;c.lineStream.pipe(c.parseStream);c.mainDefinitions=a.mainDefinitions||{};c.params=(new URL(a.uri,"https://a.com")).searchParams;c.lastProgramDateTime=null;var e=[],g={},l,b,d=!1,f=function(){},h={AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},m=0;c.manifest={allowCache:!0,discontinuityStarts:[],dateRanges:[],iFramePlaylists:[],segments:[]};var p=0,t=0,x={};c.on("end", 615function(){g.uri||!g.parts&&!g.preloadHints||(!g.map&&l&&(g.map=l),!g.key&&b&&(g.key=b),g.timeline||"number"!==typeof m||(g.timeline=m),c.manifest.preloadSegment=g)});c.parseStream.on("data",function(u){var z,A;if(c.manifest.definitions)for(var F in c.manifest.definitions)if(u.uri&&(u.uri=u.uri.replace("{$"+F+"}",c.manifest.definitions[F])),u.attributes)for(var H in u.attributes)"string"===typeof u.attributes[H]&&(u.attributes[H]=u.attributes[H].replace("{$"+F+"}",c.manifest.definitions[F]));({tag:function(){var L= 616{};((L.version=function(){u.version&&(this.manifest.version=u.version)},L["allow-cache"]=function(){this.manifest.allowCache=u.allowed;"allowed"in u||(this.trigger("info",{message:"defaulting allowCache to YES"}),this.manifest.allowCache=!0)},L.byterange=function(){var I={};"length"in u&&(g.byterange=I,I.length=u.length,"offset"in u||(u.offset=p));"offset"in u&&(g.byterange=I,I.offset=u.offset);p=I.offset+I.length},L.endlist=function(){this.manifest.endList=!0},L.inf=function(){"mediaSequence"in this.manifest|| 617(this.manifest.mediaSequence=0,this.trigger("info",{message:"defaulting media sequence to zero"}));"discontinuitySequence"in this.manifest||(this.manifest.discontinuitySequence=0,this.trigger("info",{message:"defaulting discontinuity sequence to zero"}));u.title&&(g.title=u.title);0<u.duration&&(g.duration=u.duration);0===u.duration&&(g.duration=.01,this.trigger("info",{message:"updating zero segment duration to a small value"}));this.manifest.segments=e},L.key=function(){u.attributes?"NONE"===u.attributes.METHOD? 618b=null:u.attributes.URI?"com.apple.streamingkeydelivery"===u.attributes.KEYFORMAT?(this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.apple.fps.1_0"]={attributes:u.attributes}):"com.microsoft.playready"===u.attributes.KEYFORMAT?(this.manifest.contentProtection=this.manifest.contentProtection||{},this.manifest.contentProtection["com.microsoft.playready"]={uri:u.attributes.URI}):"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"===u.attributes.KEYFORMAT? 619-1===["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].indexOf(u.attributes.METHOD)?this.trigger("warn",{message:"invalid key method provided for Widevine"}):("SAMPLE-AES-CENC"===u.attributes.METHOD&&this.trigger("warn",{message:"SAMPLE-AES-CENC is deprecated, please use SAMPLE-AES-CTR instead"}),"data:text/plain;base64,"!==u.attributes.URI.substring(0,23)?this.trigger("warn",{message:"invalid key URI provided for Widevine"}):u.attributes.KEYID&&"0x"===u.attributes.KEYID.substring(0,2)?(this.manifest.contentProtection= 620this.manifest.contentProtection||{},this.manifest.contentProtection["com.widevine.alpha"]={attributes:{schemeIdUri:u.attributes.KEYFORMAT,keyId:u.attributes.KEYID.substring(2)},pssh:fj(u.attributes.URI.split(",")[1])}):this.trigger("warn",{message:"invalid key ID provided for Widevine"})):(u.attributes.METHOD||this.trigger("warn",{message:"defaulting key method to AES-128"}),b={method:u.attributes.METHOD||"AES-128",uri:u.attributes.URI},"undefined"!==typeof u.attributes.IV&&(b.iv=u.attributes.IV)): 621this.trigger("warn",{message:"ignoring key declaration without URI"}):this.trigger("warn",{message:"ignoring key declaration without attribute list"})},L["media-sequence"]=function(){isFinite(u.number)?this.manifest.mediaSequence=u.number:this.trigger("warn",{message:"ignoring invalid media sequence: "+u.number})},L["discontinuity-sequence"]=function(){isFinite(u.number)?m=this.manifest.discontinuitySequence=u.number:this.trigger("warn",{message:"ignoring invalid discontinuity sequence: "+u.number})}, 622L["playlist-type"]=function(){/VOD|EVENT/.test(u.playlistType)?this.manifest.playlistType=u.playlistType:this.trigger("warn",{message:"ignoring unknown playlist type: "+u.playlist})},L.map=function(){l={};u.uri&&(l.uri=u.uri);u.byterange&&(l.byterange=u.byterange);b&&(l.key=b)},L["stream-inf"]=function(){this.manifest.playlists=e;this.manifest.mediaGroups=this.manifest.mediaGroups||h;u.attributes?(g.attributes||(g.attributes={}),jb(g.attributes,u.attributes)):this.trigger("warn",{message:"ignoring empty stream-inf attributes"})}, 623L.media=function(){this.manifest.mediaGroups=this.manifest.mediaGroups||h;
623if(u.attributes&&u.attributes.TYPE&&u.attributes["GROUP-ID"]&&u.attributes.NAME){var I=this.manifest.mediaGroups[u.attributes.TYPE];I[u.attributes["GROUP-ID"]]=I[u.attributes["GROUP-ID"]]||{};z=I[u.attributes["GROUP-ID"]];A={default:/yes/i.test(u.attributes.DEFAULT)};A.autoselect=A.default?!0:/yes/i.test(u.attributes.AUTOSELECT);u.attributes.LANGUAGE&&(A.language=u.attributes.LANGUAGE);u.attributes.URI&&(A.uri=u.attributes.URI); 624u.attributes["INSTREAM-ID"]&&(A.instreamId=u.attributes["INSTREAM-ID"]);u.attributes.CHARACTERISTICS&&(A.characteristics=u.attributes.CHARACTERISTICS);u.attributes.FORCED&&(A.forced=/yes/i.test(u.attributes.FORCED));z[u.attributes.NAME]=A}else this.trigger("warn",{message:"ignoring incomplete or missing media group"})},L.discontinuity=function(){m+=1;g.discontinuity=!0;this.manifest.discontinuityStarts.push(e.length)},L["program-date-time"]=function(){"undefined"===typeof this.manifest.dateTimeString&& 625(this.manifest.dateTimeString=u.dateTimeString,this.manifest.dateTimeObject=u.dateTimeObject);g.dateTimeString=u.dateTimeString;g.dateTimeObject=u.dateTimeObject;var I=this.lastProgramDateTime;this.lastProgramDateTime=(new Date(u.dateTimeString)).getTime();null===I&&this.manifest.segments.reduceRight(function(N,T){T.programDateTime=N-1E3*T.duration;return T.programDateTime},this.lastProgramDateTime)},L.targetduration=function(){!isFinite(u.duration)||0>u.duration?this.trigger("warn",{message:"ignoring invalid target duration: "+ 626u.duration}):(this.manifest.targetDuration=u.duration,Ih.call(this,this.manifest))},L.start=function(){!u.attributes||isNaN(u.attributes["TIME-OFFSET"])?this.trigger("warn",{message:"ignoring start declaration without appropriate attribute list"}):this.manifest.start={timeOffset:u.attributes["TIME-OFFSET"],precise:u.attributes.PRECISE}},L["cue-out"]=function(){g.cueOut=u.data},L["cue-out-cont"]=function(){g.cueOutCont=u.data},L["cue-in"]=function(){g.cueIn=u.data},L.skip=function(){this.manifest.skip= 627Wc(u.attributes);this.warnOnMissingAttributes_("#EXT-X-SKIP",u.attributes,["SKIPPED-SEGMENTS"])},L.part=function(){var I=this;d=!0;var N=this.manifest.segments.length,T=Wc(u.attributes);g.parts=g.parts||[];g.parts.push(T);T.byterange&&(T.byterange.hasOwnProperty("offset")||(T.byterange.offset=t),t=T.byterange.offset+T.byterange.length);this.warnOnMissingAttributes_("#EXT-X-PART #"+(g.parts.length-1)+" for segment #"+N,u.attributes,["URI","DURATION"]);this.manifest.renditionReports&&this.manifest.renditionReports.forEach(function(fa, 628X){fa.hasOwnProperty("lastPart")||I.trigger("warn",{message:"#EXT-X-RENDITION-REPORT #"+X+" lacks required attribute(s): LAST-PART"})})},L["server-control"]=function(){var I=this.manifest.serverControl=Wc(u.attributes);I.hasOwnProperty("canBlockReload")||(I.canBlockReload=!1,this.trigger("info",{message:"#EXT-X-SERVER-CONTROL defaulting CAN-BLOCK-RELOAD to false"}));Ih.call(this,this.manifest);I.canSkipDateranges&&!I.hasOwnProperty("canSkipUntil")&&this.trigger("warn",{message:"#EXT-X-SERVER-CONTROL lacks required attribute CAN-SKIP-UNTIL which is required when CAN-SKIP-DATERANGES is set"})}, 629L["preload-hint"]=function(){var I=this.manifest.segments.length,N=Wc(u.attributes),T=N.type&&"PART"===N.type;g.preloadHints=g.preloadHints||[];g.preloadHints.push(N);N.byterange&&!N.byterange.hasOwnProperty("offset")&&(N.byterange.offset=T?t:0,T&&(t=N.byterange.offset+N.byterange.length));T=g.preloadHints.length-1;this.warnOnMissingAttributes_("#EXT-X-PRELOAD-HINT #"+T+" for segment #"+I,u.attributes,["TYPE","URI"]);if(N.type)for(var fa=0;fa<g.preloadHints.length-1;
629fa++){var X=g.preloadHints[fa]; 630X.type&&X.type===N.type&&this.trigger("warn",{message:"#EXT-X-PRELOAD-HINT #"+T+" for segment #"+I+" has the same TYPE "+N.type+" as preload hint #"+fa})}},L["rendition-report"]=function(){var I=Wc(u.attributes);this.manifest.renditionReports=this.manifest.renditionReports||[];this.manifest.renditionReports.push(I);I=this.manifest.renditionReports.length-1;var N=["LAST-MSN","URI"];d&&N.push("LAST-PART");this.warnOnMissingAttributes_("#EXT-X-RENDITION-REPORT #"+I,u.attributes,N)},L["part-inf"]=function(){this.manifest.partInf= 631Wc(u.attributes);this.warnOnMissingAttributes_("#EXT-X-PART-INF",u.attributes,["PART-TARGET"]);this.manifest.partInf.partTarget&&(this.manifest.partTargetDuration=this.manifest.partInf.partTarget);Ih.call(this,this.manifest)},L.daterange=function(){this.manifest.dateRanges.push(Wc(u.attributes));var I=this.manifest.dateRanges.length-1;this.warnOnMissingAttributes_("#EXT-X-DATERANGE #"+I,u.attributes,["ID","START-DATE"]);var N=this.manifest.dateRanges[I];N.endDate&&N.startDate&&new Date(N.endDate)< 632new Date(N.startDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE END-DATE must be equal to or later than the value of the START-DATE"});N.duration&&0>N.duration&&this.trigger("warn",{message:"EXT-X-DATERANGE DURATION must not be negative"});N.plannedDuration&&0>N.plannedDuration&&this.trigger("warn",{message:"EXT-X-DATERANGE PLANNED-DURATION must not be negative"});var T=!!N.endOnNext;T&&!N.class&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT\x3dYES attribute must have a CLASS attribute"}); 633T&&(N.duration||N.endDate)&&this.trigger("warn",{message:"EXT-X-DATERANGE with an END-ON-NEXT\x3dYES attribute must not contain DURATION or END-DATE attributes"});N.duration&&N.endDate&&(T=N.startDate.getTime()+1E3*N.duration,this.manifest.dateRanges[I].endDate=new Date(T));if(x[N.id]){for(var fa in x[N.id])if(N[fa]&&JSON.stringify(x[N.id][fa])!==JSON.stringify(N[fa])){this.trigger("warn",{message:"EXT-X-DATERANGE tags with the same ID in a playlist must have the same attributes values"});break}I= 634this.manifest.dateRanges.findIndex(function(X){return X.id===N.id});this.manifest.dateRanges[I]=jb(this.manifest.dateRanges[I],N);x[N.id]=jb(x[N.id],N);this.manifest.dateRanges.pop()}else x[N.id]=N},L["independent-segments"]=function(){this.manifest.independentSegments=!0},L["i-frames-only"]=function(){this.manifest.iFramesOnly=!0;this.requiredCompatibilityversion(this.manifest.version,4)},L["content-steering"]=function(){this.manifest.contentSteering=Wc(u.attributes);this.warnOnMissingAttributes_("#EXT-X-CONTENT-STEERING", 635u.attributes,["SERVER-URI"])},L.define=function(){var I=this;this.manifest.definitions=this.manifest.definitions||{};var N=function(fa,X){fa in I.manifest.definitions?I.trigger("error",{message:"EXT-X-DEFINE: Duplicate name "+fa}):I.manifest.definitions[fa]=X};if("QUERYPARAM"in u.attributes)if("NAME"in u.attributes||"IMPORT"in u.attributes)this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"});else{var T=this.params.get(u.attributes.QUERYPARAM);T?N(u.attributes.QUERYPARAM,decodeURIComponent(T)): 636this.trigger("error",{message:"EXT-X-DEFINE: No query param "+u.attributes.QUERYPARAM})}else"NAME"in u.attributes?"IMPORT"in u.attributes?this.trigger("error",{message:"EXT-X-DEFINE: Invalid attributes"}):"VALUE"in u.attributes&&"string"===typeof u.attributes.VALUE?N(u.attributes.NAME,u.attributes.VALUE):this.trigger("error",{message:"EXT-X-DEFINE: No value for "+u.attributes.NAME}):"IMPORT"in u.attributes?this.mainDefinitions[u.attributes.IMPORT]?N(u.attributes.IMPORT,this.mainDefinitions[u.attributes.IMPORT]): 637this.trigger("error",{message:"EXT-X-DEFINE: No value "+u.attributes.IMPORT+" to import, or IMPORT used on main playlist"}):this.trigger("error",{message:"EXT-X-DEFINE: No attribute"})},L["i-frame-playlist"]=function(){this.manifest.iFramePlaylists.push({attributes:u.attributes,uri:u.uri,timeline:m});this.warnOnMissingAttributes_("#EXT-X-I-FRAME-STREAM-INF",u.attributes,["BANDWIDTH","URI"])},L)[u.tagType]||f).call(c)},uri:function(){g.uri=u.uri;e.push(g);!this.manifest.targetDuration||"duration"in 638g||(this.trigger("warn",{message:"defaulting segment duration to the target duration"}),g.duration=this.manifest.targetDuration);b&&(g.key=b);g.timeline=m;l&&(g.map=l);t=0;null!==this.lastProgramDateTime&&(g.programDateTime=this.lastProgramDateTime,this.lastProgramDateTime+=1E3*g.duration);g={}},comment:function(){},custom:function(){u.segment?(g.custom=g.custom||{},g.custom[u.customType]=u.data):(this.manifest.custom=this.manifest.custom||{},this.manifest.custom[u.customType]=u.data)}})[u.type].call(c)}); 639return c};$jscomp.inherits(Xc,ae);Xc.prototype.requiredCompatibilityversion=function(a,c){(a<c||!a)&&this.trigger("warn",{message:"manifest must be at least version "+c})};Xc.prototype.warnOnMissingAttributes_=function(a,c,e){var g=[];e.forEach(function(l){c.hasOwnProperty(l)||g.push(l)});g.length&&this.trigger("warn",{message:a+" lacks required attribute(s): "+g.join(", ")})};Xc.prototype.push=function(a){this.lineStream.push(a)};Xc.prototype.end=function(){this.lineStream.push("\n");this.manifest.dateRanges.length&& 640null===this.lastProgramDateTime&&this.trigger("warn",{message:"A playlist with EXT-X-DATERANGE tag must contain atleast one EXT-X-PROGRAM-DATE-TIME tag"});this.lastProgramDateTime=null;this.trigger("end")};Xc.prototype.addParser=function(a){this.parseStream.addParser(a)};Xc.prototype.addTagMapper=function(a){this.parseStream.addTagMapper(a)};var rd={mp4:/^(av0?1|avc0?[1234]|vp0?9|flac|opus|mp3|mp4a|mp4v|stpp.ttml.im1t)/,webm:/^(vp0?[89]|av0?1|opus|vorbis)/,ogg:/^(vp0?[89]|theora|flac|opus|vorbis)/, 641video:/^(av0?1|avc0?[1234]|vp0?[89]|hvc1|hev1|theora|mp4v)/,audio:/^(mp4a|flac|vorbis|opus|ac-[34]|ec-3|alac|mp3|speex|aac)/,text:/^(stpp.ttml.im1t)/,muxerVideo:/^(avc0?1)/,muxerAudio:/^(mp4a)/,muxerText:/a^/},io=["video","audio","text"],zk=["Video","Audio","Text"],Ak=function(a){return a?a.replace(/avc1\.(\d+)\.(\d+)/i,function(c,e,g){c=("00"+Number(e).toString(16)).slice(-2);g=("00"+Number(g).toString(16)).slice(-2);return"avc1."+c+"00"+g}):a},tc=function(a){void 0===a&&(a="");var c=[];a.split(",").forEach(function(e){e= 642e.trim();var g;
642io.forEach(function(l){var b=rd[l].exec(e.toLowerCase());if(b&&!(1>=b.length)){g=l;b=e.substring(0,b[1].length);var d=e.replace(b,"");c.push({type:b,details:d,mediaType:l})}});g||c.push({type:e,details:"",mediaType:"unknown"})});return c},jo=function(a,c){if(!a.mediaGroups.AUDIO||!c)return null;a=a.mediaGroups.AUDIO[c];if(!a)return null;for(var e in a)if(c=a[e],c.default&&c.playlists)return tc(c.playlists[0].attributes.CODECS);return null},Bk=function(a){void 0===a&&(a="");return rd.audio.test(a.trim().toLowerCase())}, 643ko=function(a){void 0===a&&(a="");return rd.text.test(a.trim().toLowerCase())},be=function(a){if(a&&"string"===typeof a){var c=a.toLowerCase().split(",").map(function(l){return Ak(l.trim())}),e="video";1===c.length&&Bk(c[0])?e="audio":1===c.length&&ko(c[0])&&(e="application");var g="mp4";c.every(function(l){return rd.mp4.test(l)})?g="mp4":c.every(function(l){return rd.webm.test(l)})?g="webm":c.every(function(l){return rd.ogg.test(l)})&&(g="ogg");return e+"/"+g+';codecs\x3d"'+a+'"'}},Qe=function(a, 644c){void 0===a&&(a="");void 0===c&&(c=!1);return window.MediaSource&&window.MediaSource.isTypeSupported&&window.MediaSource.isTypeSupported(be(a))||c&&window.ManagedMediaSource&&window.ManagedMediaSource.isTypeSupported&&window.ManagedMediaSource.isTypeSupported(be(a))||!1},Jh=function(a){void 0===a&&(a="");return a.toLowerCase().split(",").every(function(c){c=c.trim();for(var e=0;e<zk.length;e++)if(rd["muxer"+zk[e]].test(c))return!0;return!1})},lo=/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i, 645mo=/^application\/dash\+xml/i,Ck=function(a){return lo.test(a)?"hls":mo.test(a)?"dash":"application/vnd.videojs.vhs+json"===a?"vhs-json":null},Dk=function(a){return"function"===ArrayBuffer.isView?ArrayBuffer.isView(a):a&&a.buffer instanceof ArrayBuffer},ka=function(a){if(a instanceof Uint8Array)return a;Array.isArray(a)||Dk(a)||a instanceof ArrayBuffer||(a="number"!==typeof a||"number"===typeof a&&a!==a?0:[a]);return new Uint8Array(a&&a.buffer||a,a&&a.byteOffset||0,a&&a.byteLength||0)},rb=window.BigInt|| 646Number,Kh=[rb("0x1"),rb("0x100"),rb("0x10000"),rb("0x1000000"),rb("0x100000000"),rb("0x10000000000"),rb("0x1000000000000"),rb("0x100000000000000"),rb("0x10000000000000000")];(function(){var a=new Uint16Array([65484]);a=new Uint8Array(a.buffer,a.byteOffset,a.byteLength);return 255===a[0]?"big":204===a[0]?"little":"unknown"})();var no=function(a,c){var e=void 0===c?{}:c;c=e.signed;c=void 0===c?!1:c;e=e.le;var g=void 0===e?!1:e;a=ka(a);e=g?"reduce":"reduceRight";e=(a[e]?a[e]:Array.prototype[e]).call(a, 647function(l,b,d){d=g?d:Math.abs(d+1-a.length);return l+rb(b)*Kh[d]},rb(0));c&&(c=Kh[a.length]/rb(2)-rb(1),e=rb(e),e>c&&(e=e-c-c-rb(2)));return Number(e)},oo=function(a,c){c=(void 0===c?{}:c).le;c=void 0===c?!1:c;if("bigint"!==typeof a&&"number"!==typeof a||"number"===typeof a&&a!==a)a=0;a=rb(a);for(var e=Math.ceil(a.toString(2).length/8),g=new Uint8Array(new ArrayBuffer(e)),l=0;l<e;l++){var b=c?l:Math.abs(l+1-g.length);g[b]=Number(a/Kh[l]&rb(255));0>a&&(g[b]=Math.abs(~g[b]),g[b]-=0===l?1:2)}return g}, 648Ek=function(a,c){"string"!==typeof a&&a&&"function"===typeof a.toString&&(a=a.toString());if("string"!==typeof a)return new Uint8Array;c||(a=unescape(encodeURIComponent(a)));c=new Uint8Array(a.length);for(var e=0;e<a.length;e++)c[e]=a.charCodeAt(e);return c},po=function(){for(var a=arguments.length,c=Array(a),e=0;e<a;e++)c[e]=arguments[e];c=c.filter(function(b){return b&&(b.byteLength||b.length)&&"string"!==typeof b});if(1>=c.length)return ka(c[0]);a=c.reduce(function(b,d,f){return b+(d.byteLength|| 649d.length)},0);var g=new Uint8Array(a),l=0;c.forEach(function(b){b=ka(b);g.set(b,l);l+=b.byteLength});return g},Oa=function(a,c,e){e=void 0===e?{}:e;var g=e.offset,l=void 0===g?0:g;e=e.mask;var b=void 0===e?[]:e;a=ka(a);c=ka(c);e=c.every?c.every:Array.prototype.every;return c.length&&a.length-l>=c.length&&e.call(c,function(d,f){return d===(b[f]?b[f]&a[l+f]:a[l+f])})},qo=function(a,c,e){c.forEach(function(g){for(var l in a.mediaGroups[g])for(var b in a.mediaGroups[g][l])e(a.mediaGroups[g][l][b],g,l, 650b)})},ro=sf({HTML:"text/html",isHTML:function(a){return a===ro.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Fk=sf({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(a){return a===Fk.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"}),fg=Fk,mc=function(a,c,e){void 0===e&&(e=Array.prototype);if(a&&"function"===typeof e.find)return e.find.call(a, 651c);for(e=0;e<a.length;e++)if(Object.prototype.hasOwnProperty.call(a,e)){var g=a[e];if(c.call(void 0,g,e,a))return g}},Dd=fg,Mb={},fc=Mb.ELEMENT_NODE=1,Gd=Mb.ATTRIBUTE_NODE=2,xf=Mb.TEXT_NODE=3,wj=Mb.CDATA_SECTION_NODE=4,Aj=Mb.ENTITY_REFERENCE_NODE=5,so=Mb.ENTITY_NODE=6,zj=Mb.PROCESSING_INSTRUCTION_NODE=7,xj=Mb.COMMENT_NODE=8,vj=Mb.DOCUMENT_NODE=9,yj=Mb.DOCUMENT_TYPE_NODE=10,Bc=Mb.DOCUMENT_FRAGMENT_NODE=11,to=Mb.NOTATION_NODE=12,wb={},lb={};wb.INDEX_SIZE_ERR=(lb[1]="Index size error",1);wb.DOMSTRING_SIZE_ERR= 652(lb[2]="DOMString size error",2);var Lb=wb.HIERARCHY_REQUEST_ERR=(lb[3]="Hierarchy request error",3);wb.WRONG_DOCUMENT_ERR=(lb[4]="Wrong document",4);wb.INVALID_CHARACTER_ERR=(lb[5]="Invalid character",5);
652wb.NO_DATA_ALLOWED_ERR=(lb[6]="No data allowed",6);wb.NO_MODIFICATION_ALLOWED_ERR=(lb[7]="No modification allowed",7);var lj=wb.NOT_FOUND_ERR=(lb[8]="Not found",8);wb.NOT_SUPPORTED_ERR=(lb[9]="Not supported",9);var Gk=wb.INUSE_ATTRIBUTE_ERR=(lb[10]="Attribute in use",10);wb.INVALID_STATE_ERR=(lb[11]= 653"Invalid state",11);wb.SYNTAX_ERR=(lb[12]="Syntax error",12);wb.INVALID_MODIFICATION_ERR=(lb[13]="Invalid modification",13);wb.NAMESPACE_ERR=(lb[14]="Invalid namespace",14);wb.INVALID_ACCESS_ERR=(lb[15]="Invalid access",15);bb.prototype=Error.prototype;ue(wb,bb);Qc.prototype={length:0,item:function(a){return 0<=a&&a<this.length?this[a]:null},toString:function(a,c){for(var e=[],g=0;g<this.length;g++)Fd(this[g],e,a,c);return e.join("")},filter:function(a){return Array.prototype.filter.call(this,a)}, 654indexOf:function(a){return Array.prototype.indexOf.call(this,a)}};Cd.prototype.item=function(a){ah(this);return this[a]||null};Kb(Cd,Qc);tf.prototype={length:0,item:Qc.prototype.item,getNamedItem:function(a){for(var c=this.length;c--;){var e=this[c];if(e.nodeName==a)return e}},setNamedItem:function(a){var c=a.ownerElement;if(c&&c!=this._ownerElement)throw new bb(Gk);c=this.getNamedItem(a.nodeName);jj(this._ownerElement,this,a,c);return c},setNamedItemNS:function(a){var c=a.ownerElement;if(c&&c!=this._ownerElement)throw new bb(Gk); 655c=this.getNamedItemNS(a.namespaceURI,a.localName);jj(this._ownerElement,this,a,c);return c},removeNamedItem:function(a){a=this.getNamedItem(a);kj(this._ownerElement,this,a);return a},removeNamedItemNS:function(a,c){a=this.getNamedItemNS(a,c);kj(this._ownerElement,this,a);return a},getNamedItemNS:function(a,c){for(var e=this.length;e--;){var g=this[e];if(g.localName==c&&g.namespaceURI==a)return g}return null}};mj.prototype={hasFeature:function(a,c){return!0},createDocument:function(a,c,e){var g=new we; 656g.implementation=this;g.childNodes=new Qc;g.doctype=e||null;e&&g.appendChild(e);c&&(a=g.createElementNS(a,c),g.appendChild(a));return g},createDocumentType:function(a,c,e){var g=new gh;g.name=a;g.nodeName=a;g.publicId=c||"";g.systemId=e||"";return g}};Ha.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(a,c){return uf(this, 657a,c)},replaceChild:function(a,c){uf(this,a,c,rj);c&&this.removeChild(c)},removeChild:function(a){return oj(this,a)},appendChild:function(a){return this.insertBefore(a,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(a){return kh(this.ownerDocument||this,this,a)},normalize:function(){for(var a=this.firstChild;a;){var c=a.nextSibling;c&&c.nodeType==xf&&a.nodeType==xf?(this.removeChild(c),a.appendData(c.data)):(a.normalize(),a=c)}},isSupported:function(a,c){return this.ownerDocument.implementation.hasFeature(a, 658c)},hasAttributes:function(){return 0<this.attributes.length},lookupPrefix:function(a){for(var c=this;c;){var e=c._nsMap;if(e)for(var g in e)if(Object.prototype.hasOwnProperty.call(e,g)&&e[g]===a)return g;c=c.nodeType==Gd?c.ownerDocument:c.parentNode}return null},lookupNamespaceURI:function(a){for(var c=this;c;){var e=c._nsMap;if(e&&Object.prototype.hasOwnProperty.call(e,a))return e[a];c=c.nodeType==Gd?c.ownerDocument:c.parentNode}return null},isDefaultNamespace:function(a){return null==this.lookupPrefix(a)}}; 659ue(Mb,Ha);ue(Mb,Ha.prototype);we.prototype={nodeName:"#document",nodeType:vj,doctype:null,documentElement:null,_inc:1,insertBefore:function(a,c){if(a.nodeType==Bc){for(var e=a.firstChild;e;){var g=e.nextSibling;this.insertBefore(e,c);e=g}return a}uf(this,a,c);a.ownerDocument=this;null===this.documentElement&&a.nodeType===fc&&(this.documentElement=a);return a},removeChild:function(a){this.documentElement==a&&(this.documentElement=null);return oj(this,a)},replaceChild:function(a,c){uf(this,a,c,rj); 660a.ownerDocument=this;c&&this.removeChild(c);lc(a)&&(this.documentElement=a)},importNode:function(a,c){return Bj(this,a,c)},getElementById:function(a){var c=null;ve(this.documentElement,function(e){if(e.nodeType==fc&&e.getAttribute("id")==a)return c=e,!0}
660);return c},getElementsByClassName:function(a){var c=gj(a);return new Cd(this,function(e){var g=[];0<c.length&&ve(e.documentElement,function(l){if(l!==e&&l.nodeType===fc){var b=l.getAttribute("class");if(b){var d=a===b;d||(b=gj(b),d=c.every(pn(b))); 661d&&g.push(l)}}});return g})},createElement:function(a){var c=new Ed;c.ownerDocument=this;c.nodeName=a;c.tagName=a;c.localName=a;c.childNodes=new Qc;return(c.attributes=new tf)._ownerElement=c},createDocumentFragment:function(){var a=new wf;a.ownerDocument=this;a.childNodes=new Qc;return a},createTextNode:function(a){var c=new dh;c.ownerDocument=this;c.appendData(a);return c},createComment:function(a){var c=new eh;c.ownerDocument=this;c.appendData(a);return c},createCDATASection:function(a){var c= 662new fh;c.ownerDocument=this;c.appendData(a);return c},createProcessingInstruction:function(a,c){var e=new ih;e.ownerDocument=this;e.tagName=e.nodeName=e.target=a;e.nodeValue=e.data=c;return e},createAttribute:function(a){var c=new vf;c.ownerDocument=this;c.name=a;c.nodeName=a;c.localName=a;c.specified=!0;return c},createEntityReference:function(a){var c=new hh;c.ownerDocument=this;c.nodeName=a;return c},createElementNS:function(a,c){var e=new Ed,g=c.split(":"),l=e.attributes=new tf;e.childNodes=new Qc; 663e.ownerDocument=this;e.nodeName=c;e.tagName=c;e.namespaceURI=a;2==g.length?(e.prefix=g[0],e.localName=g[1]):e.localName=c;return l._ownerElement=e},createAttributeNS:function(a,c){var e=new vf,g=c.split(":");e.ownerDocument=this;e.nodeName=c;e.name=c;e.namespaceURI=a;e.specified=!0;2==g.length?(e.prefix=g[0],e.localName=g[1]):e.localName=c;return e}};Kb(we,Ha);Ed.prototype={nodeType:fc,hasAttribute:function(a){return null!=this.getAttributeNode(a)},getAttribute:function(a){return(a=this.getAttributeNode(a))&& 664a.value||""},getAttributeNode:function(a){return this.attributes.getNamedItem(a)},setAttribute:function(a,c){a=this.ownerDocument.createAttribute(a);a.value=a.nodeValue=""+c;this.setAttributeNode(a)},removeAttribute:function(a){(a=this.getAttributeNode(a))&&this.removeAttributeNode(a)},appendChild:function(a){if(a.nodeType===Bc)return this.insertBefore(a,null);a.parentNode&&a.parentNode.removeChild(a);a.parentNode=this;a.previousSibling=this.lastChild;a.nextSibling=null;a.previousSibling?a.previousSibling.nextSibling= 665a:this.firstChild=a;this.lastChild=a;bh(this.ownerDocument,this,a);return a},setAttributeNode:function(a){return this.attributes.setNamedItem(a)},setAttributeNodeNS:function(a){return this.attributes.setNamedItemNS(a)},removeAttributeNode:function(a){return this.attributes.removeNamedItem(a.nodeName)},removeAttributeNS:function(a,c){(a=this.getAttributeNodeNS(a,c))&&this.removeAttributeNode(a)},hasAttributeNS:function(a,c){return null!=this.getAttributeNodeNS(a,c)},getAttributeNS:function(a,c){return(a= 666this.getAttributeNodeNS(a,c))&&a.value||""},setAttributeNS:function(a,c,e){a=this.ownerDocument.createAttributeNS(a,c);a.value=a.nodeValue=""+e;this.setAttributeNode(a)},getAttributeNodeNS:function(a,c){return this.attributes.getNamedItemNS(a,c)},getElementsByTagName:function(a){return new Cd(this,function(c){var e=[];ve(c,function(g){g===c||g.nodeType!=fc||"*"!==a&&g.tagName!=a||e.push(g)});return e})},getElementsByTagNameNS:function(a,c){return new Cd(this,function(e){var g=[];ve(e,function(l){l=== 667e||l.nodeType!==fc||"*"!==a&&l.namespaceURI!==a||"*"!==c&&l.localName!=c||g.push(l)});return g})}};we.prototype.getElementsByTagName=Ed.prototype.getElementsByTagName;we.prototype.getElementsByTagNameNS=Ed.prototype.getElementsByTagNameNS;Kb(Ed,Ha);vf.prototype.nodeType=Gd;Kb(vf,Ha);xe.prototype={data:"",substringData:function(a,c){return this.data.substring(a,a+c)},appendData:function(a){this.nodeValue=this.data=a=this.data+a;this.length=a.length},insertData:function(a,c){this.replaceData(a,0,c)}, 668appendChild:function(a){throw Error(lb[Lb]);},deleteData:function(a,c){this.replaceData(a,c,"")},replaceData:function(a,c,e){var g=this.data.substring(0,a);a=this.data.substring(a+c);this.nodeValue=this.data=e=g+e+a;this.length=e.length}};Kb(xe,Ha);dh.prototype={nodeName:"#text",nodeType:xf,splitText:function(a){var c=this.data,e=c.substring(a);this.data=this.nodeValue=c=c.substring(0,a);this.length=c.length;a=this.ownerDocument.createTextNode(e);this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling); 669return a}};
669Kb(dh,xe);eh.prototype={nodeName:"#comment",nodeType:xj};Kb(eh,xe);fh.prototype={nodeName:"#cdata-section",nodeType:wj};Kb(fh,xe);gh.prototype.nodeType=yj;Kb(gh,Ha);sj.prototype.nodeType=to;Kb(sj,Ha);tj.prototype.nodeType=so;Kb(tj,Ha);hh.prototype.nodeType=Aj;Kb(hh,Ha);wf.prototype.nodeName="#document-fragment";wf.prototype.nodeType=Bc;Kb(wf,Ha);ih.prototype.nodeType=zj;Kb(ih,Ha);Ha.prototype.toString=function(a,c){var e=[],g=9==this.nodeType&&this.documentElement||this,l=g.prefix,b=g.namespaceURI; 670if(b&&null==l&&(l=g.lookupPrefix(b),null==l))var d=[{namespace:b,prefix:null}];Fd(this,e,a,c,d);return e.join("")};try{if(Object.defineProperty){var Hk=function(a){switch(a.nodeType){case fc:case Bc:var c=[];for(a=a.firstChild;a;)7!==a.nodeType&&8!==a.nodeType&&c.push(Hk(a)),a=a.nextSibling;return c.join("");default:return a.nodeValue}};Object.defineProperty(Cd.prototype,"length",{get:function(){ah(this);return this.$$length}});Object.defineProperty(Ha.prototype,"textContent",{get:function(){return Hk(this)}, 671set:function(a){switch(this.nodeType){case fc:case Bc:for(;this.firstChild;)this.removeChild(this.firstChild);(a||String(a))&&this.appendChild(this.ownerDocument.createTextNode(a));break;default:this.nodeValue=this.value=this.data=a}}});hj=function(a,c,e){a["$$"+c]=e}}}catch(a){}var Re=nf(function(a,c){c.XML_ENTITIES=sf({amp:"\x26",apos:"'",gt:"\x3e",lt:"\x3c",quot:'"'});c.HTML_ENTITIES=sf({Aacute:"\u00c1",aacute:"\u00e1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223e",acd:"\u223f",acE:"\u223e\u0333", 672Acirc:"\u00c2",acirc:"\u00e2",acute:"\u00b4",Acy:"\u0410",acy:"\u0430",AElig:"\u00c6",aelig:"\u00e6",af:"\u2061",Afr:"\ud835\udd04",afr:"\ud835\udd1e",Agrave:"\u00c0",agrave:"\u00e0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03b1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2a3f",AMP:"\x26",amp:"\x26",And:"\u2a53",and:"\u2227",andand:"\u2a55",andd:"\u2a5c",andslope:"\u2a58",andv:"\u2a5a",ang:"\u2220",ange:"\u29a4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29a8",angmsdab:"\u29a9",angmsdac:"\u29aa", 673angmsdad:"\u29ab",angmsdae:"\u29ac",angmsdaf:"\u29ad",angmsdag:"\u29ae",angmsdah:"\u29af",angrt:"\u221f",angrtvb:"\u22be",angrtvbd:"\u299d",angsph:"\u2222",angst:"\u00c5",angzarr:"\u237c",Aogon:"\u0104",aogon:"\u0105",Aopf:"\ud835\udd38",aopf:"\ud835\udd52",ap:"\u2248",apacir:"\u2a6f",apE:"\u2a70",ape:"\u224a",apid:"\u224b",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224a",Aring:"\u00c5",aring:"\u00e5",Ascr:"\ud835\udc9c",ascr:"\ud835\udcb6",Assign:"\u2254",ast:"*",asymp:"\u2248", 674asympeq:"\u224d",Atilde:"\u00c3",atilde:"\u00e3",Auml:"\u00c4",auml:"\u00e4",awconint:"\u2233",awint:"\u2a11",backcong:"\u224c",backepsilon:"\u03f6",backprime:"\u2035",backsim:"\u223d",backsimeq:"\u22cd",Backslash:"\u2216",Barv:"\u2ae7",barvee:"\u22bd",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23b5",bbrktbrk:"\u23b6",bcong:"\u224c",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201e",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29b0",bepsi:"\u03f6",bernou:"\u212c",Bernoullis:"\u212c", 675Beta:"\u0392",beta:"\u03b2",beth:"\u2136",between:"\u226c",Bfr:"\ud835\udd05",bfr:"\ud835\udd1f",bigcap:"\u22c2",bigcirc:"\u25ef",bigcup:"\u22c3",bigodot:"\u2a00",bigoplus:"\u2a01",bigotimes:"\u2a02",bigsqcup:"\u2a06",bigstar:"\u2605",bigtriangledown:"\u25bd",bigtriangleup:"\u25b3",biguplus:"\u2a04",bigvee:"\u22c1",bigwedge:"\u22c0",bkarow:"\u290d",blacklozenge:"\u29eb",blacksquare:"\u25aa",blacktriangle:"\u25b4",blacktriangledown:"\u25be",blacktriangleleft:"\u25c2",blacktriangleright:"\u25b8",blank:"\u2423", 676blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"\x3d\u20e5",bnequiv:"\u2261\u20e5",bNot:"\u2aed",bnot:"\u2310",Bopf:"\ud835\udd39",bopf:"\ud835\udd53",bot:"\u22a5",bottom:"\u22a5",bowtie:"\u22c8",boxbox:"\u29c9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250c",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252c",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229f", 677boxplus:"\u229e",boxtimes:"\u22a0",boxUL:"\u255d",boxUl:"\u255c",boxuL:"\u255b",boxul:"\u2518",boxUR:"\u255a",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256c",boxVh:"\u256b",boxvH:"\u256a",boxvh:"\u253c",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255f",boxvR:"\u255e",boxvr:"\u251c",bprime:"\u2035",Breve:"\u02d8",breve:"\u02d8",brvbar:"\u00a6",Bscr:"\u212c",bscr:"\ud835\udcb7",bsemi:"\u204f",bsim:"\u223d",bsime:"\u22cd", 678bsol:"\\",bsolb:"\u29c5",bsolhsub:"\u27c8",bull:"\u2022",bullet:"\u2022",bump:"\u224e",bumpE:"\u2aae",bumpe:"\u224f",Bumpeq:"\u224e",bumpeq:"\u224f",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22d2",cap:"\u2229",capand:"\u2a44",capbrcup:"\u2a49",capcap:"\u2a4b",capcup:"\u2a47",capdot:"\u2a40",CapitalDifferentialD:"\u2145",caps:"\u2229\ufe00",caret:"\u2041",caron:"\u02c7",Cayleys:"\u212d",ccaps:"\u2a4d",Ccaron:"\u010c",ccaron:"\u010d",Ccedil
678:"\u00c7",ccedil:"\u00e7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230", 679ccups:"\u2a4c",ccupssm:"\u2a50",Cdot:"\u010a",cdot:"\u010b",cedil:"\u00b8",Cedilla:"\u00b8",cemptyv:"\u29b2",cent:"\u00a2",CenterDot:"\u00b7",centerdot:"\u00b7",Cfr:"\u212d",cfr:"\ud835\udd20",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03a7",chi:"\u03c7",cir:"\u25cb",circ:"\u02c6",circeq:"\u2257",circlearrowleft:"\u21ba",circlearrowright:"\u21bb",circledast:"\u229b",circledcirc:"\u229a",circleddash:"\u229d",CircleDot:"\u2299",circledR:"\u00ae",circledS:"\u24c8",CircleMinus:"\u2296", 680CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29c3",cire:"\u2257",cirfnint:"\u2a10",cirmid:"\u2aef",cirscir:"\u29c2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201d",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2a74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2a6d",Congruent:"\u2261",Conint:"\u222f",conint:"\u222e",ContourIntegral:"\u222e", 681Copf:"\u2102",copf:"\ud835\udd54",coprod:"\u2210",Coproduct:"\u2210",COPY:"\u00a9",copy:"\u00a9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21b5",Cross:"\u2a2f",cross:"\u2717",Cscr:"\ud835\udc9e",cscr:"\ud835\udcb8",csub:"\u2acf",csube:"\u2ad1",csup:"\u2ad0",csupe:"\u2ad2",ctdot:"\u22ef",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22de",cuesc:"\u22df",cularr:"\u21b6",cularrp:"\u293d",Cup:"\u22d3",cup:"\u222a",cupbrcap:"\u2a48",CupCap:"\u224d",cupcap:"\u2a46",cupcup:"\u2a4a", 682cupdot:"\u228d",cupor:"\u2a45",cups:"\u222a\ufe00",curarr:"\u21b7",curarrm:"\u293c",curlyeqprec:"\u22de",curlyeqsucc:"\u22df",curlyvee:"\u22ce",curlywedge:"\u22cf",curren:"\u00a4",curvearrowleft:"\u21b6",curvearrowright:"\u21b7",cuvee:"\u22ce",cuwed:"\u22cf",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232d",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21a1",dArr:"\u21d3",darr:"\u2193",dash:"\u2010",Dashv:"\u2ae4",dashv:"\u22a3",dbkarow:"\u290f",dblac:"\u02dd",Dcaron:"\u010e",dcaron:"\u010f", 683Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21ca",DDotrahd:"\u2911",ddotseq:"\u2a77",deg:"\u00b0",Del:"\u2207",Delta:"\u0394",delta:"\u03b4",demptyv:"\u29b1",dfisht:"\u297f",Dfr:"\ud835\udd07",dfr:"\ud835\udd21",dHar:"\u2965",dharl:"\u21c3",dharr:"\u21c2",DiacriticalAcute:"\u00b4",DiacriticalDot:"\u02d9",DiacriticalDoubleAcute:"\u02dd",DiacriticalGrave:"`",DiacriticalTilde:"\u02dc",diam:"\u22c4",Diamond:"\u22c4",diamond:"\u22c4",diamondsuit:"\u2666",diams:"\u2666", 684die:"\u00a8",DifferentialD:"\u2146",digamma:"\u03dd",disin:"\u22f2",div:"\u00f7",divide:"\u00f7",divideontimes:"\u22c7",divonx:"\u22c7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231e",dlcrop:"\u230d",dollar:"$",Dopf:"\ud835\udd3b",dopf:"\ud835\udd55",Dot:"\u00a8",dot:"\u02d9",DotDot:"\u20dc",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22a1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222f",DoubleDot:"\u00a8",DoubleDownArrow:"\u21d3",DoubleLeftArrow:"\u21d0", 685DoubleLeftRightArrow:"\u21d4",DoubleLeftTee:"\u2ae4",DoubleLongLeftArrow:"\u27f8",DoubleLongLeftRightArrow:"\u27fa",DoubleLongRightArrow:"\u27f9",DoubleRightArrow:"\u21d2",DoubleRightTee:"\u22a8",DoubleUpArrow:"\u21d1",DoubleUpDownArrow:"\u21d5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21d3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21f5",DownBreve:"\u0311",downdownarrows:"\u21ca",downharpoonleft:"\u21c3",downharpoonright:"\u21c2",DownLeftRightVector:"\u2950", 686DownLeftTeeVector:"\u295e",DownLeftVector:"\u21bd",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295f",DownRightVector:"\u21c1",DownRightVectorBar:"\u2957",DownTee:"\u22a4",DownTeeArrow:"\u21a7",drbkarow:"\u2910",drcorn:"\u231f",drcrop:"\u230c",Dscr:"\ud835\udc9f",dscr:"\ud835\udcb9",DScy:"\u0405",dscy:"\u0455",dsol:"\u29f6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22f1",dtri:"\u25bf",dtrif:"\u25be",duarr:"\u21f5",duhar:"\u296f",dwangle:"\u29a6",DZcy:"\u040f",dzcy:"\u045f",dzigrarr:"\u27ff",Eacute:"\u00c9", 687eacute:"\u00e9",easter:"\u2a6e",Ecaron:"\u011a",ecaron:"\u011b",ecir:"\u2256",Ecirc:"\u00ca",ecirc:"\u00ea",ecolon:"\u2255",Ecy:"\u042d",ecy:"\u044d",eDDot:"\u2a77",
687Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\ud835\udd08",efr:"\ud835\udd22",eg:"\u2a9a",Egrave:"\u00c8",egrave:"\u00e8",egs:"\u2a96",egsdot:"\u2a98",el:"\u2a99",Element:"\u2208",elinters:"\u23e7",ell:"\u2113",els:"\u2a95",elsdot:"\u2a97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25fb", 688emptyv:"\u2205",EmptyVerySmallSquare:"\u25ab",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014a",eng:"\u014b",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\ud835\udd3c",eopf:"\ud835\udd56",epar:"\u22d5",eparsl:"\u29e3",eplus:"\u2a71",epsi:"\u03b5",Epsilon:"\u0395",epsilon:"\u03b5",epsiv:"\u03f5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2a96",eqslantless:"\u2a95",Equal:"\u2a75",equals:"\x3d",EqualTilde:"\u2242",equest:"\u225f",Equilibrium:"\u21cc",equiv:"\u2261",equivDD:"\u2a78", 689eqvparsl:"\u29e5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212f",esdot:"\u2250",Esim:"\u2a73",esim:"\u2242",Eta:"\u0397",eta:"\u03b7",ETH:"\u00d0",eth:"\u00f0",Euml:"\u00cb",euml:"\u00eb",euro:"\u20ac",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\ufb03",fflig:"\ufb00",ffllig:"\ufb04",Ffr:"\ud835\udd09",ffr:"\ud835\udd23",filig:"\ufb01",FilledSmallSquare:"\u25fc", 690FilledVerySmallSquare:"\u25aa",fjlig:"fj",flat:"\u266d",fllig:"\ufb02",fltns:"\u25b1",fnof:"\u0192",Fopf:"\ud835\udd3d",fopf:"\ud835\udd57",ForAll:"\u2200",forall:"\u2200",fork:"\u22d4",forkv:"\u2ad9",Fouriertrf:"\u2131",fpartint:"\u2a0d",frac12:"\u00bd",frac13:"\u2153",frac14:"\u00bc",frac15:"\u2155",frac16:"\u2159",frac18:"\u215b",frac23:"\u2154",frac25:"\u2156",frac34:"\u00be",frac35:"\u2157",frac38:"\u215c",frac45:"\u2158",frac56:"\u215a",frac58:"\u215d",frac78:"\u215e",frasl:"\u2044",frown:"\u2322", 691Fscr:"\u2131",fscr:"\ud835\udcbb",gacute:"\u01f5",Gamma:"\u0393",gamma:"\u03b3",Gammad:"\u03dc",gammad:"\u03dd",gap:"\u2a86",Gbreve:"\u011e",gbreve:"\u011f",Gcedil:"\u0122",Gcirc:"\u011c",gcirc:"\u011d",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2a8c",gel:"\u22db",geq:"\u2265",geqq:"\u2267",geqslant:"\u2a7e",ges:"\u2a7e",gescc:"\u2aa9",gesdot:"\u2a80",gesdoto:"\u2a82",gesdotol:"\u2a84",gesl:"\u22db\ufe00",gesles:"\u2a94",Gfr:"\ud835\udd0a",gfr:"\ud835\udd24", 692Gg:"\u22d9",gg:"\u226b",ggg:"\u22d9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2aa5",glE:"\u2a92",glj:"\u2aa4",gnap:"\u2a8a",gnapprox:"\u2a8a",gnE:"\u2269",gne:"\u2a88",gneq:"\u2a88",gneqq:"\u2269",gnsim:"\u22e7",Gopf:"\ud835\udd3e",gopf:"\ud835\udd58",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22db",GreaterFullEqual:"\u2267",GreaterGreater:"\u2aa2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2a7e",GreaterTilde:"\u2273",Gscr:"\ud835\udca2",gscr:"\u210a",gsim:"\u2273",gsime:"\u2a8e", 693gsiml:"\u2a90",Gt:"\u226b",GT:"\x3e",gt:"\x3e",gtcc:"\u2aa7",gtcir:"\u2a7a",gtdot:"\u22d7",gtlPar:"\u2995",gtquest:"\u2a7c",gtrapprox:"\u2a86",gtrarr:"\u2978",gtrdot:"\u22d7",gtreqless:"\u22db",gtreqqless:"\u2a8c",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\ufe00",gvnE:"\u2269\ufe00",Hacek:"\u02c7",hairsp:"\u200a",half:"\u00bd",hamilt:"\u210b",HARDcy:"\u042a",hardcy:"\u044a",hArr:"\u21d4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21ad",Hat:"^",hbar:"\u210f",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665", 694heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22b9",Hfr:"\u210c",hfr:"\ud835\udd25",HilbertSpace:"\u210b",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21ff",homtht:"\u223b",hookleftarrow:"\u21a9",hookrightarrow:"\u21aa",Hopf:"\u210d",hopf:"\ud835\udd59",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210b",hscr:"\ud835\udcbd",hslash:"\u210f",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224e",HumpEqual:"\u224f",hybull:"\u2043",hyphen:"\u2010",Iacute:"\u00cd",iacute:"\u00ed",ic:"\u2063",Icirc:"\u00ce", 695icirc:"\u00ee",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\u00a1",iff:"\u21d4",Ifr:"\u2111",ifr:"\ud835\udd26",Igrave:"\u00cc",igrave:"\u00ec",ii:"\u2148",iiiint:"\u2a0c",iiint:"\u222d",iinfin:"\u29dc",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012a",imacr:"\u012b",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22b7",imped:"\u01b5",Implies:"\u21d2",in:"\u2208",incare:"\u2105",infin:"\u221e",infintie:"\u29dd", 696inodot:"\u0131",Int:"\u222c",int:"\u222b",intcal:"\u22ba",integers:"\u2124",Integral:"\u222b",intercal:"\u22ba",Intersection:"\u22c2",intlarhk:"\u2a17",intprod:"\u2a3c",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012e",iogon:"\u012f",Iopf:"\ud835\udd40",iopf:"\ud835\udd5a",Iota:"\u0399",iota:"\u03b9",iprod:"\u2a3c",iquest:"\u00bf",Iscr:"\u2110",iscr:"\ud835\udcbe",isin:"\u2208",isindot:"\u22f5",isinE:"\u22f9",isins:"\u22f4",isinsv:"\u22f3",isinv:"\u2208",it:"\u2062", 697Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\u00cf",iuml:"\u00ef",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\ud835\udd0d",jfr:"\ud835\udd27",jmath:"\u0237",Jopf:"\ud835\udd41",jopf:"\ud835\udd5b",Jscr:"\ud835\udca5",jscr:"\ud835\udcbf",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039a",kappa:"\u03ba",kappav:"\u03f0",Kcedil:"\u0136",kcedil
697:"\u0137",Kcy:"\u041a",kcy:"\u043a",Kfr:"\ud835\udd0e",kfr:"\ud835\udd28",kgreen:"\u0138",KHcy:"\u0425", 698khcy:"\u0445",KJcy:"\u040c",kjcy:"\u045c",Kopf:"\ud835\udd42",kopf:"\ud835\udd5c",Kscr:"\ud835\udca6",kscr:"\ud835\udcc0",lAarr:"\u21da",Lacute:"\u0139",lacute:"\u013a",laemptyv:"\u29b4",lagran:"\u2112",Lambda:"\u039b",lambda:"\u03bb",Lang:"\u27ea",lang:"\u27e8",langd:"\u2991",langle:"\u27e8",lap:"\u2a85",Laplacetrf:"\u2112",laquo:"\u00ab",Larr:"\u219e",lArr:"\u21d0",larr:"\u2190",larrb:"\u21e4",larrbfs:"\u291f",larrfs:"\u291d",larrhk:"\u21a9",larrlp:"\u21ab",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21a2", 699lat:"\u2aab",lAtail:"\u291b",latail:"\u2919",late:"\u2aad",lates:"\u2aad\ufe00",lBarr:"\u290e",lbarr:"\u290c",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298b",lbrksld:"\u298f",lbrkslu:"\u298d",Lcaron:"\u013d",lcaron:"\u013e",Lcedil:"\u013b",lcedil:"\u013c",lceil:"\u2308",lcub:"{",Lcy:"\u041b",lcy:"\u043b",ldca:"\u2936",ldquo:"\u201c",ldquor:"\u201e",ldrdhar:"\u2967",ldrushar:"\u294b",ldsh:"\u21b2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27e8",LeftArrow:"\u2190",Leftarrow:"\u21d0",leftarrow:"\u2190", 700LeftArrowBar:"\u21e4",LeftArrowRightArrow:"\u21c6",leftarrowtail:"\u21a2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27e6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21c3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230a",leftharpoondown:"\u21bd",leftharpoonup:"\u21bc",leftleftarrows:"\u21c7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21d4",leftrightarrow:"\u2194",leftrightarrows:"\u21c6",leftrightharpoons:"\u21cb",leftrightsquigarrow:"\u21ad",LeftRightVector:"\u294e",LeftTee:"\u22a3",LeftTeeArrow:"\u21a4", 701LeftTeeVector:"\u295a",leftthreetimes:"\u22cb",LeftTriangle:"\u22b2",LeftTriangleBar:"\u29cf",LeftTriangleEqual:"\u22b4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21bf",LeftUpVectorBar:"\u2958",LeftVector:"\u21bc",LeftVectorBar:"\u2952",lEg:"\u2a8b",leg:"\u22da",leq:"\u2264",leqq:"\u2266",leqslant:"\u2a7d",les:"\u2a7d",lescc:"\u2aa8",lesdot:"\u2a7f",lesdoto:"\u2a81",lesdotor:"\u2a83",lesg:"\u22da\ufe00",lesges:"\u2a93",lessapprox:"\u2a85",lessdot:"\u22d6",lesseqgtr:"\u22da", 702lesseqqgtr:"\u2a8b",LessEqualGreater:"\u22da",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2aa1",lesssim:"\u2272",LessSlantEqual:"\u2a7d",LessTilde:"\u2272",lfisht:"\u297c",lfloor:"\u230a",Lfr:"\ud835\udd0f",lfr:"\ud835\udd29",lg:"\u2276",lgE:"\u2a91",lHar:"\u2962",lhard:"\u21bd",lharu:"\u21bc",lharul:"\u296a",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22d8",ll:"\u226a",llarr:"\u21c7",llc
702orner:"\u231e",Lleftarrow:"\u21da",llhard:"\u296b",lltri:"\u25fa",Lmidot:"\u013f", 703lmidot:"\u0140",lmoust:"\u23b0",lmoustache:"\u23b0",lnap:"\u2a89",lnapprox:"\u2a89",lnE:"\u2268",lne:"\u2a87",lneq:"\u2a87",lneqq:"\u2268",lnsim:"\u22e6",loang:"\u27ec",loarr:"\u21fd",lobrk:"\u27e6",LongLeftArrow:"\u27f5",Longleftarrow:"\u27f8",longleftarrow:"\u27f5",LongLeftRightArrow:"\u27f7",Longleftrightarrow:"\u27fa",longleftrightarrow:"\u27f7",longmapsto:"\u27fc",LongRightArrow:"\u27f6",Longrightarrow:"\u27f9",longrightarrow:"\u27f6",looparrowleft:"\u21ab",looparrowright:"\u21ac",lopar:"\u2985", 704Lopf:"\ud835\udd43",lopf:"\ud835\udd5d",loplus:"\u2a2d",lotimes:"\u2a34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25ca",lozenge:"\u25ca",lozf:"\u29eb",lpar:"(",lparlt:"\u2993",lrarr:"\u21c6",lrcorner:"\u231f",lrhar:"\u21cb",lrhard:"\u296d",lrm:"\u200e",lrtri:"\u22bf",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\ud835\udcc1",Lsh:"\u21b0",lsh:"\u21b0",lsim:"\u2272",lsime:"\u2a8d",lsimg:"\u2a8f",lsqb:"[",lsquo:"\u2018",lsquor:"\u201a",Lstrok:"\u0141",lstrok:"\u0142", 705Lt:"\u226a",LT:"\x3c",lt:"\x3c",ltcc:"\u2aa6",ltcir:"\u2a79",ltdot:"\u22d6",lthree:"\u22cb",ltimes:"\u22c9",ltlarr:"\u2976",ltquest:"\u2a7b",ltri:"\u25c3",ltrie:"\u22b4",ltrif:"\u25c2",ltrPar:"\u2996",lurdshar:"\u294a",luruhar:"\u2966",lvertneqq:"\u2268\ufe00",lvnE:"\u2268\ufe00",macr:"\u00af",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21a6",mapsto:"\u21a6",mapstodown:"\u21a7",mapstoleft:"\u21a4",mapstoup:"\u21a5",marker:"\u25ae",mcomma:"\u2a29",Mcy:"\u041c",mcy:"\u043c",mdash:"\u2014", 706mDDot:"\u223a",measuredangle:"\u2221",MediumSpace:"\u205f",Mellintrf:"\u2133",Mfr:"\ud835\udd10",mfr:"\ud835\udd2a",mho:"\u2127",micro:"\u00b5",mid:"\u2223",midast:"*",midcir:"\u2af0",middot:"\u00b7",minus:"\u2212",minusb:"\u229f",minusd:"\u2238",minusdu:"\u2a2a",MinusPlus:"\u2213",mlcp:"\u2adb",mldr:"\u2026",mnplus:"\u2213",models:"\u22a7",Mopf:"\ud835\udd44",mopf:"\ud835\udd5e",mp:"\u2213",Mscr:"\u2133",mscr:"\ud835\udcc2",mstpos:"\u223e",Mu:"\u039c",mu:"\u03bc",multimap:"\u22b8",mumap:"\u22b8", 707nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20d2",nap:"\u2249",napE:"\u2a70\u0338",napid:"\u224b\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266e",natural:"\u266e",naturals:"\u2115",nbsp:"\u00a0",nbump:"\u224e\u0338",nbumpe:"\u224f\u0338",ncap:"\u2a43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2a6d\u0338",ncup:"\u2a42",Ncy:"\u041d",ncy:"\u043d",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21d7",nearr:"\u2197",nearrow:"\u2197", 708nedot:"\u2250\u0338",NegativeMediumSpace:"\u200b",NegativeThickSpace:"\u200b",NegativeThinSpace:"\u200b",NegativeVeryThinSpace:"\u200b",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226b",NestedLessLess:"\u226a",NewLine:"\n",nexist:"\u2204",nexists:"\u2204",Nfr:"\ud835\udd11",nfr:"\ud835\udd2b",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2a7e\u0338",nges:"\u2a7e\u0338",nGg:"\u22d9\u0338",ngsim:"\u2275",nGt:"\u226b\u20d2",ngt:"\u226f", 709ngtr:"\u226f",nGtv:"\u226b\u0338",nhArr:"\u21ce",nharr:"\u21ae",nhpar:"\u2af2",ni:"\u220b",nis:"\u22fc",nisd:"\u22fa",niv:"\u220b",NJcy:"\u040a",njcy:"\u045a",nlArr:"\u21cd",nlarr:"\u219a",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21cd",nleftarrow:"\u219a",nLeftrightarrow:"\u21ce",nleftrightarrow:"\u21ae",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2a7d\u0338",nles:"\u2a7d\u0338",nless:"\u226e",nLl:"\u22d8\u0338",nlsim:"\u2274",nLt:"\u226a\u20d2",nlt:"\u226e",nltri:"\u22ea", 710nltrie:"\u22ec",nLtv:"\u226a\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\u00a0",Nopf:"\u2115",nopf:"\ud835\udd5f",Not:"\u2aec",not:"\u00ac",NotCongruent:"\u2262",NotCupCap:"\u226d",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226f",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226b\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2a7e\u0338",NotGreaterTilde:"\u2275", 711NotHumpDownHump:"\u224e\u0338",NotHumpEqual:"\u224f\u0338",notin:"\u2209",notindot:"\u22f5\u0338",notinE:"\u22f9\u0338",notinva:"\u2209",notinvb:"\u22f7",notinvc:"\u22f6",NotLeftTriangle:"\u22ea",NotLeftTriangleBar:"\u29cf\u
7110338",NotLeftTriangleEqual:"\u22ec",NotLess:"\u226e",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226a\u0338",NotLessSlantEqual:"\u2a7d\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2aa2\u0338",NotNestedLessLess:"\u2aa1\u0338",notni:"\u220c",notniva:"\u220c", 712notnivb:"\u22fe",notnivc:"\u22fd",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2aaf\u0338",NotPrecedesSlantEqual:"\u22e0",NotReverseElement:"\u220c",NotRightTriangle:"\u22eb",NotRightTriangleBar:"\u29d0\u0338",NotRightTriangleEqual:"\u22ed",NotSquareSubset:"\u228f\u0338",NotSquareSubsetEqual:"\u22e2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22e3",NotSubset:"\u2282\u20d2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2ab0\u0338",NotSucceedsSlantEqual:"\u22e1",NotSucceedsTilde:"\u227f\u0338", 713NotSuperset:"\u2283\u20d2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2afd\u20e5",npart:"\u2202\u0338",npolint:"\u2a14",npr:"\u2280",nprcue:"\u22e0",npre:"\u2aaf\u0338",nprec:"\u2280",npreceq:"\u2aaf\u0338",nrArr:"\u21cf",nrarr:"\u219b",nrarrc:"\u2933\u0338",nrarrw:"\u219d\u0338",nRightarrow:"\u21cf",nrightarrow:"\u219b",nrtri:"\u22eb",nrtrie:"\u22ed",nsc:"\u2281", 714nsccue:"\u22e1",nsce:"\u2ab0\u0338",Nscr:"\ud835\udca9",nscr:"\ud835\udcc3",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22e2",nsqsupe:"\u22e3",nsub:"\u2284",nsubE:"\u2ac5\u0338",nsube:"\u2288",nsubset:"\u2282\u20d2",nsubseteq:"\u2288",nsubseteqq:"\u2ac5\u0338",nsucc:"\u2281",nsucceq:"\u2ab0\u0338",nsup:"\u2285",nsupE:"\u2ac6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20d2",nsupseteq:"\u2289",nsupseteqq:"\u2ac6\u0338", 715ntgl:"\u2279",Ntilde:"\u00d1",ntilde:"\u00f1",ntlg:"\u2278",ntriangleleft:"\u22ea",ntrianglelefteq:"\u22ec",ntriangleright:"\u22eb",ntrianglerighteq:"\u22ed",Nu:"\u039d",nu:"\u
71503bd",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224d\u20d2",nVDash:"\u22af",nVdash:"\u22ae",nvDash:"\u22ad",nvdash:"\u22ac",nvge:"\u2265\u20d2",nvgt:"\x3e\u20d2",nvHarr:"\u2904",nvinfin:"\u29de",nvlArr:"\u2902",nvle:"\u2264\u20d2",nvlt:"\x3c\u20d2",nvltrie:"\u22b4\u20d2",nvrArr:"\u2903",nvrtrie:"\u22b5\u20d2",nvsim:"\u223c\u20d2", 716nwarhk:"\u2923",nwArr:"\u21d6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\u00d3",oacute:"\u00f3",oast:"\u229b",ocir:"\u229a",Ocirc:"\u00d4",ocirc:"\u00f4",Ocy:"\u041e",ocy:"\u043e",odash:"\u229d",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2a38",odot:"\u2299",odsold:"\u29bc",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29bf",Ofr:"\ud835\udd12",ofr:"\ud835\udd2c",ogon:"\u02db",Ograve:"\u00d2",ograve:"\u00f2",ogt:"\u29c1",ohbar:"\u29b5",ohm:"\u03a9",oint:"\u222e",olarr:"\u21ba",olcir:"\u29be",olcross:"\u29bb", 717oline:"\u203e",olt:"\u29c0",Omacr:"\u014c",omacr:"\u014d",Omega:"\u03a9",omega:"\u03c9",Omicron:"\u039f",omicron:"\u03bf",omid:"\u29b6",ominus:"\u2296",Oopf:"\ud835\udd46",oopf:"\ud835\udd60",opar:"\u29b7",OpenCurlyDoubleQuote:"\u201c",OpenCurlyQuote:"\u2018",operp:"\u29b9",oplus:"\u2295",Or:"\u2a54",or:"\u2228",orarr:"\u21bb",ord:"\u2a5d",order:"\u2134",orderof:"\u2134",ordf:"\u00aa",ordm:"\u00ba",origof:"\u22b6",oror:"\u2a56",orslope:"\u2a57",orv:"\u2a5b",oS:"\u24c8",Oscr:"\ud835\udcaa",oscr:"\u2134", 718Oslash:"\u00d8",oslash:"\u00f8",osol:"\u2298",Otilde:"\u00d5",otilde:"\u00f5",Otimes:"\u2a37",otimes:"\u2297",otimesas:"\u2a36",Ouml:"\u00d6",ouml:"\u00f6",ovbar:"\u233d",OverBar:"\u203e",OverBrace:"\u23de",OverBracket:"\u23b4",OverParenthesis:"\u23dc",par:"\u2225",para:"\u00b6",parallel:"\u2225",parsim:"\u2af3",parsl:"\u2afd",part:"\u2202",PartialD:"\u2202",Pcy:"\u041f",pcy:"\u043f",percnt:"%",period:".",permil:"\u2030",perp:"\u22a5",pertenk:"\u2031",Pfr:"\ud835\udd13",pfr:"\ud835\udd2d",Phi:"\u03a6", 719phi:"\u03c6",phiv:"\u03d5",phmmat:"\u2133",phone:"\u260e",Pi:"\u03a0",pi:"\u03c0",pitchfork:"\u22d4",piv:"\u03d6",planck:"\u210f",planckh:"\u210e",plankv:"\u210f",plus:"+",plusacir:"\u2a23",plusb:"\u229e",pluscir:"\u2a22",plusdo:"\u2214",plusdu:"\u2a25",pluse:"\u2a72",PlusMinus:"\u00b1",plusmn:"\u00b1",plussim:"\u2a26",plustwo:"\u2a27",pm:"\u00b1",Poincareplane:"\u210c",pointint:"\u2a15",Popf:"\u2119",popf:"\ud835\udd61",pound:"\u00a3",Pr:"\u2abb",pr:"\u227a",prap:"\u2ab7",prcue:"\u227c",prE:"\u2ab3", 720pre:"\u2aaf",prec:"\u227a",precapprox:"\u2ab7",preccurlyeq:"\u227c",Precedes:"\u227a",PrecedesEqual:"\u2aaf",PrecedesSlantEqual:"\u227c",PrecedesTilde:"\u227e",preceq:"\u2aaf",precnapprox:"\u2ab9",precneqq:"\u2ab5",precnsim:"\u22e8",precsim:"\u227e",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2ab9",prnE:"\u2ab5",prnsim:"\u22e8",prod:"\u220f",Product:"\u220f",profalar:"\u232e",profline:"\u2312",profsurf:"\u2313",prop:"\u221d",Proportion:"\u2237",Proportional:"\u221d",propto:"\u221d",prsim:"\u227e", 721prurel:"\u22b0",Pscr:"\ud835\udcab",pscr:"\ud835\udcc5",Psi:"\u03a8",psi:"\u03c8",puncsp:"\u2008",Qfr:"\ud835\udd14",qfr:"\ud835\udd2e",qint:"\u2a0c",Qopf:"\u211a",qopf:"\ud835\udd62",qprime:"\u2057",Qscr:"\ud835\udcac",qscr:"\ud835\udcc6",quaternions:"\u210d",quatint:"\u2a16",quest:"?",questeq:"\u225f",QUOT:'"',quot:'"',rAarr:"\u21db",race:"\u223d\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221a",raemptyv:"\u29b3",Rang:"\u27eb",rang:"\u27e9",rangd:"\u2992",range:"\u29a5",rangle:"\u27e9",raquo:"\u00bb", 722Rarr:"\u21a0",rArr:"\u21d2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21e5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291e",rarrhk:"\u21aa",rarrlp:"\u21ac",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21a3",rarrw:"\u219d",rAtail:"\u291c",ratail:"\u291a",ratio:"\u2236",rationals:"\u211a",RBarr:"\u2910",rBarr:"\u290f",rbarr:"\u290d",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298c",rbrksld:"\u298e",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309", 723rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201d",rdquor:"\u201d",rdsh:"\u21b3",Re:"\u211c",real:"\u211c",realine:"\u211b",realpart:"\u211c",reals:"\u211d",rect:"\u25ad",REG:"\u00ae",reg:"\u00ae",ReverseElement:"\u220b",ReverseEquilibrium:"\u21cb",ReverseUpEquilibrium:"\u296f",rfisht:"\u297d",rfloor:"\u230b",Rfr:"\u211c",rfr:"\ud835\udd2f",rHar:"\u2964",rhard:"\u21c1",rharu:"\u21c0",rharul:"\u296c",Rho:"\u03a1",rho:"\u03c1",rhov:"\u
72303f1",RightAngleBracket:"\u27e9",RightArrow:"\u2192", 724Rightarrow:"\u21d2",rightarrow:"\u2192",RightArrowBar:"\u21e5",RightArrowLeftArrow:"\u21c4",rightarrowtail:"\u21a3",RightCeiling:"\u2309",RightDoubleBracket:"\u27e7",RightDownTeeVector:"\u295d",RightDownVector:"\u21c2",RightDownVectorBar:"\u2955",RightFloor:"\u230b",rightharpoondown:"\u21c1",rightharpoonup:"\u21c0",rightleftarrows:"\u21c4",rightleftharpoons:"\u21cc",rightrightarrows:"\u21c9",rightsquigarrow:"\u219d",RightTee:"\u22a2",RightTeeArrow:"\u21a6",RightTeeVector:"\u295b",rightthreetimes:"\u22cc", 725RightTriangle:"\u22b3",RightTriangleBar:"\u29d0",RightTriangleEqual:"\u22b5",RightUpDownVector:"\u294f",RightUpTeeVector:"\u295c",RightUpVector:"\u21be",RightUpVectorBar:"\u2954",RightVector:"\u21c0",RightVectorBar:"\u2953",ring:"\u02da",risingdotseq:"\u2253",rlarr:"\u21c4",rlhar:"\u21cc",rlm:"\u200f",rmoust:"\u23b1",rmoustache:"\u23b1",rnmid:"\u2aee",roang:"\u27ed",roarr:"\u21fe",robrk:"\u27e7",ropar:"\u2986",Ropf:"\u211d",ropf:"\ud835\udd63",roplus:"\u2a2e",rotimes:"\u2a35",RoundImplies:"\u2970", 726rpar:")",rpargt:"\u2994",rppolint:"\u2a12",rrarr:"\u21c9",Rrightarrow:"\u21db",rsaquo:"\u203a",Rscr:"\u211b",rscr:"\ud835\udcc7",Rsh:"\u21b1",rsh:"\u21b1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22cc",rtimes:"\u22ca",rtri:"\u25b9",rtrie:"\u22b5",rtrif:"\u25b8",rtriltri:"\u29ce",RuleDelayed:"\u29f4",ruluhar:"\u2968",rx:"\u211e",Sacute:"\u015a",sacute:"\u015b",sbquo:"\u201a",Sc:"\u2abc",sc:"\u227b",scap:"\u2ab8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227d",scE:"\u2ab4",sce:"\u2ab0",Scedil:"\u015e", 727scedil:"\u015f",Scirc:"\u015c",scirc:"\u015d",scnap:"\u2aba",scnE:"\u2ab6",scnsim:"\u22e9",scpolint:"\u2a13",scsim:"\u227f",Scy:"\u0421",scy:"\u0441",sdot:"\u22c5",sdotb:"\u22a1",sdote:"\u2a66",searhk:"\u2925",seArr:"\u21d8",searr:"\u2198",searrow:"\u2198",sect:"\u00a7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\ud835\udd16",sfr:"\ud835\udd30",sfrown:"\u2322",sharp:"\u266f",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190", 728shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\u00ad",Sigma:"\u03a3",sigma:"\u03c3",sigmaf:"\u03c2",sigmav:"\u03c2",sim:"\u223c",simdot:"\u2a6a",sime:"\u2243",simeq:"\u2243",simg:"\u2a9e",simgE:"\u2aa0",siml:"\u2a9d",simlE:"\u2a9f",simne:"\u2246",simplus:"\u2a24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2a33",smeparsl:"\u29e4",smid:"\u2223",smile:"\u2323",smt:"\u2aaa",smte:"\u2aac",smtes:"\u2aac\ufe00",SOFTcy:"\u042c", 729softcy:"\u044c",sol:"/",solb:"\u29c4",solbar:"\u233f",Sopf:"\ud835\udd4a",sopf:"\ud835\udd64",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\ufe00",sqcup:"\u2294",sqcups:"\u2294\ufe00",Sqrt:"\u221a",sqsub:"\u228f",sqsube:"\u2291",sqsubset:"\u228f",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25a1",Square:"\u25a1",square:"\u25a1",SquareIntersection:"\u2293",SquareSubset:"\u228f",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290", 730SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25aa",squf:"\u25aa",srarr:"\u2192",Sscr:"\ud835\udcae",sscr:"\ud835\udcc8",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22c6",Star:"\u22c6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03f5",straightphi:"\u03d5",strns:"\u00af",Sub:"\u22d0",sub:"\u2282",subdot:"\u2abd",subE:"\u2ac5",sube:"\u2286",subedot:"\u2ac3",submult:"\u2ac1",subnE:"\u2acb",subne:"\u228a",subplus:"\u2abf",subrarr:"\u2979",Subset:"\u22d0",subset:"\u2282",subseteq:"\u2286", 731subseteqq:"\u2ac5",SubsetEqual:"\u2286",subsetneq:"\u228a",subsetneqq:"\u2acb",subsim:"\u2ac7",subsub:"\u2ad5",subsup:"\u2ad3",succ:"\u227b",succapprox:"\u2ab8",succcurlyeq:"\u227d",Succeeds:"\u227b",SucceedsEqual:"\u2ab0",SucceedsSlantEqual:"\u227d",SucceedsTilde:"\u227f",succeq:"\u2ab0",succnapprox:"\u2aba",succneqq:"\u2ab6",succnsim:"\u22e9",succsim:"\u227f",SuchThat:"\u220b",Sum:"\u2211",sum:"\u2211",sung:"\u266a",Sup:"\u22d1",sup:"\u2283",sup1:"\u00b9",sup2:"\u00b2",sup3:"\u00b3",supdot:"\u2abe", 732supdsub:"\u2ad8",supE:"\u2ac6",supe:"\u2287",supedot:"\u2ac4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27c9",suphsub
732:"\u2ad7",suplarr:"\u297b",supmult:"\u2ac2",supnE:"\u2acc",supne:"\u228b",supplus:"\u2ac0",Supset:"\u22d1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2ac6",supsetneq:"\u228b",supsetneqq:"\u2acc",supsim:"\u2ac8",supsub:"\u2ad4",supsup:"\u2ad6",swarhk:"\u2926",swArr:"\u21d9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292a",szlig:"\u00df",Tab:"\t",target:"\u2316",Tau:"\u03a4", 733tau:"\u03c4",tbrk:"\u23b4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20db",telrec:"\u2315",Tfr:"\ud835\udd17",tfr:"\ud835\udd31",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03b8",thetasym:"\u03d1",thetav:"\u03d1",thickapprox:"\u2248",thicksim:"\u223c",ThickSpace:"\u205f\u200a",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223c",THORN:"\u00de",thorn:"\u00fe",Tilde:"\u223c",tilde:"\u02dc",TildeEqual:"\u2243", 734TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\u00d7",timesb:"\u22a0",timesbar:"\u2a31",timesd:"\u2a30",tint:"\u222d",toea:"\u2928",top:"\u22a4",topbot:"\u2336",topcir:"\u2af1",Topf:"\ud835\udd4b",topf:"\ud835\udd65",topfork:"\u2ada",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25b5",triangledown:"\u25bf",triangleleft:"\u25c3",trianglelefteq:"\u22b4",triangleq:"\u225c",triangleright:"\u25b9",trianglerighteq:"\u22b5",tridot:"\u25ec",trie:"\u225c",triminus:"\u2a3a",TripleDot:"\u20db", 735triplus:"\u2a39",trisb:"\u29cd",tritime:"\u2a3b",trpezium:"\u23e2",Tscr:"\ud835\udcaf",tscr:"\ud835\udcc9",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040b",tshcy:"\u045b",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226c",twoheadleftarrow:"\u219e",twoheadrightarrow:"\u21a0",Uacute:"\u00da",uacute:"\u00fa",Uarr:"\u219f",uArr:"\u21d1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040e",ubrcy:"\u045e",Ubreve:"\u016c",ubreve:"\u016d",Ucirc:"\u00db",ucirc:"\u00fb",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21c5",Udblac:"\u0170", 736udblac:"\u0171",udhar:"\u296e",ufisht:"\u297e",Ufr:"\ud835\udd18",ufr:"\ud835\udd32",Ugrave:"\u00d9",ugrave:"\u00f9",uHar:"\u2963",uharl:"\u21bf",uharr:"\u21be",uhblk:"\u2580",ulcorn:"\u231c",ulcorner:"\u231c",ulcrop:"\u230f",ultri:"\u25f8",Umacr:"\u016a",umacr:"\u016b",uml:"\u00a8",UnderBar:"_",UnderBrace:"\u23df",UnderBracket:"\u23b5",UnderParenthesis:"\u23dd",Union:"\u22c3",UnionPlus:"\u228e",Uogon:"\u0172",uogon:"\u0173",Uopf:"\ud835\udd4c",uopf:"\ud835\udd66",UpArrow:"\u2191",Uparrow:"\u21d1", 737uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21c5",UpDownArrow:"\u2195",Updownarrow:"\u21d5",updownarrow:"\u2195",UpEquilibrium:"\u296e",upharpoonleft:"\u21bf",upharpoonright:"\u21be",uplus:"\u228e",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03d2",upsi:"\u03c5",upsih:"\u03d2",Upsilon:"\u03a5",upsilon:"\u03c5",UpTee:"\u22a5",UpTeeArrow:"\u21a5",upuparrows:"\u21c8",urcorn:"\u231d",urcorner:"\u231d",urcrop:"\u230e",Uring:"\u016e",uring:"\u016f",urtri:"\u25f9",Uscr:"\ud835\udcb0", 738uscr:"\ud835\udcca",utdot:"\u22f0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25b5",utrif:"\u25b4",uuarr:"\u21c8",Uuml:"\u00dc",uuml:"\u00fc",uwangle:"\u29a7",vangrt:"\u299c",varepsilon:"\u03f5",varkappa:"\u03f0",varnothing:"\u2205",varphi:"\u03d5",varpi:"\u03d6",varpropto:"\u221d",vArr:"\u21d5",varr:"\u2195",varrho:"\u03f1",varsigma:"\u03c2",varsubsetneq:"\u228a\ufe00",varsubsetneqq:"\u2acb\ufe00",varsupsetneq:"\u228b\ufe00",varsupsetneqq:"\u2acc\ufe00",vartheta:"\u03d1",vartriangleleft:"\u22b2",vartriangleright:"\u22b3", 739Vbar:"\u2aeb",vBar:"\u2ae8",vBarv:"\u2ae9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22ab",Vdash:"\u22a9",vDash:"\u22a8",vdash:"\u22a2",Vdashl:"\u2ae6",Vee:"\u22c1",vee:"\u2228",veebar:"\u22bb",veeeq:"\u225a",vellip:"\u22ee",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200a",Vfr:"\ud835\udd19",vfr:"\ud835\udd33",vltri:"\u22b2",vnsub:"\u2282\u20d2",vnsup:"\u2283\u20d2",Vopf:"\ud835\udd4d",vopf:"\ud835\udd67", 740vprop:"\u221d",vrtri:"\u22b3",Vscr:"\ud835\udcb1",vscr:"\ud835\udccb",vsubnE:"\u2acb\ufe00",vsubne:"\u228a\ufe00",vsupnE:"\u2acc\ufe00",vsupne:"\u228b\ufe00",Vvdash:"\u22aa",vzigzag:"\u299a",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2a5f",Wedge:"\u22c0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\ud835\udd1a",wfr:"\ud835\udd34",Wopf:"\ud835\udd4e",wopf:"\ud835\udd68",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\ud835\udcb2",wscr:"\ud835\udccc",xcap:"\u22c2",xcirc:"\u25ef",xcup:"\u22c3",xdtri:"\u25bd", 741Xfr:"\ud835\udd1b",xfr:"\ud835\udd35",xhArr:"\u27fa",xharr:"\u27f7",Xi:"\u039e",xi:"\u03be",xlArr:"\u27f8",xlarr:"\u27f5",xmap:"\u27fc",xnis:"\u22fb",xod
741ot:"\u2a00",Xopf:"\ud835\udd4f",xopf:"\ud835\udd69",xoplus:"\u2a01",xotime:"\u2a02",xrArr:"\u27f9",xrarr:"\u27f6",Xscr:"\ud835\udcb3",xscr:"\ud835\udccd",xsqcup:"\u2a06",xuplus:"\u2a04",xutri:"\u25b3",xvee:"\u22c1",xwedge:"\u22c0",Yacute:"\u00dd",yacute:"\u00fd",YAcy:"\u042f",yacy:"\u044f",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042b",ycy:"\u044b",yen:"\u00a5", 742Yfr:"\ud835\udd1c",yfr:"\ud835\udd36",YIcy:"\u0407",yicy:"\u0457",Yopf:"\ud835\udd50",yopf:"\ud835\udd6a",Yscr:"\ud835\udcb4",yscr:"\ud835\udcce",YUcy:"\u042e",yucy:"\u044e",Yuml:"\u0178",yuml:"\u00ff",Zacute:"\u0179",zacute:"\u017a",Zcaron:"\u017d",zcaron:"\u017e",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017b",zdot:"\u017c",zeetrf:"\u2128",ZeroWidthSpace:"\u200b",Zeta:"\u0396",zeta:"\u03b6",Zfr:"\u2128",zfr:"\ud835\udd37",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21dd",Zopf:"\u2124",zopf:"\ud835\udd6b",Zscr:"\ud835\udcb5", 743zscr:"\ud835\udccf",zwj:"\u200d",zwnj:"\u200c"});c.entityMap=c.HTML_ENTITIES});Re.XML_ENTITIES;Re.HTML_ENTITIES;Re.entityMap;var ye=fg,Lh=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Ik=new RegExp("[\\-\\.0-9"+Lh.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),Jk=new RegExp("^"+Lh.source+Ik.source+"*(?::"+Lh.source+Ik.source+"*)?$");Hd.prototype=Error();Hd.prototype.name=Hd.name;Cj.prototype= 744{parse:function(a,c,e){var g=this.domBuilder;g.startDocument();Gj(c,c={});rn(a,c,e,g,this.errorHandler);g.endDocument()}};Dj.prototype={setTagName:function(a){if(!Jk.test(a))throw Error("invalid tagName:"+a);this.tagName=a},addValue:function(a,c,e){if(!Jk.test(a))throw Error("invalid attribute:"+a);this.attributeNames[a]=this.length;this[this.length++]={qName:a,value:c,offset:e}},length:0,getLocalName:function(a){return this[a].localName},getLocator:function(a){return this[a].locator},getQName:function(a){return this[a].qName}, 745getURI:function(a){return this[a].uri},getValue:function(a){return this[a].value}};Hj.prototype.parseFromString=function(a,c){var e=this.options,g=new Cj,l=e.domBuilder||new yf,b=e.errorHandler,d=e.locator,f=e.xmlns||{},h=/\/x?html?$/.test(c);c=h?Re.HTML_ENTITIES:Re.XML_ENTITIES;d&&l.setDocumentLocator(d);g.errorHandler=yn(b,l,d);g.domBuilder=e.domBuilder||l;h&&(f[""]=fg.HTML);f.xml=f.xml||fg.XML;e=e.normalizeLineEndings||xn;a&&"string"===typeof a?g.parse(e(a),f,c):g.errorHandler.error("invalid doc source"); 746return l.doc};yf.prototype={startDocument:function(){this.doc=(new mj).createDocument(null,null,null);this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(a,c,e,g){var l=this.doc;c=l.createElementNS(a,e||c);var b=g.length;zf(this,c);this.currentElement=c;this.locator&&Id(this.locator,c);for(var d=0;d<b;d++){a=g.getURI(d);var f=g.getValue(d);e=g.getQName(d);a=l.createAttributeNS(a,e);this.locator&&Id(g.getLocator(d),a);a.value=a.nodeValue=f;c.setAttributeNode(a)}},endElement:function(a, 747c,e){a=this.currentElement;a.tagName;this.currentElement=a.parentNode},startPrefixMapping:function(a,c){},endPrefixMapping:function(a){},processingInstruction:function(a,c){a=this.doc.createProcessingInstruction(a,c);this.locator&&Id(this.locator,a);zf(this,a)},ignorableWhitespace:function(a,c,e){},characters:function(a,c,e){if(a=Ij.apply(this,arguments)){var g=this.cdata?this.doc.createCDATASection(a):this.doc.createTextNode(a);this.currentElement?this.currentElement.appendChild(g):/^\s*$/.test(a)&& 748this.doc.appendChild(g);this.locator&&Id(this.locator,g)}},skippedEntity:function(a){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(a){if(this.locator=a)a.lineNumber=0},comment:function(a,c,e){a=Ij.apply(this,arguments);var g=this.doc.createComment(a);this.locator&&Id(this.locator,g);zf(this,g)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(a,c,e){var g=this.doc.implementation;g&&g.createDocumentType&&(a=g.createDocumentType(a, 749c,e),this.locator&&Id(this.locator,a),zf(this,a),this.doc.doctype=a)},warning:function(a){console.warn("[xmldom warning]\t"+a,lh(this.locator))},error:function(a){console.error("[xmldom error]\t"+a,lh(this.locator))},fatalError:function(a){throw new Hd(a,this.locator);}};"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(a){yf.prototype[a]=function(){return null}});var Kk= 750function(a){return!!a&&"object"===typeof a},ob=function(a){for(var c=[],e=0;e<arguments.length;++e)c[e-0]=arguments[e];return c.reduce(function(g,l){if("object"!==typeof l)return g;Object.keys(l).forEach(function(b){Array.isArray(g[b])&&Array.isArray(l[b])?g[b]=g[b].concat(l[b]):Kk(g[b])&&Kk(l[b])?g[b]=ob(g[b],l[b]):g[b]=l[b]});return g},{})},Lk=function(a){return Object.keys(a).map(function(c){return a[c]})},ce=function(a){return a.reduce(function(c,e){return c.concat(e)},[])}
750,Mk=function(a){if(!a.length)return[]; 751for(var c=[],e=0;e<a.length;e++)c.push(a[e]);return c},uo=function(a,c){return a.reduce(function(e,g,l){g[c]&&e.push(l);return e},[])},vo=function(a,c){return Lk(a.reduce(function(e,g){g.forEach(function(l){e[c(l)]=l});return e},{}))},Se=function(a){var c=void 0===a.source?"":a.source,e=void 0===a.range?"":a.range,g=void 0===a.indexRange?"":a.indexRange;a={uri:c,resolvedUri:qb((void 0===a.baseUrl?"":a.baseUrl)||"",c)};if(e||g)g=(e?e:g).split("-"),e=window.BigInt?window.BigInt(g[0]):parseInt(g[0], 75210),g=window.BigInt?window.BigInt(g[1]):parseInt(g[1],10),e<Number.MAX_SAFE_INTEGER&&"bigint"===typeof e&&(e=Number(e)),g<Number.MAX_SAFE_INTEGER&&"bigint"===typeof g&&(g=Number(g)),g="bigint"===typeof g||"bigint"===typeof e?window.BigInt(g)-window.BigInt(e)+window.BigInt(1):g-e+1,"bigint"===typeof g&&g<Number.MAX_SAFE_INTEGER&&(g=Number(g)),a.byterange={length:g,offset:e};return a},Nk=function(a){a&&"number"!==typeof a&&(a=parseInt(a,10));return isNaN(a)?null:a},wo={static:function(a){var c=a.duration, 753e=void 0===a.timescale?1:a.timescale,g=a.sourceDuration,l=a.periodDuration;a=Nk(a.endNumber);c/=e;return"number"===typeof a?{start:0,end:a}:"number"===typeof l?{start:0,end:l/c}:{start:0,end:g/c}},dynamic:function(a){var c=a.NOW,e=a.clientOffset,g=a.availabilityStartTime,l=void 0===a.timescale?1:a.timescale,b=a.duration,d=void 0===a.periodStart?0:a.periodStart,f=void 0===a.minimumUpdatePeriod?0:a.minimumUpdatePeriod,h=void 0===a.timeShiftBufferDepth?Infinity:a.timeShiftBufferDepth;a=Nk(a.endNumber); 754c=(c+e)/1E3;g+=d;f=Math.ceil((c+f-g)*l/b);d=Math.floor((c-g)*l/b);return{start:Math.max(0,Math.floor((c-g-h)*l/b)),end:"number"===typeof a?a:Math.min(f,d)}}},xo=function(a){return function(c){var e=a.duration;return{number:(void 0===a.startNumber?1:a.startNumber)+c,duration:e/(void 0===a.timescale?1:a.timescale),timeline:a.periodStart,time:c*e}}},Mh=function(a){var c=a.type,e=a.duration,g=void 0===a.timescale?1:a.timescale,l=a.periodDuration,b=a.sourceDuration,d=wo[c](a),f=d.end,h=[];for(d=d.start;d< 755f;d++)h.push(d);a=h.map(xo(a));"static"===c&&(c=a.length-1,a[c].duration=("number"===typeof l?l:b)-e/g*c);return a},Ok=function(a){var c=a.baseUrl,e=void 0===a.initialization?{}:a.initialization,g=a.sourceDuration,l=void 0===a.indexRange?"":a.indexRange,b=a.periodStart,d=a.presentationTime,f=void 0===a.number?0:a.number,h=a.duration;if(!c)throw Error("NO_BASE_URL");e=Se({baseUrl:c,source:e.sourceURL,range:e.range});c=Se({baseUrl:c,source:c,indexRange:l});c.map=e;h?(a=Mh(a),a.length&&(c.duration=a[0].duration, 756c.timeline=a[0].timeline)):g&&(c.duration=g,c.timeline=b);c.presentationTime=d||b;c.number=f;return[c]},Nh=function(a,c,e){var g=a.sidx.map?a.sidx.map:null,l=a.sidx.duration,b=a.timeline||0,d=a.sidx.byterange,f=d.offset+d.length;d=c.timescale;var h=c.references.filter(function(L){return 1!==L.referenceType}),m=[],p=a.endList?"static":"dynamic",t=a.sidx.timeline,x=t,u=a.mediaSequence||0;f="bigint"===typeof c.firstOffset?window.BigInt(f)+c.firstOffset:f+c.firstOffset;for(var z=0;z<h.length;z++){var A= 757c.references[z],F=A.referencedSize;A=A.subsegmentDuration;var H=void 0;H="bigint"===typeof f?f+window.BigInt(F)-window.BigInt(1):f+F-1;H=Ok({baseUrl:e,timescale:d,timeline:b,periodStart:t,presentationTime:x,number:u,duration:A,sourceDuration:l,indexRange:f+"-"+H,type:p})[0];g&&(H.map=g);m.push(H);f="bigint"===typeof f?f+window.BigInt(F):f+F;x+=A/d;u++}a.segments=m;return a},yo=["AUDIO","SUBTITLES"],zo=1/60,Pk=function(a){return vo(a,function(c){return c.timeline}).sort(function(c,e){return c.timeline> 758e.timeline?1:-1})},Ao=function(a,c){for(var e=0;e<a.length;e++)if(a[e].attributes.NAME===c)return a[e];return null},Qk=function(a){var c=[];qo(a,yo,function(e,g,l,b){c=c.concat(e.playlists||[])});return c},Rk=function(a){var c=a.playlist;c.mediaSequence=a.mediaSequence;c.segments.forEach(function(e,g){e.number=c.mediaSequence+g})},Bo=function(a){var c=a.oldPlaylists,e=a.timelineStarts;
758a.newPlaylists.forEach(function(g){g.discontinuitySequence=e.findIndex(function(f){return f.timeline===g.timeline}); 759var l=Ao(c,g.attributes.NAME);if(l&&!g.sidx){var b=g.segments[0],d=l.segments.findIndex(function(f){return Math.abs(f.presentationTime-b.presentationTime)<zo});-1===d?(Rk({playlist:g,mediaSequence:l.mediaSequence+l.segments.length}),g.segments[0].discontinuity=!0,g.discontinuityStarts.unshift(0),(!l.segments.length&&g.timeline>l.timeline||l.segments.length&&g.timeline>l.segments[l.segments.length-1].timeline)&&g.discontinuitySequence--):(l.segments[d].discontinuity&&!b.discontinuity&&(b.discontinuity= 760!0,g.discontinuityStarts.unshift(0),g.discontinuitySequence--),Rk({playlist:g,mediaSequence:l.segments[d].number}))}})},Co=function(a){var c=a.oldManifest;a=a.newManifest;var e=c.playlists.concat(Qk(c)),g=a.playlists.concat(Qk(a));a.timelineStarts=Pk([c.timelineStarts,a.timelineStarts]);Bo({oldPlaylists:e,newPlaylists:g,timelineStarts:a.timelineStarts});return a},gg=function(a){var c;if(c=a){c=a.uri+"-";a=a.byterange;var e="bigint"===typeof a.offset||"bigint"===typeof a.length?window.BigInt(a.offset)+ 761window.BigInt(a.length)-window.BigInt(1):a.offset+a.length-1;c+=a.offset+"-"+e}return c},Oh=function(a){a=a.reduce(function(e,g){e[g.attributes.baseUrl]||(e[g.attributes.baseUrl]=[]);e[g.attributes.baseUrl].push(g);return e},{});var c=[];Object.values(a).forEach(function(e){e=Lk(e.reduce(function(g,l){var b=l.attributes.id+(l.attributes.lang||"");g[b]?(l.segments&&(l.segments[0]&&(l.segments[0].discontinuity=!0),g[b].segments.push.apply(g[b].segments,$jscomp.arrayFromIterable(l.segments))),l.attributes.contentProtection&& 762(g[b].attributes.contentProtection=l.attributes.contentProtection)):(g[b]=l,g[b].attributes.timelineStarts=[]);g[b].attributes.timelineStarts.push({start:l.attributes.periodStart,timeline:l.attributes.periodStart});return g},{}));c=c.concat(e)});return c.map(function(e){e.discontinuityStarts=uo(e.segments||[],"discontinuity");return e})},Ph=function(a,c){var e=gg(a.sidx);(c=e&&c[e]&&c[e].sidx)&&Nh(a,c,a.sidx.resolvedUri);return a},Do=function(a,c){c=void 0===c?{}:c;if(!Object.keys(c).length)return a; 763for(var e in a)a[e]=Ph(a[e],c);return a},Eo=function(a,c,e){c=void 0===c?{}:c;e=void 0===e?!1:e;var g;a=a.reduce(function(b,d){var f=d.attributes.role&&d.attributes.role.value||"",h=d.attributes.lang||"",m=d.attributes.label||"main";h&&!d.attributes.label&&(m=""+d.attributes.lang+(f?" ("+f+")":""));b[m]||(b[m]={language:h,autoselect:!0,default:"main"===f,playlists:[],uri:""});h=e;var p=d.attributes,t=d.segments,x=d.sidx,u=d.mediaSequence,z=d.discontinuitySequence,A=d.discontinuityStarts,F={};t={attributes:(F.NAME= 764p.id,F.BANDWIDTH=p.bandwidth,F.CODECS=p.codecs,F["PROGRAM-ID"]=1,F),uri:"",endList:"static"===p.type,timeline:p.periodStart,resolvedUri:p.baseUrl||"",targetDuration:p.duration,discontinuitySequence:z,discontinuityStarts:A,timelineStarts:p.timelineStarts,mediaSequence:u,segments:t};p.contentProtection&&(t.contentProtection=p.contentProtection);p.serviceLocation&&(t.attributes.serviceLocation=p.serviceLocation);x&&(t.sidx=x);h&&(t.attributes.AUDIO="audio",t.attributes.SUBTITLES="subs");h=Ph(t,c);b[m].playlists.push(h); 765"undefined"===typeof g&&"main"===f&&(g=d,g.default=!0);return b},{});if(!g){var l=Object.keys(a)[0];a[l].default=!0}return a},Fo=function(a,c){c=void 0===c?{}:c;return a.reduce(function(e,g){var l=g.attributes.label||g.attributes.lang||"text",b=g.attributes.lang||"und";e[l]||(e[l]={language:b,default:!1,autoselect:!1,playlists:[],uri:""});l=e[l].playlists;b=l.push;var d=g.attributes,f=g.segments,h=g.mediaSequence,m=g.discontinuityStarts;g=g.discontinuitySequence;"undefined"===typeof f&&(f=[{uri:d.baseUrl, 766timeline:d.periodStart,resolvedUri:d.baseUrl||"",duration:d.sourceDuration,number:0}],d.duration=d.sourceDuration);var p={};p=(p.NAME=d.id,p.BANDWIDTH=d.bandwidth,p["PROGRAM-ID"]=1,p);d.codecs&&(p.CODECS=d.codecs);f={attributes:p,uri:"",endList:"static"===d.type,timeline:d.periodStart,resolvedUri:d.baseUrl||"",targetDuration:d.duration,timelineStarts:d.timelineStarts,discontinuityStarts:m,discontinuitySequence:g,mediaSequence:h,segments:f};d.serviceLocation&&(f.attributes.serviceLocation=d.serviceLocation); 767b.call(l,Ph(f,c));return e},{})},Go=function(a){return a.reduce(function(c,e){if(!e)return c;e.forEach(function(g){var l=g.language;c[l]={autoselect:!1,default:!1,instreamId:g.channel,language:l};g.hasOwnProperty("aspectRatio")&&(c[l].aspectRatio=g.aspectRatio);g.hasOwnProperty("easyReader")&&(c[l].easyReader=g.easyReader);g.hasOwnProperty("3D")&&(c[l]["3D"]=g["3D"])});return c},{})},Ho=function(a){var c=a.attributes,e=a.segments,g=a.sidx;a=a.discontinuityStarts;var l={};e={attributes:(l.NAME=c.id, 768l.AUDIO="audio",l.SUBTITLES="subs",l.RESOLUTION={width:c.width,height:c.height},l.CODECS=c.codecs,l.BANDWIDTH=c.bandwidth,l["PROGRAM-ID"]=1,l),uri:"",endList:"static"===c.type,timeline:c.periodStart,resolvedUri:c.baseUrl||"",targetDuration:c.duration,discontinuityStarts:a,timelineStarts:c.timelineStarts,segments:e};c.frameRate&&(e.attributes["FRAME-RATE"]=c.frameRate);c.contentProtection&&(e.contentProtection=c.contentProtection);c.serviceLocation&&(e.attributes.serviceLocation=c.serviceLocation); 769g&&(e.sidx=g);return e},Io=function(a){a=a.attributes;return"video/mp4"===a.mimeType||"video/webm"===a.mimeType||"video"===a.contentType},Jo=function(a){a=a.attributes;return"audio/mp4"===a.mimeType||"audio/webm"===a.mimeType||"audio"===a.contentType},Ko=function(a){a=a.attributes;return"text/vtt"===a.mimeType||"text"===a.contentType},Lo=function(a,c){a.forEach(function(e){e.mediaSequence=0;e.discontinuitySequence=c.findIndex(function(g){return g.timeline===e.timeline});
769e.segments&&e.segments.forEach(function(g, 770l){g.number=l})})},Sk=function(a){return a?Object.keys(a).reduce(function(c,e){return c.concat(a[e].playlists)},[]):[]},Mo=function(a){var c=a.dashPlaylists,e=a.locations,g=a.contentSteering,l=void 0===a.sidxMapping?{}:a.sidxMapping,b=a.previousManifest,d=a.eventStream;if(!c.length)return{};a=c[0].attributes;var f=a.sourceDuration,h=a.type,m=a.suggestedPresentationDelay,p=a.minimumUpdatePeriod;a=Oh(c.filter(Io)).map(Ho);var t=Oh(c.filter(Jo)),x=Oh(c.filter(Ko));c=c.map(function(z){return z.attributes.captionServices}).filter(Boolean); 771var u={};f={allowCache:!0,discontinuityStarts:[],segments:[],endList:!0,mediaGroups:(u.AUDIO={},u.VIDEO={},u["CLOSED-CAPTIONS"]={},u.SUBTITLES={},u),uri:"",duration:f,playlists:Do(a,l)};0<=p&&(f.minimumUpdatePeriod=1E3*p);e&&(f.locations=e);g&&(f.contentSteering=g);"dynamic"===h&&(f.suggestedPresentationDelay=m);d&&0<d.length&&(f.eventStream=d);e=0===f.playlists.length;e=t.length?Eo(t,l,e):null;l=x.length?Fo(x,l):null;a=a.concat(Sk(e),Sk(l));g=a.map(function(z){return z.timelineStarts});f.timelineStarts= 772Pk(g);Lo(a,f.timelineStarts);e&&(f.mediaGroups.AUDIO.audio=e);l&&(f.mediaGroups.SUBTITLES.subs=l);c.length&&(f.mediaGroups["CLOSED-CAPTIONS"].cc=Go(c));return b?Co({oldManifest:b,newManifest:f}):f},Tk=function(a,c){for(var e=a.type,g=void 0===a.minimumUpdatePeriod?0:a.minimumUpdatePeriod,l=void 0===a.media?"":a.media,b=a.sourceDuration,d=void 0===a.timescale?1:a.timescale,f=void 0===a.startNumber?1:a.startNumber,h=a.periodStart,m=[],p=-1,t=0;t<c.length;t++){var x=c[t],u=x.d,z=x.r||0;x=x.t||0;0>p&& 773(p=x);x&&x>p&&(p=x);0>z?(z=t+1,z===c.length?"dynamic"===e&&0<g&&0<l.indexOf("$Number$")?(z=a,z=Math.ceil((((z.NOW+z.clientOffset)/1E3+(void 0===z.minimumUpdatePeriod?0:z.minimumUpdatePeriod)-(z.availabilityStartTime+(void 0===z.periodStart?0:z.periodStart)))*(void 0===z.timescale?1:z.timescale)-p)/u)):z=(b*d-p)/u:z=(c[z].t-p)/u):z+=1;z=f+m.length+z;for(x=f+m.length;x<z;)m.push({number:x,duration:u/d,time:p,timeline:h}),p+=u,x++}return m},Uk=/\$([A-z]*)(?:(%0)([0-9]+)d)?\$/g,Vk=function(a){return function(c, 774e,g,l){if("$$"===c)return"$";if("undefined"===typeof a[e])return c;c=""+a[e];if("RepresentationID"===e)return c;l=g?parseInt(l,10):1;return c.length>=l?c:""+Array(l-c.length+1).join("0")+c}},No=function(a,c){return a.duration||c?a.duration?Mh(a):Tk(a,c):[{number:a.startNumber||1,duration:a.sourceDuration,time:0,timeline:a.periodStart}]},Oo=function(a,c){var e={RepresentationID:a.id,Bandwidth:a.bandwidth||0},g=void 0===a.initialization?{sourceURL:"",range:""}:a.initialization,l=Se({baseUrl:a.baseUrl, 775source:g.sourceURL.replace(Uk,Vk(e)),range:g.range});return No(a,c).map(function(b){e.Number=b.number;e.Time=b.time;var d=(a.media||"").replace(Uk,Vk(e)),f=a.periodStart+(b.time-(a.presentationTimeOffset||0))/(a.timescale||1);return{uri:d,timeline:b.timeline,duration:b.duration,resolvedUri:qb(a.baseUrl||"",d),map:l,number:b.number,presentationTime:f}})},Po=function(a,c){var e=a.duration,g=void 0===a.segmentUrls?[]:a.segmentUrls,l=a.periodStart;if(!e&&!c||e&&c)throw Error("SEGMENT_TIME_UNSPECIFIED"); 776var b=g.map(function(f){var h=a.baseUrl,m=void 0===a.initialization?{}:a.initialization;m=Se({baseUrl:h,source:m.sourceURL,range:m.range});f=Se({baseUrl:h,source:f.media,range:f.mediaRange});f.map=m;return f}),d;e&&(d=Mh(a));c&&(d=Tk(a,c));return d.map(function(f,h){if(b[h]){h=b[h];var m=a.timescale||1,p=a.presentationTimeOffset||0;h.timeline=f.timeline;h.duration=f.duration;h.number=f.number;h.presentationTime=l+(f.time-p)/m;return h}}).filter(function(f){return f})},Qo=function(a){var c=a.attributes; 777a=a.segmentInfo;if(a.template){var e=Oo;var g=ob(c,a.template)}else a.base?(e=Ok,g=ob(c,a.base)):a.list&&(e=Po,g=ob(c,a.list));c={attributes:c};if(!e)return c;e=e(g,a.segmentTimeline);if(g.duration){var l=g;g.duration=l.duration/(void 0===l.timescale?1:l.timescale)}else g.duration=e.length?e.reduce(function(b,d){return Math.max(b,Math.ceil(d.duration))},0):0;c.attributes=g;c.segments=e;a.base&&g.indexRange&&(c.sidx=e[0],c.segments=[]);return c},Pa=function(a,c){return Mk(a.childNodes).filter(function(e){return e.tagName=== 778c})},Te=function(a){return a.textContent.trim()},Ro=function(a){return parseFloat(a.split("/").reduce(function(c,e){return c/e}))},de=function(a){a=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/.exec(a);if(!a)return 0;var c=$jscomp.makeIterator(a.slice(1));a=c.next().value;var e=c.next().value,g=c.next().value,l=c.next().value,b=c.next().value;c=c.next().value;
778return 31536E3*parseFloat(a||0)+2592E3*parseFloat(e||0)+86400*parseFloat(g||0)+3600*parseFloat(l||0)+60*parseFloat(b|| 7790)+parseFloat(c||0)},Wk={mediaPresentationDuration:function(a){return de(a)},availabilityStartTime:function(a){/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(a)&&(a+="Z");return Date.parse(a)/1E3},minimumUpdatePeriod:function(a){return de(a)},suggestedPresentationDelay:function(a){return de(a)},type:function(a){return a},timeShiftBufferDepth:function(a){return de(a)},start:function(a){return de(a)},width:function(a){return parseInt(a,10)},height:function(a){return parseInt(a,10)},bandwidth:function(a){return parseInt(a, 78010)},frameRate:function(a){return Ro(a)},startNumber:function(a){return parseInt(a,10)},timescale:function(a){return parseInt(a,10)},presentationTimeOffset:function(a){return parseInt(a,10)},duration:function(a){var c=parseInt(a,10);return isNaN(c)?de(a):c},d:function(a){return parseInt(a,10)},t:function(a){return parseInt(a,10)},r:function(a){return parseInt(a,10)},presentationTime:function(a){return parseInt(a,10)},DEFAULT:function(a){return a}},db=function(a){return a&&a.attributes?Mk(a.attributes).reduce(function(c, 781e){c[e.name]=(Wk[e.name]||Wk.DEFAULT)(e.value);return c},{}):{}},So={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime","urn:mpeg:dash:mp4protection:2011":"mp4protection"},hg=function(a,c){return c.length?ce(a.map(function(e){return c.map(function(g){var l=Te(g),b=qb(e.baseUrl, 782l);g=ob(db(g),{baseUrl:b});b!==l&&!g.serviceLocation&&e.serviceLocation&&(g.serviceLocation=e.serviceLocation);return g})})):a},Qh=function(a){var c=Pa(a,"SegmentTemplate")[0],e=Pa(a,"SegmentList")[0],g=e&&Pa(e,"SegmentURL").map(function(f){return ob({tag:"SegmentURL"},db(f))});a=Pa(a,"SegmentBase")[0];var l=e||c;l=l&&Pa(l,"SegmentTimeline")[0];var b=e||a||c;b=b&&Pa(b,"Initialization")[0];(c=c&&db(c))&&b?c.initialization=b&&db(b):c&&c.initialization&&(c.initialization={sourceURL:c.initialization}); 783var d={template:c,segmentTimeline:l&&Pa(l,"S").map(function(f){return db(f)}),list:e&&ob(db(e),{segmentUrls:g,initialization:db(b)}),base:a&&ob(db(a),{initialization:db(b)})};Object.keys(d).forEach(function(f){d[f]||delete d[f]});return d},To=function(a,c,e){return function(g){var l=Pa(g,"BaseURL");l=hg(c,l);var b=ob(a,db(g)),d=Qh(g);return l.map(function(f){return{segmentInfo:ob(e,d),attributes:ob(b,f)}})}},Uo=function(a){return a.reduce(function(c,e){var g=db(e);g.schemeIdUri&&(g.schemeIdUri=g.schemeIdUri.toLowerCase()); 784var l=So[g.schemeIdUri];l&&(c[l]={attributes:g},e=Pa(e,"cenc:pssh")[0])&&(e=Te(e),c[l].pssh=e&&fj(e));return c},{})},Vo=function(a){if("urn:scte:dash:cc:cea-608:2015"===a.schemeIdUri)return("string"!==typeof a.value?[]:a.value.split(";")).map(function(c){var e=c;if(/^CC\d=/.test(c)){c=$jscomp.makeIterator(c.split("\x3d"));var g=c.next().value;e=c.next().value}else/^CC\d$/.test(c)&&(g=c);return{channel:g,language:e}});if("urn:scte:dash:cc:cea-708:2015"===a.schemeIdUri)return("string"!==typeof a.value? 785[]:a.value.split(";")).map(function(c){var e={channel:void 0,language:void 0,aspectRatio:1,easyReader:0,"3D":0};if(/=/.test(c)){var g=$jscomp.makeIterator(c.split("\x3d")),l=g.next().value;g=g.next().value;e.channel=l;e.language=c;(void 0===g?"":g).split(",").forEach(function(b){var d=$jscomp.makeIterator(b.split(":"));b=d.next().value;d=d.next().value;"lang"===b?e.language=d:"er"===b?e.easyReader=Number(d):"war"===b?e.aspectRatio=Number(d):"3D"===b&&(e["3D"]=Number(d))})}else e.language=c;e.channel&& 786(e.channel="SERVICE"+e.channel);return e})},Wo=function(a){return ce(Pa(a.node,"EventStream").map(function(c){var e=db(c),g=e.schemeIdUri;return Pa(c,"Event").map(function(l){var b=db(l),d=e.timescale||1,f=(b.presentationTime||0)/d+a.attributes.start;return{schemeIdUri:g,value:e.value,id:b.id,start:f,end:f+(b.duration||0)/d,messageData:Te(l)||b.messageData,contentEncoding:e.contentEncoding,presentationTimeOffset:e.presentationTimeOffset||0}})}))},Xo=function(a,c,e){return function(g){var l=db(g), 787b=hg(c,Pa(g,"BaseURL")),d=Pa(g,"Role")[0];d={role:db(d)};l=ob(a,l,d);d=Pa(g,"Accessibility")[0];(d=Vo(db(d)))&&(l=ob(l,{captionServices:d}));
787(d=Pa(g,"Label")[0])&&d.childNodes.length&&(d=d.childNodes[0].nodeValue.trim(),l=ob(l,{label:d}));d=Uo(Pa(g,"ContentProtection"));Object.keys(d).length&&(l=ob(l,{contentProtection:d}));d=Qh(g);g=Pa(g,"Representation");d=ob(e,d);return ce(g.map(To(l,b,d)))}},Yo=function(a,c){return function(e,g){g=hg(c,Pa(e.node,"BaseURL"));var l=ob(a,{periodStart:e.attributes.start}); 788"number"===typeof e.attributes.duration&&(l.periodDuration=e.attributes.duration);var b=Pa(e.node,"AdaptationSet");e=Qh(e.node);return ce(b.map(Xo(l,g,e)))}},Zo=function(a,c){1<a.length&&c({type:"warn",message:"The MPD manifest should contain no more than one ContentSteering tag"});if(!a.length)return null;a=ob({serverURL:Te(a[0])},db(a[0]));a.queryBeforeStart="true"===a.queryBeforeStart;return a},$o=function(a,c){var e=c=void 0===c?{}:c,g=void 0===e.manifestUri?"":e.manifestUri;c=void 0===e.NOW? 789Date.now():e.NOW;var l=void 0===e.clientOffset?0:e.clientOffset;e=void 0===e.eventHandler?function(){}:e.eventHandler;var b=Pa(a,"Period");if(!b.length)throw Error("INVALID_NUMBER_OF_PERIOD");var d=Pa(a,"Location"),f=db(a);g=hg([{baseUrl:g}],Pa(a,"BaseURL"));a=Pa(a,"ContentSteering");f.type=f.type||"static";f.sourceDuration=f.mediaPresentationDuration||0;f.NOW=c;f.clientOffset=l;d.length&&(f.locations=d.map(Te));var h=[];b.forEach(function(m,p){var t=db(m);p=(p=h[p-1])?p.attributes:null;var x=f.type; 790t.start="number"===typeof t.start?t.start:p&&"number"===typeof p.start&&"number"===typeof p.duration?p.start+p.duration:p||"static"!==x?null:0;h.push({node:m,attributes:t})});return{locations:f.locations,contentSteeringInfo:Zo(a,e),representationInfo:ce(h.map(Yo(f,g))),eventStream:ce(h.map(Wo))}},Xk=function(a){if(""===a)throw Error("DASH_EMPTY_MANIFEST");var c=new Hj,e;try{var g=(e=c.parseFromString(a,"application/xml"))&&"MPD"===e.documentElement.tagName?e.documentElement:null}catch(l){}if(!g|| 791g&&0<g.getElementsByTagName("parsererror").length)throw Error("DASH_INVALID_XML");return g},ap=function(a){a=Pa(a,"UTCTiming")[0];if(!a)return null;a=db(a);switch(a.schemeIdUri){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":a.method="HEAD";break;case "urn:mpeg:dash:utc:http-xsdate:2014":case "urn:mpeg:dash:utc:http-iso:2014":case "urn:mpeg:dash:utc:http-xsdate:2012":case "urn:mpeg:dash:utc:http-iso:2012":a.method="GET";break;case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":a.method= 792"DIRECT";a.value=Date.parse(a.value);break;default:throw Error("UNSUPPORTED_UTC_TIMING_SCHEME");}return a},bp=Math.pow(2,32),Yk=function(a){a=new DataView(a.buffer,a.byteOffset,a.byteLength);return a.getBigUint64?(a=a.getBigUint64(0),a<Number.MAX_SAFE_INTEGER?Number(a):a):a.getUint32(0)*bp+a.getUint32(4)},cp=ka([73,68,51]),Ue=function g(c,e){void 0===e&&(e=0);c=ka(c);if(10>c.length-e||!Oa(c,cp,{offset:e}))return e;var l=e;var b=e;void 0===b&&(b=0);e=ka(c);var d=e[b+6]<<21|e[b+7]<<14|e[b+8]<<7|e[b+ 7939];e=(e[b+5]&16)>>4?d+20:d+10;return g(c,l+e)},Zk=function(c){return"string"===typeof c?Ek(c):c},dp=function(c){return Array.isArray(c)?c.map(function(e){return Zk(e)}):[Zk(c)]},ep=function b(e,g,l){void 0===l&&(l=!1);g=dp(g);e=ka(e);var d=[];if(!g.length)return d;for(var f=0;f<e.length;){var h=(e[f]<<24|e[f+1]<<16|e[f+2]<<8|e[f+3])>>>0,m=e.subarray(f+4,f+8);if(0===h)break;h=f+h;if(h>e.length){if(l)break;h=e.length}f=e.subarray(f+8,h);Oa(m,g[0])&&(1===g.length?d.push(f):d.push.apply(d,b(f,g.slice(1), 794l)));f=h}return d},$k=ka([26,69,223,163]),al=ka([66,130]);ka([24,83,128,103]);ka([21,73,169,102]);ka([22,84,174,107]);ka([174]);ka([215]);ka([35,227,131]);ka([174]);ka([131]);ka([136]);ka([134]);ka([99,162]);ka([224]);ka([225]);ka([31,67,182,117]);ka([231]);ka([42,215,177]);ka([160]);ka([155]);ka([161]);ka([163]);var Rh=[128,64,32,16,8,4,2,1],ig=function(e,g,l,b){void 0===l&&(l=!0);void 0===b&&(b=!1);var d=1;for(var f=0;f<Rh.length&&!(e[g]&Rh[f]);f++)d++;f=e.subarray(g,g+d);l&&(f=Array.prototype.slice.call(e, 795g,g+d),f[0]^=Rh[d-1]);return{length:d,value:no(f,{signed:b}),bytes:f}},bl=function l(g){return"string"===typeof g?g.match(/.{1,2}/g).map(function(b){return l(b)}):"number"===typeof g?oo(g):g},fp=function(g){return Array.isArray(g)?g.map(function(l){return bl(l)}):[bl(g)]},gp=function f(l,b,d){if(d>=b.length)return b.length;var h=ig(b,d,!1);if(Oa(l.bytes,h.bytes))return d;var m=ig(b,d+h.length);return f(l,b,d+m.length+m.value+h.length)},cl=function f(b,d){d=fp(d);b=ka(b);var h=[];if(!d.length)return h; 796for(var m=0;m<b.length;){var p=ig(b,m,!1),t=ig(b,m+p.length),x=m+p.length+t.length;127===t.value&&(t.value=gp(p,b,x),t.value!==b.length&&(t.value-=x));x=b.subarray(x,x+t.value>b.length?b.length:x+t.value);Oa(d[0],p.bytes)&&(1===d.length?h.push(x):h=h.concat(f(x,d.slice(1))));m+=p.length+t.length+x.length}return h},hp=ka([0,0,0,1]),ip=ka([0,0,1]),jp=ka([0,0,3]),dl=function(b,d,f,h){void 0===h&&(h=Infinity);b=ka(b);f=[].concat(f);for(var m=0,p,t=0;m<b.length&&(t<h||p);){var x=void 0;Oa(b.subarray(m), 797hp)?x=4:Oa(b.subarray(m),ip)&&(x=3);if(x){t++;if(p){b=b.subarray(p,m);d=[];for(f=1;f<b.length-2;)Oa(b.subarray(f,f+3),jp)&&(d.push(f+2),f++),f++;if(0!==d.length){h=b.length-d.length;m=new Uint8Array(h);for(f=p=0;f<h;p++,f++)p===d[0]&&(p++,d.shift()),m[f]=b[p];b=m}return b}var u=void 0;"h264"===d?u=b[m+x]&31:"h265"===d&&(u=b[m+x]>>1&63);-1!==f.indexOf(u)&&(p=m+x);m+=x+("h264"===d?1:2)}else m++}return b.subarray(0,0)},Gb={webm:ka([119,101,98,109]),matroska:ka([109,97,116,114,111,115,107,97]),flac:ka([102, 79876,97,67]),ogg:ka([79,103,103,83]),ac3:ka([11,119]),riff:ka([82,73,70,70]),avi:ka([65,86,73]),wav:ka([87,65,86,69]),"3gp":ka([102,116,121,112,51,103]),mp4:ka([102,116,121,112]),fmp4:ka([115,116,121,112]),mov:ka([102,116,121,112,113,116]),moov:ka([109,111,111,118]),moof:ka([109,111,111,102])},ee={aac:function(b){var d=Ue(b);return Oa(b,[255,16],{offset:d,mask:[255,22]})},mp3:function(b){var d=Ue(b);return Oa(b,[255,2],{offset:d,mask:[255,6]})},webm:function(b){b=cl(b,[$k,al])[0];return Oa(b,Gb.webm)}, 799mkv:function(b){b=cl(b,[$k,al])[0];return Oa(b,Gb.matroska)},mp4:function(b){if(ee["3gp"](b)||ee.mov(b))return!1;if(Oa(b,Gb.mp4,{offset:4})||Oa(b,Gb.fmp4,{offset:4})||Oa(b,Gb.moof,{offset:4})||Oa(b,Gb.moov,{offset:4}))return!0},mov:function(b){return Oa(b,Gb.mov,{offset:4})},"3gp":function(b){return Oa(b,Gb["3gp"],{offset:4})},ac3:function(b){var d=Ue(b);return Oa(b,Gb.ac3,{offset:d})},ts:function(b){if(189>b.length&&1<=b.length)return 71===b[0];for(var d=0;d+188<b.length&&188>d;){if(71===b[d]&&71=== 800b[d+188])return!0;d+=1}return!1},flac:function(b){var d=Ue(b);return Oa(b,Gb.flac,{offset:d})},ogg:function(b){return Oa(b,Gb.ogg)},avi:function(b){return Oa(b,Gb.riff)&&Oa(b,Gb.avi,{offset:8})},wav:function(b){return Oa(b,Gb.riff)&&Oa(b,Gb.wav,{offset:8})},h264:function(b){return dl(b,"h264",7,3).length},h265:function(b){return dl(b,"h265",[32,33],3).length}},Sh=Object.keys(ee).filter(function(b){return"ts"!==b&&"h264"!==b&&"h265"!==b}).concat(["ts","h264","h265"]);
800Sh.forEach(function(b){var d=ee[b]; 801ee[b]=function(f){return d(ka(f))}});var kp=ee,Th=function(b){b=ka(b);for(var d=0;d<Sh.length;d++){var f=Sh[d];if(kp[f](b))return f}return""},jg=function(b,d){return d&&d.responseURL&&b!==d.responseURL?d.responseURL:b},ac=function(b){return O.log.debug?O.log.debug.bind(O,"VHS:",b+" \x3e"):function(){}},uc=1/30,vc=3*uc,el=function(b,d){var f=[],h;if(b&&b.length)for(h=0;h<b.length;h++)d(b.start(h),b.end(h))&&f.push([b.start(h),b.end(h)]);return nb(f)},fe=function(b,d){return el(b,function(f,h){return f- 802vc<=d&&h+vc>=d})},kg=function(b,d){return el(b,function(f){return f-uc>=d})},lp=function(b,d){var f=null,h=null,m=0,p=[],t=[];if(!(b&&b.length&&d&&d.length))return nb();for(var x=b.length;x--;)p.push({time:b.start(x),type:"start"}),p.push({time:b.end(x),type:"end"});for(x=d.length;x--;)p.push({time:d.start(x),type:"start"}),p.push({time:d.end(x),type:"end"});p.sort(function(u,z){return u.time-z.time});for(x=0;x<p.length;x++)"start"===p[x].type?(m++,2===m&&(f=p[x].time)):"end"===p[x].type&&(m--,1=== 803m&&(h=p[x].time)),null!==f&&null!==h&&(t.push([f,h]),h=f=null);return nb(t)},fl=function(b){var d=[];if(!b||!b.length)return"";for(var f=0;f<b.length;f++)d.push(b.start(f)+" \x3d\x3e "+b.end(f));return d.join(", ")},sd=function(b){for(var d=[],f=0;f<b.length;f++)d.push({start:b.start(f),end:b.end(f)});return d},mp=function(b,d){if(b===d)return!1;if(!b&&d||!d&&b||b.length!==d.length)return!0;for(var f=0;f<b.length;f++)if(b.start(f)!==d.start(f)||b.end(f)!==d.end(f))return!0;return!1},Uh=function(b){if(b&& 804b.length&&b.end)return b.end(b.length-1)},Vh=function(b,d){var f=0;if(!b||!b.length)return f;for(var h=0;h<b.length;h++){var m=b.start(h),p=b.end(h);d>p||(f=d>m&&d<=p?f+(p-d):f+(p-m))}return f},Wh=function(b,d){if(!d.preload)return d.duration;var f=0;(d.parts||[]).forEach(function(h){f+=h.duration});(d.preloadHints||[]).forEach(function(h){"PART"===h.type&&(f+=b.partTargetDuration)});return f},Xh=function(b){return(b.segments||[]).reduce(function(d,f,h){f.parts?f.parts.forEach(function(m,p){d.push({duration:m.duration, 805segmentIndex:h,partIndex:p,part:m,segment:f})}):d.push({duration:f.duration,segmentIndex:h,partIndex:null,segment:f,part:null});return d},[])},gl=function(b){return(b=b.segments&&b.segments.length&&b.segments[b.segments.length-1])&&b.parts||[]},hl=function(b){var d=b.preloadSegment;if(d)return b=d.parts,d=(d.preloadHints||[]).reduce(function(f,h){return f+("PART"===h.type?1:0)},0),d+=b&&b.length?b.length:0},il=function(b,d){return d.endList?0:b&&b.suggestedPresentationDelay?b.suggestedPresentationDelay: 806(b=0<gl(d).length)&&d.serverControl&&d.serverControl.partHoldBack?d.serverControl.partHoldBack:b&&d.partTargetDuration?3*d.partTargetDuration:d.serverControl&&d.serverControl.holdBack?d.serverControl.holdBack:d.targetDuration?3*d.targetDuration:0},np=function(b,d){var f=0;d-=b.mediaSequence;var h=b.segments[d];if(h){if("undefined"!==typeof h.start)return{result:h.start,precise:!0};if("undefined"!==typeof h.end)return{result:h.end-h.duration,precise:!0}}for(;d--;){h=b.segments[d];if("undefined"!== 807typeof h.end)return{result:f+h.end,precise:!0};f+=Wh(b,h);if("undefined"!==typeof h.start)return{result:f+h.start,precise:!0}}return{result:f,precise:!1}},jl=function(b,d,f){"undefined"===typeof d&&(d=b.mediaSequence+b.segments.length);if(d<b.mediaSequence)return 0;var h=np(b,d);if(h.precise)return h.result;a:{for(var m=0,p=d-b.mediaSequence;p<b.segments.length;p++){d=b.segments[p];if("undefined"!==typeof d.start){b={result:d.start-m,precise:!0};break a}m+=Wh(b,d);if("undefined"!==typeof d.end){b= 808{result:d.end-m,precise:!0};break a}}b={result:-1,precise:!1}}return b.precise?b.result:h.result+f},kl=function(b,d,f){if(!b)return 0;"number"!==typeof f&&(f=0);if("undefined"===typeof d){if(b.totalDuration)return b.totalDuration;if(!b.endList)return window.Infinity}return jl(b,d,f)},Ve=function(b){var d=b.defaultDuration,f=b.durationList,h=b.startIndex,m=b.endIndex;b=0;h>m&&(m=$jscomp.makeIterator([m,h]),h=m.next().value,m=m.next().value);if(0>h){for(;h<Math.min(0,m);h++)b+=d;h=0}for(d=h;d<m;d++)b+= 809f[d].duration;return b},ll=function(b,d,f,h){if(!b||!b.segments)return null;if(b.endList)return kl(b);if(null===d)return null;d=jl(b,b.mediaSequence+b.segments.length,d||0);f&&(h="number"===typeof h?h:il(null,b),d-=h);return Math.max(0,d)},ml=function(b){return b.excludeUntil&&b.excludeUntil>Date.now()},Yh=function(b){return b.excludeUntil&&Infinity===b.excludeUntil},lg=function(b){var d=ml(b);return!b.disabled&&!d},nl=function(b,d){return d.attributes&&d.attributes[b]},Zh=function(b,d){if(1===b.playlists.length)return!0; 810var f=d.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===b.playlists.filter(function(h){return lg(h)?(h.attributes.BANDWIDTH||0)<f:!1}).length},$h=function(b,d){return!b&&!d||!b&&d||b&&!d?!1:b===d||b.id&&d.id&&b.id===d.id||b.resolvedUri&&d.resolvedUri&&b.resolvedUri===d.resolvedUri||b.uri&&d.uri&&b.uri===d.uri?!0:!1},ol=function(b,d){b=b&&b.mediaGroups&&b.mediaGroups.AUDIO||{};var f=!1,h;for(h in b){for(var m in b[h])if(f=d(b[h][m]))break;if(f)break}return!!f},We=function(b){if(!b||!b.playlists|| 811!b.playlists.length)return ol(b,function(m){return m.playlists&&m.playlists.length||m.uri});for(var d={},f=0;f<b.playlists.length;d={$jscomp$loop$prop$playlist$247:d.$jscomp$loop$prop$playlist$247},f++){d.$jscomp$loop$prop$playlist$247=b.playlists[f];var h=d.$jscomp$loop$prop$playlist$247.attributes&&d.$jscomp$loop$prop$playlist$247.attributes.CODECS;if(!(h&&h.split(",").every(function(m){return Bk(m)})||ol(b,function(m){return function(p){return $h(m.$jscomp$loop$prop$playlist$247,p)}}(d))))return!1}return!0}, 812Nb={liveEdgeDelay:il,duration:kl,seekable:function(b,d,f){var h=d||0;b=ll(b,d,!0,f);
812if(null===b)return nb();b<h&&(b=h);return nb(h,b)},getMediaInfoForTime:function(b){var d=b.playlist,f=b.currentTime,h=b.startingSegmentIndex,m=b.startingPartIndex,p=b.startTime;b=b.exactManifestTimings;for(var t=f-p,x=Xh(d),u=0,z=0;z<x.length;z++){var A=x[z];if(h===A.segmentIndex&&("number"!==typeof m||"number"!==typeof A.partIndex||m===A.partIndex)){u=z;break}}if(0>t){if(0<u)for(h=u-1;0<=h;h--){m=x[h];t+=m.duration; 813if(b){if(0>t)continue}else if(0>=t+uc)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:p-Ve({defaultDuration:d.targetDuration,durationList:x,startIndex:u,endIndex:h})}}return{partIndex:x[0]&&x[0].partIndex||null,segmentIndex:x[0]&&x[0].segmentIndex||0,startTime:f}}if(0>u){for(;0>u;u++)if(t-=d.targetDuration,0>t)return{partIndex:x[0]&&x[0].partIndex||null,segmentIndex:x[0]&&x[0].segmentIndex||0,startTime:f};u=0}for(h=u;h<x.length;h++)if(m=x[h],t-=m.duration,z=m.duration> 814uc&&0<=t+uc,0!==t&&!z||h===x.length-1){if(b){if(0<t)continue}else if(0<=t-uc)continue;return{partIndex:m.partIndex,segmentIndex:m.segmentIndex,startTime:p+Ve({defaultDuration:d.targetDuration,durationList:x,startIndex:u,endIndex:h})}}return{segmentIndex:x[x.length-1].segmentIndex,partIndex:x[x.length-1].partIndex,startTime:f}},isEnabled:lg,isDisabled:function(b){return b.disabled},isExcluded:ml,isIncompatible:Yh,playlistEnd:ll,isAes:function(b){for(var d=0;d<b.segments.length;d++)if(b.segments[d].key)return!0; 815return!1},hasAttribute:nl,estimateSegmentRequestTime:function(b,d,f,h){h=void 0===h?0:h;return nl("BANDWIDTH",f)?(b*f.attributes.BANDWIDTH-8*h)/d:NaN},isLowestEnabledRendition:Zh,isAudioOnly:We,playlistMatch:$h,segmentDurationWithParts:Wh},pl=O.log,ql=function(b,d,f){return"placeholder-uri-"+b+"-"+d+"-"+f},op=function(b){var d=b.onwarn,f=b.oninfo,h=b.manifestString,m=void 0===b.customTagParsers?[]:b.customTagParsers,p=void 0===b.customTagMappers?[]:b.customTagMappers;b=b.llhls;var t=new Xc;if(d)t.on("warn", 816d);if(f)t.on("info",f);m.forEach(function(u){return t.addParser(u)});p.forEach(function(u){return t.addTagMapper(u)});t.push(h);t.end();var x=t.manifest;b||("preloadSegment skip serverControl renditionReports partInf partTargetDuration".split(" ").forEach(function(u){x.hasOwnProperty(u)&&delete x[u]}),x.segments&&x.segments.forEach(function(u){["parts","preloadHints"].forEach(function(z){u.hasOwnProperty(z)&&delete u[z]})}));x.targetDuration||(f=10,x.segments&&x.segments.length&&(f=x.segments.reduce(function(u, 817z){return Math.max(u,z.duration)},0)),d&&d({message:"manifest has no targetDuration defaulting to "+f}),x.targetDuration=f);f=gl(x);f.length&&!x.partTargetDuration&&(f=f.reduce(function(u,z){return Math.max(u,z.duration)},0),d&&(d({message:"manifest has no partTargetDuration defaulting to "+f}),pl.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.")), 818x.partTargetDuration=f);return x},ge=function(b,d){b.mediaGroups&&["AUDIO","SUBTITLES"].forEach(function(f){if(b.mediaGroups[f])for(var h in b.mediaGroups[f])for(var m in b.mediaGroups[f][h])d(b.mediaGroups[f][h][m],f,h,m)})},rl=function(b){var d=b.playlist,f=b.uri;d.id=b.id;d.playlistErrors_=0;f&&(d.uri=f);d.attributes=d.attributes||{}},pp=function(b){for(var d=b.playlists.length;d--;){var f=b.playlists[d];rl({playlist:f,id:d+"-"+f.uri});f.resolvedUri=qb(b.uri,f.uri);b.playlists[f.id]=f;b.playlists[f.uri]= 819f;f.attributes.BANDWIDTH||pl.warn("Invalid playlist STREAM-INF detected. Missing BANDWIDTH attribute.")}},qp=function(b){ge(b,function(d){d.uri&&(d.resolvedUri=qb(b.uri,d.uri))})},rp=function(b,d){b="0-"+d;var f={mediaGroups:{AUDIO:{},VIDEO:{},"CLOSED-CAPTIONS":{},SUBTITLES:{}},uri:window.location.href,resolvedUri:window.location.href,playlists:[{uri:d,id:b,resolvedUri:d,attributes:{}}]};f.playlists[b]=f.playlists[0];f.playlists[d]=f.playlists[0];return f},sl=function(b,d,f){f=void 0===f?ql:f;b.uri= 820d;for(d=0;d<b.playlists.length;d++)b.playlists[d].uri||(b.playlists[d].uri="placeholder-uri-"+d);var h=We(b);ge(b,function(m,p,t,x){if(!m.playlists||!m.playlists.length){if(h&&"AUDIO"===p&&!m.uri)for(var u=0;u<b.playlists.length;u++){var z=b.playlists[u];if(z.attributes&&z.attributes.AUDIO&&z.attributes.AUDIO===t)return}m.playlists=[jb({},m)]}
820m.playlists.forEach(function(A,F){var H=f(p,t,x,A),L=F+"-"+H;A.uri?A.resolvedUri=A.resolvedUri||qb(b.uri,A.uri):(A.uri=0===F?H:L,A.resolvedUri=A.uri);A.id=A.id|| 821L;A.attributes=A.attributes||{};b.playlists[A.id]=A;b.playlists[A.uri]=A})});pp(b);qp(b)},td=function(){this.offset_=null;this.pendingDateRanges_=new Map;this.processedDateRanges_=new Map};td.prototype.setOffset=function(b){b=void 0===b?[]:b;null===this.offset_&&b.length&&(b=$jscomp.makeIterator(b).next().value,void 0!==b.programDateTime&&(this.offset_=b.programDateTime/1E3))};td.prototype.setPendingDateRanges=function(b){b=void 0===b?[]:b;if(b.length){var d=$jscomp.makeIterator(b).next().value.startDate.getTime(); 822this.trimProcessedDateRanges_(d);this.pendingDateRanges_=b.reduce(function(f,h){f.set(h.id,h);return f},new Map)}};td.prototype.processDateRange=function(b){this.pendingDateRanges_.delete(b.id);this.processedDateRanges_.set(b.id,b)};td.prototype.getDateRangesToProcess=function(){var b=this;if(null===this.offset_)return[];var d={},f=[];this.pendingDateRanges_.forEach(function(t,x){b.processedDateRanges_.has(x)||(t.startTime=t.startDate.getTime()/1E3-b.offset_,t.processDateRange=function(){return b.processDateRange(t)}, 823f.push(t),t.class&&(d[t.class]?(x=d[t.class].push(t),t.classListIndex=x-1):(d[t.class]=[t],t.classListIndex=0)))});for(var h=$jscomp.makeIterator(f),m=h.next();!m.done;m=h.next()){m=m.value;var p=d[m.class]||[];m.endTime=m.endDate?m.endDate.getTime()/1E3-this.offset_:m.endOnNext&&p[m.classListIndex+1]?p[m.classListIndex+1].startTime:m.duration?m.startTime+m.duration:m.plannedDuration?m.startTime+m.plannedDuration:m.startTime}return f};td.prototype.trimProcessedDateRanges_=function(b){var d=this;(new Map(this.processedDateRanges_)).forEach(function(f, 824h){f.startDate.getTime()<b&&d.processedDateRanges_.delete(h)})};var ud=function(b){var d=b.request,f=b.error,h=b.parseFailure,m=400<=d.status&&499>=d.status;b={uri:d.uri,requestType:b.requestType};var p=(200>d.status||299<d.status)&&!m||h;f&&m?(b.error=jb({},f),b.errorType=O.Error.NetworkRequestFailed):d.aborted?b.errorType=O.Error.NetworkRequestAborted:d.timedout?b.erroType=O.Error.NetworkRequestTimeout:p&&(b.errorType=h?O.Error.NetworkBodyParserFailed:O.Error.NetworkBadStatus,b.status=d.status, 825b.headers=d.headers);return b},tl=O.EventTarget,sp=function(b,d){if(d.endList||!d.serverControl)return b;var f={};if(d.serverControl.canBlockReload){var h=d.preloadSegment,m=d.mediaSequence+d.segments.length;if(h){h=h.parts||[];var p=hl(d)-1;-1<p&&p!==h.length-1&&(f._HLS_part=p);(-1<p||h.length)&&m--}f._HLS_msn=m}d.serverControl&&d.serverControl.canSkipUntil&&(f._HLS_skip=d.serverControl.canSkipDateranges?"v2":"YES");if(Object.keys(f).length){var t=new window.URL(b);["_HLS_skip","_HLS_msn","_HLS_part"].forEach(function(x){f.hasOwnProperty(x)&& 826t.searchParams.set(x,f[x])});b=t.toString()}return b},tp=function(b,d,f){b=b.slice();d=d.slice();f=f||0;for(var h=[],m,p=0;p<d.length;p++){var t=b[p+f],x=d[p];if(t){m=t.map||m;var u=h,z=u.push;if(t){var A=Ba(t,x);t.preloadHints&&!x.preloadHints&&delete A.preloadHints;if(t.parts&&!x.parts)delete A.parts;else if(t.parts&&x.parts)for(var F=0;F<x.parts.length;F++)t.parts&&t.parts[F]&&(A.parts[F]=Ba(t.parts[F],x.parts[F]));!t.skipped&&x.skipped&&(A.skipped=!1);t.preload&&!x.preload&&(A.preload=!1);t=A}else t= 827x;z.call(u,t)}else m&&!x.map&&(x.map=m),h.push(x)}return h},ul=function(b,d){!b.resolvedUri&&b.uri&&(b.resolvedUri=qb(d,b.uri));b.key&&!b.key.resolvedUri&&(b.key.resolvedUri=qb(d,b.key.uri));b.map&&!b.map.resolvedUri&&(b.map.resolvedUri=qb(d,b.map.uri));b.map&&b.map.key&&!b.map.key.resolvedUri&&(b.map.key.resolvedUri=qb(d,b.map.key.uri));b.parts&&b.parts.length&&b.parts.forEach(function(f){f.resolvedUri||(f.resolvedUri=qb(d,f.uri))});b.preloadHints&&b.preloadHints.length&&b.preloadHints.forEach(function(f){f.resolvedUri|| 828(f.resolvedUri=qb(d,f.uri))})},vl=function(b){var d=b.segments||[],f=b.preloadSegment;if(f&&f.parts&&f.parts.length){if(f.preloadHints)for(var h=0;h<f.preloadHints.length;h++)if("MAP"===f.preloadHints[h].type)return d;f.duration=b.targetDuration;f.preload=!0;d.push(f)}return d},wl=function(b,d){return b===d||b.segments&&d.segments&&b.segments.length===d.segments.length&&b.endList===d.endList&&b.mediaSequence===d.mediaSequence&&b.preloadSegment===d.preloadSegment},ai=function(b,d,f){f=void 0===f?wl: 829f;var h=Ba(b,{}),m=h.playlists[d.id];if(!m||f(m,d))return null;d.segments=vl(d);var p=Ba(m,d);p.preloadSegment&&!d.preloadSegment&&delete p.preloadSegment;if(m.segments){if(d.skip)for(d.segments=d.segments||[],f=0;f<d.skip.skippedSegments;f++)d.segments.unshift({skipped:!0});p.segments=tp(m.segments,d.segments,d.mediaSequence-m.mediaSequence)}
829p.segments.forEach(function(t){ul(t,p.resolvedUri)});for(m=0;m<h.playlists.length;m++)h.playlists[m].id===d.id&&(h.playlists[m]=p);h.playlists[d.id]=p;h.playlists[d.uri]= 830p;ge(b,function(t,x,u,z){if(t.playlists)for(x=0;x<t.playlists.length;x++)d.id===t.playlists[x].id&&(t.playlists[x]=p)});return h},bi=function(b,d){var f=b.segments||[],h=(f=f[f.length-1])&&f.parts&&f.parts[f.parts.length-1];f=h&&h.duration||f&&f.duration;return d&&f?1E3*f:500*(b.partTargetDuration||b.targetDuration||10)},xl=function(b,d,f){if(b){var h=[];b.forEach(function(m){if(m.attributes){var p=m.attributes;h.push({id:m.id,bandwidth:p.BANDWIDTH,resolution:p.RESOLUTION,codecs:p.CODECS})}});return{type:d, 831isLive:f,renditions:h}}},Fa=function(b,d,f){f=void 0===f?{}:f;var h=tl.call(this)||this;if(!b)throw Error("A non-empty playlist URL or object is required");h.logger_=ac("PlaylistLoader");var m=f;m=void 0===m.withCredentials?!1:m.withCredentials;h.src=b;h.vhs_=d;h.withCredentials=m;h.addDateRangesToTextTrack_=f.addDateRangesToTextTrack;b=d.options_;h.customTagParsers=b&&b.customTagParsers||[];h.customTagMappers=b&&b.customTagMappers||[];h.llhls=b&&b.llhls;h.dateRangesStorage_=new td;h.state="HAVE_NOTHING"; 832h.handleMediaupdatetimeout_=h.handleMediaupdatetimeout_.bind(h);h.on("mediaupdatetimeout",h.handleMediaupdatetimeout_);h.on("loadedplaylist",h.handleLoadedPlaylist_.bind(h));return h};$jscomp.inherits(Fa,tl);Fa.prototype.handleLoadedPlaylist_=function(){var b=this.media();b&&(this.dateRangesStorage_.setOffset(b.segments),this.dateRangesStorage_.setPendingDateRanges(b.dateRanges),b=this.dateRangesStorage_.getDateRangesToProcess(),b.length&&this.addDateRangesToTextTrack_&&this.addDateRangesToTextTrack_(b))}; 833Fa.prototype.handleMediaupdatetimeout_=function(){var b=this;if("HAVE_METADATA"===this.state){var d=this.media(),f=qb(this.main.uri,d.uri);this.llhls&&(f=sp(f,d));this.state="HAVE_CURRENT_METADATA";this.request=this.vhs_.xhr({uri:f,withCredentials:this.withCredentials,requestType:"hls-playlist"},function(h,m){if(b.request){if(h)return b.playlistRequestError(b.request,b.media(),"HAVE_METADATA");b.haveMetadata({playlistString:b.request.responseText,url:b.media().uri,id:b.media().id})}})}};Fa.prototype.playlistRequestError= 834function(b,d,f){var h=d.uri;d=d.id;this.request=null;f&&(this.state=f);this.error={playlist:this.main.playlists[d],status:b.status,message:"HLS playlist request error at URL: "+h+".",responseText:b.responseText,code:500<=b.status?4:2,metadata:ud({requestType:b.requestType,request:b,error:b.error})};this.trigger("error")};Fa.prototype.parseManifest_=function(b){var d=this,f=b.url;b=b.manifestString;try{return op({onwarn:function(h){return d.logger_("m3u8-parser warn for "+f+": "+h.message)},oninfo:function(h){return d.logger_("m3u8-parser info for "+ 835f+": "+h.message)},manifestString:b,customTagParsers:this.customTagParsers,customTagMappers:this.customTagMappers,llhls:this.llhls})}catch(h){this.error=h,this.error.metadata={errorType:O.Error.StreamingHlsPlaylistParserError,error:h}}};Fa.prototype.haveMetadata=function(b){var d=b.playlistString,f=b.playlistObject,h=b.url;b=b.id;this.request=null;this.state="HAVE_METADATA";var m={playlistInfo:{type:"media",uri:h}};this.trigger({type:"playlistparsestart",metadata:m});d=f||this.parseManifest_({url:h, 836manifestString:d});d.lastRequest=Date.now();rl({playlist:d,uri:h,id:b});h=ai(this.main,d);this.targetDuration=d.partTargetDuration||d.targetDuration;this.pendingMedia_=null;h?(this.main=h,this.media_=this.main.playlists[b]):this.trigger("playlistunchanged");this.updateMediaUpdateTimeout_(bi(this.media(),!!h));m.parsedPlaylist=xl(this.main.playlists,m.playlistInfo.type,!this.media_.endList);this.trigger({type:"playlistparsecomplete",metadata:m});this.trigger("loadedplaylist")};Fa.prototype.dispose= 837function(){this.trigger("dispose");this.stopRequest();window.clearTimeout(this.mediaUpdateTimeout);window.clearTimeout(this.finalRenditionTimeout);this.dateRangesStorage_=new td;this.off()};Fa.prototype.stopRequest=function(){if(this.request){var b=this.request;this.request=null;b.onreadystatechange=null;b.abort()}};Fa.prototype.media=function(b,d){var f=this;if(!b)return this.media_;if("HAVE_NOTHING"===this.state)throw Error("Cannot switch media playlist from "+this.state);if("string"===typeof b){if(!this.main.playlists[b])throw Error("Unknown playlist URI: "+ 838b);b=this.main.playlists[b]}window.clearTimeout(this.finalRenditionTimeout);if(d)d=(b.partTargetDuration||b.targetDuration)/2*1E3||5E3,this.finalRenditionTimeout=window.setTimeout(this.media.bind(this,b,!1),d);else{var h=this.state;d=!this.media_||b.id!==this.media_.id;var m=this.main.playlists[b.id];if(m&&m.endList||b.endList&&b.segments.length)this.request&&(this.request.onreadystatechange=null,this.request.abort(),this.request=null),this.state="HAVE_METADATA",this.media_=b,d&&(this.trigger("mediachanging"), 839"HAVE_MAIN_MANIFEST"===h?this.trigger("loadedmetadata"):this.trigger("mediachange"));else if(this.updateMediaUpdateTimeout_(bi(b,!0)),d){this.state="SWITCHING_MEDIA";if(this.request){if(b.resolvedUri===this.request.url)return;this.request.onreadystatechange=null;this.request.abort();this.request=null}this.media_&&this.trigger("mediachanging");this.pendingMedia_=b;var p={playlistInfo:{type:"media",uri:b.uri}};this.trigger({type:"playlistrequeststart",metadata:p});this.request=this.vhs_.xhr({uri:b.resolvedUri, 840withCredentials:this.withCredentials,requestType:"hls-playlist"},function(t,x){if(f.request){b.lastRequest=Date.now();b.resolvedUri=jg(b.resolvedUri,x);if(t)return f.playlistRequestError(f.request,b,h);f.trigger({type:"playlistrequestcomplete",metadata:p});f.haveMetadata({playlistString:x.responseText,url:b.uri,id:b.id});"HAVE_MAIN_MANIFEST"===h?f.trigger("loadedmetadata"):f.trigger("mediachange")}})}}};Fa.prototype.pause=function(){this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout), 841this.mediaUpdateTimeout=null);this.stopRequest();"HAVE_NOTHING"===this.state&&(this.started=!1);"SWITCHING_MEDIA"===this.state?this.state=this.media_?"HAVE_METADATA":"HAVE_MAIN_MANIFEST":"HAVE_CURRENT_METADATA"===this.state&&(this.state="HAVE_METADATA")};Fa.prototype.load=function(b){var d=this;this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);var f=this.media();b?this.mediaUpdateTimeout=window.setTimeout(function(){d.mediaUpdateTimeout=null;d.load()}, 842f?(f.partTargetDuration||f.targetDuration)/2*1E3:5E3):this.started?f&&!f.endList?this.trigger("mediaupdatetimeout"):this.trigger("loadedplaylist"):this.start()};Fa.prototype.updateMediaUpdateTimeout_=function(b){var d=this;this.mediaUpdateTimeout&&(window.clearTimeout(this.mediaUpdateTimeout),this.mediaUpdateTimeout=null);this.media()&&!this.media().endList&&(this.mediaUpdateTimeout=window.setTimeout(function(){d.mediaUpdateTimeout=null;d.trigger("mediaupdatetimeout");d.updateMediaUpdateTimeout_(b)}, 843b))};Fa.prototype.start=function(){var b=this;this.started=!0;
843if("object"===typeof this.src)this.src.uri||(this.src.uri=window.location.href),this.src.resolvedUri=this.src.uri,setTimeout(function(){b.setupInitialPlaylist(b.src)},0);else{var d={playlistInfo:{type:"multivariant",uri:this.src}};this.trigger({type:"playlistrequeststart",metadata:d});this.request=this.vhs_.xhr({uri:this.src,withCredentials:this.withCredentials,requestType:"hls-playlist"},function(f,h){if(b.request){b.request=null;if(f)return b.error= 844{status:h.status,message:"HLS playlist request error at URL: "+b.src+".",responseText:h.responseText,code:2,metadata:ud({requestType:h.requestType,request:h,error:f})},"HAVE_NOTHING"===b.state&&(b.started=!1),b.trigger("error");b.trigger({type:"playlistrequestcomplete",metadata:d});b.src=jg(b.src,h);b.trigger({type:"playlistparsestart",metadata:d});f=b.parseManifest_({manifestString:h.responseText,url:b.src});d.parsedPlaylist=xl(f.playlists,d.playlistInfo.type,!1);b.trigger({type:"playlistparsecomplete", 845metadata:d});b.setupInitialPlaylist(f)}})}};Fa.prototype.srcUri=function(){return"string"===typeof this.src?this.src:this.src.uri};Fa.prototype.setupInitialPlaylist=function(b){this.state="HAVE_MAIN_MANIFEST";if(b.playlists)this.main=b,sl(this.main,this.srcUri()),b.playlists.forEac
845h(function(f){f.segments=vl(f);f.segments.forEach(function(h){ul(h,f.resolvedUri)})}),this.trigger("loadedplaylist"),this.request||this.media(this.main.playlists[0]);else{var d=this.srcUri()||window.location.href;this.main= 846rp(b,d);this.haveMetadata({playlistObject:b,url:d,id:this.main.playlists[0].id});this.trigger("loadedmetadata")}};Fa.prototype.updateOrDeleteClone=function(b,d){for(var f=this.main,h=b.ID,m=f.playlists.length;m--;){var p=f.playlists[m];if(p.attributes["PATHWAY-ID"]===h){var t=p.resolvedUri,x=p.id;if(d){var u=this.createCloneURI_(p.resolvedUri,b),z=h+"-"+u,A=this.createCloneAttributes_(h,p.attributes);p=this.createClonePlaylist_(p,z,b,A);f.playlists[m]=p;f.playlists[z]=p;f.playlists[u]=p}else f.playlists.splice(m, 8471);delete f.playlists[x];delete f.playlists[t]}}this.updateOrDeleteCloneMedia(b,d)};Fa.prototype.updateOrDeleteCloneMedia=function(b,d){var f=this.main,h=b.ID;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(m){if(f.mediaGroups[m]&&f.mediaGroups[m][h])for(var p in f.mediaGroups[m])if(p===h){for(var t in f.mediaGroups[m][p])f.mediaGroups[m][p][t].playlists.forEac
847h(function(x,u){x=f.playlists[x.id];u=x.resolvedUri;delete f.playlists[x.id];delete f.playlists[u]});delete f.mediaGroups[m][p]}}); 848d&&this.createClonedMediaGroups_(b)};Fa.prototype.addClonePathway=function(b,d){d=void 0===d?{}:d;var f=this.main,h=f.playlists.length,m=this.createCloneURI_(d.resolvedUri,b),p=b.ID+"-"+m,t=this.createCloneAttributes_(b.ID,d.attributes);d=this.createClonePlaylist_(d,p,b,t);f.playlists[h]=d;f.playlists[p]=d;f.playlists[m]=d;this.createClonedMediaGroups_(b)};Fa.prototype.createClonedMediaGroups_=function(b){var d=this,f=b.ID,h=b["BASE-ID"],m=this.main;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(p){if(m.mediaGroups[p]&& 849!m.mediaGroups[p][f])for(var t in m.mediaGroups[p])if(t===h){m.mediaGroups[p][f]={};var x={},u;for(u in m.mediaGroups[p][t]){x.$jscomp$loop$prop$labelKey$249=u;var z=m.mediaGroups[p][t][x.$jscomp$loop$prop$labelKey$249];m.mediaGroups[p][f][x.$jscomp$loop$prop$labelKey$249]=jb({},z);x.$jscomp$loop$prop$newMedia$250=m.mediaGroups[p][f][x.$jscomp$loop$prop$labelKey$249];var A=d.createCloneURI_(z.resolvedUri,b);x.$jscomp$loop$prop$newMedia$250.resolvedUri=A;x.$jscomp$loop$prop$newMedia$250.uri=A;x.$jscomp$loop$prop$newMedia$250.playlists= 850[];
850z.playlists.forEach(function(F){return function(H,L){var I=m.playlists[H.id],N=ql(p,f,F.$jscomp$loop$prop$labelKey$249);N=f+"-"+N;if(I&&!m.playlists[N]){I=d.createClonePlaylist_(I,N,b);var T=I.resolvedUri;m.playlists[N]=I;m.playlists[T]=I}F.$jscomp$loop$prop$newMedia$250.playlists[L]=d.createClonePlaylist_(H,N,b)}}(x));x={$jscomp$loop$prop$labelKey$249:x.$jscomp$loop$prop$labelKey$249,$jscomp$loop$prop$newMedia$250:x.$jscomp$loop$prop$newMedia$250}}}})};Fa.prototype.createClonePlaylist_=function(b, 851d,f,h){f=this.createCloneURI_(b.resolvedUri,f);d={resolvedUri:f,uri:f,id:d};b.segments&&(d.segments=[]);h&&(d.attributes=h);return Ba(b,d)};Fa.prototype.createCloneURI_=function(b,d){b=new URL(b);b.hostname=d["URI-REPLACEMENT"].HOST;d=d["URI-REPLACEMENT"].PARAMS;for(var f=$jscomp.makeIterator(Object.keys(d)),h=f.next();!h.done;h=f.next())h=h.value,b.searchParams.set(h,d[h]);return b.href};Fa.prototype.createCloneAttributes_=function(b,d){var f={},h=(f["PATHWAY-ID"]=b,f);["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(m){d[m]&& 852(h[m]=b)});return h};Fa.prototype.getKeyIdSet=function(b){if(b.contentProtection){var d=new Set,f;for(f in b.contentProtection){var h=b.contentProtection[f].attributes.keyId;h&&d.add(h.toLowerCase())}return d}};var ci=function(b,d,f,h){var m="arraybuffer"===b.responseType?b.response:b.responseText;!d&&m&&(b.responseTime=Date.now(),b.roundTripTime=b.responseTime-b.requestTime,b.bytesReceived=m.byteLength||m.length,b.bandwidth||(b.bandwidth=Math.floor(b.bytesReceived/b.roundTripTime*8E3)));f.headers&& 853(b.responseHeaders=f.headers);d&&"ETIMEDOUT"===d.code&&(b.timedout=!0);d||b.aborted||200===f.statusCode||206===f.statusCode||0===f.statusCode||(d=Error("XHR Failed with a response of: "+(b&&(m||b.responseText))));h(d,b)},up=function(b,d){if(b&&b.size){var f=d;b.forEach(function(h){f=h(f)});return f}},vp=function(b,d,f,h){b&&b.size&&b.forEach(function(m){m(d,f,h)})},yl=function(){var b=function m(f,h){f=Ba({timeout:45E3},f);var p=m.beforeRequest||O.Vhs.xhr.beforeRequest,t=m._requestCallbackSet||O.Vhs.xhr._requestCallbackSet|| 854new Set,x=m._responseCallbackSet||O.Vhs.xhr._responseCallbackSet;p&&"function"===typeof p&&(O.log.warn("beforeRequest is deprecated, use onRequest instead."),t.add(p));var u=!0===O.Vhs.xhr.original?O.xhr:O.Vhs.xhr,z=up(t,f);t.delete(p);var A=u(z||f,function(H,L){vp(x,A,H,L);return ci(A,H,L,h)}),F=A.abort;A.abort=function(){A.aborted=!0;return F.apply(A,arguments)};A.uri=f.uri;A.requestType=f.requestType;A.requestTime=Date.now();return A};b.original=!0;return b},di=function(b){var d={};if(b.byterange){var f= 855b.byterange;b=f.offset;f="bigint"===typeof f.offset||"bigint"===typeof f.length?window.BigInt(f.offset)+window.BigInt(f.length)-window.BigInt(1):f.offset+f.length-1;d.Range="bytes\x3d"+b+"-"+f}return d},wp=function(b,d){b=b.toString(16);return"00".substring(0,2-b.length)+b+(d%2?" ":"")},xp=function(b){return 32<=b&&126>b?String.fromCharCode(b):"."},zl=function(b){var d={};Object.keys(b).forEach(function(f){var h=b[f];Dk(h)?d[f]={bytes:h.buffer,byteOffset:h.byteOffset,byteLength:h.byteLength}:d[f]= 856h});return d},mg=function(b){var d=b.byterange||{length:Infinity,offset:0};return[d.length,d.offset,b.resolvedUri].join()},Al=function(b){b=Array.prototype.slice.call(b);for(var d="",f,h,m=0;m<b.length/16;m++)f=b.slice(16*m,16*m+16).map(wp).join(""),h=b.slice(16*m,16*m+16).map(xp).join(""),d+=f+" "+h+"\n";return d},yp=Object.freeze({__proto__:null,createTransferableMessage:zl,initSegmentId:mg,segmentKeyId:function(b){return b.resolvedUri},hexDump:Al,tagDump:function(b){return Al(b.bytes)},textRanges:function(b){var d= 857"",f;for(f=0;f<b.length;f++){var h=b;var m=f;h=h.start(m)+"-"+h.end(m);d+=h+" "}return d}}),zp=function(b,d){try{var f=new Date(b)}catch(t){return null}if(!d||!d.segments||0===d.segments.length)return null;b=d.segments[0];if(f<new Date(b.dateTimeObject))return null;for(var h=0;h<d.segments.length-1&&!(b=d.segments[h],f<new Date(d.segments[h+1].dateTimeObject));h++);h=d.segments[d.segments.length-1];var m=h.dateTimeObject;if(h.videoTimingInfo){var p=h.videoTimingInfo;p=p.transmuxedPresentationEnd- 858p.transmuxedPresentationStart-p.transmuxerPrependedSeconds}else p=h.duration+.25*h.duration;p=new Date(m.getTime()+1E3*p);if(f>p)return null;f>new Date(m)&&(b=h);return{segment:b,estimatedStart:b.videoTimingInfo?b.videoTimingInfo.transmuxedPresentationStart:Nb.duration(d,d.mediaSequence+d.segments.indexOf(b)),type:b.videoTimingInfo?"accurate":"estimate"}},Ap=function(b,d){if(!d||!d.segments||0===d.segments.length)return null;for(var f=0,h,m=0;
858m<d.segments.length&&!(h=d.segments[m],f=h.videoTimingInfo? 859h.videoTimingInfo.transmuxedPresentationEnd:f+h.duration,b<=f);m++);d=d.segments[d.segments.length-1];if(d.videoTimingInfo&&d.videoTimingInfo.transmuxedPresentationEnd<b)return null;if(b>f){if(b>f+.25*d.duration)return null;h=d}return{segment:h,estimatedStart:h.videoTimingInfo?h.videoTimingInfo.transmuxedPresentationStart:f-h.duration,type:h.videoTimingInfo?"accurate":"estimate"}},Bp=function(b,d){try{var f=new Date(b);var h=new Date(d)}catch(m){}b=f.getTime();return(h.getTime()-b)/1E3},Cp=function(b){if(!b.segments|| 8600===b.segments.length)return!1;for(var d=0;d<b.segments.length;d++)if(!b.segments[d].dateTimeObject)return!1;return!0},Dp=function(b){var d=b.playlist,f=void 0===b.time?void 0:b.time;b=b.callback;if(!b)throw Error("getProgramTime: callback must be provided");if(!d||void 0===f)return b({message:"getProgramTime: playlist and time must be provided"});var h=Ap(f,d);if(!h)return b({message:"valid programTime was not found"});if("estimate"===h.type)return b({message:"Accurate programTime could not be determined. Please seek to e.seekTime and try again", 861seekTime:h.estimatedStart});d={mediaSeconds:f};h=h.segment;h.dateTimeObject?(f-=h.videoTimingInfo.transmuxedPresentationStart+h.videoTimingInfo.transmuxerPrependedSeconds,f=new Date(h.dateTimeObject.getTime()+1E3*f)):f=null;f&&(d.programDateTime=f.toISOString());return b(null,d)},Bl=function(b){var d=b.programTime,f=b.playlist,h=void 0===b.retryCount?2:b.retryCount,m=b.seekTo,p=void 0===b.pauseAfterSeek?!0:b.pauseAfterSeek,t=b.tech,x=b.callback;if(!x)throw Error("seekToProgramTime: callback must be provided"); 862if("undefined"===typeof d||!f||!m)return x({message:"seekToProgramTime: programTime, seekTo and playlist must be provided"});if(!f.endList&&!t.hasStarted_)return x({message:"player must be playing a live stream to start buffering"});if(!Cp(f))return x({message:"programDateTime tags must be provided in the manifest "+f.resolvedUri});b=zp(d,f);if(!b)return x({message:d+" was not found in the stream"});var u=b.segment,z=Bp(u.dateTimeObject,d);if("estimate"===b.type){if(0===h)return x({message:d+" is not buffered yet. Try again"}); 863m(b.estimatedStart+z);t.one("seeked",function(){Bl({programTime:d,playlist:f,retryCount:h-1,seekTo:m,pauseAfterSeek:p,tech:t,callback:x})})}else b=u.start+z,t.one("seeked",function(){return x(null,t.currentTime())}),p&&t.pause(),m(b)},Cl=function(b,d){if(4===b.readyState)return d()},Ep=function(b,d,f,h){var m=[],p,t=!1,x=function(A,F,H,L){F.abort();t=!0;return f(A,F,H,L)},u=function(A,F){if(!t){if(A)return A.metadata=ud({requestType:h,request:F,error:A}),x(A,F,"",m);var H=F.responseText.substring(m&& 864m.byteLength||0,F.responseText.length);m=po(m,Ek(H,!0));p=p||Ue(m);if(10>m.length||p&&m.length<p+2)return Cl(F,function(){return x(A,F,"",m)});H=Th(m);return"ts"===H&&188>m.length||!H&&376>m.length?Cl(F,function(){return x(A,F,"",m)}):x(null,F,H,m)}},z=d({uri:b,beforeSend:function(A){A.overrideMimeType("text/plain; charset\x3dx-user-defined");A.addEventListener("progress",function(F){return ci(A,null,{statusCode:A.status},u)})}},function(A,F){return ci(z,A,F,u)});return z},Dl=O.EventTarget,El=function(b, 865d){if(!wl(b,d)||b.sidx&&d.sidx&&(b.sidx.offset!==d.sidx.offset||b.sidx.length!==d.sidx.length)||!b.sidx&&d.sidx||b.sidx&&!d.sidx||b.segments&&!d.segments||!b.segments&&d.segments)return!1;if(!b.segments&&!d.segments)return!0;for(var f=0;f<b.segments.length;f++){var h=b.segments[f],m=d.segments[f];if(h.uri!==m.uri)return!1;if(h.byterange||m.byterange)if(h=h.byterange,m=m.byterange,h&&!m||!h&&m||h.offset!==m.offset||h.length!==m.length)return!1}return!0},Fp=function(b,d,f,h){return"placeholder-uri-"+ 866b+"-"+d+"-"+(h.attributes.NAME||f)},Gp=function(b){var d=b.mainXml,f=b.srcUrl;b={manifestUri:f,clientOffset:b.clientOffset,sidxMapping:b.sidxMapping,previousManifest:b.previousManifest};b=void 0===b?{}:b;d=$o(Xk(d),b);var h=d.representationInfo.map(Qo);b=Mo({dashPlaylists:h,locations:d.locations,contentSteering:d.contentSteeringInfo,sidxMapping:b.sidxMapping,previousManifest:b.previousManifest,eventStream:d.eventStream});sl(b,f,Fp);return b},Hp=function(b,d){ge(b,function(f,h,m,p){d.mediaGroups[h][m]&& 867p in d.mediaGroups[h][m]||delete b.mediaGroups[h][m][p]})},Ip=function(b,d,f){for(var h=!0,m=Ba(b,{duration:d.duration,minimumUpdatePeriod:d.minimumUpdatePeriod,timelineStarts:d.timelineStarts}),p=0;p<d.playlists.length;p++){var t=d.playlists[p];if(t.sidx){var x=gg(t.sidx);f&&f[x]&&f[x].sidx&&Nh(t,f[x].sidx,t.sidx.resolvedUri)}if(t=ai(m,t,El))m=t,h=!1}ge(d,function(u,z,A,F){if(u.playlists&&u.playlists.length){var H=u.playlists[0].id,L=ai(m,u.playlists[0],El);L&&(m=L,F in m.mediaGroups[z][A]||(m.mediaGroups[z][A][F]= 868u),m.mediaGroups[z][A][F].playlists[0]=m.playlists[H],h=!1)}});Hp(m,d);d.minimumUpdatePeriod!==b.minimumUpdatePeriod&&(h=!1);return h?null:m},Fl=function(b,d){var f={},h;for(h in b){var m=b[h].sidx;if(m){var p=gg(m);
868if(!d[p])break;var t=d[p].sidxInfo;(!t.map&&!m.map||t.map&&m.map&&t.map.byterange.offset===m.map.byterange.offset&&t.map.byterange.length===m.map.byterange.length)&&t.uri===m.uri&&t.byterange.offset===m.byterange.offset&&t.byterange.length===m.byterange.length&&(f[p]=d[p])}}return f}, 869Jp=function(b,d){var f=Fl(b.playlists,d);ge(b,function(h,m,p,t){h.playlists&&h.playlists.length&&(f=Ba(f,Fl(h.playlists,d)))});return f},Qa=function(b,d,f,h){f=void 0===f?{}:f;var m=Dl.call(this)||this;m.mainPlaylistLoader_=h||m;h||(m.isMain_=!0);h=f;h=void 0===h.withCredentials?!1:h.withCredentials;m.vhs_=d;m.withCredentials=h;m.addMetadataToTextTrack=f.addMetadataToTextTrack;if(!b)throw Error("A non-empty playlist URL or object is required");m.on("minimumUpdatePeriod",function(){m.refreshXml_()}); 870m.on("mediaupdatetimeout",function(){m.refreshMedia_(m.media().id)});m.state="HAVE_NOTHING";m.loadedPlaylists_={};m.logger_=ac("DashPlaylistLoader");m.isMain_?(m.mainPlaylistLoader_.srcUrl=b,m.mainPlaylistLoader_.sidxMapping_={}):m.childPlaylist_=b;return m};$jscomp.inherits(Qa,Dl);Qa.prototype.requestErrored_=function(b,d,f){if(!this.request)return!0;this.request=null;if(b)return this.error="object"!==typeof b||b instanceof Error?{status:d.status,message:"DASH request error at URL: "+d.uri,response:d.response, 871code:2,metadata:b.metadata}:b,f&&(this.state=f),this.trigger("error"),!0};Qa.prototype.addSidxSegments_=function(b,d,f){var h=this,m=b.sidx&&gg(b.sidx);if(b.sidx&&m&&!this.mainPlaylistLoader_.sidxMapping_[m]){var p=jg(b.sidx.resolvedUri),t=function(x,u){if(!h.requestErrored_(x,u,d)){x=h.mainPlaylistLoader_.sidxMapping_;var z=u.requestType;try{var A=ka(u.response).subarray(8),F=new DataView(A.buffer,A.byteOffset,A.byteLength),H={version:A[0],flags:new Uint8Array(A.subarray(1,4)),references:[],referenceId:F.getUint32(4), 872timescale:F.getUint32(8)},L=12;0===H.version?(H.earliestPresentationTime=F.getUint32(L),H.firstOffset=F.getUint32(L+4),L+=8):(H.earliestPresentationTime=Yk(A.subarray(L)),H.firstOffset=Yk(A.subarray(L+8)),L+=16);L+=2;var I=F.getUint16(L);for(L+=2;0<I;L+=12,I--)H.references.push({referenceType:(A[L]&128)>>>7,referencedSize:F.getUint32(L)&2147483647,subsegmentDuration:F.getUint32(L+4),startsWithSap:!!(A[L+8]&128),sapType:(A[L+8]&112)>>>4,sapDeltaTime:F.getUint32(L+8)&268435455});var N=H}catch(T){T.metadata= 873ud({requestType:z,request:u,parseFailure:!0});h.requestErrored_(T,u,d);return}x[m]={sidxInfo:b.sidx,sidx:N};Nh(b,N,b.sidx.resolvedUri);return f(!0)}};this.request=Ep(p,this.vhs_.xhr,function(x,u,z,A){if(x)return t(x,u);if(!z||"mp4"!==z)return t({status:u.status,message:"Unsupported "+(z||"unknown")+" container type for sidx segment at URL: "+p,response:"",playlist:b,internal:!0,playlistExclusionDuration:Infinity,code:2},u);var F=b.sidx.byterange;z=F.offset;F=F.length;if(A.length>=F+z)return t(x,{response:A.subarray(z, 874z+F),status:u.status,uri:u.uri});h.request=h.vhs_.xhr({uri:p,responseType:"arraybuffer",requestType:"dash-sidx",headers:di({byterange:b.sidx.byterange})},t)},"dash-sidx")}else this.mediaRequest_=window.setTimeout(function(){return f(!1)},0)};Qa.prototype.dispose=function(){this.trigger("dispose");this.stopRequest();this.loadedPlaylists_={};window.clearTimeout(this.minimumUpdatePeriodTimeout_);window.clearTimeout(this.mediaRequest_);window.clearTimeout(this.mediaUpdateTimeout);this.minimumUpdatePeriodTimeout_= 875this.mediaRequest_=this.mediaUpdateTimeout=null;this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_=null);this.off()};Qa.prototype.hasPendingRequest=function(){return this.request||this.mediaRequest_};Qa.prototype.stopRequest=function(){if(this.request){var b=this.request;this.request=null;b.onreadystatechange=null;b.abort()}};Qa.prototype.media=function(b){var d=this;if(!b)return this.media_; 876if("HAVE_NOTHING"===this.state)throw Error("Cannot switch media playlist from "+this.state);var f=this.state;if("string"===typeof b){if(!this.mainPlaylistLoader_.main.playlists[b])throw Error("Unknown playlist URI: "+b);b=this.mainPlaylistLoader_.main.playlists[b]}var h=!this.media_||b.id!==this.media_.id;h&&this.loadedPlaylists_[b.id]&&this.loadedPlaylists_[b.id].endList?(this.state="HAVE_METADATA",this.media_=b,h&&(this.trigger("mediachanging"),this.trigger("mediachange"))):h&&(this.media_&&this.trigger("mediachanging"), 877this.addSidxSegments_(b,f,function(m){d.haveMetadata({startingState:f,playlist:b})}))};Qa.prototype.haveMetadata=function(b){var d=b.startingState;b=b.playlist;this.state="HAVE_METADATA";this.loadedPlaylists_[b.id]=b;this.mediaRequest_=null;this.refreshMedia_(b.id);"HAVE_MAIN_MANIFEST"===d?this.trigger("loadedmetadata"):this.trigger("mediachange")};Qa.prototype.pause=function(){this.mainPlaylistLoader_.createMupOnMedia_&&(this.off("loadedmetadata",this.mainPlaylistLoader_.createMupOnMedia_),this.mainPlaylistLoader_.createMupOnMedia_= 878null);this.stopRequest();window.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null;this.isMain_&&(window.clearTimeout(this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_),this.mainPlaylistLoader_.minimumUpdatePeriodTimeout_=null);"HAVE_NOTHING"===this.state&&(this.started=!1)};Qa.prototype.load=function(b){var d=this;window.clearTimeout(this.mediaUpdateTimeout);this.mediaUpdateTimeout=null;var f=this.media();b?this.mediaUpdateTimeout=window.setTimeout(function(){return d.load()}, 879f?f.targetDuration/2*1E3:5E3):this.started?f&&!f.endList?(this.isMain_&&!this.minimumUpdatePeriodTimeout_&&(this.trigger("minimumUpdatePeriod"),this.updateMinimumUpdatePeriodTimeout_()),this.trigger("mediaupdatetimeout")):this.trigger("loadedplaylist"):this.start()};Qa.prototype.start=function(){var b=this;this.started=!0;this.isMain_?this.requestMain_(function(d,f){b.haveMain_();b.hasPendingRequest()||b.media_||b.media(b.mainPlaylistLoader_.main.playlists[0])}):this.mediaRequest_=window.setTimeout(function(){return b.haveMain_()}, 8800)};Qa.prototype.requestMain_=function(b){var d=this,f={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestrequeststart",metadata:f});this.request=this.vhs_.xhr({uri:this.mainPlaylistLoader_.srcUrl,withCredentials:this.withCredentials,requestType:"dash-manifest"},function(h,m){h&&(h.metadata=ud({requestType:m.requestType,request:m,error:h}));if(d.requestErrored_(h,m))"HAVE_NOTHING"===d.state&&(d.started=!1);else{d.trigger({type:"manifestrequestcomplete",metadata:f});var p= 881m.responseText!==d.mainPlaylistLoader_.mainXml_;d.mainPlaylistLoader_.mainXml_=m.responseText;d.mainLoaded_=m.responseHeaders&&m.responseHeaders.date?Date.parse(m.responseHeaders.date):Date.now();d.mainPlaylistLoader_.srcUrl=jg(d.mainPlaylistLoader_.srcUrl,m);
881if(p)d.handleMain_(),d.syncClientServerClock_(function(){return b(m,p)});else return b(m,p)}})};Qa.prototype.syncClientServerClock_=function(b){var d=this,f=ap(Xk(this.mainPlaylistLoader_.mainXml_));if(null===f)return this.mainPlaylistLoader_.clientOffset_= 882this.mainLoaded_-Date.now(),b();if("DIRECT"===f.method)return this.mainPlaylistLoader_.clientOffset_=f.value-Date.now(),b();this.request=this.vhs_.xhr({uri:qb(this.mainPlaylistLoader_.srcUrl,f.value),method:f.method,withCredentials:this.withCredentials,requestType:"dash-clock-sync"},function(h,m){if(d.request){if(h)return d.error.metadata=ud({requestType:m.requestType,request:m,error:h}),d.mainPlaylistLoader_.clientOffset_=d.mainLoaded_-Date.now(),b();h="HEAD"===f.method?m.responseHeaders&&m.responseHeaders.date? 883Date.parse(m.responseHeaders.date):d.mainLoaded_:Date.parse(m.responseText);d.mainPlaylistLoader_.clientOffset_=h-Date.now();b()}})};Qa.prototype.haveMain_=function(){this.state="HAVE_MAIN_MANIFEST";this.isMain_?this.trigger("loadedplaylist"):this.media_||this.media(this.childPlaylist_)};Qa.prototype.handleMain_=function(){this.mediaRequest_=null;var b=this.mainPlaylistLoader_.main,d={manifestInfo:{uri:this.mainPlaylistLoader_.srcUrl}};this.trigger({type:"manifestparsestart",metadata:d});try{var f= 884Gp({mainXml:this.mainPlaylistLoader_.mainXml_,srcUrl:this.mainPlaylistLoader_.srcUrl,clientOffset:this.mainPlaylistLoader_.clientOffset_,sidxMapping:this.mainPlaylistLoader_.sidxMapping_,previousManifest:b})}catch(p){this.error=p,this.error.metadata={errorType:O.Error.StreamingDashManifestParserError,error:p},this.trigger("error")}b&&(f=Ip(b,f,this.mainPlaylistLoader_.sidxMapping_));this.mainPlaylistLoader_.main=f?f:b;var h=this.mainPlaylistLoader_.main.locations&&this.mainPlaylistLoader_.main.locations[0]; 885h&&h!==this.mainPlaylistLoader_.srcUrl&&(this.mainPlaylistLoader_.srcUrl=h);(!b||f&&f.minimumUpdatePeriod!==b.minimumUpdatePeriod)&&this.updateMinimumUpdatePeriodTimeout_();this.addEventStreamToMetadataTrack_(f);if(f){h=f;b=h.duration;h=h.endList;var m=[];
885f.playlists.forEach(function(p){m.push({id:p.id,bandwidth:p.attributes.BANDWIDTH,resolution:p.attributes.RESOLUTION,codecs:p.attributes.CODECS})});d.parsedManifest={duration:b,isLive:!h,renditions:m};this.trigger({type:"manifestparsecomplete",metadata:d})}return!!f}; 886Qa.prototype.updateMinimumUpdatePeriodTimeout_=function(){var b=this.mainPlaylistLoader_;b.createMupOnMedia_&&(b.off("loadedmetadata",b.createMupOnMedia_),b.createMupOnMedia_=null);b.minimumUpdatePeriodTimeout_&&(window.clearTimeout(b.minimumUpdatePeriodTimeout_),b.minimumUpdatePeriodTimeout_=null);var d=b.main&&b.main.minimumUpdatePeriod;0===d&&(b.media()?d=1E3*b.media().targetDuration:(b.createMupOnMedia_=b.updateMinimumUpdatePeriodTimeout_,b.one("loadedmetadata",b.createMupOnMedia_)));"number"!== 887typeof d||0>=d?0>d&&this.logger_("found invalid minimumUpdatePeriod of "+d+", not setting a timeout"):this.createMUPTimeout_(d)};Qa.prototype.createMUPTimeout_=function(b){var d=this.mainPlaylistLoader_;d.minimumUpdatePeriodTimeout_=window.setTimeout(function(){d.minimumUpdatePeriodTimeout_=null;d.trigger("minimumUpdatePeriod");d.createMUPTimeout_(b)},b)};Qa.prototype.refreshXml_=function(){var b=this;this.requestMain_(function(d,f){f&&(b.media_&&(b.media_=b.mainPlaylistLoader_.main.playlists[b.media_.id]), 888b.mainPlaylistLoader_.sidxMapping_=Jp(b.mainPlaylistLoader_.main,b.mainPlaylistLoader_.sidxMapping_),b.addSidxSegments_(b.media(),b.state,function(h){b.refreshMedia_(b.media().id)}))})};Qa.prototype.refreshMedia_=function(b){var d=this;if(!b)throw Error("refreshMedia_ must take a media id");this.media_&&this.isMain_&&this.handleMain_();var f=this.mainPlaylistLoader_.main.playlists,h=!this.media_||this.media_!==f[b];h?this.media_=f[b]:this.trigger("playlistunchanged");if(!this.mediaUpdateTimeout){var m= 889function(){d.media().endList||(d.mediaUpdateTimeout=window.setTimeout(function(){d.trigger("mediaupdatetimeout");m()},bi(d.media(),!!h)))};m()}this.trigger("loadedplaylist")};Qa.prototype.addEventStreamToMetadataTrack_=function(b){b&&this.mainPlaylistLoader_.main.eventStream&&(b=this.mainPlaylistLoader_.main.eventStream.map(function(d){return{cueTime:d.start,frames:[{data:d.messageData}]}}),this.addMetadataToTextTrack("EventStream",b,this.mainPlaylistLoader_.main.duration))};Qa.prototype.getKeyIdSet= 890function(b){if(b.contentProtection){var d=new Set,f;for(f in b.contentProtection){var h=b.contentProtection[f].attributes["cenc:default_KID"];h&&d.add(h.replace(/-/g,"").toLowerCase())}return d}};var pb={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},Gl= 891function(b){b.on=b.addEventListener;b.off=b.removeEventListener;return b},Kp=function(b){try{return URL.createObjectURL(new Blob([b],{type:"application/javascript"}))}catch(f){var d=new BlobBuilder;d.append(b);return URL.createObjectURL(d.getBlob())}},Hl=function(b){return function(){var d=Kp(b),f=Gl(new Worker(d));f.objURL=d;var h=f.terminate;f.on=f.addEventListener;f.off=f.removeEventListener;f.terminate=function(){URL.revokeObjectURL(d);return h.call(this)};return f}},Il=function(b){return"var browserWorkerPolyFill \x3d "+ 892Gl.toString()+";\nbrowserWorkerPolyFill(self);\n"+b},Jl=function(b){return b.toString().replace(/^function.+?{/,"").slice(0,-1)},vq=Il(Jl(function(){var b="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{},d=function(){this.init=function(){var k={};this.on=function(n,q){k[n]||(k[n]=[]);k[n]=k[n].concat(q)};this.off=function(n,q){if(!k[n])return!1;q=k[n].indexOf(q);k[n]=k[n].slice();k[n].splice(q,1);return-1< 893q};this.trigger=function(n){var q,r;if(q=k[n])if(2===arguments.length){var v=q.length;for(r=0;r<v;++r)q[r].call(this,arguments[1])}else{var y=[];for(r=1;r<arguments.length;++r)y.push(arguments[r]);v=q.length;for(r=0;r<v;++r)q[r].apply(this,y)}};this.dispose=function(){k={}}}};d.prototype.pipe=function(k){this.on("data",function(n){k.push(n)});this.on("done",function(n){k.flush(n)});this.on("partialdone",function(n){k.partialFlush(n)});this.on("endedtimeline",function(n){k.endTimeline(n)});this.on("reset", 894function(n){k.reset(n)});return k};d.prototype.push=function(k){this.trigger("data",k)};d.prototype.flush=function(k){this.trigger("done",k)};d.prototype.partialFlush=function(k){this.trigger("partialdone",k)};d.prototype.endTimeline=function(k){this.trigger("endedtimeline",k)};d.prototype.reset=function(k){this.trigger("reset",k)};var f=Math.pow(2,32),h=function(k){k=new DataView(k.buffer,k.byteOffset,k.byteLength);
894return k.getBigUint64?(k=k.getBigUint64(0),k<Number.MAX_SAFE_INTEGER?Number(k):k): 895k.getUint32(0)*f+k.getUint32(4)},m,p,t,x,u,z,A,F,H,L,I,N,T,fa,X,ra;(function(){var k;t={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:[]};if("undefined"!==typeof Uint8Array){for(k in t)t.hasOwnProperty(k)&&(t[k]=[k.charCodeAt(0),k.charCodeAt(1),k.charCodeAt(2),k.charCodeAt(3)]); 896x=new Uint8Array([105,115,111,109]);z=new Uint8Array([97,118,99,49]);u=new Uint8Array([0,0,0,1]);A=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]);F=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]);H={video:A,audio:F};N=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]);I=new Uint8Array([0,0,0,0,0,0,0,0]);fa=T=new Uint8Array([0,0,0,0,0,0,0, 8970]);X=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]);ra=T;L=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}})();var ca=function(k){var n=[],q=0,r;for(r=1;r<arguments.length;r++)n.push(arguments[r]);for(r=n.length;r--;)q+=n[r].byteLength;var v=new Uint8Array(q+8);(new DataView(v.buffer,v.byteOffset,v.byteLength)).setUint32(0,v.byteLength);v.set(k,4);r=0;for(q=8;r<n.length;r++)v.set(n[r],q),q+=n[r].byteLength;return v};var ea=function(){return ca(t.dinf,ca(t.dref,N))};var ja=function(k){return ca(t.esds,new Uint8Array([0, 8980,0,0,3,25,0,0,0,4,17,64,21,0,6,0,0,0,218,192,0,0,218,192,5,2,k.audioobjecttype<<3|k.samplingfrequencyindex>>>1,k.samplingfrequencyindex<<7|k.channelcount<<3,6,1,2]))};var Aa=function(){return ca(t.ftyp,x,u,x,z)};var ta=function(k){return ca(t.hdlr,H[k])};var mb=function(k){var n=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,k.duration>>>24&255,k.duration>>>16&255,k.duration>>>8&255,k.duration&255,85,196,0,0]);k.samplerate&&(n[12]=k.samplerate>>>24&255,n[13]=k.samplerate>>>16&255,n[14]=k.samplerate>>> 8998&255,n[15]=k.samplerate&255);return ca(t.mdhd,n)};var ng=function(k){return ca(t.mdia,mb(k),ta(k.type),Lp(k))};var og=function(k){return ca(t.mfhd,new Uint8Array([0,0,0,0,(k&4278190080)>>24,(k&16711680)>>16,(k&65280)>>8,k&255]))};var Lp=function(k){return ca(t.minf,"video"===k.type?ca(t.vmhd,L):ca(t.smhd,I),ea(),Mp(k))};var Kl=function(k){for(var n=k.length,q=[];n--;)q[n]=Np(k[n]);return ca.apply(null,[t.moov,Op(4294967295)].concat(q).concat(Pp(k)))};var Pp=function(k){for(var n=k.length,q=[];n--;)q[n]= 900Qp(k[n]);return ca.apply(null,[t.mvex].concat(q))};var Op=function(k){k=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(k&4278190080)>>24,(k&16711680)>>16,(k&65280)>>8,k&255,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 ca(t.mvhd,k)};var Rp=function(k){k=k.samples||[];var n=new Uint8Array(4+k.length),q;for(q=0;q<k.length;q++){var r=k[q].flags;n[q+4]=r.dependsOn<< 9014|r.isDependedOn<<2|r.hasRedundancy}return ca(t.sdtp,n)};var Mp=function(k){return ca(t.stbl,m(k),ca(t.stts,ra),ca(t.stsc,fa),ca(t.stsz,X),ca(t.stco,T))};(function(){m=function(q){return ca(t.stsd,new Uint8Array([0,0,0,0,0,0,0,1]),"video"===q.type?k(q):n(q))};var k=function(q){var r=q.sps||[],v=q.pps||[],y=[],E=[],G;for(G=0;G<r.length;G++)y.push((r[G].byteLength&65280)>>>8),y.push(r[G].byteLength&255),y=y.concat(Array.prototype.slice.call(r[G]));for(G=0;G<v.length;G++)E.push((v[G].byteLength&65280)>>> 9028),E.push(v[G].byteLength&255),E=E.concat(Array.prototype.slice.call(v[G]));r=[t.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,(q.width&65280)>>8,q.width&255,(q.height&65280)>>8,q.height&255,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]),ca(t.avcC,new Uint8Array([1,q.profileIdc,q.profileCompatibility,q.levelIdc,255].concat([r.length],y,[v.length],E))),ca(t.btrt,new Uint8Array([0,28, 903156,128,0,45,198,192,0,45,198,192]))];q.sarRatio&&(v=q.sarRatio[0],q=q.sarRatio[1],r.push(ca(t.pasp,new Uint8Array([(v&4278190080)>>24,(v&16711680)>>16,(v&65280)>>8,v&255,(q&4278190080)>>24,(q&16711680)>>16,(q&65280)>>8,q&255]))));return ca.apply(null,r)};var n=function(q){return ca(t.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(q.channelcount&65280)>>8,q.channelcount&255,(q.samplesize&65280)>>8,q.samplesize&255,0,0,0,0,(q.samplerate&65280)>>8,q.samplerate&255,0,0]),ja(q))}})();var Sp=function(k){k= 904new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(k.id&4278190080)>>24,(k.id&16711680)>>16,(k.id&65280)>>8,k.id&255,0,0,0,0,(k.duration&4278190080)>>24,(k.duration&16711680)>>16,(k.duration&65280)>>8,k.duration&255,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,(k.width&65280)>>8,k.width&255,0,0,(k.height&65280)>>8,k.height&255,0,0]);return ca(t.tkhd,k)};var Tp=function(k){var n=ca(t.tfhd,new Uint8Array([0,0,0,58,(k.id&4278190080)>>24,(k.id&16711680)>> 90516,(k.id&65280)>>8,k.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0]));var q=Math.floor(k.baseMediaDecodeTime/f);var r=Math.floor(k.baseMediaDecodeTime%f);q=ca(t.tfdt,new Uint8Array([1,0,0,0,q>>>24&255,q>>>16&255,q>>>8&255,q&255,r>>>24&255,r>>>16&255,r>>>8&255,r&255]));if("audio"===k.type)return k=p(k,92),ca(t.traf,n,q,k);r=Rp(k);k=p(k,r.length+92);return ca(t.traf,n,q,k,r)};var Np=function(k){k.duration=k.duration||4294967295;return ca(t.trak,Sp(k),ng(k))};var Qp=function(k){var n=new Uint8Array([0,0,0, 9060,(k.id&4278190080)>>24,(k.id&16711680)>>16,(k.id&65280)>>8,k.id&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);"video"!==k.type&&(n[n.length-1]=0);return ca(t.trex,n)};(function(){var k=function(r,v){var y=0,E=0,G=0,J=0;r.length&&(void 0!==r[0].duration&&(y=1),void 0!==r[0].size&&(E=2),void 0!==r[0].flags&&(G=4),void 0!==r[0].compositionTimeOffset&&(J=8));return[0,0,y|E|G|J,1,(r.length&4278190080)>>>24,(r.length&16711680)>>>16,(r.length&65280)>>>8,r.length&255,(v&4278190080)>>>24,(v&16711680)>>>16,(v&65280)>>> 9078,v&255]};var n=function(r,v){var y;r=r.samples||[];v+=20+16*r.length;var E=k(r,v);
907v=new Uint8Array(E.length+16*r.length);v.set(E);E=E.length;for(y=0;y<r.length;y++){var G=r[y];v[E++]=(G.duration&4278190080)>>>24;v[E++]=(G.duration&16711680)>>>16;v[E++]=(G.duration&65280)>>>8;v[E++]=G.duration&255;v[E++]=(G.size&4278190080)>>>24;v[E++]=(G.size&16711680)>>>16;v[E++]=(G.size&65280)>>>8;v[E++]=G.size&255;v[E++]=G.flags.isLeading<<2|G.flags.dependsOn;v[E++]=G.flags.isDependedOn<<6|G.flags.hasRedundancy<< 9084|G.flags.paddingValue<<1|G.flags.isNonSyncSample;v[E++]=G.flags.degradationPriority&61440;v[E++]=G.flags.degradationPriority&15;v[E++]=(G.compositionTimeOffset&4278190080)>>>24;v[E++]=(G.compositionTimeOffset&16711680)>>>16;v[E++]=(G.compositionTimeOffset&65280)>>>8;v[E++]=G.compositionTimeOffset&255}return ca(t.trun,v)};var q=function(r,v){var y;r=r.samples||[];v+=20+8*r.length;var E=k(r,v);v=new Uint8Array(E.length+8*r.length);v.set(E);E=E.length;for(y=0;y<r.length;y++){var G=r[y];v[E++]=(G.duration& 9094278190080)>>>24;v[E++]=(G.duration&16711680)>>>16;v[E++]=(G.duration&65280)>>>8;v[E++]=G.duration&255;v[E++]=(G.size&4278190080)>>>24;v[E++]=(G.size&16711680)>>>16;v[E++]=(G.size&65280)>>>8;v[E++]=G.size&255}return ca(t.trun,v)};p=function(r,v){return"audio"===r.type?q(r,v):n(r,v)}})();var Xe={ftyp:Aa,mdat:function(k){return ca(t.mdat,k)},moof:function(k,n){for(var q=[],r=n.length;r--;)q[r]=Tp(n[r]);return ca.apply(null,[t.moof,og(k)].concat(q))},moov:Kl,initSegment:function(k){var n=Aa();k=Kl(k); 910var q=new Uint8Array(n.byteLength+k.byteLength);q.set(n);q.set(k,n.byteLength);return q}},Ll=function(k,n){var q={size:0,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0,degradationPriority:0,isNonSyncSample:1}};q.dataOffset=n;q.compositionTimeOffset=k.pts-k.dts;q.duration=k.duration;q.size=4*k.length;q.size+=k.byteLength;k.keyFrame&&(q.flags.dependsOn=2,q.flags.isNonSyncSample=0);return q},Yc=[33,16,5,32,164,27],ei=[33,65,108,84,1,2,4,8,168,2,4,8,17,191,252],Ga=function(k){for(var n= 911[];k--;)n.push(0);return n},Up=function(k){return Object.keys(k).reduce(function(n,q){n[q]=new Uint8Array(k[q].reduce(function(r,v){return r.concat(v)},[]));return n},{})},fi;var Ml=function(k){return 9E4*k};var Nl=function(k,n){return k*n};var gi=function(k){return k/9E4};var Ol=function(k,n){return k/n};var ya={ONE_SECOND_IN_TS:9E4,secondsToVideoTs:Ml,secondsToAudioTs:Nl,videoTsToSeconds:gi,audioTsToSeconds:Ol,audioTsToVideoTs:function(k,n){return Ml(Ol(k,n))},videoTsToAudioTs:function(k,n){return Nl(gi(k), 912n)},metadataTsToSeconds:function(k,n,q){return gi(q?k:k-n)}},Vp=ya.ONE_SECOND_IN_TS,Ye={parseSei:function(k){for(var n=0,q={payloadType:-1,payloadSize:0},r=0,v=0;n<k.byteLength&&128!==k[n];){for(;255===k[n];)r+=255,n++;for(r+=k[n++];255===k[n];)v+=255,n++;v+=k[n++];if(!q.payload&&4===r)if("GA94"===String.fromCharCode(k[n+3],k[n+4],k[n+5],k[n+6])){q.payloadType=r;q.payloadSize=v;q.payload=k.subarray(n,n+v);break}else q.payload=void 0;n+=v;v=r=0}return q},parseUserData:function(k){return 181!==k.payload[0]|| 91349!==(k.payload[1]<<8|k.payload[2])||"GA94"!==String.fromCharCode(k.payload[3],k.payload[4],k.payload[5],k.payload[6])||3!==k.payload[7]?null:k.payload.subarray(8,k.payload.length-1)},parseCaptionPackets:function(k,n){var q=[],r;if(!(n[0]&64))return q;var v=n[0]&31;for(r=0;r<v;r++){var y=3*r;var E={type:n[y+2]&3,pts:k};n[y+2]&4&&(E.ccData=n[y+3]<<8|n[y+4],q.push(E))}return q},discardEmulationPreventionBytes:function(k){for(var n=k.byteLength,q=[],r=1,v;r<n-2;)0===k[r]&&0===k[r+1]&&3===k[r+2]?(q.push(r+ 9142),r+=2):r++;if(0===q.length)return k;n-=q.length;v=new Uint8Array(n);var y=0;for(r=0;r<n;y++,r++)y===q[0]&&(y++,q.shift()),v[r]=k[y];return v},USER_DATA_REGISTERED_ITU_T_T35:4},Ob=function(k){k=k||{};Ob.prototype.init.call(this);this.parse708captions_="boolean"===typeof k.parse708captions?k.parse708captions:!0;this.captionPackets_=[];this.ccStreams_=[new Ra(0,0),new Ra(0,1),new Ra(1,0),new Ra(1,1)];this.parse708captions_&&(this.cc708Stream_=new Ja({captionServices:k.captionServices}));this.reset(); 915this.ccStreams_.forEach(function(n){n.on("data",this.trigger.bind(this,"data"));n.on("partialdone",this.trigger.bind(this,"partialdone"));n.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")))};Ob.prototype=new d;Ob.prototype.push=function(k){if("sei_rbsp"===k.nalUnitType){var n=Ye.parseSei(k.escapedRBSP); 916n.payload&&n.payloadType===Ye.USER_DATA_REGISTERED_ITU_T_T35&&(n=Ye.parseUserData(n))&&(k.dts<this.latestDts_?this.ignoreNextEqualDts_=!0:k.dts===this.latestDts_&&this.ignoreNextEqualDts_?(this.numSameDts_--,this.numSameDts_||(this.ignoreNextEqualDts_=!1)):(n=Ye.parseCaptionPackets(k.pts,n),this.captionPackets_=this.captionPackets_.concat(n),this.latestDts_!==k.dts&&(this.numSameDts_=0),this.numSameDts_++,this.latestDts_=k.dts)
916)}};Ob.prototype.flushCCStreams=function(k){this.ccStreams_.forEach(function(n){return"flush"=== 917k?n.flush():n.partialFlush()},this)};Ob.prototype.flushStream=function(k){this.captionPackets_.length&&(this.captionPackets_.forEach(function(n,q){n.presortIndex=q}),this.captionPackets_.sort(function(n,q){return n.pts===q.pts?n.presortIndex-q.presortIndex:n.pts-q.pts}),this.captionPackets_.forEach(function(n){2>n.type?this.dispatchCea608Packet(n):this.dispatchCea708Packet(n)},this),this.captionPackets_.length=0);this.flushCCStreams(k)};Ob.prototype.flush=function(){return this.flushStream("flush")}; 918Ob.prototype.partialFlush=function(){return this.flushStream("partialFlush")};Ob.prototype.reset=function(){this.latestDts_=null;this.ignoreNextEqualDts_=!1;this.numSameDts_=0;this.activeCea608Channel_=[null,null];this.ccStreams_.forEach(function(k){k.reset()})};Ob.prototype.dispatchCea608Packet=function(k){this.setsTextOrXDSActive(k)?this.activeCea608Channel_[k.type]=null:this.setsChannel1Active(k)?this.activeCea608Channel_[k.type]=0:this.setsChannel2Active(k)&&(this.activeCea608Channel_[k.type]= 9191);null!==this.activeCea608Channel_[k.type]&&this.ccStreams_[(k.type<<1)+this.activeCea608Channel_[k.type]].push(k)};Ob.prototype.setsChannel1Active=function(k){return 4096===(k.ccData&30720)};Ob.prototype.setsChannel2Active=function(k){return 6144===(k.ccData&30720)};Ob.prototype.setsTextOrXDSActive=function(k){return 256===(k.ccData&28928)||4138===(k.ccData&30974)||6186===(k.ccData&30974)};Ob.prototype.dispatchCea708Packet=function(k){this.parse708captions_&&this.cc708Stream_.push(k)};var Wp={127:9834, 9204128: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},Xp=function(k){var n=Wp[k]||k;return k&4096&&k===n?"":String.fromCharCode(n)},pg=function(k){return 32<=k&&127>=k||160<=k&&255>=k},Jc=function(k){this.windowNum=k;this.reset()};Jc.prototype.reset=function(){this.clearText();this.pendingNewLine= 921!1;this.winAttr={};this.penAttr={};this.penLoc={};this.penColor={};this.anchorPoint=this.anchorHorizontal=this.anchorVertical=this.relativePositioning=this.priority=this.columnLock=this.rowLock=this.visible=0;this.rowCount=1;this.virtualRowCount=this.rowCount+1;this.columnCount=41;this.penStyle=this.windowStyle=0};Jc.prototype.getText=function(){return this.rows.join("\n")};Jc.prototype.clearText=function(){this.rows=[""];this.rowIdx=0};Jc.prototype.newLine=function(k){this.rows.length>=this.virtualRowCount&& 922"function"===typeof this.beforeRowOverflow&&this.beforeRowOverflow(k);0<this.rows.length&&(this.rows.push(""),this.rowIdx++);for(;this.rows.length>this.virtualRowCount;)this.rows.shift(),this.rowIdx--};Jc.prototype.isEmpty=function(){return 0===this.rows.length?!0:1===this.rows.length?""===this.rows[0]:!1};Jc.prototype.addText=function(k){this.rows[this.rowIdx]+=k};Jc.prototype.backspace=function(){if(!this.isEmpty()){var k=this.rows[this.rowIdx];this.rows[this.rowIdx]=k.substr(0,k.length-1)}};var qg= 923function(k,n,q){this.serviceNum=k;this.text="";this.currentWindow=new Jc(-1);this.windows=[];this.stream=q;"string"===typeof n&&this.createTextDecoder(n)};qg.prototype.init=function(k,n){this.startPts=k;for(k=0;8>k;k++)this.windows[k]=new Jc(k),"function"===typeof n&&(this.windows[k].beforeRowOverflow=n)};qg.prototype.setCurrentWindow=function(k){this.currentWindow=this.windows[k]};qg.prototype.createTextDecoder=function(k){if("undefined"===typeof TextDecoder)this.stream.trigger("log",{level:"warn", 924message:"The `encoding` option is unsupported without TextDecoder support"});else try{this.textDecoder_=new TextDecoder(k)}catch(n){this.stream.trigger("log",{level:"warn",message:"TextDecoder could not be created with "+k+" encoding. "+n})}};var Ja=function(k){k=k||{};Ja.prototype.init.call(this);var n=this,q=k.captionServices||{},r={},v;Object.keys(q).forEach(function(y){v=q[y];/^SERVICE/.test(y)&&(r[y]=v.encoding)});this.serviceEncodings=r;this.current708Packet=null;this.services={};this.push= 925function(y){3===y.type?n.new708Packet():null===n.current708Packet&&n.new708Packet();n.add708Bytes(y)}};Ja.prototype=new d;Ja.prototype.new708Packet=function(){null!==this.current708Packet&&this.push708Packet();this.current708Packet={data:[],ptsVals:[]}};Ja.prototype.add708Bytes=function(k){var n=k.ccData,q=n>>>8;n&=255;this.current708Packet.ptsVals.push(k.pts);this.current708Packet.data.push(q);this.current708Packet.data.push(n)};Ja.prototype.push708Packet=function(){var k=this.current708Packet,n= 926k.data,q=0,r=n[q++];k.seq=r>>6;for(k.sizeCode=r&63;q<n.length;
926q++){r=n[q++];k=r>>5;var v=r&31;7===k&&0<v&&(k=r=n[q++]);this.pushServiceBlock(k,q,v);0<v&&(q+=v-1)}};Ja.prototype.pushServiceBlock=function(k,n,q){var r=n,v=this.current708Packet.data,y=this.services[k];for(y||(y=this.initService(k,r));r<n+q&&r<v.length;r++)k=v[r],pg(k)?r=this.handleText(r,y):24===k?r=this.multiByteCharacter(r,y):16===k?r=this.extendedCommands(r,y):128<=k&&135>=k?r=this.setCurrentWindow(r,y):152<=k&&159>=k?r=this.defineWindow(r, 927y):136===k?r=this.clearWindows(r,y):140===k?r=this.deleteWindows(r,y):137===k?r=this.displayWindows(r,y):138===k?r=this.hideWindows(r,y):139===k?r=this.toggleWindows(r,y):151===k?r=this.setWindowAttributes(r,y):144===k?r=this.setPenAttributes(r,y):145===k?r=this.setPenColor(r,y):146===k?r=this.setPenLocation(r,y):143===k?y=this.reset(r,y):8===k?y.currentWindow.backspace():12===k?y.currentWindow.clearText():13===k?y.currentWindow.pendingNewLine=!0:14===k?y.currentWindow.clearText():141===k&&r++};Ja.prototype.extendedCommands= 928function(k,n){var q=this.current708Packet.data[++k];pg(q)&&(k=this.handleText(k,n,{isExtended:!0}));return k};Ja.prototype.getPts=function(k){return this.current708Packet.ptsVals[Math.floor(k/2)]};Ja.prototype.initService=function(k,n){var q="SERVICE"+k,r=this,v;q in this.serviceEncodings&&(v=this.serviceEncodings[q]);this.services[k]=new qg(k,v,r);this.services[k].init(this.getPts(n),function(y){r.flushDisplayed(y,r.services[k])});return this.services[k]};Ja.prototype.handleText=function(k,n,q){function r(P){return P.map(function(U){return("0"+ 929(U&255).toString(16)).slice(-2)}).join("")}var v=q&&q.isExtended,y=q&&q.isMultiByte;q=this.current708Packet.data;var E=v?4096:0,G=q[k],J=q[k+1];q=n.currentWindow;y?(J=[G,J],k++):J=[G];n.textDecoder_&&!v?n=n.textDecoder_.decode(new Uint8Array(J)):y?(n=r(J),n=String.fromCharCode(parseInt(n,16))):n=Xp(E|G);q.pendingNewLine&&!q.isEmpty()&&q.newLine(this.getPts(k));q.pendingNewLine=!1;q.addText(n);return k};Ja.prototype.multiByteCharacter=function(k,n){var q=this.current708Packet.data,r=q[k+2];pg(q[k+ 9301])&&pg(r)&&(k=this.handleText(++k,n,{isMultiByte:!0}));return k};Ja.prototype.setCurrentWindow=function(k,n){n.setCurrentWindow(this.current708Packet.data[k]&7);return k};Ja.prototype.defineWindow=function(k,n){var q=this.current708Packet.data,r=q[k];n.setCurrentWindow(r&7);n=n.currentWindow;r=q[++k];n.visible=(r&32)>>5;n.rowLock=(r&16)>>4;n.columnLock=(r&8)>>3;n.priority=r&7;r=q[++k];n.relativePositioning=(r&128)>>7;n.anchorVertical=r&127;r=q[++k];n.anchorHorizontal=r;r=q[++k];n.anchorPoint=(r& 931240)>>4;n.rowCount=r&15;r=q[++k];n.columnCount=r&63;r=q[++k];n.windowStyle=(r&56)>>3;n.penStyle=r&7;n.virtualRowCount=n.rowCount+1;return k};Ja.prototype.setWindowAttributes=function(k,n){var q=this.current708Packet.data,r=n.currentWindow.winAttr;n=q[++k];r.fillOpacity=(n&192)>>6;r.fillRed=(n&48)>>4;r.fillGreen=(n&12)>>2;r.fillBlue=n&3;n=q[++k];r.borderType=(n&192)>>6;r.borderRed=(n&48)>>4;r.borderGreen=(n&12)>>2;r.borderBlue=n&3;n=q[++k];r.borderType+=(n&128)>>5;r.wordWrap=(n&64)>>6;r.printDirection= 932(n&48)>>4;r.scrollDirection=(n&12)>>2;r.justify=n&3;n=q[++k];r.effectSpeed=(n&240)>>4;r.effectDirection=(n&12)>>2;r.displayEffect=n&3;return k};Ja.prototype.flushDisplayed=function(k,n){for(var q=[],r=0;8>r;r++)n.windows[r].visible&&!n.windows[r].isEmpty()&&q.push(n.windows[r].getText());n.endPts=k;n.text=q.join("\n\n");this.pushCaption(n);n.startPts=k};Ja.prototype.pushCaption=function(k){""!==k.text&&(this.trigger("data",{startPts:k.startPts,endPts:k.endPts,text:k.text,stream:"cc708_"+k.serviceNum}), 933k.text="",k.startPts=k.endPts)};Ja.prototype.displayWindows=function(k,n){var q=this.current708Packet.data[++k],r=this.getPts(k);this.flushDisplayed(r,n);for(r=0;8>r;r++)q&1<<r&&(n.windows[r].visible=1);return k};Ja.prototype.hideWindows=function(k,n){var q=this.current708Packet.data[++k],r=this.getPts(k);this.flushDisplayed(r,n);for(r=0;8>r;r++)q&1<<r&&(n.windows[r].visible=0);return k};Ja.prototype.toggleWindows=function(k,n){var q=this.current708Packet.data[++k],r=this.getPts(k);this.flushDisplayed(r, 934n);for(r=0;8>r;r++)q&1<<r&&(n.windows[r].visible^=1);return k};Ja.prototype.clearWindows=function(k,n){var q=this.current708Packet.data[++k],r=this.getPts(k);this.flushDisplayed(r,n);for(r=0;8>r;r++)q&1<<r&&n.windows[r].clearText();return k};Ja.prototype.deleteWindows=function(k,n){var q=this.current708Packet.data[++k],r=this.getPts(k);this.flushDisplayed(r,n);for(r=0;8>r;r++)q&1<<r&&n.windows[r].reset();return k};Ja.prototype.setPenAttributes=function(k,n){var q=this.current708Packet.data,r=n.currentWindow.penAttr; 935n=q[++k];r.textTag=(n&240)>>4;r.offset=(n&12)>>2;r.penSize=n&3;n=q[++k];r.italics=(n&128)>>7;r.underline=(n&64)>>6;r.edgeType=(n&56)>>3;r.fontStyle=n&7;return k};Ja.prototype.setPenColor=function(k,n){var q=this.current708Packet.data,r=n.currentWindow.penColor;n=q[++k];r.fgOpacity=(n&192)>>6;r.fgRed=(n&48)>>4;r.fgGreen=(n&12)>>2;r.fgBlue=n&3;n=q[++k];r.bgOpacity=(n&192)>>6;r.bgRed=(n&48)>>4;r.bgGreen=(n&12)>>2;r.bgBlue=n&3;n=q[++k];r.edgeRed=(n&48)>>4;r.edgeGreen=(n&12)>>2;r.edgeBlue=n&3;return k}; 936Ja.prototype.setPenLocation=function(k,n){var q=this.current708Packet.data,r=n.currentWindow.penLoc;n.currentWindow.pendingNewLine=!0;n=q[++k];r.row=n&15;n=q[++k];r.column=n&63;return k};Ja.prototype.reset=function(k,n){var q=this.getPts(k);this.flushDisplayed(q,n);return this.initService(n.serviceNum,k)};var Yp={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, 937318: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, 938829:9488,830:9492,831:9496},rg=function(k){if(null===k)return"";k=Yp[k]||k;return String.fromCharCode(k)},Zp=[4352,4384,4608,4640,5376,5408,5632,5664,5888,5920,4096,4864,4896,5120,5152],vd=function(){for(var k=[],n=15;n--;)k.push({text:"",indent:0,offset:0});return k},Ra=function(k,n){Ra.prototype.init.call(this);this.field_=k||0;this.dataChannel_=n||0;this.name_="CC"+((this.field_<<1|this.dataChannel_)+1);this.setConstants();this.reset();this.push=function(q){var r=q.ccData&32639;if(r===this.lastControlCode_)this.lastControlCode_= 939null;else{4096===(r&61440)?this.lastControlCode_=r:r!==this.PADDING_&&(this.lastControlCode_=null);var v=r>>>8;var y=r&255;r!==this.PADDING_&&(r===this.RESUME_CAPTION_LOADING_?this.mode_="popOn":r===this.END_OF_CAPTION_?(this.mode_="popOn",this.clearFormatting(q.pts),this.flushDisplayed(q.pts),y=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=y,this.startPts_=q.pts):r===this.ROLL_UP_2_ROWS_?(this.rollUpRows_=2,this.setRollUp(q.pts)):r===this.ROLL_UP_3_ROWS_?(this.rollUpRows_= 9403,this.setRollUp(q.pts)):r===this.ROLL_UP_4_ROWS_?(this.rollUpRows_=4,this.setRollUp(q.pts)):r===this.CARRIAGE_RETURN_?(this.clearFormatting(q.pts),this.flushDisplayed(q.pts),this.shiftRowsUp_(),this.startPts_=q.pts):r===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):r===this.ERASE_DISPLAYED_MEMORY_?(this.flushDisplayed(q.pts),this.displayed_=vd()):r=== 941this.ERASE_NON_DISPLAYED_MEMORY_?this.nonDisplayed_=vd():r===this.RESUME_DIRECT_CAPTIONING_?("paintOn"!==this.mode_&&(this.flushDisplayed(q.pts),this.displayed_=vd()),this.mode_="paintOn",this.startPts_=q.pts):this.isSpecialCharacter(v,y)?(r=rg((v&3)<<8|y),this[this.mode_](q.pts,r),this.column_++):this.isExtCharacter(v,y)?("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), 942r=rg((v&3)<<8|y),this[this.mode_](q.pts,r),this.column_++):this.isMidRowCode(v,y)?(this.clearFormatting(q.pts),this[this.mode_](q.pts," "),this.column_++,14===(y&14)&&this.addFormatting(q.pts,["i"]),1===(y&1)&&this.addFormatting(q.pts,["u"])):this.isOffsetControlCode(v,y)?(q=y&3,this.nonDisplayed_[this.row_].offset=q,this.column_+=q):this.isPAC(v,y)?(v=Zp.indexOf(r&7968),"rollUp"===this.mode_&&(0>v-this.rollUpRows_+1&&(v=this.rollUpRows_-1),this.setRollUp(q.pts,v)),v!==this.row_&&0<=v&&14>=v&&(this.clearFormatting(q.pts), 943this.row_=v),y&1&&-1===this.formatting_.indexOf("u")&&this.addFormatting(q.pts,["u"]),16===(r&16)&&(r=(r&14)>>1,this.column_=4*r,this.nonDisplayed_[this.row_].indent+=r),this.isColorPAC(y)&&14===(y&14)&&this.addFormatting(q.pts,["i"])):this.isNormalChar(v)&&(0===y&&(y=null),r=rg(v),r+=rg(y),this[this.mode_](q.pts,r),this.column_+=r.length))}}};Ra.prototype=new d;Ra.prototype.flushDisplayed=function(k){var n=this,q=function(v){n.trigger("log",{level:"warn",message:"Skipping a malformed 608 caption at index "+ 944v+"."})},r=[];this.displayed_.forEach(function(v,y){if(v&&v.text&&v.text.length){try{v.text=v.text.trim()}catch(E){q(y)}v.text.length&&r.push({text:v.text,line:y+1,position:10+Math.min(70,10*v.indent)+2.5*v.offset})}else void 0!==v&&null!==v||q(y)});r.length&&this.trigger("data",{startPts:this.startPts_,endPts:k,content:r,stream
944:this.name_})};Ra.prototype.reset=function(){this.mode_="popOn";this.startPts_=this.topRow_=0;this.displayed_=vd();this.nonDisplayed_=vd();this.lastControlCode_=null;this.column_= 9450;this.row_=14;this.rollUpRows_=2;this.formatting_=[]};Ra.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_=this.CONTROL_|32;this.END_OF_CAPTION_=this.CONTROL_|47;this.ROLL_UP_2_ROWS_=this.CONTROL_|37;this.ROLL_UP_3_ROWS_=this.CONTROL_|38;this.ROLL_UP_4_ROWS_=this.CONTROL_| 94639;this.CARRIAGE_RETURN_=this.CONTROL_|45;this.RESUME_DIRECT_CAPTIONING_=this.CONTROL_|41;this.BACKSPACE_=this.CONTROL_|33;this.ERASE_DISPLAYED_MEMORY_=this.CONTROL_|44;this.ERASE_NON_DISPLAYED_MEMORY_=this.CONTROL_|46};Ra.prototype.isSpecialCharacter=function(k,n){return k===this.EXT_&&48<=n&&63>=n};Ra.prototype.isExtCharacter=function(k,n){return(k===this.EXT_+1||k===this.EXT_+2)&&32<=n&&63>=n};Ra.prototype.isMidRowCode=function(k,n){return k===this.EXT_&&32<=n&&47>=n};Ra.prototype.isOffsetControlCode= 947function(k,n){return k===this.OFFSET_&&33<=n&&35>=n};Ra.prototype.isPAC=function(k,n){return k>=this.BASE_&&k<this.BASE_+8&&64<=n&&127>=n};Ra.prototype.isColorPAC=function(k){return 64<=k&&79>=k||96<=k&&127>=k};Ra.prototype.isNormalChar=function(k){return 32<=k&&127>=k};Ra.prototype.setRollUp=function(k,n){"rollUp"!==this.mode_&&(this.row_=14,this.mode_="rollUp",this.flushDisplayed(k),this.nonDisplayed_=vd(),this.displayed_=vd());if(void 0!==n&&n!==this.row_)for(k=0;k<this.rollUpRows_;k++)this.displayed_[n- 948k]=this.displayed_[this.row_-k],this.displayed_[this.row_-k]={text:"",indent:0,offset:0};void 0===n&&(n=this.row_);this.topRow_=n-this.rollUpRows_+1};Ra.prototype.addFormatting=function(k,n){this.formatting_=this.formatting_.concat(n);n=n.reduce(function(q,r){return q+"\x3c"+r+"\x3e"},"");this[this.mode_](k,n)};Ra.prototype.clearFormatting=function(k){if(this.formatting_.length){var n=this.formatting_.reverse().reduce(function(q,r){return q+"\x3c/"+r+"\x3e"},"");this.formatting_=[];this[this.mode_](k, 949n)}};Ra.prototype.popOn=function(k,n){this.nonDisplayed_[this.row_].text+=n};Ra.prototype.rollUp=function(k,n){this.displayed_[this.row_].text+=n};Ra.prototype.shiftRowsUp_=function(){var k;for(k=0;k<this.topRow_;k++)this.displayed_[k]={text:"",indent:0,offset:0};for(k=this.row_+1;15>k;k++)this.displayed_[k]={text:"",indent:0,offset:0};for(k=this.topRow_;k<this.row_;k++)this.displayed_[k]=this.displayed_[k+1];this.displayed_[this.row_]={text:"",indent:0,offset:0}};Ra.prototype.paintOn=function(k, 950n){this.displayed_[this.row_].text+=n};var Pl=Ob,$p=Ra,aq=Ja,sb={H264_STREAM_TYPE:27,ADTS_STREAM_TYPE:15,METADATA_STREAM_TYPE:21},Zc=function(k,n){var q=1;for(k>n&&(q=-1);4294967296<Math.abs(n-k);)k+=8589934592*q;return k},hi=function(k){var n,q;hi.prototype.init.call(this);this.type_=k||"shared";this.push=function(r){if("metadata"===r.type)this.trigger("data",r);else if("shared"===this.type_||r.type===this.type_)void 0===q&&(q=r.dts),r.dts=Zc(r.dts,q),r.pts=Zc(r.pts,q),n=r.dts,this.trigger("data", 951r)};this.flush=function(){q=n;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.discontinuity=function(){n=q=void 0};this.reset=function(){this.discontinuity();this.trigger("reset")}};hi.prototype=new d;var bq=hi,sg=function(k,n,q){if(!k)return-1;for(;q<k.length;q++)if(k[q]===n)return q;return-1},wc=function(k,n,q){for(var r="";n<q;n++)r+="%"+("00"+k[n].toString(16)).slice(-2);return r},Ze=function(k){return k[0]<<21|k[1]<<14|k[2]<<7|k[3]},$e={APIC:function(k){var n= 9521;if(3===k.data[0]){var q=sg(k.data,0,n);0>q||(k.mimeType=unescape(wc(k.data,n,q)),n=q+1,k.pictureType=k.data[n],n++,q=sg(k.data,0,n),0>q||(k.description=decodeURIComponent(wc(k.data,n,q)),n=q+1,"--\x3e"===k.mimeType?k.url=unescape(wc(k.data,n,k.data.length)):k.pictureData=k.data.subarray(n,k.data.length)))}},"T*":function(k){3===k.data[0]&&(k.value=decodeURIComponent(wc(k.data,1,k.data.length)).replace(/\0*$/,""),k.values=k.value.split("\x00"))},TXXX:function(k){if(3===k.data[0]){var n=sg(k.data, 9530,1);-1!==n&&(k.description=decodeURIComponent(wc(k.data,1,n)),k.value=decodeURIComponent(wc(k.data,n+1,k.data.length)).replace(/\0*$/,""),k.data=k.value)}},"W*":function(k){k.url=unescape(wc(k.data,0,k.data.length)).replace(/\0.*$/,"")},WXXX:function(k){if(3===k.data[0]){var n=sg(k.data,0,1);-1!==n&&(k.description=decodeURIComponent(wc(k.data,1,n)),k.url=unescape(wc(k.data,n+1,k.data.length)).replace(/\0.*$/,""))}},PRIV:function(k){var n;for(n=0;n<k.data.length;n++)if(0===k.data[n]){k.owner=unescape(wc(k.data, 9540,n));break}k.privateData=k.data.subarray(n+1);k.data=k.privateData}},Kc={parseId3Frames:function(k){var n=10,q=[];if(!(10>k.length||73!==k[0]||68!==k[1]||51!==k[2])){var r=Ze(k.subarray(6,10));r+=10;k[5]&64&&(n=n+4+Ze(k.subarray(10,14)),r-=Ze(k.subarray(16,20)));do{var v=Ze(k.subarray(n+4,n+8));if(1>v)break;var y=String.fromCharCode(k[n],k[n+1],k[n+2],k[n+3]);y={id:y,data:k.subarray(n+10,n+v+10)};y.key=y.id;if($e[y.id])$e[y.id](y);else if("T"===y.id[0])$e["T*"](y);else if("W"===y.id[0])$e["W*"](y); 955q.push(y);n+=10;n+=v}while(n<r);return q}},parseSyncSafeInteger:Ze,frameParsers:$e};var ii=function(k){k=k&&k.descriptor;var n=0,q=[],r=0,v;ii.prototype.init.call(this);this.dispatchType=sb.METADATA_STREAM_TYPE.toString(16);if(k)for(v=0;v<k.length;v++)this.dispatchType+=("00"+k[v].toString(16)).slice(-2);this.push=function(y){var E;if("timed-metadata"===y.type)if(y.dataAlignmentIndicator&&(r=0,q.length=0),0===q.length&&(10>y.data.length||73!==y.data[0]||68!==y.data[1]||51!==y.data[2]))this.trigger("log", 956{level:"warn",message:"Skipping unrecognized metadata packet"});else if(q.push(y),r+=y.data.byteLength,1===q.length&&(n=Kc.parseSyncSafeInteger(y.data.subarray(6,10)),n+=10),!(r<n)){y={data:new Uint8Array(n),frames:[],pts:q[0].pts,dts:q[0].dts};for(E=0;E<n;)y.data.set(q[0].data.subarray(0,n-E),E),E+=q[0].data.byteLength,r-=q[0].data.byteLength,q.shift();E=10;y.data[5]&64&&(E=E+4+Kc.parseSyncSafeInteger(y.data.subarray(10,14)),n-=Kc.parseSyncSafeInteger(y.data.subarray(16,20)));do{var G=Kc.parseSyncSafeInteger(y.data.subarray(E+ 9574,E+8));if(1>G){this.trigger("log",{level:"warn",message:"Malformed ID3 frame encountered. Skipping remaining metadata parsing."});break}var J=String.fromCharCode(y.data[E],y.data[E+1],y.data[E+2],y.data[E+3]);J={id:J,data:y.data.subarray(E+10,E+G+10)};J.key=J.id;if(Kc.frameParsers[J.id])Kc.frameParsers[J.id](J);else if("T"===J.id[0])Kc.frameParsers["T*"](J);else if("W"===J.id[0])Kc.frameParsers["W*"](J);if("com.apple.streaming.transportStreamTimestamp"===J.owner){var P=J.data,U=(P[3]&1)<<30|P[4]<< 95822|P[5]<<14|P[6]<<6|P[7]>>>2;U*=4;U+=P[7]&3;J.timeStamp=U;void 0===y.pts&&void 0===y.dts&&(y.pts=J.timeStamp,y.dts=J.timeStamp);this.trigger("timestamp",J)}y.frames.push(J);E+=10;E+=G}
958while(E<n);this.trigger("data",y)}}};ii.prototype=new d;var ji=function(){var k=new Uint8Array(188),n=0;ji.prototype.init.call(this);this.push=function(q){var r=0,v=188;if(n){var y=new Uint8Array(q.byteLength+n);y.set(k.subarray(0,n));y.set(q,n);n=0}else y=q;for(;v<y.byteLength;)71===y[r]&&71===y[v]?(this.trigger("data", 959y.subarray(r,v)),r+=188,v+=188):(r++,v++);r<y.byteLength&&(k.set(y.subarray(r),0),n=y.byteLength-r)};this.flush=function(){188===n&&71===k[0]&&(this.trigger("data",k),n=0);this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")};this.reset=function(){n=0;this.trigger("reset")}};ji.prototype=new d;var tg=function(){tg.prototype.init.call(this);var k=this;this.packetsWaitingForPmt=[];this.programMapTable=void 0;var n=function(v,y){var E=0;y.payloadUnitStartIndicator&& 960(E+=v[E]+1);"pat"===y.type?q(v.subarray(E),y):r(v.subarray(E),y)};var q=function(v,y){y.section_number=v[7];y.last_section_number=v[8];k.pmtPid=(v[10]&31)<<8|v[11];y.pmtPid=k.pmtPid};var r=function(v,y){var E;if(v[5]&1){k.programMapTable={video:null,audio:null,"timed-metadata":{}};var G=3+((v[1]&15)<<8|v[2])-4;for(E=12+((v[10]&15)<<8|v[11]);E<G;){var J=v[E],P=(v[E+1]&31)<<8|v[E+2];J===sb.H264_STREAM_TYPE&&null===k.programMapTable.video?k.programMapTable.video=P:J===sb.ADTS_STREAM_TYPE&&null===k.programMapTable.audio? 961k.programMapTable.audio=P:J===sb.METADATA_STREAM_TYPE&&(k.programMapTable["timed-metadata"][P]=J);E+=((v[E+3]&15)<<8|v[E+4])+5}y.programMapTable=k.programMapTable}};this.push=function(v){var y={},E=4;y.payloadUnitStartIndicator=!!(v[1]&64);y.pid=v[1]&31;y.pid<<=8;y.pid|=v[2];1<(v[3]&48)>>>4&&(E+=v[E]+1);if(0===y.pid)y.type="pat",n(v.subarray(E),y),this.trigger("data",y);else if(y.pid===this.pmtPid)for(y.type="pmt",n(v.subarray(E),y),this.trigger("data",y);this.packetsWaitingForPmt.length;)this.processPes_.apply(this, 962this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([v,E,y]):this.processPes_(v,E,y)};this.processPes_=function(v,y,E){E.streamType=E.pid===this.programMapTable.video?sb.H264_STREAM_TYPE:E.pid===this.programMapTable.audio?sb.ADTS_STREAM_TYPE:this.programMapTable["timed-metadata"][E.pid];E.type="pes";E.data=v.subarray(y);this.trigger("data",E)}};tg.prototype=new d;tg.STREAM_TYPES={h264:27,adts:15};var ki=function(){var k=this,n=!1,q={data:[],size:0}, 963r={data:[],size:0},v={data:[],size:0},y,E=function(G,J,P){var U=new Uint8Array(G.size),S={type:J},ia,oa=0;if(G.data.length&&!(9>G.size)){S.trackId=G.data[0].pid;for(ia=0;ia<G.data.length;ia++){var ua=G.data[ia];U.set(ua.data,oa);oa+=ua.data.byteLength}ia=U[0]<<16|U[1]<<8|U[2];S.data=new Uint8Array;1===ia&&(S.packetLength=6+(U[4]<<8|U[5]),S.dataAlignmentIndicator=0!==(U[6]&4),ia=U[7],ia&192&&(S.pts=(U[9]&14)<<27|(U[10]&255)<<20|(U[11]&254)<<12|(U[12]&255)<<5|(U[13]&254)>>>3,S.pts*=4,S.pts+=(U[13]& 9646)>>>1,S.dts=S.pts,ia&64&&(S.dts=(U[14]&14)<<27|(U[15]&255)<<20|(U[16]&254)<<12|(U[17]&255)<<5|(U[18]&254)>>>3,S.dts*=4,S.dts+=(U[18]&6)>>>1)),S.data=U.subarray(9+U[8]));J="video"===J||S.packetLength<=G.size;if(P||J)G.size=0,G.data.length=0;J&&k.trigger("data",S)}};ki.prototype.init.call(this);this.push=function(G){({pat:function(){},pes:function(){switch(G.streamType){case sb.H264_STREAM_TYPE:var J=q;var P="video";break;case sb.ADTS_STREAM_TYPE:J=r;P="audio";break;case sb.METADATA_STREAM_TYPE:J= 965v;P="timed-metadata";break;default:return}G.payloadUnitStartIndicator&&E(J,P,!0);J.data.push(G);J.size+=G.data.byteLength},pmt:function(){var J={type:"metadata",tracks:[]};y=G.programMapTable;null!==y.video&&J.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"});null!==y.audio&&J.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"});n=!0;k.trigger("data",J)}})[G.type]()};this.reset=function(){q.size=0;q.data.length= 9660;r.size=0;r.data.length=0;this.trigger("reset")};this.flushStreams_=function(){E(q,"video");E(r,"audio");E(v,"timed-metadata")};this.flush=function(){if(!n&&y){var G={type:"metadata",tracks:[]};null!==y.video&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.video,codec:"avc",type:"video"});null!==y.audio&&G.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+y.audio,codec:"adts",type:"audio"});k.trigger("data",G)}n=!1;this.flushStreams_();this.trigger("done")}};ki.prototype= 967new d;var xc={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:ji,TransportParseStream
967:tg,ElementaryStream:ki,TimestampRolloverStream:bq,CaptionStream:Pl,Cea608Stream:$p,Cea708Stream:aq,MetadataStream:ii},ug;for(ug in sb)sb.hasOwnProperty(ug)&&(xc[ug]=sb[ug]);var cq=ya.ONE_SECOND_IN_TS,Ql=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350];var vg=function(k){var n,q=0;vg.prototype.init.call(this);this.skipWarn_=function(r,v){this.trigger("log",{level:"warn",message:"adts skiping bytes "+ 968r+" to "+v+" in frame "+q+" outside syncword"})};this.push=function(r){var v=0;k||(q=0);if("audio"===r.type){if(n&&n.length){var y=n;n=new Uint8Array(y.byteLength+r.data.byteLength);n.set(y);n.set(r.data,y.byteLength)}else n=r.data;for(var E;v+7<n.length;)if(255!==n[v]||240!==(n[v+1]&246))"number"!==typeof E&&(E=v),v++;else{"number"===typeof E&&(this.skipWarn_(E,v),E=null);var G=2*(~n[v+1]&1);y=(n[v+3]&3)<<11|n[v+4]<<3|(n[v+5]&224)>>5;var J=1024*((n[v+6]&3)+1);var P=J*cq/Ql[(n[v+2]&60)>>>2];if(n.byteLength- 969v<y)break;this.trigger("data",{pts:r.pts+q*P,dts:r.dts+q*P,sampleCount:J,audioobjecttype:(n[v+2]>>>6&3)+1,channelcount:(n[v+2]&1)<<2|(n[v+3]&192)>>>6,samplerate:Ql[(n[v+2]&60)>>>2],samplingfrequencyindex:(n[v+2]&60)>>>2,samplesize:16,data:n.subarray(v+7+G,v+y)});q++;v+=y}"number"===typeof E&&this.skipWarn_(E,v);n=n.subarray(v)}};this.flush=function(){q=0;this.trigger("done")};this.reset=function(){n=void 0;this.trigger("reset")};this.endTimeline=function(){n=void 0;this.trigger("endedtimeline")}}; 970vg.prototype=new d;var dq=function(k){var n=k.byteLength,q=0,r=0;this.length=function(){return 8*n};this.bitsAvailable=function(){return 8*n+r};this.loadWord=function(){var v=k.byteLength-n,y=new Uint8Array(4),E=Math.min(4,n);if(0===E)throw Error("no bytes available");y.set(k.subarray(v,v+E));q=(new DataView(y.buffer)).getUint32(0);r=8*E;n-=E};this.skipBits=function(v){if(!(r>v)){v-=r;var y=Math.floor(v/8);v-=8*y;n-=y;this.loadWord()}q<<=v;r-=v};this.readBits=function(v){var y=Math.min(r,v),E=q>>> 97132-y;r-=y;0<r?q<<=y:0<n&&this.loadWord();y=v-y;return 0<y?E<<y|this.readBits(y):E};this.skipLeadingZeros=function(){var v;for(v=0;v<r;++v)if(0!==(q&2147483648>>>v))return q<<=v,r-=v,v;this.loadWord();return v+this.skipLeadingZeros()};this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())};this.readUnsignedExpGolomb=function(){var v=this.skipLeadingZeros();return this.readBits(v+1)-1};this.readExpGolomb= 972function(){var v=this.readUnsignedExpGolomb();return 1&v?1+v>>>1:-1*(v>>>1)};this.readBoolean=function(){return 1===this.readBits(1)};this.readUnsignedByte=function(){return this.readBits(8)};this.loadWord()};var li=function(){var k=0,n,q;li.prototype.init.call(this);this.push=function(r){if(q){var v=new Uint8Array(q.byteLength+r.data.byteLength);v.set(q);v.set(r.data,q.byteLength);q=v}else q=r.data;for(r=q.byteLength;k<r-3;k++)if(1===q[k+2]){n=k+5;break}for(;n<r;)switch(q[n]){case 0:if(0!==q[n-1]){n+= 9732;break}else if(0!==q[n-2]){n++;break}k+3!==n-2&&this.trigger("data",q.subarray(k+3,n-2));do n++;while(1!==q[n]&&n<r);k=n-2;n+=3;break;case 1:if(0!==q[n-1]||0!==q[n-2]){n+=3;break}this.trigger("data",q.subarray(k+3,n-2));k=n-2;n+=3;break;default:n+=3}q=q.subarray(k);n-=k;k=0};this.reset=function(){q=null;k=0;this.trigger("reset")};this.flush=function(){q&&3<q.byteLength&&this.trigger("data",q.subarray(k+3));q=null;k=0;this.trigger("done")};this.endTimeline=function(){this.flush();this.trigger("endedtimeline")}}; 974li.prototype=new d;var eq={100:!0,110:!0,122:!0,244:!0,44:!0,83:!0,86:!0,118:!0,128:!0,138:!0,139:!0,134:!0};var mi=function(){var k=new li,n,q,r;mi.prototype.init.call(this);var v=this;this.push=function(J){"video"===J.type&&(n=J.trackId,q=J.pts,r=J.dts,k.push(J))};k.on("data",function(J){var P={trackId:n,pts:q,dts:r,data:J,nalUnitTypeCode:J[0]&31};switch(P.nalUnitTypeCode){case 5:P.nalUnitType="slice_layer_without_partitioning_rbsp_idr";break;case 6:P.nalUnitType="sei_rbsp";P.escapedRBSP=E(J.subarray(1)); 975break;case 7:P.nalUnitType="seq_parameter_set_rbsp";P.escapedRBSP=E(J.subarray(1));P.config=G(P.escapedRBSP);break;case 8:P.nalUnitType="pic_parameter_set_rbsp";break;case 9:P.nalUnitType="access_unit_delimiter_rbsp"}v.trigger("data",P)});k.on("done",function(){v.trigger("done")});k.on("partialdone",function(){v.trigger("partialdone")});k.on("reset",function(){v.trigger("reset")});k.on("endedtimeline",function(){v.trigger("endedtimeline")});this.flush=function(){k.flush()};this.partialFlush=function(){k.partialFlush()}; 976this.reset=function(){k.reset()};this.endTimeline=function(){k.endTimeline()};var y=function(J,P){var U=8,S=8,ia;for(ia=0;ia<J;ia++)0!==S&&(S=P.readExpGolomb(),S=(U+S+256)%256),U=0===S?U:S};var E=function(J){for(var P=J.byteLength,U=[],S=1,ia;S<P-2;)0===J[S]&&0===J[S+1]&&3===J[S+2]?(U.push(S+2),S+=2):S++;if(0===U.length)return J;P-=U.length;ia=new Uint8Array(P);var oa=0;for(S=0;S<P;oa++,S++)oa===U[0]&&(oa++,U.shift()),ia[S]=J[oa];return ia};var G=function(J){var P=0,U=0,S=0,ia=0,oa=[1,1];
976J=new dq(J); 977var ua=J.readUnsignedByte();var La=J.readUnsignedByte();var wg=J.readUnsignedByte();J.skipUnsignedExpGolomb();if(eq[ua]){var xb=J.readUnsignedExpGolomb();3===xb&&J.skipBits(1);J.skipUnsignedExpGolomb();J.skipUnsignedExpGolomb();J.skipBits(1);if(J.readBoolean()){var Lc=3!==xb?8:12;for(xb=0;xb<Lc;xb++)J.readBoolean()&&(6>xb?y(16,J):y(64,J))}}J.skipUnsignedExpGolomb();xb=J.readUnsignedExpGolomb();if(0===xb)J.readUnsignedExpGolomb();else if(1===xb)for(J.skipBits(1),J.skipExpGolomb(),J.skipExpGolomb(), 978Lc=J.readUnsignedExpGolomb(),xb=0;xb<Lc;xb++)J.skipExpGolomb();J.skipUnsignedExpGolomb();J.skipBits(1);xb=J.readUnsignedExpGolomb();Lc=J.readUnsignedExpGolomb();var Rl=J.readBits(1);0===Rl&&J.skipBits(1);J.skipBits(1);J.readBoolean()&&(P=J.readUnsignedExpGolomb(),U=J.readUnsignedExpGolomb(),S=J.readUnsignedExpGolomb(),ia=J.readUnsignedExpGolomb());if(J.readBoolean()&&J.readBoolean()){var fq=J.readUnsignedByte();switch(fq){case 1:oa=[1,1];break;case 2:oa=[12,11];break;case 3:oa=[10,11];break;case 4:oa= 979[16,11];break;case 5:oa=[40,33];break;case 6:oa=[24,11];break;case 7:oa=[20,11];break;case 8:oa=[32,11];break;case 9:oa=[80,33];break;case 10:oa=[18,11];break;case 11:oa=[15,11];break;case 12:oa=[64,33];break;case 13:oa=[160,99];break;case 14:oa=[4,3];break;case 15:oa=[3,2];break;case 16:oa=[2,1];break;case 255:oa=[J.readUnsignedByte()<<8|J.readUnsignedByte(),J.readUnsignedByte()<<8|J.readUnsignedByte()]}oa&&oa[0]/oa[1]}return{profileIdc:ua,levelIdc:wg,profileCompatibility:La,width:16*(xb+1)-2*P- 9802*U,height:(2-Rl)*(Lc+1)*16-2*S-2*ia,sarRatio:oa}}};mi.prototype=new d;var gq=[96E3,88200,64E3,48E3,44100,32E3,24E3,22050,16E3,12E3,11025,8E3,7350],Sl=function(k,n){var q=k[n+6]<<21|k[n+7]<<14|k[n+8]<<7|k[n+9];k=k[n+5];q=0<=q?q:0;return(k&16)>>4?q+20:q+10},Tl=function(k,n){if(10>k.length-n||73!==k[n]||68!==k[n+1]||51!==k[n+2])return n;n+=Sl(k,n);return Tl(k,n)},Ul=function(k){return k[0]<<21|k[1]<<14|k[2]<<7|k[3]},Mc={isLikelyAacData:function(k){var n=Tl(k,0);return k.length>=n+2&&255===(k[n]&255)&& 981240===(k[n+1]&240)&&16===(k[n+1]&22)},parseId3TagSize:Sl,parseAdtsSize:function(k,n){return k[n+3]&6144|k[n+4]<<3|(k[n+5]&224)>>5},parseType:function(k,n){return 73===k[n]&&68===k[n+1]&&51===k[n+2]?"timed-metadata":k[n]&1&&240===(k[n+1]&240)?"audio":null},parseSampleRate:function(k){for(var n=0;n+5<k.length;)if(255!==k[n]||240!==(k[n+1]&246))n++;else return gq[(k[n+2]&60)>>>2];return null},parseAacTimestamp:function(k){var n=10;k[5]&64&&(n=n+4+Ul(k.subarray(10,14)));do{var q=Ul(k.subarray(n+4,n+8)); 982if(1>q)break;var r=String.fromCharCode(k[n],k[n+1],k[n+2],k[n+3]);if("PRIV"===r){r=k.subarray(n+10,n+q+10);for(var v=0;v<r.byteLength;v++)if(0===r[v]){var y=unescape,E,G=r,J=v,P="";for(E=0;E<J;E++)P+="%"+("00"+G[E].toString(16)).slice(-2);if("com.apple.streaming.transportStreamTimestamp"===y(P))return k=r.subarray(v+1),n=(k[3]&1)<<30|k[4]<<22|k[5]<<14|k[6]<<6|k[7]>>>2,n*=4,n+=k[7]&3;break}}n+=10;n+=q}while(n<k.byteLength);return null}};var ni=function(){var k=new Uint8Array,n=0;ni.prototype.init.call(this); 983this.setTimestamp=function(q){n=q};this.push=function(q){var r=0;if(k.length){var v=k.length;k=new Uint8Array(q.byteLength+v);k.set(k.subarray(0,v));k.set(q,v)}else k=q;for(;3<=k.length-r;)if(73===k[r]&&68===k[r+1]&&51===k[r+2]){if(10>k.length-r)break;q=Mc.parseId3TagSize(k,r);if(r+q>k.length)break;v={type:"timed-metadata",data:k.subarray(r,r+q)};this.trigger("data",v);r+=q}else if(255===(k[r]&255)&&240===(k[r+1]&240)){if(7>k.length-r)break;q=Mc.parseAdtsSize(k,r);if(r+q>k.length)break;v={type:"audio", 984data:k.subarray(r,r+q),pts:n,dts:n};this.trigger("data",v);r+=q}else r++;k=0<k.length-r?k.subarray(r):new Uint8Array};this.reset=function(){k=new Uint8Array;this.trigger("reset")};this.endTimeline=function(){k=new Uint8Array;this.trigger("endedtimeline")}};ni.prototype=new d;var af={groupNalsIntoFrames:function(k){var n,q=[],r=[];r.byteLength=0;r.nalCount=0;r.duration=0;for(n=q.byteLength=0;n<k.length;n++){var v=k[n];"access_unit_delimiter_rbsp"===v.nalUnitType?(q.length&&(q.duration=v.dts-q.dts, 985r.byteLength+=q.byteLength,r.nalCount+=q.length,r.duration+=q.duration,r.push(q)),q=[v],q.byteLength=v.data.byteLength,q.pts=v.pts,q.dts=v.dts):("slice_layer_without_partitioning_rbsp_idr"===v.nal
985UnitType&&(q.keyFrame=!0),q.duration=v.dts-q.dts,q.byteLength+=v.data.byteLength,q.push(v))}r.length&&(!q.duration||0>=q.duration)&&(q.duration=r[r.length-1].duration);r.byteLength+=q.byteLength;r.nalCount+=q.length;r.duration+=q.duration;r.push(q);return r},groupFramesIntoGops:function(k){var n,q=[],r=[]; 986q.byteLength=0;q.nalCount=0;q.duration=0;q.pts=k[0].pts;q.dts=k[0].dts;r.byteLength=0;r.nalCount=0;r.duration=0;r.pts=k[0].pts;r.dts=k[0].dts;for(n=0;n<k.length;n++){var v=k[n];v.keyFrame?(q.length&&(r.push(q),r.byteLength+=q.byteLength,r.nalCount+=q.nalCount,r.duration+=q.duration),q=[v],q.nalCount=v.length,q.byteLength=v.byteLength,q.pts=v.pts,q.dts=v.dts,q.duration=v.duration):(q.duration+=v.duration,q.nalCount+=v.length,q.byteLength+=v.byteLength,q.push(v))}r.length&&0>=q.duration&&(q.duration= 987r[r.length-1].duration);r.byteLength+=q.byteLength;r.nalCount+=q.nalCount;r.duration+=q.duration;r.push(q);return r},extendFirstKeyFrame:function(k){if(!k[0][0].keyFrame&&1<k.length){var n=k.shift();k.byteLength-=n.byteLength;k.nalCount-=n.nalCount;k[0][0].dts=n.dts;k[0][0].pts=n.pts;k[0][0].duration+=n.duration}return k},generateSampleTable:function(k,n){var q,r=n||0,v=[];for(n=0;n<k.length;n++){var y=k[n];for(q=0;q<y.length;q++){var E=y[q];E=Ll(E,r);r+=E.size;v.push(E)}}return v},concatenateNalData:function(k){var n, 988q,r,v=0,y=new Uint8Array(k.byteLength+4*k.nalCount),E=new DataView(y.buffer);for(n=0;n<k.length;n++){var G=k[n];for(q=0;q<G.length;q++){var J=G[q];for(r=0;r<J.length;r++){var P=J[r];E.setUint32(v,P.data.byteLength);v+=4;y.set(P.data,v);v+=P.data.byteLength}}}return y},generateSampleTableForFrame:function(k,n){var q=[];k=Ll(k,n||0);q.push(k);return q},concatenateNalDataForFrame:function(k){var n,q=0,r=new Uint8Array(k.byteLength+4*k.length),v=new DataView(r.buffer);for(n=0;n<k.length;n++){var y=k[n]; 989v.setUint32(q,y.data.byteLength);q+=4;r.set(y.data,q);q+=y.data.byteLength}return r}},xg={prefixWithSilence:function(k,n,q,r){var v,y=v=0;if(n.length){var E=ya.audioTsToVideoTs(k.baseMediaDecodeTime,k.samplerate);var G=Math.ceil(ya.ONE_SECOND_IN_TS/(k.samplerate/1024));q&&r&&(v=E-Math.max(q,r),v=Math.floor(v/G),y=v*G);if(!(1>v||y>ya.ONE_SECOND_IN_TS/2)){fi||(q={96E3:[Yc,[227,64],Ga(154),[56]],88200:[Yc,[231],Ga(170),[56]],64E3:[Yc,[248,192],Ga(240),[56]],48E3:[Yc,[255,192],Ga(268),[55,148,128],Ga(54), 990[112]],44100:[Yc,[255,192],Ga(268),[55,163,128],Ga(84),[112]],32E3:[Yc,[255,192],Ga(268),[55,234],Ga(226),[112]],24E3:[Yc,[255,192],Ga(268),[55,255,128],Ga(268),[111,112],Ga(126),[224]],16E3:[Yc,[255,192],Ga(268),[55,255,128],Ga(268),[111,255],Ga(269),[223,108],Ga(195),[1,192]],12E3:[ei,Ga(268),[3,127,248],Ga(268),[6,255,240],Ga(268),[13,255,224],Ga(268),[27,253,128],Ga(259),[56]],11025:[ei,Ga(268),[3,127,248],Ga(268),[6,255,240],Ga(268),[13,255,224],Ga(268),[27,255,192],Ga(268),[55,175,128],Ga(108), 991[112]],8E3:[ei,Ga(268),[3,121,16],Ga(47),[7]]},fi=Up(q));q=fi[k.samplerate];q||(q=n[0].data);for(r=0;r<v;r++)E=n[0],n.splice(0,0,{data:q,dts:E.dts-G,pts:E.pts-G});k.baseMediaDecodeTime-=Math.floor(ya.videoTsToAudioTs(y,k.samplerate));return y}}},trimAdtsFramesByEarliestDts:function(k,n,q){if(n.minSegmentDts>=q)return k;n.minSegmentDts=Infinity;return k.filter(function(r){return r.dts>=q?(n.minSegmentDts=Math.min(n.minSegmentDts,r.dts),n.minSegmentPts=n.minSegmentDts,!0):!1})},generateSampleTable:function(k){var n, 992q=[];for(n=0;n<k.length;n++){var r=k[n];q.push({size:r.data.byteLength,duration:1024})}return q},concatenateFrameData:function(k){var n,q=0;var r=Uint8Array;var v=0;for(n=0;n<k.length;n++){var y=k[n];v+=y.data.byteLength}y=new r(v);for(r=0;r<k.length;r++)n=k[r],y.set(n.data,q),q+=n.data.byteLength;return y}},gc={clearDtsInfo:function(k){delete k.minSegmentDts;delete k.maxSegmentDts;delete k.minSegmentPts;delete k.maxSegmentPts},calculateTrackBaseMediaDecodeTime:function(k,n){var q=k.minSegmentDts; 993n||(q-=k.timelineStartInfo.dts);n=k.timelineStartInfo.baseMediaDecodeTime;n=Math.max(0,n+q);"audio"===k.type&&(k=k.samplerate/Vp,n=Math.floor(n*k));return n},collectDtsInfo:function(k,n){"number"===typeof n.pts&&(void 0===k.timelineStartInfo.pts&&(k.timelineStartInfo.pts=n.pts),k.minSegmentPts=void 0===k.minSegmentPts?n.pts:Math.min(k.minSegmentPts,n.pts),k.maxSegmentPts=void 0===k.maxSegmentPts?n.pts:Math.max(k.maxSegmentPts,n.pts));"number"===typeof n.dts&&(void 0===k.timelineStartInfo.dts&&(k.timelineStartInfo.dts= 994n.dts),k.minSegmentDts=void 0===k.minSegmentDts?n.dts:Math.min(k.minSegmentDts,n.dts),k.maxSegmentDts=void 0===k.maxSegmentDts?n.dts:Math.max(k.maxSegmentDts,n.dts))}},hq=Mc.isLikelyAacData,iq=ya.ONE_SECOND_IN_TS,Vl=["audioobjecttype","channelcount","samplerate","samplingfrequencyindex","samplesize"],Wl="width height profileIdc levelIdc profileCompatibility sarRatio".split(" "),jq=function(k,n){n.stream=k;this.trigger("log",n)},Xl=function(k,n){for(var q=Object.keys(n),r=0;r<q.length;r++){var v=q[r]; 995if("headOfPipeline"!==v&&n[v].on)n[v].on("log",jq.bind(k,v))}},Yl=function(k,n){var q;if(k.length!==n.length)return!1;for(q=0;q<k.length;q++)if(k[q]!==n[q])return!1;return!0}
995,Zl=function(k,n,q,r,v,y){return{start:{dts:k,pts:k+(q-n)},end:{dts:k+(r-n),pts:k+(v-q)},prependedContentDuration:y,baseMediaDecodeTime:k}};var yg=function(k,n){var q=[],r=0,v=0,y=Infinity;n=n||{};var E=n.firstSequenceNumber||0;yg.prototype.init.call(this);this.push=function(G){gc.collectDtsInfo(k,G);k&&Vl.forEach(function(J){k[J]= 996G[J]});q.push(G)};this.setEarliestDts=function(G){r=G};this.setVideoBaseMediaDecodeTime=function(G){y=G};this.setAudioAppendStart=function(G){v=G};this.flush=function(){if(0!==q.length){var G=xg.trimAdtsFramesByEarliestDts(q,k,r);k.baseMediaDecodeTime=gc.calculateTrackBaseMediaDecodeTime(k,n.keepOriginalTimestamps);var J=xg.prefixWithSilence(k,G,v,y);k.samples=xg.generateSampleTable(G);var P=Xe.mdat(xg.concatenateFrameData(G));q=[];var U=Xe.moof(E,[k]);var S=new Uint8Array(U.byteLength+P.byteLength); 997E++;S.set(U);S.set(P,U.byteLength);gc.clearDtsInfo(k);U=Math.ceil(1024*iq/k.samplerate);G.length&&(U*=G.length,this.trigger("segmentTimingInfo",Zl(ya.audioTsToVideoTs(k.baseMediaDecodeTime,k.samplerate),G[0].dts,G[0].pts,G[0].dts+U,G[0].pts+U,J||0)),this.trigger("timingInfo",{start:G[0].pts,end:G[0].pts+U}));this.trigger("data",{track:k,boxes:S})}this.trigger("done","AudioSegmentStream")};this.reset=function(){gc.clearDtsInfo(k);q=[];this.trigger("reset")}};yg.prototype=new d;var oi=function(k,n){var q= 998[],r=[],v,y;n=n||{};var E=n.firstSequenceNumber||0;oi.prototype.init.call(this);delete k.minPTS;this.gopCache_=[];this.push=function(G){gc.collectDtsInfo(k,G);"seq_parameter_set_rbsp"!==G.nalUnitType||v||(v=G.config,k.sps=[G.data],Wl.forEach(function(J){k[J]=v[J]},this));"pic_parameter_set_rbsp"!==G.nalUnitType||y||(y=G.data,k.pps=[G.data]);q.push(G)};this.flush=function(){var G;var J=0;for(var P,U;q.length&&"access_unit_delimiter_rbsp"!==q[0].nalUnitType;)q.shift();if(0!==q.length){var S=af.groupNalsIntoFrames(q); 999S=af.groupFramesIntoGops(S);S[0][0].keyFrame||((G=this.getGopForFusion_(q[0],k))?(J=G.duration,S.unshift(G),S.byteLength+=G.byteLength,S.nalCount+=G.nalCount,S.pts=G.pts,S.dts=G.dts,S.duration+=G.duration):S=af.extendFirstKeyFrame(S));if(r.length){G=n.alignGopsAtEnd?this.alignGopsAtEnd_(S):this.alignGopsAtStart_(S);if(!G){this.gopCache_.unshift({gop:S.pop(),pps:k.pps,sps:k.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);q=[];this.resetStream_();this.trigger("done","VideoSegmentStream"); 1000return}gc.clearDtsInfo(k);S=G}gc.collectDtsInfo(k,S);k.samples=af.generateSampleTable(S);G=Xe.mdat(af.concatenateNalData(S));k.baseMediaDecodeTime=gc.calculateTrackBaseMediaDecodeTime(k,n.keepOriginalTimestamps);this.trigger("processedGopsInfo",S.map(function(ia){return{pts:ia.pts,dts:ia.dts,byteLength:ia.byteLength}}));P=S[0];U=S[S.length-1];this.trigger("segmentTimingInfo",Zl(k.baseMediaDecodeTime,P.dts,P.pts,U.dts+U.duration,U.pts+U.duration,J));this.trigger("timingInfo",{start:S[0].pts,end:S[S.length- 10011].pts+S[S.length-1].duration});this.gopCache_.unshift({gop:S.pop(),pps:k.pps,sps:k.sps});this.gopCache_.length=Math.min(6,this.gopCache_.length);q=[];this.trigger("baseMediaDecodeTime",k.baseMediaDecodeTime);this.trigger("timelineStartInfo",k.timelineStartInfo);J=Xe.moof(E,[k]);S=new Uint8Array(J.byteLength+G.byteLength);E++;S.set(J);S.set(G,J.byteLength);this.trigger("data",{track:k,boxes:S})}this.resetStream_();this.trigger("done","VideoSegmentStream")};this.reset=function(){this.resetStream_(); 1002q=[];this.gopCache_.length=0;r.length=0;this.trigger("reset")};this.resetStream_=function(){gc.clearDtsInfo(k);y=v=void 0};this.getGopForFusion_=function(G){var J=Infinity,P;for(P=0;P<this.gopCache_.length;P++){var U=this.gopCache_[P];var S=U.gop;if(k.pps&&Yl(k.pps[0],U.pps[0])&&k.sps&&Yl(k.sps[0],U.sps[0])&&!(S.dts<k.timelineStartInfo.dts)&&(S=G.dts-S.dts-S.duration,-1E4<=S&&45E3>=S&&(!ia||J>S))){var ia=U;J=S}}return ia?ia.gop:null};this.alignGopsAtStart_=function(G){var J,P;var U=G.byteLength;var S= 1003G.nalCount;var ia=G.duration;for(J=P=0;J<r.length&&P<G.length;){var oa=r[J];var ua=G[P];if(oa.pts===ua.pts)break;ua.pts>oa.pts?J++:(P++,U-=ua.byteLength,S-=ua.nalCount,ia-=ua.duration)}if(0===P)return G;if(P===G.length)return null;G=G.slice(P);G.byteLength=U;G.duration=ia;G.nalCount=S;G.pts=G[0].pts;G.dts=G[0].dts;return G};this.alignGopsAtEnd_=function(G){var J;var P=r.length-1;var U=G.length-1;var S=null;for(J=!1;0<=P&&0<=U;){var ia=r[P];var oa=G[U];if(ia.pts===oa.pts){J=!0;break}ia.pts>oa.pts? 1004P--:(P===r.length-1&&(S=U),U--)}if(!J&&null===S)return null;P=J?U:S;if(0===P)return G;G=G.slice(P);P=G.reduce(function(ua,La){ua.byteLength+=La.byteLength;ua.duration+=La.duration;ua.nalCount+=La.nalCount;return ua},{byteLength:0,duration:0,nalCount:0});G.byteLength=P.byteLength;G.duration=P.duration;G.nalCount=P.nalCount;G.pts=G[0].pts;G.dts=G[0].dts;return G};this.alignGopsWith=function(G){r=G}};oi.prototype=new d;var he=function(k,n){this.numberOfTracks=0;this.metadataStream=n;k=k||{};this.remuxTracks= 1005"undefined"!==typeof k.remux?!!k.remux:!0;this.keepOriginalTimestamps="boolean"===typeof k.keepOriginalTimestamps?k.keepOriginalTimestamps:!1;this.pendingTracks=[];this.videoTrack=null;this.pendingBoxes=[];this.pendingCaptions=[];this.pendingMetadata=[];this.emittedTracks=this.pendingBytes=0;he.prototype.init.call(this);this.push=function(q){if(q.content||q.text)return this.pendingCaptions.push(q);if(q.frames)return this.pendingMetadata.push(q);this.pendingTracks.push(q.track);this.pendingBytes+= 1006q.boxes.byteLength;"video"===q.track.type&&(this.videoTrack=q.track,this.pendingBoxes.push(q.boxes));"audio"===q.track.type&&(this.audioTrack=q.track,this.pendingBoxes.unshift(q.boxes))}};he.prototype=new d;he.prototype.flush=function(k){var n=0,q={captions:[],captionStream
1006s:{},metadata:[],info:{}},r=0;if(this.pendingTracks.length<this.numberOfTracks){if("VideoSegmentStream"!==k&&"AudioSegmentStream"!==k||this.remuxTracks)return;if(0===this.pendingTracks.length){this.emittedTracks++;this.emittedTracks>= 1007this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0);return}}this.videoTrack?(r=this.videoTrack.timelineStartInfo.pts,Wl.forEach(function(v){q.info[v]=this.videoTrack[v]},this)):this.audioTrack&&(r=this.audioTrack.timelineStartInfo.pts,Vl.forEach(function(v){q.info[v]=this.audioTrack[v]},this));if(this.videoTrack||this.audioTrack){q.type=1===this.pendingTracks.length?this.pendingTracks[0].type:"combined";this.emittedTracks+=this.pendingTracks.length;k=Xe.initSegment(this.pendingTracks); 1008q.initSegment=new Uint8Array(k.byteLength);q.initSegment.set(k);q.data=new Uint8Array(this.pendingBytes);for(k=0;k<this.pendingBoxes.length;k++)q.data.set(this.pendingBoxes[k],n),n+=this.pendingBoxes[k].byteLength;for(k=0;k<this.pendingCaptions.length;k++)n=this.pendingCaptions[k],n.startTime=ya.metadataTsToSeconds(n.startPts,r,this.keepOriginalTimestamps),n.endTime=ya.metadataTsToSeconds(n.endPts,r,this.keepOriginalTimestamps),q.captionStreams[n.stream]=!0,q.captions.push(n);for(k=0;k<this.pendingMetadata.length;k++)n= 1009this.pendingMetadata[k],n.cueTime=ya.metadataTsToSeconds(n.pts,r,this.keepOriginalTimestamps),q.metadata.push(n);q.metadata.dispatchType=this.metadataStream.dispatchType;this.pendingTracks.length=0;this.videoTrack=null;this.pendingBoxes.length=0;this.pendingBytes=this.pendingCaptions.length=0;this.pendingMetadata.length=0;this.trigger("data",q);for(k=0;k<q.captions.length;k++)n=q.captions[k],this.trigger("caption",n);for(k=0;k<q.metadata.length;k++)n=q.metadata[k],this.trigger("id3Frame",n)}this.emittedTracks>= 1010this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)};he.prototype.setRemux=function(k){this.remuxTracks=k};var pi=function(k){var n=this,q=!0,r,v;pi.prototype.init.call(this);k=k||{};this.baseMediaDecodeTime=k.baseMediaDecodeTime||0;this.transmuxPipeline_={};this.setupAacPipeline=function(){var y={};this.transmuxPipeline_=y;y.type="aac";y.metadataStream=new xc.MetadataStream;y.aacStream=new ni;y.audioTimestampRolloverStream=new xc.TimestampRolloverStream("audio");y.timedMetadataTimestampRolloverStream= 1011new xc.TimestampRolloverStream("timed-metadata");y.adtsStream=new vg;y.coalesceStream=new he(k,y.metadataStream);y.headOfPipeline=y.aacStream;y.aacStream.pipe(y.audioTimestampRolloverStream).pipe(y.adtsStream);y.aacStream.pipe(y.timedMetadataTimestampRolloverStream).pipe(y.metadataStream).pipe(y.coalesceStream);y.metadataStream.on("timestamp",function(E){y.aacStream.setTimestamp(E.timeStamp)});y.aacStream.on("data",function(E){"timed-metadata"!==E.type&&"audio"!==E.type||y.audioSegmentStream||(v= 1012v||{timelineStartInfo:{baseMediaDecodeTime:n.baseMediaDecodeTime},codec:"adts",type:"audio"},y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new yg(v,k),y.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")),y.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream),n.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!r}))});y.coalesceStream.on("data",this.trigger.bind(this,"data"));y.coalesceStream.on("done", 1013this.trigger.bind(this,"done"));Xl(this,y)};this.setupTsPipeline=function(){var y={};this.transmuxPipeline_=y;y.type="ts";y.metadataStream=new xc.MetadataStream;y.packetStream=new xc.TransportPacketStream;y.parseStream=new xc.TransportParseStream;y.elementaryStream=new xc.ElementaryStream;y.timestampRolloverStream=new xc.TimestampRolloverStream;y.adtsStream=new vg;y.h264Stream=new mi;y.captionStream=new xc.CaptionStream(k);y.coalesceStream=new he(k,y.metadataStream);y.headOfPipeline=y.packetStream; 1014y.packetStream.pipe(y.parseStream).pipe(y.elementaryStream).pipe(y.timestampRolloverStream);y.timestampRolloverStream.pipe(y.h264Stream);y.timestampRolloverStream.pipe(y.adtsStream);y.timestampRolloverStream.pipe(y.metadataStream).pipe(y.coalesceStream);y.h264Stream.pipe(y.captionStream).pipe(y.coalesceStream);y.elementaryStream.on("data",function(E){var G;if("metadata"===E.type){for(G=E.tracks.length;G--;)r||"video"!==E.tracks[G].type?v||"audio"!==E.tracks[G].type||(v=E.tracks[G],v.timelineStartInfo.baseMediaDecodeTime= 1015n.baseMediaDecodeTime):(r=E.tracks[G],r.timelineStartInfo.baseMediaDecodeTime=n.baseMediaDecodeTime);r&&!y.videoSegmentStream&&(y.coalesceStream.numberOfTracks++,y.videoSegmentStream=new oi(r,k),y.videoSegmentStream.on("log",n.getLogTrigger_("videoSegmentStream")),y.videoSegmentStream.on("timelineStartInfo",function(J){v&&!k.keepOriginalTimestamps&&(v.timelineStartInfo=J,y.audioSegmentStream.setEarliestDts(J.dts-n.baseMediaDecodeTime))}),y.videoSegmentStream.on("processedGopsInfo",n.trigger.bind(n, 1016"gopInfo")),y.videoSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"videoSegmentTimingInfo")),y.videoSegmentStream.on("baseMediaDecodeTime",function(J){v&&y.audioSegmentStream.setVideoBaseMediaDecodeTime(J)}),y.videoSegmentStream.on("timingInfo",n.trigger.bind(n,"videoTimingInfo")),y.h264Stream.pipe(y.videoSegmentStream).pipe(y.coalesceStream));v&&!y.audioSegmentStream&&(y.coalesceStream.numberOfTracks++,y.audioSegmentStream=new yg(v,k),y.audioSegmentStream.on("log",n.getLogTrigger_("audioSegmentStream")), 1017y.audioSegmentStream.on("timingInfo",n.trigger.bind(n,"audioTimingInfo")),y.audioSegmentStream.on("segmentTimingInfo",n.trigger.bind(n,"audioSegmentTimingInfo")),y.adtsStream.pipe(y.audioSegmentStream).pipe(y.coalesceStream));n.trigger("trackinfo",{hasAudio:!!v,hasVideo:!!r})}});y.coalesceStream.on("data",this.trigger.bind(this,"data"));y.coalesceStream.on("id3Frame",function(E){E.dispatchType=y.metadataStream.dispatchType;n.trigger("id3Frame",E)});y.coalesceStream.on("caption",this.trigger.bind(this, 1018"caption"));y.coalesceStream.on("done",this.trigger.bind(this,"done"));Xl(this,y)};this.setBaseMediaDecodeTime=function(y){var E=this.transmuxPipeline_;k.keepOriginalTimestamps||(this.baseMediaDecodeTime=y);
1018v&&(v.timelineStartInfo.dts=void 0,v.timelineStartInfo.pts=void 0,gc.clearDtsInfo(v),E.audioTimestampRolloverStream&&E.audioTimestampRolloverStream.discontinuity());r&&(E.videoSegmentStream&&(E.videoSegmentStream.gopCache_=[]),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,gc.clearDtsInfo(r), 1019E.captionStream.reset());E.timestampRolloverStream&&E.timestampRolloverStream.discontinuity()};this.setAudioAppendStart=function(y){v&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(y)};this.setRemux=function(y){var E=this.transmuxPipeline_;k.remux=y;E&&E.coalesceStream&&E.coalesceStream.setRemux(y)};this.alignGopsWith=function(y){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(y)};this.getLogTrigger_=function(y){var E=this;return function(G){G.stream= 1020y;E.trigger("log",G)}};this.push=function(y){if(q){var E=hq(y);E&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():E||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline();q=!1}this.transmuxPipeline_.headOfPipeline.push(y)};this.flush=function(){q=!0;this.transmuxPipeline_.headOfPipeline.flush()};this.endTimeline=function(){this.transmuxPipeline_.headOfPipeline.endTimeline()};this.reset=function(){this.transmuxPipeline_.headOfPipeline&&this.transmuxPipeline_.headOfPipeline.reset()}; 1021this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}};pi.prototype=new d;var hc=function(k){var n=""+String.fromCharCode(k[0]);n+=String.fromCharCode(k[1]);n+=String.fromCharCode(k[2]);return n+=String.fromCharCode(k[3])},$l=function(k,n){var q=[],r;if(!n.length)return null;for(r=0;r<k.byteLength;){var v=(k[r]<<24|k[r+1]<<16|k[r+2]<<8|k[r+3])>>>0;var y=hc(k.subarray(r+4,r+8));v=1<v?r+v:k.byteLength;y===n[0]&&(1===n.length?q.push(k.subarray(r+ 10228,v)):(r=$l(k.subarray(r+8,v),n.slice(1)),r.length&&(q=q.concat(r))));r=v}return q},wa=$l,qi=function(k){var n={version:k[0],flags:new Uint8Array(k.subarray(1,4))};n.baseMediaDecodeTime=1===n.version?h(k.subarray(4)):(k[4]<<24|k[5]<<16|k[6]<<8|k[7])>>>0;return n},ri=function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength);k={version:k[0],flags:new Uint8Array(k.subarray(1,4)),trackId:n.getUint32(4)};var q=k.flags[2]&1,r=k.flags[2]&2,v=k.flags[2]&8,y=k.flags[2]&16,E=k.flags[2]&32,G=k.flags[0]& 102365536,J=k.flags[0]&131072;var P=8;q&&(P+=4,k.baseDataOffset=n.getUint32(12),P+=4);r&&(k.sampleDescriptionIndex=n.getUint32(P),P+=4);v&&(k.defaultSampleDuration=n.getUint32(P),P+=4);y&&(k.defaultSampleSize=n.getUint32(P),P+=4);E&&(k.defaultSampleFlags=n.getUint32(P));G&&(k.durationIsEmpty=!0);!q&&J&&(k.baseDataOffsetIsMoof=!0);return k},am=function(k){return{isLeading:(k[0]&12)>>>2,dependsOn:k[0]&3,isDependedOn:(k[1]&192)>>>6,hasRedundancy:(k[1]&48)>>>4,paddingValue:(k[1]&14)>>>1,isNonSyncSample:k[1]& 10241,degradationPriority:k[2]<<8|k[3]}},bm=function(k){var n={version:k[0],flags:new Uint8Array(k.subarray(1,4)),samples:[]},q=new DataView(k.buffer,k.byteOffset,k.byteLength),r=n.flags[2]&1,v=n.flags[2]&4,y=n.flags[1]&1,E=n.flags[1]&2,G=n.flags[1]&4,J=n.flags[1]&8,P=q.getUint32(4),U=8;r&&(n.dataOffset=q.getInt32(U),U+=4);v&&P&&(r={flags:am(k.subarray(U,U+4))},U+=4,y&&(r.duration=q.getUint32(U),U+=4),E&&(r.size=q.getUint32(U),U+=4),J&&(r.compositionTimeOffset=1===n.version?q.getInt32(U):q.getUint32(U), 1025U+=4),n.samples.push(r),P--);for(;P--;)r={},y&&(r.duration=q.getUint32(U),U+=4),E&&(r.size=q.getUint32(U),U+=4),G&&(r.flags=am(k.subarray(U,U+4)),U+=4),J&&(r.compositionTimeOffset=1===n.version?q.getInt32(U):q.getUint32(U),U+=4),n.samples.push(r);return n},bc=function(k){return new Date(1E3*k-20828448E5)},zg={avc1:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength);return{dataReferenceIndex:n.getUint16(6),width:n.getUint16(24),height:n.getUint16(26),horizresolution:n.getUint16(28)+ 1026n.getUint16(30)/16,vertresolution:n.getUint16(32)+n.getUint16(34)/16,frameCount:n.getUint16(40),depth:n.getUint16(74),config:Pb(k.subarray(78,k.byteLength))}},avcC:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength),q={configurationVersion:k[0],avcProfileIndication:k[1],profileCompatibility:k[2],avcLevelIndication:k[3],lengthSizeMinusOne:k[4]&3,sps:[],pps:[]},r=k[5]&31,v;var y=6;for(v=0;v<r;v++){var E=n.getUint16(y);y+=2;q.sps.push(new Uint8Array(k.subarray(y,y+E)));y+=E}r=k[y];y++; 1027for(v=0;v<r;v++)E=n.getUint16(y),y+=2,q.pps.push(new Uint8Array(k.subarray(y,y+E))),y+=E;return q},btrt:function(k){k=new DataView(k.buffer,k.byteOffset,k.byteLength);return{bufferSizeDB:k.getUint32(0),maxBitrate:k.getUint32(4),avgBitrate:k.getUint32(8)}},edts:function(k){return{boxes:Pb(k)}},elst:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength),q={version:n.getUint8(0),flags:new Uint8Array(k.subarray(1,4)),edits:[]},r=n.getUint32(4),v;for(v=8;r;r--)0===q.version?(q.edits.push({segmentDuration:n.getUint32(v), 1028mediaTime:n.getInt32(v+4),mediaRate:n.getUint16(v+8)+n.getUint16(v+10)/65536}),v+=12):(q.edits.push({segmentDuration:h(k.subarray(v)),mediaTime:h(k.subarray(v+8)),mediaRate:n.getUint16(v+16)+n.getUint16(v+18)/65536}),v+=20);return q},esds:function(k){return{version:k[0],flags:new Uint8Array(k.subarray(1,4)),esId:k[6]<<8|k[7],streamPriority:k[8]&31,decoderConfig:{objectProfileIndication:k[11],streamType:k[12]>>>2&63,bufferSize:k[13]<<16|k[14]<<8|k[15],maxBitrate:k[16]<<24|k[17]<<16|k[18]<<8|k[19], 1029avgBitrate:k[20]<<24|k[21]<<16|k[22]<<8|k[23],decoderConfigDescriptor:{tag:k[24],length:k[25],audioObjectType:k[26]>>>3&31,samplingFrequencyIndex:(k[26]&7)<<1|k[27]>>>7&1,channelConfiguration:k[27]>>>3&15}}}},ftyp:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength);n={majorBrand:hc(k.subarray(0,4)),minorVersion:n.getUint32(4),compatibleBrands:[]};for(var q=8;q<k.byteLength;)n.compatibleBrands.push(hc(k.subarray(q,q+4))),q+=4;return n},dinf:function(k){return{boxes:Pb(k)}},dref:function(k){return{version:k[0], 1030flags:new Uint8Array(k.subarray(1,4)),dataReferences:Pb(k.subarray(8))}},hdlr:function(k){var n={version:(new DataView(k.buffer,k.byteOffset,k.byteLength)).getUint8(0),flags:new Uint8Array(k.subarray(1,4)),handlerType:hc(k.subarray(8,12)),name:""},q;
1030for(q=24;q<k.byteLength&&0!==k[q];q++)n.name+=String.fromCharCode(k[q]);n.name=decodeURIComponent(escape(n.name));return n},mdat:function(k){var n=k.byteLength,q=new DataView(k.buffer,k.byteOffset,k.byteLength),r=[],v;for(v=0;v+4<k.length;v+=y){var y= 1031q.getUint32(v);v+=4;if(0>=y)r.push("\x3cspan style\x3d'color:red;'\x3eMALFORMED DATA\x3c/span\x3e");else switch(k[v]&31){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+k[v]&31)}}return{byteLength:n,nals:r}},mdhd:function(k){var n= 1032new DataView(k.buffer,k.byteOffset,k.byteLength),q=4;k={version:n.getUint8(0),flags:new Uint8Array(k.subarray(1,4)),language:""};1===k.version?(q+=4,k.creationTime=bc(n.getUint32(q)),q+=8,k.modificationTime=bc(n.getUint32(q)),q+=4,k.timescale=n.getUint32(q),q+=8):(k.creationTime=bc(n.getUint32(q)),q+=4,k.modificationTime=bc(n.getUint32(q)),q+=4,k.timescale=n.getUint32(q),q+=4);k.duration=n.getUint32(q);n=n.getUint16(q+4);k.language+=String.fromCharCode((n>>10)+96);k.language+=String.fromCharCode(((n& 1033992)>>5)+96);k.language+=String.fromCharCode((n&31)+96);return k},mdia:function(k){return{boxes:Pb(k)}},mfhd:function(k){return{version:k[0],flags:new Uint8Array(k.subarray(1,4)),sequenceNumber:k[4]<<24|k[5]<<16|k[6]<<8|k[7]}},minf:function(k){return{boxes:Pb(k)}},mp4a:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength);n={dataReferenceIndex:n.getUint16(6),channelcount:n.getUint16(16),samplesize:n.getUint16(18),samplerate:n.getUint16(24)+n.getUint16(26)/65536};28<k.byteLength&&(n.streamDescriptor= 1034Pb(k.subarray(28))[0]);return n},moof:function(k){return{boxes:Pb(k)}},moov:function(k){return{boxes:Pb(k)}},mvex:function(k){return{boxes:Pb(k)}},mvhd:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength),q=4,r={version:n.getUint8(0),flags:new Uint8Array(k.subarray(1,4))};1===r.version?(q+=4,r.creationTime=bc(n.getUint32(q)),q+=8,r.modificationTime=bc(n.getUint32(q)),q+=4,r.timescale=n.getUint32(q),q+=8):(r.creationTime=bc(n.getUint32(q)),q+=4,r.modificationTime=bc(n.getUint32(q)),q+= 10354,r.timescale=n.getUint32(q),q+=4);r.duration=n.getUint32(q);q+=4;r.rate=n.getUint16(q)+n.getUint16(q+2)/16;q+=4;r.volume=n.getUint8(q)+n.getUint8(q+1)/8;q=q+2+2+8;r.matrix=new Uint32Array(k.subarray(q,q+36));r.nextTrackId=n.getUint32(q+36+24);return r},pdin:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength);return{version:n.getUint8(0),flags:new Uint8Array(k.subarray(1,4)),rate:n.getUint32(4),initialDelay:n.getUint32(8)}},sdtp:function(k){var n={version:k[0],flags:new Uint8Array(k.subarray(1, 10364)),samples:[]},q;for(q=4;q<k.byteLength;q++)n.samples.push({dependsOn:(k[q]&48)>>4,isDependedOn:(k[q]&12)>>2,hasRedundancy:k[q]&3});return n},sidx:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength),q={version:k[0],flags:new Uint8Array(k.subarray(1,4)),references:[],referenceId:n.getUint32(4),timescale:n.getUint32(8)},r=12;0===q.version?(q.earliestPresentationTime=n.getUint32(r),q.firstOffset=n.getUint32(r+4),r+=8):(q.earliestPresentationTime=h(k.subarray(r)),q.firstOffset=h(k.subarray(r+ 10378)),r+=16);r+=2;var v=n.getUint16(r);for(r+=2;0<v;r+=12,v--)q.references.push({referenceType:(k[r]&128)>>>7,referencedSize:n.getUint32(r)&2147483647,subsegmentDuration:n.getUint32(r+4),startsWithSap:!!(k[r+8]&128),sapType:(k[r+8]&112)>>>4,sapDeltaTime:n.getUint32(r+8)&268435455});return q},smhd:function(k){return{version:k[0],flags:new Uint8Array(k.subarray(1,4)),balance:k[4]+k[5]/256}},stbl:function(k){return{boxes:Pb(k)}},ctts:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength);k= 1038{version:n.getUint8(0),flags:new Uint8Array(k.subarray(1,4)),compositionOffsets:[]};var q=n.getUint32(4),r;for(r=8;q;r+=8,q--)k.compositionOffsets.push({sampleCount:n.getUint32(r),sampleOffset:n[0===k.version?"getUint32":"getInt32"](r+4)});return k},stss:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength);k={version:n.getUint8(0),flags:new Uint8Array(k.subarray(1,4)),syncSamples:[]};var q=n.getUint32(4),r;for(r=8;q;r+=4,q--)k.syncSamples.push(n.getUint32(r));return k},stco:function(k){var n= 1039new DataView(k.buffer,k.byteOffset,k.byteLength);k={version:k[0],flags:new Uint8Array(k.subarray(1,4)),chunkOffsets:[]};var q=n.getUint32(4),r;for(r=8;q;r+=4,q--)k.chunkOffsets.push(n.getUint32(r));return k},stsc:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength),q=n.getUint32(4);k={version:k[0],flags:new Uint8Array(k.subarray(1,4)),sampleToChunks:[]};var r;for(r=8;q;
1039r+=12,q--)k.sampleToChunks.push({firstChunk:n.getUint32(r),samplesPerChunk:n.getUint32(r+4),sampleDescriptionIndex:n.getUint32(r+ 10408)});return k},stsd:function(k){return{version:k[0],flags:new Uint8Array(k.subarray(1,4)),sampleDescriptions:Pb(k.subarray(8))}},stsz:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength),q={version:k[0],flags:new Uint8Array(k.subarray(1,4)),sampleSize:n.getUint32(4),entries:[]},r;for(r=12;r<k.byteLength;r+=4)q.entries.push(n.getUint32(r));return q},stts:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength);k={version:k[0],flags:new Uint8Array(k.subarray(1,4)),timeToSamples:[]}; 1041var q=n.getUint32(4),r;for(r=8;q;r+=8,q--)k.timeToSamples.push({sampleCount:n.getUint32(r),sampleDelta:n.getUint32(r+4)});return k},styp:function(k){return zg.ftyp(k)},tfdt:qi,tfhd:ri,tkhd:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength),q=4,r={version:n.getUint8(0),flags:new Uint8Array(k.subarray(1,4))};1===r.version?(q+=4,r.creationTime=bc(n.getUint32(q)),q+=8,r.modificationTime=bc(n.getUint32(q)),q+=4,r.trackId=n.getUint32(q),q=q+4+8):(r.creationTime=bc(n.getUint32(q)),q+=4,r.modificationTime= 1042bc(n.getUint32(q)),q+=4,r.trackId=n.getUint32(q),q=q+4+4);r.duration=n.getUint32(q);q=q+4+8;r.layer=n.getUint16(q);q+=2;r.alternateGroup=n.getUint16(q);q+=2;r.volume=n.getUint8(q)+n.getUint8(q+1)/8;q=q+2+2;r.matrix=new Uint32Array(k.subarray(q,q+36));q+=36;r.width=n.getUint16(q)+n.getUint16(q+2)/65536;q+=4;r.height=n.getUint16(q)+n.getUint16(q+2)/65536;return r},traf:function(k){return{boxes:Pb(k)}},trak:function(k){return{boxes:Pb(k)}},trex:function(k){var n=new DataView(k.buffer,k.byteOffset,k.byteLength); 1043return{version:k[0],flags:new Uint8Array(k.subarray(1,4)),trackId:n.getUint32(4),defaultSampleDescriptionIndex:n.getUint32(8),defaultSampleDuration:n.getUint32(12),defaultSampleSize:n.getUint32(16),sampleDependsOn:k[20]&3,sampleIsDependedOn:(k[21]&192)>>6,sampleHasRedundancy:(k[21]&48)>>4,samplePaddingValue:(k[21]&14)>>1,sampleIsDifferenceSample:!!(k[21]&1),sampleDegradationPriority:n.getUint16(22)}},trun:bm,"url ":function(k){return{version:k[0],flags:new Uint8Array(k.subarray(1,4))}},vmhd:function(k){var n= 1044new DataView(k.buffer,k.byteOffset,k.byteLength);return{version:k[0],flags:new Uint8Array(k.subarray(1,4)),graphicsmode:n.getUint16(4),opcolor:new Uint16Array([n.getUint16(6),n.getUint16(8),n.getUint16(10)])}}};var Pb=function(k){var n=0,q=[],r;var v=new ArrayBuffer(k.length);var y=new Uint8Array(v);for(r=0;r<k.length;++r)y[r]=k[r];for(v=new DataView(v);n<k.byteLength;){y=v.getUint32(n);r=hc(k.subarray(n+4,n+8));var E=1<y?n+y:k.byteLength;n=(zg[r]||function(G){return{data:G}})(k.subarray(n+8,E)); 1045n.size=y;n.type=r;q.push(n);n=E}return q};var kq=zg.tfdt,lq=zg.trun,Ag=function(k){for(var n=0,q=String.fromCharCode(k[n]),r="";"\x00"!==q;)r+=q,n++,q=String.fromCharCode(k[n]);return r+q},cm=function(k){return void 0!==k||null!==k},bf="undefined"!==typeof window?window:"undefined"!==typeof b?b:"undefined"!==typeof self?self:{},cf=function(k){return("00"+k.toString(16)).slice(-2)},si={parseEmsgBox:function(k){var n=4,q=k[0];if(0===q){var r=Ag(k.subarray(n));n+=r.length;var v=Ag(k.subarray(n));n+= 1046v.length;var y=new DataView(k.buffer);var E=y.getUint32(n);n+=4;var G=y.getUint32(n);n+=4;var J=y.getUint32(n);n+=4;y=y.getUint32(n);n+=4}else if(1===q){y=new DataView(k.buffer);E=y.getUint32(n);n+=4;var P=h(k.subarray(n));n+=8;J=y.getUint32(n);n+=4;y=y.getUint32(n);n+=4;r=Ag(k.subarray(n));n+=r.length;v=Ag(k.subarray(n));n+=v.length}k=new Uint8Array(k.subarray(n,k.byteLength));r={scheme_id_uri:r,value:v,timescale:E?E:1,presentation_time:P,presentation_time_delta:G,event_duration:J,id:y,message_data:k}; 1047E="\x00"!==r.scheme_id_uri;v=0===q&&cm(r.presentation_time_delta)&&E;E=1===q&&cm(r.presentation_time)&&E;return!(1<q)&&v||E?r:void 0},scaleTime:function(k,n,q,r){return k||0===k?k/n:r+q/n}},mq=Kc.parseId3Frames;var dm=function(k){var n=0===k[0]?12:20;return(k[n]<<24|k[n+1]<<16|k[n+2]<<8|k[n+3])>>>0};var df={findBox:wa,parseType:hc,timescale:function(k){return wa(k,["moov","trak"]).reduce(function(n,q){var r=wa(q,["tkhd"])[0];if(!r)return null;var v=r[0];v=0===v?12:20;r=(r[v]<<24|r[v+1]<<16|r[v+2]<< 10488|r[v+3])>>>0;q=wa(q,["mdia","mdhd"])[0];if(!q)return null;v=q[0];v=0===v?12:20;n[r]=(q[v]<<24|q[v+1]<<16|q[v+2]<<8|q[v+3])>>>0;return n},{})},startTime:function(k,n){n=wa(n,["moof","traf"]).reduce(function(q,r){var v=wa(r,["tfhd"])[0];v=k[(v[4]<<24|v[5]<<16|v[6]<<8|v[7])>>>0]||9E4;r=wa(r,["tfdt"])[0];var y=new DataView(r.buffer,r.byteOffset,r.byteLength);r=1===r[0]?h(r.subarray(4,12)):y.getUint32(4);var E;"bigint"===typeof r?E=r/bf.BigInt(v):"number"!==typeof r||isNaN(r)||(E=r/v);E<Number.MAX_SAFE_INTEGER&& 1049(E=Number(E));E<q&&(q=E);return q},Infinity);return"bigint"===typeof n||isFinite(n)?n:0},compositionStartTime:function(k,n){var q=wa(n,["moof","traf"]),r=n=0;if(q&&q.length){var v=wa(q[0],["tfhd"])[0],y=wa(q[0],["trun"])[0];q=wa(q[0],["tfdt"])[0];if(v)var E=ri(v).trackId;q&&(n=qi(q).baseMediaDecodeTime);y&&(v=bm(y),v.samples&&v.samples.length&&(r=v.samples[0].compositionTimeOffset||0))}k=k[E]||9E4;"bigint"===typeof n&&(r=bf.BigInt(r),k=bf.BigInt(k));k=(n+r)/k;"bigint"===typeof k&&k<Number.MAX_SAFE_INTEGER&& 1050(k=Number(k));return k},videoTrackIds:function(k){var n=[];
1050wa(k,["moov","trak"]).forEach(function(q){var r=wa(q,["mdia","hdlr"]),v=wa(q,["tkhd"]);r.forEach(function(y,E){y=hc(y.subarray(8,12));E=v[E];"vide"===y&&(E=new DataView(E.buffer,E.byteOffset,E.byteLength),y=E.getUint8(0),E=0===y?E.getUint32(12):E.getUint32(20),n.push(E))})});return n},tracks:function(k){var n=[];wa(k,["moov","trak"]).forEach(function(q){var r={},v=wa(q,["tkhd"])[0];if(v){v=new DataView(v.buffer,v.byteOffset,v.byteLength); 1051var y=v.getUint8(0);r.id=0===y?v.getUint32(12):v.getUint32(20)}if(v=wa(q,["mdia","hdlr"])[0])v=hc(v.subarray(8,12)),r.type="vide"===v?"video":"soun"===v?"audio":v;if(v=wa(q,["mdia","minf","stbl","stsd"])[0])if(v=v.subarray(8),r.codec=hc(v.subarray(4,8)),v=wa(v,[r.codec])[0])/^[asm]vc[1-9]$/i.test(r.codec)?(v=v.subarray(78),y=hc(v.subarray(4,8)),"avcC"===y&&11<v.length?(r.codec+=".",r.codec+=cf(v[9]),r.codec+=cf(v[10]),r.codec+=cf(v[11])):r.codec="avc1.4d400d"):/^mp4[a,v]$/i.test(r.codec)?(v=v.subarray(28), 1052y=hc(v.subarray(4,8)),"esds"===y&&20<v.length&&0!==v[19]?(r.codec+="."+cf(v[19]),r.codec+="."+cf(v[20]>>>2&63).replace(/^0/,"")):r.codec="mp4a.40.2"):r.codec=r.codec.toLowerCase();if(q=wa(q,["mdia","mdhd"])[0])r.timescale=dm(q);n.push(r)});return n},getTimescaleFromMediaHeader:dm,getEmsgID3:function(k,n){n=void 0===n?0:n;return wa(k,["emsg"]).map(function(q){q=si.parseEmsgBox(new Uint8Array(q));var r=mq(q.message_data);return{cueTime:si.scaleTime(q.presentation_time,q.timescale,q.presentation_time_delta, 1053n),duration:si.scaleTime(q.event_duration,q.timescale),frames:r}})}},em=df.findBox,fm=function(k){var n=em(k,["moof","traf"]),q=[];em(k,["mdat"]).forEach(function(r,v){q.push({mdat:r,traf:n[v]})});return q},gm=function(k,n,q){var r=n,v=q.defaultSampleDuration||0,y=q.defaultSampleSize||0,E=q.trackId,G=[];k.forEach(function(J){J=lq(J).samples;J.forEach(function(P){void 0===P.duration&&(P.duration=v);void 0===P.size&&(P.size=y);P.trackId=E;P.dts=r;void 0===P.compositionTimeOffset&&(P.compositionTimeOffset= 10540);"bigint"===typeof r?(P.pts=r+bf.BigInt(P.compositionTimeOffset),r+=bf.BigInt(P.duration)):(P.pts=r+P.compositionTimeOffset,r+=P.duration)});G=G.concat(J)});return G},nq=Ye.discardEmulationPreventionBytes,oq=function(k,n){var q={};fm(k).forEach(function(r){var v=r.mdat,y=r.traf;r=wa(y,["tfhd"]);var E=ri(r[0]);r=E.trackId;var G=wa(y,["tfdt"]);G=0<G.length?qi(G[0]).baseMediaDecodeTime:0;y=wa(y,["trun"]);if(n===r&&0<y.length){y=gm(y,G,E);E=new DataView(v.buffer,v.byteOffset,v.byteLength);G=[];var J= 1055[],P;for(P=0;P+4<v.length;P+=U){var U=E.getUint32(P);P+=4;if(!(0>=U))switch(v[P]&31){case 6:var S=v.subarray(P+1,P+1+U);a:{var ia=P;for(var oa=0;oa<y.length;oa++){var ua=y[oa];if(ia<ua.size){ia=ua;break a}ia-=ua.size}ia=null}S={nalUnitType:"sei_rbsp",size:U,data:S,escapedRBSP:nq(S),trackId:r};if(ia){S.pts=ia.pts;S.dts=ia.dts;var La=ia}else if(La)S.pts=La.pts,S.dts=La.dts;else{G.push({level:"warn",message:"We've encountered a nal unit without data at "+P+" for trackId "+r+". See mux.js#223."});break}J.push(S)}}q[r]|| 1056(q[r]={seiNals:[],logs:[]});q[r].seiNals=q[r].seiNals.concat(J);q[r].logs=q[r].logs.concat(G)}});return q},pq=function(){var k=!1,n,q,r,v,y,E;this.isInitialized=function(){return k};this.init=function(G){n=new Pl;k=!0;E=G?G.isPartial:!1;n.on("data",function(J){J.startTime=J.startPts/v;J.endTime=J.endPts/v;y.captions.push(J);y.captionStreams[J.stream]=!0});n.on("log",function(J){y.logs.push(J)})};this.isNewInit=function(G,J){return G&&0===G.length||J&&"object"===typeof J&&0===Object.keys(J).length? 1057!1:r!==G[0]||v!==J[r]};this.parse=function(G,J,P){if(this.isInitialized()){if(!J||!P)return null;if(this.isNewInit(J,P))r=J[0],v=P[r];else if(null===r||!v)return q.push(G),null}else return null;for(;0<q.length;){var U=q.shift();this.parse(U,J,P)}P=r;J=v;null===P?G=null:(G=oq(G,P)[P]||{},G={seiNals:G.seiNals,logs:G.logs,timescale:J});G&&G.logs&&(y.logs=y.logs.concat(G.logs));if(null===G||!G.seiNals)return y.logs.length?{logs:y.logs,captions:[],captionStreams:[]}:null;this.pushNals(G.seiNals);this.flushStream(); 1058return y};this.pushNals=function(G){if(!this.isInitialized()||!G||0===G.length)return null;G.forEach(function(J){n.push(J)})};this.flushStream=function(){if(!this.isInitialized())return null;E?n.partialFlush():n.flush()};this.clearParsedCaptions=function(){y.captions=[];
1058y.captionStreams={};y.logs=[]};this.resetCaptionStream=function(){if(!this.isInitialized())return null;n.reset()};this.clearAllCaptions=function(){this.clearParsedCaptions();this.resetCaptionStream()};this.reset=function(){q=[];v= 1059r=null;y?this.clearParsedCaptions():y={captions:[],captionStreams:{},logs:[]};this.resetCaptionStream()};this.reset()},qq=df.getTimescaleFromMediaHeader,hm=function(){var k=9E4;this.init=function(n){(n=wa(n,["moov","trak","mdia","mdhd"])[0])&&(k=qq(n))};this.parseSegment=function(n){var q=[],r=0;fm(n).forEach(function(v){var y=v.mdat,E=v.traf;v=wa(E,["tfdt"])[0];var G=wa(E,["tfhd"])[0];E=wa(E,["trun"]);v&&(r=kq(v).baseMediaDecodeTime);if(E.length&&G){var J=0;gm(E,r,G).forEach(function(P){var U=new TextDecoder("utf-8"), 1060S=y.slice(J,J+P.size);wa(S,["vtte"])[0]||wa(S,["vttc"]).forEach(function(ia){var oa=wa(ia,["payl"])[0];ia=wa(ia,["sttg"])[0];var ua=P.pts/k,La=(P.pts+P.duration)/k;if(oa)try{var wg=U.decode(oa)}catch(Lc){console.error(Lc)}if(ia)try{var xb=U.decode(ia)}catch(Lc){console.error(Lc)}P.duration&&wg&&q.push({cueText:wg,start:ua,end:La,settings:xb})});J+=P.size})}});return q}},im=function(k){var n=k[1]&31;return n=n<<8|k[2]},Bg=function(k){return!!(k[1]&64)},Cg=function(k){var n=0;1<(k[3]&48)>>>4&&(n+=k[4]+ 10611);return n},ti=function(k){switch(k){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}};var ab={parseType:function(k,n){k=im(k);return 0===k?"pat":k===n?"pmt":n?"pes":null},parsePat:function(k){var n=Bg(k),q=4+Cg(k);n&&(q+=k[q]+1);return(k[q+10]&31)<<8|k[q+11]},parsePmt:function(k){var n={},q=Bg(k),r=4+Cg(k);q&&(r+=k[r]+1);if(k[r+ 10625]&1){q=3+((k[r+1]&15)<<8|k[r+2])-4;for(var v=12+((k[r+10]&15)<<8|k[r+11]);v<q;){var y=r+v;n[(k[y+1]&31)<<8|k[y+2]]=k[y];v+=((k[y+3]&15)<<8|k[y+4])+5}return n}},parsePayloadUnitStartIndicator:Bg,parsePesType:function(k,n){k=im(k);switch(n[k]){case sb.H264_STREAM_TYPE:return"video";case sb.ADTS_STREAM_TYPE:return"audio";case sb.METADATA_STREAM_TYPE:return"timed-metadata";default:return null}},parsePesTime:function(k){if(!Bg(k))return null;var n=4+Cg(k);if(n>=k.byteLength)return null;var q=null;var r= 1063k[n+7];r&192&&(q={},q.pts=(k[n+9]&14)<<27|(k[n+10]&255)<<20|(k[n+11]&254)<<12|(k[n+12]&255)<<5|(k[n+13]&254)>>>3,q.pts*=4,q.pts+=(k[n+13]&6)>>>1,q.dts=q.pts,r&64&&(q.dts=(k[n+14]&14)<<27|(k[n+15]&255)<<20|(k[n+16]&254)<<12|(k[n+17]&255)<<5|(k[n+18]&254)>>>3,q.dts*=4,q.dts+=(k[n+18]&6)>>>1));return q},videoPacketContainsKeyFrame:function(k){var n=4+Cg(k);k=k.subarray(n);for(var q=n=0,r=!1;q<k.byteLength-3;q++)if(1===k[q+2]){n=q+5;break}for(;n<k.byteLength;)switch(k[n]){case 0:if(0!==k[n-1]){n+=2;break}else if(0!== 1064k[n-2]){n++;break}q+3!==n-2&&(q=ti(k[q+3]&31),"slice_layer_without_partitioning_rbsp_idr"===q&&(r=!0));do n++;while(1!==k[n]&&n<k.length);q=n-2;n+=3;break;case 1:if(0!==k[n-1]||0!==k[n-2]){n+=3;break}q=ti(k[q+3]&31);"slice_layer_without_partitioning_rbsp_idr"===q&&(r=!0);q=n-2;n+=3;break;default:n+=3}(k=k.subarray(q))&&3<k.byteLength&&(q=ti(k[3]&31),"slice_layer_without_partitioning_rbsp_idr"===q&&(r=!0));return r}};var wd=ya.ONE_SECOND_IN_TS,rq=function(k,n){for(var q=0,r=188,v,y;r<k.byteLength;)if(71=== 1065k[q]&&71===k[r]){v=k.subarray(q,r);y=ab.parseType(v,n.pid);switch(y){case "pat":n.pid=ab.parsePat(v);break;case "pmt":var E=ab.parsePmt(v);n.table=n.table||{};
1065Object.keys(E).forEach(function(G){n.table[G]=E[G]})}q+=188;r+=188}else q++,r++},jm=function(k,n,q){for(var r=0,v=188,y,E,G,J=!1;v<=k.byteLength;)if(71!==k[r]||71!==k[v]&&v!==k.byteLength)r++,v++;else{y=k.subarray(r,v);E=ab.parseType(y,n.pid);switch(E){case "pes":if(E=ab.parsePesType(y,n.table),G=ab.parsePayloadUnitStartIndicator(y),"audio"=== 1066E&&G&&(y=ab.parsePesTime(y)))y.type="audio",q.audio.push(y),J=!0}if(J)break;r+=188;v+=188}v=k.byteLength;r=v-188;for(J=!1;0<=r;)if(71!==k[r]||71!==k[v]&&v!==k.byteLength)r--,v--;else{y=k.subarray(r,v);E=ab.parseType(y,n.pid);switch(E){case "pes":if(E=ab.parsePesType(y,n.table),G=ab.parsePayloadUnitStartIndicator(y),"audio"===E&&G&&(y=ab.parsePesTime(y)))y.type="audio",q.audio.push(y),J=!0}if(J)break;r-=188;v-=188}},sq=function(k,n){if(k.audio&&k.audio.length){var q=n;if("undefined"===typeof q||isNaN(q))q= 1067k.audio[0].dts;k.audio.forEach(function(v){v.dts=Zc(v.dts,q);v.pts=Zc(v.pts,q);v.dtsTime=v.dts/wd;v.ptsTime=v.pts/wd})}if(k.video&&k.video.length){var r=n;if("undefined"===typeof r||isNaN(r))r=k.video[0].dts;k.video.forEach(function(v){v.dts=Zc(v.dts,r);v.pts=Zc(v.pts,r);v.dtsTime=v.dts/wd;v.ptsTime=v.pts/wd});k.firstKeyFrame&&(k=k.firstKeyFrame,k.dts=Zc(k.dts,r),k.pts=Zc(k.pts,r),k.dtsTime=k.dts/wd,k.ptsTime=k.pts/wd)}},tq={inspect:function(k,n){if(Mc.isLikelyAacData(k))a:{for(var q=!1,r=0,v=null, 1068y=null,E,G=0,J;3<=k.length-G;){switch(Mc.parseType(k,G)){case "timed-metadata":if(10>k.length-G){q=!0;break}E=Mc.parseId3TagSize(k,G);if(E>k.length){q=!0;break}null===y&&(J=k.subarray(G,G+E),y=Mc.parseAacTimestamp(J));G+=E;break;case "audio":if(7>k.length-G){q=!0;break}E=Mc.parseAdtsSize(k,G);if(E>k.length){q=!0;break}null===v&&(J=k.subarray(G,G+E),v=Mc.parseSampleRate(J));r++;G+=E;break;default:G++}if(q){k=null;break a}}null===v||null===y?k=null:(k=wd/v,k={audio:[{type:"audio",dts:y,pts:y},{type:"audio", 1069dts:y+1024*r*k,pts:y+1024*r*k}]})}else{r={pid:null,table:null};y={};rq(k,r);for(q in r.table)if(r.table.hasOwnProperty(q))switch(r.table[q]){case sb.H264_STREAM_TYPE:y.video=[];var P;E=k;G=r;J=y;var U=0,S=188,ia=!1,oa=[];for(P=0;S<E.byteLength;)if(71===E[U]&&71===E[S]){v=E.subarray(U,S);var ua=ab.parseType(v,G.pid);switch(ua){case "pes":var La=ab.parsePesType(v,G.table);ua=ab.parsePayloadUnitStartIndicator(v);if("video"===La&&(ua&&!ia&&(La=ab.parsePesTime(v))&&(La.type="video",J.video.push(La),ia= 1070!0),!J.firstKeyFrame)){if(ua&&0!==P){La=new Uint8Array(P);for(ua=0;oa.length;)P=oa.shift(),La.set(P,ua),ua+=P.byteLength;ab.videoPacketContainsKeyFrame(La)&&((P=ab.parsePesTime(La))?(J.firstKeyFrame=P,J.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.")); 1071P=0}oa.push(v);P+=v.byteLength}}if(ia&&J.firstKeyFrame)break;U+=188;S+=188}else U++,S++;S=E.byteLength;U=S-188;for(ia=!1;0<=U;)if(71===E[U]&&71===E[S]){v=E.subarray(U,S);ua=ab.parseType(v,G.pid);switch(ua){case "pes":if(La=ab.parsePesType(v,G.table),ua=ab.parsePayloadUnitStartIndicator(v),"video"===La&&ua&&(La=ab.parsePesTime(v)))La.type="video",J.video.push(La),ia=!0}if(ia)break;U-=188;S-=188}else U--,S--;0===y.video.length&&delete y.video;break;case sb.ADTS_STREAM_TYPE:y.audio=[],jm(k,r,y),0=== 1072y.audio.length&&delete y.audio}k=y}if(!k||!k.audio&&!k.video)return null;sq(k,n);return k},parseAudioPes_:jm},uq=function(k,n){n.on("data",function(q){var r=q.initSegment;q.initSegment={data:r.buffer,byteOffset:r.byteOffset,byteLength:r.byteLength};r=q.data;q.data=r.buffer;k.postMessage({action:"data",segment:q,byteOffset:r.byteOffset,byteLength:r.byteLength},[q.data])});n.on("done",function(q){k.postMessage({action:"done"})});n.on("gopInfo",function(q){k.postMessage({action:"gopInfo",gopInfo:q})}); 1073n.on("videoSegmentTimingInfo",function(q){var r={start:{decode:ya.videoTsToSeconds(q.start.dts),presentation:ya.videoTsToSeconds(q.start.pts)},end:{decode:ya.videoTsToSeconds(q.end.dts),presentation:ya.videoTsToSeconds(q.end.pts)},baseMediaDecodeTime:ya.videoTsToSeconds(q.baseMediaDecodeTime)};q.prependedContentDuration&&(r.prependedContentDuration=ya.videoTsToSeconds(q.prependedContentDuration));k.postMessage({action:"videoSegmentTimingInfo",videoSegmentTimingInfo:r})});n.on("audioSegmentTimingInfo", 1074function(q){var r={start:{decode:ya.videoTsToSeconds(q.start.dts),presentation:ya.videoTsToSeconds(q.start.pts)},end:{decode:ya.videoTsToSeconds(q.end.dts),presentation:ya.videoTsToSeconds(q.end.pts)},baseMediaDecodeTime:ya.videoTsToSeconds(q.baseMediaDecodeTime)};q.prependedContentDuration&&(r.prependedContentDuration=ya.videoTsToSeconds(q.prependedContentDuration));k.postMessage({action:"audioSegmentTimingInfo",audioSegmentTimingInfo:r})});n.on("id3Frame",function(q){k.postMessage({action:"id3Frame", 1075id3Frame:q})});n.on("caption",function(q){k.postMessage({action:"caption",caption:q})});n.on("trackinfo",function(q){k.postMessage({action:"trackinfo",trackInfo:q})});n.on("audioTimingInfo",function(q){k.postMessage({action:"audioTimingInfo",audioTimingInfo:{start:ya.videoTsToSeconds(q.start),end:ya.videoTsToSeconds(q.end)}})});n.on("videoTimingInfo",function(q){k.postMessage({action:"videoTimingInfo",videoTimingInfo:{start:ya.videoTsToSeconds(q.start),end:ya.videoTsToSeconds(q.end)}})});n.on("log", 1076function(q){k.postMessage({action:"log",log:q})})},eb=function(k,n){this.options=n||{};this.self=k;this.init()};eb.prototype.init=function(){this.transmuxer&&this.transmuxer.dispose();this.transmuxer=new pi(this.options);uq(this.self,this.transmuxer)};eb.prototype.pushMp4Captions=function(k){this.captionParser||(this.captionParser=new pq,this.captionParser.init());var n=new Uint8Array(k.data,k.byteOffset,k.byteLength);k=this.captionParser.parse(n,k.trackIds,k.timescales);this.self.postMessage({action:"mp4Captions", 1077captions:k&&k.captions||[],logs:k&&k.logs||[],data:n.buffer},[n.buffer])};eb.prototype.initMp4WebVttParser=function(k){this.webVttParser||(this.webVttParser=new hm);k=new Uint8Array(k.data,k.byteOffset,k.byteLength);this.webVttParser.init(k)};
1077eb.prototype.getMp4WebVttText=function(k){this.webVttParser||(this.webVttParser=new hm);k=new Uint8Array(k.data,k.byteOffset,k.byteLength);var n=this.webVttParser.parseSegment(k);this.self.postMessage({action:"getMp4WebVttText",mp4VttCues:n||[],data:k.buffer}, 1078[k.buffer])};eb.prototype.probeMp4StartTime=function(k){var n=k.data;k=df.startTime(k.timescales,n);this.self.postMessage({action:"probeMp4StartTime",startTime:k,data:n},[n.buffer])};eb.prototype.probeMp4Tracks=function(k){k=k.data;var n=df.tracks(k);this.self.postMessage({action:"probeMp4Tracks",tracks:n,data:k},[k.buffer])};eb.prototype.probeEmsgID3=function(k){var n=k.data;k=df.getEmsgID3(n,k.offset);this.self.postMessage({action:"probeEmsgID3",id3Frames:k,emsgData:n},[n.buffer])};eb.prototype.probeTs= 1079function(k){var n=k.data;k=k.baseStartTime;k="number"!==typeof k||isNaN(k)?void 0:k*ya.ONE_SECOND_IN_TS;k=tq.inspect(n,k);var q=null;k&&(q={hasVideo:k.video&&2===k.video.length||!1,hasAudio:k.audio&&2===k.audio.length||!1},q.hasVideo&&(q.videoStart=k.video[0].ptsTime),q.hasAudio&&(q.audioStart=k.audio[0].ptsTime));this.self.postMessage({action:"probeTs",result:q,data:n},[n.buffer])};eb.prototype.clearAllMp4Captions=function(){this.captionParser&&this.captionParser.clearAllCaptions()};eb.prototype.clearParsedMp4Captions= 1080function(){this.captionParser&&this.captionParser.clearParsedCaptions()};eb.prototype.push=function(k){k=new Uint8Array(k.data,k.byteOffset,k.byteLength);this.transmuxer.push(k)};eb.prototype.reset=function(){this.transmuxer.reset()};eb.prototype.setTimestampOffset=function(k){this.transmuxer.setBaseMediaDecodeTime(Math.round(ya.secondsToVideoTs(k.timestampOffset||0)))};eb.prototype.setAudioAppendStart=function(k){this.transmuxer.setAudioAppendStart(Math.ceil(ya.secondsToVideoTs(k.appendStart)))}; 1081eb.prototype.setRemux=function(k){this.transmuxer.setRemux(k.remux)};eb.prototype.flush=function(k){this.transmuxer.flush();self.postMessage({action:"done",type:"transmuxed"})};eb.prototype.endTimeline=function(){this.transmuxer.endTimeline();self.postMessage({action:"endedtimeline",type:"transmuxed"})};eb.prototype.alignGopsWith=function(k){this.transmuxer.alignGopsWith(k.gopsToAlignWith.slice())};self.onmessage=function(k){if("init"===k.data.action&&k.data.options)this.messageHandlers=new eb(self, 1082k.data.options);else if(this.messageHandlers||(this.messageHandlers=new eb(self)),k.data&&k.data.action&&"init"!==k.data.action&&this.messageHandlers[k.data.action])this.messageHandlers[k.data.action](k.data)}})),wq=Hl(vq),lm=function(b){var d=b.transmuxer,f=b.bytes,h=b.audioAppendStart,m=b.gopsToAlignWith,p=b.remux,t=b.onData,x=b.onTrackInfo,u=b.onAudioTimingInfo,z=b.onVideoTimingInfo,A=b.onVideoSegmentTimingInfo,F=b.onAudioSegmentTimingInfo,H=b.onId3,L=b.onCaptions,I=b.onDone,N=b.onEndedTimeline, 1083T=b.onTransmuxerLog,fa=b.isEndOfTimeline,X=b.segment,ra=b.triggerSegmentEventFn,ca={buffer:[]},ea=fa;d.onmessage=function(ja){if(d.currentTransmux===b){if("data"===ja.data.action){var Aa=ja.data.segment,ta=Aa.type,mb=Aa.initSegment,ng=Aa.videoFrameDtsTime,og=Aa.videoFramePtsTime;ca.buffer.push({captions:Aa.captions,captionStreams:Aa.captionStreams,metadata:Aa.metadata});Aa=ja.data.segment.boxes||{data:ja.data.segment.data};ta={type:ta,data:new Uint8Array(Aa.data,Aa.data.byteOffset,Aa.data.byteLength), 1084initSegment:new Uint8Array(mb.data,mb.byteOffset,mb.byteLength)};"undefined"!==typeof ng&&(ta.videoFrameDtsTime=ng);"undefined"!==typeof og&&(ta.videoFramePtsTime=og);t(ta)}"trackinfo"===ja.data.action&&x(ja.data.trackInfo);"gopInfo"===ja.data.action&&(ca.gopInfo=ja.data.gopInfo);"audioTimingInfo"===ja.data.action&&u(ja.data.audioTimingInfo);"videoTimingInfo"===ja.data.action&&z(ja.data.videoTimingInfo);"videoSegmentTimingInfo"===ja.data.action&&A(ja.data.videoSegmentTimingInfo);"audioSegmentTimingInfo"=== 1085ja.data.action&&F(ja.data.audioSegmentTimingInfo);"id3Frame"===ja.data.action&&H([ja.data.id3Frame],ja.data.id3Frame.dispatchType);"caption"===ja.data.action&&L(ja.data.caption);"endedtimeline"===ja.data.action&&(ea=!1,N());"log"===ja.data.action&&T(ja.data.log);"transmuxed"!==ja.data.type||ea||(d.onmessage=null,ca.buffer=[],I(ca),km(d))}};d.onerror=function(){var ja={message:"Received an error message from the transmuxer worker",metadata:{errorType:O.Error.StreamingFailedToTransmuxSegment,segmentInfo:xd({segment:X})}}; 1086I(null,ja)};h&&d.postMessage({action:"setAudioAppendStart",appendStart:h});Array.isArray(m)&&d.postMessage({action:"alignGopsWith",gopsToAlignWith:m});"undefined"!==typeof p&&d.postMessage({action:"setRemux",remux:p});f.byteLength&&(h=f instanceof ArrayBuffer?f:f.buffer,m=f instanceof ArrayBuffer?0:f.byteOffset,ra({type:"segmenttransmuxingstart",segment:X}),d.postMessage({action:"push",data:h,byteOffset:m,byteLength:f.byteLength},[h]));fa&&d.postMessage({action:"endTimeline"});d.postMessage({action:"flush"})}, 1087km=function(b){b.currentTransmux=null;b.transmuxQueue.length&&(b.currentTransmux=b.transmuxQueue.shift(),"function"===typeof b.currentTransmux?b.currentTransmux():lm(b.currentTransmux))},mm=function(b,d){b.postMessage({action:d});km(b)},nm=function(b,d){d.currentTransmux?d.transmuxQueue.push(mm.bind(null,d,b)):(d.currentTransmux=b,mm(d,b))},om=function(b){b.transmuxer.currentTransmux?b.transmuxer.transmuxQueue.push(b):(b.transmuxer.currentTransmux=b,lm(b))},ui={reset:function(b){nm("reset",b)},endTimeline:function(b){nm("endTimeline", 1088b)},transmux:om,createTransmuxer:function(b){var d=new wq;d.currentTransmux=null;d.transmuxQueue=[];var f=d.terminate;d.terminate=function(){d.currentTransmux=null;d.transmuxQueue.length=0;return f.call(d)};d.postMessage({action:"init",options:b});return d}},ie=function(b){var d=b.transmuxer,f=b.endAction||b.action,h=b.callback,m=jb({},b,{endAction:null,transmuxer:null,callback:null}),p=function(x){x.data.action===f&&(d.removeEventListener("message",p),x.data.data&&(x.data.data=new Uint8Array(x.data.data, 1089b.byteOffset||0,b.byteLength||x.data.data.byteLength),b.data&&(b.data=x.data.data)),h(x.data))};d.addEventListener("message",p);if(b.data){var t=b.data instanceof ArrayBuffer;m.byteOffset=t?0:b.data.byteOffset;m.byteLength=b.data.byteLength;d.postMessage(m,[t?b.data:b.data.buffer])}else d.postMessage(m)},vi=function(b){b.forEach(function(d){d.abort()})},wi=function(b,d){var f=ud({requestType:d.requestType,request:d,error:b});return d.timedout?{status:d.status,message:"HLS request timed-out at URL: "+ 1090d.uri,code:-101,xhr:d,metadata:f}:d.aborted?{status:d.status,message:"HLS request aborted at URL: "+d.uri,code:-102,xhr:d,metadata:f}:b?{status:d.status,message:"HLS request errored at URL: "+d.uri,code:2,xhr:d,metadata:f}:"arraybuffer"===d.responseType&&0===d.response.byteLength?{status:d.status,message:"Empty HLS response at URL: "+d.uri,code:2,xhr:d,metadata:f}:null},pm=function(b,d,f,h){return function(m,p){var t=p.response;if(m=wi(m,p))return f(m,b);if(16!==t.byteLength)return f({status:p.status, 1091message:"Invalid HLS key at URL: "+p.uri,code:2,xhr:p},b);t=new DataView(t);t=new Uint32Array([t.getUint32(0),t.getUint32(4),t.getUint32(8),t.getUint32(12)]);for(m=0;m<d.length;m++)d[m].bytes=t;h({type:"segmentkeyloadcomplete",segment:b,keyInfo:{uri:p.uri}});return f(null,b)}},xq=function(b,d,f){"wvtt"===d&&ie({action:"getMp4WebVttText",data:b.bytes,transmuxer:b.transmuxer,callback:function(h){var m=h.mp4VttCues;b.bytes=h.data;f(null,b,{mp4VttCues:m})}})},qm=function(b,d){var f=Th(b.map.bytes);if("mp4"!== 1092f)return f=f||"unknown",d({internal:!0,message:"Found unsupported "+f+" container for initialization segment at URL: "+(b.map.resolvedUri||b.map.uri),code:2,metadata:{mediaType:f}});ie({action:"probeMp4Tracks",data:b.map.bytes,transmuxer:b.transmuxer,callback:function(h){var m=h.tracks;b.map.bytes=h.data;m.forEach(function(p){b.map.tracks=b.map.tracks||{};b.map.tracks[p.type]||(b.map.tracks[p.type]=p,"number"===typeof p.id&&p.timescale&&(b.map.timescales=b.map.timescales||{},b.map.timescales[p.id]= 1093p.timescale),"text"===p.type&&"wvtt"===p.codec&&b.transmuxer.postMessage({action:"initMp4WebVttParser",data:b.map.bytes}))});return d(null)}})},yq=function(b){var d=b.segment,f=b.finishProcessingFn,h=b.triggerSegmentEventFn;return function(m,p){if(m=wi(m,p))return f(m,d);m=new Uint8Array(p.response);h({type:"segmentloaded",segment:d});if(d.map.key)return d.map.encryptedBytes=m,f(null,d);d.map.bytes=m;qm(d,function(t){if(t)return t.xhr=p,t.status=p.status,f(t,d);f(null,d)})}},zq=function(b){var d= 1094b.segment,f=b.finishProcessingFn,h=b.responseType,m=b.triggerSegmentEventFn;return function(p,t){if(p=wi(p,t))return f(p,d);m({type:"segmentloaded",segment:d});if("arraybuffer"!==h&&t.responseText){p=t.responseText.substring(d.lastReachedChar||0);for(var x=new Uint8Array(new ArrayBuffer(p.length)),u=0;u<p.length;
1094u++)x[u]=p.charCodeAt(u);p=x.buffer}else p=t.response;d.stats={bandwidth:t.bandwidth,bytesReceived:t.bytesReceived||0,roundTripTime:t.roundTripTime||0};d.key?d.encryptedBytes=new Uint8Array(p): 1095d.bytes=new Uint8Array(p);return f(null,d)}},Aq=function(b){var d=b.segment,f=b.bytes,h=b.trackInfoFn,m=b.timingInfoFn,p=b.videoSegmentTimingInfoFn,t=b.audioSegmentTimingInfoFn,x=b.id3Fn,u=b.captionsFn,z=b.isEndOfTimeline,A=b.endedTimelineFn,F=b.dataFn,H=b.doneFn,L=b.onTransmuxerLog,I=b.triggerSegmentEventFn;b=d.map&&d.map.tracks||{};var N=!(!b.audio||!b.video),T=m.bind(null,d,"audio","start"),fa=m.bind(null,d,"audio","end"),X=m.bind(null,d,"video","start"),ra=m.bind(null,d,"video","end"),ca=function(){return om({bytes:f, 1096transmuxer:d.transmuxer,audioAppendStart:d.audioAppendStart,gopsToAlignWith:d.gopsToAlignWith,remux:N,onData:function(ea){ea.type="combined"===ea.type?"video":ea.type;F(d,ea)},onTrackInfo:function(ea){h&&(N&&(ea.isMuxed=!0),h(d,ea))},onAudioTimingInfo:function(ea){T&&"undefined"!==typeof ea.start&&(T(ea.start),T=null);fa&&"undefined"!==typeof ea.end&&fa(ea.end)},onVideoTimingInfo:function(ea){X&&"undefined"!==typeof ea.start&&(X(ea.start),X=null);ra&&"undefined"!==typeof ea.end&&ra(ea.end)},onVideoSegmentTimingInfo:function(ea){I({type:"segmenttransmuxingtiminginfoavailable", 1097segment:d,timingInfo:{pts:{start:ea.start.presentation,end:ea.end.presentation},dts:{start:ea.start.decode,end:ea.end.decode}}});p(ea)},onAudioSegmentTimingInfo:function(ea){I({type:"segmenttransmuxingtiminginfoavailable",segment:d,timingInfo:{pts:{start:ea.start.pts,end:ea.end.pts},dts:{start:ea.start.dts,end:ea.end.dts}}});t(ea)},onId3:function(ea,ja){x(d,ea,ja)},onCaptions:function(ea){u(d,[ea])},isEndOfTimeline:z,onEndedTimeline:function(){A()},onTransmuxerLog:L,onDone:function(ea,ja){H&&(ea.type= 1098"combined"===ea.type?"video":ea.type,I({type:"segmenttransmuxingcomplete",segment:d}),H(ja,d,ea))},segment:d,triggerSegmentEventFn:I})};ie({action:"probeTs",transmuxer:d.transmuxer,data:f,baseStartTime:d.baseStartTime,callback:function(ea){d.bytes=f=ea.data;if(ea=ea.result)h(d,{hasAudio:ea.hasAudio,hasVideo:ea.hasVideo,isMuxed:N}),h=null;ca()}})},rm=function(b){var d=b.segment,f=b.bytes,h=b.trackInfoFn,m=b.timingInfoFn,p=b.videoSegmentTimingInfoFn,t=b.audioSegmentTimingInfoFn,x=b.id3Fn,u=b.captionsFn, 1099z=b.isEndOfTimeline,A=b.endedTimelineFn,F=b.dataFn,H=b.doneFn,L=b.onTransmuxerLog;b=b.triggerSegmentEventFn;var I=new Uint8Array(f);if(0<ep(I,["moof"]).length){d.isFmp4=!0;var N=d.map.tracks;
1099if(!N.text||N.audio&&N.video){var T={isFmp4:!0,hasVideo:!!N.video,hasAudio:!!N.audio};N.audio&&N.audio.codec&&"enca"!==N.audio.codec&&(T.audioCodec=N.audio.codec);N.video&&N.video.codec&&"encv"!==N.video.codec&&(T.videoCodec=N.video.codec);N.video&&N.audio&&(T.isMuxed=!0);h(d,T);var fa=function(X,ra){F(d,{data:I, 1100type:T.hasAudio&&!T.isMuxed?"audio":"video"});ra&&ra.length&&x(d,ra);X&&X.length&&u(d,X);H(null,d,{})};ie({action:"probeMp4StartTime",timescales:d.map.timescales,data:I,transmuxer:d.transmuxer,callback:function(X){var ra=X.data;X=X.startTime;f=ra.buffer;d.bytes=I=ra;T.hasAudio&&!T.isMuxed&&m(d,"audio","start",X);T.hasVideo&&m(d,"video","start",X);ie({action:"probeEmsgID3",data:I,transmuxer:d.transmuxer,offset:X,callback:function(ca){var ea=ca.emsgData,ja=ca.id3Frames;f=ea.buffer;d.bytes=I=ea;N.video&& 1101ea.byteLength&&d.transmuxer?ie({action:"pushMp4Captions",endAction:"mp4Captions",transmuxer:d.transmuxer,data:I,timescales:d.map.timescales,trackIds:[N.video.id],callback:function(Aa){f=Aa.data.buffer;d.bytes=I=Aa.data;Aa.logs.forEach(function(ta){L(Ba(ta,{stream:"mp4CaptionParser"}))});fa(Aa.captions,ja)}}):fa(void 0,ja)}})}})}else F(d,{data:I,type:"text"}),xq(d,N.text.codec,H)}else d.transmuxer?("undefined"===typeof d.container&&(d.container=Th(I)),"ts"!==d.container&&"aac"!==d.container?(h(d,{hasAudio:!1, 1102hasVideo:!1}),H(null,d,{})):Aq({segment:d,bytes:f,trackInfoFn:h,timingInfoFn:m,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:t,id3Fn:x,captionsFn:u,isEndOfTimeline:z,endedTimelineFn:A,dataFn:F,doneFn:H,onTransmuxerLog:L,triggerSegmentEventFn:b})):H(null,d,{})},sm=function(b,d){var f=b.id,h=b.key,m=b.encryptedBytes,p=b.decryptionWorker,t=b.segment,x=b.doneFn,u=function(z){z.data.source===f&&(p.removeEventListener("message",u),z=z.data.decrypted,d(new Uint8Array(z.bytes,z.byteOffset,z.byteLength)))}; 1103p.onerror=function(){var z=xd({segment:t});x({message:"An error occurred in the decryption worker",metadata:{error:Error("An error occurred in the decryption worker"),errorType:O.Error.StreamingFailedToDecryptSegment,segmentInfo:z,keyInfo:{uri:t.key.resolvedUri||t.map.key.resolvedUri}}},t)};p.addEventListener("message",u);b=h.bytes.slice?h.bytes.slice():new Uint32Array(Array.prototype.slice.call(h.bytes));p.postMessage(zl({source:f,encrypted:m,key:b,iv:h.iv}),[m.buffer,b.buffer])},Bq=function(b){var d= 1104b.decryptionWorker,f=b.segment,h=b.trackInfoFn,m=b.timingInfoFn,p=b.videoSegmentTimingInfoFn,t=b.audioSegmentTimingInfoFn,x=b.id3Fn,u=b.captionsFn,z=b.isEndOfTimeline,A=b.endedTimelineFn,F=b.dataFn,H=b.doneFn,L=b.onTransmuxerLog,I=b.triggerSegmentEventFn;I({type:"segmentdecryptionstart"});sm({id:f.requestId,key:f.key,encryptedBytes:f.encryptedBytes,decryptionWorker:d,segment:f,doneFn:H},function(N){f.bytes=N;I({type:"segmentdecryptioncomplete",segment:f});rm({segment:f,bytes:f.bytes,trackInfoFn:h, 1105timingInfoFn:m,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:t,id3Fn:x,captionsFn:u,isEndOfTimeline:z,endedTimelineFn:A,dataFn:F,doneFn:H,onTransmuxerLog:L,triggerSegmentEventFn:I})})},Cq=function(b){var d=b.activeXhrs,f=b.decryptionWorker,h=b.trackInfoFn,m=b.timingInfoFn,p=b.videoSegmentTimingInfoFn,t=b.audioSegmentTimingInfoFn,x=b.id3Fn,u=b.captionsFn,z=b.isEndOfTimeline,A=b.endedTimelineFn,F=b.dataFn,H=b.doneFn,L=b.onTransmuxerLog,I=b.triggerSegmentEventFn,N=0,T=!1;return function(fa,X){if(!T){if(fa)return T= 1106!0,vi(d),H(fa,X);N+=1;if(N===d.length){var ra=function(){if(X.encryptedBytes)return Bq({decryptionWorker:f,segment:X,trackInfoFn:h,timingInfoFn:m,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:t,id3Fn:x,captionsFn:u,isEndOfTimeline:z,endedTimelineFn:A,dataFn:F,doneFn:H,onTransmuxerLog:L,triggerSegmentEventFn:I});rm({segment:X,bytes:X.bytes,trackInfoFn:h,timingInfoFn:m,videoSegmentTimingInfoFn:p,audioSegmentTimingInfoFn:t,id3Fn:x,captionsFn:u,isEndOfTimeline:z,endedTimelineFn:A,dataFn:F,doneFn:H, 1107onTransmuxerLog:L,triggerSegmentEventFn:I})};X.endOfAllRequests=Date.now();if(X.map&&X.map.encryptedBytes&&!X.map.bytes)return I({type:"segmentdecryptionstart",segment:X}),sm({decryptionWorker:f,id:X.requestId+"-init",encryptedBytes:X.map.encryptedBytes,key:X.map.key,segment:X,doneFn:H}
1107,function(ca){X.map.bytes=ca;I({type:"segmentdecryptioncomplete",segment:X});qm(X,function(ea){if(ea)return vi(d),H(ea,X);ra()})});ra()}}}},Dq=function(b){var d=b.loadendState,f=b.abortFn;return function(h){h.target.aborted&& 1108f&&!d.calledAbortFn&&(f(),d.calledAbortFn=!0)}},Eq=function(b){var d=b.segment,f=b.progressFn;return function(h){if(!h.target.aborted){var m=d.stats,p=h.target;p=Date.now()-p.requestTime;p={bandwidth:Infinity,bytesReceived:0,roundTripTime:p||0};p.bytesReceived=h.loaded;p.bandwidth=Math.floor(p.bytesReceived/p.roundTripTime*8E3);d.stats=Ba(m,p);!d.stats.firstBytesReceivedAt&&d.stats.bytesReceived&&(d.stats.firstBytesReceivedAt=Date.now());return f(h,d)}}},Fq=function(b){var d=b.xhr,f=b.xhrOptions, 1109h=b.segment,m=b.abortFn,p=b.progressFn,t=b.trackInfoFn,x=b.timingInfoFn,u=b.videoSegmentTimingInfoFn,z=b.audioSegmentTimingInfoFn,A=b.id3Fn,F=b.captionsFn,H=b.isEndOfTimeline,L=b.endedTimelineFn,I=b.dataFn,N=b.triggerSegmentEventFn,T=[];b=Cq({activeXhrs:T,decryptionWorker:b.decryptionWorker,trackInfoFn:t,timingInfoFn:x,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:z,id3Fn:A,captionsFn:F,isEndOfTimeline:H,endedTimelineFn:L,dataFn:I,doneFn:b.doneFn,onTransmuxerLog:b.onTransmuxerLog,triggerSegmentEventFn:N}); 1110if(h.key&&!h.key.bytes){var fa=[h.key];h.map&&!h.map.bytes&&h.map.key&&h.map.key.resolvedUri===h.key.resolvedUri&&fa.push(h.map.key);var X=Ba(f,{uri:h.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"});fa=pm(h,fa,b,N);N({type:"segmentkeyloadstart",segment:h,keyInfo:{uri:h.key.resolvedUri}});X=d(X,fa);T.push(X)}h.map&&!h.map.bytes&&(!h.map.key||h.key&&h.key.resolvedUri===h.map.key.resolvedUri||(X=Ba(f,{uri:h.map.key.resolvedUri,responseType:"arraybuffer",requestType:"segment-key"}), 1111fa=pm(h,[h.map.key],b,N),N({type:"segmentkeyloadstart",segment:h,keyInfo:{uri:h.map.key.resolvedUri}}),X=d(X,fa),T.push(X)),X=Ba(f,{uri:h.map.resolvedUri,responseType:"arraybuffer",headers:di(h.map),requestType:"segment-media-initialization"}),fa=yq({segment:h,finishProcessingFn:b,triggerSegmentEventFn:N}),N({type:"segmentloadstart",segment:h}),X=d(X,fa),T.push(X));f=Ba(f,{uri:h.part&&h.part.resolvedUri||h.resolvedUri,responseType:"arraybuffer",headers:di(h),requestType:"segment"});b=zq({segment:h, 1112finishProcessingFn:b,responseType:f.responseType,triggerSegmentEventFn:N});N({type:"segmentloadstart",segment:h});d=d(f,b);d.addEventListener("progress",Eq({segment:h,progressFn:p,trackInfoFn:t,timingInfoFn:x,videoSegmentTimingInfoFn:u,audioSegmentTimingInfoFn:z,id3Fn:A,captionsFn:F,isEndOfTimeline:H,endedTimelineFn:L,dataFn:I}));T.push(d);var ra={};T.forEach(function(ca){ca.addEventListener("loadend",Dq({loadendState:ra,abortFn:m}))});return function(){return vi(T)}},Gq=ac("CodecUtils"),tm=function(b, 1113d){d=d.attributes||{};return b&&b.mediaGroups&&b.mediaGroups.AUDIO&&d.AUDIO&&b.mediaGroups.AUDIO[d.AUDIO]},Dg=function(b){var d={};b.forEach(function(f){var h=f.mediaType,m=f.type;f=f.details;d[h]=d[h]||[];d[h].push(Ak(""+m+f))});Object.keys(d).forEach(function(f){1<d[f].length?(Gq("multiple "+f+" codecs found as attributes: "+d[f].join(", ")+". Setting playlist codecs to null so that we wait for mux.js to probe segments for real codecs."),d[f]=null):d[f]=d[f][0]});return d},um=function(b){var d= 11140;b.audio&&d++;b.video&&d++;return d},ef=function(b,d){var f=d.attributes||{};var h=d.attributes||{};h=h.CODECS?tc(h.CODECS):void 0;h=Dg(h||[]);if(tm(b,d)&&!h.audio){a:if(tm(b,d)){d=b.mediaGroups.AUDIO[(d.attributes||{}).AUDIO];for(m in d)if(!d[m].uri&&!d[m].playlists){var m=!0;break a}m=!1}else m=!0;m||(b=Dg(jo(b,f.AUDIO)||[]),b.audio&&(h.audio=b.audio))}return h},Eg=ac("PlaylistSelector"),vm=function(b){if(b&&b.playlist){var d=b.playlist;return JSON.stringify({id:d.id,bandwidth:b.bandwidth,width:b.width, 1115height:b.height,codecs:d.attributes&&d.attributes.CODECS||""})}},Fg=function(b,d){return b?(b=window.getComputedStyle(b))?b[d]:"":""},je=function(b,d){var f=b.slice();b.sort(function(h,m){var p=d(h,m);return 0===p?f.indexOf(h)-f.indexOf(m):p})},xi=function(b,d){if(b.attributes.BANDWIDTH)var f=b.attributes.BANDWIDTH;f=f||window.Number.MAX_VALUE;if(d.attributes.BANDWIDTH)var h=d.attributes.BANDWIDTH;h=h||window.Number.MAX_VALUE;return f-h},wm=function(b,d,f,h,m,p){if(b){var t={bandwidth:d,width:f,height:h, 1116limitRenditionByPlayerDimensions:m},x=b.playlists;Nb.isAudioOnly(b)&&(x=p.getAudioTrackPlaylists_(),t.audioOnly=!0);var u=x.map(function(I){var N=I.attributes&&I.attributes.RESOLUTION&&I.attributes.RESOLUTION.width,T=I.attributes&&I.attributes.RESOLUTION&&I.attributes.RESOLUTION.height;var fa=(fa=I.attributes&&I.attributes.BANDWIDTH)||window.Number.MAX_VALUE;return{bandwidth:fa,width:N,height:T,playlist:I}});je(u,function(I,N){return I.bandwidth-N.bandwidth});u=u.filter(function(I){return!Nb.isIncompatible(I.playlist)}); 1117b=u.filter(function(I){return Nb.isEnabled(I.playlist)});b.length||(b=u.filter(function(I){return!Nb.isDisabled(I.playlist)}));var z=b.filter(function(I){return I.bandwidth*pb.BANDWIDTH_VARIANCE<d}),A=z[z.length-1];x=z.filter(function(I){return I.bandwidth===A.bandwidth})[0];if(!1===m){var F=x||b[0]||u[0];if(F&&F.playlist){var H="sortedPlaylistReps";x&&(H="bandwidthBestRep");b[0]&&(H="enabledPlaylistReps");Eg("choosing "+vm(F)+" using "+H+" with options",t);return F.playlist}Eg("could not choose a playlist with options", 1118t);return null}z=z.filter(function(I){return I.width&&I.height});je(z,function(I,N){return I.width-N.width});m=z.filter(function(I){return I.width===f&&I.height===h});A=m[m.length-1];m=m.filter(function(I){return I.bandwidth===A.bandwidth})[0];if(!m){var L=z.filter(function(I){return I.width>f||I.height>h});F=L.filter(function(I){return I.width===L[0].width&&I.height===L[0].height});A=F[F.length-1];F=F.filter(function(I){return I.bandwidth===A.bandwidth})[0]}p.leastPixelDiffSelector&&(H=z.map(function(I){I.pixelDiff= 1119Math.abs(I.width-f)+Math.abs(I.height-h);return I}),je(H,function(I,N){return I.pixelDiff===N.pixelDiff?N.bandwidth-I.bandwidth:I.pixelDiff-N.pixelDiff}),H=H[0]);if((p=H||F||m||x||b[0]||u[0])&&p.playlist)return u="sortedPlaylistReps",H?u="leastPixelDiffRep":F?u="resolutionPlusOneRep":m?u="resolutionBestRep":x?u="bandwidthBestRep":b[0]&&(u="enabledPlaylistReps"),Eg("choosing "+vm(p)+" using "+u+" with options",t),p.playlist;Eg("could not choose a playlist with options",t);return null}},xm=function(){var b= 1120this.useDevicePixelRatio?window.devicePixelRatio||1:1;isNaN(this.customPixelRatio)||(b=this.customPixelRatio);return wm(this.playlists.main,this.systemBandwidth,parseInt(Fg(this.tech_.el(),"width"),10)*b,parseInt(Fg(this.tech_.el(),"height"),10)*b,this.limitRenditionByPlayerDimensions,this.playlistController_)},Hq=function(b){var d=b.currentTime,f=b.bandwidth,h=b.duration,m=b.segmentDuration,p=b.timeUntilRebuffer,t=b.currentTimeline,x=b.syncController;b=b.main.playlists.filter(function(z){return!Nb.isIncompatible(z)}); 1121var u=b.filter(Nb.isEnabled);u.length||(u=b.filter(function(z){return!Nb.isDisabled(z)}));b=u.filter(Nb.hasAttribute.bind(null,"BANDWIDTH")).map(function(z){var A=x.getSyncPoint(z,h,t,d)?1:2;A=Nb.estimateSegmentRequestTime(m,f,z)*A-p;return{playlist:z,rebufferingImpact:A}});u=b.filter(function(z){return 0>=z.rebufferingImpact});je(u,function(z,A){return xi(A.playlist,z.playlist)});if(u.length)return u[0];je(b,function(z,A){return z.rebufferingImpact-A.rebufferingImpact});return b[0]||null},Iq=function(b){var d= 11220;if(b.bytes){var f=new Uint8Array(b.bytes);
1122b.segments.forEach(function(h){f.set(h,d);d+=h.byteLength})}return f},Jq=function(b){var d=b.inbandTextTracks,f=b.captionArray,h=b.timestampOffset;if(f){var m=window.WebKitDataCue||window.VTTCue;f.forEach(function(p){var t=p.stream;p.content?p.content.forEach(function(x){var u=new m(p.startTime+h,p.endTime+h,x.text);u.line=x.line;u.align="left";u.position=x.position;u.positionAlign="line-left";d[t].addCue(u)}):d[t].addCue(new m(p.startTime+h,p.endTime+h, 1123p.text))})}},Kq=function(b){Object.defineProperties(b.frame,{id:{get:function(){O.log.warn("cue.frame.id is deprecated. Use cue.value.key instead.");return b.value.key}},value:{get:function(){O.log.warn("cue.frame.value is deprecated. Use cue.value.data instead.");return b.value.data}},privateData:{get:function(){O.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead.");return b.value.data}}})},Lq=function(b){var d=b.metadataArray,f=b.timestampOffset,h=b.videoDuration;if(d){var m= 1124window.WebKitDataCue||window.VTTCue,p=b.inbandTextTracks.metadataTrack_;if(p&&(d.forEach(function(z){var A=z.cueTime+f;!("number"!==typeof A||window.isNaN(A)||0>A)&&Infinity>A&&z.frames&&z.frames.length&&z.frames.forEach(function(F){var H=new m(A,A,F.value||F.url||F.data||"");H.frame=F;H.value=F;Kq(H);p.addCue(H)})}),p.cues&&p.cues.length)){b=p.cues;d=[];for(var t=0;t<b.length;t++)b[t]&&d.push(b[t]);var x=d.reduce(function(z,A){var F=z[A.startTime]||[];F.push(A);z[A.startTime]=F;return z},{}),u=Object.keys(x).sort(function(z, 1125A){return Number(z)-Number(A)});u.forEach(function(z,A){var F=x[z];z=isFinite(h)?h:z;var H=Number(u[A+1])||z;F.forEach(function(L){L.endTime=H})})}}},Mq={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"},Nq=new Set("id class startDate duration endDate endOnNext startTime endTime processDateRange".split(" ")),Oq=function(b){var d=b.inbandTextTracks.metadataTrack_; 1126if(d){var f=window.WebKitDataCue||window.VTTCue;
1126b.dateRanges.forEach(function(h){for(var m=$jscomp.makeIterator(Object.keys(h)),p=m.next();!p.done;p=m.next())if(p=p.value,!Nq.has(p)){var t=new f(h.startTime,h.endTime,"");t.id=h.id;t.type="com.apple.quicktime.HLS";t.value={key:Mq[p],data:h[p]};if("scte35Out"===p||"scte35In"===p)t.value.data=(new Uint8Array(t.value.data.match(/[\da-f]{2}/gi))).buffer;d.addCue(t)}h.processDateRange()})}},ym=function(b,d,f){b.metadataTrack_||(b.metadataTrack_=f.addRemoteTextTrack({kind:"metadata", 1127label:"Timed Metadata"},!1).track,O.browser.IS_ANY_SAFARI||(b.metadataTrack_.inBandMetadataTrackDispatchType=d))},ff=function(b,d,f){var h;if(f&&f.cues)for(h=f.cues.length;h--;){var m=f.cues[h];m.startTime>=b&&m.endTime<=d&&f.removeCue(m)}},Pq=function(b){var d=b.cues;if(d)for(var f={},h=d.length-1;0<=h;h--){var m=d[h],p=m.startTime+"-"+m.endTime+"-"+m.text;f[p]?b.removeCue(m):f[p]=m}},Qq=function(b,d,f,h){d=Math.ceil(9E4*(d-h));var m=Math.ceil(9E4*(f-h));f=b.slice();for(h=b.length;h--&&!(b[h].pts<= 1128m););if(-1===h)return f;for(m=h+1;m--&&!(b[m].pts<=d););m=Math.max(m,0);f.splice(m,h-m+1);return f},Rq=function(b,d){if(!b&&!d||!b&&d||b&&!d)return!1;if(b===d)return!0;var f=Object.keys(b).sort(),h=Object.keys(d).sort();if(f.length!==h.length)return!1;for(var m=0;m<f.length;m++){var p=f[m];if(p!==h[m]||b[p]!==d[p])return!1}return!0},Gg=1/60,ke=function(b){var d=b.startOfSegment,f=b.duration,h=b.segment,m=b.part,p=b.playlist,t=p.mediaSequence,x=b.mediaIndex,u=b.partIndex,z=b.timeline;p=(void 0===p.segments? 1129[]:p.segments).length-1;var A="mediaIndex/partIndex increment";b.getMediaInfoForTime?A="getMediaInfoForTime ("+b.getMediaInfoForTime+")":b.isSyncRequest&&(A="getSyncSegmentCandidate (isSyncRequest)");b.independent&&(A+=" with independent "+b.independent);var F=(b="number"===typeof u)?hl({preloadSegment:h})-1:0;return"QVC AEM Commerce Package - Designs Non Transactional ["+(t+x)+"/"+(t+p)+"]"+(b?" part ["+u+"/"+F+"]":"")+(" segment start/end ["+h.start+" \x3d\x3e "+h.end+"]")+(b?" part start/end ["+ 1130m.start+" \x3d\x3e "+m.end+"]":"")+(" startOfSegment ["+d+"] duration [")+(f+"] timeline [")+(z+"] selected by [")+(A+"] playlist [com.qvc.commerce.cpm:designs-non-transactional:content-package:26.09.7]")},yi=function(b){var d=b.timelineChangeController,f=b.segmentTimeline,h=b.loaderType,m=b.audioDisabled;return b.currentTimeline===f?!1:"audio"===h?(b=d.lastTimelineChange({type:"main"}),!b||b.to!==f):"main"===h&&m?(b=d.pendingTimelineChange({type:"audio"}))&&b.to===f?!1:!0:!1},$c=function(b){var d= 1131b.pendingSegment_;if(d){if(d=yi({timelineChangeController:b.timelineChangeController_,currentTimeline:b.currentTimeline_,segmentTimeline:d.timeline,loaderType:b.loaderType_,audioDisabled:b.audioDisabled_})){var f=b.timelineChangeController_;if(f){d=f.pendingTimelineChange({type:"audio"});f=f.pendingTimelineChange({type:"main"});var h=d&&f,m=h&&d.to!==f.to;d=h&&-1!==d.from&&-1!==f.from&&m?!0:!1}else d=!1}d&&(d=b.timelineChangeController_.pendingTimelineChange({type:"audio"}),f=b.timelineChangeController_.pendingTimelineChange({type:"main"}), 1132d&&f&&d.to<f.to?b.timelineChangeController_.trigger("audioTimelineBehind"):b&&(b.pause(),b.resetEverything(),b.load()))}},Sq=function(b){var d=0;["video","audio"].forEach(function(f){var h=b[f+"TimingInfo"];if(h){f=h.start;h=h.end;var m;"bigint"===typeof f||"bigint"===typeof h?m=window.BigInt(h)-window.BigInt(f):"number"===typeof f&&"number"===typeof h&&(m=h-f);"undefined"!==typeof m&&m>d&&(d=m)}});"bigint"===typeof d&&d<Number.MAX_SAFE_INTEGER&&(d=Number(d));return d},zm=function(b){var d=b.segmentDuration; 1133return d?Math.round(d)>b.maxDuration+uc:!1},xd=function(b){var d=b.segment;if(d)return{type:b.type||d.type,uri:d.resolvedUri||d.uri,start:void 0===d.startOfSegment?d.start:d.startOfSegment,duration:d.duration,isEncrypted:!!(d.key||d.map&&d.map.ke),isMediaInitialization:!(!d.map||d.map.bytes)}},ba=function(b,d){var f=O.EventTarget.call(this)||this;if(!b)throw new TypeError("Initialization settings are required");if("function"!==typeof b.currentTime)throw new TypeError("No currentTime getter specified"); 1134if(!b.mediaSource)throw new TypeError("No MediaSource specified");f.bandwidth=b.bandwidth;f.throughput={rate:0,count:0};f.roundTrip=NaN;f.resetStats_();f.mediaIndex=null;f.partIndex=null;f.hasPlayed_=b.hasPlayed;f.currentTime_=b.currentTime;f.seekable_=b.seekable;f.seeking_=b.seeking;f.duration_=b.duration;f.mediaSource_=b.mediaSource;f.vhs_=b.vhs;f.loaderType_=b.loaderType;f.currentMediaInfo_=void 0;f.startingMediaInfo_=void 0;f.segmentMetadataTrack_=b.segmentMetadataTrack;f.goalBufferLength_=b.goalBufferLength; 1135f.sourceType_=b.sourceType;f.sourceUpdater_=b.sourceUpdater;f.inbandTextTracks_=b.inbandTextTracks;f.state_="INIT";f.timelineChangeController_=b.timelineChangeController;f.shouldSaveSegmentTimingInfo_=!0;f.parse708captions_=b.parse708captions;f.useDtsForTimestampOffset_=b.useDtsForTimestampOffset;f.captionServices_=b.captionServices;f.exactManifestTimings=b.exactManifestTimings;f.addMetadataToTextTrack=b.addMetadataToTextTrack;f.checkBufferTimeout_=null;f.error_=void 0;f.currentTimeline_=-1;f.shouldForceTimestampOffsetAfterResync_= 1136!1;f.pendingSegment_=null;f.xhrOptions_=null;f.pendingSegments_=[];f.audioDisabled_=!1;f.isPendingTimestampOffset_=!1;f.gopBuffer_=[];f.timeMapping_=0;f.safeAppend_=!1;f.appendInitSegment_={audio:!0,video:!0};f.playlistOfLastInitSegment_={audio:null,video:null};f.callQueue_=[];f.loadQueue_=[];f.metadataQueue_={id3:[],caption:[]};f.waitingOnRemove_=!1;f.quotaExceededErrorRetryTimeout_=null;f.activeInitSegmentId_=null;f.initSegments_={};f.cacheEncryptionKeys_=b.cacheEncryptionKeys;f.keyCache_={};f.decrypter_= 1137b.decrypter;f.syncController_=b.syncController;f.syncPoint_={segmentIndex:0,time:0};f.transmuxer_=f.createTransmuxer_();f.triggerSyncInfoUpdate_=function(){return f.trigger("syncinfoupdate")};f.syncController_.on("syncinfoupdate",f.triggerSyncInfoUpdate_);f.mediaSource_.addEventListener("sourceopen",function(){f.isEndOfStream_
1137()||(f.ended_=!1)});f.fetchAtBuffer_=!1;f.logger_=ac("SegmentLoader["+f.loaderType_+"]");Object.defineProperty(f,"state",{get:function(){return this.state_},set:function(h){h!== 1138this.state_&&(this.logger_(this.state_+" -\x3e "+h),this.state_=h,this.trigger("statechange"))}});f.sourceUpdater_.on("ready",function(){f.hasEnoughInfoToAppend_()?f.processCallQueue_():$c(f)});f.sourceUpdater_.on("codecschange",function(h){f.trigger(jb({type:"codecschange"},h))});if("main"===f.loaderType_)f.timelineChangeController_.on("pendingtimelinechange",function(){f.hasEnoughInfoToAppend_()?f.processCallQueue_():$c(f)});if("audio"===f.loaderType_)f.timelineChangeController_.on("timelinechange", 1139function(h){f.trigger(jb({type:"timelinechange"},h));f.hasEnoughInfoToLoad_()?f.processLoadQueue_():$c(f);f.hasEnoughInfoToAppend_()?f.processCallQueue_():$c(f)});return f};$jscomp.inherits(ba,O.EventTarget);ba.prototype.createTransmuxer_=function(){return ui.createTransmuxer({remux:!1,alignGopsAtEnd:this.safeAppend_,keepOriginalTimestamps:!0,parse708captions:this.parse708captions_,captionServices:this.captionServices_})};ba.prototype.resetStats_=function(){this.mediaAppends=this.mediaSecondsLoaded= 1140this.mediaTransferDuration=this.mediaRequestsErrored=this.mediaRequestsTimedout=this.mediaRequestsAborted=this.mediaRequests=this.mediaBytesTransferred=0};ba.prototype.dispose=function(){this.trigger("dispose");this.state="DISPOSED";this.pause();this.abort_();this.transmuxer_&&this.transmuxer_.terminate();this.resetStats_();this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_);this.syncController_&&this.triggerSyncInfoUpdate_&&this.syncController_.off("syncinfoupdate",this.triggerSyncInfoUpdate_); 1141this.off()};ba.prototype.setAudio=function(b){this.audioDisabled_=!b;b?this.appendInitSegment_.audio=!0:this.sourceUpdater_.removeAudio(0,this.duration_())};ba.prototype.abort=function(){"WAITING"!==this.state?this.pendingSegment_&&(this.pendingSegment_=null):(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_())};ba.prototype.abort_=function(){this.pendingSegment_&&this.pendingSegment_.abortRequests&&this.pendingSegment_.abortRequests();this.pendingSegment_=null;this.callQueue_= 1142[];this.loadQueue_=[];this.metadataQueue_.id3=[];this.metadataQueue_.caption=[];this.timelineChangeController_.clearPendingTimelineChange(this.loaderType_);this.waitingOnRemove_=!1;window.clearTimeout(this.quotaExceededErrorRetryTimeout_);this.quotaExceededErrorRetryTimeout_=null};ba.prototype.checkForAbort_=function(b){return"APPENDING"!==this.state||this.pendingSegment_?this.pendingSegment_&&this.pendingSegment_.requestId===b?!1:!0:(this.state="READY",!0)};ba.prototype.error=function(b){"undefined"!== 1143typeof b&&(this.logger_("error occurred:",b),this.error_=b);this.pendingSegment_=null;return this.error_};ba.prototype.endOfStream=function(){this.ended_=!0;this.transmuxer_&&ui.reset(this.transmuxer_);this.gopBuffer_.length=0;this.pause();this.trigger("ended")};ba.prototype.buffered_=function(){var b=this.getMediaInfo_();if(!this.sourceUpdater_||!b)return nb();if("main"===this.loaderType_){var d=b.hasAudio,f=b.hasVideo;b=b.isMuxed;if(f&&d&&!this.audioDisabled_&&!b)return this.sourceUpdater_.buffered(); 1144if(f)return this.sourceUpdater_.videoBuffered()}return this.sourceUpdater_.audioBuffered()};ba.prototype.initSegmentForMap=function(b,d){d=void 0===d?!1:d;if(!b)return null;var f=mg(b),h=this.initSegments_[f];d&&!h&&b.bytes&&(this.initSegments_[f]=h={resolvedUri:b.resolvedUri,byterange:b.byterange,bytes:b.bytes,tracks:b.tracks,timescales:b.timescales});return h||b};ba.prototype.segmentKey=function(b,d){if(!b)return null;var f=b.resolvedUri,h=this.keyCache_[f];this.cacheEncryptionKeys_&&(void 0=== 1145d?0:d)&&!h&&b.bytes&&(this.keyCache_[f]=h={resolvedUri:b.resolvedUri,bytes:b.bytes});b={resolvedUri:(h||b).resolvedUri};h&&(b.bytes=h.bytes);return b};ba.prototype.couldBeginLoading_=function(){return this.playlist_&&!this.paused()};ba.prototype.load=function(){this.monitorBuffer_();if(this.playlist_){if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();!this.couldBeginLoading_()||"READY"!==this.state&&"INIT"!==this.state||(this.state="READY")}};ba.prototype.init_=function(){this.state= 1146"READY";this.resetEverything();return this.monitorBuffer_()};ba.prototype.playlist=function(b,d){d=void 0===d?{}:d;if(b){var f=this.playlist_,h=this.pendingSegment_;this.playlist_=b;this.xhrOptions_=d;"INIT"===this.state&&(b.syncInfo={mediaSequence:b.mediaSequence,time:0},"main"===this.loaderType_&&this.syncController_.setDateTimeMappingForStart(b));d=null;f&&(f.id?d=f.id:f.uri&&(d=f.uri));
1146this.logger_("playlist update ["+d+" \x3d\x3e "+(b.id||b.uri)+"]");this.mediaSequenceSync_&&(this.mediaSequenceSync_.update(b, 1147this.currentTime_()),this.logger_("Playlist update:\ncurrentTime: "+this.currentTime_()+"\nbufferedEnd: "+Uh(this.buffered_())+"\n",this.mediaSequenceSync_.diagnostics));this.trigger("syncinfoupdate");if("INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(f&&f.uri===b.uri){d=b.mediaSequence-f.mediaSequence;this.logger_("live window shift ["+d+"]");if(null!==this.mediaIndex)if(this.mediaIndex-=d,0>this.mediaIndex)this.partIndex=this.mediaIndex=null;else{var m=this.playlist_.segments[this.mediaIndex]; 1148!this.partIndex||m.parts&&m.parts.length&&m.parts[this.partIndex]||(m=this.mediaIndex,this.logger_("currently processing part (index "+this.partIndex+") no longer exists."),this.resetLoader(),this.mediaIndex=m)}h&&(h.mediaIndex-=d,0>h.mediaIndex?(h.mediaIndex=null,h.partIndex=null):(0<=h.mediaIndex&&(h.segment=b.segments[h.mediaIndex]),0<=h.partIndex&&h.segment.parts&&(h.part=h.segment.parts[h.partIndex])));this.syncController_.saveExpiredSegmentInfo(f,b)}else null!==this.mediaIndex&&(b.endList|| 1149"number"!==typeof b.partTargetDuration?this.resyncLoader():this.resetLoader()),this.currentMediaInfo_=void 0,this.trigger("playlistupdate")}};ba.prototype.pause=function(){this.checkBufferTimeout_&&(window.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)};ba.prototype.paused=function(){return null===this.checkBufferTimeout_};ba.prototype.resetEverything=function(b){this.ended_=!1;this.activeInitSegmentId_=null;this.appendInitSegment_={audio:!0,video:!0};this.resetLoader();this.remove(0, 1150Infinity,b);this.transmuxer_&&(this.transmuxer_.postMessage({action:"clearAllMp4Captions"}),this.transmuxer_.postMessage({action:"reset"}))};ba.prototype.resetLoader=function(){this.fetchAtBuffer_=!1;this.mediaSequenceSync_&&this.mediaSequenceSync_.resetAppendedStatus();this.resyncLoader()};ba.prototype.resyncLoader=function(){this.transmuxer_&&ui.reset(this.transmuxer_);this.syncPoint_=this.partIndex=this.mediaIndex=null;this.isPendingTimestampOffset_=!1;var b=this.currentMediaInfo_&&this.currentMediaInfo_.isFmp4; 1151"hls"!==this.sourceType_||b||(this.shouldForceTimestampOffsetAfterResync_=!0);this.callQueue_=[];this.loadQueue_=[];this.metadataQueue_.id3=[];this.metadataQueue_.caption=[];this.abort();this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})};ba.prototype.remove=function(b,d,f,h){f=void 0===f?function(){}:f;h=void 0===h?!1:h;Infinity===d&&(d=this.duration_());if(d<=b)this.logger_("skipping remove because end ${end} is \x3c\x3d start ${start}");else if(this.sourceUpdater_&& 1152this.getMediaInfo_()){var m=1,p=function(){m--;0===m&&f()};if(h||!this.audioDisabled_)m++,this.sourceUpdater_.removeAudio(b,d,p);if(h||"main"===this.loaderType_)this.gopBuffer_=Qq(this.gopBuffer_,b,d,this.timeMapping_),m++,this.sourceUpdater_.removeVideo(b,d,p);for(var t in this.inbandTextTracks_)ff(b,d,this.inbandTextTracks_[t]);ff(b,d,this.segmentMetadataTrack_);p()}else this.logger_("skipping remove because no source updater or starting media info")};ba.prototype.monitorBuffer_=function(){this.checkBufferTimeout_&& 1153window.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),1)};ba.prototype.monitorBufferTick_=function(){"READY"===this.state&&this.fillBuffer_();this.checkBufferTimeout_&&window.clearTimeout(this.checkBufferTimeout_);this.checkBufferTimeout_=window.setTimeout(this.monitorBufferTick_.bind(this),500)};ba.prototype.fillBuffer_=function(){if(!this.sourceUpdater_.updating()){var b=this.chooseNextRequest_();if(b){var d={segmentInfo:xd({type:this.loaderType_, 1154segment:b})};this.trigger({type:"segmentselected",metadata:d});"number"===typeof b.timestampOffset&&(this.isPendingTimestampOffset_=!1,this.timelineChangeController_.pendingTimelineChange({type:this.loaderType_,from:this.currentTimeline_,to:b.timeline}));this.loadSegment_(b)}}};ba.prototype.isEndOfStream_=function(b,d,f){b=void 0===b?this.mediaIndex:b;d=void 0===d?this.playlist_:d;f=void 0===f?this.partIndex:f;
1154if(!d||!this.mediaSource_)return!1;var h="number"===typeof b&&d.segments[b];b=b+1===d.segments.length; 1155f=!h||!h.parts||f+1===h.parts.length;return d.endList&&"open"===this.mediaSource_.readyState&&b&&f};ba.prototype.chooseNextRequest_=function(){var b=this.buffered_(),d=Uh(b)||0,f=Vh(b,this.currentTime_()),h=!this.hasPlayed_()&&1<=f,m=f>=this.goalBufferLength_();b=this.playlist_.segments;if(!b.length||h||m)return null;this.syncPoint_=this.syncPoint_||this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_(),this.loaderType_);h={partIndex:null,mediaIndex:null, 1156startOfSegment:null,playlist:this.playlist_,isSyncRequest:!this.syncPoint_};if(h.isSyncRequest){a:{m=this.currentTimeline_;var p=b||[];for(var t=[],x=0,u=0;u<p.length;u++){var z=p[u];if(m===z.timeline&&(t.push(u),x+=z.duration,x>d)){d=u;break a}}d=0===t.length?0:t[t.length-1]}h.mediaIndex=d;this.logger_("choose next request. Can not find sync point. Fallback to media Index: "+h.mediaIndex)}else if(null!==this.mediaIndex)m=b[this.mediaIndex],p="number"===typeof this.partIndex?this.partIndex:-1,h.startOfSegment= 1157m.end?m.end:d,m.parts&&m.parts[p+1]?(h.mediaIndex=this.mediaIndex,h.partIndex=p+1):h.mediaIndex=this.mediaIndex+1;else{m=this.fetchAtBuffer_?d:this.currentTime_();this.mediaSequenceSync_&&this.logger_("chooseNextRequest_ request after Quality Switch:\nFor TargetTime: "+m+".\nCurrentTime: "+this.currentTime_()+"\nBufferedEnd: "+d+"\nFetch At Buffer: "+this.fetchAtBuffer_+"\n",this.mediaSequenceSync_.diagnostics);if(this.mediaSequenceSync_&&this.mediaSequenceSync_.isReliable){t=this.getSyncInfoFromMediaSequenceSync_(m); 1158if(!t)return this.error({message:"No sync info found while using media sequence sync",metadata:{errorType:O.Error.StreamingFailedToSelectNextSegment,error:Error("No sync info found while using media sequence sync")}}),this.logger_("chooseNextRequest_ - no sync info found using media sequence sync"),null;this.logger_("chooseNextRequest_ mediaSequence syncInfo ("+t.start+" --\x3e "+t.end+")");d=t.segmentIndex;p=t.partIndex;t=t.start}else this.logger_("chooseNextRequest_ - fallback to a regular segment selection algorithm, based on a syncPoint."), 1159t=Nb.getMediaInfoForTime({exactManifestTimings:this.exactManifestTimings,playlist:this.playlist_,currentTime:m,startingPartIndex:this.syncPoint_.partIndex,startingSegmentIndex:this.syncPoint_.segmentIndex,startTime:this.syncPoint_.time}),d=t.segmentIndex,p=t.partIndex,t=t.startTime;h.getMediaInfoForTime=this.fetchAtBuffer_?"bufferedEnd "+m:"currentTime "+m;h.mediaIndex=d;h.startOfSegment=t;h.partIndex=p;this.logger_("choose next request. Playlist switched and we have a sync point. Media Index: "+ 1160h.mediaIndex+" ")}m=(d=b[h.mediaIndex])&&"number"===typeof h.partIndex&&d.parts&&d.parts[h.partIndex];if(!d||"number"===typeof h.partIndex&&!m)return null;"number"!==typeof h.partIndex&&d.parts&&(h.partIndex=0,m=d.parts[0]);p=this.vhs_.playlists&&this.vhs_.playlists.main&&this.vhs_.playlists.main.independentSegments||this.playlist_.independentSegments;f||!m||p||m.independent||(0===h.partIndex?(f=b[h.mediaIndex-1],(d=f.parts&&f.parts.length&&f.parts[f.parts.length-1])&&d.independent&&(--h.mediaIndex, 1161h.partIndex=f.parts.length-1,h.independent="previous segment")):d.parts[h.partIndex-1].independent&&(--h.partIndex,h.independent="previous part"));f=this.mediaSource_&&"ended"===this.mediaSource_.readyState;if(h.mediaIndex>=b.length-1&&f&&!this.seeking_())return null;this.shouldForceTimestampOffsetAfterResync_&&(this.shouldForceTimestampOffsetAfterResync_=!1,h.forceTimestampOffset=!0,this.logger_("choose next request. Force timestamp offset after loader resync"));return this.generateSegmentInfo_(h)}; 1162ba.prototype.getSyncInfoFromMediaSequenceSync_=function(b){if(!this.mediaSequenceSync_)return null;var d=Math.max(b,this.mediaSequenceSync_.start);b!==d&&this.logger_("getSyncInfoFromMediaSequenceSync_. Pulled target time from "+b+" to "+d);b=this.mediaSequenceSync_.getSyncInfoForTime(d);if(!b)return null;if(!b.isAppended)return b;
1162b=this.mediaSequenceSync_.getSyncInfoForTime(b.end);if(!b)return null;b.isAppended&&this.logger_("getSyncInfoFromMediaSequenceSync_: We encounter unexpected scenario where next media sequence sync info is also appended!"); 1163return b};ba.prototype.generateSegmentInfo_=function(b){var d=b.playlist,f=b.mediaIndex,h=b.startOfSegment,m=b.partIndex,p=b.forceTimestampOffset,t=d.segments[f],x="number"===typeof m&&t.parts[m];b={requestId:"segment-loader-"+Math.random(),uri:x&&x.resolvedUri||t.resolvedUri,mediaIndex:f,partIndex:x?m:null,isSyncRequest:b.isSyncRequest,startOfSegment:h,playlist:d,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:t.timeline,duration:x&&x.duration||t.duration,segment:t,part:x,byteLength:0, 1164transmuxer:this.transmuxer_,getMediaInfoForTime:b.getMediaInfoForTime,independent:b.independent};p="undefined"!==typeof p?p:this.isPendingTimestampOffset_;b.timestampOffset=this.timestampOffsetForSegment_({segmentTimeline:t.timeline,currentTimeline:this.currentTimeline_,startOfSegment:h,buffered:this.buffered_(),overrideCheck:p});h=Uh(this.sourceUpdater_.audioBuffered());"number"===typeof h&&(b.audioAppendStart=h-this.sourceUpdater_.audioTimestampOffset());if(this.sourceUpdater_.videoBuffered().length){h= 1165this.gopBuffer_;t=this.currentTime_()-this.sourceUpdater_.videoTimestampOffset();if("undefined"!==typeof t&&null!==t&&h.length){t=Math.ceil(9E4*(t-this.timeMapping_+3));for(p=0;p<h.length&&!(h[p].pts>t);p++);h=h.slice(p)}else h=[];b.gopsToAlignWith=h}return b};ba.prototype.timestampOffsetForSegment_=function(b){var d=b.segmentTimeline,f=b.currentTimeline,h=b.startOfSegment,m=b.buffered;b=b.overrideCheck||d!==f?d<f?h:m.length?m.end(m.length-1):h:null;return b};ba.prototype.earlyAbortWhenNeeded_=function(b){if(!this.vhs_.tech_.paused()&& 1166this.xhrOptions_.timeout&&this.playlist_.attributes.BANDWIDTH&&!(1E3>Date.now()-(b.firstBytesReceivedAt||Date.now()))){var d=this.currentTime_(),f=b.bandwidth,h=this.pendingSegment_.duration;b=Nb.estimateSegmentRequestTime(h,f,this.playlist_,b.bytesReceived);var m=this.buffered_(),p=this.vhs_.tech_.playbackRate();p=void 0===p?1:p;m=((m.length?m.end(m.length-1):0)-d)/p-1;b<=m||!(d=Hq({main:this.vhs_.playlists.main,currentTime:d,bandwidth:f,duration:this.duration_(),segmentDuration:h,timeUntilRebuffer:m, 1167currentTimeline:this.currentTimeline_,syncController:this.syncController_}))||(f=b-m-d.rebufferingImpact,h=.5,m<=uc&&(h=1),!d.playlist||d.playlist.uri===this.playlist_.uri||f<h||(this.bandwidth=d.playlist.attributes.BANDWIDTH*pb.BANDWIDTH_VARIANCE+1,this.trigger("earlyabort")))}};ba.prototype.handleAbort_=function(b){this.logger_("Aborting "+ke(b));this.mediaRequestsAborted+=1};ba.prototype.handleProgress_=function(b,d){this.earlyAbortWhenNeeded_(d.stats);this.checkForAbort_(d.requestId)||this.trigger("progress")}; 1168ba.prototype.handleTrackInfo_=function(b,d){var f=d,h=f.hasAudio;f=f.hasVideo;h={segmentInfo:xd({type:this.loaderType_,segment:b}),trackInfo:{hasAudio:h,hasVideo:f}};this.trigger({type:"segmenttransmuxingtrackinfoavailable",metadata:h});this.earlyAbortWhenNeeded_(b.stats);this.checkForAbort_(b.requestId)||this.checkForIllegalMediaSwitch(d)||(d=d||{},Rq(this.currentMediaInfo_,d)||(this.appendInitSegment_={audio:!0,video:!0},this.currentMediaInfo_=this.startingMediaInfo_=d,this.logger_("trackinfo update", 1169d),this.trigger("trackinfo")),this.checkForAbort_(b.requestId)||(this.pendingSegment_.trackInfo=d,this.hasEnoughInfoToAppend_()?this.processCallQueue_():$c(this)))};ba.prototype.handleTimingInfo_=function(b,d,f,h){this.earlyAbortWhenNeeded_(b.stats);if(!this.checkForAbort_(b.requestId)){b=this.pendingSegment_;var m=d+"TimingInfo";b[m]=b[m]||{};b[m][f]=h;this.logger_("timinginfo: "+d+" - "+f+" - "+h);this.hasEnoughInfoToAppend_()?this.processCallQueue_():$c(this)}};ba.prototype.handleCaptions_=function(b, 1170d){var f=this;this.earlyAbortWhenNeeded_(b.stats);if(!this.checkForAbort_(b.requestId))if(0===d.length)this.logger_("SegmentLoader received no captions from a caption event");else if(this.pendingSegment_.hasAppendedData_){var h=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset(),m={};d.forEach(function(p){m[p.stream]=m[p.stream]||{startTime:Infinity,captions:[],endTime:0};var t=m[p.stream];t.startTime=Math.min(t.startTime, 1171p.startTime+h);t.endTime=Math.max(t.endTime,p.endTime+h);t.captions.push(p)});Object.keys(m).forEach(function(p){var t=m[p],x=t.startTime,u=t.endTime;t=t.captions;var z=f.inbandTextTracks_;f.logger_("adding cues from "+x+" -\x3e "+u+" for "+p);var A=f.vhs_.tech_;if(!z[p]){A.trigger({type:"usage",name:"vhs-608"});var F=p;/^cc708_/.test(p)&&(F="SERVICE"+p.split("_")[1]);var H=A.textTracks().getTrackById(F);if(H)z[p]=H;else{var L=H=p,I=!1,N=(A.options_.vhs&&A.options_.vhs.captionServices||{})[F];N&& 1172(H=N.label,L=N.language,I=N.default);z[p]=A.addRemoteTextTrack({kind:"captions",id:F,default:I,label:H,language:L},!1).track}}ff(x,u,z[p]);Jq({captionArray:t,inbandTextTracks:z,timestampOffset:h})});this.transmuxer_&&this.transmuxer_.postMessage({action:"clearParsedMp4Captions"})}else this.metadataQueue_.caption.push(this.handleCaptions_.bind(this,b,d))};ba.prototype.handleId3_=function(b,d,f){this.earlyAbortWhenNeeded_(b.stats);
1172this.checkForAbort_(b.requestId)||(this.pendingSegment_.hasAppendedData_? 1173this.addMetadataToTextTrack(f,d,this.duration_()):this.metadataQueue_.id3.push(this.handleId3_.bind(this,b,d,f)))};ba.prototype.processMetadataQueue_=function(){this.metadataQueue_.id3.forEach(function(b){return b()});this.metadataQueue_.caption.forEach(function(b){return b()});this.metadataQueue_.id3=[];this.metadataQueue_.caption=[]};ba.prototype.processCallQueue_=function(){var b=this.callQueue_;this.callQueue_=[];b.forEach(function(d){return d()})};ba.prototype.processLoadQueue_=function(){var b= 1174this.loadQueue_;this.loadQueue_=[];b.forEach(function(d){return d()})};ba.prototype.hasEnoughInfoToLoad_=function(){if("audio"!==this.loaderType_)return!0;var b=this.pendingSegment_;return b?this.getCurrentMediaInfo_()?yi({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:b.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})?!1:!0:!0:!1};ba.prototype.getCurrentMediaInfo_=function(b){return(b=void 0===b?this.pendingSegment_: 1175b)&&b.trackInfo||this.currentMediaInfo_};ba.prototype.getMediaInfo_=function(b){b=void 0===b?this.pendingSegment_:b;return this.getCurrentMediaInfo_(b)||this.startingMediaInfo_};ba.prototype.getPendingSegmentPlaylist=function(){return this.pendingSegment_?this.pendingSegment_.playlist:null};ba.prototype.hasEnoughInfoToAppend_=function(){if(!this.sourceUpdater_.ready()||this.waitingOnRemove_||this.quotaExceededErrorRetryTimeout_)return!1;var b=this.pendingSegment_,d=this.getCurrentMediaInfo_();if(!b|| 1176!d)return!1;var f=d.isMuxed;return d.hasVideo&&!b.videoTimingInfo||d.hasAudio&&!this.audioDisabled_&&!f&&!b.audioTimingInfo||yi({timelineChangeController:this.timelineChangeController_,currentTimeline:this.currentTimeline_,segmentTimeline:b.timeline,loaderType:this.loaderType_,audioDisabled:this.audioDisabled_})?!1:!0};ba.prototype.handleData_=function(b,d){this.earlyAbortWhenNeeded_(b.stats);if(!this.checkForAbort_(b.requestId))if(this.callQueue_.length||!this.hasEnoughInfoToAppend_())$c(this),this.callQueue_.push(this.handleData_.bind(this, 1177b,d));else{var f=this.pendingSegment_;this.setTimeMapping_(f.timeline);this.updateMediaSecondsLoaded_(f.part||f.segment);if("closed"!==this.mediaSource_.readyState){b.map&&(b.map=this.initSegmentForMap(b.map,!0),f.segment.map=b.map);b.key&&this.segmentKey(b.key,!0);f.isFmp4=b.isFmp4;f.timingInfo=f.timingInfo||{};if(f.isFmp4)this.trigger("fmp4"),f.timingInfo.start=f[d.type+"TimingInfo"].start;else{b=this.getCurrentMediaInfo_();b="main"===this.loaderType_&&b&&b.hasVideo;if(b)var h=f.videoTimingInfo.start; 1178f.timingInfo.start=this.trueSegmentStart_({currentStart:f.timingInfo.start,playlist:f.playlist,mediaIndex:f.mediaIndex,currentVideoTimestampOffset:this.sourceUpdater_.videoTimestampOffset(),useVideoTimingInfo:b,firstVideoFrameTimeForData:h,videoTimingInfo:f.videoTimingInfo,audioTimingInfo:f.audioTimingInfo})}this.updateAppendInitSegmentStatus(f,d.type);this.updateSourceBufferTimestampOffset_(f);if(f.isSyncRequest){this.updateTimingInfoEnd_(f);this.syncController_.saveSegmentTimingInfo({segmentInfo:f, 1179shouldSaveTimelineMapping:"main"===this.loaderType_});h=this.chooseNextRequest_();if(h.mediaIndex!==f.mediaIndex||h.partIndex!==f.partIndex){this.logger_("sync segment was incorrect, not appending");return}this.logger_("sync segment was correct, appending")}f.hasAppendedData_=!0;this.processMetadataQueue_();this.appendData_(f,d)}}};ba.prototype.updateAppendInitSegmentStatus=function(b,d){"main"!==this.loaderType_||"number"!==typeof b.timestampOffset||b.changedTimestampOffset||(this.appendInitSegment_= 1180{audio:!0,video:!0});this.playlistOfLastInitSegment_[d]!==b.playlist&&(this.appendInitSegment_[d]=!0)};ba.prototype.getInitSegmentAndUpdateState_=function(b){var d=b.type,f=b.initSegment,h=b.map;b=b.playlist;if(h){var m=mg(h);if(this.activeInitSegmentId_===m)return null;f=this.initSegmentForMap(h,!0).bytes;this.activeInitSegmentId_=m}return f&&this.appendInitSegment_[d]?(this.playlistOfLastInitSegment_[d]=b,this.appendInitSegment_[d]=!1,this.activeInitSegmentId_=null,f):null};ba.prototype.handleQuotaExceededError_= 1181function(b,d){var f=this;d=b.segmentInfo;var h=b.type;b=b.bytes;
1181var m=this.sourceUpdater_.audioBuffered(),p=this.sourceUpdater_.videoBuffered();1<m.length&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the audio buffer: "+sd(m).join(", "));1<p.length&&this.logger_("On QUOTA_EXCEEDED_ERR, found gaps in the video buffer: "+sd(p).join(", "));var t=m.length?m.start(0):0,x=m.length?m.end(m.length-1):0,u=p.length?p.start(0):0,z=p.length?p.end(p.length-1):0;1>=x-t&&1>=z-u?(this.logger_("On QUOTA_EXCEEDED_ERR, single segment too large to append to buffer, triggering an error. Appended byte length: "+ 1182(b.byteLength+", audio buffer: ")+(sd(m).join(", ")+", video buffer: ")+(sd(p).join(", ")+", ")),this.error({message:"Quota exceeded error with append of a single segment of content",excludeUntil:Infinity}),this.trigger("error")):(this.waitingOnRemove_=!0,this.callQueue_.push(this.appendToSourceBuffer_.bind(this,{segmentInfo:d,type:h,bytes:b})),d=this.currentTime_()-1,this.logger_("On QUOTA_EXCEEDED_ERR, removing audio/video from 0 to "+d),this.remove(0,d,function(){f.logger_("On QUOTA_EXCEEDED_ERR, retrying append in 1s"); 1183f.waitingOnRemove_=!1;f.quotaExceededErrorRetryTimeout_=window.setTimeout(function(){f.logger_("On QUOTA_EXCEEDED_ERR, re-processing call queue");f.quotaExceededErrorRetryTimeout_=null;f.processCallQueue_()},1E3)},!0))};ba.prototype.handleAppendError_=function(b,d){var f=b.segmentInfo,h=b.type;b=b.bytes;d&&(22===d.code?this.handleQuotaExceededError_({segmentInfo:f,type:h,bytes:b}):(this.logger_("Received non QUOTA_EXCEEDED_ERR on append",d),this.error({message:h+" append of "+b.length+"b failed for segment #"+ 1184(f.mediaIndex+" in playlist "+f.playlist.id),metadata:{errorType:O.Error.StreamingFailedToAppendSegment}}),this.trigger("appenderror")))};ba.prototype.appendToSourceBuffer_=function(b){var d=b.segmentInfo,f=b.type,h=b.initSegment,m=b.data;b=b.bytes;b||(b=[m],m=m.byteLength,h&&(b.unshift(h),m+=h.byteLength),b=Iq({bytes:m,segments:b}));h={segmentInfo:xd({type:this.loaderType_,segment:d})};this.trigger({type:"segmentappendstart",metadata:h});this.sourceUpdater_.appendBuffer({segmentInfo:d,type:f,bytes:b}, 1185this.handleAppendError_.bind(this,{segmentInfo:d,type:f,bytes:b}))};ba.prototype.handleSegmentTimingInfo_=function(b,d,f){this.pendingSegment_&&d===this.pendingSegment_.requestId&&(d=this.pendingSegment_.segment,b+="TimingInfo",d[b]||(d[b]={}),d[b].transmuxerPrependedSeconds=f.prependedContentDuration||0,d[b].transmuxedPresentationStart=f.start.presentation,d[b].transmuxedDecodeStart=f.start.decode,d[b].transmuxedPresentationEnd=f.end.presentation,d[b].transmuxedDecodeEnd=f.end.decode,d[b].baseMediaDecodeTime= 1186f.baseMediaDecodeTime)};ba.prototype.appendData_=function(b,d){var f=d.type,h=d.data;!h||!h.byteLength||"audio"===f&&this.audioDisabled_||(d=this.getInitSegmentAndUpdateState_({type:f,initSegment:d.initSegment,playlist:b.playlist,map:b.isFmp4?b.segment.map:null}),this.appendToSourceBuffer_({segmentInfo:b,type:f,initSegment:d,data:h}))};ba.prototype.loadSegment_=function(b){var d=this;this.state="WAITING";this.pendingSegment_=b;this.trimBackBuffer_(b);"number"===typeof b.timestampOffset&&this.transmuxer_&& 1187this.transmuxer_.postMessage({action:"clearAllMp4Captions"});this.hasEnoughInfoToLoad_()?this.updateTransmuxerAndRequestSegment_(b):($c(this),this.loadQueue_.push(function(){var f=jb({},b,{forceTimestampOffset:!0});jb(b,d.generateSegmentInfo_(f));d.isPendingTimestampOffset_=!1;d.updateTransmuxerAndRequestSegment_(b)}))};ba.prototype.updateTransmuxerAndRequestSegment_=function(b){var d=this;this.shouldUpdateTransmuxerTimestampOffset_(b.timestampOffset)&&(this.gopBuffer_.length=0,b.gopsToAlignWith= 1188[],this.timeMapping_=0,this.transmuxer_.postMessage({action:"reset"}),this.transmuxer_.postMessage({action:"setTimestampOffset",timestampOffset:b.timestampOffset}));var f=this.createSimplifiedSegmentObj_(b),h=this.isEndOfStream_(b.mediaIndex,b.playlist,b.partIndex),m=null!==this.mediaIndex,p=b.timeline!==this.currentTimeline_&&0<b.timeline;h=h||m&&p;this.logger_("Requesting\n"+Jj(b.uri)+"\n"+ke(b));f.map&&!f.map.bytes&&(this.logger_("going to request init segment."),this.appendInitSegment_={video:!0, 1189audio:!0});b.abortRequests=Fq({xhr:this.vhs_.xhr,xhrOptions:this.xhrOptions_,decryptionWorker:this.decrypter_,segment:f,abortFn:this.handleAbort_.bind(this,b),progressFn:this.handleProgress_.bind(this),trackInfoFn:this.handleTrackInfo_.bind(this),timingInfoFn:this.handleTimingInfo_.b
1189ind(this),videoSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"video",b.requestId),audioSegmentTimingInfoFn:this.handleSegmentTimingInfo_.bind(this,"audio",b.requestId),captionsFn:this.handleCaptions_.bind(this), 1190isEndOfTimeline:h,endedTimelineFn:function(){d.logger_("received endedtimeline callback")},id3Fn:this.handleId3_.bind(this),dataFn:this.handleData_.bind(this),doneFn:this.segmentRequestFinished_.bind(this),onTransmuxerLog:function(t){var x=t.message,u=t.level;t=t.stream;d.logger_(ke(b)+" logged from transmuxer stream "+t+" as a "+u+": "+x)},triggerSegmentEventFn:function(t){var x=t.type,u=t.keyInfo,z=t.trackInfo,A=t.timingInfo;t={segmentInfo:xd({segment:t.segment})};u&&(t.keyInfo=u);z&&(t.trackInfo= 1191z);A&&(t.timingInfo=A);d.trigger({type:x,metadata:t})}})};ba.prototype.trimBackBuffer_=function(b){b=this.seekable_();var d=this.currentTime_(),f=this.playlist_.targetDuration||10,h=d-pb.BACK_BUFFER_LENGTH;b.length&&(h=Math.max(h,b.start(0)));b=Math.min(d-f,h);0<b&&this.remove(0,b)};ba.prototype.createSimplifiedSegmentObj_=function(b){var d=b.segment,f=b.part;f={resolvedUri:f?f.resolvedUri:d.resolvedUri,byterange:f?f.byterange:d.byterange,requestId:b.requestId,transmuxer:b.transmuxer,audioAppendStart:b.audioAppendStart, 1192gopsToAlignWith:b.gopsToAlignWith,part:b.part,type:this.loaderType_,start:b.startOfSegment,duration:b.duration,isEncrypted:b.segment.key||b.segment.map&&b.segment.map.key,isMediaInitialization:b.segment.map&&!b.segment.map.bytes};var h=b.playlist.segments[b.mediaIndex-1];h&&h.timeline===d.timeline&&(h.videoTimingInfo?f.baseStartTime=h.videoTimingInfo.transmuxedDecodeEnd:h.audioTimingInfo&&(f.baseStartTime=h.audioTimingInfo.transmuxedDecodeEnd));d.key&&(b=d.key.iv||new Uint32Array([0,0,0,b.mediaIndex+ 1193b.playlist.mediaSequence]),f.key=this.segmentKey(d.key),f.key.iv=b);d.map&&(f.map=this.initSegmentForMap(d.map));return f};ba.prototype.saveTransferStats_=function(b){this.mediaRequests+=1;b&&(this.mediaBytesTransferred+=b.bytesReceived,this.mediaTransferDuration+=b.roundTripTime)};ba.prototype.saveBandwidthRelatedStats_=function(b,d){this.pendingSegment_.byteLength=d.bytesReceived;b<Gg?this.logger_("Ignoring segment's bandwidth because its duration of "+b+(" is less than the min to record "+Gg)): 1194(this.trigger({type:"bandwidthupdated",metadata:{bandwidthInfo:{from:this.bandwidth,to:d.bandwidth}}}),this.bandwidth=d.bandwidth,this.roundTrip=d.roundTripTime)};ba.prototype.handleTimeout_=function(){this.mediaRequestsTimedout+=1;this.bandwidth=1;this.roundTrip=NaN;this.trigger("bandwidthupdate");this.trigger("timeout")};ba.prototype.segmentRequestFinished_=function(b,d,f){if(this.callQueue_.length)this.callQueue_.push(this.segmentRequestFinished_.bind(this,b,d,f));else if(this.saveTransferStats_(d.stats), 1195this.pendingSegment_&&d.requestId===this.pendingSegment_.requestId)if(b)this.pendingSegment_=null,this.state="READY",-102!==b.code&&(this.pause(),-101===b.code?this.handleTimeout_():(this.mediaRequestsErrored+=1,this.error(b),this.trigger("error")));else{b=this.pendingSegment_;this.saveBandwidthRelatedStats_(b.duration,d.stats);b.endOfAllRequests=d.endOfAllRequests;if(f.gopInfo){d=this.gopBuffer_;f=f.gopInfo;if(f.length)if(this.safeAppend_)d=f.slice();else{var h=f[0].pts,m=0;for(m;m<d.length&&!(d[m].pts>= 1196h);m++);d=d.slice(0,m).concat(f)}this.gopBuffer_=d}this.state="APPENDING";this.trigger("appending");this.waitForAppendsToComplete_(b)}};ba.prototype.setTimeMapping_=function(b){b=this.syncController_.mappingForTimeline(b);null!==b&&(this.timeMapping_=b)};ba.prototype.updateMediaSecondsLoaded_=function(b){this.mediaSecondsLoaded="number"===typeof b.start&&"number"===typeof b.end?this.mediaSecondsLoaded+(b.end-b.start):this.mediaSecondsLoaded+b.duration};ba.prototype.shouldUpdateTransmuxerTimestampOffset_= 1197function(b){return null===b?!1:"main"===this.loaderType_&&b!==this.sourceUpdater_.videoTimestampOffset()||!this.audioDisabled_&&b!==this.sourceUpdater_.audioTimestampOffset()?!0:!1};ba.prototype.trueSegmentStart_=function(b){var d=b.currentStart,f=b.mediaIndex,h=b.firstVideoFrameTimeForData,m=b.currentVideoTimestampOffset,p=b.audioTimingInfo;if("undefined"!==typeof d)return d;if(!b.useVideoTimingInfo)return p.start;d=b.playlist.segments[f-1];return 0!==f&&d&&"undefined"!==typeof d.start&&d.end=== 1198h+m?b.videoTimingInfo.start:h};ba.prototype.waitForAppendsToComplete_=function(b){var d=this.getCurrentMediaInfo_(b);if(d){var f=d.hasAudio,h=d.hasVideo;d=d.isMuxed;h="main"===this.loaderType_&&h;f=!this.audioDisabled_&&f&&!d;b.waitingOnAppends=0;b.hasAppendedData_?(h&&b.waitingOnAppends++,f&&b.waitingOnAppends++,h&&this.sourceUpdater_.videoQueueCallback(this.checkAppendsDone_.bind(this,b)),f&&this.sourceUpdater_.audioQueueCallback(this.checkAppendsDone_.bind(this,b))):(b.timingInfo||"number"!==typeof b.timestampOffset|| 1199(this.isPendingTimestampOffset_=!0),b.timingInfo={start:0},b.waitingOnAppends++,this.isPendingTimestampOffset_||(this.updateSourceBufferTimestampOffset_(b),this.processMetadataQueue_()),this.checkAppendsDone_(b))}else this.error({message:"No starting media returned, likely due to an unsupported media format.",playlistExclusionDuration:Infinity}),this.trigger("error")};ba.prototype.checkAppendsDone_=function(b){this.checkForAbort_(b.requestId)||
1199(b.waitingOnAppends--,0===b.waitingOnAppends&&this.handleAppendsDone_())}; 1200ba.prototype.checkForIllegalMediaSwitch=function(b){var d=this.getCurrentMediaInfo_();return(b="main"===this.loaderType_&&d&&b?b.hasAudio||b.hasVideo?d.hasVideo&&!b.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.":!d.hasVideo&&b.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.": 1201null:"Neither audio nor video found in segment.":null)?(this.error({message:b,playlistExclusionDuration:Infinity}),this.trigger("error"),!0):!1};ba.prototype.updateSourceBufferTimestampOffset_=function(b){if(null!==b.timestampOffset&&"number"===typeof b.timingInfo.start&&!b.changedTimestampOffset&&"main"===this.loaderType_){var d=!1;b.timestampOffset-=this.getSegmentStartTimeForTimestampOffsetCalculation_({videoTimingInfo:b.segment.videoTimingInfo,audioTimingInfo:b.segment.audioTimingInfo,timingInfo:b.timingInfo}); 1202b.changedTimestampOffset=!0;b.timestampOffset!==this.sourceUpdater_.videoTimestampOffset()&&(this.sourceUpdater_.videoTimestampOffset(b.timestampOffset),d=!0);b.timestampOffset!==this.sourceUpdater_.audioTimestampOffset()&&(this.sourceUpdater_.audioTimestampOffset(b.timestampOffset),d=!0);d&&this.trigger("timestampoffset")}};ba.prototype.getSegmentStartTimeForTimestampOffsetCalculation_=function(b){var d=b.videoTimingInfo,f=b.audioTimingInfo;b=b.timingInfo;return this.useDtsForTimestampOffset_?d&& 1203"number"===typeof d.transmuxedDecodeStart?d.transmuxedDecodeStart:f&&"number"===typeof f.transmuxedDecodeStart?f.transmuxedDecodeStart:b.start:b.start};ba.prototype.updateTimingInfoEnd_=function(b){b.timingInfo=b.timingInfo||{};var d=this.getMediaInfo_();if(d="main"===this.loaderType_&&d&&d.hasVideo&&b.videoTimingInfo?b.videoTimingInfo:b.audioTimingInfo)b.timingInfo.end="number"===typeof d.end?d.end:d.start+b.duration};ba.prototype.handleAppendsDone_=function(){if(this.pendingSegment_){var b={segmentInfo:xd({type:this.loaderType_, 1204segment:this.pendingSegment_})};this.trigger({type:"appendsdone",metadata:b})}if(this.pendingSegment_){b=this.pendingSegment_;b.part&&b.part.syncInfo?b.part.syncInfo.markAppended():b.segment.syncInfo&&b.segment.syncInfo.markAppended();this.updateTimingInfoEnd_(b);this.shouldSaveSegmentTimingInfo_&&this.syncController_.saveSegmentTimingInfo({segmentInfo:b,shouldSaveTimelineMapping:"main"===this.loaderType_});if("hls"!==this.sourceType_)var d=null;else{var f=Sq({audioTimingInfo:b.audioTimingInfo,videoTimingInfo:b.videoTimingInfo}); 1205if(f){var h=b.playlist.targetDuration;d=zm({segmentDuration:f,maxDuration:2*h});var m=zm({segmentDuration:f,maxDuration:h});f="Segment with index "+b.mediaIndex+" from playlist "+(b.playlist.id+" has a duration of ")+(f+" when the reported duration is ")+(b.duration+" and the target duration is ")+(h+". 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"); 1206d=d||m?{severity:d?"warn":"info",message:f}:null}else d=null}d&&("warn"===d.severity?O.log.warn(d.message):this.logger_(d.message));this.recordThroughput_(b);this.pendingSegment_=null;this.state="READY";if(b.isSyncRequest&&(this.trigger("syncinfoupdate"),!b.hasAppendedData_)){this.logger_("Throwing away un-appended sync request "+ke(b));return}this.logger_("Appended "+ke(b));this.addSegmentMetadataCue_(b);this.fetchAtBuffer_=!0;this.currentTimeline_!==b.timeline&&(this.timelineChangeController_.lastTimelineChange({type:this.loaderType_, 1207from:this.currentTimeline_,to:b.timeline}),"main"!==this.loaderType_||this.audioDisabled_||this.timelineChangeController_.lastTimelineChange({type:"audio",from:this.currentTimeline_,to:b.timeline}));this.currentTimeline_=b.timeline;this.trigger("syncinfoupdate");m=b.segment;d=b.part;m=m.end&&this.currentTime_()-m.end>3*b.playlist.targetDuration;d=d&&d.end&&this.currentTime_()-d.end>3*b.playlist.partTargetDuration;m||d?(this.logger_("bad "+(m?"segment":"part")+" "+ke(b)),this.resetEverything()):(null!== 1208this.mediaIndex&&this.trigger("bandwidthupdate"),this.trigger("progress"),this.mediaIndex=b.mediaIndex,this.partIndex=b.partIndex,this.isEndOfStream_
1208(b.mediaIndex,b.playlist,b.partIndex)&&this.endOfStream(),this.trigger("appended"),b.hasAppendedData_&&this.mediaAppends++,this.paused()||this.monitorBuffer_())}else this.state="READY",this.paused()||this.monitorBuffer_()};ba.prototype.recordThroughput_=function(b){if(b.duration<Gg)this.logger_("Ignoring segment's throughput because its duration of "+ 1209b.duration+(" is less than the min to record "+Gg));else{var d=this.throughput.rate,f=Date.now()-b.endOfAllRequests+1;this.throughput.rate+=(Math.floor(b.byteLength/f*8E3)-d)/++this.throughput.count}};ba.prototype.addSegmentMetadataCue_=function(b){if(this.segmentMetadataTrack_){var d=b.segment,f=d.start,h=d.end;if("number"===typeof f&&isFinite(f)&&"number"===typeof h&&isFinite(h)){ff(f,h,this.segmentMetadataTrack_);var m=window.WebKitDataCue||window.VTTCue;b={custom:d.custom,dateTimeObject:d.dateTimeObject, 1210dateTimeString:d.dateTimeString,programDateTime:d.programDateTime,bandwidth:b.playlist.attributes.BANDWIDTH,resolution:b.playlist.attributes.RESOLUTION,codecs:b.playlist.attributes.CODECS,byteLength:b.byteLength,uri:b.uri,timeline:b.timeline,playlist:b.playlist.id,start:f,end:h};d=JSON.stringify(b);f=new m(f,h,d);f.value=b;this.segmentMetadataTrack_.addCue(f)}}};$jscomp.global.Object.defineProperties(ba.prototype,{mediaSequenceSync_:{configurable:!0,enumerable:!0,get:function(){return this.syncController_.getMediaSequenceSync(this.loaderType_)}}}); 1211var Am=function(b){return"string"!==typeof b?b:b.replace(/./,function(d){return d.toUpperCase()})},Tq=["video","audio"],zi=function(b,d){var f=d[b+"Buffer"];return f&&f.updating||d.queuePending[b]},le=function(b,d){if(0!==d.queue.length){var f=0,h=d.queue[f];if("mediaSource"===h.type)d.updating()||"closed"===d.mediaSource.readyState||(d.queue.shift(),h.action(d),h.doneFn&&h.doneFn(),le("audio",d),le("video",d));else if("mediaSource"!==b&&d.ready()&&"closed"!==d.mediaSource.readyState&&!zi(b,d)){if(h.type!== 1212b){a:{f=d.queue;for(h=0;h<f.length;h++){var m=f[h];if("mediaSource"===m.type){f=null;break a}if(m.type===b){f=h;break a}}f=null}if(null===f)return;h=d.queue[f]}d.queue.splice(f,1);d.queuePending[b]=h;h.action(b,d);h.doneFn||(d.queuePending[b]=null,le(b,d))}}},Bm=function(b,d){var f=d[b+"Buffer"],h=Am(b);f&&(f.removeEventListener("updateend",d["on"+h+"UpdateEnd_"]),f.removeEventListener("error",d["on"+h+"Error_"]),d.codecs[b]=null,d[b+"Buffer"]=null)},yc=function(b,d){return b&&d&&-1!==Array.prototype.indexOf.call(b.sourceBuffers, 1213d)},Tb={appendBuffer:function(b,d,f){return function(h,m){var p=m[h+"Buffer"];if(yc(m.mediaSource,p)){m.logger_("Appending segment "+d.mediaIndex+"'s "+b.length+" b
1213ytes to "+h+"Buffer");try{p.appendBuffer(b)}catch(t){m.logger_("Error with code "+t.code+" "+(22===t.code?"(QUOTA_EXCEEDED_ERR) ":"")+("when appending segment "+d.mediaIndex+" to "+h+"Buffer")),m.queuePending[h]=null,f(t)}}}},remove:function(b,d){return function(f,h){var m=h[f+"Buffer"];if(yc(h.mediaSource,m)){h.logger_("Removing "+b+" to "+ 1214d+" from "+f+"Buffer");try{m.remove(b,d)}catch(p){h.logger_("Remove "+b+" to "+d+" from "+f+"Buffer failed")}}}},timestampOffset:function(b){return function(d,f){var h=f[d+"Buffer"];yc(f.mediaSource,h)&&(f.logger_("Setting "+d+"timestampOffset to "+b),h.timestampOffset=b)}},callback:function(b){return function(d,f){b()}},endOfStream:function(b){return function(d){if("open"===d.mediaSource.readyState){d.logger_("Calling mediaSource endOfStream("+(b||"")+")");try{d.mediaSource.endOfStream(b)}catch(f){O.log.warn("Failed to call media source endOfStream", 1215f)}}}},duration:function(b){return function(d){d.logger_("Setting mediaSource duration to "+b);try{d.mediaSource.duration=b}catch(f){O.log.warn("Failed to set media source duration",f)}}},abort:function(){return function(b,d){if("open"===d.mediaSource.readyState){var f=d[b+"Buffer"];if(yc(d.mediaSource,f)){d.logger_("calling abort on "+b+"Buffer");try{f.abort()}catch(h){O.log.warn("Failed to abort on "+b+"Buffer",h)}}}}},addSourceBuffer:function(b,d){return function(f){var h=Am(b),m=be(d);f.logger_("Adding "+ 1216b+"Buffer with codec "+d+" to mediaSource");m=f.mediaSource.addSourceBuffer(m);m.addEventListener("updateend",f["on"+h+"UpdateEnd_"]);m.addEventListener("error",f["on"+h+"Error_"]);f.codecs[b]=d;f[b+"Buffer"]=m}},removeSourceBuffer:function(b){return function(d){var f=d[b+"Buffer"];Bm(b,d);if(yc(d.mediaSource,f)){d.logger_("Removing "+b+"Buffer with codec "+d.codecs[b]+" from mediaSource");try{d.mediaSource.removeSourceBuffer(f)}catch(h){O.log.warn("Failed to removeSourceBuffer "+b+"Buffer",h)}}}}, 1217changeType:function(b){return function(d,f){var h=f[d+"Buffer"],m=be(b);if(yc(f.mediaSource,h)){var p=b.substring(0,b.indexOf(".")),t=f.codecs[d];if(t.substring(0,t.indexOf("."))!==p){p={codecsChangeInfo:{from:t,to:b}};f.trigger({type:"codecschange",metadata:p});f.logger_("changing "+d+"Buffer codec from "+t+" to "+b);try{h.changeType(m),f.codecs[d]=b}catch(x){p.errorType=O.Error.StreamingCodecsChangeError,p.error=x,x.metadata=p,f.error_=x,f.trigger("error"),O.log.warn("Failed to changeType on "+ 1218d+"Buffer",x)}}}}}},Ub=function(b){var d=b.type,f=b.sourceUpdater;f.queue.push({type:d,action:b.action,doneFn:b.doneFn,name:b.name});le(d,f)},Cm=function(b,d){return function(f){f=d[b+"Buffered"]();if(0===f.length)f="Buffered Ranges are empty";else{for(var h="Buffered Ranges: \n",m=0;m<f.length;m++){var p=f.start(m),t=f.end(m);h+=p+" --\x3e "+t+". Duration ("+(t-p)+")\n"}f=h}d.logger_('received "updateend" event for '+b+" Source Buffer: ",f);d.queuePending[b]&&(f=d.queuePending[b].doneFn,d.queuePending[b]= 1219null,f&&f(d[b+"Error_"]));le(b,d)}},za=function(b){var d=O.EventTarget.call(this)||this;d.mediaSource=b;d.sourceopenListener_=function(){return le("mediaSource",d)};d.mediaSource.addEventListener("sourceopen",d.sourceopenListener_);d.logger_=ac("SourceUpdater");d.audioTimestampOffset_=0;d.videoTimestampOffset_=0;d.queue=[];d.queuePending={audio:null,video:null};d.delayedAudioAppendQueue_=[];d.videoAppendQueued_=!1;d.codecs={};d.onVideoUpdateEnd_=Cm("video",d);d.onAudioUpdateEnd_=Cm("audio",d);d.onVideoError_= 1220function(f){d.videoError_=f};d.onAudioError_=function(f){d.audioError_=f};d.createdSourceBuffers_=!1;d.initializedEme_=!1;d.triggeredReady_=!1;return d};$jscomp.inherits(za,O.EventTarget);za.prototype.initializedEme=function(){this.initializedEme_=!0;this.triggerReady()};za.prototype.hasCreatedSourceBuffers=function(){return this.createdSourceBuffers_};za.prototype.hasInitializedAnyEme=function(){return this.initializedEme_};za.prototype.ready=function(){return this.hasCreatedSourceBuffers()&&this.hasInitializedAnyEme()}; 1221za.prototype.createSourceBuffers=function(b){this.hasCreatedSourceBuffers()||(this.addOrChangeSourceBuffers(b),this.createdSourceBuffers_=!0,this.trigger("createdsourcebuffers"),this.triggerReady())};
1221za.prototype.triggerReady=function(){this.ready()&&!this.triggeredReady_&&(this.triggeredReady_=!0,this.trigger("ready"))};za.prototype.addSourceBuffer=function(b,d){Ub({type:"mediaSource",sourceUpdater:this,action:Tb.addSourceBuffer(b,d),name:"addSourceBuffer"})};za.prototype.abort=function(b){Ub({type:b, 1222sourceUpdater:this,action:Tb.abort(b),name:"abort"})};za.prototype.removeSourceBuffer=function(b){this.canRemoveSourceBuffer()?Ub({type:"mediaSource",sourceUpdater:this,action:Tb.removeSourceBuffer(b),name:"removeSourceBuffer"}):O.log.error("removeSourceBuffer is not supported!")};za.prototype.canRemoveSourceBuffer=function(){return!O.browser.IS_FIREFOX&&window.MediaSource&&window.MediaSource.prototype&&"function"===typeof window.MediaSource.prototype.removeSourceBuffer};za.canChangeType=function(){return window.SourceBuffer&& 1223window.SourceBuffer.prototype&&"function"===typeof window.SourceBuffer.prototype.changeType};za.prototype.canChangeType=function(){return this.constructor.canChangeType()};za.prototype.changeType=function(b,d){this.canChangeType()?Ub({type:b,sourceUpdater:this,action:Tb.changeType(d),name:"changeType"}):O.log.error("changeType is not supported!")};za.prototype.addOrChangeSourceBuffers=function(b){var d=this;if(!b||"object"!==typeof b||0===Object.keys(b).length)throw Error("Cannot addOrChangeSourceBuffers to undefined codecs"); 1224Object.keys(b).forEach(function(f){var h=b[f];if(!d.hasCreatedSourceBuffers())return d.addSourceBuffer(f,h);d.canChangeType()&&d.changeType(f,h)})};za.prototype.appendBuffer=function(b,d){var f=this,h=b.segmentInfo,m=b.type,p=b.bytes;this.processedAppend_=!0;"audio"===m&&this.videoBuffer&&!this.videoAppendQueued_?(this.delayedAudioAppendQueue_.push([b,d]),this.logger_("delayed audio append of "+p.length+" until video append")):(Ub({type:m,sourceUpdater:this,action:Tb.appendBuffer(p,h||{mediaIndex:-1}, 1225d),doneFn:d,name:"appendBuffer"}),"video"===m&&(this.videoAppendQueued_=!0,this.delayedAudioAppendQueue_.length&&(b=this.delayedAudioAppendQueue_.slice(),this.logger_("queuing delayed audio "+b.length+" appendBuffers"),this.delayedAudioAppendQueue_.length=0,b.forEach(function(t){f.appendBuffer.apply(f,t)}))))};za.prototype.audioBuffered=function(){return yc(this.mediaSource,this.audioBuffer)?this.audioBuffer.buffered?this.audioBuffer.buffered:nb():nb()};za.prototype.videoBuffered=function(){return yc(this.mediaSource, 1226this.videoBuffer)?this.videoBuffer.buffered?this.videoBuffer.buffered:nb():nb()};za.prototype.buffered=function(){var b=yc(this.mediaSource,this.videoBuffer)?this.videoBuffer:null,d=yc(this.mediaSource,this.audioBuffer)?this.audioBuffer:null;return d&&!b?this.audioBuffered():b&&!d?this.videoBuffered():lp(this.audioBuffered(),this.videoBuffered())};za.prototype.setDuration=function(b,d){d=void 0===d?Cc:d;Ub({type:"mediaSource",sourceUpdater:this,action:Tb.duration(b),name:"duration",doneFn:d})};za.prototype.endOfStream= 1227function(b,d){b=void 0===b?null:b;d=void 0===d?Cc:d;"string"!==typeof b&&(b=void 0);Ub({type:"mediaSource",sourceUpdater:this,action:Tb.endOfStream(b),name:"endOfStream",doneFn:d})};za.prototype.removeAudio=function(b,d,f){f=void 0===f?Cc:f;this.audioBuffered().length&&0!==this.audioBuffered().end(0)?Ub({type:"audio",sourceUpdater:this,action:Tb.remove(b,d),doneFn:f,name:"remove"}):f()};za.prototype.removeVideo=function(b,d,f){f=void 0===f?Cc:f;this.videoBuffered().length&&0!==this.videoBuffered().end(0)? 1228Ub({type:"video",sourceUpdater:this,action:Tb.remove(b,d),doneFn:f,name:"remove"}):f()};za.prototype.updating=function(){return zi("audio",this)||zi("video",this)?!0:!1};za.prototype.audioTimestampOffset=function(b){"undefined"!==typeof b&&this.audioBuffer&&this.audioTimestampOffset_!==b&&(Ub({type:"audio",sourceUpdater:this,action:Tb.timestampOffset(b),name:"timestampOffset"}),this.audioTimestampOffset_=b);return this.audioTimestampOffset_};za.prototype.videoTimestampOffset=function(b){"undefined"!== 1229typeof b&&this.videoBuffer&&this.videoTimestampOffset_!==b&&(Ub({type:"video",sourceUpdater:this,action:Tb.timestampOffset(b),name:"timestampOffset"}),this.videoTimestampOffset_=b);return this.videoTimestampOffset_};za.prototype.audioQueueCallback=function(b){this.audioBuffer&&Ub({type:"audio",sourceUpdater:this,action:Tb.callback(b),name:"callback"})};za.prototype.videoQueueCallback=function(b){this.videoBuffer&&Ub({type:"video",sourceUpdater:this,action:Tb.callback(b),name:"callback"})};za.prototype.dispose= 1230function(){var b=this;this.trigger("dispose");Tq.forEach(function(d){b.abort(d);if(b.canRemoveSourceBuffer())b.removeSourceBuffer(d);else b[d+"QueueCallback"](function(){return Bm(d,b)})});this.videoAppendQueued_=!1;this.delayedAudioAppendQueue_.length=0;this.sourceopenListener_&&this.mediaSource.removeEventListener("sourceopen",this.sourceopenListener_);this.off()};var Uq=function(b){b=new Uint8Array(b);return Array.from(b).map(function(d){return d.toString(16).padStart(2,"0")}).join("")}
1230,Dm=new Uint8Array(["\n", 1231"\n"].map(function(b){return b.charCodeAt(0)})),Em=function(){var b=Error.call(this,"Trying to parse received VTT cues, but there is no WebVTT. Make sure vtt.js is loaded.");this.message=b.message;"stack"in b&&(this.stack=b.stack)};$jscomp.inherits(Em,Error);var fb=function(b,d){d=void 0===d?{}:d;d=ba.call(this,b,d)||this;d.mediaSource_=null;d.subtitlesTrack_=null;d.featuresNativeTextTracks_=b.featuresNativeTextTracks;d.loadVttJs=b.loadVttJs;d.shouldSaveSegmentTimingInfo_=!1;return d};$jscomp.inherits(fb, 1232ba);fb.prototype.buffered_=function(){if(!this.subtitlesTrack_||!this.subtitlesTrack_.cues||!this.subtitlesTrack_.cues.length)return nb();var b=this.subtitlesTrack_.cues;return nb([[b[0].startTime,b[b.length-1].startTime]])};fb.prototype.initSegmentForMap=function(b,d){d=void 0===d?!1:d;if(!b)return null;var f=mg(b),h=this.initSegments_[f];d&&!h&&b.bytes&&(d=new Uint8Array(Dm.byteLength+b.bytes.byteLength),d.set(b.bytes),d.set(Dm,b.bytes.byteLength),this.initSegments_[f]=h={resolvedUri:b.resolvedUri, 1233byterange:b.byterange,bytes:d});return h||b};fb.prototype.couldBeginLoading_=function(){return this.playlist_&&this.subtitlesTrack_&&!this.paused()};fb.prototype.init_=function(){this.state="READY";this.resetEverything();return this.monitorBuffer_()};fb.prototype.track=function(b){if("undefined"===typeof b)return this.subtitlesTrack_;this.subtitlesTrack_=b;"INIT"===this.state&&this.couldBeginLoading_()&&this.init_();return this.subtitlesTrack_};fb.prototype.remove=function(b,d){ff(b,d,this.subtitlesTrack_)}; 1234fb.prototype.fillBuffer_=function(){var b=this,d=this.chooseNextRequest_();d&&(null===this.syncController_.timestampOffsetForTimeline(d.timeline)?(this.syncController_.one("timestampoffset",function(){b.state="READY";b.paused()||b.monitorBuffer_()}),this.state="WAITING_ON_TIMELINE"):this.loadSegment_(d))};fb.prototype.timestampOffsetForSegment_=function(){return null};fb.prototype.chooseNextRequest_=function(){return this.skipEmptySegments_(ba.prototype.chooseNextRequest_.call(this))};fb.prototype.skipEmptySegments_= 1235function(b){for(;b&&b.segment.empty;){if(b.mediaIndex+1>=b.playlist.segments.length){b=null;break}b=this.generateSegmentInfo_({playlist:b.playlist,mediaIndex:b.mediaIndex+1,startOfSegment:b.startOfSegment+b.duration,isSyncRequest:b.isSyncRequest})}return b};fb.prototype.stopForError=function(b){this.error(b);this.state="READY";this.pause();this.trigger("error")};fb.prototype.segmentRequestFinished_=function(b,d,f){var h=this;if(this.subtitlesTrack_)if(this.saveTransferStats_(d.stats),this.pendingSegment_)if(b)-101=== 1236b.code&&this.handleTimeout_(),-102===b.code?this.mediaRequestsAborted+=1:this.mediaRequestsErrored+=1,this.stopForError(b);else{var m=this.pendingSegment_,p=f.mp4VttCues&&f.mp4VttCues.length;p&&(m.mp4VttCues=f.mp4VttCues);this.saveBandwidthRelatedStats_(m.duration,d.stats);d.key&&this.segmentKey(d.key,!0);this.state="APPENDING";this.trigger("appending");var t=m.segment;t.map&&(t.map.bytes=d.map.bytes);m.bytes=d.bytes;if("function"!==typeof window.WebVTT&&"function"===typeof this.loadVttJs)this.state= 1237"WAITING_ON_VTTJS",this.loadVttJs().then(function(){return h.segmentRequestFinished_(b,d,f)},function(){return h.stopForError({message:"Error loading vtt.js"})});else{t.requested=!0;try{this.parseVTTCues_(m)}catch(x){this.stopForError({message:x.message,metadata:{errorType:O.Error.StreamingVttParserError,error:x}});return}p||this.updateTimeMapping_(m,this.syncController_.timelines[m.timeline],this.playlist_);m.timingInfo=m.cues.length?{start:m.cues[0].startTime,end:m.cues[m.cues.length-1].endTime}: 1238{start:m.startOfSegment,end:m.startOfSegment+m.duration};m.isSyncRequest?(this.trigger("syncinfoupdate"),this.pendingSegment_=null,this.state="READY"):(m.byteLength=m.bytes.byteLength,this.mediaSecondsLoaded+=t.duration,m.cues.forEach(function(x){h.subtitlesTrack_.addCue(h.featuresNativeTextTracks_?new window.VTTCue(x.startTime,x.endTime,x.text):x)}),Pq(this.subtitlesTrack_),this.handleAppendsDone_())}}else this.state="READY",this.mediaRequestsAborted+=1;else this.state="READY"};fb.prototype.handleData_= 1239function(b,d){var f=d&&"text"===d.type;
1239b&&"vtt"===b.type&&f&&ba.prototype.handleData_.call(this,b,d)};fb.prototype.updateTimingInfoEnd_=function(){};fb.prototype.parseMp4VttCues_=function(b){var d=null===this.sourceUpdater_.videoTimestampOffset()?this.sourceUpdater_.audioTimestampOffset():this.sourceUpdater_.videoTimestampOffset();b.mp4VttCues.forEach(function(f){var h=new window.VTTCue(f.start+d,f.end+d,f.cueText);f.settings&&f.settings.split(" ").forEach(function(m){m=m.split(":");var p=m[1];h[m[0]]= 1240isNaN(p)?p:Number(p)});b.cues.push(h)})};fb.prototype.parseVTTCues_=function(b){var d=!1;if("function"!==typeof window.WebVTT)throw new Em;b.cues=[];b.timestampmap={MPEGTS:0,LOCAL:0};if(b.mp4VttCues)this.parseMp4VttCues_(b);else{if("function"===typeof window.TextDecoder)var f=new window.TextDecoder("utf8");else f=window.WebVTT.StringDecoder(),d=!0;f=new window.WebVTT.Parser(window,window.vttjs,f);f.oncue=b.cues.push.bind(b.cues);f.ontimestampmap=function(m){b.timestampmap=m};f.onparsingerror=function(m){O.log.warn("Error encountered when parsing cues: "+ 1241m.message)};if(b.segment.map){var h=b.segment.map.bytes;d&&(h=decodeURIComponent(escape(String.fromCharCode.apply(null,h))));f.parse(h)}h=b.bytes;d&&(h=decodeURIComponent(escape(String.fromCharCode.apply(null,h))));f.parse(h);f.flush()}};fb.prototype.updateTimeMapping_=function(b,d,f){var h=this,m=b.segment;if(d)if(b.cues.length){var p=b.timestampmap,t=p.MPEGTS/9E4-p.LOCAL+d.mapping;b.cues.forEach(function(x){var u=x.endTime-x.startTime,z=h.handleRollover_(x.startTime+t,d.time);x.startTime=Math.max(z, 12420);x.endTime=Math.max(z+u,0)});f.syncInfo||(f.syncInfo={mediaSequence:f.mediaSequence+b.mediaIndex,time:Math.min(b.cues[0].startTime,b.cues[b.cues.length-1].startTime-m.duration)})}else m.empty=!0};fb.prototype.handleRollover_=function(b,d){if(null===d)return b;b*=9E4;d*=9E4;var f;for(f=d<b?-8589934592:8589934592;4294967296<Math.abs(b-d);)b+=f;return b/9E4};var me=function(b){var d=b.end,f=b.segmentIndex,h=void 0===b.partIndex?null:b.partIndex,m=void 0===b.appended?!1:b.appended;this.start_=b.start; 1243this.end_=d;this.segmentIndex_=f;this.partIndex_=h;this.appended_=m};me.prototype.isInRange=function(b){return b>=this.start&&b<this.end};me.prototype.markAppended=function(){this.appended_=!0};me.prototype.resetAppendedStatus=function(){this.appended_=!1};$jscomp.global.Object.defineProperties(me.prototype,{isAppended:{configurable:!0,enumerable:!0,get:function(){return this.appended_}},start:{configurable:!0,enumerable:!0,get:function(){return this.start_}},end:{configurable:!0,enumerable:!0,get:function(){return this.end_}}, 1244segmentIndex:{configurable:!0,enumerable:!0,get:function(){return this.segmentIndex_}},partIndex:{configurable:!0,enumerable:!0,get:function(){return this.partIndex_}}});var Ai=function(b,d){d=void 0===d?[]:d;this.segmentSyncInfo_=b;this.partsSyncInfo_=d};Ai.prototype.resetAppendStatus=function(){this.segmentSyncInfo_.resetAppendedStatus();this.partsSyncInfo_.forEach(function(b){return b.resetAppendedStatus()})};$jscomp.global.Object.defineProperties(Ai.prototype,{segmentSyncInfo:{configurable:!0, 1245enumerable:!0,get:function(){return this.segmentSyncInfo_}},partsSyncInfo:{configurable:!0,enumerable:!0,get:function(){return this.partsSyncInfo_}},hasPartsSyncInfo:{configurable:!0,enumerable:!0,get:function(){return 0<this.partsSyncInfo_.length}}});var cc=function(){this.storage_=new Map;this.diagnostics_="";this.isReliable_=!1;this.start_=-Infinity;this.end_=Infinity};cc.prototype.resetAppendedStatus=function(){this.storage_.forEach(function(b){return b.resetAppendStatus()})};cc.prototype.update= 1246function(b,d){var f=b.mediaSequence;b=b.segments;if(this.isReliable_=this.isReliablePlaylist_(f,b))return this.updateStorage_(b,f,this.calculateBaseTime_(f,b,d))};cc.prototype.getSyncInfoForTime=function(b){for(var d=$jscomp.makeIterator(this.storage_.values()),f=d.next();!f.done;f=d.next()){var h=f.value;f=h.segmentSyncInfo;h=h.partsSyncInfo;if(h.length)for(f=$jscomp.makeIterator(h),h=f.next();!h.done;h=f.next()){if(h=h.value,h.isInRange(b))return h}else if(f.isInRange(b))return f}return null};cc.prototype.getSyncInfoForMediaSequence= 1247function(b){return this.storage_.get(b)};cc.prototype.updateStorage_=function(b,d,f){var h=this,m=new Map,p="\n",t=f,x=d;this.start_=t;b.forEach(function(u,z){var A=h.storage_.get(x),F=t,H=F+u.duration,L=!!(A&&A.segmentSyncInfo&&A.segmentSyncInfo.isAppended),I=new me({start:F,end:H,appended:L,segmentIndex:z});u.syncInfo=I;var N=t,T=(u.parts||[]).map(function(fa,X){var ra=N,ca=N+fa.duration,ea=!!(A&&A.partsSyncInfo&&A.partsSyncInfo[X]&&A.partsSyncInfo[X].isAppended),ja=new me({start:ra,end:ca,appended:ea, 1248segmentIndex:z,partIndex:X});N=ca;p+="Media Sequence: "+x+"."+X+" | Range: "+ra+" --\x3e "+ca+" | Appended: "+ea+"\n";return fa.syncInfo=ja});m.set(x,new Ai(I,T));p+=Jj(u.resolvedUri)+" | Media Sequence: "+x+" | Range: "+F+" --\x3e "+H+" | Appended: "+L+"\n";x++;t=H});this.end_=t;this.storage_=m;this.diagnostics_=p};cc.prototype.calculateBaseTime_=function(b,d,f){if(!this.storage_.size)return 0;if(this.storage_.has(b))return this.storage_.get(b).segmentSyncInfo.start;var h=Math.min.apply(Math,$jscomp.arrayFromIterable(this.storage_.keys())); 1249if(b<h){b=h-b;h=this.storage_.get(h).segmentSyncInfo.start;for(f=0;f<b;f++)h-=d[f].duration;return h}return f};cc.prototype.isReliablePlaylist_=function(b,d){return void 0!==b&&null!==b&&Array.isArray(d)&&d.length};$jscomp.global.Object.defineProperties(cc.prototype,{start:{configurable:!0,enumerable:!0,get:function(){return this.start_}},end:{configurable:!0,enumerable:!0,get:function(){return this.end_}},diagnostics:{configurable:!0,enumerable:!0,get:function(){return this.diagnostics_}},isReliable:{configurable:!0, 1250enumerable:!0,get:function(){return this.isReliable_}}});var Hg=function(b){var d=cc.call(this)||this;d.parent_=b;return d};$jscomp.inherits(Hg,cc);Hg.prototype.calculateBaseTime_=function(b,d,f){return this.storage_.size?cc.prototype.calculateBaseTime_.call(this,b,d,f):(b=this.parent_.getSyncInfoForMediaSequence(b))?b.segmentSyncInfo.start:0};var Bi=[{name:"VOD",run:function(b,d,f,h,m){return Infinity!==f?{time:0,segmentIndex:0,partIndex:null}:null}},{name:"MediaSequence",run:function(b,d,f,h,m,
1251p){b=b.getMediaSequenceSync(p);return b&&b.isReliable?(m=b.getSyncInfoForTime(m))?{time:m.start,partIndex:m.partIndex,segmentIndex:m.segmentIndex}:null:null}},{name:"ProgramDateTime",run:function(b,d,f,h,m){if(!Object.keys(b.timelineToDatetimeMappings).length)return null;h=f=null;var p=Xh(d);m=m||0;for(var t=0;t<p.length;t++){var x=p[d.endList||0===m?t:p.length-(t+1)],u=x.segment,z=b.timelineToDatetimeMappings[u.timeline];if(z&&u.dateTimeObject){z=u.dateTimeObject.getTime()/1E3+z;if(u.parts&&"number"=== 1252typeof x.partIndex)for(var A=0;A<x.partIndex;A++)z+=u.parts[A].duration;u=Math.abs(m-z);if(null!==h&&(0===u||h<u))break;h=u;f={time:z,segmentIndex:x.segmentIndex,partIndex:x.partIndex}}}return f}},{name:"Segment",run:function(b,d,f,h,m){f=b=null;m=m||0;for(var p=Xh(d),t=0;t<p.length;t++){var x=p[d.endList||0===m?t:p.length-(t+1)],u=x.segment,z=x.part&&x.part.start||u&&u.start;if(u.timeline===h&&"undefined"!==typeof z){u=Math.abs(m-z);if(null!==f&&f<u)break;if(!b||null===f||f>=u)f=u,b={time:z,segmentIndex:x.segmentIndex, 1253partIndex:x.partIndex}}}return b}},{name:"Discontinuity",run:function(b,d,f,h,m){f=null;m=m||0;if(d.discontinuityStarts&&d.discontinuityStarts.length){h=null;for(var p=0;p<d.discontinuityStarts.length;p++){var t=d.discontinuityStarts[p],x=b.discontinuities[d.discontinuitySequence+p+1];if(x){var u=Math.abs(m-x.time);if(null!==h&&h<u)break;if(!f||null===h||h>=u)h=u,f={time:x.time,segmentIndex:t,partIndex:null}}}}return f}},{name:"Playlist",run:function(b,d,f,h,m){return d.syncInfo?{time:d.syncInfo.time, 1254segmentIndex:d.syncInfo.mediaSequence-d.mediaSequence,partIndex:null}:null}}],Hb=function(b){b=O.EventTarget.call(this)||this;b.timelines=[];b.discontinuities=[];b.timelineToDatetimeMappings={};var d=new cc,f=new Hg(d),h=new Hg(d);b.mediaSequenceStorage_={main:d,audio:f,vtt:h};b.logger_=ac("SyncController");return b};$jscomp.inherits(Hb,O.EventTarget);Hb.prototype.getMediaSequenceSync=function(b){return this.mediaSequenceStorage_[b]||null};Hb.prototype.getSyncPoint=function(b,d,f,h,m){if(Infinity!== 1255d)return Bi.find(function(z){return"VOD"===z.name}).run(this,b,d);d=this.runStrategies_(b,d,f,h,m);if(!d.length)return null;f=$jscomp.makeIterator(d);for(m=f.next();!m.done;m=f.next()){m=m.value;var p=m.syncPoint,t=p,x=t.segmentIndex;if(!(0>x)){t=t.time;var u=t+b.segments[x].duration;this.logger_("Strategy: "+m.strategy+". Current time: "+h+". selected segment: "+x+". Time: ["+t+" -\x3e "+u+"]}");if(h>=t&&h<u)return this.logger_("Found sync point with exact match: ",p),p}}return this.selectSyncPoint_(d, 1256{key:"time",value:h})};Hb.prototype.getExpiredTime=function(b,d){if(!b||!b.segments)return null;d=this.runStrategies_(b,d,b.discontinuitySequence,0);if(!d.length)return null;d=this.selectSyncPoint_(d,{key:"segmentIndex",value:0});0<d.segmentIndex&&(d.time*=-1);return Math.abs(d.time+Ve({defaultDuration:b.targetDuration,durationList:b.segments,startIndex:d.segmentIndex,endIndex:0}))};Hb.prototype.runStrategies_=function(b,d,f,h,m){for(var p=[],t=0;t<Bi.length;t++){var x=Bi[t],u=x.run(this,b,d,f,h, 1257m);u&&(u.strategy=x.name,p.push({strategy:x.name,syncPoint:u}))}return p};Hb.prototype.selectSyncPoint_=function(b,d){for(var f=b[0].syncPoint,h=Math.abs(b[0].syncPoint[d.key]-d.value),m=b[0].strategy,p=1;p<b.length;p++){var t=Math.abs(b[p].syncPoint[d.key]-d.value);t<h&&(h=t,f=b[p].syncPoint,m=b[p].strategy)}this.logger_("syncPoint for ["+d.key+": "+d.value+"] chosen with strategy ["+(m+"]: [time:"+f.time+", segmentIndex:")+f.segmentIndex+("number"===typeof f.partIndex?",partIndex:"+f.partIndex: 1258"")+"]");return f};Hb.prototype.saveExpiredSegmentInfo=function(b,d){var f=d.mediaSequence-b.mediaSequence;if(86400<f)O.log.warn("Not saving expired segment info. Media sequence gap "+f+" is too large.");else for(--f;0<=f;f--){var h=b.segments[f];if(h&&"undefined"!==typeof h.start){d.syncInfo={mediaSequence:b.mediaSequence+f,time:h.start};this.logger_("playlist refresh sync: [time:"+d.syncInfo.time+", mediaSequence: "+(d.syncInfo.mediaSequence+"]"));this.trigger("syncinfoupdate");break}}};Hb.prototype.setDateTimeMappingForStart= 1259function(b){this.timelineToDatetimeMappings={};if(b.segments&&b.segments.length&&b.segments[0].dateTimeObject){b=b.segments[0];var d=b.dateTimeObject.getTime()/1E3;this.timelineToDatetimeMappings[b.timeline]=-d}};Hb.prototype.saveSegmentTimingInfo=function(b){var d=b.segmentInfo;b=b.shouldSaveTimelineMapping;var f=this.calculateSegmentTimeMapping_(d,d.timingInfo,b),h=d.segment;f&&(this.saveDiscontinuitySyncInfo_(d),d.playlist.syncInfo||(d.playlist.syncInfo={mediaSequence:d.playlist.mediaSequence+ 1260d.mediaIndex,time:h.start}));d=h.dateTimeObject;h.discontinuity&&b&&d&&(this.timelineToDatetimeMappings[h.timeline]=-(d.getTime()/1E3))};Hb.prototype.timestampOffsetForTimeline=function(b){return"undefined"===typeof this.timelines[b]?null:this.timelines[b].time};Hb.prototype.mappingForTimeline=function(b){return"undefined"===typeof this.timelines[b]?null:this.timelines[b].mapping};Hb.prototype.calculateSegmentTimeMapping_=function(b,d,f){var h=b.segment,m=b.part,p=this.timelines[b.timeline];if("number"=== 1261typeof b.timestampOffset)p={time:b.startOfSegment,mapping:b.startOfSegment-d.start},f&&(this.timelines[b.timeline]=p,this.trigger("timestampoffset"),this.logger_("time mapping for timeline "+b.timeline+": [time: "+(p.time+"] [mapping: "+p.mapping+"]"))),b=b.startOfSegment,d=d.end+p.mapping;else if(p)b=d.start+p.mapping,d=d.end+p.mapping;else return!1;m&&(m.start=b,m.end=d);if(!h.start||b<h.start)h.start=b;h.end=d;return!0};Hb.prototype.saveDiscontinuitySyncInfo_=function(b){var d=b.playlist,f=b.segment; 1262if(f.discontinuity)this.discontinuities[f.timeline]={time:f.start,accuracy:0};else if(d.discontinuityStarts&&d.discontinuityStarts.length)for(var h=0;h<d.discontinuityStarts.length;h++){var m=d.discontinuityStarts[h],p=d.discontinuitySequence+h+1,t=m-b.mediaIndex,x=Math.abs(t);if(!this.discontinuities[p]||this.discontinuities[p].accuracy>x)m=0>t?f.start-Ve({defaultDuration:d.targetDuration,durationList:d.segments,startIndex:b.mediaIndex,endIndex:m}):f.end+Ve({defaultDuration:d.targetDuration,durationList:d.segments, 1263startIndex:b.mediaIndex+1,endIndex:m}),this.discontinuities[p]={time:m,accuracy:x}}};Hb.prototype.dispose=function(){this.trigger("dispose");this.off()};var ne=function(){var b=O.EventTarget.call(this)||this;b.pendingTimelineChanges_={};b.lastTimelineChanges_={};return b};$jscomp.inherits(ne,O.EventTarget);ne.prototype.clearPendingTimelineChange=function(b){this.pendingTimelineChanges_[b]=null;this.trigger("pendingtimelinechange")};ne.prototype.pendingTimelineChange=function(b){var d=b.type,f=b.from; 1264b=b.to;"number"===typeof f&&"number"===typeof b&&(this.pendingTimelineChanges_[d]={type:d,from:f,to:b},this.trigger("pendingtimelinechange"));return this.pendingTimelineChanges_[d]};ne.prototype.lastTimelineChange=function(b){var d=b.type,f=b.from;b=b.to;"number"===typeof f&&"number"===typeof b&&(this.lastTimelineChanges_[d]={type:d,from:f,to:b},delete this.pendingTimelineChanges_[d],this.trigger({type:"timelinechange",metadata:{timelineChangeInfo:{from:f,to:b}}}));return this.lastTimelineChanges_[d]}; 1265ne.prototype.dispose=function(){this.trigger("dispose");this.pendingTimelineChanges_={};this.lastTimelineChanges_={};this.off()};var Vq=Il(Jl(function(){var b=function(){function u(){this.listeners={}}var z=u.prototype;z.on=function(A,F){this.listeners[A]||(this.listeners[A]=[]);this.listeners[A].push(F)};z.off=function(A,F){if(!this.listeners[A])return!1;F=this.listeners[A].indexOf(F);this.listeners[A]=this.listeners[A].slice(0);this.listeners[A].splice(F,1);return-1<F};z.trigger=function(A){var F= 1266this.listeners[A];if(F)if(2===arguments.length)for(var H=F.length,L=0;L<H;++L)F[L].call(this,arguments[1]);
1266else{H=Array.prototype.slice.call(arguments,1);L=F.length;for(var I=0;I<L;++I)F[I].apply(this,H)}};z.dispose=function(){this.listeners={}};z.pipe=function(A){this.on("data",function(F){A.push(F)})};return u}(),d=null,f=function(u){if(!d){var z=[[[],[],[],[],[]],[[],[],[],[],[]]],A=z[0],F=z[1],H=A[4],L=F[4],I,N,T,fa=[],X=[],ra;for(I=0;256>I;I++)X[(fa[I]=I<<1^283*(I>>7))^I]=I;for(N=T=0;!H[N];N^= 1267ra||1,T=X[T]||1){var ca=T^T<<1^T<<2^T<<3^T<<4;ca=ca>>8^ca&255^99;H[N]=ca;L[ca]=N;var ea=fa[I=fa[ra=fa[N]]];var ja=16843009*ea^65537*I^257*ra^16843008*N;ea=257*fa[ca]^16843008*ca;for(I=0;4>I;I++)A[I][N]=ea=ea<<24^ea>>>8,F[I][ca]=ja=ja<<24^ja>>>8}for(I=0;5>I;I++)A[I]=A[I].slice(0),F[I]=F[I].slice(0);d=z}this._tables=[[d[0][0].slice(),d[0][1].slice(),d[0][2].slice(),d[0][3].slice(),d[0][4].slice()],[d[1][0].slice(),d[1][1].slice(),d[1][2].slice(),d[1][3].slice(),d[1][4].slice()]];z=this._tables[0][4]; 1268A=this._tables[1];H=u.length;L=1;if(4!==H&&6!==H&&8!==H)throw Error("Invalid aes key size");N=u.slice(0);T=[];this._key=[N,T];for(u=H;u<4*H+28;u++){F=N[u-1];if(0===u%H||8===H&&4===u%H)F=z[F>>>24]<<24^z[F>>16&255]<<16^z[F>>8&255]<<8^z[F&255],0===u%H&&(F=F<<8^F>>>24^L<<24,L=L<<1^283*(L>>7));N[u]=N[u-H]^F}for(H=0;u;H++,u--)F=N[H&3?u:u-4],T[H]=4>=u||4>H?F:A[0][z[F>>>24]]^A[1][z[F>>16&255]]^A[2][z[F>>8&255]]^A[3][z[F&255]]};f.prototype.decrypt=function(u,z,A,F,H,L){var I=this._key[1];u^=I[0];F^=I[1];A^= 1269I[2];z^=I[3];var N=I.length/4-2,T,fa=4;var X=this._tables[1];var ra=X[0],ca=X[1],ea=X[2],ja=X[3],Aa=X[4];for(T=0;T<N;T++){X=ra[u>>>24]^ca[F>>16&255]^ea[A>>8&255]^ja[z&255]^I[fa];var ta=ra[F>>>24]^ca[A>>16&255]^ea[z>>8&255]^ja[u&255]^I[fa+1];var mb=ra[A>>>24]^ca[z>>16&255]^ea[u>>8&255]^ja[F&255]^I[fa+2];z=ra[z>>>24]^ca[u>>16&255]^ea[F>>8&255]^ja[A&255]^I[fa+3];fa+=4;u=X;F=ta;A=mb}for(T=0;4>T;T++)H[(3&-T)+L]=Aa[u>>>24]<<24^Aa[F>>16&255]<<16^Aa[A>>8&255]<<8^Aa[z&255]^I[fa++],X=u,u=F,F=A,A=z,z=X};var h= 1270function(){var u=b.call(this,b)||this;u.jobs=[];u.delay=1;u.timeout_=null;return u};$jscomp.inherits(h,b);h.prototype.processJob_=function(){this.jobs.shift()();this.timeout_=this.jobs.length?setTimeout(this.processJob_.bind(this),this.delay):null};h.prototype.push=function(u){this.jobs.push(u);this.timeout_||(this.timeout_=setTimeout(this.processJob_.bind(this),this.delay))};var m=function(u){return u<<24|(u&65280)<<8|(u&16711680)>>8|u>>>24},p=function(u,z,A,F){var H=p.STEP,L=new Int32Array(u.buffer), 1271I=new Uint8Array(u.byteLength);u=0;this.asyncStream_=new h;this.asyncStream_.push(this.decryptChunk_(L.subarray(u,u+H),z,A,I));for(u=H;u<L.length;u+=H)A=new Uint32Array([m(L[u-4]),m(L[u-3]),m(L[u-2]),m(L[u-1])]),this.asyncStream_.push(this.decryptChunk_(L.subarray(u,u+H),z,A,I));this.asyncStream_.push(function(){F(null,I.subarray(0,I.byteLength-I[I.byteLength-1]))})};p.prototype.decryptChunk_=function(u,z,A,F){return function(){var H=new Int32Array(u.buffer,u.byteOffset,u.byteLength>>2),L=new f(Array.prototype.slice.call(z)), 1272I=new Uint8Array(u.byteLength),N=new Int32Array(I.buffer),T;var fa=A[0];var X=A[1];var ra=A[2];var ca=A[3];for(T=0;T<H.length;T+=4){var ea=m(H[T]);var ja=m(H[T+1]);var Aa=m(H[T+2]);var ta=m(H[T+3]);L.decrypt(ea,ja,Aa,ta,N,T);N[T]=m(N[T]^fa);N[T+1]=m(N[T+1]^X);N[T+2]=m(N[T+2]^ra);N[T+3]=m(N[T+3]^ca);fa=ea;X=ja;ra=Aa;ca=ta}F.set(I,u.byteOffset)}};$jscomp.global.Object.defineProperties(p,{STEP:{configurable:!0,enumerable:!0,get:function(){return 32E3}}});var t="undefined"!==typeof globalThis?globalThis: 1273"undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};t=("undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{}).BigInt||Number;[t("0x1"),t("0x100"),t("0x10000"),t("0x1000000"),t("0x100000000"),t("0x10000000000"),t("0x1000000000000"),t("0x100000000000000"),t("0x10000000000000000")];(function(){var u=new Uint16Array([65484]);u=new Uint8Array(u.buffer,u.byteOffset,u.byteLength);return 255===u[0]?"big":204===u[0]? 1274"little":"unknown"})();var x=function(u){var z={};Object.keys(u).forEach(function(A){var F=u[A];var H="function"===ArrayBuffer.isView?ArrayBuffer.isView(F):F&&F.buffer instanceof ArrayBuffer;z[A]=H?{bytes:F.buffer,byteOffset:F.byteOffset,byteLength:F.byteLength}:F});return z};self.onmessage=function(u){var z=u.data;u=new Uint8Array(z.encrypted.bytes,z.encrypted.byteOffset,z.encrypted.byteLength);var A=new Uint32Array(z.key.bytes,z.key.byteOffset,z.key.byteLength/4),F=new Uint32Array(z.iv.bytes,z.iv.byteOffset, 1275z.iv.byteLength/4);new p(u,A,F,function(H,L){self.postMessage(x({source:z.source,decrypted:L}),[L.buffer])})}})),Wq=Hl(Vq),Fm=function(b,d){b.abort();b.pause();d&&d.activePlaylistLoader&&(d.activePlaylistLoader.pause(),d.activePlaylistLoader=null)},Xq=function(b,d){return function(){var f=d.segmentLoaders,h=f[b],m=f.main;f=d.mediaTypes[b];var p=f.activeTrack(),t=f.getActiveGroup(),x=f.activePlaylistLoader,u=f.lastGroup_;t&&u&&t.id===u.id||(f.lastGroup_=t,f.lastTrack_=p,Fm(h,f),t&&!t.isMainPlaylist&& 1276(t.playlistLoader?(h.resyncLoader(),h=t.playlistLoader,f.activePlaylistLoader=h,h.load()):x&&m.resetEverything()))}},Yq=function(b,d){return function(){var f=d.segmentLoaders[b];d.mediaTypes[b].lastGroup_=null;f.abort();f.pause()}},Zq=function(b,d){return function(){var f=d.mainPlaylistLoader,h=d.segmentLoaders,m=h[b],p=h.main;h=d.mediaTypes[b];var t=h.activeTrack(),x=h.getActiveGroup(),u=h.activePlaylistLoader,z=h.lastTrack_;if(!z||!t||z.id!==t.id)if(h.lastGroup_=x,h.lastTrack_=t,Fm(m,h),x)if(x.isMainPlaylist)t&& 1277z&&t.id!==z.id&&(m=d.vhs.playlistController_,x=m.selectPlaylist(),m.media()!==x&&(h.logger_("track change. Switching main audio from "+z.id+" to "+t.id),f.pause(),p.resetEverything(),m.fastQualityChange_(x)));else{if("AUDIO"===b){if(!x.playlistLoader){p.setAudio(!0);p.resetEverything();return}m.setAudio(!0);p.setAudio(!1)}u===x.playlistLoader?(f=x.playlistLoader,h.activePlaylistLoader=f,f.load()):(m.track&&m.track(t),m.resetEverything(),f=x.playlistLoader,h.activePlaylistLoader=f,f.load())}}},Ig= 1278{AUDIO:function(b,d){return function(){var f=d.mediaTypes[b],h=d.excludePlaylist,m=f.activeTrack(),p=f.activeGroup();p=(p.filter(function(x){return x.default})[0]||p[0]).id;p=f.tracks[p];if(m===p)h({error:{message:"Problem encountered loading the default audio track."}});else{O.log.warn("Problem encountered loading the alternate audio track.Switching back to default.");for(var t in f.tracks)f.tracks[t].enabled=f.tracks[t]===p;f.onTrackChanged()}}},SUBTITLES:function(b,d){return function(){var f=d.mediaTypes[b]; 1279O.log.warn("Problem encountered loading the subtitle track.Disabling subtitle track.");var h=f.activeTrack();h&&(h.mode="disabled");f.onTrackChanged()}}},Gm={AUDIO:function(b,d,f){if(d){var h=f.tech,m=f.requestOptions,p=f.segmentLoaders[b];d.on("loadedmetadata",function(){var t=d.media();p.playlist(t,m);(!h.paused()||t.endList&&"none"!==h.preload())&&p.load()});d.on("loadedplaylist",function(){p.playlist(d.media(),m);h.paused()||p.load()});d.on("error",Ig[b](b,f))}},SUBTITLES:function(b,d,f){var h= 1280f.tech,m=f.requestOptions,p=f.segmentLoaders[b],t=f.mediaTypes[b];d.on("loadedmetadata",function(){var x=d.media();p.playlist(x,m);p.track(t.activeTrack());(!h.paused()||x.endList&&"none"!==h.preload())&&p.load()});d.on("loadedplaylist",function(){p.playlist(d.media(),m);h.paused()||p.load()});d.on("error",Ig[b](b,f))}},$q={AUDIO:function(b,d){var f=d.vhs,h=d.sourceType,m=d.segmentLoaders[b],p=d.requestOptions,t=d.main.mediaGroups,x=d.mediaTypes[b],u=x.groups,z=x.tracks;x=x.logger_;var A=d.mainPlaylistLoader, 1281F=We(A.main);t[b]&&0!==Object.keys(t[b]).length||(t[b]={main:{default:{default:!0}}},F&&(t[b].main.default.playlists=A.main.playlists));for(var H in t[b]){u[H]||(u[H]=[]);for(var L in t[b][H]){var I=t[b][H][L];if(F){x("AUDIO group 'com.qvc.commerce.cpm' label '"+L+"' is a main playlist");I.isMainPlaylist=!0;var N=null}else N="vhs-json"===h&&I.playlists?new Fa(I.playlists[0],f,p):I.resolvedUri?new Fa(I.resolvedUri,f,p):I.playlists&&"dash"===h?new Qa(I.playlists[0],f,p,A):null;I=Ba({id:L,playlistLoader:N}, 1282I);Gm[b](b,I.playlistLoader,d);u[H].push(I);if("undefined"===typeof z[L]){N=O.AudioTrack;var T=I.default?"main":"alternative";I.characteristics&&0<=I.characteristics.indexOf("public.accessibility.describes-video")&&(T="main-desc");I=new N({id:L,kind:T,enabled:!1,language:I.language,default:I.default,label:L});z[L]=I}}}m.on("error",Ig[b](b,d))},SUBTITLES:function(b,d){var f=d.tech,h=d.vhs,m=d.sourceType,p=d.segmentLoaders[b],t=d.requestOptions,x=d.main.mediaGroups,u=d.mediaTypes[b],z=u.groups;u=u.tracks; 1283var A=d.mainPlaylistLoader,F;for(F in x[b]){z[F]||(z[F]=[]);
1283for(var H in x[b][F])if(h.options_.useForcedSubtitles||!x[b][F][H].forced){var L=x[b][F][H],I=void 0;if("hls"===m)I=new Fa(L.resolvedUri,h,t);else if("dash"===m){if(!L.playlists.filter(function(N){return Infinity!==N.excludeUntil}).length)return;I=new Qa(L.playlists[0],h,t,A)}else"vhs-json"===m&&(I=new Fa(L.playlists?L.playlists[0]:L.resolvedUri,h,t));L=Ba({id:H,playlistLoader:I},L);Gm[b](b,L.playlistLoader,d);z[F].push(L);"undefined"=== 1284typeof u[H]&&(L=f.addRemoteTextTrack({id:H,kind:"subtitles",default:L.default&&L.autoselect,language:L.language,label:H},!1).track,u[H]=L)}}p.on("error",Ig[b](b,d))},"CLOSED-CAPTIONS":function(b,d){var f=d.tech,h=d.main.mediaGroups,m=d.mediaTypes[b];d=m.groups;m=m.tracks;for(var p in h[b]){d[p]||(d[p]=[]);for(var t in h[b][p]){var x=h[b][p][t];if(/^(?:CC|SERVICE)/.test(x.instreamId)){var u=f.options_.vhs&&f.options_.vhs.captionServices||{},z={label:t,language:x.language,instreamId:x.instreamId,default:x.default&& 1285x.autoselect};u[z.instreamId]&&(z=Ba(z,u[z.instreamId]));void 0===z.default&&delete z.default;d[p].push(Ba({id:t},x));"undefined"===typeof m[t]&&(x=f.addRemoteTextTrack({id:z.instreamId,kind:"captions",default:z.default,language:z.language,label:z.label},!1).track,m[t]=x)}}}}},Hm=function(b,d){for(var f=0;f<b.length;f++)if($h(d,b[f])||b[f].playlists&&Hm(b[f].playlists,d))return!0;return!1},ar=function(b,d){return function(f){var h=d.mediaTypes[b].groups,m=d.mainPlaylistLoader.media();if(!m)return null; 1286var p=null;m.attributes[b]&&(p=h[m.attributes[b]]);var t=Object.keys(h);if(!p)if("AUDIO"===b&&1<t.length&&We(d.main))for(var x=0;x<t.length;x++){var u=h[t[x]];if(Hm(u,m)){p=u;break}}else h.main?p=h.main:1===t.length&&(p=h[t[0]]);return"undefined"===typeof f?p:null!==f&&p?p.filter(function(z){return z.id===f.id})[0]||null:null}},br={AUDIO:function(b,d){return function(){var f=d.mediaTypes[b].tracks,h;for(h in f)if(f[h].enabled)return f[h];return null}},SUBTITLES:function(b,d){return function(){var f= 1287d.mediaTypes[b].tracks,h;for(h in f)if("showing"===f[h].mode||"hidden"===f[h].mode)return f[h];return null}}},cr=function(b,d){var f=d.mediaTypes;return function(){var h=f[b].activeTrack();return h?f[b].activeGroup(h):null}},dr=function(b){["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(A){$q[A](A,b)});var d=b.mediaTypes,f=b.mainPlaylistLoader,h=b.tech,m=b.vhs,p=b.segmentLoaders,t=p.AUDIO;p=p.main;["AUDIO","SUBTITLES"].forEach(function(A){d[A].activeGroup=ar(A,b);d[A].activeTrack=br[A](A, 1288b);d[A].onGroupChanged=Xq(A,b);d[A].onGroupChanging=Yq(A,b);d[A].onTrackChanged=Zq(A,b);d[A].getActiveGroup=cr(A,b)});var x=d.AUDIO.activeGroup();x&&(x=(x.filter(function(A){return A.default})[0]||x[0]).id,d.AUDIO.tracks[x].enabled=!0,d.AUDIO.onGroupChanged(),d.AUDIO.onTrackChanged(),d.AUDIO.getActiveGroup().playlistLoader?(p.setAudio(!1),t.setAudio(!0)):p.setAudio(!0));f.on("mediachange",function(){["AUDIO","SUBTITLES"].forEach(function(A){return d[A].onGroupChanged()})});f.on("mediachanging",function(){["AUDIO", 1289"SUBTITLES"].forEach(function(A){return d[A].onGroupChanging()})});var u=function(){d.AUDIO.onTrackChanged();h.trigger({type:"usage",name:"vhs-audio-change"})};h.audioTracks().addEventListener("change",u);h.remoteTextTracks().addEventListener("change",d.SUBTITLES.onTrackChanged);m.on("dispose",function(){h.audioTracks().removeEventListener("change",u);h.remoteTextTracks().removeEventListener("change",d.SUBTITLES.onTrackChanged)});h.clearTracks("audio");for(var z in d.AUDIO.tracks)h.audioTracks().addTrack(d.AUDIO.tracks[z])}, 1290er=function(){var b={};["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(d){b[d]={groups:{},tracks:{},activePlaylistLoader:null,activeGroup:Cc,activeTrack:Cc,getActiveGroup:Cc,onGroupChanged:Cc,onTrackChanged:Cc,lastTrack_:null,logger_:ac("MediaGroups["+d+"]")}});return b},Ci=function(){this.priority_=[];this.pathwayClones_=new Map};$jscomp.global.Object.defineProperties(Ci.prototype,{version:{configurable:!0,enumerable:!0,set:function(b){1===b&&(this.version_=b)},get:function(){return this.version_}}, 1291ttl:{configurable:!0,enumerable:!0,set:function(b){this.ttl_=b||300},get:function(){return this.ttl_}},reloadUri:{configurable:!0,enumerable:!0,set:function(b){b&&(this.reloadUri_=qb(this.reloadUri_,b))},get:function(){return this.reloadUri_}},priority:{configurable:!0,enumerable:!0,set:function(b){b&&b.length&&(this.priority_=b)},get:function(){return this.priority_}},pathwayClones:{configurable:!0,enumerable:!0,set:function(b){b&&b.length&&(this.pathwayClones_=new Map(b.map(function(d){return[d.ID, 1292d]})))},get:function(){return this.pathwayClones_}}});var kb=function(b,d){var f=O.EventTarget.call(this)||this;f.currentPathway=null;f.defaultPathway=null;f.queryBeforeStart=!1;f.availablePathways_=new Set;f.steeringManifest=new Ci;f.proxyServerUrl_=null;f.manifestType_=null;f.ttlTimeout_=null;f.request_=null;f.currentPathwayClones=new Map;f.nextPathwayClones=new Map;f.excludedSteeringManifestURLs=new Set;f.logger_=ac("Content Steering");f.xhr_=b;f.getBandwidth_=d;return f};$jscomp.inherits(kb,O.EventTarget); 1293kb.prototype.assignTagProperties=function(b,d){this.manifestType_=d.serverUri?"HLS":"DASH";var f=d.serverUri||d.serverURL;f?f.startsWith("data:")?this.decodeDataUriManifest_(f.substring(f.indexOf(",")+1)):(this.steeringManifest.reloadUri=qb(b,f),this.defaultPathway=d.pathwayId||d.defaultServiceLocation,this.queryBeforeStart=d.queryBeforeStart,this.proxyServerUrl_=d.proxyServerURL,this.defaultPathway&&!this.queryBeforeStart&&this.trigger("content-steering")):(this.logger_("steering manifest URL is "+ 1294f+", cannot request steering manifest."),this.trigger("error"))};kb.prototype.requestSteeringManifest=function(b){var d=this,f=this.steeringManifest.reloadUri;if(f){var h=b?f:this.getRequestURI(f);if(h){var m={contentSteeringInfo:{uri:h}};this.trigger({type:"contentsteeringloadstart",metadata:m});this.request_=this.xhr_({uri:h,requestType:"content-steering-manifest"},function(p,t){if(p)410===t.status?(d.logger_("manifest request 410 "+p+"."),d.logger_("There will be no more content steering requests to "+ 1295h+" this session."),d.excludedSteeringManifestURLs.add(h)):429===t.status?(t=t.responseHeaders["retry-after"],d.logger_("manifest request 429 "+p+"."),d.logger_("content steering will retry in "+t+" seconds."),d.startTTLTimeout_(parseInt(t,10))):(d.logger_("manifest failed to load "+p+"."),d.startTTLTimeout_());else{d.trigger({type:"contentsteeringloadcomplete",metadata:m});try{var x=JSON.parse(d.request_.responseText)}catch(u){d.trigger({type:"error",metadata:{errorType:O.Error.StreamingContentSteeringParserError, 1296error:u}})}d.assignSteeringProperties_(x);d.trigger({type:"contentsteeringparsed",metadata:{contentSteeringInfo:m.contentSteeringInfo,contentSteeringManifest:{version:d.steeringManifest.version,reloadUri:d.steeringManifest.reloadUri,priority:d.steeringManifest.priority}}});d.startTTLTimeout_()}})}else this.logger_("No valid content steering manifest URIs. Stopping content steering."),this.trigger("error"),this.dispose()}};kb.prototype.setProxyServerUrl_=function(b){b=new window.URL(b);var d=new window.URL(this.proxyServerUrl_); 1297d.searchParams.set("url",encodeURI(b.toString()));return this.setSteeringParams_(d.toString())};kb.prototype.decodeDataUriManifest_=function(b){b=JSON.parse(window.atob(b));this.assignSteeringProperties_(b)};kb.prototype.setSteeringParams_=function(b){b=new window.URL(b);var d=this.getPathway(),f=this.getBandwidth_();d&&b.searchParams.set("_"+this.manifestType_+"_pathway",d);f&&b.searchParams.set("_"+this.manifestType_+"_throughput",f);return b.toString()};kb.prototype.assignSteeringProperties_=function(b){this.steeringManifest.version= 1298b.VERSION;if(this.steeringManifest.version){this.steeringManifest.ttl=b.TTL;this.steeringManifest.reloadUri=b["RELOAD-URI"];this.steeringManifest.priority=b["PATHWAY-PRIORITY"]||b["SERVICE-LOCATION-PRIORITY"];this.steeringManifest.pathwayClones=b["PATHWAY-CLONES"];this.nextPathwayClones=this.steeringManifest.pathwayClones;this.availablePathways_.size||(this.logger_("There are no available pathways for c
1298ontent steering. Ending content steering."),this.trigger("error"),this.dispose());a:{b=$jscomp.makeIterator(this.steeringManifest.priority); 1299for(var d=b.next();!d.done;d=b.next())if(d=d.value,this.availablePathways_.has(d)){b=d;break a}b=[].concat($jscomp.arrayFromIterable(this.availablePathways_))[0]}this.currentPathway!==b&&(this.currentPathway=b,this.trigger("content-steering"))}else this.logger_("manifest version is "+b.VERSION+", which is not supported."),this.trigger("error")};kb.prototype.getPathway=function(){return this.currentPathway||this.defaultPathway};kb.prototype.getRequestURI=function(b){if(!b)return null;if(this.proxyServerUrl_){var d= 1300this.setProxyServerUrl_(b);if(!this.excludedSteeringManifestURLs.has(d))return d}b=this.setSteeringParams_(b);return this.excludedSteeringManifestURLs.has(b)?null:b};kb.prototype.startTTLTimeout_=function(b){var d=this;b=void 0===b?this.steeringManifest.ttl:b;this.ttlTimeout_=window.setTimeout(function(){d.requestSteeringManifest()},1E3*b)};kb.prototype.clearTTLTimeout_=function(){window.clearTimeout(this.ttlTimeout_);this.ttlTimeout_=null};kb.prototype.abort=function(){this.request_&&this.request_.abort(); 1301this.request_=null};kb.prototype.dispose=function(){this.off("content-steering");this.off("error");this.abort();this.clearTTLTimeout_();this.request_=this.ttlTimeout_=this.manifestType_=this.proxyServerUrl_=this.queryBeforeStart=this.defaultPathway=this.currentPathway=null;this.excludedSteeringManifestURLs=new Set;this.availablePathways_=new Set;this.steeringManifest=new Ci};kb.prototype.addAvailablePathway=function(b){b&&this.availablePathways_.add(b)};kb.prototype.clearAvailablePathways=function(){this.availablePathways_.clear()}; 1302kb.prototype.excludePathway=function(b){return this.availablePathways_.delete(b)};kb.prototype.didDASHTagChange=function(b,d){return!d&&this.steeringManifest.reloadUri||d&&(qb(b,d.serverURL)!==this.steeringManifest.reloadUri||d.defaultServiceLocation!==this.defaultPathway||d.queryBeforeStart!==this.queryBeforeStart||d.proxyServerURL!==this.proxyServerUrl_)};kb.prototype.getAvailablePathways=function(){return this.availablePathways_};var ad,fr="mediaRequests mediaRequestsAborted mediaRequestsTimedout mediaRequestsErrored mediaTransferDuration mediaBytesTransferred mediaAppends".split(" "), 1303gr=function(b){return this.audioSegmentLoader_[b]+this.mainSegmentLoader_[b]},hr=function(b){var d=b.currentPlaylist,f=b.buffered,h=b.currentTime,m=b.nextPlaylist,p=b.bufferLowWaterLine,t=b.bufferHighWaterLine,x=b.duration,u=b.bufferBasedABR;b=b.log;if(!m)return O.log.warn("We received no playlist to switch to. Please check your stream."),!1;var z="allowing switch "+(d&&d.id||"null")+" -\x3e "+m.id;if(!d)return b(z+" as current playlist is not set"),!0;if(m.id===d.id)return!1;var A=!!fe(f,h).length; 1304if(!d.endList){if(!A&&"number"===typeof d.partTargetDuration)return b("not "+z+" as current playlist is live llhls, but currentTime isn't in buffered."),!1;b(z+" as current playlist is live");return!0}f=Vh(f,h);h=u?pb.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE:pb.MAX_BUFFER_LOW_WATER_LINE;if(x<h)return b(z+" as duration \x3c max low water line ("+x+" \x3c "+h+")"),!0;m=m.attributes.BANDWIDTH;d=d.attributes.BANDWIDTH;if(m<d&&(!u||f<t))return p=z+" as next bandwidth \x3c current bandwidth ("+m+" \x3c "+ 1305d+")",u&&(p+=" and forwardBuffer \x3c bufferHighWaterLine ("+f+" \x3c "+t+")"),b(p),!0;if((!u||m>d)&&f>=p)return t=z+" as forwardBuffer \x3e\x3d bufferLowWaterLine ("+f+" \x3e\x3d "+p+")",u&&(t+=" and next bandwidth \x3e current bandwidth ("+m+" \x3e "+d+")"),b(t),!0;b("not "+z+" as no switching criteria met");return!1},ha=function(b){var d=O.EventTarget.call(this)||this;var f=b.src,h=b.withCredentials,m=b.tech,p=b.bandwidth,t=b.externVhs,x=b.useCueTags,u=b.playlistExclusionDuration,z=b.enableLowInitialPlaylist, 1306A=b.sourceType,F=b.cacheEncryptionKeys,H=b.bufferBasedABR,L=b.leastPixelDiffSelector,I=b.captionServices,N=b.experimentalUseMMS;if(!f)throw Error("A non-empty playlist URL or JSON manifest string is required");var T=b.maxPlaylistRetries;if(null===T||"undefined"===typeof T)T=Infinity;ad=t;d.bufferBasedABR=!!H;d.leastPixelDiffSelector=!!L;d.withCredentials=h;d.tech_=m;
1306d.vhs_=m.vhs;d.player_=b.player_;d.sourceType_=A;d.useCueTags_=x;d.playlistExclusionDuration=u;d.maxPlaylistRetries=T;d.enableLowInitialPlaylist= 1307z;d.useCueTags_&&(d.cueTagsTrack_=d.tech_.addTextTrack("metadata","ad-cues"),d.cueTagsTrack_.inBandMetadataTrackDispatchType="");d.requestOptions_={withCredentials:h,maxPlaylistRetries:T,timeout:null};d.on("error",d.pauseLoading);d.mediaTypes_=er();N&&window.ManagedMediaSource?(d.tech_.el_.disableRemotePlayback=!0,d.mediaSource=new window.ManagedMediaSource,O.log("Using ManagedMediaSource")):window.MediaSource&&(d.mediaSource=new window.MediaSource);d.handleDurationChange_=d.handleDurationChange_.bind(d); 1308d.handleSourceOpen_=d.handleSourceOpen_.bind(d);d.handleSourceEnded_=d.handleSourceEnded_.bind(d);d.load=d.load.bind(d);d.pause=d.pause.bind(d);d.mediaSource.addEventListener("durationchange",d.handleDurationChange_);d.mediaSource.addEventListener("sourceopen",d.handleSourceOpen_);d.mediaSource.addEventListener("sourceended",d.handleSourceEnded_);d.mediaSource.addEventListener("startstreaming",d.load);d.mediaSource.addEventListener("endstreaming",d.pause);d.seekable_=nb();d.hasPlayed_=!1;d.syncController_= 1309new Hb(b);d.segmentMetadataTrack_=m.addRemoteTextTrack({kind:"metadata",label:"segment-metadata"},!1).track;d.decrypter_=new Wq;d.sourceUpdater_=new za(d.mediaSource);d.inbandTextTracks_={};d.timelineChangeController_=new ne;d.keyStatusMap_=new Map;h={vhs:d.vhs_,parse708captions:b.parse708captions,useDtsForTimestampOffset:b.useDtsForTimestampOffset,captionServices:I,mediaSource:d.mediaSource,currentTime:d.tech_.currentTime.bind(d.tech_),seekable:function(){return d.seekable()},seeking:function(){return d.tech_.seeking()}, 1310duration:function(){return d.duration()},hasPlayed:function(){return d.hasPlayed_},goalBufferLength:function(){return d.goalBufferLength()},bandwidth:p,syncController:d.syncController_,decrypter:d.decrypter_,sourceType:d.sourceType_,inbandTextTracks:d.inbandTextTracks_,cacheEncryptionKeys:F,sourceUpdater:d.sourceUpdater_,timelineChangeController:d.timelineChangeController_,exactManifestTimings:b.exactManifestTimings,addMetadataToTextTrack:d.addMetadataToTextTrack.bind(d)};d.mainPlaylistLoader_="dash"=== 1311d.sourceType_?new Qa(f,d.vhs_,Ba(d.requestOptions_,{addMetadataToTextTrack:d.addMetadataToTextTrack.bind(d)})):new Fa(f,d.vhs_,Ba(d.requestOptions_,{addDateRangesToTextTrack:d.addDateRangesToTextTrack_.bind(d)}));d.setupMainPlaylistLoaderListeners_();d.mainSegmentLoader_=new ba(Ba(h,{segmentMetadataTrack:d.segmentMetadataTrack_,loaderType:"main"}),b);d.audioSegmentLoader_=new ba(Ba(h,{loaderType:"audio"}),b);d.subtitleSegmentLoader_=new fb(Ba(h,{loaderType:"vtt",featuresNativeTextTracks:d.tech_.featuresNativeTextTracks, 1312loadVttJs:function(){return new Promise(function(fa,X){function ra(){m.off("vttjserror",ca);fa()}function ca(){m.off("vttjsloaded",ra);X()}m.one("vttjsloaded",ra);m.one("vttjserror",ca);m.addWebVttScript_()})}}),b);d.contentSteeringController_=new kb(d.vhs_.xhr,function(){return d.mainSegmentLoader_.bandwidth});d.setupSegmentLoaderListeners_();d.bufferBasedABR&&(d.mainPlaylistLoader_.one("loadedplaylist",function(){return d.startABRTimer_()}),d.tech_.on("pause",function(){return d.stopABRTimer_()}), 1313d.tech_.on("play",function(){return d.startABRTimer_()}));fr.forEach(function(fa){d[fa+"_"]=gr.bind(d,fa)});d.logger_=ac("pc");d.triggeredFmp4Usage=!1;"none"===d.tech_.preload()?(d.loadOnPlay_=function(){d.loadOnPlay_=null;d.mainPlaylistLoader_.load()},d.tech_.one("play",d.loadOnPlay_)):d.mainPlaylistLoader_.load();d.timeToLoadedData__=-1;d.mainAppendsToLoadedData__=-1;d.audioAppendsToLoadedData__=-1;b="none"===d.tech_.preload()?"play":"loadstart";d.tech_.one(b,function(){var fa=Date.now();d.tech_.one("loadeddata", 1314function(){d.timeToLoadedData__=Date.now()-fa;d.mainAppendsToLoadedData__=d.mainSegmentLoader_.mediaAppends;d.audioAppendsToLoadedData__=d.audioSegmentLoader_.mediaAppends})});return d};$jscomp.inherits(ha,O.EventTarget);ha.prototype.mainAppendsToLoadedData_=function(){return this.mainAppendsToLoadedData__};ha.prototype.audioAppendsToLoadedData_=function(){return this.audioAppendsToLoadedData__};ha.prototype.appendsToLoadedData_=function(){var b=this.mainAppendsToLoadedData_(),d=this.audioAppendsToLoadedData_(); 1315return-1===b||-1===d?-1:b+d};ha.prototype.timeToLoadedData_=function(){return this.timeToLoadedData__};ha.prototype.checkABR_=function(b){b=void 0===b?"abr":b;var d=this.selectPlaylist();d&&this.shouldSwitchToMedia_(d)&&this.switchMedia_(d,b)};ha.prototype.switchMedia_=function(b,d,f){var h=this.media();
1315h=h&&(h.id||h.uri);var m=b&&(b.id||b.uri);h&&h!==m&&(this.logger_("switch media "+h+" -\x3e "+m+" from "+d),this.trigger({type:"renditionselected",metadata:{renditionInfo:{id:m,bandwidth:b.attributes.BANDWIDTH, 1316resolution:b.attributes.RESOLUTION,codecs:b.attributes.CODECS},cause:d}}),this.tech_.trigger({type:"usage",name:"vhs-rendition-change-"+d}));this.mainPlaylistLoader_.media(b,f)};ha.prototype.switchMediaForDASHContentSteering_=function(){var b=this;["AUDIO","SUBTITLES","CLOSED-CAPTIONS"].forEach(function(d){var f=b.mediaTypes_[d];f=f?f.activeGroup():null;var h=b.contentSteeringController_.getPathway();f&&h&&(f=(f.length?f[0].playlists:f.playlists).filter(function(m){return m.attributes.serviceLocation=== 1317h}),f.length&&b.mediaTypes_[d].activePlaylistLoader.media(f[0]))})};ha.prototype.startABRTimer_=function(){var b=this;this.stopABRTimer_();this.abrTimer_=window.setInterval(function(){return b.checkABR_()},250)};ha.prototype.stopABRTimer_=function(){this.tech_.scrubbing&&this.tech_.scrubbing()||(window.clearInterval(this.abrTimer_),this.abrTimer_=null)};ha.prototype.getAudioTrackPlaylists_=function(){var b=this.main(),d=b&&b.playlists||[];if(!b||!b.mediaGroups||!b.mediaGroups.AUDIO)return d;var f= 1318b.mediaGroups.AUDIO,h=Object.keys(f);if(Object.keys(this.mediaTypes_.AUDIO.groups).length)var m=this.mediaTypes_.AUDIO.activeTrack();else{h=f.main||h.length&&f[h[0]];for(var p in h)if(h[p].default){m={label:p};break}}if(!m)return d;p=[];for(var t in f)if(f[t][m.label])if(h=f[t][m.label],h.playlists&&h.playlists.length)p.push.apply(p,h.playlists);else if(h.uri)p.push(h);else if(b.playlists.length)for(h=0;h<b.playlists.length;h++){var x=b.playlists[h];x.attributes&&x.attributes.AUDIO&&x.attributes.AUDIO=== 1319t&&p.push(x)}return p.length?p:d};ha.prototype.setupMainPlaylistLoaderListeners_=function(){var b=this;this.mainPlaylistLoader_.on("loadedmetadata",function(){var d=b.mainPlaylistLoader_.media(),f=1500*d.targetDuration;Zh(b.mainPlaylistLoader_.main,b.mainPlaylistLoader_.media())?b.requestOptions_.timeout=0:b.requestOptions_.timeout=f;d.endList&&"none"!==b.tech_.preload()&&(b.mainSegmentLoader_.playlist(d,b.requestOptions_),b.mainSegmentLoader_.load());dr({sourceType:b.sourceType_,segmentLoaders:{AUDIO:b.audioSegmentLoader_, 1320SUBTITLES:b.subtitleSegmentLoader_,main:b.mainSegmentLoader_},tech:b.tech_,requestOptions:b.requestOptions_,mainPlaylistLoader:b.mainPlaylistLoader_,vhs:b.vhs_,main:b.main(),mediaTypes:b.mediaTypes_,excludePlaylist:b.excludePlaylist.bind(b)});b.triggerPresenceUsage_(b.main(),d);b.setupFirstPlay();if(!b.mediaTypes_.AUDIO.activePlaylistLoader||b.mediaTypes_.AUDIO.activePlaylistLoader.media())b.trigger("selectedinitialmedia");else b.mediaTypes_.AUDIO.activePlaylistLoader.one("loadedmetadata",function(){b.trigger("selectedinitialmedia")})}); 1321this.mainPlaylistLoader_.on("loadedplaylist",function(){b.loadOnPlay_&&b.tech_.off("play",b.loadOnPlay_);var d=b.mainPlaylistLoader_.media();if(!d){b.attachContentSteeringListeners_();b.initContentSteeringController_();b.excludeUnsupportedVariants_();var f;b.enableLowInitialPlaylist&&(f=b.selectInitialPlaylist());f||(f=b.selectPlaylist());if(!f||!b.shouldSwitchToMedia_(f))return;b.initialMedia_=f;b.switchMedia_(b.initialMedia_,"initial");if("vhs-json"!==b.sourceType_||!b.initialMedia_.segments)return; 1322d=b.initialMedia_}b.handleUpdatedMediaPlaylist(d)});this.mainPlaylistLoader_.on("error",function(){var d=b.mainPlaylistLoader_.error;b.excludePlaylist({playlistToExclude:d.playlist,error:d})});this.mainPlaylistLoader_.on("mediachanging",function(){b.mainSegmentLoader_.abort();b.mainSegmentLoader_.pause()});this.mainPlaylistLoader_.on("mediachange",function(){var d=b.mainPlaylistLoader_.media(),f=1500*d.targetDuration;Zh(b.mainPlaylistLoader_.main,b.mainPlaylistLoader_.media())?b.requestOptions_.timeout= 13230:b.requestOptions_.timeout=f;"dash"===b.sourceType_&&b.mainPlaylistLoader_.load();b.mainSegmentLoader_.pause();b.mainSegmentLoader_.playlist(d,b.requestOptions_);b.waitingForFastQualityPlaylistReceived_?b.runFastQualitySwitch_():b.mainSegmentLoader_.load();b.tech_.trigger({type:"mediachange",bubbles:!0})});this.mainPlaylistLoader_.on("playlistunchanged",function(){var d=b.mainPlaylistLoader_.media();"playlist-unchanged"!==d.lastExcludeReason_&&b.stuckAtPlaylistEnd_(d)&&(b.excludePlaylist({error:{message:"Playlist no longer updating.", 1324reason:"playlist-unchanged"}}),b.tech_.trigger("playliststuck"))});this.mainPlaylistLoader_.on("renditiondisabled",function(){b.tech_.trigger({type:"usage",name:"vhs-rendition-disabled"})});this.mainPlaylistLoader_.on("renditionenabled",function(){b.tech_.trigger({type:"usage",name:"vhs-rendition-enabled"})});"manifestrequeststart manifestrequestcomplete manifestparsestart manifestparsecomplete playlistrequeststart playlistrequestcomplete playlistparsestart playlistparsecomplete renditiondisabled renditionenabled".split(" ").forEach(function(d){b.mainPlaylistLoader_.on(d, 1325function(f){b.player_.trigger(jb({},f))})})};ha.prototype.handleUpdatedMediaPlaylist=function(b){this.useCueTags_&&this.updateAdCues_(b);this.mainSegmentLoader_.pause();this.mainSegmentLoader_.playlist(b,this.requestOptions_);this.waitingForFastQualityPlaylistReceived_&&this.runFastQualitySwitch_();this.updateDuration(!b.endList);this.tech_.paused()||(this.mainSegmentLoader_.load(),this.audioSegmentLoader_&&this.audioSegmentLoader_.load())};ha.prototype.triggerPresenceUsage_=function(b,d){b=b.mediaGroups|| 1326{};var f=!0,h=Object.keys(b.AUDIO),m;
1326for(m in b.AUDIO)for(var p in b.AUDIO[m])b.AUDIO[m][p].uri||(f=!1);f&&this.tech_.trigger({type:"usage",name:"vhs-demuxed"});Object.keys(b.SUBTITLES).length&&this.tech_.trigger({type:"usage",name:"vhs-webvtt"});ad.Playlist.isAes(d)&&this.tech_.trigger({type:"usage",name:"vhs-aes"});h.length&&1<Object.keys(b.AUDIO[h[0]]).length&&this.tech_.trigger({type:"usage",name:"vhs-alternate-audio"});this.useCueTags_&&this.tech_.trigger({type:"usage",name:"vhs-playlist-cue-tags"})}; 1327ha.prototype.shouldSwitchToMedia_=function(b){var d=this.mainPlaylistLoader_.media()||this.mainPlaylistLoader_.pendingMedia_,f=this.tech_.currentTime(),h=this.bufferLowWaterLine(),m=this.bufferHighWaterLine(),p=this.tech_.buffered();return hr({buffered:p,currentTime:f,currentPlaylist:d,nextPlaylist:b,bufferLowWaterLine:h,bufferHighWaterLine:m,duration:this.duration(),bufferBasedABR:this.bufferBasedABR,log:this.logger_})};ha.prototype.setupSegmentLoaderListeners_=function(){var b=this;this.mainSegmentLoader_.on("bandwidthupdate", 1328function(){b.checkABR_("bandwidthupdate");b.tech_.trigger("bandwidthupdate")});this.mainSegmentLoader_.on("timeout",function(){b.bufferBasedABR&&b.mainSegmentLoader_.load()});if(!this.bufferBasedABR)this.mainSegmentLoader_.on("progress",function(){b.trigger("progress")});this.mainSegmentLoader_.on("error",function(){var f=b.mainSegmentLoader_.error();b.excludePlaylist({playlistToExclude:f.playlist,error:f})});this.mainSegmentLoader_.on("appenderror",function(){b.error=b.mainSegmentLoader_.error_; 1329b.trigger("error")});this.mainSegmentLoader_.on("syncinfoupdate",function(){b.onSyncInfoUpdate_()});this.mainSegmentLoader_.on("timestampoffset",function(){b.tech_.trigger({type:"usage",name:"vhs-timestamp-offset"})});this.audioSegmentLoader_.on("syncinfoupdate",function(){b.onSyncInfoUpdate_()});this.audioSegmentLoader_.on("appenderror",function(){b.error=b.audioSegmentLoader_.error_;b.trigger("error")});this.mainSegmentLoader_.on("ended",function(){b.logger_("main segment loader ended");b.onEndOfStream()}); 1330this.timelineChangeController_.on("audioTimelineBehind",function(){var f=b.audioSegmentLoader_.pendingSegment_;f&&f.segment&&f.segment.syncInfo&&b.tech_.setCurrentTime(f.segment.syncInfo.end+.01)});this.mainSegmentLoader_.on("earlyabort",function(f){b.bufferBasedABR||(b.delegateLoaders_("all",["abort"]),b.excludePlaylist({error:{message:"Aborted early because there isn't enough bandwidth to complete the request without rebuffering."},playlistExclusionDuration:10}))});var d=function(){if(!b.sourceUpdater_.hasCreatedSourceBuffers())return b.tryToCreateSourceBuffers_(); 1331var f=b.getCodecsOrExclude_();f&&b.sourceUpdater_.addOrChangeSourceBuffers(f)};this.mainSegmentLoader_.on("trackinfo",d);this.audioSegmentLoader_.on("trackinfo",d);this.mainSegmentLoader_.on("fmp4",function(){b.triggeredFmp4Usage||(b.tech_.trigger({type:"usage",name:"vhs-fmp4"}),b.triggeredFmp4Usage=!0)});this.audioSegmentLoader_.on("fmp4",function(){b.triggeredFmp4Usage||(b.tech_.trigger({type:"usage",name:"vhs-fmp4"}),b.triggeredFmp4Usage=!0)});this.audioSegmentLoader_.on("ended",function(){b.logger_("audioSegmentLoader ended"); 1332b.onEndOfStream()});"segmentselected segmentloadstart segmentloaded segmentkeyloadstart segmentkeyloadcomplete segmentdecryptionstart segmentdecryptioncomplete segmenttransmuxingstart segmenttransmuxingcomplete segmenttransmuxingtrackinfoavailable segmenttransmuxingtiminginfoavailable segmentappendstart appendsdone bandwidthupdated timelinechange codecschange".split(" ").forEach(function(f){b.mainSegmentLoader_.on(f,function(h){b.player_.trigger(jb({},h))});b.audioSegmentLoader_.on(f,function(h){b.player_.trigger(jb({}, 1333h))});b.subtitleSegmentLoader_.on(f,function(h){b.player_.trigger(jb({},h))})})};ha.prototype.mediaSecondsLoaded_=function(){return Math.max(this.audioSegmentLoader_.mediaSecondsLoaded+this.mainSegmentLoader_.mediaSecondsLoaded)};ha.prototype.load=function(){this.mainSegmentLoader_.load();this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.load();this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.load()};ha.prototype.pause=function(){this.mainSegmentLoader_.pause(); 1334this.mediaTypes_.AUDIO.activePlaylistLoader&&this.audioSegmentLoader_.pause();this.mediaTypes_.SUBTITLES.activePlaylistLoader&&this.subtitleSegmentLoader_.pause()};ha.prototype.fastQualityChange_=function(b){(b=void 0===b?this.selectPlaylist():b)&&b===this.mainPlaylistLoader_.media()?this.logger_("skipping fastQualityChange because new media is same as old"):(this.switchMedia_(b,"fast-quality"),this.waitingForFastQualityPlaylistReceived_=!0)};ha.prototype.runFastQualitySwitch_=function(){var b=this; 1335this.waitingForFastQualityPlaylistReceived_=!1;this.mainSegmentLoader_.pause();this.mainSegmentLoader_.resetEverything(function(){b.mainSegmentLoader_.load()})};ha.prototype.play=function(){if(!this.setupFirstPlay()){this.tech_.ended()&&this.tech_.setCurrentTime(0);this.hasPlayed_&&this.load();var b=this.tech_.seekable();if(Infinity===this.tech_.duration()&&this.tech_.currentTime()<b.start(0))return this.tech_.setCurrentTime(b.end(b.length-1))}};ha.prototype.setupFirstPlay=function(){var b=this.mainPlaylistLoader_.media(); 1336if(!b||this.tech_.paused()||this.hasPlayed_)return!1;if(!b.endList||b.start){var d=this.seekable();if(!d.length)return!1;var f=d.end(0),h=f;b.start&&(b=b.start.timeOffset,h=0>b?Math.max(f+b,d.start(0)):Math.min(f,b));this.trigger("firstplay");this.tech_.setCurrentTime(h)}this.hasPlayed_=!0;this.load();return!0};ha.prototype.handleSourceOpen_=function(){this.tryToCreateSourceBuffers_();if(this.tech_.autoplay()){var b=this.tech_.play();"undefined"!==typeof b&&"function"===typeof b.then&&b.then(null, 1337function(d){})}this.trigger("sourceopen")};ha.prototype.handleSourceEnded_=function(){if(this.inbandTextTracks_.metadataTrack_){var b=this.inbandTextTracks_.metadataTrack_.cues;if(b&&b.length){var d=this.duration();b[b.length-1].endTime=isNaN(d)||Infinity===Math.abs(d)?Number.MAX_VALUE:d}}};ha.prototype.handleDurationChange_=function(){this.tech_.trigger("durationchange")};ha.prototype.onEndOfStream=function(){var b=this.mainSegmentLoader_.ended_;if(this.mediaTypes_.AUDIO.activePlaylistLoader){var d= 1338this.mainSegmentLoader_.getCurrentMediaInfo_();b=!d||d.hasVideo?b&&this.audioSegmentLoader_.ended_:this.audioSegmentLoader_.ended_}b&&(this.stopABRTimer_(),this.sourceUpdater_.endOfStream())};ha.prototype.stuckAtPlaylistEnd_=function(b){if(!this.seekable().length)return!1;var d=this.syncController_.getExpiredTime(b,this.duration());if(null===d)return!1;b=ad.Playlist.playlistEnd(b,d);d=this.tech_.currentTime();var f=this.tech_.buffered();if(!f.length)return b-d<=vc;f=f.end(f.length-1);return f-d<= 1339vc&&b-f<=vc};ha.prototype.excludePlaylist=function(b){var d=this,f=void 0===b.playlistToExclude?this.mainPlaylistLoader_.media():b.playlistToExclude,h=void 0===b.error?{}:b.error,m=b.playlistExclusionDuration;f=f||this.mainPlaylistLoader_.media();m=m||h.playlistExclusionDuration||this.playlistExclusionDuration;if(f){f.playlistErrors_++;var p=this.mainPlaylistLoader_.main.playlists;b=p.filter(lg);b=1===b.length&&b[0]===f;if(1===p.length&&Infinity!==m)return O.log.warn("Problem encountered with playlist "+ 1340f.id+". Trying again since it is the only playlist."),this.tech_.trigger("retryplaylist"),this.mainPlaylistLoader_.load(b);if(b){if(this.main().contentSteering){var t=this.pathwayAttribute_(f);h=1E3*this.contentSteeringController_.steeringManifest.ttl;this.contentSteeringController_.excludePathway(t);this.excludeThenChangePathway_();setTimeout(function(){d.contentSteeringController_.addAvailablePathway(t)},h);return}var x=!1;p.forEach(function(u){if(u!==f){var z=u.excludeUntil;"undefined"!==typeof z&& 1341Infinity!==z&&(x=!0,delete u.excludeUntil)}});x&&(O.log.warn("Removing other playlists from the exclusion list because the last rendition is about to be excluded."),this.tech_.trigger("retryplaylist"))}m=f.playlistErrors_>this.maxPlaylistRetries?Infinity:Date.now()+1E3*m;f.excludeUntil=m;h.reason&&(f.lastExcludeReason_=h.reason);this.tech_.trigger("excludeplaylist");this.tech_.trigger({type:"usage",name:"vhs-rendition-excluded"});if(m=this.selectPlaylist())return(h.internal?this.logger_:O.log.warn)((h.internal? 1342"Internal problem":"Problem")+" encountered with playlist "+f.id+"."+((h.message?" "+h.message:"")+" Switching to playlist "+m.id+".")),m.attributes.AUDIO!==f.attributes.AUDIO&&this.delegateLoaders_("audio",["abort","pause"]),m.attributes.SUBTITLES!==f.attributes.SUBTITLES&&this.delegateLoaders_("subtitle",["abort","pause"]),this.delegateLoaders_("main",["abort","pause"]),h=m.targetDuration/2*1E3||5E3,h="number"===typeof m.lastRequest&&Date.now()-m.lastRequest<=h,this.switchMedia_(m,"exclude",b|| 1343h);this.error="Playback cannot continue. No available working or supported playlists.";this.trigger("error")}else this.error=h,"open"!==this.mediaSource.readyState?this.trigger("error"):this.sourceUpdater_.endOfStream("network")};ha.prototype.pauseLoading=function(){this.delegateLoaders_("all",["abort","pause"]);this.stopABRTimer_()};ha.prototype.delegateLoaders_=function(b,d){var f=this,h=[],m="all"===b;(m||"main"===b)&&h.push(this.mainPlaylistLoader_);var p=[];(m||"audio"===b)&&p.push("AUDIO"); 1344if(m||"subtitle"===b)p.push("CLOSED-CAPTIONS"),p.push("SUBTITLES");p.forEach(function(t){(t=f.mediaTypes_[t]&&f.mediaTypes_[t].activePlaylistLoader)&&h.push(t)});["main","audio","subtitle"].forEach(function(t){var x=f["QVC AEM Commerce Package - Designs Non TransactionalSegmentLoader_"];!x||b!==t&&"all"!==b||h.push(x)});h.forEach(function(t){return d.forEach(function(x){if("function"===typeof t[x])t[x]()})})};ha.prototype.setCurrentTime=function(b){var d=fe(this.tech_.buffered(),b);if(!this.mainPlaylistLoader_|| 1345!this.mainPlaylistLoader_.media()||!this.mainPlaylistLoader_.media().segments)return 0;if(d&&d.length)return b;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()};ha.prototype.duration=function(){if(!this.mainPlaylistLoader_)return 0; 1346var b=this.mainPlaylistLoader_.media();return b?b.endList?this.mediaSource?this.mediaSource.duration:ad.Playlist.duration(b):Infinity:0};ha.prototype.seekable=function(){return this.seekable_};ha.prototype.getSeekableRange_=function(b,d){b=b.media();if(!b)return null;var f=this.syncController_.getMediaSequenceSync(d);if(f&&f.isReliable){d=f.start;f=f.end;if(!isFinite(d)||!isFinite(f))return null;b=ad.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,b);b=Math.max(0,f-b);return b<d?null:nb([[d, 1347b]])}d=this.syncController_.getExpiredTime(b,this.duration());if(null===d)return null;b=ad.Playlist.seekable(b,d,ad.Playlist.liveEdgeDelay(this.mainPlaylistLoader_.main,b));return b.length?b:null};ha.prototype.computeFinalSeekable_=function(b,d){if(!d)return b;var f=b.start(0),h=b.end(0),m=d.start(0);d=d.end(0);return m>h||f>d?b:nb([[Math.max(f,m),Math.min(h,d)]])};ha.prototype.onSyncInfoUpdate_=function(){if(this.mainPlaylistLoader_){var b=this.getSeekableRange_(this.mainPlaylistLoader_,"main"); 1348if(b){if(this.mediaTypes_.AUDIO.activePlaylistLoader){var d=this.getSeekableRange_(this.mediaTypes_.AUDIO.activePlaylistLoader,"audio");if(!d)return}var f=this.seekable_;!(this.seekable_=this.computeFinalSeekable_(b,d))||f&&f.length&&this.seekable_.length&&f.start(0)===this.seekable_.start(0)&&f.end(0)===this.seekable_.end(0)||(this.logger_("seekable updated ["+fl(this.seekable_)+"]"),this.trigger({type:"seekablerangeschanged",metadata:{seekableRanges:this.seekable_}}),this.tech_.trigger("seekablechanged"))}}}; 1349ha.prototype.updateDuration=function(b){this.updateDuration_&&(this.mediaSource.removeEventListener("sourceopen",this.updateDuration_),this.updateDuration_=null);if("open"!==this.mediaSource.readyState)this.updateDuration_=this.updateDuration.bind(this,b),this.mediaSource.addEventListener("sourceopen",this.updateDuration_);else if(b)b=this.seekable(),b.length&&(isNaN(this.mediaSource.duration)||this.mediaSource.duration<b.end(b.length-1))&&this.sourceUpdater_.setDuration(b.end(b.length-1));else{b= 1350this.tech_.buffered();var d=ad.Playlist.duration(this.mainPlaylistLoader_.media());0<b.length&&(d=Math.max(d,b.end(b.length-1)));this.mediaSource.duration!==d&&this.sourceUpdater_.setDuration(d)}};ha.prototype.dispose=function(){var b=this;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(function(d){d= 1351b.mediaTypes_[d].groups;for(var f in d)d[f].forEach(function(h){h.playlistLoader&&h.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", 1352this.handleSourceOpen_);this.mediaSource.removeEventListener("sourceended",this.handleSourceEnded_);this.off()};ha.prototype.main=function(){return this.mainPlaylistLoader_.main};ha.prototype.media=function(){return this.mainPlaylistLoader_.media()||this.initialMedia_};ha.prototype.areMediaTypesKnown_=function(){var b=!!this.mediaTypes_.AUDIO.activePlaylistLoader,d=!!this.mainSegmentLoader_.getCurrentMediaInfo_();b=b?!!this.audioSegmentLoader_.getCurrentMediaInfo_():!0;return d&&b?!0:!1};ha.prototype.getCodecsOrExclude_= 1353function(){var b=this,d={main:this.mainSegmentLoader_.getCurrentMediaInfo_()||{},audio:this.audioSegmentLoader_.getCurrentMediaInfo_()||{}},f=this.mainSegmentLoader_.getPendingSegmentPlaylist()||this.media();d.video=d.main;var h=ef(this.main(),f),m={},p=!!this.mediaTypes_.AUDIO.activePlaylistLoader;d.main.hasVideo&&(m.video=h.video||d.main.videoCodec||"avc1.4d400d");d.main.isMuxed&&(m.video+=","+(h.audio||d.main.audioCodec||"mp4a.40.2"));if(d.main.hasAudio&&!d.main.isMuxed||d.audio.hasAudio||p)m.audio= 1354h.audio||d.main.audioCodec||d.audio.audioCodec||"mp4a.40.2",d.audio.isFmp4=d.main.hasAudio&&!d.main.isMuxed?d.main.isFmp4:d.audio.isFmp4;if(m.audio||m.video){var t={},x;["video","audio"].forEach(function(A){var F;if(F=m.hasOwnProperty(A))F=m[A],F=!(d[A].isFmp4?Qe(F):Jh(F));F&&(F=d[A].isFmp4?"browser":"muxer",t[F]=t[F]||[],t[F].push(m[A]),"audio"===A&&(x=F))});if(p&&x&&f.attributes.AUDIO){var u=f.attributes.AUDIO;
1354this.main().playlists.forEach(function(A){(A.attributes&&A.attributes.AUDIO)===u&&A!== 1355f&&(A.excludeUntil=Infinity)});this.logger_("excluding audio group "+u+" as "+x+' does not support codec(s): "'+m.audio+'"')}if(Object.keys(t).length)h=Object.keys(t).reduce(function(A,F){A&&(A+=", ");return A+=F+' does not support codec(s): "'+t[F].join(",")+'"'},"")+".",this.excludePlaylist({playlistToExclude:f,error:{internal:!0,message:h},playlistExclusionDuration:Infinity});else{if(this.sourceUpdater_.hasCreatedSourceBuffers()&&!this.sourceUpdater_.canChangeType()){var z=[];["video","audio"].forEach(function(A){var F= 1356(tc(b.sourceUpdater_.codecs[A]||"")[0]||{}).type,H=(tc(m[A]||"")[0]||{}).type;F&&H&&F.toLowerCase()!==H.toLowerCase()&&z.push('"'+b.sourceUpdater_.codecs[A]+'" -\x3e "'+m[A]+'"')});if(z.length){this.excludePlaylist({playlistToExclude:f,error:{message:"Codec switching not supported: "+z.join(", ")+".",internal:!0},playlistExclusionDuration:Infinity});return}}return m}}else this.excludePlaylist({playlistToExclude:f,error:{message:"Could not determine codecs for playlist."},playlistExclusionDuration:Infinity})}; 1357ha.prototype.tryToCreateSourceBuffers_=function(){if("open"===this.mediaSource.readyState&&!this.sourceUpdater_.hasCreatedSourceBuffers()&&this.areMediaTypesKnown_()){var b=this.getCodecsOrExclude_();b&&(this.sourceUpdater_.createSourceBuffers(b),b=[b.video,b.audio].filter(Boolean).join(","),this.excludeIncompatibleVariants_(b))}};ha.prototype.excludeUnsupportedVariants_=function(){var b=this,d=this.main().playlists,f=[];Object.keys(d).forEach(function(h){h=d[h];if(-1===f.indexOf(h.id)){f.push(h.id); 1358var m=ef(b.main,h),p=[];!m.audio||Jh(m.audio)||Qe(m.audio)||p.push("audio codec "+m.audio);!m.video||Jh(m.video)||Qe(m.video)||p.push("video codec "+m.video);m.text&&"stpp.ttml.im1t"===m.text&&p.push("text codec "+m.text);p.length&&(h.excludeUntil=Infinity,b.logger_("excluding "+h.id+" for unsupported: "+p.join(", ")))}})};ha.prototype.excludeIncompatibleVariants_=function(b){var d=this,f=[],h=this.main().playlists;b=Dg(tc(b));var m=um(b),p=b.video&&tc(b.video)[0]||null,t=b.audio&&tc(b.audio)[0]|| 1359null;Object.keys(h).forEach(function(x){x=h[x];if(-1===f.indexOf(x.id)&&Infinity!==x.excludeUntil){f.push(x.id);var u=[],z=ef(d.mainPlaylistLoader_.main,x),A=um(z);if(z.audio||z.video)A!==m&&u.push('codec count "'+A+'" !\x3d\x3d "'+m+'"'),d.sourceUpdater_.canChangeType()||(A=z.video&&tc(z.video)[0]||null,z=z.audio&&tc(z.audio)[0]||null,A&&p&&A.type.toLowerCase()!==p.type.toLowerCase()&&u.push('video codec "'+A.type+'" !\x3d\x3d "'+p.type+'"'),z&&t&&z.type.toLowerCase()!==t.type.toLowerCase()&&u.push('audio codec "'+ 1360z.type+'" !\x3d\x3d "'+t.type+'"')),u.length&&(x.excludeUntil=Infinity,d.logger_("excluding "+x.id+": "+u.join(" \x26\x26 ")))}})};ha.prototype.updateAdCues_=function(b){var d=0,f=this.seekable();f.length&&(d=f.start(0));f=this.cueTagsTrack_;if(b.segments){d=void 0===d?0:d;for(var h,m=0;m<b.segments.length;m++){var p=b.segments[m];if(!h)b:{h=d+p.duration/2;for(var t=f.cues,x=0;x<t.length;x++){var u=t[x];if(h>=u.adStartTime&&h<=u.adEndTime){h=u;break b}}h=null}if(h){if("cueIn"in p){h.endTime=d;h.adEndTime= 1361d;d+=p.duration;h=null;continue}if(d<h.endTime){d+=p.duration;continue}h.endTime+=p.duration}else"cueOut"in p&&(h=new window.VTTCue(d,d+p.duration,p.cueOut),h.adStartTime=d,h.adEndTime=d+parseFloat(p.cueOut),f.addCue(h)),"cueOutCont"in p&&(h=$jscomp.makeIterator(p.cueOutCont.split("/").map(parseFloat)),t=h.next().value,x=h.next().value,h=new window.VTTCue(d,d+p.duration,""),h.adStartTime=d-t,h.adEndTime=h.adStartTime+x,f.addCue(h));d+=p.duration}}};ha.prototype.goalBufferLength=function(){var b=this.tech_.currentTime(), 1362d=pb.GOAL_BUFFER_LENGTH;return Math.min(d+b*pb.GOAL_BUFFER_LENGTH_RATE,Math.max(d,pb.MAX_GOAL_BUFFER_LENGTH))};ha.prototype.bufferLowWaterLine=function(){var b=this.tech_.currentTime(),d=pb.BUFFER_LOW_WATER_LINE,f=Math.max(d,pb.MAX_BUFFER_LOW_WATER_LINE),h=Math.max(d,pb.EXPERIMENTAL_MAX_BUFFER_LOW_WATER_LINE);return Math.min(d+b*pb.BUFFER_LOW_WATER_LINE_RATE,this.bufferBasedABR?h:f)};ha.prototype.bufferHighWaterLine=function(){return pb.BUFFER_HIGH_WATER_LINE};ha.prototype.addDateRangesToTextTrack_= 1363function(b){ym(this.inbandTextTracks_,"com.apple.streaming",this.tech_);Oq({inbandTextTracks:this.inbandTextTracks_,dateRanges:b})};ha.prototype.addMetadataToTextTrack=function(b,d,f){var h=this.sourceUpdater_.videoBuffer?this.sourceUpdater_.videoTimestampOffset():this.sourceUpdater_.audioTimestampOffset();ym(this.inbandTextTracks_,b,this.tech_);Lq({inbandTextTracks:this.inbandTextTracks_,metadataArray:d,timestampOffset:h,videoDuration:f})};ha.prototype.pathwayAttribute_=function(b){return b.attributes["PATHWAY-ID"]|| 1364b.attributes.serviceLocation};ha.prototype.initContentSteeringController_=function(){var b=this,d=this.main();if(d.contentSteering){for(var f=$jscomp.makeIterator(d.playlists),h=f.next();!h.done;h=f.next())this.contentSteeringController_.addAvailablePathway(this.pathwayAttribute_(h.value));this.contentSteeringController_.assignTagProperties(d.uri,d.contentSteering);if(this.contentSteeringController_.queryBeforeStart)this.contentSteeringController_.requestSteeringManifest(!0);else this.tech_.one("canplay", 1365function(){b.contentSteeringController_.requestSteeringManifest()})}};ha.prototype.resetContentSteeringController_=function(){this.contentSteeringController_.clearAvailablePathways();this.contentSteeringController_.dispose();
1365this.initContentSteeringController_()};ha.prototype.attachContentSteeringListeners_=function(){var b=this;this.contentSteeringController_.on("content-steering",this.excludeThenChangePathway_.bind(this));["contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(function(d){b.contentSteeringController_.on(d, 1366function(f){b.trigger(jb({},f))})});if("dash"===this.sourceType_)this.mainPlaylistLoader_.on("loadedplaylist",function(){var d=b.main(),f;if(!(f=b.contentSteeringController_.didDASHTagChange(d.uri,d.contentSteering)))a:{f=b.contentSteeringController_.getAvailablePathways();var h=[];d=$jscomp.makeIterator(d.playlists);for(var m=d.next();!m.done;m=d.next())if(m=m.value.attributes.serviceLocation)if(h.push(m),!f.has(m)){f=!0;break a}f=!h.length&&f.size?!0:!1}f&&b.resetContentSteeringController_()})}; 1367ha.prototype.excludeThenChangePathway_=function(){var b=this,d=this.contentSteeringController_.getPathway();if(d){this.handlePathwayClones_();var f=this.main().playlists,h=new Set,m=!1;Object.keys(f).forEach(function(p){p=f[p];var t=b.pathwayAttribute_(p);t=t&&d!==t;Infinity!==p.excludeUntil||"content-steering"!==p.lastExcludeReason_||t||(delete p.excludeUntil,delete p.lastExcludeReason_,m=!0);var x=!p.excludeUntil&&Infinity!==p.excludeUntil;!h.has(p.id)&&t&&x&&(h.add(p.id),p.excludeUntil=Infinity, 1368p.lastExcludeReason_="content-steering",b.logger_("excluding "+p.id+" for "+p.lastExcludeReason_))});"DASH"===this.contentSteeringController_.manifestType_&&Object.keys(this.mediaTypes_).forEach(function(p){p=b.mediaTypes_[p];p.activePlaylistLoader&&(p=p.activePlaylistLoader.media_)&&p.attributes.serviceLocation!==d&&(m=!0)});m&&this.changeSegmentPathway_()}};ha.prototype.handlePathwayClones_=function(){var b=this,d=this.main().playlists,f=this.contentSteeringController_.currentPathwayClones,h=this.contentSteeringController_.nextPathwayClones; 1369if(f&&f.size||h&&h.size){for(var m=$jscomp.makeIterator(f.entries()),p=m.next();!p.done;p=m.next()){var t=$jscomp.makeIterator(p.value);p=t.next().value;t=t.next().value;h.get(p)||(this.mainPlaylistLoader_.updateOrDeleteClone(t),this.contentSteeringController_.excludePathway(p))}m={};p=$jscomp.makeIterator(h.entries());for(t=p.next();!t.done;m={$jscomp$loop$prop$clone$237$253:m.$jscomp$loop$prop$clone$237$253},t=p.next()){var x=$jscomp.makeIterator(t.value);t=x.next().value;m.$jscomp$loop$prop$clone$237$253= 1370x.next().value;x=f.get(t);x?this.equalPathwayClones_(x,m.$jscomp$loop$prop$clone$237$253)||(this.mainPlaylistLoader_.updateOrDeleteClone(m.$jscomp$loop$prop$clone$237$253,!0),this.contentSteeringController_.addAvailablePathway(t)):(d.filter(function(u){return function(z){return z.attributes["PATHWAY-ID"]===u.$jscomp$loop$prop$clone$237$253["BASE-ID"]}}(m)).forEach(function(u){return function(z){b.mainPlaylistLoader_.addClonePathway(u.$jscomp$loop$prop$clone$237$253,z)}}(m)),this.contentSteeringController_.addAvailablePathway(t))}this.contentSteeringController_.currentPathwayClones= 1371new Map(JSON.parse(JSON.stringify([].concat($jscomp.arrayFromIterable(h)))))}};ha.prototype.equalPathwayClones_=function(b,d){if(b["BASE-ID"]!==d["BASE-ID"]||b.ID!==d.ID||b["URI-REPLACEMENT"].HOST!==d["URI-REPLACEMENT"].HOST)return!1;b=b["URI-REPLACEMENT"].PARAMS;d=d["URI-REPLACEMENT"].PARAMS;for(var f in b)if(b[f]!==d[f])return!1;for(var h in d)if(b[h]!==d[h])return!1;return!0};ha.prototype.changeSegmentPathway_=function(){var b=this.selectPlaylist();this.pauseLoading();"DASH"===this.contentSteeringController_.manifestType_&& 1372this.switchMediaForDASHContentSteering_();this.switchMedia_(b,"content-steering")};ha.prototype.excludeNonUsablePlaylistsByKeyId_=function(){var b=this;if(this.mainPlaylistLoader_&&this.mainPlaylistLoader_.main){var d=0;
1372this.mainPlaylistLoader_.main.playlists.forEach(function(f){var h=b.mainPlaylistLoader_.getKeyIdSet(f);h&&h.size&&h.forEach(function(m){var p=b.keyStatusMap_.has(m)&&"usable"===b.keyStatusMap_.get(m),t="non-usable"===f.lastExcludeReason_&&Infinity===f.excludeUntil;p?p&&t&&(delete f.excludeUntil, 1373delete f.lastExcludeReason_,b.logger_("enabling playlist "+f.id+" because key ID "+m+" is usable")):(Infinity!==f.excludeUntil&&"non-usable"!==f.lastExcludeReason_&&(f.excludeUntil=Infinity,f.lastExcludeReason_="non-usable",b.logger_("excluding playlist "+f.id+" because the key ID "+m+" doesn't exist in the keyStatusMap or is not usable")),d++)})});d>=this.mainPlaylistLoader_.main.playlists.length&&this.mainPlaylistLoader_.main.playlists.forEach(function(f){var h=Infinity===f.excludeUntil&&"non-usable"=== 1374f.lastExcludeReason_;f&&f.attributes&&f.attributes.RESOLUTION&&720>f.attributes.RESOLUTION.height&&h&&(delete f.excludeUntil,O.log.warn("enabling non-HD playlist "+f.id+" because all playlists were excluded due to non-usable key IDs"))})}};ha.prototype.addKeyStatus_=function(b,d){b=("string"===typeof b?b:Uq(b)).slice(0,32).toLowerCase();this.logger_("KeyStatus '"+d+"' with key ID "+b+" added to the keyStatusMap");this.keyStatusMap_.set(b,d)};ha.prototype.updatePlaylistByKeyStatus=function(b,d){this.addKeyStatus_(b, 1375d);this.waitingForFastQualityPlaylistReceived_||this.excludeNonUsableThenChangePlaylist_();this.mainPlaylistLoader_.off("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this));this.mainPlaylistLoader_.on("loadedplaylist",this.excludeNonUsableThenChangePlaylist_.bind(this))};ha.prototype.excludeNonUsableThenChangePlaylist_=function(){this.excludeNonUsablePlaylistsByKeyId_();this.fastQualityChange_()};var ir=function(b,d,f){return function(h){var m=b.main.playlists[d],p=Yh(m),t=lg(m); 1376if("undefined"===typeof h)return t;h?delete m.disabled:m.disabled=!0;var x={renditionInfo:{id:d,bandwidth:m.attributes.BANDWIDTH,resolution:m.attributes.RESOLUTION,codecs:m.attributes.CODECS},cause:"fast-quality"};h===t||p||(f(m),h?b.trigger({type:"renditionenabled",metadata:x}):b.trigger({type:"renditiondisabled",metadata:x}));return h}},jr=function(b,d,f){var h=b.playlistController_,m=h.fastQualityChange_.bind(h);if(d.attributes){var p=d.attributes.RESOLUTION;this.width=p&&p.width;this.height=p&& 1377p.height;this.bandwidth=d.attributes.BANDWIDTH;this.frameRate=d.attributes["FRAME-RATE"]}this.codecs=ef(h.main(),d);this.playlist=d;this.id=f;this.enabled=ir(b.playlists,d.id,m)},kr=function(b){b.representations=function(){var d=b.playlistController_.main();return(d=We(d)?b.playlistController_.getAudioTrackPlaylists_():d.playlists)?d.filter(function(f){return!Yh(f)}).map(function(f,h){return new jr(b,f,f.id)}):[]}},Im=["seeking","seeked","pause","playing","error"],Ib=function(b){var d=O.EventTarget.call(this)|| 1378this;d.playlistController_=b.playlistController;d.tech_=b.tech;d.seekable=b.seekable;d.allowSeeksWithinUnsafeLiveWindow=b.allowSeeksWithinUnsafeLiveWindow;d.liveRangeSafeTimeDelta=b.liveRangeSafeTimeDelta;d.media=b.media;d.playedRanges_=[];d.consecutiveUpdates=0;d.lastRecordedTime=null;d.checkCurrentTimeTimeout_=null;d.logger_=ac("PlaybackWatcher");d.logger_("initialize");var f=function(){return d.monitorCurrentTime_()},h=function(){return d.monitorCurrentTime_()},m=function(){return d.techWaiting_()}, 1379p=function(){return d.resetTimeUpdate_()},t=d.playlistController_,x=["main","subtitle","audio"],u={};x.forEach(function(A){u[A]={reset:function(){return d.resetSegmentDownloads_(A)},updateend:function(){return d.checkSegmentDownloads_(A)}};t[A+"SegmentLoader_"].on("appendsdone",u[A].updateend);t[A+"SegmentLoader_"].on("playlistupdate",u[A].reset);d.tech_.on(["seeked","seeking"],u[A].reset)});var z=function(A){["main","audio"].forEach(function(F){t[F+"SegmentLoader_"][A]("appended",d.seekingAppendCheck_)})}; 1380d.seekingAppendCheck_=function(){d.fixesBadSeeks_()&&(d.consecutiveUpdates=0,d.lastRecordedTime=d.tech_.currentTime(),z("off"))};d.clearSeekingAppendCheck_=function(){return z("off")};d.watchForBadSeeking_=function(){d.clearSeekingAppendCheck_();z("on")};d.tech_.on("seeked",d.clearSeekingAppendCheck_);d.tech_.on("seeking",d.watchForBadSeeking_);d.tech_.on("waiting",m);d.tech_.on(Im,p);d.tech_.on("canplay",h);d.tech_.one("play",f);d.dispose=function(){d.clearSeekingAppendCheck_();d.logger_("dispose"); 1381d.tech_.off("waiting",m);d.tech_.off(Im,p);d.tech_.off("canplay",h);d.tech_.off("play",f);d.tech_.off("seeking",d.watchForBadSeeking_);d.tech_.off("seeked",d.clearSeekingAppendCheck_);x.forEach(function(A){t[A+"SegmentLoader_"].off("appendsdone",u[A].updateend);t[A+"SegmentLoader_"].off("playlistupdate",u[A].reset);d.tech_.off(["seeked","seeking"],u[A].reset)});d.checkCurrentTimeTimeout_&&window.clearTimeout(d.checkCurrentTimeTimeout_);d.resetTimeUpdate_()};return d};$jscomp.inherits(Ib,O.EventTarget); 1382Ib.prototype.monitorCurrentTime_=function(){this.checkCurrentTime_();this.checkCurrentTimeTimeout_&&window.clearTimeout(this.checkCurrentTimeTimeout_);this.checkCurrentTimeTimeout_=window.setTimeout(this.monitorCurrentTime_.bind(this),250)};Ib.prototype.resetSegmentDownloads_=function(b){var d=this.playlistController_[b+"SegmentLoader_"];0<this[b+"StalledDownloads_"]&&this.logger_("resetting possible stalled download count for "+b+" loader");this[b+"StalledDownloads_"]=0;this[b+"Buffered_"]=d.buffered_()}; 1383Ib.prototype.checkSegmentDownloads_=function(b){var d=this.playlistController_,f=d[b+"SegmentLoader_"],h=f.buffered_(),m=mp(this[b+"Buffered_"],h);this[b+"Buffered_"]=h;m?(d.trigger({type:"bufferedrangeschanged",metadata:{bufferedRanges:h}}),this.resetSegmentDownloads_(b)):(this[b+"StalledDownloads_"]++,this.logger_("found #"+this[b+"StalledDownloads_"]+" "+b+" appends that did not increase buffer (possible stalled download)",{playlistId:f.playlist_&&f.playlist_.id,buffered:sd(h)}),10>this[b+"StalledDownloads_"]|| 1384(this.logger_(b+" loader stalled download exclusion"),this.resetSegmentDownloads_(b),this.tech_.trigger({type:"usage",name:"vhs-"+b+"-download-exclusion"}),"subtitle"!==b&&d.excludePlaylist({error:{message:"Excessive "+b+" segment downloading detected."},playlistExclusionDuration:Infinity})))};Ib.prototype.checkCurrentTime_=function(){if(!this.tech_.paused()&&!this.tech_.seeking()){var b=this.tech_.currentTime(),d=this.tech_.buffered();if(this.lastRecordedTime===b&&(!d.length||b+vc>=d.end(d.length- 13851)))return this.techWaiting_();5<=this.consecutiveUpdates&&b===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):b===this.lastRecordedTime?this.consecutiveUpdates++:(this.playedRanges_.push(nb([this.lastRecordedTime,b])),this.playlistController_.trigger({type:"playedrangeschanged",metadata:{playedRanges:this.playedRanges_}}),this.consecutiveUpdates=0,this.lastRecordedTime=b)}};Ib.prototype.resetTimeUpdate_=function(){this.consecutiveUpdates=0};Ib.prototype.fixesBadSeeks_=function(){if(!this.tech_.seeking())return!1; 1386var b=this.seekable(),d=this.tech_.currentTime(),f;this.afterSeekableWindow_(b,d,this.media(),this.allowSeeksWithinUnsafeLiveWindow)&&(f=b.end(b.length-1));this.beforeSeekableWindow_(b,d)&&(f=b.start(0),f+=f===b.end(0)?0:vc);if("undefined"!==typeof f)return this.logger_("Trying to seek outside of seekable at time "+d+" with seekable range "+(fl(b)+". Seeking to ")+(f+".")),this.tech_.setCurrentTime(f),!0;var h=this.playlistController_.sourceUpdater_;b=this.tech_.buffered();f=h.audioBuffer?h.audioBuffered(): 1387null;var m=h.videoBuffer?h.videoBuffered():null;h=this.media();h=h.partTargetDuration?h.partTargetDuration:2*(h.targetDuration-uc);f=[f,m];for(m=0;m<f.length;m++)if(f[m]&&Vh(f[m],d)<h)return!1;b=kg(b,d);if(0===b.length)return!1;f=b.start(0)+vc;this.logger_("Buffered region starts ("+b.start(0)+") just beyond seek point ("+(d+"). Seeking to "+f+"."));this.tech_.setCurrentTime(f);return!0};Ib.prototype.waiting_=function(){if(!this.techWaiting_()){var b=this.tech_.currentTime(),d=this.tech_.buffered(); 1388d=fe(d,b);d.length&&b+3<=d.end(0)&&(this.resetTimeUpdate_(),this.tech_.setCurrentTime(b),this.logger_("Stopped at "+b+" while inside a buffered region ["+(d.start(0)+" -\x3e "+d.end(0)+"]. Attempting to resume playback by seeking to the current time.")),this.tech_.trigger({type:"usage",name:"vhs-unknown-waiting"}))}};Ib.prototype.techWaiting_=function(){var b=this.seekable(),d=this.tech_.currentTime();if(this.tech_.seeking())return!0;
1388if(this.beforeSeekableWindow_(b,d))return b=b.end(b.length-1),this.logger_("Fell out of live window at time "+ 1389d+". Seeking to live point (seekable end) "+b),this.resetTimeUpdate_(),this.tech_.setCurrentTime(b),this.tech_.trigger({type:"usage",name:"vhs-live-resync"}),!0;b=this.tech_.vhs.playlistController_.sourceUpdater_;var f=this.tech_.buffered();if(this.videoUnderflow_({audioBuffered:b.audioBuffered(),videoBuffered:b.videoBuffered(),currentTime:d}))return this.resetTimeUpdate_(),this.tech_.setCurrentTime(d),this.tech_.trigger({type:"usage",name:"vhs-video-underflow"}),!0;b=kg(f,d);return 0<b.length?(this.logger_("Stopped at "+ 1390d+" and seeking to "+b.start(0)),this.resetTimeUpdate_(),this.skipTheGap_(d),!0):!1};Ib.prototype.afterSeekableWindow_=function(b,d,f,h){h=void 0===h?!1:h;if(!b.length)return!1;var m=b.end(b.length-1)+vc,p="number"===typeof f.partTargetDuration;f.endList||!p&&!h||(m=b.end(b.length-1)+3*f.targetDuration);return d>m?!0:!1};Ib.prototype.beforeSeekableWindow_=function(b,d){return b.length&&0<b.start(0)&&d<b.start(0)-this.liveRangeSafeTimeDelta?!0:!1};Ib.prototype.videoUnderflow_=function(b){var d=b.videoBuffered, 1391f=b.audioBuffered;b=b.currentTime;if(d){var h;if(d.length&&f.length){var m=fe(d,b-3);d=fe(d,b);f=fe(f,b);f.length&&!d.length&&m.length&&(h={start:m.end(0),end:f.end(0)})}else kg(d,b).length||(h=this.gapFromVideoUnderflow_(d,b));return h?(this.logger_("Encountered a gap in video from "+h.start+" to "+h.end+". Seeking to current time "+b),!0):!1}};Ib.prototype.skipTheGap_=function(b){var d=this.tech_.buffered(),f=this.tech_.currentTime();d=kg(d,f);this.resetTimeUpdate_();0!==d.length&&f===b&&(this.logger_("skipTheGap_:", 1392"currentTime:",f,"scheduled currentTime:",b,"nextRange start:",d.start(0)),this.tech_.setCurrentTime(d.start(0)+uc),b={gapInfo:{from:f,to:d.start(0)}},this.playlistController_.trigger({type:"gapjumped",metadata:b}),this.tech_.trigger({type:"usage",name:"vhs-gap-skip"}))};Ib.prototype.gapFromVideoUnderflow_=function(b,d){if(2>b.length)b=nb();else{for(var f=[],h=1;h<b.length;h++){var m=b.end(h-1),p=b.start(h);f.push([m,p])}b=nb(f)}for(f=0;f<b.length;f++)if(h=b.start(f),m=b.end(f),4>d-h&&2<d-h)return{start:h, 1393end:m};return null};var lr={errorInterval:30,getSource:function(b){var d=this.tech({IWillNotUseThisInPlugins:!0}).currentSource_||this.currentSource();return b(d)}},Jm=function(b,d){var f=0,h=0,m=Ba(lr,d);b.ready(function(){b.trigger({type:"usage",name:"vhs-error-reload-initialized"})});var p=function(){h&&b.currentTime(h)},t=function(z){null!==z&&void 0!==z&&(h=Infinity!==b.duration()&&b.currentTime()||0,b.one("loadedmetadata",p),b.src(z),b.trigger({type:"usage",name:"vhs-error-reload"}),b.play())}, 1394x=function(){if(Date.now()-f<1E3*m.errorInterval)b.trigger({type:"usage",name:"vhs-error-reload-canceled"});else{if(m.getSource&&"function"===typeof m.getSource)return f=Date.now(),m.getSource.call(b,t);O.log.error("ERROR: reloadSourceOnError - The option getSource must be a function!")}},u=function(){b.off("loadedmetadata",p);b.off("error",x);b.off("dispose",u)};b.on("error",x);b.on("dispose",u);b.reloadSourceOnError=function(z){u();Jm(b,z)}},mr=function(b){Jm(this,b)},Xa={PlaylistLoader:Fa,Playlist:Nb, 1395utils:yp,STANDARD_PLAYLIST_SELECTOR:xm,INITIAL_PLAYLIST_SELECTOR:function(){var b=this,d=this.playlists.main.playlists.filter(Nb.isEnabled);je(d,function(f,h){return xi(f,h)});return d.filter(function(f){return!!ef(b.playlists.main,f).video})[0]||null},lastBandwidthSelector:xm,movingAverageBandwidthSelector:function(b){var d=-1,f=-1;if(0>b||1<b)throw Error("Moving average bandwidth decay must be between 0 and 1.");return function(){var h=this.useDevicePixelRatio?window.devicePixelRatio||1:1;isNaN(this.customPixelRatio)|| 1396(h=this.customPixelRatio);0>d&&(f=d=this.systemBandwidth);0<this.systemBandwidth&&this.systemBandwidth!==f&&(d=b*this.systemBandwidth+(1-b)*d,f=this.systemBandwidth);return wm(this.playlists.main,d,parseInt(Fg(this.tech_.el(),"width"),10)*h,parseInt(Fg(this.tech_.el(),"height"),10)*h,this.limitRenditionByPlayerDimensions,this.playlistController_)}},comparePlaylistBandwidth:xi,comparePlaylistResolution:function(b,d){if(b.attributes.RESOLUTION&&b.attributes.RESOLUTION.width)var f=b.attributes.RESOLUTION.width; 1397f=f||window.Number.MAX_VALUE;if(d.attributes.RESOLUTION&&d.attributes.RESOLUTION.width)var h=d.attributes.RESOLUTION.width;h=h||window.Number.MAX_VALUE;return f===h&&b.attributes.BANDWIDTH&&d.attributes.BANDWIDTH?b.attributes.BANDWIDTH-d.attributes.BANDWIDTH:f-h},xhr:yl()};Object.keys(pb).forEach(function(b){Object.defineProperty(Xa,b,{get:function(){O.log.warn("using Vhs."+b+" is UNSAFE be sure you know
1397what you are doing");return pb[b]},set:function(d){O.log.warn("using Vhs."+b+" is UNSAFE be sure you know what you are doing"); 1398"number"!==typeof d||0>d?O.log.warn("value of Vhs."+b+" must be greater than or equal to 0"):pb[b]=d}})});var Km=function(b,d){d=d.media();for(var f=-1,h=0;h<b.length;h++)if(b[h].id===d.id){f=h;break}b.selectedIndex_=f;b.trigger({selectedIndex:f,type:"change"})},nr=function(b,d){d.representations().forEach(function(f){b.addQualityLevel(f)});Km(b,d.playlists)};Xa.canPlaySource=function(){return O.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};var or=function(b, 1399d){return b.reduce(function(f,h){if(!h.contentProtection)return f;var m=d.reduce(function(p,t){var x=h.contentProtection[t];x&&x.pssh&&(p[t]={pssh:x.pssh});return p},{});Object.keys(m).length&&f.push(m);return f},[])},pr=function(b){var d=b.player,f=b.sourceKeySystems,h=b.audioMedia;b=b.mainPlaylists;if(!d.eme.initializeMediaKeys)return Promise.resolve();h=h?b.concat([h]):b;var m=[],p=[];or(h,Object.keys(f)).forEach(function(t){p.push(new Promise(function(x,u){d.tech_.one("keysessioncreated",x)})); 1400m.push(new Promise(function(x,u){d.eme.initializeMediaKeys({keySystems:t},function(z){z?u(z):x()})}))});return Promise.race([Promise.all(m),Promise.race(p)])},qr=function(b){var d=b.player;var f=b.sourceKeySystems;var h=b.media;b=b.audioMedia;if(f){var m={};h&&h.attributes&&h.attributes.CODECS&&(m=Dg(tc(h.attributes.CODECS)));b&&b.attributes&&b.attributes.CODECS&&(m.audio=b.attributes.CODECS);b=be(m.video);m=be(m.audio);var p={},t;for(t in f)p[t]={},m&&(p[t].audioContentType=m),b&&(p[t].videoContentType= 1401b),h.contentProtection&&h.contentProtection[t]&&h.contentProtection[t].pssh&&(p[t].pssh=h.contentProtection[t].pssh),"string"===typeof f[t]&&(p[t].url=f[t]);f=Ba(f,p)}return f?(d.currentSource().keySystems=f)&&!d.eme?(O.log.warn("DRM encrypted source cannot be decrypted without a DRM plugin"),!1):!0:!1},Lm=function(){if(!window.localStorage)return null;var b=window.localStorage.getItem("videojs-vhs");if(!b)return null;try{return JSON.parse(b)}catch(d){return null}},rr=function(b){return 0===b.toLowerCase().indexOf("data:application/vnd.videojs.vhs+json,")? 1402JSON.parse(b.substring(b.indexOf(",")+1)):b},Mm=function(b,d){b._requestCallbackSet&&(b._requestCallbackSet.delete(d),b._requestCallbackSet.size||delete b._requestCallbackSet)},Nm=function(b,d){b._responseCallbackSet&&(b._responseCallbackSet.delete(d),b._responseCallbackSet.size||delete b._responseCallbackSet)};Xa.supportsNativeHls=function(){if(!document||!document.createElement)return!1;var b=document.createElement("video");return O.getTech("Html5").isSupported()?"application/vnd.apple.mpegurl audio/mpegurl audio/x-mpegurl application/x-mpegurl video/x-mpegurl video/mpegurl application/mpegurl".split(" ").some(function(d){return/maybe|probably/i.test(b.canPlayType(d))}): 1403!1}();var sr=document&&document.createElement&&O.getTech("Html5").isSupported()?/maybe|probably/i.test(document.createElement("video").canPlayType("application/dash+xml")):!1;Xa.supportsNativeDash=sr;Xa.supportsTypeNatively=function(b){return"hls"===b?Xa.supportsNativeHls:"dash"===b?Xa.supportsNativeDash:!1};Xa.isSupported=function(){return O.log.warn("VHS is no longer a tech. Please remove it from your player's techOrder.")};Xa.xhr.onRequest=function(b){var d=Xa.xhr;d._requestCallbackSet||(d._requestCallbackSet= 1404new Set);d._requestCallbackSet.add(b)};Xa.xhr.onResponse=function(b){var d=Xa.xhr;d._responseCallbackSet||(d._responseCallbackSet=new Set);d._responseCallbackSet.add(b)};Xa.xhr.offRequest=function(b){Mm(Xa.xhr,b)};Xa.xhr.offResponse=function(b){Nm(Xa.xhr,b)};var Di=O.getComponent("Component"),$a=function(b,d,f){var h=Di.call(this,d,f.vhs)||this;"number"===typeof f.initialBandwidth&&(h.options_.bandwidth=f.initialBandwidth);h.logger_=ac("VhsHandler");d.options_&&d.options_.playerId&&(f=O.getPlayer(d.options_.playerId), 1405h.player_=f);h.tech_=d;h.source_=b;h.stats={};h.ignoreNextSeekingEvent_=!1;h.setOptions_();if(h.options_.overrideNative&&d.overrideNativeAudioTracks&&d.overrideNativeVideoTracks)d.overrideNativeAudioTracks(!0),d.overrideNativeVideoTracks(!0);else if(h.options_.overrideNative&&(d.featuresNativeVideoTracks||d.featuresNativeAudioTracks))throw Error("Overriding native VHS requires emulated tracks. See https://git.io/vMpjB");h.on(document,["fullscreenchange","webkitfullscreenchange","mozfullscreenchange", 1406"MSFullscreenChange"],function(m){(m=document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)&&m.contains(h.tech_.el())?h.playlistController_.fastQualityChange_():h.playlistController_.checkABR_()});h.on(h.tech_,"seeking",function(){this.ignoreNextSeekingEvent_?this.ignoreNextSeekingEvent_=!1:this.setCurrentTime(this.tech_.currentTime())});h.on(h.tech_,"error",function(){this.tech_.error()&&this.playlistController_&&this.playlistController_.pauseLoading()}); 1407h.on(h.tech_,"play",h.play);return h};$jscomp.inherits($a,Di);$a.prototype.setOptions_=function(b){var d=this;b=void 0===b?{}:b;this.options_=Ba(this.options_,b);this.options_.withCredentials=this.options_.withCredentials||!1;this.options_.limitRenditionByPlayerDimensions=!1===this.options_.limitRenditionByPlayerDimensions?!1:!0;this.options_.useDevicePixelRatio=this.options_.useDevicePixelRatio||!1;this.options_.useBandwidthFromLocalStorage="undefined"!==typeof this.source_.useBandwidthFromLocalStorage? 1408this.source_.useBandwidthFromLocalStorage:this.options_.useBandwidthFromLocalStorage||!1;this.options_.useForcedSubtitles=this.options_.useForcedSubtitles||
1408!1;this.options_.useNetworkInformationApi=this.options_.useNetworkInformationApi||!1;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|| 1409!1;this.options_.llhls=!1===this.options_.llhls?!1:!0;this.options_.bufferBasedABR=this.options_.bufferBasedABR||!1;"number"!==typeof this.options_.playlistExclusionDuration&&(this.options_.playlistExclusionDuration=60);"number"!==typeof this.options_.bandwidth&&this.options_.useBandwidthFromLocalStorage&&((b=Lm())&&b.bandwidth&&(this.options_.bandwidth=b.bandwidth,this.tech_.trigger({type:"usage",name:"vhs-bandwidth-from-local-storage"})),b&&b.throughput&&(this.options_.throughput=b.throughput,this.tech_.trigger({type:"usage", 1410name:"vhs-throughput-from-local-storage"})));"number"!==typeof this.options_.bandwidth&&(this.options_.bandwidth=pb.INITIAL_BANDWIDTH);this.options_.enableLowInitialPlaylist=this.options_.enableLowInitialPlaylist&&this.options_.bandwidth===pb.INITIAL_BANDWIDTH;"withCredentials useDevicePixelRatio customPixelRatio limitRenditionByPlayerDimensions bandwidth customTagParsers customTagMappers cacheEncryptionKeys playlistSelector initialPlaylistSelector bufferBasedABR liveRangeSafeTimeDelta llhls useForcedSubtitles useNetworkInformationApi useDtsForTimestampOffset exactManifestTimings leastPixelDiffSelector".split(" ").forEach(function(f){"undefined"!== 1411typeof d.source_[f]&&(d.options_[f]=d.source_[f])});this.limitRenditionByPlayerDimensions=this.options_.limitRenditionByPlayerDimensions;this.useDevicePixelRatio=this.options_.useDevicePixelRatio;b=this.options_.customPixelRatio;"number"===typeof b&&0<=b&&(this.customPixelRatio=b)};$a.prototype.setOptions=function(b){b=void 0===b?{}:b;this.setOptions_(b)};$a.prototype.src=function(b,d){var f=this;b&&(this.setOptions_(),this.options_.src=rr(this.source_.src),this.options_.tech=this.tech_,this.options_.externVhs= 1412Xa,this.options_.sourceType=Ck(d),this.options_.seekTo=function(h){f.tech_.setCurrentTime(h)},this.options_.player_=this.player_,this.playlistController_=new ha(this.options_),b=Ba({liveRangeSafeTimeDelta:vc},this.options_,{seekable:function(){return f.seekable()},media:function(){return f.playlistController_.media()},playlistController:this.playlistController_}),this.playbackWatcher_=new Ib(b),this.attachStreamingEventListeners_(),this.playlistController_.on("error",function(){var h=O.players[f.tech_.options_.playerId], 1413m=f.playlistController_.error;"object"!==typeof m||m.code?"string"===typeof m&&(m={message:m,code:3}):m.code=3;h.error(m)}),b=this.options_.bufferBasedABR?Xa.movingAverageBandwidthSelector(.55):Xa.STANDARD_PLAYLIST_SELECTOR,this.playlistController_.selectPlaylist=this.selectPlaylist?this.selectPlaylist.bind(this):b.bind(this),this.playlistController_.selectInitialPlaylist=Xa.INITIAL_PLAYLIST_SELECTOR.bind(this),this.playlists=this.playlistController_.mainPlaylistLoader_,this.mediaSource=this.playlistController_.mediaSource, 1414Object.defineProperties(this,{selectPlaylist:{get:function(){return this.playlistController_.selectPlaylist},set:function(h){this.playlistController_.selectPlaylist=h.bind(this)}},throughput:{get:function(){return this.playlistController_.mainSegmentLoader_.throughput.rate},set:function(h){this.playlistController_.mainSegmentLoader_.throughput.rate=h;this.playlistController_.mainSegmentLoader_.throughput.count=1}},bandwidth:{get:function(){var h=this.playlistController_.mainSegmentLoader_.bandwidth, 1415m=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection;this.options_.useNetworkInformationApi&&m&&(m=1E6*m.downlink,h=1E7<=m&&1E7<=h?Math.max(h,m):m);return h},set:function(h){this.playlistController_.mainSegmentLoader_.bandwidth=h;this.playlistController_.mainSegmentLoader_.throughput={rate:0,count:0}}},systemBandwidth:{get:function(){return Math.floor(1/(1/(this.bandwidth||1)+(0<this.throughput?1/this.throughput:0)))},set:function(){O.log.error('The "systemBandwidth" property is read-only')}}}), 1416this.options_.bandwidth&&(this.bandwidth=this.options_.bandwidth),this.options_.throughput&&(this.throughput=this.options_.throughput),Object.defineProperties(this.stats,{bandwidth:{get:function(){return f.bandwidth||0},enumerable:!0},mediaRequests:{get:function(){return f.playlistController_.mediaRequests_()||0},enumerable:!0},mediaRequestsAborted:{get:function(){return f.playlistController_.mediaRequestsAborted_()||0},enumerable:!0},mediaRequestsTimedout:{get:function(){return f.playlistController_.mediaRequestsTimedout_()|| 14170},enumerable:!0},mediaRequestsErrored:{get:function(){return f.playlistController_.mediaRequestsErrored_()||0},enumerable:!0},mediaTransferDuration:{get:function(){return f.playlistController_.mediaTransferDuration_()||0},enumerable:!0},mediaBytesTransferred:{get:function(){return f.playlistController_.mediaBytesTransferred_()||0},enumerable:!0},mediaSecondsLoaded:{get:function(){return f.playlistController_.mediaSecondsLoaded_()||0},enumerable:!0},mediaAppends:{get:function(){return f.playlistController_.mediaAppends_()|| 14180},enumerable:!0},mainAppendsToLoadedData:{get:function(){return f.playlistController_.mainAppendsToLoadedData_()||0},enumerable:!0},audioAppendsToLoadedData:{get:function(){return f.playlistController_.audioAppendsToLoadedData_()||0},enumerable:!0},appendsToLoadedData:{get:function(){return f.playlistController_.appendsToLoadedData_()||0},enumerable:!0},timeToLoadedData:{get:function(){return f.playlistController_.timeToLoadedData_()||0},enumerable:!0},buffered:{get:function(){return sd(f.tech_.buffered())}, 1419enumerable:!0},currentTime:{get:function(){return f.tech_.currentTime()},enumerable:!0},currentSource:{get:function(){return f.tech_.currentSource_},enumerable:!0},currentTech:{get:function(){return f.tech_.name_},enumerable:!0},duration:{get:function(){return f.tech_.duration()},enumerable:!0},main:{get:function(){return f.playlists.main},enumerable:!0},playerDimensions:{get:function(){return f.tech_.currentDimensions()},enumerable:!0},seekable:{get:function(){return sd(f.tech_.seekable())},enumerable:!0}, 1420timestamp:{get:function(){return Date.now()},enumerable:!0},videoPlaybackQuality:{get:function(){return f.tech_.getVideoPlaybackQuality()},enumerable:!0}}),this.tech_.one("canplay",this.playlistController_.setupFirstPlay.bind(this.playlistController_)),this.tech_.on("bandwidthupdate",function(){if(f.options_.useBandwidthFromLocalStorage){var h={bandwidth:f.bandwidth,throughput:Math.round(f.throughput)};if(window.localStorage){var m=Lm();m=m?Ba(m,h):h;try{window.localStorage.setItem("videojs-vhs", 1421JSON.stringify(m))}catch(p){}}}}),this.playlistController_.on("selectedinitialmedia",function(){kr(f)}),this.playlistController_.sourceUpdater_.on("createdsourcebuffers",function(){f.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_=window.URL.createObjectURL(this.playlistController_.mediaSource), 1422(O.browser.IS_ANY_SAFARI||O.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_)))};$a.prototype.createKeySessions_=function(){var b=this,d=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;this.logger_("waiting for EME key session creation");pr({player:this.player_,sourceKeySystems:this.source_.keySystems, 1423audioMedia:d&&d.media(),mainPlaylists:this.playlists.main.playlists}).then(function(){b.logger_("created EME key session");b.playlistController_.sourceUpdater_.initializedEme()}).catch(function(f){b.logger_("error while creating EME key session",f);
1423b.player_.error({message:"Failed to initialize media keys for EME",code:3})})};$a.prototype.handleWaitingForKey_=function(){this.logger_("waitingforkey fired, attempting to create any new key sessions");this.createKeySessions_()};$a.prototype.setupEme_= 1424function(){var b=this,d=this.playlistController_.mediaTypes_.AUDIO.activePlaylistLoader;d=qr({player:this.player_,sourceKeySystems:this.source_.keySystems,media:this.playlists.media(),audioMedia:d&&d.media()});this.player_.tech_.on("keystatuschange",function(f){b.playlistController_.updatePlaylistByKeyStatus(f.keyId,f.status)});this.handleWaitingForKey_=this.handleWaitingForKey_.bind(this);this.player_.tech_.on("waitingforkey",this.handleWaitingForKey_);d?this.createKeySessions_():this.playlistController_.sourceUpdater_.initializedEme()}; 1425$a.prototype.setupQualityLevels_=function(){var b=this,d=O.players[this.tech_.options_.playerId];d&&d.qualityLevels&&!this.qualityLevels_&&(this.qualityLevels_=d.qualityLevels(),this.playlistController_.on("selectedinitialmedia",function(){nr(b.qualityLevels_,b)}),this.playlists.on("mediachange",function(){Km(b.qualityLevels_,b.playlists)}))};$a.version=function(){return{"@videojs/http-streaming":"3.16.0","mux.js":"7.1.0","mpd-parser":"1.3.1","m3u8-parser":"7.2.0","aes-decrypter":"4.0.2"}};$a.prototype.version= 1426function(){return this.constructor.version()};$a.prototype.canChangeType=function(){return za.canChangeType()};$a.prototype.play=function(){this.playlistController_.play()};$a.prototype.setCurrentTime=function(b){this.playlistController_.setCurrentTime(b)};$a.prototype.duration=function(){return this.playlistController_.duration()};$a.prototype.seekable=function(){return this.playlistController_.seekable()};$a.prototype.dispose=function(){this.playbackWatcher_&&this.playbackWatcher_.dispose();this.playlistController_&& 1427this.playlistController_.dispose();this.qualityLevels_&&this.qualityLevels_.dispose();this.tech_&&this.tech_.vhs&&delete this.tech_.vhs;this.mediaSourceUrl_&&window.URL.revokeObjectURL&&(window.URL.revokeObjectURL(this.mediaSourceUrl_),this.mediaSourceUrl_=null);this.tech_&&this.tech_.off("waitingforkey",this.handleWaitingForKey_);Di.prototype.dispose.call(this)};$a.prototype.convertToProgramTime=function(b,d){return Dp({playlist:this.playlistController_.media(),time:b,callback:d})};$a.prototype.seekToProgramTime= 1428function(b,d,f,h){f=void 0===f?!0:f;h=void 0===h?2:h;return Bl({programTime:b,playlist:this.playlistController_.media(),retryCount:h,pauseAfterSeek:f,seekTo:this.options_.seekTo,tech:this.options_.tech,callback:d})};$a.prototype.setupXhrHooks_=function(){var b=this;this.xhr.onRequest=function(d){var f=b.xhr;f._requestCallbackSet||(f._requestCallbackSet=new Set);f._requestCallbackSet.add(d)};this.xhr.onResponse=function(d){var f=b.xhr;f._responseCallbackSet||(f._responseCallbackSet=new Set);f._responseCallbackSet.add(d)}; 1429this.xhr.offRequest=function(d){Mm(b.xhr,d)};this.xhr.offResponse=function(d){Nm(b.xhr,d)};this.player_.trigger("xhr-hooks-ready")};$a.prototype.attachStreamingEventListeners_=function(){var b=this;["seekablerangeschanged","bufferedrangeschanged","contentsteeringloadstart","contentsteeringloadcomplete","contentsteeringparsed"].forEach(function(d){b.playlistController_.on(d,function(f){b.player_.trigger(jb({},f))})});["gapjumped","playedrangeschanged"].forEach(function(d){b.playbackWatcher_.on(d,function(f){b.player_.trigger(jb({}, 1430f))})})};var Jg={name:"videojs-http-streaming",VERSION:"3.16.0",canHandleSource:function(b,d){d=void 0===d?{}:d;d=Ba(O.options,d);return d.vhs.experimentalUseMMS||Qe("avc1.4d400d,mp4a.40.2",!1)?Jg.canPlayType(b.type,d):!1},handleSource:function(b,d,f){f=void 0===f?{}:f;f=Ba(O.options,f);d.vhs=new $a(b,d,f);d.vhs.xhr=yl();d.vhs.setupXhrHooks_();d.vhs.src(b.src,b.type);return d.vhs},canPlayType:function(b,d){b=Ck(b);if(!b)return"";d=Jg.getOverrideNative(d);return!Xa.supportsTypeNatively(b)||d?"maybe": 1431""},getOverrideNative:function(b){var d=b=void 0===b?{}:b;b=!(O.browser.IS_ANY_SAFARI||O.browser.IS_IOS);d=void 0===d.vhs?{}:d.vhs;return void 0===d.overrideNative?b:d.overrideNative}};Qe("avc1.4d400d,mp4a.40.2",!0)&&O.getTech("Html5").registerSourceHandler(Jg,0);O.VhsHandler=$a;O.VhsSourceHandler=Jg;O.Vhs=Xa;
1431O.use||O.registerComponent("Vhs",Xa);O.options.vhs=O.options.vhs||{};O.getPlugin&&O.getPlugin("reloadSourceOnError")||O.registerPlugin("reloadSourceOnError",mr);return O}); 1432!function(){var w=window&&window.videojs;w&&(w.CDN_VERSION="8.20.0");!0}(); 1433(function(w,C){"object"===typeof exports&&"undefined"!==typeof module?module.exports=C(require("video.js"),require("global/window")):"function"===typeof define&&define.amd?define(["video.js","global/window"],C):w.videojsOverlay=C(w.videojs,w.window)})(this,function(w,C){function K(Y,aa){Y.prototype=Object.create(aa.prototype);Y.prototype.constructor=Y;Y.__proto__=aa}function R(Y){if(void 0===Y)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Y}w=w&&w.hasOwnProperty("default")? 1434w["default"]:w;C=C&&C.hasOwnProperty("default")?C["default"]:C;var Z={align:"top-left",class:"",content:"This overlay will show up while the video is playing",debug:!1,showBackground:!0,attachToControlBar:!1,overlays:[{start:"playing",end:"paused"}]},B=w.getComponent("Component"),da=w.dom||w,pa=w.registerPlugin||w.plugin,va=function(Y){return"number"===typeof Y&&Y===Y};B=function(Y){function aa(Q,la){var na=Y.call(this,Q,la)||this;["start","end"].forEach(function(Ca){var Ya=na.options_[Ca];if(va(Ya))na[Ca+ 1435"Event_"]="timeupdate";else if("string"===typeof Ya&&/^\S+$/.test(Ya))na[Ca+"Event_"]=Ya;else if("start"===Ca)throw Error('invalid "start" option; expected number or string');});["endListener_","rewindListener_","startListener_"].forEach(function(Ca){na[Ca]=function(Ya){return aa.prototype[Ca].call(R(R(na)),Ya)}});if("timeupdate"===na.startEvent_)na.on(Q,"timeupdate",na.rewindListener_);na.debug('created, listening to "'+na.startEvent_+'" for "start" and "'+(na.endEvent_||"nothing")+'" for "end"'); 1436na.hide();return na}K(aa,Y);var qa=aa.prototype;qa.createEl=function(){var Q=this.options_,la=Q.content;Q=da.createEl("div",{className:"\n vjs-overlay\n vjs-overlay-"+Q.align+"\n "+Q.class+"\n "+(Q.showBackground?"vjs-overlay-background":"vjs-overlay-no-background")+"\n vjs-hidden\n "});"string"===typeof la?Q.innerHTML=la:la instanceof C.DocumentFragment?Q.appendChild(la):da.appendContent(Q,la);return Q};qa.debug=function(){if(this.options_.debug){for(var Q= 1437w.log,la=Q,na=arguments.length,Ca=Array(na),Ya=0;Ya<na;Ya++)Ca[Ya]=arguments[Ya];Q.hasOwnProperty(Ca[0])&&"function"===typeof Q[Ca[0]]&&(la=Q[Ca.shift()]);la.apply(void 0,["overlay#"+this.id()+": "].concat(Ca))}};qa.hide=function(){Y.prototype.hide.call(this);this.debug("hidden");this.debug('bound `startListener_` to "'+this.startEvent_+'"');this.endEvent_&&(this.debug('unbound `endListener_` from "'+this.endEvent_+'"'),this.off(this.player(),this.endEvent_,this.endListener_));this.on(this.player(), 1438this.startEvent_,this.startListener_);return this};qa.shouldHide_=function(Q,la){var na=this.options_.end;return va(na)?Q>=na:na===la};qa.show=function(){Y.prototype.show.call(this);this.off(this.player(),this.startEvent_,this.startListener_);this.debug("shown");this.debug('unbound `startListener_` from "'+this.startEvent_+'"');this.endEvent_&&(this.debug('bound `endListener_` to "'+this.endEvent_+'"'),this.on(this.player(),this.endEvent_,this.endListener_));return this};qa.shouldShow_=function(Q, 1439la){var na=this.options_.start,Ca=this.options_.end;return va(na)?va(Ca)?Q>=na&&Q<Ca:this.hasShownSinceSeek_?Math.floor(Q)===na:(this.hasShownSinceSeek_=!0,Q>=na):na===la};qa.startListener_=function(Q){var la=this.player().currentTime();this.shouldShow_(la,Q.type)&&this.show()};qa.endListener_=function(Q){var la=this.player().currentTime();this.shouldHide_(la,Q.type)&&this.hide()};qa.rewindListener_=function(Q){Q=this.player().currentTime();var la=this.options_.start,na=this.options_.end;Q<this.previousTime_&& 1440(this.debug("rewind detected"),va(na)&&!this.shouldShow_(Q)?(this.debug("hiding; "+na+" is an integer and overlay should not show at this time"),this.hasShownSinceSeek_=!1,this.hide()):"string"===typeof na&&/^\S+$/.test(na)&&Q<la&&(this.debug("hiding; show point ("+la+") is before now ("+Q+") and end point ("+na+") is an event"),this.hasShownSinceSeek_=!1,this.hide()));this.previousTime_=Q};return aa}(B);w.registerComponent("Overlay",B);B=function(Y){var aa=this,qa=w.mergeOptions(Z,Y);Array.isArray(this.overlays_)&& 1441this.overlays_.forEach(function(Q){aa.removeChild(Q);aa.controlBar&&aa.controlBar.removeChild(Q);Q.dispose()});Y=qa.overlays;delete qa.overlays;this.overlays_=Y.map(function(Q){Q=w.mergeOptions(qa,Q);var la="string"===typeof Q.attachToControlBar||!0===Q.attachToControlBar;if(!aa.controls()||!aa.controlBar)return aa.addChild("overlay",Q);
1441if(la&&-1!==Q.align.indexOf("bottom")&&(la=aa.controlBar.children()[0],void 0!==aa.controlBar.getChild(Q.attachToControlBar)&&(la=aa.controlBar.getChild(Q.attachToControlBar)), 1442la))return Q=aa.controlBar.addChild("overlay",Q),aa.controlBar.el().insertBefore(Q.el(),la.el()),Q;Q=aa.addChild("overlay",Q);aa.el().insertBefore(Q.el(),aa.controlBar.el());return Q})};B.VERSION="2.1.4";pa("overlay",B);return B}); 1443(function(w,C,K){function R(B,da,pa){this._options={};this._options=w.extend({},pa);this._player=w.extend({id:w(B).attr("id")},ssmpConfig,this._options);this._component=w(B).parents(".videoPlayer");this.firstload=!0;this._userAgent={};this._userAgent.useragent=navigator.userAgent||navigator.vendor||C.opera;/android/i.test(this._userAgent.useragent)?this._userAgent.shortname="android":/Edge/i.test(this._userAgent.useragent)?this._userAgent.shortname="edge":/Chrome/i.test(this._userAgent.useragent)? 1444this._userAgent.shortname="chrome":/Firefox/i.test(this._userAgent.useragent)?this._userAgent.shortname="firefox":/Safari/i.test(this._userAgent.useragent)?this._userAgent.shortname="safari":this._userAgent.shortname=!1;this._params={};this._analytics={};this._version="1.0.19";if(C.location.search)for(B=C.location.search.substring(1).split("\x26"),da=0;da<B.length;da++)this._params[B[da].split("\x3d")[0]]=!0,B[da].match(/=/)&&(this._params[B[da].split("\x3d")[0]]=B[da].split("\x3d")[1].toLowerCase()); 1445this.init();return!1}var Z=null;R.prototype.init=function(){if(!this._player.client)return this.showMessage("Error : data-client attribute must be specified"),!1;if(!this._player.type)return this.showMessage('Error : data-type attribute must be either "live" or "vod"'),!1;this.catchupHideDelay=isNaN(this._player.catchupHideDelay)?5E3:1E3*parseInt(this._player.catchupHideDelay);this.carouselStatus=0;"live"===this._player.type?this.fetchLiveData(this._player.id,!0):"vod"===this._player.type&&this.fetchVodData(this._player.id)}; 1446R.prototype.setDefaultKeys=function(){this._key=this._player.id+"-volume";this._muteKey=this._player.id+"-mute";this._caption=this._player.id+"-caption"};R.prototype.fetchLiveData=function(B,da){this.setDefaultKeys();if(!this._player.liveStreams)return this.showMessage("Error : live streams not defined in config"),!1;if(!this._player.channel)return this.showMessage("Error : data-channel attribute must be specified"),!1;B=this._player.liveStreams;if(!B[this._player.channel])return this.showMessage('Error : channel "'+ 1447this._player.channel+'"not found in config'),!1;this._player.channelData=B[this._player.channel];this._player.showCatchup=B[this._player.channel].showCatchup;this._player.hls=this._player.channelData.hls;this._player.dash=this._player.channelData.dash;this._player.poster=this._player.channelData.poster;da&&this.loadPlayer()};R.prototype.fetchVodData=function(){var B=this;B.setDefaultKeys();if("undefined"!==typeof B._options.videourl)B._player.hls=B._player.testStream?B._player.testStream:B._options.videourl, 1448B._player.mp4=B._player.testStream?B._player.testStream:B._options.videourl,B.loadPlayer();else if(B._player.hls){if(!B._player.poster)return B.showMessage("Error : data-poster attribute must be specified"),!1;B.loadPlayer()}else if("undefined"!==typeof B._options.uvid&&qVars.globalAjax.videoSearch)fetch(qVars.globalAjax.videoSearch.replace("{0}",B._options.uvid)).then(function(da){if(da.ok)return da.json();throw Error();}).then(function(da){console.error(da);Array.isArray(da.encoding)&&da.encoding.forEach(function(pa){switch(pa.platformCode){case "HttpLiveStreaming":B._player.hls= 1449pa.url;break;case "MobileH264":B._player.mp4=pa.url}});!B._player.customPoster&&Array.isArray(da.thumbnail)&&0<da.thumbnail.length&&da.thumbnail[0].url&&(B._player.poster=da.thumbnail[0].url);B.loadPlayer()}).catch(function(){return B.showMessage("Error : no video data for uvid: "+B._options.uvid)});else return B.showMessage("Error : data-hls attribute must be specified"),!1};R.prototype.loadPlayer=function(){0===w("#"+this._player.id).length&&w("#"+this._player.id+"-wrapper div").html(w(K.createElement("div")).attr("id", 1450this._player.id));this._framework="VideoJS";this.videoJs();this.debug("Player Init")};R.prototype.hasPersistedCaptions=function(){var B=this.getStorageItem(this._caption);return null!==B&&"showing"===B};R.prototype.videoJs=function(){var B=this;0===w("#"+B._player.id).length&&w("#"+B._player.id+"-wrapper div").html(w(K.createElement("div")).attr("id",B._player.id));if(!B._playerInstance){var da=navigator.userAgent||navigator.vendor||C.opera,pa=B._player.muted?" muted":"";w("#"+B._player.id).replaceWith('\x3cvideo webkit-playsinline playsinline id\x3d"'+ 1451B._player.id+'" crossorigin\x3d"anonymous" poster\x3d"'+B._player.poster+'" style\x3d"width: 100%; height: 100%;" class\x3d"video-js vjs-default-skin vjs-qvc-skin"'+pa+"\x3e\x3c/video\x3e");B._player.captions&&(pa=B.hasPersistedCaptions()?"default":"",w("#"+B._player.id).append('\x3ctrack kind\x3d"captions" src\x3d"'+
1451B._player.captions+'" srclang\x3d"en" label\x3d"English" '+pa+"\x3e\x3c/track\x3e"));var va=C.VTTCue||C.TextTrackCue,Y={line:-2,position:30,align:"left",positionAlign:"line-left"};B._config= 1452{poster:B._player.poster,controls:!0,muted:!!B._player.muted,autoplay:!!B._player.autoplay,preload:"none",nativeControlsForTouch:!0,customControlsOnMobile:!1,persistTextTrackSettings:!0,controlBar:{volumePanel:{inline:!1,vertical:!0}},language:B._player.langCode,html5:{nativeTextTracks:!1,hlsjsConfig:{cueHandler:{newCue:function(Q,la,na,Ca){Q.addCue(w.extend(new va(la,na,Ca.getDisplayText()),Y))}}}},techOrder:["html5"]};/Safari/i.test(da)&&!/chrome/i.test(da)&&"qvcus"===B._player.client&&(B._config.html5.nativeTextTracks= 1453!0);/iPad|iPhone|iPod/.test(da)&&!C.MSStream&&(B._config.html5.nativeTextTracks=!0,B._config.muted=!1,B._config.autoplay=!1,B._config.nativeControlsForTouch=!0,B._config.customControlsOnMobile=!1,B._player.dvr=!1);/android/i.test(da)&&(B._config.muted=!1,B._config.autoplay=!1,B._config.nativeControlsForTouch=!1,B._config.customControlsOnMobile=!1,B._player.dvr=!1,videojs.options.hls={overrideNative:!0});videojs.addLanguage(B._player.langCode,B._player.lang);var aa=B.getStorageItem(B._muteKey),qa= 1454B.getStorageItem(B._key);B._playerInstance=videojs(B._player.id,B._config,function(){"vod"===B._player.type?B._playerInstance.src([{src:B._player.hls,type:"application/x-mpegURL"}]):"live"===B._player.type&&(!0===B._player.dvr&&(B._player.hls=B._player.hls.replace(/(\?|&)dvr_window_length=18/,"")),"dash"===B._player.format?B._playerInstance.src({src:B._player.dash,type:"application/dash+xml"}):B._playerInstance.src({src:B._player.hls,type:"application/x-mpegURL"}));var Q=B._config.muted;B.firstload? 1455B.setStorageItem(B._muteKey,Q):(null!==qa&&parseFloat(qa)&&B._playerInstance.volume(parseFloat(qa)),Q="true"===aa);B._playerInstance.muted(Q);B.firstload=!1;B._component.trigger("ssmp.built",[B._player.id])});B._analytics.data={env:"live",type:B._player.type,client:B._player.client,streamUrl:B._player.hls,playerSession:(new Date).getTime().toString()+Math.floor(999999*Math.random()).toString(),referrerUrl:C.location.href,userAgent:navigator.userAgent};"vod"===B._player.type&&(B._analytics.data.videoID= 1456"undefined"!==typeof B._options.uvid&&B._options.uvid?B._options.uvid:null);B._playerInstance.on("error",function(){});B._playerInstance.on("click",function(Q){1>w(Q.target).parents(".vjs-overlay").length&&null===Q.target.className.match(/(vjs-overlay)/g)&&B.hideEpg()});B._playerInstance.on("dblclick",function(Q){if("vjs-tech"!==Q.target.className)return!1;Q=w(Q.target).text();B._playerInstance.isFullscreen()&&0===Q.length?B._playerInstance.exitFullscreen():B._playerInstance.isFullscreen()||0!==Q.length|| 1457B._playerInstance.requestFullscreen();B._playerInstance.play()});B._playerInstance.on("ready",function(){B._player.callback&&eval(B._player.callback+"(this)");"function"===typeof qvcPlayerReady&&qvcPlayerReady(B._player.id,B._playerInstance);"live"===B._player.type&&B.updateEpg();var Q=w("#"+B._player.id);Q.find(".vjs-big-play-button").wrap('\x3cdiv class\x3d"vjs-play-wrapper"\x3e\x3cdiv class\x3d"vjs-play-container"\x3e\x3c/div\x3e\x3c/div\x3e');Q.find(".vjs-play-wrapper").on("click",function(){B.play()}); 1458"live"===B._player.type&&!0===B._player.dvr&&(Q.addClass("vjs-dvr-active"),Q.find(".vjs-play-container").append('\x3cbutton class\x3d"vjs-live-button" type\x3d"button" aria-live\x3d"polite" title\x3d"'+i18n.get("Back To Live")+'"\x3e\x3cspan class\x3d"vjs-control-text"\x3e'+i18n.get("Back To Live")+"\x3c/span\x3e\x3c/button\x3e"),Q.find(".vjs-play-wrapper .vjs-live-button").on("click",function(la){var na=B._playerInstance.seekable().end(0)||null;na&&(la.stopPropagation(),B._playerInstance.currentTime(na), 1459B.play())}));B.fixControlBarInEdge()});B._playerInstance.on("play",function(){B._analytics.data.evt="play";B.fixControlBarInEdge()});B._playerInstance.on("pause",function(){var Q=w("#"+B._player.id);Q.find(".vjs-big-play-button").attr("title",i18n.get("Resume"));Q.find(".vjs-big-play-button .vjs-control-text").html(i18n.get("Resume"))});B._playerInstance.on("userinactive",function(){Z=C.setTimeout(function(){B.hideEpg();C.clearTimeout(Z)},B.catchupHideDelay)});B._playerInstance.on("useractive",function(){Z&& 1460C.clearTimeout(Z)});B._playerInstance.on("complete",function(){});B._playerInstance.on("texttrackchange",function(){if(B._playerInstance.textTracks()[0]){var Q=B._playerInstance.textTracks()[0].mode;B._caption!==Q&&B.setStorageItem(B._caption,Q)}});B._playerInstance.on("volumechange",function(){B._player.muted=B._playerInstance.muted();B.setStorageItem(B._key,B._playerInstance.volume());B.setStorageItem(B._muteKey,B._playerInstance.muted())});B._playerInstance.on("fullscreenchange",function(){!0!== 1461B._player.carousel||!B._player.showCatchup||"qvcuk"!==B._player.client&&"qvcde"!==B._player.client||(B._playerInstance.isFullscreen()?(B._playerInstance.overlay({overlays:[{content:'\x3cdiv class\x3d"epg-carousel"\x3e\x3cdiv class\x3d"epg-container hidden" id\x3d"epg-container"\x3e\x3c/div\x3e\x3cspan class\x3d"btn btn-primary carousel-toggle"\x3e'+i18n.get("Previous Shows")+"\x3c/span\x3e\x3c/div\x3e",start:"mousemove",align:"bottom-qvc"}]}),B._component.trigger("catchuptv",[!1])):(B.carouselStatus= 14620,w(".vjs-overlay").remove()),w(".epg-carousel .carousel-toggle").
1462click(function(){w(".epg-carousel .carousel-toggle").hide();B.carouselStatus=1;B.generateEpg()}))});B.debug("videoJS(): Render Player\x3cbr\x3e"+B._player.hls,"blue")}};R.prototype.fixControlBarInEdge=function(){/Edge/i.test(this._userAgent.shortname)&&w("#"+this._player.id).removeClass("vjs-using-native-controls").find("video").removeAttr("controls")};R.prototype.hideEpg=function(){1===this.carouselStatus&&(this.carouselStatus=0,w(".epg-carousel .carousel-toggle").css("top", 1463"220px"),this._component.trigger("catchuptv",[!1]),w(".epg-container").html("").addClass("hidden"),w(".ssmp-epg-scrollLeft,.ssmp-epg-scrollRight").remove(),w(".epg-carousel .carousel-toggle").show().animate({top:"0"},{duration:300}))};R.prototype.updateEpg=function(){if(shopLiveTV){var B=shopLiveTV.player.curShowTitle;w("#"+this._player.id).find(".vjs-live-display").html(this._player.channelData.name+" \x3cspan\x3e"+B+"\x3c/span\x3e")}};R.prototype.hasLocalStorage=function(){try{return C.localStorage.setItem("persistVolume", 1464"persistVolume"),C.localStorage.removeItem("persistVolume"),!0}catch(B){return!1}};R.prototype.getStorageItem=function(B){return this.hasLocalStorage()?C.localStorage.getItem(B):!1};R.prototype.setStorageItem=function(B,da){return this.hasLocalStorage()?C.localStorage.setItem(B,da):!1};R.prototype.analytics=function(){};R.prototype.debug=function(B,da){if(this._params.ssmp_debug){var pa=w("#"+this._player.id+"-debug");0===pa.length&&(pa=w(K.createElement("div")).attr("id",this._player.id+"-debug").css({background:"#fff1c1", 1465border:"1px solid #ea9a00",padding:"10px",width:"100%",height:"250px",overflow:"auto","margin-top":"10px"}),w("#"+this._player.id+"-wrapper").after(pa),pa.append("Framework: "+this._framework+"\x3cbr\x3e"),"VideoJS"===this._framework&&pa.append("Tech: "+this._playerInstance.techName_),console.debug("SSMP DEBUG"),console.debug("-----------------------------------------"),console.debug(this));B&&(B=w(K.createElement("p")).css({"font-size":"10px","font-family":"Courier New",color:da?da:"black"}).html(B), 1466pa.prepend(B))}};R.prototype.play=function(){this._playerInstance&&this._playerInstance.play()};R.prototype.pause=function(){this._playerInstance&&this._playerInstance.pause()};R.prototype.uvid=function(B){this._component.data("player-type","vod");w("#"+this._player.id+"-wrapper div").html("");"VideoJS"===this._framework&&this._playerInstance.dispose();delete this._playerInstance;this._options.uvid=B;this._player.type="vod";this.init()};R.prototype.changeMedia=function(B){this._options.poster=this._player.poster= 1467B.poster;this._options.hls=this._player.hls=B.hls;this._options.mp4=this._player.mp4=B.mp4;this._options.captions=this._player.captions=B.captions?B.captions:!1;w("#"+this._player.id+"-wrapper div").html("");"VideoJS"===this._framework&&this._playerInstance.dispose();delete this._playerInstance;this.init()};R.prototype.changeMediaInline=function(B){this._options.poster=this._player.poster=B.poster;this._options.hls=this._player.hls=B.hls;this._options.mp4=this._player.mp4=B.mp4;this._options.captions= 1468this._player.captions=B.captions?B.captions:!1;this._playerInstance.poster(B.poster);this._playerInstance.src([{src:B.hls,type:"application/x-mpegURL"},{src:B.mp4,type:"video/mp4"}]);B=this._playerInstance.remoteTextTracks();for(var da=0;da<B.length;da++)this._playerInstance.removeRemoteTextTrack(B[da]);this._options.captions&&this._playerInstance.addRemoteTextTrack({src:this._player.captions,kind:"subtitles",srclang:"en",label:"English",default:this.hasPersistedCaptions()?"default":""},!1);this.play()}; 1469R.prototype.changeSource=function(B){var da=this;da._component.data("player-type","vod");if("undefined"!==B){var pa=da._player.id.replace(/-/g,"");w.ajax({url:"https://d2q1b32gh59m9o.cloudfront.net/player/config?callback\x3d"+pa+"\x26client\x3d"+da._player.client+"\x26type\x3dvod\x26apiKey\x3d"+da._player.apiKey+"\x26videoId\x3d"+B+"\x26format\x3djsonp",crossDomain:!0,dataType:"jsonp",jsonpCallback:pa,cache:!0,success:function(va){da._player.type="vod";da._playerInstance.src([{src:va.vod.stream.hls, 1470type:"application/x-mpegURL"},{src:va.vod.stream.mp4,type:"video/mp4"}]);if("vod"===da._player.type&&!1===da._player.dvr){var Y=da._playerInstance.controlBar.el(),aa=Y.getElementsByClassName("vjs-custom-title");0<aa.length&&aa[0].remove();aa=K.createElement("div");aa.className="vjs-custom-title vjs-control";var qa=K.createElement("div");aa.appendChild(qa);aa.firstElementChild.className="vjs-title-display";aa.firstElementChild.innerHTML=va.vod.title;Y.insertBefore(aa,Y.getElementsByClassName("vjs-progress-control")[0])}da.play()}, 1471error:function(va,Y,aa){da.showMessage("API Error : Invalid Video Config");console.error(aa);return!1}})}else da.showMessage("Error: data-uvid attribute must be specified");da.hideEpg()};R.prototype.changeLiveSource=function(B){this._component.data("player-type","live");this._options.channel=B;this._player.channel=B;this._player.type="live";w(".vjs-custom-title").remove();this.fetchLiveData(this._player.id,!1);"dash"===this._player.format?this._playerInstance.src({src:this._player.dash,type:"application/d
1471ash+xml"}): 1472this._playerInstance.src({src:this._player.hls,type:"application/x-mpegURL"});this.play();this.hideEpg()};R.prototype.changeChannel=function(B){this._component.data("player-type","live");w("#"+this._player.id+"-wrapper div").html("");"VideoJS"===this._framework&&this._playerInstance.dispose();delete this._playerInstance;this._options.channel=B;this._player.channel=B;this._player.type="live";this.init()};R.prototype.showMessage=function(B){console.error("ERROR: "+B)};R.prototype.generateEpg=function(){var B= 1473this;B.positionSaved=0;w.ajax({url:B._player.channelData.epg,success:function(da){if("undefined"!==da.ScheduleEvent){da=da.ScheduleEvent;var pa="";w(".epg-carousel").css("top","220px");w.each(da,function(Y,aa){var qa=Y="",Q="",la=new Date(aa.start_date),na=new Date(aa.end_date),Ca=new Date,Ya="",ic="h:MM TT";"string"===typeof qVars.format.time&&""!==qVars.format.time&&(ic=qVars.format.time);dateFormat(la,"isoDate")<dateFormat(Ca,"isoDate")&&(ic="ddd, "+ic);"undefined"!==aa.uvid&&"null"!==aa.uvid&& 1474null!==aa.uvid&&(Q='data-vod\x3d"'+aa.uvid+'"');var gf=la.getTime()>Ca.getTime()?'\x3cdiv class\x3d"vod-timer"\x3e\x3cspan class\x3d"vod-timer-btn"\x3e\x3c/span\x3e\x3c/div\x3e':'\x3cdiv class\x3d"vod-play"\x3e\x3cspan class\x3d"vod-play-btn"\x3e\x3c/span\x3e\x3c/div\x3e';Ca.getTime()>=la.getTime()&&Ca.getTime()<=na.getTime()&&(Y='\x3cdiv class\x3d"vod-live"\x3e\x3cspan class\x3d"vod-live-btn"\x3eLIVE\x3c/span\x3e\x3c/div\x3e',qa="currently-live");if(""!==Q||""!==qa)Ya='data-cm-title\x3d"'+aa.title.replace(/"/g, 1475"")+'" data-cm-date\x3d"'+dateFormat(la,"dd")+la.toLocaleDateString("en-US",{month:"short"}).toUpperCase()+dateFormat(la,"yyyy")+'" data-cm-time\x3d"'+dateFormat(la,"HHMM")+'" data-cm-duration\x3d"'+(na.getTime()-la.getTime())/6E4+'"';pa+='\x3cdiv class\x3d"programme '+qa+'" style\x3d"background-image:url(\''+aa.image_w320.replace("320","270")+"')\" "+Ya+Q+'\x3e\x3cdiv class\x3d"overlay"\x3e'+gf+Y+'\x3cdiv class\x3d"overlay-content"\x3e\x3cspan class\x3d"programme-title"\x3e'+aa.title+'\x3c/span\x3e\x3cspan class\x3d"programme-date" data-startdate\x3d"'+ 1476la.getTime()+'" data-enddate\x3d"'+na.getTime()+'"\x3e'+dateFormat(la,ic)+" - "+dateFormat(na,ic)+"\x3c/span\x3e\x3c/div\x3e\x3c/div\x3e\x3c/div\x3e"});w(".vjs-overlay .epg-carousel .epg-container").html(pa).removeClass("hidden");B._component.trigger("catchuptv",[!0]);w(".epg-carousel").animate({top:0},300);da=w(K.createElement("div")).addClass("ssmp-epg-scrollLeft vjs-hidden").html('\x3cdiv class\x3d"control-left"\x3e\x3cspan class\x3d"vjs-icon-play"\x3e\x3c/span\x3e\x3c/div\x3e').on("click",function(Y){Y.preventDefault(); 1477"undefined"===typeof B.positionSaved&&(B.positionSaved=0);w(".vjs-overlay .epg-carousel .epg-container").width();Y=B.positionSaved-282;Y=0>Y?0:Y;w(".vjs-overlay .epg-carousel .epg-container").stop().animate({scrollLeft:Math.floor(Y)},300);0===Y?w(".ssmp-epg-scrollLeft").addClass("vjs-hidden"):(w(".ssmp-epg-scrollLeft.vjs-hidden").removeClass("vjs-hidden"),w(".ssmp-epg-scrollRight.vjs-hidden").removeClass("vjs-hidden"));B.positionSaved=Y}).on("dblclick",function(Y){Y.preventDefault()});var va=w(K.createElement("div")).addClass("ssmp-epg-scrollRight").html('\x3cdiv class\x3d"control-right"\x3e\x3cspan class\x3d"vjs-icon-play"\x3e\x3c/span\x3e\x3c/div\x3e').on("click", 1478function(Y){Y.preventDefault();"undefined"===typeof B.positionSaved&&(B.positionSaved=0);var aa=w(".vjs-overlay .epg-carousel .epg-container").width();Y=B._options.width;if("undefined"===typeof Y||aa!==Y)Y=aa;aa=B.positionSaved+282;aa=aa>282*(w(".vjs-overlay .epg-carousel .epg-container .programme").length-Math.floor(Y/282))?282*(w(".vjs-overlay .epg-carousel .epg-container .programme").length-Math.floor(Y/282)):aa;w(".vjs-overlay .epg-carousel .epg-container").stop().animate({scrollLeft:Math.floor(aa)}, 1479300);B.positionSaved=aa;aa===282*(w(".vjs-overlay .epg-carousel .epg-container .programme").length-Math.floor(Y/282))?w(".ssmp-epg-scrollRight").addClass("vjs-hidden"):(w(".ssmp-epg-scrollRight.vjs-hidden").removeClass("vjs-hidden"),w(".ssmp-epg-scrollLeft.vjs-hidden").removeClass("vjs-hidden"))}).on("dblclick",function(Y){Y.preventDefault()});w(".vjs-overlay .epg-carousel").append(da);w(".vjs-overlay .epg-carousel").append(va);"150px"===w(".programme").css("top")?0:"150px";setTimeout(function(){var Y= 1480K.getElementsByClassName("programme"),aa=K.getElementsByClassName("currently-live");Y=Array.prototype.indexOf.call(Y,aa[0]);aa=w(".vjs-overlay .epg-carousel .epg-container").width();var qa=B._options.width;if("undefined"===typeof qa||aa!==qa)qa=aa;Y=282*(Y-Math.floor(Math.floor(qa/282)/2));B.positionSaved=Y;w(".vjs-overlay .epg-carousel .epg-container").stop().animate({scrollLeft:Math.floor(Y)},300);w(".ssmp-epg-scrollLeft").removeClass("vjs-hidden")},100);w(".programme[data-vod], .programme.currently-live").on("click", 1481function(){var Y=w(this);B._playerInstance.paused()||B._playerInstance.pause();void 0!==Y.data("vod")?B.changeSource(w(this).data("vod")):B.changeLiveSource(B._player.channel)})}}})};w.fn.ssmp=function(B,da,pa,va){if("undefined"===typeof ssmpConfig)return!1;var Y=w(this);B||(B=Y.data());var aa=Y.attr("id")?Y.attr("id"):"ssmp-"+Math.floor(1E7*Math.random()+1);Y.attr("id",aa);var qa=aa+"-wrapper";aa=w("#"+qa);0===aa.length&&(Y.wrap('\x3cdiv class\x3d"ssmp-wrapper" id\x3d"'+qa+'"\x3e\x3cdiv class\x3d"ssmp-container"\x3e\x3c/div\x3e\x3c/div\x3e'), 1482aa=w("#"+qa));
1482Y=aa.get(0);qa=w("#"+qa).data("ssmp");var Q="object"===typeof B&&B;if("string"===typeof B)return"undefined"!==typeof qa?qa[B](da,pa,va):void 0;"undefined"===typeof qa&&aa.data("ssmp",qa=new R(this,Y,Q,da));return qa};w.fn.ssmp.Constructor=R})(jQuery,window,document,void 0); 1483var ssmpConfig={thumbTemp:"undefined"!==typeof thumbUrl?thumbUrl:"",defaultPoster:"",hasDVR:!1,liveStreams:"undefined"!==typeof oLiveStreams?oLiveStreams:{}},ssVideoPlayer={oPdSetting:{auto:{n:"qvcpdap",v:!0}},aVideos:[],dataKeys:{product:"qvc-product-video",recipe:"qvc-recipe-video",programGuide:"qvc-programguide-video",live:"ssmplive"},curChannel:"",bPdShowVideo:!1,bPdAutoPlay:!1,muted:!1,scrolling:!1,sThumbPath:ssmpConfig.thumbTemp,lastScrollTop:0,squeezeback:!1,squeezing:!1,squeezeMaxWidth:500, 1484squeezeMinWidth:300,squeezeInterval:200,squeezePoint:0,player:"ssmp",client:"",init:function(w){var C=this;w=$("undefined"!==typeof w?w:".ssvideo");C.parseMediaJSON();C.addTranslations();$.each(w,function(K){0===K&&(ssmpConfig.apiKey="string"===typeof $(this).data("key")?$(this).data("key"):"",ssmpConfig.hasDVR="boolean"===typeof $(this).data("dvr")?$(this).data("dvr"):!1);C.build(this)});0<$(".videoGalleryCarousel").length&&C.addVideoGalleryCarousel()},parseMediaJSON:function(){var w=this;$("script.mediaJSON").each(function(){var C= 1485$(this),K=C.data("datakey");C=JSON.parse(C.html());"undefined"!==typeof C.video&&(w.aVideos[K]=C.video)})},getVideoList:function(w){w=this.getCurrentPlayerId(w);if("undefined"===typeof w)return[];w=this.aVideos[w];return"undefined"!==typeof w?w:[]},getCurrentVideoId:function(w){return w.closest(".videoPlayer").data("vid").toString()},setCurrentVideoId:function(w,C){w.closest(".videoPlayer").data("vid",C)},getCurrentPlayerId:function(w){return w.prop("id")},getPlayerClient:function(w){return w.closest(".videoPlayer").data("client")}, 1486build:function(w){w=$(w);var C=this.getVideoList(w),K=w.data("player-type");this.squeezeback=!platform.device&&!!w.data("squeezeback");this.client=w.data("client");w.data("callback","ssVideoPlayer.playerEventHandler");"proddetail"===K&&0<C.length?(K=this.addPdVideoThumbs(),this.bPdAutoPlay=this.readPdInitSettings(w.data("autoplay")),$(".productVideo").hasClass("hiddenStage")&&(this.bPdAutoPlay=!1),this.muted=this.bPdAutoPlay,w.data({autoplay:this.bPdAutoPlay,muted:this.muted}),this.addVideoStreams(w, 1487C[K])):"content"===K&&0<C.length?this.addVideoStreams(w,C[0]):"gallery"===K&&0<C.length?(this.addVideoStreams(w,C[0]),this.addVideoGallery(w,C)):"live"===K&&(ssmpConfig.defaultPoster=w.data("poster"),this.updateLiveStreams(),this.setCurChannel(w));!1!==platform.device&&(this.muted=!1,w.data("muted",this.muted));"ssmp"===this.player&&(w.ssmp(),this.squeezeback&&this.attachSqueezeBack())},addVideoGallery:function(w){var C=this;w=w.closest('[data-component-type\x3d"VIDEO_GALLERY"]');var K=w.find(".videoGallery"); 1488w.find(".videoCarousel .carouselItem button").each(function(){$(this).click(function(R){R.preventDefault();R=$(this).data("video-id");C.selectVideo(R,K.data("datakey"))})})},addVideoGalleryCarousel:function(){var w=this,C=$(".videoGalleryCarousel");C.on("click",".carouselItem .qBtnLink button.vjs-big-play-button",function(K){K.preventDefault();K=$(K.currentTarget);w.createVideoCarousel(K.closest("a.qBtnLink"));qvcCarousel.carScrollToItem(K.closest(".carouselItem"))});C.on("click",".carArrow",function(K){$(K.currentTarget).closest(".videoGalleryCarousel").find(".video-js").each(function(){$(this).ssmp("pause")})})}, 1489getDefaultChannel:function(){return"undefined"!==typeof liveDefaultChannel&&""!==liveDefaultChannel?liveDefaultChannel:"qvc"},setCurChannel:function(w,C){this.curChannel=C=(C||this.getDefaultChannel()).toUpperCase();$(w).data("channel",C)},changeChannel:function(w){var C=$("#"+shopLiveTV.player.id),K=C.closest(".videoPlayer");w=(w||this.getDefaultChannel()).toUpperCase();this.setCurChannel(w);"ssmp"===this.player&&(platform.device?C.ssmp("changeChannel",w):C.ssmp("changeLiveSource",w),K.trigger("ssmp.changeChannel", 1490[shopLiveTV.player.id]))},updateLiveStreams:function(){$.each(ssmpConfig.liveStreams,function(w,C){ssmpConfig.liveStreams[w].poster=ssmpConfig.defaultPoster;
1490"undefined"!==typeof C.url&&(ssmpConfig.liveStreams[w].hls=C.url)})},addVideoStreams:function(w,C){if("undefined"!==typeof C&&"object"===typeof C.encodings&&C.encodings instanceof Array){var K=C.encodings;C=C.webVtt;"string"===typeof C?w.data("captions",C):w.removeData("captions");for(C=0;C<K.length;C++)if("undefined"!==typeof K[C].platformCode)switch(K[C].platformCode){case "HttpLiveStreaming":w.data("hls", 1491K[C].url);break;case "MobileH264":w.data("mp4",K[C].url)}}},getVideoThumb:function(w){var C="";if("undefined"!==typeof w){var K=w.thumbnails;if("object"===typeof K&&K instanceof Array&&0<K.length){C=K[0];for(var R=0,Z=0;Z<K.length;Z++)if("string"===typeof K[Z]&&-1<K[Z].indexOf("x")){var B=K[Z].match(/(\.|\/)\d{1,}x/);null!==B&&1<B.length&&(B=parseInt(B[0].replace(/(\.|\/|x)/g,"")),R<B&&(R=B,C=K[Z]))}}""===C&&"undefined"!==typeof w.mediaId&&(C=this.sThumbPath.replace("[0]",w.mediaId))}return urlManager.removeProtocol(C)}, 1492getVideoTitle:function(w){var C="string"===typeof w.videoType?w.videoType.toLowerCase():"";return"string"===typeof w.title?w.title.replace(/"/gi,"\x26quot;"):"onair"===C?i18n.get("On Air Presentation"):i18n.get("Bonus Video")},readPdInitSettings:function(w){var C=window.localStorage.getItem(this.oPdSetting.auto.n);qCookie.get("qvcpdap")&&(C=qCookie.get("qvcpdap"),qCookie.remove("qvcpdap"));"undefined"===typeof C||"false"!==C&&!qViewport.is("tn")||(w=!1);qVars.feature.videoAutoPlayDisabled&&(w=!1, 1493$('.videoCheckAutoPlay input[type\x3d"checkbox"]').prop("checked",w),$(".videoCheckAutoPlay").css("display","none"));this.setPdSettings("auto",w);return w},setPdSettings:function(w,C){"undefined"!==typeof this.oPdSetting[w]&&(this.oPdSetting[w].v=C);if("undefined"===typeof bStore||"boolean"===typeof bStore&&bStore)"auto"===w&&(this.bPdAutoPlay=C),"undefined"!==typeof this.oPdSetting[w]&&window.localStorage.setItem(this.oPdSetting[w].n,C)},addPdVideoThumbs:function(){var w=this,C="",K=!1,R="",Z=0, 1494B=qCookie.get("qvcpdvideoshow"),da=qGet.urlParam("vid");w.bPdShowVideo="boolean"===typeof defaultToVideo?defaultToVideo:!0;if("undefined"!==typeof B&&"false"===B||null!==da&&"n"===da.toLowerCase())w.bPdShowVideo=!1;$.each(w.aVideos[w.dataKeys.product],function(pa,va){var Y=w.getVideoThumb(va),aa=w.htmlEntities(w.getVideoTitle(va));R="";"onair"===va.videoType.toLowerCase()&&!1===K&&(K=!0,w.bHasOnAir=!0,R=" videoOnAir-tn",$(".productThumbnails .videoOnAir").attr({"data-vi
1494deo-id":va.mediaId,"aria-label":i18n.get("see it in Action ")+ 1495aa+i18n.get(" Video"),role:"button"}),$(".productThumbnails .videoOnAirThumb").html('\x3cimg src\x3d"'+Y+'" alt\x3d"'+aa+'" /\x3e'),$(".productThumbnails .videoOnAirLabel p").html(""),$(".productThumbnails .videoOnAirLabel button").attr({"aria-hidden":"true",tabindex:"-1"}),w.bPdShowVideo&&$(".videoOnAir").attr({state:"selected","aria-current":"true"}),$(".videoOnAir").show(),Z=pa);C+='\x3cdiv class\x3d"video'+R+'" data-video-id\x3d"'+va.mediaId+'" state\x3d"default"\x3e\x3cdiv class\x3d"videoThumb" tabindex\x3d"0" role\x3d"button" aria-label\x3d"'+ 1496(aa+i18n.get(" Video"))+'"\x3e\x3cimg src\x3d"'+Y+'" alt\x3d"'+aa+'"/\x3e\x3c/div\x3e\x3c/div\x3e'});!qViewport.is("tn")&&w.bHasOnAir&&w.bPdShowVideo&&w.maybeToggleVideo("show");w.bHasOnAir||($(".productThumbnails .videoOnAir").remove(),$(".productThumbnails .thumbGroup").removeClass("col-md-9"));""!==C&&($(".productThumbnails .videoThumbnails").html(C),w.addPdListner(),w.addPdListnerCurrent());return Z},getTouchCoord:function(w,C){return/touch/.test(w.type)?(w.originalEvent||w).changedTouches[0]["page"+ 1497C]:w["page"+C]},attachSqueezeBack:function(){var w=this,C=$("#"+w.dataKeys.live),K=C.closest(".ssmp-wrapper");1>K.siblings(".ssmp-placeholder").length&&K.before($('\x3cdiv class\x3d"ssmp-placeholder hidden"\x3e\x3c/div\x3e'));w.squeezePoint=C.offset().top;$(window).on("scroll",function(){w.toggleSqueezeBack()});$(window).resize(function(){qViewport.is("\x3cmd")&&K.hasClass("pinnedVideo")&&w.removeSqueezeBack()})},removeSqueezeBack:function(){var w=this,C=$("#"+w.dataKeys.live),K=C.closest(".ssmp-wrapper"), 1498R=K.siblings(".ssmp-placeholder"),Z=K.closest("[data-player-type]").data("player-type");K.hasClass("pinnedVideo")&&(C.finish(),K.removeClass("pinnedVideo"),C.parent().removeClass("container"),R.addClass("hidden"),C.trigger("squeezeback",[!1]),C.animate({width:K.width()},w.squeezeInterval,function(){"content"===Z&&w.appendContentBox(C,!1)}))},addSqueezeBack:function(){var w=$("#"+this.dataKeys.live),C=w.closest(".ssmp-wrapper"),K=C.siblings(".ssmp-placeholder");C.hasClass("pinnedVideo")||(w.finish(), 1499w.width(this.squeezeMaxWidth),C.addClass("pinnedVideo"),w.parent().addClass("container"),w.trigger("squeezeback",[!0]),w.animate({width:this.squeezeMinWidth},this.squeezeInterval,function(){K.height(C.height()+20);K.removeClass("hidden")}))},toggleSqueezeBack:function(){var w=$(window).scrollTop();w>this.lastScrollTop&&0>=this.squeezePoint-w&&qViewport.is("\x3e\x3dmd")?this.addSqueezeBack():0<=this.squeezePoint-w&&this.removeSqueezeBack();this.lastScrollTop=w},createVideoCarousel:function(w){var C= 1500w.data("video-id"),K=w.closest(".videoGalleryCarousel"),R=w.closest(".carouselItem"),Z=K.data("key");w="qvc"+K.data("country-code");"undefined"===typeof ssmpConfig.apiKey&&(ssmpConfig.apiKey=Z);K.find(".video-js").each(function(va,Y){videojs.getPlayer($(Y).attr("id")).dispose()});K.find(".videoPlayer").remove();var B=K.data("datakey");K=this.getVideoData(C,B);var da=this.getVideoThumb(K),pa=$('\x3cdiv class\x3d"videoPlayer" data-vid\x3d"'+C+'" data-player-type\x3d"carousel" data-client\x3d"'+w+'"/\x3e'); 1501Z=$('\x3cdiv id\x3d"'+B+'" class\x3d"ssvideo" data-key\x3d"'+Z+'" data-squeezeback\x3d"false" data-autoplay\x3d"true" data-muted\x3d"false" data-client\x3d"'+w+'" data-type\x3d"vod" data-dvr\x3d"false" data-carousel\x3d"false" data-player-type\x3d"content" data-poster\x3d"'+da+'" data-custom-poster\x3d"true" data-width\x3d"100%" /\x3e');C&&Z.data("uvid",C);Z.data("callback","ssVideoPlayer.playerEventHandler");this.client=w;this.addVideoStreams(Z,K);pa.append(Z);R.prepend(pa);this.setCurrentVideoId(Z, 1502C.toString());Z.ssmp().play();setTimeout(function(){R.find(".video-js .vjs-play-control").focus()},500)},getVideoData:function(w,C){w=String(w);C=this.aVideos[C];if("undefined"!==typeof C)return C.filter(function(K){return K.mediaId===w})[0]},maybeToggleThumbs:function(w,C){C=$("#"+C).closest('[data-component-type\x3d"VIDEO_GALLERY"]');$(".video").attr({state:"","aria-current":""});$(".videoThumb").attr("aria-current","");$(".videoOnAirThumb").removeAttr("aria-current");C.length&&(C=C.find(".videoCarousel .qBtnLink"),
1503C.attr("state",""),C.filter('[data-video-id\x3d"'+w+'"]').attr("state","selected"))},selectVideo:function(w,C){w=String(w);var K=$("#"+C),R=this.getCurrentVideoId(K);this.maybeToggleThumbs(w,C);R!==w?(this.setCurrentVideoId(K,w),this.playVideo(w,K)):this.playVideo(null,K);"product"===qVars.pageType&&this.maybeToggleVideo("show")},playNextVideo:function(w){for(var C=w.closest("[data-player-type]").data("player-type"),K=this.getCurrentVideoId(w),R=this.getVideoList(w),Z,B=0;B<R.length;B++)if(R[B].mediaId=== 1504K&&B<R.length-1){Z=R[B+1];break}"undefined"===typeof Z?"gallery"===C?this.resetPlayer(w):"carousel"===C&&(w=w.closest(".videoGalleryCarousel"),w.find(".video-js").each(function(da,pa){videojs.getPlayer($(pa).attr("id")).dispose()}),w.find(".videoPlayer").remove()):"gallery"===C?this.selectVideo(Z.mediaId,w.prop("id")):"carousel"===C&&(w=w.closest('[data-component-type\x3d"VIDEO_GALLERY"]').find('.qBtnLink[data-video-id\x3d"'+Z.mediaId+'"] .vjs-big-play-button'),this.createVideoCarousel(w.closest("a.qBtnLink")), 1505qvcCarousel.carScrollToItem(w.closest(".carouselItem")))},addPdListnerCurrent:function(){var w=this;$(".productThumbnails .videoThumb").on("click keydown",function(C){if(13===C.which||32===C.which||"click"===C.type)if(C.preventDefault(),qViewport.is("\x3etn")||!w.scrolling)C=$(this),w.selectVideo(C.data("video-id"),w.dataKeys.product),C.parent(".videoOnAir").attr("aria-current","true")})},addPdListner:function(){var w=this,C=$(".productThumbnails .video");C.click(function(K){K.preventDefault();if(qViewport.is("\x3etn")|| 1506!w.scrolling)K=$(this),w.selectVideo(K.data("video-id"),w.dataKeys.product),K.attr("state","selected"),K.filter(".videoOnAir").attr("aria-current","true"),K.children(".videoThumb").filter(":not(.videoOnAirThumb)").attr("aria-current","true")});C.on("touchstart",function(K){w.startX=w.getTouchCoord(K,"X");w.startY=w.getTouchCoord(K,"Y");w.scrolling=!0});C.on("touchend",function(K){w.scrolling=!1;qViewport.is("tn")&&1>Math.abs(w.getTouchCoord(K,"Y")-w.startY)&&1>Math.abs(w.getTouchCoord(K,"X")-w.startX)&& 1507(K=$(this),w.selectVideo(K.data("video-id"),w.dataKeys.product),K.attr("state","selected"))});C.keydown(function(K){if(13===K.which||32===K.which)K.preventDefault(),$(this).click()})},setPdUserAutoPlay:function(w){this.setPdSettings("auto",w)},getPdAutoPlay:function(w,C){var K=!1;(!0===this.oPdSetting.auto.v||!1!==this.oPdSetting.auto.v&&!0===w)&&!qViewport.is("tn")&&C&&(K=!0);return K},setVideoVolume:function(w,C){w=$("#"+w).find("video")[0];"undefined"!==typeof w&&(w.volume=C)},setPdPlayerVolume:function(w){this.setPdSettings("volume", 1508w);this.setVideoVolume(this.dataKeys.product,w)},switchToPrimaryPdImage:function(){!0===qVars.feature.productVideoReplayFullScreen?this.maybeToggleVideo("show"):this.maybeToggleVideo("hide");this.maybeResetSwatches()},pauseVideo:function(w){w=$("#"+w);0<w.length&&w.ssmp("pause")},getVideoStatus:function(w){w=$("#"+w);return 0!==w.length?w.ssmp("status"):""},isPlaying:function(w){w=$("#"+w);return 0!==w.length?w.ssmp("isPlaying"):!1},adjustAspectRatio:function(){var w=window.screen.width,C=window.screen.height; 1509return w/C!==16/9?(C-w/16*9)/2:0},appendContentBox:function(w,C){!1===platform.device&&(C?(C=ssVideoPlayer.adjustAspectRatio()+"px",w.closest("#videoWrapper").find(".videoDescription").css("top",C),w.append(w.closest("#videoWrapper").find(".videoDescription"))):(w.find(".videoDescription").css("top",""),w.closest("#videoWrapper").append(w.find(".videoDescription"))))},playVideo:function(w,C){var K=C.closest(".videoPlayer"),R=K.data("player-type");if(null!==w){var Z=this.getCurrentPlayerId(C);Z=this.getVideoData(w, 1510Z);this.addVideoStreams(C,Z);C.data("poster",this.getVideoThumb(Z));"undefined"!==typeof C.data("hls")?C.ssmp("gallery"===R?"changeMediaInline":"changeMedia",{poster:C.data("poster"),hls:C.data("hls"),mp4:C.data("mp4"),captions:C.data("captions"),type:K.data("player-type")}):C.ssmp("uvid",w);K.trigger("ssmp.changeMedia")}C.ssmp("play")},addTranslations:function(){ssmpConfig.langCode=i18n.getLocale().replace("_","-");var w={Play:i18n.get("Play"),Pause:i18n.get("Pause"),"Current Time":i18n.get("Current Time"), 1511"Duration Time":i18n.get("Duration Time"),"Remaining Time":i18n.get("Remaining Time"),"Stream Type":i18n.get("Stream Type"),LIVE:i18n.get("LIVE"),Loaded:i18n.get("Loaded"),Progress:i18n.get("Progress"),Fullscreen:i18n.get("Fullscreen"),"Non-Fullscreen":i18n.get("Non-Fullscreen"),Mute:i18n.get("Mute"),Unmute:i18n.get("Unmute"),"Playback Rate":i18n.get("Playback Rate"),Subtitles:i18n.get("Subtitles"),"subtitles off":i18n.get("Subtitles Off"),Captions:i18n.get("Captions"),"Captions off":i18n.get("Captions Off"),
1512Chapters:i18n.get("Chapters"),"Close Modal Dialog":i18n.get("Close Window"),Descriptions:i18n.get("Descriptions"),"descriptions off":i18n.get("Descriptions Off"),"Audio Track":i18n.get("Audio Track"),"You aborted the media playback":i18n.get("You have stopped the video"),"A network error caused the media download to fail part-way.":i18n.get("The video has not downloaded fully due to a network error."),"The media could not be loaded, either because the server or network failed or because the format is not supported.":i18n.get("The video cannot be downloaded as there appears to be a problem with the server or network, or because the format cannot be supported."), 1513"The media playback was aborted due to a corruption problem or because the media used features your browser did not support.":i18n.get("The video playback ended as the video may be corrupted or because it used features your browser did not support."),"No compatible source was found for this media.":i18n.get("This video is not supported by your device."),"The media is encrypted and we do not have the keys to decrypt it.":i18n.get("There appears to be a problem with this video, please try again later."), 1514"Play Video":i18n.get("Play"),Close:i18n.get("Close"),"Modal Window":i18n.get("Modal Window"),"This is a modal window":i18n.get("This is a modal window"),"This modal can be closed by pressing the Escape key or activating the close button.":i18n.get("Close this window by pressing the Escape key or the close button."),", opens captions settings dialog":i18n.get(", Open captions settings window"),", opens subtitles settings dialog":i18n.get(", Open subtitles settings window"),", opens descriptions settings dialog":i18n.get(", Open descriptions settings window"), 1515", selected":i18n.get(", Selected"),"subtitles settings":i18n.get("Subtitles Settings"),"captions settings":i18n.get("Captions Settings"),cc708_1:i18n.get("Cc708_1"),Text:i18n.get("Text"),"Font Size":i18n.get("Font Size"),"Font Family":i18n.get("Font Family"),"Caption Area Background":i18n.get("Caption Area Background"),"Text Edge Style":i18n.get("Text Edge Style"),"Text Background":i18n.get("Text Background"),Black:i18n.get("Black"),White:i18n.get("White"),Red:i18n.get("Red"),Green:i18n.get("Green"), 1516Blue:i18n.get("Blue"),Yellow:i18n.get("Yellow"),Magenta:i18n.get("Magenta"),Cyan:i18n.get("Cyan"),Opaque:i18n.get("Opaque"),"Semi-Transparent":i18n.get("semi-transparent"),Transparent:i18n.get("transparent"),None:i18n.get("None"),Raised:i18n.get("Raised"),Depressed:i18n.get("Depressed"),Uniform:i18n.get("Uniform"),"Drop shadow":i18n.get("Drop shadow"),"Proportional Sans-Serif":i18n.get("Proportional Sans-Serif"),"Monospace Sans-Serif":i18n.get("Monospace Sans-Serif"),"Proportional Serif":i18n.get("Proportional Serif"), 1517"Monospace Serif":i18n.get("Monospace Serif"),Casual:i18n.get("Casual"),Script:i18n.get("Script"),"Small Caps":i18n.get("Small Caps"),Reset:i18n.get("Reset"),Done:i18n.get("Done"),deu_702_100:i18n.get("Cc708_1"),"restore all settings to the default values":i18n.get("restore all settings to the default values")};ssmpConfig.lang=w},hideCaptionsOnMenuItem:function(){$(".vjs-menu-item.vjs-captions-menu-item").each(function(){"Captions On"===$(this).find(".vjs-menu-item-text").text().trim()&&$(this).hide()})}, 1518adjustCCTitle:function(w){if(0<w.length){var C=i18n.get("Captions On");w.find(".vjs-menu-content .vjs-menu-item-text").filter(function(){return $.trim($(this).text()).match(/^(cc1|unknown|en)/i)}).html(C);w.find('.vjs-menu-content .vjs-menu-item-text:contains("'+C+'")').eq(1).parent().remove();w.find("[kind\x3dcaptions]").attr("label",C)}},maybeToggleVideo:function(w){"function"===typeof toggleVideo&&toggleVideo(w)},maybeResetSwatches:function(){"undefined"!==typeof swatches&&swatches.reset()},pauseOtherPlayers:function(w){$(".video-js").not(w).each(function(){$(this).ssmp("pause")})}, 1519resetPlayer:function(w){var C=videojs.getPlayer(w.prop("id"));w.removeClass("vjs-has-started");w.find(".vjs-big-play-button").attr("title",i18n.get("Play"));w.find(".vjs-big-play-button .vjs-control-text").html(i18n.get("Play"));C.hasStarted(!1);w.closest(".videoClip").find(".videoDescription").removeClass("vidStarted");C.isFullscreen()&&C.exitFullscreen()},playerEventHandler:function(w){var C=this;if("undefined"!==typeof w){var K=$("#"+w.tagAttributes.id),R=K.closest("[data-player-type]").data("player-type");
1520w.one("timeupdate",function(){C.adjustCCTitle(K)});w.on("canplaythrough",function(){C.adjustCCTitle(K)});w.on("loadedmetadata",function(){C.adjustCCTitle(K);C.hideCaptionsOnMenuItem()});w.one("play",function(){"content"===R&&K.closest(".videoClip").find(".videoDescription").addClass("vidStarted")});w.on("play",function(){"live"===R&&"undefined"!==typeof shopLiveTV?(shopLiveTV.player.togglePlay(!0),C.pauseOtherPlayers(K)):"content"===R&&K.closest(".videoClip").find(".videoDescription").addClass("vidPlaying"); 1521"content"!==R&&"gallery"!==R&&"carousel"!==R&&"programguide"!==R&&"proddetail"!==R||C.pauseOtherPlayers(K);C.adjustCCTitle(K);for(var Z=w.textTracks(),B=0;B<Z.length;B++)Z[B].addEventListener("cuechange",function(){"undefined"!==typeof this.activeCues&&0<this.activeCues.length&&(this.activeCues[0].text=this.activeCues[0].text.replace(/>\s?/g,""))})});w.on("pause",function(){"live"===R&&"undefined"!==typeof shopLiveTV?shopLiveTV.player.togglePlay(!1):"content"===R&&K.closest(".videoClip").find(".videoDescription").removeClass("vidPlaying")}); 1522w.on("useractive",function(){"content"===R&&K.closest(".videoClip").find(".videoDescription").removeClass("vidInactive")});w.on("userinactive",function(){"content"===R&&K.closest(".videoClip").find(".videoDescription").addClass("vidInactive")});w.on("ended",function(){"proddetail"===R?C.switchToPrimaryPdImage():"gallery"===R||"carousel"===R?C.playNextVideo(K):"content"===R&&C.resetPlayer(K)});w.on("fullscreenchange",function(){var Z=w.isFullscreen();"live"===R&&"undefined"!==typeof shopLiveTV?shopLiveTV.player.appendChannelMenu(Z): 1523"content"===R&&C.appendContentBox(K,Z)});"product"===qVars.pageType&&$("html").hasClass("mh-mobile-display")&&(C.setPdUserAutoPlay(!1),C.maybeToggleVideo("show"),$(".videoOnAir-tn").attr("state","selected"))}},htmlEntities:function(w){return $("\x3cp\x3e\x3c/p\x3e").text(String(w)).html().replace(/"/g,"\x26quot;")}};$(function(){0<$(".ssvideo, .videoGalleryCarousel").length&&ssVideoPlayer.init();$(".video-js video").removeAttr("role")}); 1524var shopLiveTV={iroaCarousel:{iMaxCarouselCount:8,bShowCarousel:!0,iHashCode:0,setShowCarousel:function(){shopLiveTV.iroaCarousel.bShowCarousel="undefined"!==typeof ssmpConfig&&ssmpConfig.liveStreams[shopLiveTV.player.curChannel]&&ssmpConfig.liveStreams[shopLiveTV.player.curChannel].iroaAvailable},setMaxCarouselCount:function(){var w=$(".shopLiveTvIroaWrapper").data("max-count");"undefined"!==typeof w&&(shopLiveTV.iroaCarousel.iMaxCarouselCount=parseInt(w))},adjustIroaCarousel:function(){shopLiveTV.iroaCarousel.bShowCarousel&& 1525($(".shopLiveTvIroaItem").eq(0).data("item-id")===$(".shopLiveTvIroaItem").eq(1).data("item-id")?$(".shopLiveTvIroaItem").eq(1).remove():$(".shopLiveTvIroaItem").length>shopLiveTV.iroaCarousel.iMaxCarouselCount&&$(".shopLiveTvIroaItem:last").remove())},updateIoaCarouselItem:function(){if(shopLiveTV.iroaCarousel.bShowCarousel){var w=$(".shopLiveTvIroaItem").eq(0).data("item-id");"undefined"!==typeof w&&""!==w&&($oTemp=$(".shopLiveTvIroaItem:first").clone(),$(".shopLiveTvIroa").prepend($oTemp.hide()), 1526$(".shopLiveTvIroaItem").length>shopLiveTV.iroaCarousel.iMaxCarouselCount&&$(".shopLiveTvIroaItem:last").remove(),$(".shopLiveTvIroaItem:first").toggle("slow"))}},updateSC:function(){$(".iroaItemLink").prop("href",function(w,C){w=void 0!==ssmpConfig.liveStreams[shopLiveTV.player.curChannel].sc?ssmpConfig.liveStreams[shopLiveTV.player.curChannel].sc.replace(/@/g,"AT"):ssmpConfig.liveStreams[shopLiveTV.player.curChannel].name.replace(/\s/,"").toUpperCase();return urlManager.addParam(C,"sc",w.replace(/^INTHEKITCHEN\u00ae$/i, 1527"itk"))})},update:function(w){"undefined"!==typeof w&&!0===shopLiveTV.iroaCarousel.bShowCarousel?(w=$(w).filter(".shopLiveTvIroaWrapper"),0<w.length?void 0!==w.data("hash-code")&&w.data("hash-code")!==shopLiveTV.iroaCarousel.iHashCode&&(shopLiveTV.iroaCarousel.iHashCode=w.data("hash-code"),$('[data-component-type\x3d"SHOP_LIVE_TV_IROA"]').html(w),$('\x3cspan class\x3d"badge productBadge ioabadge"\x3e'+i18n.get("Item On Air")+"\x3c/span\x3e").insertAfter($(".shopLiveTvIroa .shopLiveTvIroaItem .itemImg").eq(0)), 1528$(".shopLiveIroaWrapper").is(":hidden")&&$(".shopLiveIroaWrapper").slideDown(1E3),shopLiveTV.iroaCarousel.updateSC(),$("#"+shopLiveTV.player.id).trigger("shopLiveTV.iroaUpdate")):($(".
1528shopLiveIroaWrapper").hide(),shopLiveTV.iroaCarousel.iHashCode=0)):($(".shopLiveIroaWrapper").slideUp(1E3),shopLiveTV.iroaCarousel.iHashCode=0);document.dispatchEvent(new Event("shopLiveContentUpdated"))},init:function(){0<$('[data-component-type\x3d"SHOP_LIVE_TV_IROA"]').length&&(this.setMaxCarouselCount(),this.setShowCarousel(), 1529this.adjustIroaCarousel())}},player:{curChannel:"",curShowTitle:"",id:ssVideoPlayer.dataKeys.live,sMenu:".channelSelector",sPlayerType:"live",bPaused:!1,bFirstLivePlay:!0,setPlayerType:function(w){var C=$("#"+ssVideoPlayer.dataKeys.live);this.sPlayerType="string"===typeof w?w:0<C.length?C.parents(".videoPlayer").data("player-type"):this.sPlayerType},setCurChannel:function(w){shopLiveTV.player.curChannel=(w||ssVideoPlayer.getDefaultChannel()).toUpperCase();$(shopLiveTV.player.sMenu+" a").removeClass("activeChannel"); 1530$(shopLiveTV.player.sMenu+" a[data-channelcode\x3d"+shopLiveTV.player.curChannel+"]").addClass("activeChannel");$(".liveTvWrapper").attr("data-channelcode",shopLiveTV.player.curChannel);shopLiveTV.player.moveCurChannelToView()},channelMenu:function(){$(shopLiveTV.player.sMenu+' a[data-channelcode\x3d"'+shopLiveTV.player.curChannel+'"]').addClass("activeChannel");$(shopLiveTV.player.sMenu+" a").each(function(){var w=$(this);w=void 0!==w.data("channelcode")?w.data("channelcode"):"";"undefined"!==typeof ssmpConfig&& 1531ssmpConfig.liveStreams[w]&&!1===ssmpConfig.liveStreams[w].iroaAvailable&&(ssmpConfig.liveStreams[w].showBuyBox=!1)});$(".liveTvWrapper").attr("data-channelcode",shopLiveTV.player.curChannel)},appendChannelMenu:function(w){var C=$("#"+shopLiveTV.player.id);platform.device||(w?0<C.find(".videoBottom").length?$(".videoBottom").prepend($(shopLiveTV.player.sMenu)):C.prepend($(shopLiveTV.player.sMenu)):0<$(".
1531shopLiveFullWidthWrapper").length?$(".liveTvWrapper").closest(".container").prepend($(shopLiveTV.player.sMenu)): 1532$(".liveTvWrapper").prepend($(shopLiveTV.player.sMenu)))},updateShowTitle:function(w){var C=$("#"+shopLiveTV.player.id);"undefined"!==typeof w?(w=$(w).filter(".shopLiveTvIroaWrapper"),0<w.length&&void 0!==w.data("show-title")&&""!==w.data("show-title")&&(w.data("show-title")!==shopLiveTV.player.curShowTitle&&(C.trigger("shopLiveTV.showChange",{old:shopLiveTV.player.curShowTitle,"new":w.data("show-title")}),shopLiveTV.player.curShowTitle=w.data("show-title")),"ssmp"===ssVideoPlayer.player&&C.ssmp("updateEpg"))): 1533(shopLiveTV.player.curShowTitle="",C.find(".vjs-live-display").html(ssmpConfig.liveStreams[shopLiveTV.player.curChannel].name))},togglePlay:function(w){"boolean"===typeof w&&(shopLiveTV.player.setPlayerType(),shopLiveTV.player.bPaused=!w,!0===w&&"live"===shopLiveTV.player.sPlayerType&&(shopLiveTV.player.bFirstLivePlay=!1,$("body").hasClass("shopLiveEmbed")||shopLiveTV.webWorker.update(!0)))},moveCurChannelToView:function(){for(var w=$(".channelSelector .channels"),C=$(".activeChannel"),K=C.index(), 1534R=0,Z=w.find("a"),B=0;B<K;B++)R+=$(Z[B]).outerWidth(!0);w.animate({scrollLeft:Math.max(0,R-(w.width()-C.outerWidth(!0))/2)},500)},changeChannel:function(w){shopLiveTV.player.bFirstLivePlay=!0;ssVideoPlayer.changeChannel(w);shopLiveTV.iroaCarousel.setShowCarousel();shopLiveTV.webWorker.update(!0)},clickMenuItem:function(w){w=$(w);w.hasClass("activeChannel")||(shopLiveTV.player.setCurChannel(w.data("channelcode")),shopLiveTV.player.changeChannel(shopLiveTV.player.curChannel))},updateLiveStream:function(){var w= 1535"";"undefined"===typeof(window.utag_data||window.aem_utag_data)&&"object"===typeof ssmpConfig&&ssmpConfig.liveStreams&&$.each(ssmpConfig.liveStreams,function(C){ssmpConfig.liveStreams[C].name?(w=ssmpConfig.liveStreams[C].name.replace(/^qvc$/i,"LIVE").replace(/qvc\s|\s/ig,"").toUpperCase(),ssmpConfig.liveStreams[C].sc=w,$('[data-channelcode\x3d"'+C+'"]').attr("data-sc",w)):ssmpConfig.liveStreams[C].sc="LIVE"})},updateChannelSelector:function(){0<$('[data-module-type\x3d"SHOP_LIVE"] .shopLiveFullWidthWrapper').length&& 1536($(".shopLiveFullWidthWrapper").prepend($(".channelSelector")),$("body").addClass("shopLiveSidebar"),$(".shopLiveFullWidthWrapper .channelSelector").removeClass("row"))},addListener:function(){$(shopLiveTV.player.sMenu+" a").click(function(w){w.preventDefault();shopLiveTV.player.clickMenuItem(this)})},init:function(){this.updateLiveStream();this.updateChannelSelector();this.setCurChannel();this.channelMenu();this.setPlayerType();this.addListener()}},webWorker:function(){var w=null,C=3E4,K=null,R= 1537{accepts:"text/html",dataType:"html",url:""},Z=function(){"undefined"!==typeof iroaContentPath&&(R.url=iroaContentPath+"/"+shopLiveTV.player.curChannel.toLowerCase()+".iroashoplive.html");return R.url},B=function(Y){var aa=$();w?"object"===typeof Y&&"object"===typeof Y.data&&!1===Y.data.err&&Y.data.response&&(aa=$.parseHTML(Y.data.response)):aa=$.parseHTML(Y);0<aa.length&&(shopLiveTV.iroaCarousel.update(aa),!1===shopLiveTV.player.bFirstLivePlay&&"live"===shopLiveTV.player.sPlayerType&&shopLiveTV.player.updateShowTitle(aa), 1538w&&$(document).trigger("worker.ajaxComplete"))},da=function(Y){console.error("Error Content Update, "+Y)},pa=function(Y){""!==Z()&&shopLiveTV.iroaCarousel.bShowCarousel?(w?w.postMessage(R):$.ajax($.extend({},R,{success:B,error:da})),"boolean"===typeof Y&&!0===Y&&va()):(K&&(clearTimeout(K),K=null),shopLiveTV.iroaCarousel.update(),shopLiveTV.player.updateShowTitle())},va=function(){K&&(clearTimeout(K),K=null);K=setTimeout(function(){pa(!0)},C)};return{init:function(){""!==Z()&&(C="number"===typeof refreshFrequency&& 153910<refreshFrequency&&300>refreshFrequency?1E3*refreshFrequency:C,"undefined"!==typeof Worker&&(w=new Worker("/etc.clientlibs/qvc-global-commerce/clientlibs/worker.min.js?r\x3d"+(new Date).getTime()),w.addEventListener("message",B,!1),w.addEventListener("error",da,!1)),pa(!0))},update:pa}}(),init:function(){this.player.init();$("body").hasClass("shopLiveEmbed")||(this.iroaCarousel.init(),this.webWorker.init())}};function getNowPlaying(){return shopLiveTV.player.curShowTitle} 15400<$('[data-module-type\x3d"SHOP_LIVE"]').length&&(shopLiveTV.init(),document.addEventListener("shopLiveContentUpdated",function(){qVars.feature.addToCartOffCanvasSidebarShopLive&&$(".shopLiveIroaWrapper .btnAddToCartCanvas").removeClass("hidden")}));
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.