This commit is contained in:
nicco 2018-06-27 20:43:03 +02:00
parent 1155063ade
commit e695743ab1
2 changed files with 540 additions and 0 deletions

63
srv/index.html Executable file
View File

@ -0,0 +1,63 @@
<!DOCTYPE html>
<html>
<head>
<script src="/shaka.js"></script>
</head>
<body>
<video id="video" width="600" poster="//shaka-player-demo.appspot.com/assets/poster.jpg" autoplay></video>
<script>
var manifestUri =
'/dash/live.mpd';
// '/hls/live.m3u8';
function initApp() {
// Install built-in polyfills to patch browser incompatibilities.
shaka.polyfill.installAll();
// Check to see if the browser supports the basic APIs Shaka needs.
if (shaka.Player.isBrowserSupported()) {
// Everything looks good!
initPlayer();
} else {
// This browser does not have the minimum set of APIs we need.
console.error('Browser not supported!');
}
}
function initPlayer() {
// Create a Player instance.
var video = document.getElementById('video');
var player = new shaka.Player(video);
// Attach player to the window to make it easy to access in the JS console.
window.player = player;
// Listen for error events.
player.addEventListener('error', onErrorEvent);
// Try to load a manifest.
// This is an asynchronous process.
player.load(manifestUri).then(function () {
// This runs if the asynchronous load is successful.
console.log('The video has now been loaded!');
}).catch(onError); // onError is executed if the asynchronous load fails.
}
function onErrorEvent(event) {
// Extract the shaka.util.Error object from the event.
onError(event.detail);
}
function onError(error) {
// Log the error.
console.error('Error code', error.code, 'object', error);
}
document.addEventListener('DOMContentLoaded', initApp);
</script>
</body>
</html>

477
srv/shaka.js Normal file
View File

@ -0,0 +1,477 @@
(function(){var g={};
(function(window){var n,aa="function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)},ba="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function ca(){ca=function(){};ba.Symbol||(ba.Symbol=da)}var da=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
function ea(){ca();var b=ba.Symbol.iterator;b||(b=ba.Symbol.iterator=ba.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&aa(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return fa(this)}});ea=function(){}}function fa(b){var c=0;return ha(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ha(b){ea();b={next:b};b[ba.Symbol.iterator]=function(){return this};return b}function ia(b){ea();var c=b[ba.Symbol.iterator];return c?c.call(b):fa(b)}
function ja(b,c){if(c){for(var d=ba,e=b.split("."),f=0;f<e.length-1;f++){var g=e[f];g in d||(d[g]={});d=d[g]}e=e[e.length-1];f=d[e];g=c(f);g!=f&&null!=g&&aa(d,e,{configurable:!0,writable:!0,value:g})}}
ja("Promise",function(b){function c(b){this.b=0;this.g=void 0;this.a=[];var c=this.c();try{b(c.resolve,c.reject)}catch(l){c.reject(l)}}function d(){this.a=null}function e(b){return b instanceof c?b:new c(function(c){c(b)})}if(b)return b;d.prototype.b=function(b){null==this.a&&(this.a=[],this.f());this.a.push(b)};d.prototype.f=function(){var b=this;this.c(function(){b.h()})};var f=ba.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.h=function(){for(;this.a&&this.a.length;){var b=this.a;this.a=
[];for(var c=0;c<b.length;++c){var d=b[c];b[c]=null;try{d()}catch(m){this.g(m)}}}this.a=null};d.prototype.g=function(b){this.c(function(){throw b;})};c.prototype.c=function(){function b(b){return function(e){d||(d=!0,b.call(c,e))}}var c=this,d=!1;return{resolve:b(this.m),reject:b(this.f)}};c.prototype.m=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.o(b);else{a:switch(typeof b){case "object":var d=null!=b;break a;case "function":d=!0;
break a;default:d=!1}d?this.l(b):this.h(b)}};c.prototype.l=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.u(c,b):this.h(b)};c.prototype.f=function(b){this.i(2,b)};c.prototype.h=function(b){this.i(1,b)};c.prototype.i=function(b,c){if(0!=this.b)throw Error("Cannot settle("+b+", "+c+"): Promise already settled in state"+this.b);this.b=b;this.g=c;this.j()};c.prototype.j=function(){if(null!=this.a){for(var b=0;b<this.a.length;++b)g.b(this.a[b]);this.a=null}};
var g=new d;c.prototype.o=function(b){var c=this.c();b.tb(c.resolve,c.reject)};c.prototype.u=function(b,c){var d=this.c();try{b.call(c,d.resolve,d.reject)}catch(m){d.reject(m)}};c.prototype.then=function(b,d){function e(b,c){return"function"==typeof b?function(c){try{f(b(c))}catch(Ha){g(Ha)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.tb(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.tb=function(b,c){function d(){switch(e.b){case 1:b(e.g);break;
case 2:c(e.g);break;default:throw Error("Unexpected state: "+e.b);}}var e=this;null==this.a?g.b(d):this.a.push(d)};c.resolve=e;c.reject=function(b){return new c(function(c,d){d(b)})};c.race=function(b){return new c(function(c,d){for(var f=ia(b),g=f.next();!g.done;g=f.next())e(g.value).tb(c,d)})};c.all=function(b){var d=ia(b),f=d.next();return f.done?e([]):new c(function(b,c){function g(c){return function(d){h[c]=d;k--;0==k&&b(h)}}var h=[],k=0;do h.push(void 0),k++,e(f.value).tb(g(h.length-1),c),f=
d.next();while(!f.done)})};return c});ja("Promise.prototype.finally",function(b){return b?b:function(b){return this.then(function(c){return Promise.resolve(b()).then(function(){return c})},function(c){return Promise.resolve(b()).then(function(){throw c;})})}});function ka(b){function c(c){return b.next(c)}function d(c){return b["throw"](c)}return new Promise(function(e,f){function g(b){b.done?e(b.value):Promise.resolve(b.value).then(c,d).then(g,f)}g(b.next())})}function p(b){return ka(b())}
function la(){this.f=!1;this.b=null;this.M=void 0;this.B=1;this.c=this.qa=0;this.h=this.a=null}function ma(b){if(b.f)throw new TypeError("Generator is already running");b.f=!0}la.prototype.g=function(b){this.M=b};function na(b,c){b.a={pc:c,wc:!0};b.B=b.qa||b.c}la.prototype["return"]=function(b){this.a={"return":b};this.B=this.c};function q(b,c,d){b.B=d;return{value:c}}la.prototype.X=function(b){this.B=b};function oa(b){b.qa=0;b.c=2}function pa(b){b.B=0;b.qa=0}
function qa(b){b.qa=0;var c=b.a.pc;b.a=null;return c}function ra(b){b.h=[b.a];b.qa=0;b.c=0}function sa(b){var c=b.h.splice(0)[0];(c=b.a=b.a||c)?c.wc?b.B=b.qa||b.c:void 0!=c.X&&b.c<c.X?(b.B=c.X,b.a=null):b.B=b.c:b.B=0}function ta(b){this.a=new la;this.b=b}function ua(b,c){ma(b.a);var d=b.a.b;if(d)return va(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return wa(b)}
function va(b,c,d,e){try{var f=c.call(b.a.b,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.f=!1,f;var g=f.value}catch(h){return b.a.b=null,na(b.a,h),wa(b)}b.a.b=null;e.call(b.a,g);return wa(b)}
function wa(b){for(;b.a.B;)try{var c=b.b(b.a);if(c)return b.a.f=!1,{value:c.value,done:!1}}catch(d){b.a.M=void 0,na(b.a,d)}b.a.f=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.wc)throw c.pc;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
function xa(b){this.next=function(c){ma(b.a);b.a.b?c=va(b,b.a.b.next,c,b.a.g):(b.a.g(c),c=wa(b));return c};this["throw"]=function(c){ma(b.a);b.a.b?c=va(b,b.a.b["throw"],c,b.a.g):(na(b.a,c),c=wa(b));return c};this["return"]=function(c){return ua(b,c)};ea();this[ba.Symbol.iterator]=function(){return this}}function v(b,c){xa.prototype=b.prototype;return new xa(new ta(c))}
ja("Array.prototype.find",function(b){return b?b:function(b,d){a:{var c=this;c instanceof String&&(c=String(c));for(var f=c.length,g=0;g<f;g++){var h=c[g];if(b.call(d,h,g,c)){c=h;break a}}c=void 0}return c}});var ya=this;ya.a=!0;function x(b,c){var d=b.split("."),e=ya;d[0]in e||!e.execScript||e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)d.length||void 0===c?e[f]?e=e[f]:e=e[f]={}:e[f]=c}
function za(b,c){function d(){}d.prototype=c.prototype;b.ff=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.df=function(b,d,g){return c.prototype[d].apply(b,Array.prototype.slice.call(arguments,2))}};/*
Copyright 2016 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
function Aa(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Ba(b,c,d){var e=Math.pow(b.c,c);d=d*(1-e)+e*b.a;isNaN(d)||(b.a=d,b.b+=c)}function Ca(b){return b.a/(1-Math.pow(b.c,b.b))};function Da(){this.b=new Aa(2);this.c=new Aa(5);this.a=0}Da.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Ca(this.b),Ca(this.c))};function Ea(){}function Fa(){}window.console&&window.console.log.bind&&(Ea=console.warn.bind(console));var Ga=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Ia(b){var c;b instanceof Ia?(Ja(this,b.ha),this.Ga=b.Ga,this.ka=b.ka,Ka(this,b.Ra),this.aa=b.aa,La(this,Ma(b.a)),this.Aa=b.Aa):b&&(c=String(b).match(Ga))?(Ja(this,c[1]||"",!0),this.Ga=Na(c[2]||""),this.ka=Na(c[3]||"",!0),Ka(this,c[4]),this.aa=Na(c[5]||"",!0),La(this,c[6]||"",!0),this.Aa=Na(c[7]||"")):this.a=new Oa(null)}n=Ia.prototype;n.ha="";n.Ga="";n.ka="";n.Ra=null;n.aa="";n.Aa="";
n.toString=function(){var b=[],c=this.ha;c&&b.push(Pa(c,Qa,!0),":");if(c=this.ka){b.push("//");var d=this.Ga;d&&b.push(Pa(d,Qa,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.Ra;null!=c&&b.push(":",String(c))}if(c=this.aa)this.ka&&"/"!=c.charAt(0)&&b.push("/"),b.push(Pa(c,"/"==c.charAt(0)?Ra:Sa,!0));(c=this.a.toString())&&b.push("?",c);(c=this.Aa)&&b.push("#",Pa(c,Ta));return b.join("")};
n.resolve=function(b){var c=new Ia(this);"data"===c.ha&&(c=new Ia);var d=!!b.ha;d?Ja(c,b.ha):d=!!b.Ga;d?c.Ga=b.Ga:d=!!b.ka;d?c.ka=b.ka:d=null!=b.Ra;var e=b.aa;if(d)Ka(c,b.Ra);else if(d=!!b.aa){if("/"!=e.charAt(0))if(this.ka&&!this.aa)e="/"+e;else{var f=c.aa.lastIndexOf("/");-1!=f&&(e=c.aa.substr(0,f+1)+e)}if(".."==e||"."==e)e="";else if(-1!=e.indexOf("./")||-1!=e.indexOf("/.")){f=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],h=0;h<e.length;){var k=e[h++];"."==k?f&&h==e.length&&g.push(""):".."==
k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),f&&h==e.length&&g.push("")):(g.push(k),f=!0)}e=g.join("/")}}d?c.aa=e:d=""!==b.a.toString();d?La(c,Ma(b.a)):d=!!b.Aa;d&&(c.Aa=b.Aa);return c};function Ja(b,c,d){b.ha=d?Na(c,!0):c;b.ha&&(b.ha=b.ha.replace(/:$/,""))}function Ka(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.Ra=c}else b.Ra=null}function La(b,c,d){c instanceof Oa?b.a=c:(d||(c=Pa(c,Ua)),b.a=new Oa(c))}
function Na(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function Pa(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,Va),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function Va(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var Qa=/[#\/\?@]/g,Sa=/[#\?:]/g,Ra=/[#\?]/g,Ua=/[#\?@]/g,Ta=/#/g;function Oa(b){this.b=b||null}Oa.prototype.a=null;Oa.prototype.c=null;
Oa.prototype.add=function(b,c){if(!this.a&&(this.a={},this.c=0,this.b))for(var d=this.b.split("&"),e=0;e<d.length;e++){var f=d[e].indexOf("="),g=null;if(0<=f){var h=d[e].substring(0,f);g=d[e].substring(f+1)}else h=d[e];h=decodeURIComponent(h.replace(/\+/g," "));g=g||"";this.add(h,decodeURIComponent(g.replace(/\+/g," ")))}this.b=null;(d=this.a.hasOwnProperty(b)&&this.a[b])||(this.a[b]=d=[]);d.push(c);this.c++;return this};
Oa.prototype.toString=function(){if(this.b)return this.b;if(!this.a)return"";var b=[],c;for(c in this.a)for(var d=encodeURIComponent(c),e=this.a[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.b=b.join("&")};function Ma(b){var c=new Oa;c.b=b.b;if(b.a){var d={},e;for(e in b.a)d[e]=b.a[e].concat();c.a=d;c.c=b.c}return c};function z(){var b,c,d=new Promise(function(d,f){b=d;c=f});d.resolve=b;d.reject=c;return d}z.prototype.resolve=function(){};z.prototype.reject=function(){};function Xa(b,c){var d=Ya();this.i=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.h=null==b.fuzzFactor?d.fuzzFactor:b.fuzzFactor;this.g=null==b.backoffFactor?d.backoffFactor:b.backoffFactor;this.a=0;this.b=this.f;if(this.c=c||!1)this.a=1}function Za(b){if(b.a>=b.i)if(b.c)b.a=1,b.b=b.f;else return Promise.reject();var c=new z;b.a?(window.setTimeout(c.resolve,b.b*(1+(2*Math.random()-1)*b.h)),b.b*=b.g):c.resolve();b.a++;return c}
function Ya(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function A(b,c,d,e){this.severity=b;this.category=c;this.code=d;this.data=Array.prototype.slice.call(arguments,3);this.handled=!1}x("shaka.util.Error",A);A.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};A.Severity={RECOVERABLE:1,CRITICAL:2};A.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
A.Code={UNSUPPORTED_SCHEME:1E3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,UNKNOWN_DATA_URI_ENCODING:1005,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,INVALID_TEXT_HEADER:2E3,INVALID_TEXT_CUE:2001,UNABLE_TO_DETECT_ENCODING:2003,BAD_ENCODING:2004,INVALID_XML:2005,INVALID_MP4_TTML:2007,INVALID_MP4_VTT:2008,UNABLE_TO_EXTRACT_CUE_START_TIME:2009,BUFFER_READ_OUT_OF_BOUNDS:3E3,JS_INTEGER_OVERFLOW:3001,EBML_OVERFLOW:3002,
EBML_BAD_FLOATING_POINT_SIZE:3003,MP4_SIDX_WRONG_BOX_TYPE:3004,MP4_SIDX_INVALID_TIMESCALE:3005,MP4_SIDX_TYPE_NOT_SUPPORTED:3006,WEBM_CUES_ELEMENT_MISSING:3007,WEBM_EBML_HEADER_ELEMENT_MISSING:3008,WEBM_SEGMENT_ELEMENT_MISSING:3009,WEBM_INFO_ELEMENT_MISSING:3010,WEBM_DURATION_ELEMENT_MISSING:3011,WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING:3012,WEBM_CUE_TIME_ELEMENT_MISSING:3013,MEDIA_SOURCE_OPERATION_FAILED:3014,MEDIA_SOURCE_OPERATION_THREW:3015,VIDEO_ERROR:3016,QUOTA_EXCEEDED_ERROR:3017,TRANSMUXING_FAILED:3018,
UNABLE_TO_GUESS_MANIFEST_TYPE:4E3,DASH_INVALID_XML:4001,DASH_NO_SEGMENT_INFO:4002,DASH_EMPTY_ADAPTATION_SET:4003,DASH_EMPTY_PERIOD:4004,DASH_WEBM_MISSING_INIT:4005,DASH_UNSUPPORTED_CONTAINER:4006,DASH_PSSH_BAD_ENCODING:4007,DASH_NO_COMMON_KEY_SYSTEM:4008,DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED:4009,DASH_CONFLICTING_KEY_IDS:4010,UNPLAYABLE_PERIOD:4011,RESTRICTIONS_CANNOT_BE_MET:4012,NO_PERIODS:4014,HLS_PLAYLIST_HEADER_MISSING:4015,INVALID_HLS_TAG:4016,HLS_INVALID_PLAYLIST_HIERARCHY:4017,DASH_DUPLICATE_REPRESENTATION_ID:4018,
HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND:4020,HLS_COULD_NOT_GUESS_MIME_TYPE:4021,HLS_MASTER_PLAYLIST_NOT_PROVIDED:4022,HLS_REQUIRED_ATTRIBUTE_MISSING:4023,HLS_REQUIRED_TAG_MISSING:4024,HLS_COULD_NOT_GUESS_CODECS:4025,HLS_KEYFORMATS_NOT_SUPPORTED:4026,DASH_UNSUPPORTED_XLINK_ACTUATE:4027,DASH_XLINK_DEPTH_LIMIT:4028,HLS_COULD_NOT_PARSE_SEGMENT_START_TIME:4030,CONTENT_UNSUPPORTED_BY_BROWSER:4032,INVALID_STREAMS_CHOSEN:5005,NO_RECOGNIZED_KEY_SYSTEMS:6E3,REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE:6001,FAILED_TO_CREATE_CDM:6002,
FAILED_TO_ATTACH_TO_VIDEO:6003,INVALID_SERVER_CERTIFICATE:6004,FAILED_TO_CREATE_SESSION:6005,FAILED_TO_GENERATE_LICENSE_REQUEST:6006,LICENSE_REQUEST_FAILED:6007,LICENSE_RESPONSE_REJECTED:6008,ENCRYPTED_CONTENT_WITHOUT_DRM_INFO:6010,NO_LICENSE_SERVER_GIVEN:6012,OFFLINE_SESSION_REMOVED:6013,EXPIRED:6014,LOAD_INTERRUPTED:7E3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,CAST_API_UNAVAILABLE:8E3,NO_CAST_RECEIVERS:8001,ALREADY_CASTING:8002,UNEXPECTED_CAST_ERROR:8003,CAST_CANCELED_BY_USER:8004,CAST_CONNECTION_TIMED_OUT:8005,
CAST_RECEIVER_APP_UNAVAILABLE:8006,STORAGE_NOT_SUPPORTED:9E3,INDEXED_DB_ERROR:9001,DEPRECATED_OPERATION_ABORTED:9002,REQUESTED_ITEM_NOT_FOUND:9003,MALFORMED_OFFLINE_URI:9004,CANNOT_STORE_LIVE_OFFLINE:9005,STORE_ALREADY_IN_PROGRESS:9006,NO_INIT_DATA_FOR_OFFLINE:9007,LOCAL_PLAYER_INSTANCE_REQUIRED:9008,NEW_KEY_OPERATION_NOT_SUPPORTED:9011,KEY_NOT_FOUND:9012,MISSING_STORAGE_CELL:9013};function B(b,c){this.promise=b;this.b=c;this.a=!1}x("shaka.util.AbortableOperation",B);function $a(b){return new B(Promise.reject(b),function(){return Promise.resolve()})}B.failed=$a;function ab(){var b=Promise.reject(new A(2,7,7001));b["catch"](function(){});return new B(b,function(){return Promise.resolve()})}B.aborted=ab;function bb(b){return new B(Promise.resolve(b),function(){return Promise.resolve()})}B.completed=bb;
function cb(b){return new B(b,function(){return b["catch"](function(){})})}B.notAbortable=cb;B.prototype.abort=function(){this.a=!0;return this.b()};B.prototype.abort=B.prototype.abort;function db(b){return new B(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}B.all=db;B.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};B.prototype["finally"]=B.prototype["finally"];
B.prototype.V=function(b,c){function d(){f.reject(new A(2,7,7001));return e.abort()}var e=this,f=new z;this.promise.then(function(c){e.a?f.reject(new A(2,7,7001)):b?d=eb(b,c,f):f.resolve(c)},function(b){c?d=eb(c,b,f):f.reject(b)});return new B(f,function(){return d()})};B.prototype.chain=B.prototype.V;
function eb(b,c,d){try{var e=b(c);if(e&&e.promise&&e.abort)return d.resolve(e.promise),function(){return e.abort()};d.resolve(e);return function(){return Promise.resolve(e).then(function(){})["catch"](function(){})}}catch(f){return d.reject(f),function(){return Promise.resolve()}}};function fb(b,c){for(var d=[],e=0;e<b.length;++e){for(var f=!1,g=0;g<d.length&&!(f=c?c(b[e],d[g]):b[e]===d[g]);++g);f||d.push(b[e])}return d}function gb(b,c,d){for(var e=0;e<b.length;++e)if(d(b[e],c))return e;return-1}function hb(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function ib(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d};function jb(b,c,d,e,f){var g=f in e,h=!0,k;for(k in c){var l=f+"."+k,m=g?e[f]:d[k];g||k in b?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=m:m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=m),h=h&&jb(b[k],c[k],m,e,l)):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}
function kb(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b)return b;if(0<=d.indexOf(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.push(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=[];return c(b)};function lb(b,c){function d(){return Promise.all(b.map(function(b){return b.destroy()}))}return Promise.resolve(c()).then(function(b){return d().then(function(){return b})},function(b){return d().then(function(){throw b;})})};function mb(){this.a=[]}function nb(b,c){b.a.push(c["finally"](function(){hb(b.a,c)}))}mb.prototype.destroy=function(){var b=[];this.a.forEach(function(c){c.promise["catch"](function(){});b.push(c.abort())});this.a=[];return Promise.all(b)};function C(b){this.c=!1;this.g=new mb;this.a=[];this.b=[];this.f=b||null}x("shaka.net.NetworkingEngine",C);C.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3};C.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var ob={};function pb(b,c,d){d=d||3;var e=ob[b];if(!e||d>=e.priority)ob[b]={priority:d,me:c}}C.registerScheme=pb;C.unregisterScheme=function(b){delete ob[b]};C.prototype.pe=function(b){this.a.push(b)};C.prototype.registerRequestFilter=C.prototype.pe;
C.prototype.Ue=function(b){hb(this.a,b)};C.prototype.unregisterRequestFilter=C.prototype.Ue;C.prototype.gd=function(){this.a=[]};C.prototype.clearAllRequestFilters=C.prototype.gd;C.prototype.qe=function(b){this.b.push(b)};C.prototype.registerResponseFilter=C.prototype.qe;C.prototype.Ve=function(b){hb(this.b,b)};C.prototype.unregisterResponseFilter=C.prototype.Ve;C.prototype.hd=function(){this.b=[]};C.prototype.clearAllResponseFilters=C.prototype.hd;
function qb(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c}}C.prototype.destroy=function(){this.c=!0;this.a=[];this.b=[];return this.g.destroy()};C.prototype.destroy=C.prototype.destroy;
function rb(b){b.then=function(c,d){Ea("The network request interface has changed! Please update your application to the new interface, which allows operations to be aborted. Support for the old API will be removed in v2.5.");return b.promise.then(c,d)};b["catch"]=function(c){Ea("The network request interface has changed! Please update your application to the new interface, which allows operations to be aborted. Support for the old API will be removed in v2.5.");return b.promise["catch"](c)};
return b}
C.prototype.request=function(b,c){var d=this;if(this.c)return rb(ab());c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?kb(c.retryParameters):Ya();c.uris=kb(c.uris);var e=sb(this,b,c),f=e.V(function(){return tb(d,b,c,new Xa(c.retryParameters,!1),0,null)}),g=f.V(function(c){return ub(d,b,c)}),h=Date.now(),k=0;e.promise.then(function(){k=Date.now()-h},function(){});var l=0;f.promise.then(function(){l=Date.now()},function(){});e=g.V(function(c){var e=Date.now()-l;
c.timeMs+=k;c.timeMs+=e;d.f&&!c.fromCache&&1==b&&d.f(c.timeMs,c.data.byteLength);return c},function(b){b&&(b.severity=2);throw b;});nb(this.g,e);return rb(e)};C.prototype.request=C.prototype.request;function sb(b,c,d){var e=bb(void 0);b.a.forEach(function(b){e=e.V(function(){return b(c,d)})});return e.V(void 0,function(b){if(b&&7001==b.code)throw b;throw new A(2,1,1006,b);})}
function tb(b,c,d,e,f,g){var h=new Ia(d.uris[f]),k=h.ha;k||(k=location.protocol,k=k.slice(0,-1),Ja(h,k),d.uris[f]=h.toString());var l=(k=ob[k])?k.me:null;if(!l)return $a(new A(2,1,1E3,h));var m;return cb(Za(e)).V(function(){if(b.c)return ab();m=Date.now();var e=l(d.uris[f],d,c);void 0==e.promise&&(Ea("The scheme plugin interface has changed! Please update your scheme plugins to the new interface to add support for abort(). Support for the old plugin interface will be removed in v2.5."),e=cb(e));
return e}).V(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-m);return b},function(h){if(h&&7001==h.code)throw h;if(b.c)return ab();if(h&&1==h.severity)return f=(f+1)%d.uris.length,tb(b,c,d,e,f,h);throw h||g;})}function ub(b,c,d){var e=bb(void 0);b.b.forEach(function(b){e=e.V(function(){return b(c,d)})});return e.V(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof A&&(c=b.severity);throw new A(c,1,1007,b);})};function vb(){this.a={}}vb.prototype.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};vb.prototype.get=function(b){return(b=this.a[b])?b.slice():null};vb.prototype.remove=function(b,c){var d=this.a[b];if(d)for(var e=0;e<d.length;++e)d[e]==c&&(d.splice(e,1),--e)};function D(){this.a=new vb}D.prototype.destroy=function(){wb(this);this.a=null;return Promise.resolve()};function E(b,c,d,e){b.a&&(c=new xb(c,d,e),b.a.push(d,c))}function yb(b,c,d,e){E(b,c,d,function(b){this.na(c,d);e(b)}.bind(b))}D.prototype.na=function(b,c){if(this.a)for(var d=this.a.get(c)||[],e=0;e<d.length;++e){var f=d[e];f.target==b&&(f.na(),this.a.remove(c,f))}};function wb(b){if(b.a){var c=b.a,d=[],e;for(e in c.a)d.push.apply(d,c.a[e]);for(c=0;c<d.length;++c)d[c].na();b.a.a={}}}
function xb(b,c,d){this.target=b;this.type=c;this.a=d;this.target.addEventListener(c,d,!1)}xb.prototype.na=function(){this.target.removeEventListener(this.type,this.a,!1);this.a=this.target=null};function F(b,c){var d=c||{},e;for(e in d)this[e]=d[e];this.defaultPrevented=this.cancelable=this.bubbles=!1;this.timeStamp=window.performance&&window.performance.now?window.performance.now():Date.now();this.type=b;this.isTrusted=!1;this.target=this.currentTarget=null;this.a=!1}F.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};F.prototype.stopImmediatePropagation=function(){this.a=!0};F.prototype.stopPropagation=function(){};function zb(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())}function Ab(b,c){return b.concat(c)}function Bb(){}function Cb(b){return null!=b}function Db(b,c,d){return d.indexOf(b)==c};function Eb(b,c){if(0==c.length)return b;var d=c.map(function(b){return new Ia(b)});return b.map(function(b){return new Ia(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(Ab,[]).map(function(b){return b.toString()})}function Fb(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var Gb=1/15;function Hb(b){return!b||0==Object.keys(b).length}function G(b){return Object.keys(b).map(function(c){return b[c]})}function Ib(b,c){return Object.keys(b).every(function(d){return c(d,b[d])})}function Jb(b,c){Object.keys(b).forEach(function(d){c(d,b[d])})};function Kb(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}var Lb={codecs:"codecs",frameRate:"framerate",bandwidth:"bitrate",width:"width",height:"height",channelsCount:"channels"};function H(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=escape(Nb(b));try{return decodeURIComponent(b)}catch(c){throw new A(2,2,2004);}}x("shaka.util.StringUtils.fromUTF8",H);
function Ob(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new A(2,2,2004);if(b instanceof ArrayBuffer)var e=b;else d=new Uint8Array(b.byteLength),d.set(new Uint8Array(b)),e=d.buffer;b=Math.floor(b.byteLength/2);d=new Uint16Array(b);e=new DataView(e);for(var f=0;f<b;f++)d[f]=e.getUint16(2*f,c);return Nb(d)}x("shaka.util.StringUtils.fromUTF16",Ob);
function Pb(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return H(c);if(254==c[0]&&255==c[1])return Ob(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Ob(c.subarray(2),!0);var d=function(b,c){return b.byteLength<=c||32<=b[c]&&126>=b[c]}.bind(null,c);if(0==c[0]&&0==c[2])return Ob(b,!1);if(0==c[1]&&0==c[3])return Ob(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return H(b);throw new A(2,2,2003);}x("shaka.util.StringUtils.fromBytesAutoDetect",Pb);
function Qb(b){b=encodeURIComponent(b);b=unescape(b);for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c.buffer}x("shaka.util.StringUtils.toUTF8",Qb);function Nb(b){for(var c="",d=0;d<b.length;d+=16E3)c+=String.fromCharCode.apply(null,b.subarray(d,d+16E3));return c};function Rb(b){this.a=null;this.b=function(){this.a=null;b()}.bind(this)}Rb.prototype.cancel=function(){null!=this.a&&(clearTimeout(this.a),this.a=null)};function Sb(b){b.cancel();b.a=setTimeout(b.b,500)}function Tb(b,c){b.cancel();var d=function(){this.b();this.a=setTimeout(d,1E3*c)}.bind(b);b.a=setTimeout(d,1E3*c)};function Ub(b,c){var d=void 0==c?!0:c,e=window.btoa(Nb(b)).replace(/\+/g,"-").replace(/\//g,"_");return d?e:e.replace(/=*$/,"")}x("shaka.util.Uint8ArrayUtils.toBase64",Ub);function Vb(b){b=window.atob(b.replace(/-/g,"+").replace(/_/g,"/"));for(var c=new Uint8Array(b.length),d=0;d<b.length;++d)c[d]=b.charCodeAt(d);return c}x("shaka.util.Uint8ArrayUtils.fromBase64",Vb);function Wb(b){for(var c=new Uint8Array(b.length/2),d=0;d<b.length;d+=2)c[d/2]=window.parseInt(b.substr(d,2),16);return c}
x("shaka.util.Uint8ArrayUtils.fromHex",Wb);function Xb(b){for(var c="",d=0;d<b.length;++d){var e=b[d].toString(16);1==e.length&&(e="0"+e);c+=e}return c}x("shaka.util.Uint8ArrayUtils.toHex",Xb);function Yb(b,c){if(!b&&!c)return!0;if(!b||!c||b.length!=c.length)return!1;for(var d=0;d<b.length;++d)if(b[d]!=c[d])return!1;return!0}x("shaka.util.Uint8ArrayUtils.equal",Yb);
function Zb(b){for(var c=0,d=0;d<arguments.length;++d)c+=arguments[d].length;c=new Uint8Array(c);for(var e=d=0;e<arguments.length;++e)c.set(arguments[e],d),d+=arguments[e].length;return c}x("shaka.util.Uint8ArrayUtils.concat",Zb);function $b(b){this.o=b;this.l=this.j=this.u=null;this.N=!1;this.b=null;this.g=new D;this.a=[];this.m=[];this.i=new z;this.f=null;this.h=function(c){this.i.reject(c);b.onError(c)}.bind(this);this.A={};this.H=new Rb(this.oe.bind(this));this.fa=this.c=!1;this.K=[];this.T=!1;this.v=new Rb(this.ne.bind(this));Tb(this.v,1);this.i["catch"](function(){})}n=$b.prototype;
n.destroy=function(){this.c=!0;var b=[];this.a.forEach(function(c){c=c.ia.close()["catch"](Bb);var d=new Promise(function(b){setTimeout(b,1E3)});b.push(Promise.race([c,d]))});this.i.reject();this.g&&b.push(this.g.destroy());this.l&&b.push(this.l.setMediaKeys(null)["catch"](Bb));this.v&&(this.v.cancel(),this.v=null);this.H&&(this.H.cancel(),this.H=null);this.g=this.l=this.j=this.u=this.b=null;this.a=[];this.m=[];this.o=this.h=this.f=null;return Promise.all(b)};n.configure=function(b){this.f=b};
n.init=function(b,c){var d={},e=[];this.fa=c;this.m=b.offlineSessionIds;ac(this,b,c||0<b.offlineSessionIds.length,d,e);return e.length?bc(this,d,e):(this.N=!0,Promise.resolve())};
n.sb=function(b){if(!this.j)return yb(this.g,b,"encrypted",function(){this.h(new A(2,6,6010))}.bind(this)),Promise.resolve();this.l=b;yb(this.g,this.l,"play",this.Td.bind(this));b=this.l.setMediaKeys(this.j);b=b["catch"](function(b){return Promise.reject(new A(2,6,6003,b.message))});var c=null;this.b.serverCertificate&&this.b.serverCertificate.length&&(c=this.j.setServerCertificate(this.b.serverCertificate).then(function(){})["catch"](function(b){return Promise.reject(new A(2,6,6004,b.message))}));
return Promise.all([b,c]).then(function(){if(this.c)return Promise.reject();cc(this);this.b.initData.length||this.m.length||E(this.g,this.l,"encrypted",this.Id.bind(this))}.bind(this))["catch"](function(b){return this.c?Promise.resolve():Promise.reject(b)}.bind(this))};
function dc(b,c){return Promise.all(c.map(function(b){return ec(this,b).then(function(b){if(b){for(var c=new z,d=0;d<this.a.length;d++)if(this.a[d].ia==b){this.a[d].oa=c;break}return Promise.all([b.remove(),c])}}.bind(this))}.bind(b)))}function cc(b){var c=b.b?b.b.initData:[];c.forEach(function(b){fc(this,b.initDataType,b.initData)}.bind(b));b.m.forEach(function(b){ec(this,b)}.bind(b));c.length||b.m.length||b.i.resolve();return b.i}n.keySystem=function(){return this.b?this.b.keySystem:""};
function gc(b){return b.a.map(function(b){return b.ia.sessionId})}n.wb=function(){var b=this.a.map(function(b){b=b.ia.expiration;return isNaN(b)?Infinity:b});return Math.min.apply(Math,b)};
function ac(b,c,d,e,f){var g=hc(b),h=ic(b,c);c.periods.forEach(function(b){b.variants.forEach(function(b){g&&(b.drmInfos=[g]);h&&(b.drmInfos=h);b.drmInfos.forEach(function(c){jc(this,c);window.cast&&window.cast.__platform__&&"com.microsoft.playready"==c.keySystem&&(c.keySystem="com.chromecast.playready");var g=e[c.keySystem];g||(g={audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:d?"required":"optional",sessionTypes:[d?"persistent-license":"temporary"],label:c.keySystem,
drmInfos:[]},e[c.keySystem]=g,f.push(c.keySystem));g.drmInfos.push(c);c.distinctiveIdentifierRequired&&(g.distinctiveIdentifier="required");c.persistentStateRequired&&(g.persistentState="required");var h=[];b.video&&h.push(b.video);b.audio&&h.push(b.audio);h.forEach(function(b){("video"==b.type?g.videoCapabilities:g.audioCapabilities).push({robustness:("video"==b.type?c.videoRobustness:c.audioRobustness)||"",contentType:Kb(b.mimeType,b.codecs)})}.bind(this))}.bind(this))}.bind(this))}.bind(b))}
function bc(b,c,d){if(1==d.length&&""==d[0])return Promise.reject(new A(2,6,6E3));var e=new z,f=e;[!0,!1].forEach(function(b){d.forEach(function(d){var e=c[d];e.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities,f=f["catch"](function(){return this.c?Promise.reject():navigator.requestMediaKeySystemAccess(d,[e])}.bind(this)))}.bind(this))}.bind(b));f=f["catch"](function(){return Promise.reject(new A(2,
6,6001))});f=f.then(function(b){if(this.c)return Promise.reject();var d=0<=navigator.userAgent.indexOf("Edge/"),e=b.getConfiguration();this.u=(e.audioCapabilities||[]).concat(e.videoCapabilities||[]).map(function(b){return b.contentType});d&&(this.u=null);d=c[b.keySystem];kc(this,b.keySystem,d,d.drmInfos);return this.b.licenseServerUri?b.createMediaKeys():Promise.reject(new A(2,6,6012))}.bind(b)).then(function(b){if(this.c)return Promise.reject();this.j=b;this.N=!0}.bind(b))["catch"](function(b){if(this.c)return Promise.resolve();
this.u=this.b=null;return b instanceof A?Promise.reject(b):Promise.reject(new A(2,6,6002,b.message))}.bind(b));e.reject();return f}
function jc(b,c){var d=c.keySystem;if(d){if(!c.licenseServerUri){var e=b.f.servers[d];e&&(c.licenseServerUri=e)}c.keyIds||(c.keyIds=[]);if(d=b.f.advanced[d])c.distinctiveIdentifierRequired||(c.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),c.persistentStateRequired||(c.persistentStateRequired=d.persistentStateRequired),c.videoRobustness||(c.videoRobustness=d.videoRobustness),c.audioRobustness||(c.audioRobustness=d.audioRobustness),c.serverCertificate||(c.serverCertificate=d.serverCertificate)}}
function hc(b){if(Hb(b.f.clearKeys))return null;var c=[],d=[],e;for(e in b.f.clearKeys){var f=b.f.clearKeys[e],g=Wb(e);f=Wb(f);g={kty:"oct",kid:Ub(g,!1),k:Ub(f,!1)};c.push(g);d.push(g.kid)}b=JSON.stringify({keys:c});d=JSON.stringify({kids:d});d=[{initData:new Uint8Array(Qb(d)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
initData:d,keyIds:[]}}function ic(b,c){var d=b.f,e=Object.keys(d.servers);return!e.length||c.periods.some(function(b){return b.variants.some(function(b){return b.drmInfos.length})})?null:e.map(function(b){return{keySystem:b,licenseServerUri:d.servers[b],distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]}})}
function kc(b,c,d,e){var f=[],g=[],h=[],k=[];lc(e,f,g,h,k);b.b={keySystem:c,licenseServerUri:f[0],distinctiveIdentifierRequired:"required"==d.distinctiveIdentifier,persistentStateRequired:"required"==d.persistentState,audioRobustness:d.audioCapabilities?d.audioCapabilities[0].robustness:"",videoRobustness:d.videoCapabilities?d.videoCapabilities[0].robustness:"",serverCertificate:g[0],initData:h,keyIds:k}}
function lc(b,c,d,e,f){function g(b,c){return b.keyId&&b.keyId==c.keyId?!0:b.initDataType==c.initDataType&&Yb(b.initData,c.initData)}b.forEach(function(b){-1==c.indexOf(b.licenseServerUri)&&c.push(b.licenseServerUri);b.serverCertificate&&-1==gb(d,b.serverCertificate,Yb)&&d.push(b.serverCertificate);b.initData&&b.initData.forEach(function(b){-1==gb(e,b,g)&&e.push(b)});if(b.keyIds)for(var h=0;h<b.keyIds.length;++h)-1==f.indexOf(b.keyIds[h])&&f.push(b.keyIds[h])})}
n.Id=function(b){for(var c=new Uint8Array(b.initData),d=0;d<this.a.length;++d)if(Yb(c,this.a[d].initData))return;fc(this,b.initDataType,c)};
function ec(b,c){try{var d=b.j.createSession("persistent-license")}catch(g){var e=new A(2,6,6005,g.message);b.h(e);return Promise.reject(e)}E(b.g,d,"message",b.Gc.bind(b));E(b.g,d,"keystatuseschange",b.Cc.bind(b));var f={initData:null,ia:d,loaded:!1,Ub:Infinity,oa:null};b.a.push(f);return d.load(c).then(function(b){if(!this.c){if(b)return f.loaded=!0,this.a.every(function(b){return b.loaded})&&this.i.resolve(),d;this.a.splice(this.a.indexOf(f),1);this.h(new A(2,6,6013))}}.bind(b),function(b){this.c||
(this.a.splice(this.a.indexOf(f),1),this.h(new A(2,6,6005,b.message)))}.bind(b))}
function fc(b,c,d){try{var e=b.fa?b.j.createSession("persistent-license"):b.j.createSession()}catch(f){b.h(new A(2,6,6005,f.message));return}E(b.g,e,"message",b.Gc.bind(b));E(b.g,e,"keystatuseschange",b.Cc.bind(b));b.a.push({initData:d,ia:e,loaded:!1,Ub:Infinity,oa:null});e.generateRequest(c,d.buffer)["catch"](function(b){if(!this.c){for(var c=0;c<this.a.length;++c)if(this.a[c].ia==e){this.a.splice(c,1);break}this.h(new A(2,6,6006,b.message))}}.bind(b))}
n.Gc=function(b){this.f.delayLicenseRequestUntilPlayed&&this.l.paused&&!this.T?this.K.push(b):mc(this,b)};
function mc(b,c){for(var d=c.target,e,f=0;f<b.a.length;f++)if(b.a[f].ia==d){e=b.a[f];break}f=qb([b.b.licenseServerUri],b.f.retryParameters);f.body=c.message;f.method="POST";"com.microsoft.playready"!=b.b.keySystem&&"com.chromecast.playready"!=b.b.keySystem||nc(f);b.o.Oa.request(2,f).promise.then(function(b){return this.c?Promise.reject():d.update(b.data).then(function(){this.o.onEvent(new F("drmsessionupdate"));e&&(e.oa&&e.oa.resolve(),setTimeout(function(){e.loaded=!0;this.a.every(function(b){return b.loaded})&&
this.i.resolve()}.bind(this),5E3))}.bind(this))}.bind(b),function(b){if(this.c)return Promise.resolve();b=new A(2,6,6007,b);this.h(b);e&&e.oa&&e.oa.reject(b)}.bind(b))["catch"](function(b){if(this.c)return Promise.resolve();b=new A(2,6,6008,b.message);this.h(b);e&&e.oa&&e.oa.reject(b)}.bind(b))}
function nc(b){var c=Ob(b.body,!0,!0);if(-1==c.indexOf("PlayReadyKeyMessage"))b.headers["Content-Type"]="text/xml; charset=utf-8";else{c=(new DOMParser).parseFromString(c,"application/xml");for(var d=c.getElementsByTagName("HttpHeader"),e=0;e<d.length;++e)b.headers[d[e].querySelector("name").textContent]=d[e].querySelector("value").textContent;b.body=Vb(c.querySelector("Challenge").textContent).buffer}}
n.Cc=function(b){b=b.target;var c;for(c=0;c<this.a.length&&this.a[c].ia!=b;++c);if(c!=this.a.length){var d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.b.keySystem&&16==e.byteLength){f=new DataView(e);var g=f.getUint32(0,!0),l=f.getUint16(4,!0),m=f.getUint16(6,!0);f.setUint32(0,g,!1);f.setUint16(4,l,!1);f.setUint16(6,m,!1)}"com.microsoft.playready"==this.b.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(this.a[c].loaded=
!0,this.a.every(function(b){return b.loaded})&&this.i.resolve());"expired"==b&&(d=!0);f=Xb(new Uint8Array(e));this.A[f]=b}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&!this.a[c].oa&&(this.a.splice(c,1),b.close()["catch"](function(){}));Sb(this.H)}};n.oe=function(){function b(b,d){return"expired"==d}!Hb(this.A)&&Ib(this.A,b)&&this.h(new A(2,6,6014));this.o.zb(this.A)};
function oc(){var b=[],c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e={};"org.w3.clearkey com.widevine.alpha com.microsoft.playready com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" ").forEach(function(c){var f=navigator.requestMediaKeySystemAccess(c,d).then(function(b){var d=b.getConfiguration().sessionTypes;d=
d?0<=d.indexOf("persistent-license"):!1;0<=navigator.userAgent.indexOf("Tizen 3")&&(d=!1);e[c]={persistentState:d};return b.createMediaKeys()})["catch"](function(){e[c]=null});b.push(f)});return Promise.all(b).then(function(){return e})}n.Td=function(){for(var b=0;b<this.K.length;b++)mc(this,this.K[b]);this.T=!0;this.K=[]};function pc(b,c){var d=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==d})}
function qc(b,c){if(!b.length)return c;if(!c.length)return b;for(var d=[],e=0;e<b.length;e++)for(var f=0;f<c.length;f++)if(b[e].keySystem==c[f].keySystem){var g=b[e];f=c[f];var h=[];h=h.concat(g.initData||[]);h=h.concat(f.initData||[]);var k=[];k=k.concat(g.keyIds);k=k.concat(f.keyIds);d.push({keySystem:g.keySystem,licenseServerUri:g.licenseServerUri||f.licenseServerUri,distinctiveIdentifierRequired:g.distinctiveIdentifierRequired||f.distinctiveIdentifierRequired,persistentStateRequired:g.persistentStateRequired||
f.persistentStateRequired,videoRobustness:g.videoRobustness||f.videoRobustness,audioRobustness:g.audioRobustness||f.audioRobustness,serverCertificate:g.serverCertificate||f.serverCertificate,initData:h,keyIds:k});break}return d}n.ne=function(){this.a.forEach(function(b){var c=b.Ub,d=b.ia.expiration;isNaN(d)&&(d=Infinity);d!=c&&(this.o.onExpirationUpdated(b.ia.sessionId,d),b.Ub=d)}.bind(this))};function rc(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function sc(b,c){return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)?!1:c>=b.start(0)&&c<=b.end(b.length-1)}function tc(b,c){if(!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0))return 0;for(var d=0,e=b.length-1;0<=e&&b.end(e)>c;--e)d+=b.end(e)-Math.max(b.start(e),c);return d}function uc(b){if(!b)return[];for(var c=[],d=0;d<b.length;d++)c.push({start:b.start(d),end:b.end(d)});return c};function I(b,c,d){this.startTime=b;this.endTime=c;this.payload=d;this.region=new vc;this.position=null;this.positionAlign=wc;this.size=100;this.textAlign=xc;this.writingDirection=yc;this.lineInterpretation=zc;this.line=null;this.lineHeight="";this.lineAlign=Ac;this.displayAlign=Bc;this.fontSize=this.backgroundColor=this.color="";this.fontWeight=Cc;this.fontStyle=Dc;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}x("shaka.text.Cue",I);var wc="auto";
I.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:wc};var xc="center",Ec={LEFT:"left",RIGHT:"right",CENTER:xc,START:"start",END:"end"};I.textAlign=Ec;var Bc="before",Fc={BEFORE:Bc,CENTER:"center",AFTER:"after"};I.displayAlign=Fc;var yc=0;I.writingDirection={HORIZONTAL_LEFT_TO_RIGHT:yc,HORIZONTAL_RIGHT_TO_LEFT:1,VERTICAL_LEFT_TO_RIGHT:2,VERTICAL_RIGHT_TO_LEFT:3};var zc=0;I.lineInterpretation={LINE_NUMBER:zc,PERCENTAGE:1};var Ac="center",Gc={CENTER:Ac,START:"start",END:"end"};
I.lineAlign=Gc;var Cc=400;I.fontWeight={NORMAL:Cc,BOLD:700};var Dc="normal",Hc={NORMAL:Dc,ITALIC:"italic",OBLIQUE:"oblique"};I.fontStyle=Hc;I.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};function vc(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Ic;this.scroll=Jc}x("shaka.text.CueRegion",vc);var Ic=1;
vc.units={PX:0,PERCENTAGE:Ic,LINES:2};var Jc="";vc.scrollMode={NONE:Jc,UP:"up"};function Kc(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.i.bind(this));this.a.on("done",this.h.bind(this))}Kc.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function Lc(b,c){return window.muxjs&&"mp2t"==b.split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(Mc(c,b)):MediaSource.isTypeSupported(Mc("audio",b))||MediaSource.isTypeSupported(Mc("video",b)):!1}
function Mc(b,c){var d=c.replace("mp2t","mp4");"audio"==b&&(d=d.replace("video","audio"));var e=/avc1\.(66|77|100)\.(\d+)/.exec(d);if(e){var f="avc1.",g=e[1],h=Number(e[2]);f=("66"==g?f+"4200":"77"==g?f+"4d00":f+"6400")+(h>>4).toString(16);f+=(h&15).toString(16);d=d.replace(e[0],f)}return d}function Nc(b,c){b.f=!0;b.b=new z;b.g=[];b.c=[];var d=new Uint8Array(c);b.a.push(d);b.a.flush();b.f&&b.b.reject(new A(2,3,3018));return b.b}
Kc.prototype.i=function(b){for(var c=0;c<b.captions.length;c++){var d=b.captions[c];this.c.push(new I(d.startTime,d.endTime,d.text))}c=new Uint8Array(b.data.byteLength+b.initSegment.byteLength);c.set(b.initSegment,0);c.set(b.data,b.initSegment.byteLength);this.g.push(c)};Kc.prototype.h=function(){var b={data:Zb.apply(null,this.g),cues:this.c};this.b.resolve(b);this.f=!1};function Oc(b){this.f=null;this.c=b;this.i=this.g=0;this.h=Infinity;this.b=this.a=null}var J={};x("shaka.text.TextEngine.registerParser",function(b,c){J[b]=c});x("shaka.text.TextEngine.unregisterParser",function(b){delete J[b]});Oc.prototype.destroy=function(){this.c=this.f=null;return Promise.resolve()};Oc.prototype.Ee=function(b){this.c=b};Oc.prototype.setDisplayer=Oc.prototype.Ee;
Oc.prototype.Mb=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.f.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new A(2,2,2009,d);}};
function Pc(b,c,d,e){return Promise.resolve().then(function(){if(this.f&&this.c)if(null==d||null==e)this.f.parseInit(new Uint8Array(c));else{var b={periodStart:this.g,segmentStart:this.g+d,segmentEnd:this.g+e};b=this.f.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.i&&b.startTime<this.h}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.i));this.b=Math.min(e,this.h)}}.bind(b))}
Oc.prototype.remove=function(b,c){return Promise.resolve().then(function(){!this.c||!this.c.remove(b,c)||null==this.a||c<=this.a||b>=this.b||(b<=this.a&&c>=this.b?this.a=this.b=null:b<=this.a&&c<this.b?this.a=c:b>this.a&&c>=this.b&&(this.b=b))}.bind(this))};Oc.prototype.kc=function(b){this.c.append(b)};Oc.prototype.appendCues=Oc.prototype.kc;function Qc(b){this.f=b;this.o=null;this.b={};this.a=null;this.c={};this.i=new D;this.m=!1;this.h={};this.l=!1;b=this.j=new z;var c=new MediaSource;yb(this.i,c,"sourceopen",b.resolve);this.f.src=window.URL.createObjectURL(c);this.g=c}
function Rc(){var b={};'video/mp4; codecs="avc1.42E01E",video/mp4; codecs="avc3.42E01E",video/mp4; codecs="hev1.1.6.L93.90",video/mp4; codecs="hvc1.1.6.L93.90",video/mp4; codecs="hev1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="hvc1.2.4.L153.B0"; eotf="smpte2084",video/mp4; codecs="vp9",video/mp4; codecs="vp09.00.10.08",audio/mp4; codecs="mp4a.40.2",audio/mp4; codecs="ac-3",audio/mp4; codecs="ec-3",audio/mp4; codecs="opus",audio/mp4; codecs="flac",video/webm; codecs="vp8",video/webm; codecs="vp9",video/webm; codecs="vp09.00.10.08",audio/webm; codecs="vorbis",audio/webm; codecs="opus",video/mp2t; codecs="avc1.42E01E",video/mp2t; codecs="avc3.42E01E",video/mp2t; codecs="hvc1.1.6.L93.90",video/mp2t; codecs="mp4a.40.2",video/mp2t; codecs="ac-3",video/mp2t; codecs="ec-3",text/vtt,application/mp4; codecs="wvtt",application/ttml+xml,application/mp4; codecs="stpp"'.split(",").forEach(function(c){b[c]=!!J[c]||
MediaSource.isTypeSupported(c)||Lc(c);var d=c.split(";")[0];b[d]=b[d]||b[c]});return b}n=Qc.prototype;
n.destroy=function(){this.m=!0;var b=[],c;for(c in this.c){var d=this.c[c],e=d[0];this.c[c]=d.slice(0,1);e&&b.push(e.p["catch"](Bb));for(e=1;e<d.length;++e)d[e].p["catch"](Bb),d[e].p.reject()}this.a&&b.push(this.a.destroy());for(var f in this.h)b.push(this.h[f].destroy());this.f&&(this.f.removeAttribute("src"),this.f.load());return Promise.all(b).then(function(){this.i.destroy();this.o=this.a=this.g=this.f=this.i=null;this.b={};this.h={};this.c={}}.bind(this))};
n.init=function(b,c){var d=this;return this.j.then(function(){for(var e in b){var f=b[e];f=Kb(f.mimeType,f.codecs);"text"==e?Sc(d,f):(!c&&MediaSource.isTypeSupported(f)||!Lc(f,e)||(d.h[e]=new Kc,f=Mc(e,f)),f=d.g.addSourceBuffer(f),E(d.i,f,"error",d.Qe.bind(d,e)),E(d.i,f,"updateend",d.Pa.bind(d,e)),d.b[e]=f,d.c[e]=[])}})};function Sc(b,c){b.a||(b.a=new Oc(b.o));b.a.f=new J[c]}
function Tc(b,c){if("text"==c)var d=b.a.a;else d=Uc(b,c),d=!d||1==d.length&&1E-6>d.end(0)-d.start(0)?null:1==d.length&&0>d.start(0)?0:d.length?d.start(0):null;return d}function Vc(b,c){return"text"==c?b.a.b:rc(Uc(b,c))}function Wc(b,c,d){if("text"==c)return b=b.a,null==b.b||b.b<d?0:b.b-Math.max(d,b.a);b=Uc(b,c);return tc(b,d)}n.Ib=function(){var b=this.a&&null!=this.a.a?[{start:this.a.a,end:this.a.b}]:[];return{total:uc(this.f.buffered),audio:uc(Uc(this,"audio")),video:uc(Uc(this,"video")),text:b}};
function Uc(b,c){try{return b.b[c].buffered}catch(d){return null}}function Xc(b,c,d,e,f){return"text"==c?Pc(b.a,d,e,f):b.h[c]?Nc(b.h[c],d).then(function(b){this.a||Sc(this,"text/vtt");this.l&&this.a.kc(b.cues);return Yc(this,c,this.Vc.bind(this,c,b.data.buffer))}.bind(b)):Yc(b,c,b.Vc.bind(b,c,d))}n.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):Yc(this,b,this.Wc.bind(this,b,c,d))};
function Zc(b,c){return"text"==c?b.a?b.a.remove(0,Infinity):Promise.resolve():Yc(b,c,b.Wc.bind(b,c,0,b.g.duration))}n.flush=function(b){return"text"==b?Promise.resolve():Yc(this,b,this.ld.bind(this,b))};function $c(b,c,d,e,f){return"text"==c?(b.a.g=d,b=b.a,b.i=e,b.h=f,Promise.resolve()):Promise.all([Yc(b,c,b.bd.bind(b,c)),Yc(b,c,b.Ge.bind(b,c,d)),Yc(b,c,b.De.bind(b,c,e,f))])}n.endOfStream=function(b){return ad(this,function(){b?this.g.endOfStream(b):this.g.endOfStream()}.bind(this))};
n.ja=function(b){return ad(this,function(){this.g.duration=b}.bind(this))};n.S=function(){return this.g.duration};n.Vc=function(b,c){this.b[b].appendBuffer(c)};n.Wc=function(b,c,d){d<=c?this.Pa(b):this.b[b].remove(c,d)};n.bd=function(b){var c=this.b[b].appendWindowStart,d=this.b[b].appendWindowEnd;this.b[b].abort();this.b[b].appendWindowStart=c;this.b[b].appendWindowEnd=d;this.Pa(b)};n.ld=function(b){this.f.currentTime-=.001;this.Pa(b)};
n.Ge=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.Pa(b)};n.De=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.Pa(b)};n.Qe=function(b){this.c[b][0].p.reject(new A(2,3,3014,this.f.error?this.f.error.code:0))};n.Pa=function(b){var c=this.c[b][0];c&&(c.p.resolve(),bd(this,b))};
function Yc(b,c,d){if(b.m)return Promise.reject();d={start:d,p:new z};b.c[c].push(d);if(1==b.c[c].length)try{d.start()}catch(e){"QuotaExceededError"==e.name?d.p.reject(new A(2,3,3017,c)):d.p.reject(new A(2,3,3015,e)),bd(b,c)}return d.p}
function ad(b,c){if(b.m)return Promise.reject();var d=[],e;for(e in b.b){var f=new z,g={start:function(b){b.resolve()}.bind(null,f),p:f};b.c[e].push(g);d.push(f);1==b.c[e].length&&g.start()}return Promise.all(d).then(function(){try{c()}catch(l){var b=Promise.reject(new A(2,3,3015,l))}for(var d in this.b)bd(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function bd(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new A(2,3,3015,e)),bd(b,c)}};function cd(b,c,d){return d==c||b>=dd&&d==c.split("-")[0]||b>=ed&&d.split("-")[0]==c.split("-")[0]?!0:!1}var dd=1,ed=2;function fd(b){b=b.toLowerCase().split("-");var c=gd[b[0]];c&&(b[0]=c);return b.join("-")}
var gd={aar:"aa",abk:"ab",afr:"af",aka:"ak",alb:"sq",amh:"am",ara:"ar",arg:"an",arm:"hy",asm:"as",ava:"av",ave:"ae",aym:"ay",aze:"az",bak:"ba",bam:"bm",baq:"eu",bel:"be",ben:"bn",bih:"bh",bis:"bi",bod:"bo",bos:"bs",bre:"br",bul:"bg",bur:"my",cat:"ca",ces:"cs",cha:"ch",che:"ce",chi:"zh",chu:"cu",chv:"cv",cor:"kw",cos:"co",cre:"cr",cym:"cy",cze:"cs",dan:"da",deu:"de",div:"dv",dut:"nl",dzo:"dz",ell:"el",eng:"en",epo:"eo",est:"et",eus:"eu",ewe:"ee",fao:"fo",fas:"fa",fij:"fj",fin:"fi",fra:"fr",fre:"fr",
fry:"fy",ful:"ff",geo:"ka",ger:"de",gla:"gd",gle:"ga",glg:"gl",glv:"gv",gre:"el",grn:"gn",guj:"gu",hat:"ht",hau:"ha",heb:"he",her:"hz",hin:"hi",hmo:"ho",hrv:"hr",hun:"hu",hye:"hy",ibo:"ig",ice:"is",ido:"io",iii:"ii",iku:"iu",ile:"ie",ina:"ia",ind:"id",ipk:"ik",isl:"is",ita:"it",jav:"jv",jpn:"ja",kal:"kl",kan:"kn",kas:"ks",kat:"ka",kau:"kr",kaz:"kk",khm:"km",kik:"ki",kin:"rw",kir:"ky",kom:"kv",kon:"kg",kor:"ko",kua:"kj",kur:"ku",lao:"lo",lat:"la",lav:"lv",lim:"li",lin:"ln",lit:"lt",ltz:"lb",lub:"lu",
lug:"lg",mac:"mk",mah:"mh",mal:"ml",mao:"mi",mar:"mr",may:"ms",mkd:"mk",mlg:"mg",mlt:"mt",mon:"mn",mri:"mi",msa:"ms",mya:"my",nau:"na",nav:"nv",nbl:"nr",nde:"nd",ndo:"ng",nep:"ne",nld:"nl",nno:"nn",nob:"nb",nor:"no",nya:"ny",oci:"oc",oji:"oj",ori:"or",orm:"om",oss:"os",pan:"pa",per:"fa",pli:"pi",pol:"pl",por:"pt",pus:"ps",que:"qu",roh:"rm",ron:"ro",rum:"ro",run:"rn",rus:"ru",sag:"sg",san:"sa",sin:"si",slk:"sk",slo:"sk",slv:"sl",sme:"se",smo:"sm",sna:"sn",snd:"sd",som:"so",sot:"st",spa:"es",sqi:"sq",
srd:"sc",srp:"sr",ssw:"ss",sun:"su",swa:"sw",swe:"sv",tah:"ty",tam:"ta",tat:"tt",tel:"te",tgk:"tg",tgl:"tl",tha:"th",tib:"bo",tir:"ti",ton:"to",tsn:"tn",tso:"ts",tuk:"tk",tur:"tr",twi:"tw",uig:"ug",ukr:"uk",urd:"ur",uzb:"uz",ven:"ve",vie:"vi",vol:"vo",wel:"cy",wln:"wa",wol:"wo",xho:"xh",yid:"yi",yor:"yo",zha:"za",zho:"zh",zul:"zu"};function hd(b,c,d){var e=b.video;return e&&(e.width<c.minWidth||e.width>c.maxWidth||e.width>d.width||e.height<c.minHeight||e.height>c.maxHeight||e.height>d.height||e.width*e.height<c.minPixels||e.width*e.height>c.maxPixels)||b.bandwidth<c.minBandwidth||b.bandwidth>c.maxBandwidth?!1:!0}function id(b,c,d){var e=!1;b.variants.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=hd(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e}
function jd(b,c,d,e){e.variants=e.variants.filter(function(e){return b&&b.N&&!pc(b,e)?!1:kd(e.audio,b,c)&&kd(e.video,b,d)});e.textStreams=e.textStreams.filter(function(b){return!!J[Kb(b.mimeType,b.codecs)]})}
function kd(b,c,d){if(!b)return!0;var e=null;c&&c.N&&(e=c.u);c=Kb(b.mimeType,b.codecs);var f=Kb(b.mimeType,b.codecs),g=b.mimeType,h;for(h in Lb){var k=b[h],l=Lb[h];k&&(g+="; "+l+'="'+k+'"')}return!(J[f]||MediaSource.isTypeSupported(g)||Lc(f,b.type))||e&&b.encrypted&&0>e.indexOf(c)||d&&(b.mimeType!=d.mimeType||b.codecs.split(".")[0]!=d.codecs.split(".")[0])?!1:!0}
function ld(b){var c=b.audio,d=b.video,e=c?c.codecs:null,f=d?d.codecs:null,g=[];f&&g.push(f);e&&g.push(e);var h=[];d&&h.push(d.mimeType);c&&h.push(c.mimeType);h=h[0]||null;var k=[];c&&k.push(c.kind);d&&k.push(d.kind);k=k[0]||null;var l=[];c&&l.push.apply(l,c.roles);d&&l.push.apply(l,d.roles);l=fb(l);b={id:b.id,active:!1,type:"variant",bandwidth:b.bandwidth,language:b.language,label:null,kind:k,width:null,height:null,frameRate:null,mimeType:h,codecs:g.join(", "),audioCodec:e,videoCodec:f,primary:b.primary,
roles:l,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null};d&&(b.videoId=d.id,b.width=d.width||null,b.height=d.height||null,b.frameRate=d.frameRate||null,b.videoBandwidth=d.bandwidth||null);c&&(b.audioId=c.id,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||null,b.label=c.label);return b}
function md(b){return{id:b.id,active:!1,type:"text",bandwidth:0,language:b.language,label:b.label,kind:b.kind||null,width:null,height:null,frameRate:null,mimeType:b.mimeType,codecs:b.codecs||null,audioCodec:null,videoCodec:null,primary:b.primary,roles:b.roles,videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null}}function nd(b){var c=[],d=od(b.variants);b=b.textStreams;d.forEach(function(b){c.push(ld(b))});b.forEach(function(b){c.push(md(b))});return c}
function pd(b,c,d){return od(b.variants).map(function(b){var e=ld(b);b.video&&b.audio?e.active=d==b.video.id&&c==b.audio.id:b.video?e.active=d==b.video.id:b.audio&&(e.active=c==b.audio.id);return e})}function qd(b,c){return b.textStreams.map(function(b){var d=md(b);d.active=c==b.id;return d})}function rd(b,c){for(var d=0;d<b.variants.length;d++)if(b.variants[d].id==c.id)return b.variants[d];return null}function sd(b){return b.allowedByApplication&&b.allowedByKeySystem}
function od(b){return b.filter(function(b){return sd(b)})}function td(b,c,d,e,f){b=ud(b,c,d,f);return vd(b,e)}
function ud(b,c,d,e){var f=od(b),g=f;b=f.filter(function(b){return b.primary});b.length&&(g=b);var h=g.length?g[0].language:"";g=g.filter(function(b){return b.language==h});if(c){var k=fd(c);[ed,dd,0].forEach(function(b){var c=!1;f.forEach(function(d){k=fd(k);var f=fd(d.language);cd(b,k,f)&&(c?g.push(d):(g=[d],c=!0),e&&(e.audio=!0))})})}if(d&&(c=wd(g,d),c.length))return c;c=g.map(function(b){return(b.audio?b.audio.roles:[]).concat(b.video?b.video.roles:[])}).reduce(Ab,[]);return c.length?wd(g,c[0]):
g}function vd(b,c){var d=b.filter(function(b){return b.audio&&b.audio.channelsCount}).reduce(function(b,c){var d=c.audio.channelsCount;b[d]?b[d].push(c):b[d]=[c];return b},{}),e=Object.keys(d);if(0==e.length)return b;var f=e.filter(function(b){return b<=c});return f.length?d[Math.max.apply(null,f)]:d[Math.min.apply(null,e)]}
function xd(b,c,d,e){var f=b,g=b.filter(function(b){return b.primary});g.length&&(f=g);var h=f.length?f[0].language:"";f=f.filter(function(b){return b.language==h});if(c){var k=fd(c);[ed,dd,0].forEach(function(c){var d=!1;b.forEach(function(b){var g=fd(b.language);cd(c,k,g)&&(d?f.push(b):(f=[b],d=!0),e&&(e.text=!0))})})}if(d){if(c=yd(f,d),c.length)return c}else if(c=f.filter(function(b){return 0==b.roles.length}),c.length)return c;c=f.map(function(b){return b.roles}).reduce(Ab,[]);return c.length?
yd(f,c[0]):f}function wd(b,c){return b.filter(function(b){return b.audio&&0<=b.audio.roles.indexOf(c)||b.video&&0<=b.video.roles.indexOf(c)})}function yd(b,c){return b.filter(function(b){return 0<=b.roles.indexOf(c)})}function zd(b,c,d){for(var e=0;e<d.length;e++)if(d[e].audio==b&&d[e].video==c)return d[e];return null}function Ad(b,c,d){function e(b,c){return null==b?null==c:c.id==b}for(var f=0;f<d.length;f++)if(e(b,d[f].audio)&&e(c,d[f].video))return d[f];return null}
function Bd(b,c){for(var d=b.periods.length-1;0<d;--d)if(c+Gb>=b.periods[d].startTime)return d;return 0}function Cd(b,c){for(var d=0;d<b.periods.length;++d){var e=b.periods[d];if("text"==c.type)for(var f=0;f<e.textStreams.length;++f){if(e.textStreams[f]==c)return d}else for(f=0;f<e.variants.length;++f){var g=e.variants[f];if(g.audio==c||g.video==c||g.video&&g.video.trickModeVideo==c)return d}}return-1};function K(){this.h=null;this.f=!1;this.b=new Da;this.c=[];this.i=!1;this.a=this.g=null}x("shaka.abr.SimpleAbrManager",K);K.prototype.stop=function(){this.h=null;this.f=!1;this.c=[];this.g=null};K.prototype.stop=K.prototype.stop;K.prototype.init=function(b){this.h=b};K.prototype.init=K.prototype.init;
K.prototype.chooseVariant=function(){var b=Dd(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Dd(null,this.c),b=[b[0]]);for(var d=b[0]||null,e=0;e<b.length;++e){var f=b[e],g=(b[e+1]||{bandwidth:Infinity}).bandwidth/this.a.bandwidthUpgradeTarget;c>=f.bandwidth/this.a.bandwidthDowngradeTarget&&c<=g&&(d=f)}this.g=Date.now();return d};K.prototype.chooseVariant=K.prototype.chooseVariant;K.prototype.enable=function(){this.f=!0};
K.prototype.enable=K.prototype.enable;K.prototype.disable=function(){this.f=!1};K.prototype.disable=K.prototype.disable;K.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Ba(d.b,f,e);Ba(d.c,f,e)}if(null!=this.g&&this.f)a:{if(!this.i){if(!(128E3<=this.b.a))break a;this.i=!0}else if(Date.now()-this.g<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.h(d)}};
K.prototype.segmentDownloaded=K.prototype.segmentDownloaded;K.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};K.prototype.getBandwidthEstimate=K.prototype.getBandwidthEstimate;K.prototype.setVariants=function(b){this.c=b};K.prototype.setVariants=K.prototype.setVariants;K.prototype.configure=function(b){this.a=b};K.prototype.configure=K.prototype.configure;
function Dd(b,c){b&&(c=c.filter(function(c){return hd(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};var Ed="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Fd="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Gd=["loop","playbackRate"],Hd=["pause","play"],Id="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading".split(" "),Jd={drmInfo:20,getAudioLanguages:2,getAudioLanguagesAndRoles:2,
getBufferedInfo:2,getConfiguration:2,getExpiration:2,getManifestUri:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,usingEmbeddedTextTrack:2,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1},Nd={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Od=[["getConfiguration","configure"]],Pd=[["isTextTrackVisible","setTextTrackVisibility"]],Qd="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),
Rd=["attach","detach","load","unload"];
function Sd(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof F){var c={},f;for(f in d){var g=d[f];g&&"object"==typeof g?"detail"==f&&(c[f]=g):f in Event||(c[f]=g)}return c}if(d instanceof TimeRanges)for(c={__type__:"TimeRanges",length:d.length,start:[],end:[]},f=0;f<d.length;++f)c.start.push(d.start(f)),c.end.push(d.end(f));else c="number"==typeof d?isNaN(d)?"NaN":isFinite(d)?d:0>d?"-Infinity":"Infinity":d;return c}})}
function Td(b){return JSON.parse(b,function(b,d){return"NaN"==d?NaN:"-Infinity"==d?-Infinity:"Infinity"==d?Infinity:d&&"object"==typeof d&&"TimeRanges"==d.__type__?Ud(d):d})}function Ud(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function Vd(b,c,d,e,f,g){this.K=b;this.g=c;this.N=d;this.j=!1;this.A=e;this.H=f;this.u=g;this.b=this.h=!1;this.v="";this.i=null;this.l=this.Ac.bind(this);this.m=this.Pd.bind(this);this.a={video:{},player:{}};this.o=0;this.c={};this.f=null}var Wd=!1,Xd=null;n=Vd.prototype;n.destroy=function(){Yd(this);Xd&&Zd(this);this.H=this.A=this.g=null;this.b=this.h=!1;this.m=this.l=this.f=this.c=this.a=this.i=null;return Promise.resolve()};n.Z=function(){return this.b};n.Yb=function(){return this.v};
n.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.h=!0;this.g();var b=new chrome.cast.SessionRequest(this.K);b=new chrome.cast.ApiConfig(b,this.Bc.bind(this),this.Wd.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});Wd&&setTimeout(this.g.bind(this),20);(b=Xd)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.Bc(b):Xd=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
n.ac=function(b){this.i=b;this.b&&$d({type:"appData",appData:this.i})};n.cast=function(b){if(!this.h)return Promise.reject(new A(1,8,8E3));if(!Wd)return Promise.reject(new A(1,8,8001));if(this.b)return Promise.reject(new A(1,8,8002));this.f=new z;chrome.cast.requestSession(this.Vb.bind(this,b),this.zc.bind(this));return this.f};n.vb=function(){this.b&&(Yd(this),Xd&&(Zd(this),Xd.stop(function(){},function(){}),Xd=null))};
n.get=function(b,c){if("video"==b){if(0<=Hd.indexOf(c))return this.Lc.bind(this,b,c)}else if("player"==b){if(Nd[c]&&!this.get("player","isLive")())return function(){};if(0<=Qd.indexOf(c))return this.Lc.bind(this,b,c);if(0<=Rd.indexOf(c))return this.se.bind(this,b,c);if(Jd[c])return this.Ic.bind(this,b,c)}return this.Ic(b,c)};n.set=function(b,c,d){this.a[b][c]=d;$d({type:"set",targetName:b,property:c,value:d})};
n.Vb=function(b,c){Xd=c;c.addUpdateListener(this.l);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.m);this.Ac();$d({type:"init",initState:b,appData:this.i});this.f.resolve()};n.zc=function(b){var c=8003;switch(b.code){case "cancel":c=8004;break;case "timeout":c=8005;break;case "receiver_unavailable":c=8006}this.f.reject(new A(2,8,c,b))};n.Ic=function(b,c){return this.a[b][c]};n.Lc=function(b,c){$d({type:"call",targetName:b,methodName:c,args:Array.prototype.slice.call(arguments,2)})};
n.se=function(b,c){var d=Array.prototype.slice.call(arguments,2),e=new z,f=this.o.toString();this.o++;this.c[f]=e;$d({type:"asyncCall",targetName:b,methodName:c,args:d,id:f});return e};n.Bc=function(b){var c=this.u();this.f=new z;this.j=!0;this.Vb(c,b)};n.Wd=function(b){Wd="available"==b;this.g()};function Zd(b){var c=Xd;c.removeUpdateListener(b.l);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.m)}
n.Ac=function(){var b=Xd?"connected"==Xd.status:!1;if(this.b&&!b){this.H();for(var c in this.a)this.a[c]={};Yd(this)}this.v=(this.b=b)?Xd.receiver.friendlyName:"";this.g()};function Yd(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new A(1,7,7E3))}}
n.Pd=function(b,c){var d=Td(c);switch(d.type){case "event":var e=d.event;this.A(d.targetName,new F(e.type,e));break;case "update":e=d.update;for(var f in e){d=this.a[f]||{};for(var g in e[f])d[g]=e[f][g]}this.j&&(this.N(),this.j=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new A(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function $d(b){b=Sd(b);Xd.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Fa)};function L(){this.Db=new vb;this.lb=this}L.prototype.addEventListener=function(b,c){this.Db.push(b,c)};L.prototype.removeEventListener=function(b,c){this.Db.remove(b,c)};L.prototype.dispatchEvent=function(b){for(var c=this.Db.get(b.type)||[],d=0;d<c.length;++d){b.target=this.lb;b.currentTarget=this.lb;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function M(b,c,d){L.call(this);this.c=b;this.b=c;this.i=this.g=this.f=this.j=this.h=null;this.a=new Vd(d,this.Le.bind(this),this.Me.bind(this),this.Ne.bind(this),this.Oe.bind(this),this.rc.bind(this));ae(this)}za(M,L);x("shaka.cast.CastProxy",M);M.prototype.destroy=function(b){b&&this.a&&this.a.vb();b=[this.i?this.i.destroy():null,this.b?this.b.destroy():null,this.a?this.a.destroy():null];this.a=this.i=this.j=this.h=this.b=this.c=null;return Promise.all(b)};M.prototype.destroy=M.prototype.destroy;
M.prototype.Ad=function(){return this.h};M.prototype.getVideo=M.prototype.Ad;M.prototype.sd=function(){return this.j};M.prototype.getPlayer=M.prototype.sd;M.prototype.dd=function(){return this.a?this.a.h&&Wd:!1};M.prototype.canCast=M.prototype.dd;M.prototype.Z=function(){return this.a?this.a.Z():!1};M.prototype.isCasting=M.prototype.Z;M.prototype.Yb=function(){return this.a?this.a.Yb():""};M.prototype.receiverName=M.prototype.Yb;M.prototype.cast=function(){var b=this.rc();return this.a.cast(b).then(function(){if(this.b)return this.b.jb()}.bind(this))};
M.prototype.cast=M.prototype.cast;M.prototype.ac=function(b){this.a.ac(b)};M.prototype.setAppData=M.prototype.ac;M.prototype.Se=function(){var b=this.a;if(b.b){var c=b.u();chrome.cast.requestSession(b.Vb.bind(b,c),b.zc.bind(b))}};M.prototype.suggestDisconnect=M.prototype.Se;M.prototype.vb=function(){this.a.vb()};M.prototype.forceDisconnect=M.prototype.vb;
function ae(b){b.a.init();b.i=new D;Ed.forEach(function(b){E(this.i,this.c,b,this.$e.bind(this))}.bind(b));Id.forEach(function(b){E(this.i,this.b,b,this.le.bind(this))}.bind(b));b.h={};for(var c in b.c)Object.defineProperty(b.h,c,{configurable:!1,enumerable:!0,get:b.Ze.bind(b,c),set:b.af.bind(b,c)});b.j={};for(var d in b.b)Object.defineProperty(b.j,d,{configurable:!1,enumerable:!0,get:b.ke.bind(b,d)});b.f=new L;b.f.lb=b.h;b.g=new L;b.g.lb=b.j}n=M.prototype;
n.rc=function(){var b={video:{},player:{},playerAfterLoad:{},manifest:this.b.Kb(),startTime:null};this.c.pause();Gd.forEach(function(c){b.video[c]=this.c[c]}.bind(this));this.c.ended||(b.startTime=this.c.currentTime);Od.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.player[d]=c}.bind(this));Pd.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.playerAfterLoad[d]=c}.bind(this));return b};n.Le=function(){this.dispatchEvent(new F("caststatuschanged"))};
n.Me=function(){this.f.dispatchEvent(new F(this.h.paused?"pause":"play"))};
n.Oe=function(){var b=this;Od.forEach(function(b){var c=b[1];b=this.a.get("player",b[0])();this.b[c](b)}.bind(this));var c=this.a.get("player","getManifestUri")(),d=this.a.get("video","ended"),e=Promise.resolve(),f=this.c.autoplay,g=null;d||(g=this.a.get("video","currentTime"));c&&(this.c.autoplay=!1,e=this.b.load(c,g));var h={};Gd.forEach(function(b){h[b]=this.a.get("video",b)}.bind(this));e.then(function(){b.c&&(Gd.forEach(function(b){this.c[b]=h[b]}.bind(b)),Pd.forEach(function(b){var c=b[1];b=
this.a.get("player",b[0])();this.b[c](b)}.bind(b)),b.c.autoplay=f,c&&b.c.play())},function(c){b.b.dispatchEvent(new F("error",{detail:c}))})};n.Ze=function(b){if("addEventListener"==b)return this.f.addEventListener.bind(this.f);if("removeEventListener"==b)return this.f.removeEventListener.bind(this.f);if(this.a.Z()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a.Z()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
n.af=function(b,c){this.a.Z()?this.a.set("video",b,c):this.c[b]=c};n.$e=function(b){this.a.Z()||this.f.dispatchEvent(new F(b.type,b))};
n.ke=function(b){if("addEventListener"==b)return this.g.addEventListener.bind(this.g);if("removeEventListener"==b)return this.g.removeEventListener.bind(this.g);if("getMediaElement"==b)return function(){return this.h}.bind(this);if("getNetworkingEngine"==b)return this.b.sc.bind(this.b);if(this.a.Z()){if("getManifest"==b)return function(){Ea("getManifest() does not work while casting!");return null};if("attach"==b)return function(){Ea("attach() does not work while casting!");return Promise.resolve()};
if("detach"==b)return function(){Ea("detach() does not work while casting!");return Promise.resolve()}}return this.a.Z()&&0==Object.keys(this.a.a.video).length&&Jd[b]||!this.a.Z()?this.b[b].bind(this.b):this.a.get("player",b)};n.le=function(b){this.a.Z()||this.g.dispatchEvent(b)};n.Ne=function(b,c){this.a.Z()&&("video"==b?this.f.dispatchEvent(c):"player"==b&&this.g.dispatchEvent(c))};function be(b,c,d,e){L.call(this);this.a=b;this.b=c;this.c=new D;this.u={video:b,player:c};this.v=d||function(){};this.A=e||function(b){return b};this.o=!1;this.h=!0;this.g=0;this.m=!1;this.j=!0;this.l=this.i=this.f=null;ce(this)}za(be,L);x("shaka.cast.CastReceiver",be);be.prototype.isConnected=function(){return this.o};be.prototype.isConnected=be.prototype.isConnected;be.prototype.Dd=function(){return this.h};be.prototype.isIdle=be.prototype.Dd;
be.prototype.destroy=function(){var b=[this.c?this.c.destroy():null,this.b?this.b.destroy():null];null!=this.l&&window.clearTimeout(this.l);this.v=this.u=this.c=this.b=this.a=null;this.o=!1;this.h=!0;this.l=this.i=this.f=null;return Promise.all(b).then(function(){cast.receiver.CastReceiverManager.getInstance().stop()})};be.prototype.destroy=be.prototype.destroy;
function ce(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.Fc.bind(b);c.onSenderDisconnected=b.Fc.bind(b);c.onSystemVolumeChanged=b.kd.bind(b);b.i=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.i.onMessage=b.Kd.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.Zd.bind(b);c.start();Ed.forEach(function(b){E(this.c,this.a,b,this.Jc.bind(this,"video"))}.bind(b));Id.forEach(function(b){E(this.c,this.b,b,this.Jc.bind(this,"player"))}.bind(b));
cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.bc(3840,2160):b.b.bc(1920,1080);E(b.c,b.a,"loadeddata",function(){this.m=!0}.bind(b));E(b.c,b.b,"loading",function(){this.h=!1;de(this)}.bind(b));E(b.c,b.a,"playing",function(){this.h=!1;de(this)}.bind(b));E(b.c,b.a,"pause",function(){de(this)}.bind(b));E(b.c,b.b,"unloading",function(){this.h=!0;de(this)}.bind(b));E(b.c,b.a,"ended",function(){window.setTimeout(function(){this.a&&this.a.ended&&
(this.h=!0,de(this))}.bind(this),5E3)}.bind(b))}n=be.prototype;n.Fc=function(){this.g=0;this.j=!0;this.o=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;de(this)};function de(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new F("caststatuschanged")),ee(this)||fe(this,0))}.bind(b))}
function ge(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.v(d);d=Promise.resolve();var f=b.a.autoplay;c.manifest&&(b.a.autoplay=!1,d=b.b.load(c.manifest,c.startTime));d.then(function(){if(b.b){for(var d in c.video)b.a[d]=c.video[d];for(var e in c.playerAfterLoad)b.b[e](c.playerAfterLoad[e]);b.a.autoplay=f;c.manifest&&(b.a.play(),fe(b,0))}},function(c){b.b.dispatchEvent(new F("error",{detail:c}))})}n.Jc=function(b,c){this.b&&(this.Wb(),he(this,{type:"event",targetName:b,event:c},this.f))};
n.Wb=function(){null!=this.l&&window.clearTimeout(this.l);this.l=window.setTimeout(this.Wb.bind(this),500);var b={video:{},player:{}};Fd.forEach(function(c){b.video[c]=this.a[c]}.bind(this));if(this.b.P())for(var c in Nd)0==this.g%Nd[c]&&(b.player[c]=this.b[c]());for(var d in Jd)0==this.g%Jd[d]&&(b.player[d]=this.b[d]());if(c=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())b.video.volume=c.level,b.video.muted=c.muted;this.m&&(this.g+=1);he(this,{type:"update",update:b},this.f);ee(this)};
function ee(b){return b.j&&(b.a.duration||b.b.P())?(ie(b),b.j=!1,!0):!1}function ie(b){var c={contentId:b.b.Kb(),streamType:b.b.P()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};fe(b,0,c)}n.kd=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&he(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);he(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
n.Zd=function(b){var c=Td(b.data);switch(c.type){case "init":this.g=0;this.m=!1;this.j=!0;ge(this,c.initState,c.appData);this.Wb();break;case "appData":this.v(c.appData);break;case "set":var d=c.targetName,e=c.property;c=c.value;if("video"==d){var f=cast.receiver.CastReceiverManager.getInstance();if("volume"==e){f.setSystemVolumeLevel(c);break}else if("muted"==e){f.setSystemVolumeMuted(c);break}}this.u[d][e]=c;break;case "call":d=this.u[c.targetName];d[c.methodName].apply(d,c.args);break;case "asyncCall":d=
c.targetName;e=c.methodName;"player"==d&&"load"==e&&(this.g=0,this.m=!1);f=c.id;b=b.senderId;var g=this.u[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.j=!0}.bind(this)));c.then(this.Qc.bind(this,b,f,null),this.Qc.bind(this,b,f))}};
n.Kd=function(b){var c=Td(b.data);switch(c.type){case "PLAY":this.a.play();fe(this,0);break;case "PAUSE":this.a.pause();fe(this,0);break;case "SEEK":b=c.currentTime;var d=c.resumeState;null!=b&&(this.a.currentTime=Number(b));d&&"PLAYBACK_START"==d?(this.a.play(),fe(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),fe(this,0));break;case "STOP":this.b.jb().then(function(){this.b&&fe(this,0)}.bind(this));break;case "GET_STATUS":fe(this,Number(c.requestId));break;case "VOLUME":d=c.volume;b=d.level;d=
d.muted;var e=this.a.volume,f=this.a.muted;null!=b&&(this.a.volume=Number(b));null!=d&&(this.a.muted=d);e==this.a.volume&&f==this.a.muted||fe(this,0);break;case "LOAD":this.g=0;this.j=this.m=!1;b=c.currentTime;d=this.A(c.media.contentId);this.a.autoplay=!0;this.b.load(d,b).then(function(){this.b&&ie(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");he(this,{requestId:Number(c.requestId),type:d},this.i)}.bind(this));break;default:he(this,{requestId:Number(c.requestId),
type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}};n.Qc=function(b,c,d){this.b&&he(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function he(b,c,d,e){b.o&&(b=Sd(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
function fe(b,c,d){var e=b.a.playbackRate;var f=je;f=b.h?f.IDLE:b.b.vc()?f.Xc:b.a.paused?f.Zc:f.$c;e={mediaSessionId:0,playbackRate:e,playerState:f,currentTime:b.a.currentTime,supportedMediaCommands:15,volume:{level:b.a.volume,muted:b.a.muted}};d&&(e.media=d);he(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.i)}var je={IDLE:"IDLE",$c:"PLAYING",Xc:"BUFFERING",Zc:"PAUSED"};function ke(b,c){var d=N(b,c);return 1!=d.length?null:d[0]}function N(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})}function le(b){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&"pssh"==b.localName&&"urn:mpeg:cenc:2013"==b.namespaceURI})}function me(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null}
function ne(b){var c=b.firstChild;return c&&c.nodeType==Node.TEXT_NODE?b.textContent.trim():null}function O(b,c,d,e){var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?void 0!=e?e:null:f}function oe(b){if(!b)return null;/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(b)&&(b+="Z");b=Date.parse(b);return isNaN(b)?null:Math.floor(b/1E3)}
function pe(b){if(!b)return null;b=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(b);if(!b)return null;b=31536E3*Number(b[1]||null)+2592E3*Number(b[2]||null)+86400*Number(b[3]||null)+3600*Number(b[4]||null)+60*Number(b[5]||null)+Number(b[6]||null);return isFinite(b)?b:null}function qe(b){var c=/([0-9]+)-([0-9]+)/.exec(b);if(!c)return null;b=Number(c[1]);if(!isFinite(b))return null;c=Number(c[2]);return isFinite(c)?{start:b,end:c}:null}
function re(b){b=Number(b);return 0===b%1?b:null}function se(b){b=Number(b);return 0===b%1&&0<b?b:null}function te(b){b=Number(b);return 0===b%1&&0<=b?b:null}function ue(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1]/c[2]):Number(b);return isNaN(b)?null:b};var ve={"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"};
function we(b,c,d){b=xe(b);var e=null,f=[],g=[],h=b.map(function(b){return b.keyId}).filter(Cb);if(h.length&&1<h.filter(Db).length)throw new A(2,4,4010);d||(g=b.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.Pc?(e=b.init||e,!1):!0}),g.length&&(f=ye(e,c,g),0==f.length&&(f=[Fb("",e)])));!b.length||!d&&g.length||(f=G(ve).map(function(b){return Fb(b,e)}));var k=h[0]||null;k&&f.forEach(function(b){b.initData.forEach(function(b){b.keyId=k})});return{lc:k,ef:e,drmInfos:f,qc:!0}}
function ze(b,c,d,e){var f=we(b,c,e);if(d.qc){b=1==d.drmInfos.length&&!d.drmInfos[0].keySystem;c=0==f.drmInfos.length;if(0==d.drmInfos.length||b&&!c)d.drmInfos=f.drmInfos;d.qc=!1}else if(0<f.drmInfos.length&&(d.drmInfos=d.drmInfos.filter(function(b){return f.drmInfos.some(function(c){return c.keySystem==b.keySystem})}),0==d.drmInfos.length))throw new A(2,4,4008);return f.lc||d.lc}function ye(b,c,d){return d.map(function(d){var e=ve[d.Pc];return e?[Fb(e,d.init||b)]:c(d.node)||[]}).reduce(Ab,[])}
function xe(b){return b.map(function(b){var c=b.getAttribute("schemeIdUri"),e=me(b,"urn:mpeg:cenc:2013","default_KID"),f=le(b).map(ne);if(!c)return null;c=c.toLowerCase();if(e&&(e=e.replace(/-/g,"").toLowerCase(),0<=e.indexOf(" ")))throw new A(2,4,4009);var g=[];try{g=f.map(function(b){return{initDataType:"cenc",initData:Vb(b),keyId:null}})}catch(h){throw new A(2,4,4007);}return{node:b,Pc:c,keyId:e,init:0<g.length?g:null}}).filter(Cb)};function Ae(b,c,d,e,f){null!=f&&(f=Math.round(f));var g={RepresentationID:c,Number:d,Bandwidth:e,Time:f};return b.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,function(b,c,d,e){if("$$"==b)return"$";var f=g[c];if(null==f)return b;"RepresentationID"==c&&d&&(d=void 0);switch(e){case void 0:case "d":case "i":case "u":b=f.toString();break;case "o":b=f.toString(8);break;case "x":b=f.toString(16);break;case "X":b=f.toString(16).toUpperCase();break;default:b=f.toString()}d=
window.parseInt(d,10)||1;return Array(Math.max(0,d-b.length)+1).join("0")+b})}
function Be(b,c){var d=Ce(b,c,"timescale"),e=1;d&&(e=se(d)||1);d=Ce(b,c,"duration");(d=se(d||""))&&(d/=e);var f=Ce(b,c,"startNumber"),g=Number(Ce(b,c,"presentationTimeOffset"))||0,h=te(f||"");if(null==f||null==h)h=1;var k=De(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.L.duration||Infinity;k=N(k,"S");for(var m=[],r=0,t=0;t<k.length;++t){var u=k[t],y=O(u,"t",te),w=O(u,"d",te);u=O(u,"r",re);null!=y&&(y-=g);if(!w)break;y=null!=y?y:r;u=u||0;if(0>u)if(t+1<k.length){u=O(k[t+1],"t",te);if(null==u)break;
else if(y>=u)break;u=Math.ceil((u-y)/w)-1}else{if(Infinity==l)break;else if(y/f>=l)break;u=Math.ceil((l*f-y)/w)-1}0<m.length&&y!=r&&(m[m.length-1].end=y/f);for(var Ha=0;Ha<=u;++Ha)r=y+w,m.push({start:y/f,end:r/f,We:y}),y=r}f=m}return{timescale:e,R:d,Fa:h,da:g/e||0,hc:g,I:f}}function Ce(b,c,d){return[c(b.w),c(b.U),c(b.ba)].filter(Cb).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
function De(b,c,d){return[c(b.w),c(b.U),c(b.ba)].filter(Cb).map(function(b){return ke(b,d)}).reduce(function(b,c){return b||c})}function Ee(b,c){var d=new DOMParser;try{var e=H(b);var f=d.parseFromString(e,"text/xml")}catch(h){}if(f&&f.documentElement.tagName==c)var g=f.documentElement;return g&&0<g.getElementsByTagName("parsererror").length?null:g}
function Fe(b,c,d,e,f,g){for(var h=me(b,"http://www.w3.org/1999/xlink","href"),k=me(b,"http://www.w3.org/1999/xlink","actuate")||"onRequest",l=0;l<b.attributes.length;l++){var m=b.attributes[l];"http://www.w3.org/1999/xlink"==m.namespaceURI&&(b.removeAttributeNS(m.namespaceURI,m.localName),--l)}if(5<=g)return $a(new A(2,4,4028));if("onLoad"!=k)return $a(new A(2,4,4027));var r=Eb([e],[h]);return f.request(0,qb(r,c)).V(function(e){e=Ee(e.data,b.tagName);if(!e)return $a(new A(2,4,4001,h));for(;b.childNodes.length;)b.removeChild(b.childNodes[0]);
for(;e.childNodes.length;){var k=e.childNodes[0];e.removeChild(k);b.appendChild(k)}for(k=0;k<e.attributes.length;k++){var l=e.attributes[k].nodeName,m=e.getAttribute(l);b.setAttribute(l,m)}return Ge(b,c,d,r[0],f,g+1)})}
function Ge(b,c,d,e,f,g){g=g||0;if(me(b,"http://www.w3.org/1999/xlink","href")){var h=Fe(b,c,d,e,f,g);d&&(h=h.V(void 0,function(){return Ge(b,c,d,e,f,g)}));return h}for(h=0;h<b.childNodes.length;h++){var k=b.childNodes[h];k instanceof Element&&"urn:mpeg:dash:resolve-to-zero:2013"==me(k,"http://www.w3.org/1999/xlink","href")&&(b.removeChild(k),--h)}h=[];for(k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l.nodeType==Node.ELEMENT_NODE&&h.push(Ge(l,c,d,e,f,g))}return db(h).V(function(){return b})}
;function P(b,c,d){this.c=b;this.b=c;this.a=d}x("shaka.media.InitSegmentReference",P);P.prototype.Fb=function(){return this.c()};P.prototype.createUris=P.prototype.Fb;P.prototype.Lb=function(){return this.b};P.prototype.getStartByte=P.prototype.Lb;P.prototype.Jb=function(){return this.a};P.prototype.getEndByte=P.prototype.Jb;function Q(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}x("shaka.media.SegmentReference",Q);Q.prototype.W=function(){return this.position};
Q.prototype.getPosition=Q.prototype.W;Q.prototype.Mb=function(){return this.startTime};Q.prototype.getStartTime=Q.prototype.Mb;Q.prototype.od=function(){return this.endTime};Q.prototype.getEndTime=Q.prototype.od;Q.prototype.Fb=function(){return this.c()};Q.prototype.createUris=Q.prototype.Fb;Q.prototype.Lb=function(){return this.b};Q.prototype.getStartByte=Q.prototype.Lb;Q.prototype.Jb=function(){return this.a};Q.prototype.getEndByte=Q.prototype.Jb;function R(b,c){this.G=b;this.b=c==He;this.a=0}x("shaka.util.DataViewReader",R);var He=1;R.Endianness={bf:0,cf:He};R.prototype.ga=function(){return this.a<this.G.byteLength};R.prototype.hasMoreData=R.prototype.ga;R.prototype.W=function(){return this.a};R.prototype.getPosition=R.prototype.W;R.prototype.pd=function(){return this.G.byteLength};R.prototype.getLength=R.prototype.pd;R.prototype.ca=function(){try{var b=this.G.getUint8(this.a);this.a+=1;return b}catch(c){Ie()}};R.prototype.readUint8=R.prototype.ca;
R.prototype.eb=function(){try{var b=this.G.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Ie()}};R.prototype.readUint16=R.prototype.eb;R.prototype.C=function(){try{var b=this.G.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Ie()}};R.prototype.readUint32=R.prototype.C;R.prototype.Kc=function(){try{var b=this.G.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Ie()}};R.prototype.readInt32=R.prototype.Kc;
R.prototype.Sa=function(){try{if(this.b){var b=this.G.getUint32(this.a,!0);var c=this.G.getUint32(this.a+4,!0)}else c=this.G.getUint32(this.a,!1),b=this.G.getUint32(this.a+4,!1)}catch(d){Ie()}if(2097151<c)throw new A(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};R.prototype.readUint64=R.prototype.Sa;R.prototype.Ea=function(b){this.a+b>this.G.byteLength&&Ie();var c=new Uint8Array(this.G.buffer,this.G.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};R.prototype.readBytes=R.prototype.Ea;
R.prototype.F=function(b){this.a+b>this.G.byteLength&&Ie();this.a+=b};R.prototype.skip=R.prototype.F;R.prototype.Oc=function(b){this.a<b&&Ie();this.a-=b};R.prototype.rewind=R.prototype.Oc;R.prototype.seek=function(b){(0>b||b>this.G.byteLength)&&Ie();this.a=b};R.prototype.seek=R.prototype.seek;R.prototype.Xb=function(){for(var b=this.a;this.ga()&&0!=this.G.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.G.buffer,this.G.byteOffset+b,this.a-b);this.a+=1;return H(b)};
R.prototype.readTerminatedString=R.prototype.Xb;function Ie(){throw new A(2,3,3E3);};function S(){this.c=[];this.b=[];this.a=!1}x("shaka.util.Mp4Parser",S);S.prototype.D=function(b,c){var d=Je(b);this.c[d]=0;this.b[d]=c;return this};S.prototype.box=S.prototype.D;S.prototype.Y=function(b,c){var d=Je(b);this.c[d]=1;this.b[d]=c;return this};S.prototype.fullBox=S.prototype.Y;S.prototype.stop=function(){this.a=!0};S.prototype.stop=S.prototype.stop;
S.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new R(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.ga()&&!this.a;)this.Ab(0,d,c)};S.prototype.parse=S.prototype.parse;
S.prototype.Ab=function(b,c,d){var e=c.W(),f=c.C(),g=c.C();switch(f){case 0:f=c.G.byteLength-e;break;case 1:f=c.Sa()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.C(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.G.byteLength&&(g=c.G.byteLength);g-=c.W();c=0<g?c.Ea(g):new Uint8Array(0);c=new R(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({ra:this,Hc:d||!1,version:k,flags:l,s:c,size:f,start:e+b})}else c.F(e+f-c.W())};S.prototype.parseNext=S.prototype.Ab;
function T(b){for(;b.s.ga()&&!b.ra.a;)b.ra.Ab(b.start,b.s,b.Hc)}S.children=T;function Ke(b){for(var c=b.s.C();0<c&&!b.ra.a;--c)b.ra.Ab(b.start,b.s,b.Hc)}S.sampleDescription=Ke;function Le(b){return function(c){b(c.s.Ea(c.s.G.byteLength-c.s.W()))}}S.allData=Le;function Je(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}function Me(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}S.typeToString=Me;function Ne(b,c,d,e){var f,g=(new S).Y("sidx",function(b){f=Oe(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new A(2,3,3004);}
function Oe(b,c,d,e){var f=[];e.s.F(4);var g=e.s.C();if(0==g)throw new A(2,3,3005);if(0==e.version){var h=e.s.C();var k=e.s.C()}else h=e.s.Sa(),k=e.s.Sa();e.s.F(2);var l=e.s.eb();b=b+e.size+k;for(k=0;k<l;k++){var m=e.s.C(),r=(m&2147483648)>>>31;m&=2147483647;var t=e.s.C();e.s.F(4);if(1==r)throw new A(2,3,3006);f.push(new Q(f.length,h/g-c,(h+t)/g-c,function(){return d},b,b+m-1));h+=t;b+=m}e.ra.stop();return f};function U(b){this.a=b}x("shaka.media.SegmentIndex",U);U.prototype.destroy=function(){this.a=null;return Promise.resolve()};U.prototype.destroy=U.prototype.destroy;U.prototype.find=function(b){for(var c=this.a.length-1;0<=c;--c){var d=this.a[c];if(b>=d.startTime&&b<d.endTime)return d.position}return this.a.length&&b<this.a[0].startTime?this.a[0].position:null};U.prototype.find=U.prototype.find;
U.prototype.get=function(b){if(0==this.a.length)return null;b-=this.a[0].position;return 0>b||b>=this.a.length?null:this.a[b]};U.prototype.get=U.prototype.get;U.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};U.prototype.offset=U.prototype.offset;
U.prototype.Rb=function(b){for(var c=[],d=0,e=0;d<this.a.length&&e<b.length;){var f=this.a[d],g=b[e];f.startTime<g.startTime?(c.push(f),d++):(f.startTime>g.startTime?0==d&&c.push(g):(.1<Math.abs(f.endTime-g.endTime)?c.push(new Q(f.position,g.startTime,g.endTime,g.c,g.b,g.a)):c.push(f),d++),e++)}for(;d<this.a.length;)c.push(this.a[d++]);if(c.length)for(d=c[c.length-1].position+1;e<b.length;)f=b[e++],f=new Q(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};U.prototype.merge=U.prototype.Rb;
U.prototype.Hb=function(b){for(var c=0;c<this.a.length;++c)if(this.a[c].endTime>b){this.a.splice(0,c);return}this.a=[]};U.prototype.evict=U.prototype.Hb;function Pe(b,c){for(;b.a.length;)if(b.a[b.a.length-1].startTime>=c)b.a.pop();else break;for(;b.a.length;)if(0>=b.a[0].endTime)b.a.shift();else break;if(0!=b.a.length){var d=b.a[0];d.startTime<Gb&&(b.a[0]=new Q(d.position,0,d.endTime,d.c,d.b,d.a));d=b.a[b.a.length-1];b.a[b.a.length-1]=new Q(d.position,d.startTime,c,d.c,d.b,d.a)}};function Qe(b){this.b=b;this.a=new R(b,0);Re||(Re=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}var Re;Qe.prototype.ga=function(){return this.a.ga()};
function Se(b){var c=Te(b);if(7<c.length)throw new A(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=Te(b);a:{for(e=0;e<Re.length;e++)if(Yb(d,Re[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.W();else{if(8==d.length&&d[1]&224)throw new A(2,3,3001);e=d[0]&(1<<8-d.length)-1;for(var f=1;f<d.length;f++)e=256*e+d[f];d=e}d=b.a.W()+d<=b.b.byteLength?d:b.b.byteLength-b.a.W();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.W(),d);b.a.F(d);return new Ue(c,e)}
function Te(b){var c=b.a.ca(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new A(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.ca();return e}function Ue(b,c){this.id=b;this.a=c}function Ve(b){if(8<b.a.byteLength)throw new A(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new A(2,3,3001);for(var c=0,d=0;d<b.a.byteLength;d++){var e=b.a.getUint8(d);c=256*c+e}return c};function We(){}
We.prototype.parse=function(b,c,d,e){var f;c=new Qe(new DataView(c));if(440786851!=Se(c).id)throw new A(2,3,3008);var g=Se(c);if(408125543!=g.id)throw new A(2,3,3009);c=g.a.byteOffset;g=new Qe(g.a);for(f=null;g.ga();){var h=Se(g);if(357149030==h.id){f=h;break}}if(!f)throw new A(2,3,3010);g=new Qe(f.a);f=1E6;for(h=null;g.ga();){var k=Se(g);if(2807729==k.id)f=Ve(k);else if(17545==k.id)if(h=k,4==h.a.byteLength)h=h.a.getFloat32(0);else if(8==h.a.byteLength)h=h.a.getFloat64(0);else throw new A(2,3,3003);
}if(null==h)throw new A(2,3,3011);g=f/1E9;f=h*g;b=Se(new Qe(new DataView(b)));if(475249515!=b.id)throw new A(2,3,3007);return Xe(b,c,g,f,d,e)};function Xe(b,c,d,e,f,g){function h(){return f}var k=[];b=new Qe(b.a);for(var l=null,m=null;b.ga();){var r=Se(b);if(187==r.id){var t=Ye(r);t&&(r=d*t.Xe,t=c+t.re,null!=l&&k.push(new Q(k.length,l-g,r-g,h,m,t-1)),l=r,m=t)}}null!=l&&k.push(new Q(k.length,l-g,e-g,h,m,null));return k}
function Ye(b){var c=new Qe(b.a);b=Se(c);if(179!=b.id)throw new A(2,3,3013);b=Ve(b);c=Se(c);if(183!=c.id)throw new A(2,3,3012);c=new Qe(c.a);for(var d=0;c.ga();){var e=Se(c);if(241==e.id){d=Ve(e);break}}return{Xe:b,re:d}};function Ze(b,c){var d=De(b,c,"Initialization");if(!d)return null;var e=b.w.ea,f=d.getAttribute("sourceURL");f&&(e=Eb(b.w.ea,[f]));f=0;var g=null;if(d=O(d,"range",qe))f=d.start,g=d.end;return new P(function(){return e},f,g)}
function $e(b,c){var d=Number(Ce(b,af,"presentationTimeOffset"))||0,e=Ce(b,af,"timescale"),f=1;e&&(f=se(e)||1);d=d/f||0;e=Ze(b,af);var g=b.w.contentType;f=b.w.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new A(2,4,4006);if("webm"==f&&!e)throw new A(2,4,4005);g=De(b,af,"RepresentationIndex");var h=Ce(b,af,"indexRange"),k=b.w.ea;h=qe(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=Eb(b.w.ea,[l]));h=O(g,"range",qe,h)}if(!h)throw new A(2,4,4002);f=bf(b,c,e,k,h.start,h.end,f,d);
return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,da:d}}
function bf(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.Ja||!b.L.Nb,r=b.L.index,t=b.L.duration,u=c,y=null;return{createSegmentIndex:function(){var b=[u(e,f,g),"webm"==h?u(d.c(),d.b,d.a):null];u=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?Ne(c,f,e,k):(new We).parse(c,b,e,k);l.bb(c,0==r);y=new U(c);m&&Pe(y,t)})},findSegmentPosition:function(b){return y.find(b)},getSegmentReference:function(b){return y.get(b)}}}function af(b){return b.fb};function cf(b,c){var d=Ze(b,df);var e=ef(b);var f=Be(b,df),g=f.Fa;0==g&&(g=1);var h=0;f.R?h=f.R*(g-1):f.I&&0<f.I.length&&(h=f.I[0].start);e={R:f.R,startTime:h,Fa:g,da:f.da,I:f.I,Na:e};if(!e.R&&!e.I&&1<e.Na.length)throw new A(2,4,4002);if(!e.R&&!b.L.duration&&!e.I&&1==e.Na.length)throw new A(2,4,4002);if(e.I&&0==e.I.length)throw new A(2,4,4002);g=f=null;b.ba.id&&b.w.id&&(g=b.ba.id+","+b.w.id,f=c[g]);h=ff(b.L.duration,e.Fa,b.w.ea,e);f?(f.Rb(h),g=b.presentationTimeline.Za(),f.Hb(g-b.L.start)):(b.presentationTimeline.bb(h,
0==b.L.index),f=new U(h),g&&b.Ja&&(c[g]=f));b.Ja&&b.L.Nb||Pe(f,b.L.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,da:e.da}}function df(b){return b.ta}
function ff(b,c,d,e){var f=e.Na.length;e.I&&e.I.length!=e.Na.length&&(f=Math.min(e.I.length,e.Na.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.Na[k],m=Eb(d,[l.Fd]),r=void 0;r=null!=e.R?h+e.R:e.I?e.I[k].end:h+b;g.push(new Q(k+c,h,r,function(b){return b}.bind(null,m),l.start,l.end));h=r}return g}
function ef(b){return[b.w.ta,b.U.ta,b.ba.ta].filter(Cb).map(function(b){return N(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.uc&&(b.uc=!0);var d=c.getAttribute("media");c=O(c,"mediaRange",qe,{start:0,end:null});return{Fd:d,start:c.start,end:c.end}})};function gf(b,c,d,e){var f=hf(b);var g=Be(b,jf);var h=Ce(b,jf,"media"),k=Ce(b,jf,"index");g={R:g.R,timescale:g.timescale,Fa:g.Fa,da:g.da,hc:g.hc,I:g.I,Qb:h,ab:k};h=g.ab?1:0;h+=g.I?1:0;h+=g.R?1:0;if(0==h)throw new A(2,4,4002);1!=h&&(g.ab&&(g.I=null),g.R=null);if(!g.ab&&!g.Qb)throw new A(2,4,4002);if(g.ab){d=b.w.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new A(2,4,4006);if("webm"==d&&!f)throw new A(2,4,4005);e=Ae(g.ab,b.w.id,null,b.bandwidth||null,null);e=Eb(b.w.ea,[e]);b=bf(b,c,f,e,0,null,
d,g.da)}else g.R?(e||b.presentationTimeline.yb(g.R),b=kf(b,g)):(h=c=null,b.ba.id&&b.w.id&&(h=b.ba.id+","+b.w.id,c=d[h]),k=lf(b,g),e=!b.Ja||!b.L.Nb,c?(e&&Pe(new U(k),b.L.duration),c.Rb(k),d=b.presentationTimeline.Za(),c.Hb(d-b.L.start)):(b.presentationTimeline.bb(k,0==b.L.index),c=new U(k),h&&b.Ja&&(d[h]=c)),e&&Pe(c,b.L.duration),b={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:c.find.bind(c),getSegmentReference:c.get.bind(c)});return{createSegmentIndex:b.createSegmentIndex,
findSegmentPosition:b.findSegmentPosition,getSegmentReference:b.getSegmentReference,initSegmentReference:f,da:g.da}}function jf(b){return b.hb}
function kf(b,c){var d=b.L.duration,e=c.R,f=c.Fa,g=c.timescale,h=c.Qb,k=b.bandwidth||null,l=b.w.id,m=b.w.ea;return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0>b||d&&b>=d?null:Math.floor(b/e)},getSegmentReference:function(b){var c=b*e,r=c+e;d&&(r=Math.min(r,d));return 0>r||d&&c>=d?null:new Q(b,c,r,function(){var d=Ae(h,l,b+f,k,c*g);return Eb(m,[d])},0,null)}}}
function lf(b,c){for(var d=[],e=0;e<c.I.length;e++){var f=e+c.Fa;d.push(new Q(f,c.I[e].start,c.I[e].end,function(b,c,d,e,f,r){b=Ae(b,c,f,d,r);return Eb(e,[b]).map(function(b){return b.toString()})}.bind(null,c.Qb,b.w.id,b.bandwidth||null,b.w.ea,f,c.I[e].We+c.hc),0,null))}return d}function hf(b){var c=Ce(b,jf,"initialization");if(!c)return null;var d=b.w.id,e=b.bandwidth||null,f=b.w.ea;return new P(function(){var b=Ae(c,d,null,e,null);return Eb(f,[b])},0,null)};var mf={},nf={};x("shaka.media.ManifestParser.registerParserByExtension",function(b,c){nf[b]=c});x("shaka.media.ManifestParser.registerParserByMime",function(b,c){mf[b]=c});function of(){var b={},c;for(c in mf)b[c]=!0;for(var d in nf)b[d]=!0;["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(c){b[c]=!!mf[c]});["mpd","m3u8","ism"].forEach(function(c){b[c]=!!nf[c]});return b}
function pf(b,c,d,e){var f=e;f||(e=(new Ia(b)).aa.split("/").pop().split("."),1<e.length&&(e=e.pop().toLowerCase(),f=nf[e]));if(f)return Promise.resolve(f);d=qb([b],d);d.method="HEAD";return c.request(0,d).promise.then(function(c){(c=c.headers["content-type"])&&(c=c.toLowerCase());return(f=mf[c])?f:Promise.reject(new A(2,4,4E3,b))},function(b){b.severity=2;return Promise.reject(b)})};function V(b,c){this.f=b;this.l=c;this.c=this.b=Infinity;this.a=1;this.j=this.h=0;this.i=!0;this.g=0}x("shaka.media.PresentationTimeline",V);V.prototype.S=function(){return this.b};V.prototype.getDuration=V.prototype.S;V.prototype.ja=function(b){this.b=b};V.prototype.setDuration=V.prototype.ja;V.prototype.ud=function(){return this.f};V.prototype.getPresentationStartTime=V.prototype.ud;V.prototype.Rc=function(b){this.j=b};V.prototype.setClockOffset=V.prototype.Rc;
V.prototype.Bb=function(b){this.i=b};V.prototype.setStatic=V.prototype.Bb;V.prototype.cc=function(b){this.c=b};V.prototype.setSegmentAvailabilityDuration=V.prototype.cc;V.prototype.Sc=function(b){this.l=b};V.prototype.setDelay=V.prototype.Sc;V.prototype.bb=function(b,c){0!=b.length&&(c&&(this.h=Math.max(this.h,b[0].startTime)),this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a))};V.prototype.notifySegments=V.prototype.bb;
V.prototype.yb=function(b){this.a=Math.max(this.a,b)};V.prototype.notifyMaxSegmentDuration=V.prototype.yb;V.prototype.P=function(){return Infinity==this.b&&!this.i};V.prototype.isLive=V.prototype.P;V.prototype.Ba=function(){return Infinity!=this.b&&!this.i};V.prototype.isInProgress=V.prototype.Ba;V.prototype.Za=function(){if(Infinity==this.c)return this.g;var b=this.La()-this.c;return Math.max(this.g,b)};V.prototype.getSegmentAvailabilityStart=V.prototype.Za;V.prototype.Tc=function(b){this.g=b};
V.prototype.setUserSeekStart=V.prototype.Tc;V.prototype.La=function(){return this.P()||this.Ba()?Math.min(Math.max(0,(Date.now()+this.j)/1E3-this.a-this.f),this.b):this.b};V.prototype.getSegmentAvailabilityEnd=V.prototype.La;V.prototype.Ya=function(b){var c=Math.max(this.h,this.g);if(Infinity==this.c)return c;var d=this.La()-this.c;b=Math.min(d+b,this.la());return Math.max(c,b)};V.prototype.getSafeSeekRangeStart=V.prototype.Ya;V.prototype.Ka=function(){return this.Ya(0)};
V.prototype.getSeekRangeStart=V.prototype.Ka;V.prototype.la=function(){var b=this.P()||this.Ba()?this.l:0;return Math.max(0,this.La()-b)};V.prototype.getSeekRangeEnd=V.prototype.la;function qf(){this.a=this.b=null;this.h=[];this.c=null;this.j=[];this.i=1;this.l={};this.m=0;this.o=new Aa(5);this.g=null;this.f=new mb}x("shaka.dash.DashParser",qf);n=qf.prototype;n.configure=function(b){this.b=b};n.start=function(b,c){this.h=[b];this.a=c;return rf(this).then(function(b){this.a&&sf(this,b);return this.c}.bind(this))};n.stop=function(){this.b=this.a=null;this.h=[];this.c=null;this.j=[];this.l={};null!=this.g&&(window.clearTimeout(this.g),this.g=null);return this.f.destroy()};
n.update=function(){rf(this)["catch"](function(b){if(this.a)this.a.onError(b)}.bind(this))};n.onExpirationUpdated=function(){};function rf(b){var c=Date.now(),d=b.a.networkingEngine.request(0,qb(b.h,b.b.retryParameters));nb(b.f,d);return d.promise.then(function(c){if(b.a)return tf(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;Ba(b.o,1,d);return d})}
function tf(b,c,d){c=Ee(c,"MPD");if(!c)throw new A(2,4,4001,d);c=Ge(c,b.b.retryParameters,b.b.dash.xlinkFailGracefully,d,b.a.networkingEngine);nb(b.f,c);return c.promise.then(function(c){return uf(b,c,d)})}
function uf(b,c,d){d=[d];var e=N(c,"Location").map(ne).filter(Cb);0<e.length&&(d=b.h=e);e=N(c,"BaseURL").map(ne);d=Eb(d,e);var f=O(c,"minBufferTime",pe);b.m=O(c,"minimumUpdatePeriod",pe,-1);var g=O(c,"availabilityStartTime",oe);e=O(c,"timeShiftBufferDepth",pe);var h=O(c,"suggestedPresentationDelay",pe),k=O(c,"maxSegmentDuration",pe),l=c.getAttribute("type")||"static";if(b.c)var m=b.c.presentationTimeline;else{var r=Math.max(b.b.dash.defaultPresentationDelay,1.5*f);m=new V(g,null!=h?h:r)}g=vf(b,{Ja:"static"!=
l,presentationTimeline:m,ba:null,L:null,U:null,w:null,bandwidth:0,uc:!1},d,c);h=g.duration;var t=g.periods;m.Bb("static"==l);"static"!=l&&g.mc||m.ja(h||Infinity);m.cc(null!=e?e:Infinity);m.yb(k||1);if(b.c)return Promise.resolve();c=N(c,"UTCTiming");e=m.P();return wf(b,d,c,e).then(function(b){this.a&&(m.Rc(b),this.c={presentationTimeline:m,periods:t,offlineSessionIds:[],minBufferTime:f||0})}.bind(b))}
function vf(b,c,d,e){var f=O(e,"mediaPresentationDuration",pe),g=[],h=0;e=N(e,"Period");for(var k=0;k<e.length;k++){var l=e[k];h=O(l,"start",pe,h);var m=O(l,"duration",pe),r=null;if(k!=e.length-1){var t=O(e[k+1],"start",pe);null!=t&&(r=t-h)}else null!=f&&(r=f-h);null==r&&(r=m);l=xf(b,c,d,{start:h,duration:r,node:l,index:k,Nb:null==r||k==e.length-1});g.push(l);m=c.ba.id;-1==b.j.indexOf(m)&&(b.j.push(m),b.c&&(b.a.filterNewPeriod(l),b.c.periods.push(l)));if(null==r){h=null;break}h+=r}null==b.c&&b.a.filterAllPeriods(g);
return null!=f?{periods:g,duration:f,mc:!1}:{periods:g,duration:h,mc:!0}}
function xf(b,c,d,e){c.ba=yf(e.node,null,d);c.L=e;c.ba.id||(c.ba.id="__shaka_period_"+e.start);N(e.node,"EventStream").forEach(b.ie.bind(b,e.start,e.duration));d=N(e.node,"AdaptationSet").map(b.ge.bind(b,c)).filter(Cb);var f=d.map(function(b){return b.te}).reduce(Ab,[]),g=f.filter(Db);if(c.Ja&&f.length!=g.length)throw new A(2,4,4018);var h=d.filter(function(b){return!b.gc});d.filter(function(b){return b.gc}).forEach(function(b){var c=b.streams[0],d=b.gc;h.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=
c})})});d=zf(h,"video");f=zf(h,"audio");if(!d.length&&!f.length)throw new A(2,4,4004);f.length||(f=[null]);d.length||(d=[null]);c=[];for(g=0;g<f.length;g++)for(var k=0;k<d.length;k++)Af(b,f[g],d[k],c);b=zf(h,"text");d=[];for(f=0;f<b.length;f++)d.push.apply(d,b[f].streams);return{startTime:e.start,textStreams:d,variants:c}}function zf(b,c){return b.filter(function(b){return b.contentType==c})}
function Af(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<qc(f,g).length:1){g=qc(c.drmInfos,d.drmInfos);for(var h=0;h<c.streams.length;h++)for(var k=0;k<d.streams.length;k++)f=(d.streams[k].bandwidth||0)+(c.streams[h].bandwidth||0),f={id:b.i++,language:c.language,primary:c.Pb||d.Pb,audio:c.streams[h],video:d.streams[k],bandwidth:f,drmInfos:g,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}}else for(g=c||d,h=0;h<g.streams.length;h++)f=g.streams[h].bandwidth||
0,f={id:b.i++,language:g.language||"und",primary:g.Pb,audio:c?g.streams[h]:null,video:d?g.streams[h]:null,bandwidth:f,drmInfos:g.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0},e.push(f)}
n.ge=function(b,c){b.U=yf(c,b.ba,null);var d=!1,e=N(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter(Cb),g=void 0;"text"==b.U.contentType&&(g="subtitle");for(var h=0;h<e.length;h++){var k=e[h].getAttribute("schemeIdUri");if(null==k||"urn:mpeg:dash:role:2011"==k)switch(k=e[h].getAttribute("value"),k){case "main":d=!0;break;case "caption":case "subtitle":g=k}}var l=null,m=!1;N(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
l=b.getAttribute("value"):m=!0});if(m)return null;e=N(c,"ContentProtection");var r=we(e,this.b.dash.customScheme,this.b.dash.ignoreDrmInfo);e=fd(c.getAttribute("lang")||"und");k=c.getAttribute("label");h=N(c,"Representation");f=h.map(this.je.bind(this,b,r,g,e,k,d,f)).filter(function(b){return!!b});if(0==f.length)throw new A(2,4,4003);b.U.contentType&&"application"!=b.U.contentType||(b.U.contentType=Bf(f[0].mimeType,f[0].codecs),f.forEach(function(c){c.type=b.U.contentType}));f.forEach(function(b){r.drmInfos.forEach(function(c){b.keyId&&
c.keyIds.push(b.keyId)})});g=h.map(function(b){return b.getAttribute("id")}).filter(Cb);return{id:b.U.id||"__fake__"+this.i++,contentType:b.U.contentType,language:e,Pb:d,streams:f,drmInfos:r.drmInfos,gc:l,te:g}};
n.je=function(b,c,d,e,f,g,h,k){b.w=yf(k,b.U,null);if(!Cf(b.w))return null;b.bandwidth=O(k,"bandwidth",se)||0;var l=this.ue.bind(this);if(b.w.fb)l=$e(b,l);else if(b.w.ta)l=cf(b,this.l);else if(b.w.hb)l=gf(b,l,this.l,!!this.c);else{var m=b.w.ea,r=b.L.duration||0;l={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<r?1:null},getSegmentReference:function(b){return 1!=b?null:new Q(1,0,r,function(){return m},0,null)},initSegmentReference:null,da:0}}k=N(k,"ContentProtection");
k=ze(k,this.b.dash.customScheme,c,this.b.dash.ignoreDrmInfo);return{id:this.i++,createSegmentIndex:l.createSegmentIndex,findSegmentPosition:l.findSegmentPosition,getSegmentReference:l.getSegmentReference,initSegmentReference:l.initSegmentReference,presentationTimeOffset:l.da,mimeType:b.w.mimeType,codecs:b.w.codecs,frameRate:b.w.frameRate,bandwidth:b.bandwidth,width:b.w.width,height:b.w.height,kind:d,encrypted:0<c.drmInfos.length,keyId:k,language:e,label:f,type:b.U.contentType,primary:g,trickModeVideo:null,
containsEmsgBoxes:b.w.containsEmsgBoxes,roles:h,channelsCount:b.w.Tb}};n.Pe=function(){this.g=null;rf(this).then(function(b){this.a&&sf(this,b)}.bind(this))["catch"](function(b){this.a&&(b.severity=1,this.a.onError(b),sf(this,0))}.bind(this))};function sf(b,c){0>b.m||(b.g=window.setTimeout(b.Pe.bind(b),1E3*Math.max(3,b.m-c,Ca(b.o))))}
function yf(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",containsEmsgBoxes:!1,frameRate:void 0,Tb:null};d=d||c.ea;var e=N(b,"BaseURL").map(ne),f=b.getAttribute("contentType")||c.contentType,g=b.getAttribute("mimeType")||c.mimeType,h=b.getAttribute("codecs")||c.codecs,k=O(b,"frameRate",ue)||c.frameRate,l=!!N(b,"InbandEventStream").length,m=N(b,"AudioChannelConfiguration");m=Df(m)||c.Tb;f||(f=Bf(g,h));return{ea:Eb(d,e),fb:ke(b,"SegmentBase")||c.fb,ta:ke(b,"SegmentList")||c.ta,hb:ke(b,"SegmentTemplate")||
c.hb,width:O(b,"width",te)||c.width,height:O(b,"height",te)||c.height,contentType:f,mimeType:g,codecs:h,frameRate:k,containsEmsgBoxes:l||c.containsEmsgBoxes,id:b.getAttribute("id"),Tb:m}}
function Df(b){for(var c=0;c<b.length;++c){var d=b[c],e=d.getAttribute("schemeIdUri");if(e&&(d=d.getAttribute("value")))switch(e){case "urn:mpeg:dash:outputChannelPositionList:2012":return d.trim().split(/ +/).length;case "urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case "urn:dts:dash:audio_channel_configuration:2012":e=parseInt(d,10);if(!e)continue;return e;case "tag:dolby.com,2014:dash:audio_channel_configuration:2011":case "urn:dolby:dash:audio_channel_configuration:2011":if(e=parseInt(d,
16)){for(b=0;e;)e&1&&++b,e>>=1;return b}}}return null}function Cf(b){var c=b.fb?1:0;c+=b.ta?1:0;c+=b.hb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.fb&&(b.ta=null),b.hb=null);return!0}
function Ef(b,c,d,e){c=Eb(c,[d]);c=qb(c,b.b.retryParameters);c.method=e;c=b.a.networkingEngine.request(0,c);nb(b.f,c);return c.promise.then(function(b){if("HEAD"==e){if(!b.headers||!b.headers.date)return 0;b=b.headers.date}else b=H(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
function wf(b,c,d,e){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var f=b.b.dash.clockSyncUri;e&&!d.length&&f&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:f});return zb(d,function(b){var d=b.value;switch(b.scheme){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Ef(this,c,d,"HEAD");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":return Ef(this,
c,d,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return b=Date.parse(d),isNaN(b)?0:b-Date.now();case "urn:mpeg:dash:utc:http-ntp:2014":case "urn:mpeg:dash:utc:ntp:2014":case "urn:mpeg:dash:utc:sntp:2014":return Promise.reject();default:return Promise.reject()}}.bind(b))["catch"](function(){return 0})}
n.ie=function(b,c,d){var e=d.getAttribute("schemeIdUri")||"",f=d.getAttribute("value")||"",g=O(d,"timescale",te)||1;N(d,"Event").forEach(function(d){var h=O(d,"presentationTime",te)||0,l=O(d,"duration",te)||0;h=h/g+b;l=h+l/g;null!=c&&(h=Math.min(h,b+c),l=Math.min(l,b+c));d={schemeIdUri:e,value:f,startTime:h,endTime:l,id:d.getAttribute("id")||"",eventElement:d};this.a.onTimelineRegionAdded(d)}.bind(this))};
n.ue=function(b,c,d){b=qb(b,this.b.retryParameters);null!=c&&(b.headers.Range="bytes="+c+"-"+(null!=d?d:""));c=this.a.networkingEngine.request(1,b);nb(this.f,c);return c.promise.then(function(b){return b.data})};function Bf(b,c){return J[Kb(b,c)]?"text":b.split("/")[0]}nf.mpd=qf;mf["application/dash+xml"]=qf;function Ff(b,c,d,e){this.uri=b;this.type=c;this.a=d;this.segments=e||null}function Gf(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=e||null}Gf.prototype.toString=function(){function b(b){return b.name+'="'+b.value+'"'}return this.value?"#"+this.name+":"+this.value:0<this.a.length?"#"+this.name+":"+this.a.map(b).join(","):"#"+this.name};function Hf(b,c){this.name=b;this.value=c}Gf.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};
function If(b,c,d){d=d||null;return(b=b.getAttribute(c))?b.value:d}function Jf(b,c){this.a=c;this.uri=b};function Kf(b,c){return b.filter(function(b){return b.name==c})}function Lf(b,c){var d=Kf(b,c);return d.length?d[0]:null}function Mf(b,c,d){return b.filter(function(b){var e=b.getAttribute("TYPE");b=b.getAttribute("GROUP-ID");return e.value==c&&b.value==d})}function Nf(b,c){return Eb([b],[c])[0]};function Of(b){this.b=b;this.a=0}function Pf(b){Qf(b,/[ \t]+/gm)}function Qf(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,we:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.we}function Rf(b){return b.a==b.b.length?null:(b=Qf(b,/[^ \t\n]*/gm))?b[0]:null};function Sf(){this.a=0}
function Tf(b,c,d){c=H(c);c=c.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim();var e=c.split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(e[0]))throw new A(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!/^#(?!EXT)/m.test(e[f])){var g=Uf(b,e[f]);--b.a;if(0<=Vf.indexOf(g.name)){c=1;break}else"EXT-X-STREAM-INF"==g.name&&(f+=1)}f=[];for(g=1;g<e.length;)if(/^#(?!EXT)/m.test(e[g]))g+=1;else{var h=Uf(b,e[g]);if(0<=Wf.indexOf(h.name)){if(1!=c)throw new A(2,4,4017);e=e.splice(g,e.length-g);b=Xf(b,e,f);return new Ff(d,
c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==h.name&&(h.a.push(new Hf("URI",e[g])),g+=1)}return new Ff(d,c,f)}function Xf(b,c,d){var e=[],f=[];c.forEach(function(c){if(/^(#EXT)/.test(c))c=Uf(b,c),0<=Vf.indexOf(c.name)?d.push(c):f.push(c);else{if(/^#(?!EXT)/m.test(c))return[];e.push(new Jf(c.trim(),f));f=[]}});return e}
function Uf(b,c){a:{var d=b.a++;var e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new A(2,4,4016,c);var f=e[1],g=e[2];e=[];if(g&&0<=g.indexOf("=")){g=new Of(g);for(var h,k=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;h=Qf(g,k);)e.push(new Hf(h[1],h[2]||h[3]))}else if(g){d=new Gf(d,f,e,g);break a}d=new Gf(d,f,e)}return d}var Vf="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-MAP EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST".split(" "),Wf="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function Yf(b){try{var c=Yf.parse(b);return bb({uri:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return $a(d)}}x("shaka.net.DataUriPlugin",Yf);
Yf.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new A(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new A(2,1,1004,b);var d=c[0];c=window.decodeURIComponent(c.slice(1).join(","));d=d.split(";");var e=null;1<d.length&&(e=d[1]);if("base64"==e)b=Vb(c).buffer;else{if(e)throw new A(2,1,1005,b);b=Qb(c)}return{data:b,contentType:d[0]}};pb("data",Yf);function Zf(){this.h=this.c=null;this.K=1;this.v={};this.H={};this.T={};this.a={};this.b=null;this.l="";this.u=new Sf;this.j=this.i=null;this.f=$f;this.m=null;this.g=0;this.A=Infinity;this.o=new mb}x("shaka.hls.HlsParser",Zf);n=Zf.prototype;n.configure=function(b){this.h=b};n.start=function(b,c){this.c=c;this.l=b;return ag(this,b).then(function(c){return bg(this,c.data,b).then(function(){cg(this,this.i);return this.m}.bind(this))}.bind(this))};
n.stop=function(){this.h=this.c=null;this.v={};this.H={};this.m=null;return this.o.destroy()};n.update=function(){if(this.f!=dg.pa){var b=[],c;for(c in this.a)b.push(eg(this,this.a[c],c));return Promise.all(b)}};
function eg(b,c,d){ag(b,d).then(function(b){var e=dg,g=Tf(this.u,b.data,d);if(1!=g.type)throw new A(2,4,4017);b=Lf(g.a,"EXT-X-MEDIA-SEQUENCE");var h=c.stream;fg(this,g,b?Number(b.value):0,h.mimeType,h.codecs).then(function(b){c.gb.a=b;b=b[b.length-1];Lf(g.a,"EXT-X-ENDLIST")&&(hg(this,e.pa),this.b.ja(b.endTime))}.bind(this))}.bind(b))}n.onExpirationUpdated=function(){};
function bg(b,c,d){c=Tf(b.u,c,d);if(0!=c.type)throw new A(2,4,4022);return ig(b,c).then(function(b){this.c.filterAllPeriods([b]);var c=Infinity,d=0,e=0,k=Infinity;for(m in this.a){var l=this.a[m];c=Math.min(c,l.Sb);d=Math.max(d,l.Sb);e=Math.max(e,l.Ed);"text"!=l.stream.type&&(k=Math.min(k,l.duration))}var m=null;l=0;this.f!=dg.pa&&(m=Date.now()/1E3-e,l=3*this.g);this.b=new V(m,l);this.b.Bb(this.f==dg.pa);this.b.yb(this.g);if(this.f!=dg.pa){c=3*this.g;this.b.Sc(c);this.i=this.A;this.f==dg.ic&&this.b.cc(c);
for(c=0;95443.7176888889<=d;)c+=95443.7176888889,d-=95443.7176888889;if(c)for(var r in this.a)d=this.a[r],95443.7176888889>d.Sb&&(d.stream.presentationTimeOffset=-c,d.gb.offset(c))}else{this.b.ja(k);for(var t in this.a)r=this.a[t],r.stream.presentationTimeOffset=c,r.gb.offset(-c),Pe(r.gb,k)}this.m={presentationTimeline:this.b,periods:[b],offlineSessionIds:[],minBufferTime:0}}.bind(b))}
function ig(b,c){var d=c.a,e=Kf(c.a,"EXT-X-MEDIA").filter(function(b){return"SUBTITLES"==jg(b,"TYPE")}.bind(b)).map(function(b){return kg(this,b)}.bind(b));return Promise.all(e).then(function(b){var e=Kf(d,"EXT-X-STREAM-INF").map(function(b){return lg(this,b,c)}.bind(this));return Promise.all(e).then(function(c){return{startTime:0,variants:c.reduce(Ab,[]),textStreams:b}}.bind(this))}.bind(b))}
function lg(b,c,d){var e=If(c,"CODECS","avc1.42E01E,mp4a.40.2").split(","),f=c.getAttribute("RESOLUTION"),g=null,h=null,k=If(c,"FRAME-RATE"),l=Number(jg(c,"BANDWIDTH"));if(f){var m=f.value.split("x");g=m[0];h=m[1]}d=Kf(d.a,"EXT-X-MEDIA");var r=If(c,"AUDIO"),t=If(c,"VIDEO");r?d=Mf(d,"AUDIO",r):t&&(d=Mf(d,"VIDEO",t));if(m=mg("text",e)){var u=If(c,"SUBTITLES");u&&(u=Mf(d,"SUBTITLES",u),u.length&&(b.v[u[0].id].stream.codecs=m));e.splice(e.indexOf(m),1)}d=d.map(function(b){return ng(this,b,e)}.bind(b));
var y=[],w=[];return Promise.all(d).then(function(b){r?y=b:t&&(w=b);b=!1;if(y.length||w.length)if(y.length)if(jg(c,"URI")==y[0].$b){var d="audio";b=!0}else d="video";else d="audio";else 1==e.length?(d=mg("video",e),d=f||k||d?"video":"audio"):(d="video",e=[e.join(",")]);return b?Promise.resolve():og(this,c,e,d)}.bind(b)).then(function(b){b&&("audio"==b.stream.type?y=[b]:w=[b]);w&&pg(w);y&&pg(y);return qg(this,y,w,l,g,h,k)}.bind(b))}
function pg(b){b.forEach(function(b){var c=b.stream.codecs.split(",");c=c.filter(function(b){return"mp4a.40.34"!=b});b.stream.codecs=c.join(",")})}
function qg(b,c,d,e,f,g,h){d.forEach(function(b){if(b=b.stream)b.width=Number(f)||void 0,b.height=Number(g)||void 0,b.frameRate=Number(h)||void 0}.bind(b));c.length||(c=[null]);d.length||(d=[null]);for(var k=[],l=0;l<c.length;l++)for(var m=0;m<d.length;m++){var r=c[l]?c[l].stream:null,t=d[m]?d[m].stream:null,u=c[l]?c[l].drmInfos:null,y=d[m]?d[m].drmInfos:null,w=void 0;if(r&&t)if(u.length&&y.length?0<qc(u,y).length:1)w=qc(u,y);else continue;else r?w=u:t&&(w=y);u=(d[l]?d[l].$b:"")+" - "+(c[l]?c[l].$b:
"");b.H[u]||(r=rg(b,r,t,e,w),k.push(r),b.H[u]=r)}return k}function rg(b,c,d,e,f){return{id:b.K++,language:c?c.language:"und",primary:!!c&&c.primary||!!d&&d.primary,audio:c,video:d,bandwidth:e,drmInfos:f,allowedByApplication:!0,allowedByKeySystem:!0}}function kg(b,c){jg(c,"TYPE");return ng(b,c,[]).then(function(b){return b.stream})}
function ng(b,c,d){var e=jg(c,"URI");e=Nf(b.l,e);if(b.a[e])return Promise.resolve(b.a[e]);var f=jg(c,"TYPE").toLowerCase();"subtitles"==f&&(f="text");var g=fd(If(c,"LANGUAGE","und")),h=If(c,"NAME"),k=c.getAttribute("DEFAULT"),l=c.getAttribute("AUTOSELECT"),m=If(c,"CHANNELS");return sg(b,e,d,f,g,!!k||!!l,h,"audio"==f?tg(m):null).then(function(b){if(this.a[e])return this.a[e];this.v[c.id]=b;return this.a[e]=b}.bind(b))}function tg(b){if(!b)return null;b=b.split("/")[0];return parseInt(b,10)}
function og(b,c,d,e){var f=jg(c,"URI");f=Nf(b.l,f);return b.a[f]?Promise.resolve(b.a[f]):sg(b,f,d,e,"und",!1,null,null).then(function(b){return this.a[f]?this.a[f]:this.a[f]=b}.bind(b))}
function sg(b,c,d,e,f,g,h,k){var l=c;c=Nf(b.l,c);var m,r="",t;return ag(b,c).then(function(b){m=Tf(this.u,b.data,c);if(1!=m.type)throw new A(2,4,4017);b=m;var f=dg,g=Lf(b.a,"EXT-X-PLAYLIST-TYPE"),h=Lf(b.a,"EXT-X-ENDLIST");h=g&&"VOD"==g.value||h;g=g&&"EVENT"==g.value&&!h;g=!h&&!g;h?hg(this,f.pa):(g?hg(this,f.ic):hg(this,f.Yc),b=ug(b.a,"EXT-X-TARGETDURATION"),b=Number(b.value),this.g=Math.max(b,this.g),this.A=Math.min(b,this.A));if(1==d.length)r=d[0];else if(b=mg(e,d),null!=b)r=b;else throw new A(2,
4,4025,d);return vg(this,e,r,m)}.bind(b)).then(function(b){t=b;b=Lf(m.a,"EXT-X-MEDIA-SEQUENCE");return fg(this,m,b?Number(b.value):0,t,r)}.bind(b)).then(function(b){var c=b[0].startTime,d=b[b.length-1].endTime,u=d-c;b=new U(b);var Wa=wg(m),gg=void 0;"text"==e&&(gg="subtitle");var Kd=[];m.segments.forEach(function(b){b=Kf(b.a,"EXT-X-KEY");Kd.push.apply(Kd,b)});var Ld=!1,Md=[],Mb=null;Kd.forEach(function(b){if("NONE"!=jg(b,"METHOD")){Ld=!0;var c=jg(b,"KEYFORMAT");if(b=(c=xg[c])?c(b):null)b.keyIds.length&&
(Mb=b.keyIds[0]),Md.push(b)}});if(Ld&&!Md.length)throw new A(2,4,4026);Wa={id:this.K++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:b.find.bind(b),getSegmentReference:b.get.bind(b),initSegmentReference:Wa,presentationTimeOffset:0,mimeType:t,codecs:r,kind:gg,encrypted:Ld,keyId:Mb,language:f,label:h||null,type:e,primary:g,trickModeVideo:null,containsEmsgBoxes:!1,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k};this.T[Wa.id]=b;return{stream:Wa,
gb:b,drmInfos:Md,$b:l,Sb:c,Ed:d,duration:u}}.bind(b))}function wg(b){var c=Kf(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new A(2,4,4020);c=c[0];var d=jg(c,"URI"),e=Nf(b.uri,d);b=0;d=null;if(c=If(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new P(function(){return[e]},b,d)}
function yg(b,c,d,e,f){var g=d.a,h=Nf(b.uri,d.uri);b=ug(g,"EXTINF").value.split(",");b=f+Number(b[0]);d=0;var k=null;if(g=Lf(g,"EXT-X-BYTERANGE"))d=g.value.split("@"),g=Number(d[0]),d=d[1]?Number(d[1]):c.a+1,k=d+g-1;return new Q(e,f,b,function(){return[h]},d,k)}
function fg(b,c,d,e,f){var g=c.segments,h=[],k=Nf(c.uri,g[0].uri),l=yg(c,null,g[0],d,0),m=wg(c);return zg(b,c.uri,m,l,e,f).then(function(b){k.split("/").pop();for(var e=0;e<g.length;++e){var f=h[h.length-1];f=yg(c,f,g[e],d+e,0==e?b:f.endTime);h.push(f)}return h}.bind(b))}
function Ag(b,c){var d=b.c.networkingEngine,e=qb(c.c(),b.h.retryParameters),f={},g=c.b;f.Range="bytes="+g+"-"+(g+2048-1);var h={};if(0!=g||null!=c.a)g="bytes="+g+"-",null!=c.a&&(g+=c.a),h.Range=g;e.headers=f;f=d.request(1,e);nb(b.o,f);return f.promise["catch"](function(){Ea("Unable to fetch a partial HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",e.uris[0]);e.headers=h;return d.request(1,e)})}
function zg(b,c,d,e,f,g){if(b.m&&(c=b.a[c].gb.get(e.position)))return Promise.resolve(c.startTime);e=[Ag(b,e)];if("video/mp4"==f||"audio/mp4"==f)d?e.push(Ag(b,d)):e.push(e[0]);return Promise.all(e).then(function(b){if("video/mp4"==f||"audio/mp4"==f)return Bg(b[0].data,b[1].data);if("audio/mpeg"==f)return 0;if("video/mp2t"==f)return Cg(b[0].data);if("application/mp4"==f||0==f.indexOf("text/")){b=b[0].data;var c=Kb(f,g);if(J[c]){var d=new Oc(null);d.f=new J[c];b=d.Mb(b)}else b=0;return b}throw new A(2,
4,4030);}.bind(b))}function Bg(b,c){var d=0;(new S).D("moov",T).D("trak",T).D("mdia",T).Y("mdhd",function(b){b.s.F(0==b.version?8:16);d=b.s.C();b.ra.stop()}).parse(c,!0);if(!d)throw new A(2,4,4030);var e=0,f=!1;(new S).D("moof",T).D("traf",T).Y("tfdt",function(b){e=(0==b.version?b.s.C():b.s.Sa())/d;f=!0;b.ra.stop()}).parse(b,!0);if(!f)throw new A(2,4,4030);return e}
function Cg(b){function c(){throw new A(2,4,4030);}b=new R(new DataView(b),0);for(var d=0,e=0;;)if(d=b.W(),e=b.ca(),71!=e&&c(),b.eb()&16384||c(),e=(b.ca()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.ca(),b.F(e)),1!=b.C()>>8)b.seek(d+188),e=b.ca(),71!=e&&(b.seek(d+192),e=b.ca()),71!=e&&(b.seek(d+204),e=b.ca()),71!=e&&c(),b.Oc(1);else return b.F(3),d=b.ca()>>6,0!=d&&1!=d||c(),0==b.ca()&&c(),d=b.ca(),e=b.eb(),b=b.eb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
function mg(b,c){for(var d=Dg[b],e=0;e<d.length;e++)for(var f=0;f<c.length;f++)if(d[e].test(c[f].trim()))return c[f].trim();return"text"==b?"":null}
function vg(b,c,d,e){e=Nf(e.uri,e.segments[0].uri);var f=(new Ia(e)).aa.split(".").pop(),g=Eg[c][f];if(g)return Promise.resolve(g);if("text"==c)return d&&"vtt"!=d?Promise.resolve("application/mp4"):Promise.resolve("text/vtt");c=qb([e],b.h.retryParameters);c.method="HEAD";c=b.c.networkingEngine.request(1,c);nb(b.o,c);return c.promise.then(function(b){b=b.headers["content-type"];if(!b)throw new A(2,4,4021,f);return b.split(";")[0]})}
function jg(b,c){var d=b.getAttribute(c);if(!d)throw new A(2,4,4023,c);return d.value}function ug(b,c){var d=Lf(b,c);if(!d)throw new A(2,4,4024,c);return d}function ag(b,c){var d=b.c.networkingEngine.request(0,qb([c],b.h.retryParameters));nb(b.o,d);return d.promise}
var Dg={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Eg={audio:{mp4:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",ts:"video/mp2t"},video:{mp4:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"}};
Zf.prototype.N=function(){this.c&&(this.j=null,this.update().then(function(){cg(this,this.i)}.bind(this))["catch"](function(b){this.c&&(b.severity=1,this.c.onError(b),cg(this,0))}.bind(this)))};function cg(b,c){null!=b.i&&null!=c&&(b.j=window.setTimeout(b.N.bind(b),1E3*c))}function hg(b,c){b.f=c;b.b&&b.b.Bb(b.f==dg.pa);b.f==dg.pa&&null!=b.j&&(window.clearTimeout(b.j),b.j=null,b.i=null)}
var xg={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=jg(b,"METHOD");if("SAMPLE-AES-CENC"!=c&&"SAMPLE-AES-CTR"!=c)return null;c=jg(b,"URI");c=Yf.parse(c);c=new Uint8Array(c.data);c=Fb("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=If(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},$f="VOD",dg={pa:$f,Yc:"EVENT",ic:"LIVE"};nf.m3u8=Zf;mf["application/x-mpegurl"]=Zf;mf["application/vnd.apple.mpegurl"]=Zf;function Fg(b,c,d,e){this.a=b;this.u=c;this.o=d;this.v=e;this.h=new D;this.b=null;this.g=!1;this.m=b.readyState;this.c=!1;this.j=this.A=-1;this.f=this.i=!1;c=this.l.bind(this);E(this.h,b,"waiting",c);this.b=new Rb(c);Tb(this.b,.25)}Fg.prototype.destroy=function(){var b=this.h.destroy();this.v=this.u=this.a=this.h=null;null!=this.b&&(this.b.cancel(),this.b=null);return b};Fg.prototype.cb=function(){this.f=!0;this.l()};
Fg.prototype.l=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.g)return}else this.g=!1;if(!this.a.paused){this.a.readyState!=this.m&&(this.c=!1,this.m=this.a.readyState);var b=this.o.smallGapLimit,c=this.a.currentTime,d=this.a.buffered;a:{if(d&&d.length&&!(1==d.length&&1E-6>d.end(0)-d.start(0))){var e=.1;/(Edge\/|Trident\/|Tizen)/.test(navigator.userAgent)&&(e=.5);for(var f=0;f<d.length;f++)if(d.start(f)>c&&(0==f||d.end(f-1)-c<=e)){e=f;break a}}e=null}if(null==e){if(d=this.a.currentTime,
c=this.a.buffered,3>this.a.readyState&&0<this.a.playbackRate)if(this.j!=d)this.j=d,this.A=Date.now(),this.i=!1;else if(!this.i&&this.A<Date.now()-1E3)for(e=0;e<c.length;e++)if(d>=c.start(e)&&d<c.end(e)-.5){this.a.currentTime+=.1;this.j=this.a.currentTime;this.i=!0;break}}else if(0!=e||this.f){f=d.start(e);var g=this.u.presentationTimeline.la();if(!(f>=g)){g=f-c;b=g<=b;var h=!1;.001>g||(b||this.c||(this.c=!0,c=new F("largegap",{currentTime:c,gapSize:g}),c.cancelable=!0,this.v(c),this.o.jumpLargeGaps&&
!c.defaultPrevented&&(h=!0)),!b&&!h)||(0!=e&&d.end(e-1),this.a.currentTime=f)}}}}};function Gg(b,c,d){this.a=b;this.i=c;this.h=d;this.c=new D;this.f=1;this.g=!1;this.b=null;0<b.readyState?this.Dc():yb(this.c,b,"loadedmetadata",this.Dc.bind(this));E(this.c,b,"ratechange",this.Vd.bind(this))}n=Gg.prototype;n.destroy=function(){var b=this.c.destroy();this.c=null;null!=this.b&&(this.b.cancel(),this.b=null);this.i=this.a=null;return b};function Hg(b){return 0<b.a.readyState?b.a.currentTime:b.h}function Ig(b,c){0<b.a.readyState?Jg(b,b.a.currentTime,c):(b.h=c,setTimeout(b.i,0))}n.Xa=function(){return this.f};
function Kg(b,c){null!=b.b&&(b.b.cancel(),b.b=null);b.f=c;b.a.playbackRate=b.g||0>c?0:c;!b.g&&0>c&&(b.b=new Rb(function(){b.a.currentTime+=c/4}),Tb(b.b,.25))}n.Vd=function(){var b=this.g||0>this.f?0:this.f;this.a.playbackRate&&this.a.playbackRate!=b&&Kg(this,this.a.playbackRate)};n.Dc=function(){.001>Math.abs(this.a.currentTime-this.h)?this.Ec():(yb(this.c,this.a,"seeking",this.Ec.bind(this)),this.a.currentTime=0==this.a.currentTime?this.h:this.a.currentTime)};
n.Ec=function(){var b=this;E(this.c,this.a,"seeking",function(){return b.i()})};function Jg(b,c,d){function e(){!b.a||10<=f++||b.a.currentTime!=c||(b.a.currentTime=d,setTimeout(e,100))}b.a.currentTime=d;var f=0;setTimeout(e,100)};function Lg(b,c,d,e,f,g){this.c=b;this.b=c;this.h=d;this.i=f;this.f=null;this.g=new Fg(b,c,d,g);c=this.Xd.bind(this);d=this.b.presentationTimeline;null==e?e=Infinity>d.S()?d.Ka():d.la():0>e&&(e=d.la()+e);e=Mg(this,Ng(this,e));this.a=new Gg(b,c,e);this.f=new Rb(this.Ud.bind(this));Tb(this.f,.25)}n=Lg.prototype;n.destroy=function(){var b=Promise.all([this.a.destroy(),this.g.destroy()]);this.g=this.a=null;null!=this.f&&(this.f.cancel(),this.f=null);this.i=this.h=this.b=this.c=null;return b};
function Og(b){var c=Hg(b.a);0<b.c.readyState&&(b.c.paused||(c=Ng(b,c)));return c}n.Xa=function(){return this.a.Xa()};n.cb=function(){this.g.cb()};n.Ud=function(){if(0!=this.c.readyState&&!this.c.paused){var b=this.c.currentTime,c=this.b.presentationTimeline,d=c.Ka();c=c.la();3>c-d&&(d=c-3);b<d&&(b=Pg(this,b),this.c.currentTime=b)}};n.Xd=function(){var b=this.g;b.g=!0;b.f=!1;b.c=!1;b=Hg(this.a);var c=Pg(this,b);.001<Math.abs(c-b)?Ig(this.a,c):this.i()};
function Mg(b,c){var d=b.b.presentationTimeline.S();return c>=d?d-b.h.durationBackoff:c}function Pg(b,c){var d=sc.bind(null,b.c.buffered),e=Math.max(b.b.minBufferTime||0,b.h.rebufferingGoal),f=b.b.presentationTimeline,g=f.Ka(),h=f.la(),k=f.S();3>h-g&&(g=h-3);var l=f.Ya(e),m=f.Ya(5);e=f.Ya(e+5);return c>=k?Mg(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}function Ng(b,c){var d=b.b.presentationTimeline.Ka();if(c<d)return d;d=b.b.presentationTimeline.la();return c>d?d:c};function Qg(b,c,d,e,f,g,h){this.a=b;this.v=c;this.g=d;this.u=e;this.l=f;this.h=g;this.A=h;this.c=[];this.j=new D;this.b=!1;this.i=-1;this.f=null;Rg(this)}Qg.prototype.destroy=function(){var b=this.j?this.j.destroy():Promise.resolve();this.j=null;Sg(this);this.A=this.h=this.l=this.u=this.g=this.v=this.a=null;this.c=[];return b};
Qg.prototype.o=function(b){if(!this.c.some(function(c){return c.info.schemeIdUri==b.schemeIdUri&&c.info.startTime==b.startTime&&c.info.endTime==b.endTime})){var c={info:b,status:1};this.c.push(c);var d=new F("timelineregionadded",{detail:Tg(b)});this.h(d);this.m(!0,c)}};function Tg(b){var c=kb(b);c.eventElement=b.eventElement;return c}
Qg.prototype.m=function(b,c){var d=c.info.startTime>this.a.currentTime?1:c.info.endTime<this.a.currentTime?3:2,e=2==c.status,f=2==d;if(d!=c.status){if(!b||e||f)e||this.h(new F("timelineregionenter",{detail:Tg(c.info)})),f||this.h(new F("timelineregionexit",{detail:Tg(c.info)}));c.status=d}};function Rg(b){Sg(b);b.f=window.setTimeout(b.H.bind(b),250)}function Sg(b){b.f&&(window.clearTimeout(b.f),b.f=null)}
Qg.prototype.H=function(){this.f=null;Rg(this);var b=Bd(this.g,this.a.currentTime);b!=this.i&&(-1!=this.i&&this.A(),this.i=b);b=tc(this.a.buffered,this.a.currentTime);var c=rc(this.a.buffered),d=this.g.presentationTimeline,e=d.La();c=d.P()&&c>=e;d=this.v;d=d.g?"ended"==d.g.readyState:!0;c=c||this.a.ended||d;this.b?(d=Math.max(this.g.minBufferTime||0,this.u.rebufferingGoal),(c||b>=d)&&0!=this.b&&(this.b=!1,this.l(!1))):!c&&.5>b&&1!=this.b&&(this.b=!0,this.l(!0));this.c.forEach(this.m.bind(this,!1))};function Ug(b,c){this.a=c;this.b=b;this.h=null;this.j=1;this.m=Promise.resolve();this.g=[];this.i={};this.c={};this.o=!1;this.A=null;this.v=this.f=this.l=!1;this.u=0}n=Ug.prototype;n.destroy=function(){for(var b in this.c)Vg(this.c[b]);this.h=this.c=this.i=this.g=this.m=this.b=this.a=null;this.f=!0;return Promise.resolve()};
n.configure=function(b){this.h=b;this.A=new Xa({maxAttempts:Math.max(b.retryParameters.maxAttempts,2),baseDelay:b.retryParameters.baseDelay,backoffFactor:b.retryParameters.backoffFactor,fuzzFactor:b.retryParameters.fuzzFactor,timeout:0},!0)};n.init=function(){var b=Og(this.a.Qa);b=this.a.yc(this.b.periods[Bd(this.b,b)]);return b.variant||b.text?Wg(this,b).then(function(){!this.f&&this.a&&this.a.Ld&&this.a.Ld()}.bind(this)):Promise.reject(new A(2,5,5005))};
function W(b){var c=Og(b.a.Qa);return b.b.periods[Bd(b.b,c)]}function Xg(b){var c=b.c.video||b.c.audio;return c?b.b.periods[c.Ca]:null}function Yg(b){return Zg(b,"audio")}function $g(b){return Zg(b,"video")}function Zg(b,c){var d=b.c[c];return d?d.sa||d.stream:null}
function ah(b,c,d){Zc(b.a.J,"text");b.u++;b.v=!1;var e=b.u;return b.a.J.init({text:c},!1).then(function(){return bh(b,[c])}).then(function(){if(!b.f&&d&&b.u==e&&!b.c.text&&!b.v){var f=Og(b.a.Qa);b.c.text=ch(c,Bd(b.b,f));dh(b,b.c.text,0)}})}function eh(b){b.v=!0;b.c.text&&(Vg(b.c.text),delete b.c.text)}function fh(b,c){var d=b.c.video;if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.sa&&(gh(b,f,!1),d.sa=e)}else if(e=d.sa)d.sa=null,gh(b,e,!0)}}
function hh(b,c,d){c.video&&gh(b,c.video,d);c.audio&&gh(b,c.audio,d)}function gh(b,c,d){var e=b.c[c.type];if(!e&&"text"==c.type&&b.h.ignoreTextStreamFailures)ah(b,c,!0);else if(e){var f=Cd(b.b,c);d&&f!=e.Ca?ih(b):(e.sa&&(c.trickModeVideo?(e.sa=c,c=c.trickModeVideo):e.sa=null),(f=b.g[f])&&f.Ta&&(f=b.i[c.id])&&f.Ta&&e.stream!=c&&("text"==c.type&&Sc(b.a.J,Kb(c.mimeType,c.codecs)),e.stream=c,e.xb=!0,d&&(e.za?e.Cb=!0:e.Da?(e.va=!0,e.Cb=!0):(Vg(e),jh(b,e,!0)))))}}
function kh(b){var c=Og(b.a.Qa);Object.keys(b.c).every(function(b){var d=this.a.J;"text"==b?(b=d.a,b=c>=b.a&&c<b.b):(b=Uc(d,b),b=sc(b,c));return b}.bind(b))||ih(b)}function ih(b){for(var c in b.c){var d=b.c[c];d.za||d.va||(d.Da?d.va=!0:null==Tc(b.a.J,c)?null==d.ua&&dh(b,d,0):(Vg(d),jh(b,d,!1)))}}
function Wg(b,c,d){var e=Og(b.a.Qa),f=Bd(b.b,e),g={},h=[];c.variant&&c.variant.audio&&(g.audio=c.variant.audio,h.push(c.variant.audio));c.variant&&c.variant.video&&(g.video=c.variant.video,h.push(c.variant.video));c.text&&(g.text=c.text,h.push(c.text));return b.a.J.init(g,b.h.forceTransmuxTS).then(function(){if(!b.f){var c=b.b.presentationTimeline.S();Infinity>c?b.a.J.ja(c):b.a.J.ja(Math.pow(2,32));return bh(b,h)}}).then(function(){if(!b.f)for(var c in g){var e=g[c];b.c[c]||(b.c[c]=ch(e,f,d),dh(b,
b.c[c],0))}})}function ch(b,c,d){return{stream:b,type:b.type,Ma:null,ma:null,sa:null,xb:!0,Ca:c,endOfStream:!1,Da:!1,ua:null,va:!1,Cb:!1,za:!1,Zb:!1,$a:!1,Mc:d||0}}
function lh(b,c){var d=b.g[c];if(d)return d.promise;d={promise:new z,Ta:!1};b.g[c]=d;var e=b.b.periods[c].variants.map(function(b){var c=[];b.audio&&c.push(b.audio);b.video&&c.push(b.video);b.video&&b.video.trickModeVideo&&c.push(b.video.trickModeVideo);return c}).reduce(Ab,[]).filter(Db);e.push.apply(e,b.b.periods[c].textStreams);b.m=b.m.then(function(){if(!this.f)return bh(this,e)}.bind(b)).then(function(){this.f||(this.g[c].promise.resolve(),this.g[c].Ta=!0)}.bind(b))["catch"](function(b){this.f||
(this.g[c].promise["catch"](function(){}),this.g[c].promise.reject(),delete this.g[c],this.a.onError(b))}.bind(b));return d.promise}
function bh(b,c){c.map(function(b){return b.id}).filter(Db);for(var d=[],e=0;e<c.length;++e){var f=c[e],g=b.i[f.id];g?d.push(g.promise):(b.i[f.id]={promise:new z,Ta:!1},d.push(f.createSegmentIndex()))}return Promise.all(d).then(function(){if(!this.f)for(var b=0;b<c.length;++b){var d=this.i[c[b].id];d.Ta||(d.promise.resolve(),d.Ta=!0)}}.bind(b))["catch"](function(b){if(!this.f){for(var d=0;d<c.length;d++)this.i[c[d].id].promise["catch"](function(){}),this.i[c[d].id].promise.reject(),delete this.i[c[d].id];
return Promise.reject(b)}}.bind(b))}n.Re=function(b){if(!this.f&&!b.Da&&null!=b.ua&&!b.za)if(b.ua=null,b.va)jh(this,b,b.Cb);else{try{var c=mh(this,b);null!=c&&(dh(this,b,c),b.$a=!1)}catch(d){nh(this,d);return}c=G(this.c);oh(this,b);c.every(function(b){return b.endOfStream})&&this.a.J.endOfStream().then(function(){if(!this.f){var b=this.a.J.S();b<this.b.presentationTimeline.S()&&this.b.presentationTimeline.ja(b)}}.bind(this))}};
function mh(b,c){var d=Og(b.a.Qa),e=ph(b,c,d),f=Cd(b.b,c.stream),g=Bd(b.b,e),h=Wc(b.a.J,c.type,d),k=Math.max(b.j*Math.max(b.b.minBufferTime||0,b.h.rebufferingGoal),b.j*b.h.bufferingGoal);if(e>=b.b.presentationTimeline.S())return c.endOfStream=!0,null;c.endOfStream=!1;c.Ca=g;if(g!=f)return null;if(h>=k)return.5;g=Vc(b.a.J,c.type);g=qh(b,c,d,g,f);if(!g)return 1;var l=Infinity;G(b.c).forEach(function(c){l=Math.min(l,ph(b,c,d))});if(e>=l+b.b.presentationTimeline.a)return 1;c.Mc=0;rh(b,c,d,f,g);return null}
function ph(b,c,d){return c.Ma&&c.ma?b.b.periods[Cd(b.b,c.Ma)].startTime+c.ma.endTime:Math.max(d,c.Mc)}function qh(b,c,d,e,f){if(c.ma&&c.stream==c.Ma)return sh(b,c,f,c.ma.position+1);d=c.ma?c.stream.findSegmentPosition(Math.max(0,b.b.periods[Cd(b.b,c.Ma)].startTime+c.ma.endTime-b.b.periods[f].startTime)):c.stream.findSegmentPosition(Math.max(0,(e||d)-b.b.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=sh(b,c,f,Math.max(0,d-1)));return g||sh(b,c,f,d)}
function sh(b,c,d,e){d=b.b.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.b.presentationTimeline;b=e.Za();e=e.La();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
function rh(b,c,d,e,f){var g=b.b.periods[e],h=c.stream,k=b.b.presentationTimeline.S(),l=b.b.periods[e+1];e=th(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime:k);c.Da=!0;c.xb=!1;k=uh(b,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.l)return vh(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.l||(c.Da=!1,c.Zb=!1,c.va||this.a.cb(),dh(this,c,0),wh(this,h))}.bind(b))["catch"](function(b){this.f||this.l||(c.Da=!1,"text"==c.type&&this.h.ignoreTextStreamFailures?delete this.c.text:3017==
b.code?xh(this,c,b):(c.$a=!0,b.severity=2,nh(this,b)))}.bind(b))}function xh(b,c,d){if(!G(b.c).some(function(b){return b!=c&&b.Zb})){var e=Math.round(100*b.j);if(20<e)b.j-=.2;else if(4<e)b.j-=.04;else{c.$a=!0;b.l=!0;b.a.onError(d);return}c.Zb=!0}dh(b,c,4)}
function th(b,c,d,e,f){if(!c.xb)return Promise.resolve();d=$c(b.a.J,c.type,b.b.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=uh(b,c.stream.initSegmentReference).then(function(b){if(!this.f)return Xc(this.a.J,c.type,b,null,null)}.bind(b))["catch"](function(b){c.xb=!0;return Promise.reject(b)});return Promise.all([d,b])}
function vh(b,c,d,e,f,g,h){f.containsEmsgBoxes&&(new S).Y("emsg",b.he.bind(b,e,g)).parse(h);return yh(b,c,d).then(function(){if(!this.f)return Xc(this.a.J,c.type,h,g.startTime,g.endTime)}.bind(b)).then(function(){if(!this.f)return c.Ma=f,c.ma=g,Promise.resolve()}.bind(b))}
n.he=function(b,c,d){var e=d.s.Xb(),f=d.s.Xb(),g=d.s.C(),h=d.s.C(),k=d.s.C(),l=d.s.C();d=d.s.Ea(d.s.G.byteLength-d.s.W());b=b.startTime+c.startTime+h/g;if("urn:mpeg:dash:event:2012"==e)this.a.Nd();else this.a.onEvent(new F("emsg",{detail:{startTime:b,endTime:b+k/g,schemeIdUri:e,value:f,timescale:g,presentationTimeDelta:h,eventDuration:k,id:l,messageData:d}}))};
function yh(b,c,d){var e=Math.max(b.h.bufferBehind,b.b.presentationTimeline.a),f=Tc(b.a.J,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.J.remove(c.type,f,f+d).then(function(){}.bind(b))}function wh(b,c){if(!b.o&&(b.o=G(b.c).every(function(b){return"text"==b.type?!0:!b.va&&!b.za&&b.ma}),b.o)){var d=Cd(b.b,c);b.g[d]||lh(b,d).then(function(){this.f||this.a.xc()}.bind(b))["catch"](Bb);for(d=0;d<b.b.periods.length;++d)lh(b,d)["catch"](Bb);b.a.$d&&b.a.$d()}}
function oh(b,c){if(c.Ca!=Cd(b.b,c.stream)){var d=c.Ca,e=G(b.c);e.every(function(b){return b.Ca==d})&&e.every(zh)&&lh(b,d).then(function(){if(!this.f&&e.every(function(b){var c=Cd(this.b,b.stream);return zh(b)&&b.Ca==d&&c!=d}.bind(this))){var b=this.b.periods[d],c=this.a.yc(b),h={};c.variant&&c.variant.video&&(h.video=c.variant.video);c.variant&&c.variant.audio&&(h.audio=c.variant.audio);c.text&&(h.text=c.text);for(var k in this.c)if(!h[k]&&"text"!=k){this.a.onError(new A(2,5,5005));return}for(var l in h)if(!this.c[l])if("text"==
l)Wg(this,{text:h.text},b.startTime),delete h[l];else{this.a.onError(new A(2,5,5005));return}for(var m in this.c)(b=h[m])?(gh(this,b,!1),dh(this,this.c[m],0)):delete this.c[m];this.a.xc()}}.bind(b))["catch"](Bb)}}function zh(b){return!b.Da&&null==b.ua&&!b.va&&!b.za}function uh(b,c){var d=qb(c.c(),b.h.retryParameters);if(0!=c.b||null!=c.a){var e="bytes="+c.b+"-";null!=c.a&&(e+=c.a);d.headers.Range=e}return b.a.Oa.request(1,d).promise.then(function(b){return b.data})}
function jh(b,c,d){c.va=!1;c.Cb=!1;c.za=!0;Zc(b.a.J,c.type).then(function(){if(!this.f&&d)return this.a.J.flush(c.type)}.bind(b)).then(function(){this.f||(c.Ma=null,c.ma=null,c.za=!1,c.endOfStream=!1,dh(this,c,0))}.bind(b))}function dh(b,c,d){c.ua=window.setTimeout(b.Re.bind(b,c),1E3*d)}function Vg(b){null!=b.ua&&(window.clearTimeout(b.ua),b.ua=null)}function nh(b,c){Za(b.A).then(function(){this.f||(this.a.onError(c),c.handled||this.h.failureCallback(c))}.bind(b))};function Ah(b,c,d,e,f,g){if(200<=d&&299>=d&&202!=d)return f&&(e=f),{uri:e,data:c,headers:b,fromCache:!!b["x-shaka-from-cache"]};f=null;try{f=Pb(c)}catch(h){}throw new A(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function Bh(b,c,d){var e=new Bh.b;Jb(c.headers,function(b,c){e.append(b,c)});var f=new Bh.a,g={body:c.body||void 0,headers:e,method:c.method,signal:f.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},h=!1,k=!1,l;c.retryParameters.timeout&&(l=setTimeout(function(){k=!0;f.abort()},c.retryParameters.timeout));c=Bh.c;g=c(b,g).then(function(c){clearTimeout(l);return c.arrayBuffer().then(function(e){var f={};c.headers.forEach(function(b,c){f[c.trim()]=b});return Ah(f,e,c.status,b,c.url,d)})})["catch"](function(c){clearTimeout(l);
return h?Promise.reject(new A(1,1,7001,b,d)):k?Promise.reject(new A(1,1,1003,b,d)):void 0==c.severity?Promise.reject(new A(1,1,1002,b,c,d)):Promise.reject(c)});return new B(g,function(){h=!0;f.abort();return Promise.resolve()})}x("shaka.net.HttpFetchPlugin",Bh);Bh.isSupported=function(){return!(!window.fetch||!window.AbortController)};Bh.isSupported=Bh.isSupported;Bh.c=window.fetch;Bh.a=window.AbortController;Bh.b=window.Headers;Bh.isSupported()&&(pb("http",Bh,2),pb("https",Bh,2));function Ch(b,c,d){var e=new Ch.f,f=new Promise(function(f,h){e.open(c.method,b,!0);e.responseType="arraybuffer";e.timeout=c.retryParameters.timeout;e.withCredentials=c.allowCrossSiteCredentials;e.onabort=function(){h(new A(1,1,7001,b,d))};e.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n").reduce(function(b,c){var d=c.split(": ");b[d[0].toLowerCase()]=d.slice(1).join(": ");return b},{});try{var g=Ah(e,c.response,c.status,b,c.responseURL,d);f(g)}catch(t){h(t)}};e.onerror=
function(c){h(new A(1,1,1002,b,c,d))};e.ontimeout=function(){h(new A(1,1,1003,b,d))};for(var g in c.headers)e.setRequestHeader(g.toLowerCase(),c.headers[g]);e.send(c.body)});return new B(f,function(){e.abort();return Promise.resolve()})}x("shaka.net.HttpXHRPlugin",Ch);Ch.f=window.XMLHttpRequest;pb("http",Ch,1);pb("https",Ch,1);function Dh(b){this.a={};this.c=Promise.resolve();this.h=!1;this.i=b;this.f=this.b=this.g=0}Dh.prototype.destroy=function(){this.h=!0;var b=this.c["catch"](function(){});this.c=Promise.resolve();return b};function Eh(b,c,d,e,f){b.a[c]=b.a[c]||[];b.a[c].push({request:d,nc:e,Hd:f})}
function Fh(b,c){var d=G(b.a);b.a={};d.forEach(function(c){c.forEach(function(c){b.b+=c.nc})});var e=Promise.resolve().then(function(){Gh(b);return Promise.all(d.map(function(d){return Hh(b,c,d)}))});b.c=b.c.then(function(){return e});return e}function Hh(b,c,d){var e=Promise.resolve();d.forEach(function(d){e=e.then(function(){Gh(b);return Ih(b,c,d)})});return e}
function Ih(b,c,d){return Promise.resolve().then(function(){Gh(b);return c.request(1,d.request).promise}).then(function(c){Gh(b);b.g+=d.nc;b.f+=c.data.byteLength;b.i(b.b?b.g/b.b:0,b.f);return d.Hd(c.data)})}function Gh(b){if(b.h)throw new A(2,9,7001);};function Jh(b,c){var d=this;this.c=b;this.b=b.objectStore(c);this.a=new z;b.onabort=function(b){b.preventDefault();d.a.reject()};b.onerror=function(b){b.preventDefault();d.a.reject()};b.oncomplete=function(){d.a.resolve()}}Jh.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};Jh.prototype.store=function(){return this.b};Jh.prototype.promise=function(){return this.a};function Kh(b){this.b=b;this.a=[]}Kh.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function Lh(b,c){return Mh(b,c,"readwrite")}function Mh(b,c,d){d=b.b.transaction([c],d);var e=new Jh(d,c);b.a.push(e);e.promise().then(function(){hb(b.a,e)},function(){hb(b.a,e)});return e};function Nh(){this.a={}}Nh.prototype.destroy=function(){var b=G(this.a).map(function(b){return b.destroy()});this.a={};return Promise.all(b)};Nh.prototype.init=function(){var b=this;Jb(Oh,function(c,e){var d=e();d&&(b.a[c]=d)});var c=G(this.a).map(function(b){return b.init()});return Promise.all(c)};
function Ph(b){var c=null;Jb(b.a,function(b,e){Jb(e.getCells(),function(d,e){e.hasFixedKeySpace()||c||(c={path:{$:b,O:d},O:e})})});if(c)return c;throw new A(2,9,9013,"Could not find a cell that supports add-operations");}function Qh(b,c){Jb(b.a,function(b,e){Jb(e.getCells(),function(d,e){c({$:b,O:d},e)})})}function Rh(b,c,d){b=b.a[c];if(!b)throw new A(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells()[d];if(!c)throw new A(2,9,9013,"Could not find cell with name "+d);return c}
function Sh(b){b=G(b.a).map(function(b){return b.erase()});return Promise.all(b)}x("shaka.offline.StorageMuxer.register",function(b,c){Oh[b]=c});x("shaka.offline.StorageMuxer.unregister",function(b){delete Oh[b]});function Th(){return G(Oh).some(function(b){return(b=b())?(b.destroy(),!0):!1})}var Oh={};function Uh(b){this.a=new Kh(b)}n=Uh.prototype;n.destroy=function(){return this.a.destroy()};n.hasFixedKeySpace=function(){return!0};n.addSegments=function(){return Vh("segment")};n.removeSegments=function(b,c){return Wh(this,"segment",b,c)};n.getSegments=function(b){return Xh(this,"segment",b).then(function(b){return b.map(Yh)})};n.addManifests=function(){return Vh("manifest")};
n.updateManifestExpiration=function(b,c){var d=Lh(this.a,"manifest"),e=d.store(),f=new z;e.get(b).onsuccess=function(d){(d=d.target.result)?(d.expiration=c,e.put(d),f.resolve()):f.reject(new A(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};n.removeManifests=function(b,c){return Wh(this,"manifest",b,c)};n.getManifests=function(b){return Xh(this,"manifest",b).then(function(b){return b.map(Zh)})};
n.getAllManifests=function(){var b=Mh(this.a,"manifest","readonly"),c={};b.store().openCursor().onsuccess=function(b){if(b=b.target.result)c[b.key]=Zh(b.value),b["continue"]()};return b.promise().then(function(){return c})};function Vh(b){return Promise.reject(new A(2,9,9011,"Cannot add new value to "+b))}function Wh(b,c,d,e){b=Lh(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
function Xh(b,c,d){b=Mh(b.a,c,"readonly");var e=b.store(),f={},g=[];d.forEach(function(b){e.get(b).onsuccess=function(c){c=c.target.result;void 0==c&&g.push(b);f[b]=c}});return b.promise().then(function(){return g.length?Promise.reject(new A(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
function Zh(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map($h),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function $h(b){ai(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(bi)}}
function bi(b){var c=b.Bd?ci(b.Bd):null;return{id:b.id,primary:b.primary,presentationTimeOffset:b.presentationTimeOffset,contentType:b.contentType,mimeType:b.mimeType,codecs:b.codecs,frameRate:b.frameRate,kind:b.kind,language:b.language,label:b.label,width:b.width,height:b.height,initSegmentKey:c,encrypted:b.encrypted,keyId:b.keyId,segments:b.segments.map(di),variantIds:b.variantIds}}function di(b){var c=ci(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
function Yh(b){return{data:b.data}}function ci(b){var c;if((c=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(b))||(c=/^offline:segment\/([0-9]+)$/.exec(b)))return Number(c[1]);throw new A(2,9,9004,"Could not parse uri "+b);}
function ai(b){var c=b.streams.filter(function(b){return"audio"==b.contentType}),d=b.streams.filter(function(b){return"video"==b.contentType});if(!c.every(function(b){return b.variantIds})||!d.every(function(b){return b.variantIds})){c.forEach(function(b){b.variantIds=[]});d.forEach(function(b){b.variantIds=[]});var e=0;if(d.length&&!c.length){var f=e++;d.forEach(function(b){b.variantIds.push(f)})}if(!d.length&&c.length){var g=e++;c.forEach(function(b){b.variantIds.push(g)})}d.length&&c.length&&c.forEach(function(b){d.forEach(function(c){var d=
e++;b.variantIds.push(d);c.variantIds.push(d)})})}};function ei(b,c,d,e){this.a=new Kh(b);this.c=c;this.b=d;this.f=e}n=ei.prototype;n.destroy=function(){return this.a.destroy()};n.hasFixedKeySpace=function(){return this.f};n.addSegments=function(b){return fi(this,this.c,b)};n.removeSegments=function(b,c){return gi(this,this.c,b,c)};n.getSegments=function(b){return hi(this,this.c,b)};n.addManifests=function(b){return fi(this,this.b,b)};
n.updateManifestExpiration=function(b,c){var d=Lh(this.a,this.b),e=d.store();e.get(b).onsuccess=function(d){if(d=d.target.result)d.expiration=c,e.put(d,b)};return d.promise()};n.removeManifests=function(b,c){return gi(this,this.b,b,c)};n.getManifests=function(b){return hi(this,this.b,b)};n.getAllManifests=function(){var b=Mh(this.a,this.b,"readonly"),c={};b.store().openCursor().onsuccess=function(b){if(b=b.target.result)c[b.key]=b.value,b["continue"]()};return b.promise().then(function(){return c})};
function fi(b,c,d){if(b.f)return Promise.reject(new A(1,9,9011,"Cannot add new value to "+c));b=Lh(b.a,c);var e=b.store(),f=[];d.forEach(function(b){e.add(b).onsuccess=function(b){f.push(b.target.result)}});return b.promise().then(function(){return f})}function gi(b,c,d,e){b=Lh(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
function hi(b,c,d){b=Mh(b.a,c,"readonly");var e=b.store(),f={},g=[];d.forEach(function(b){var c=e.get(b);c.onsuccess=function(){void 0==c.result&&g.push(b);f[b]=c.result}});return b.promise().then(function(){return g.length?Promise.reject(new A(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function ii(){this.c=this.b=this.a=this.f=null}
ii.prototype.init=function(){var b=this,c=new z,d=window.indexedDB.open("shaka_offline_db",3);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Uh(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new ei(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;d=e.contains("manifest-v3")&&e.contains("segment-v3")?new ei(d,"segment-v3","manifest-v3",!1):null;b.c=d;c.resolve()};
d.onupgradeneeded=function(b){b=b.target.result;var c={autoIncrement:!0};b.createObjectStore("manifest-v3",c);b.createObjectStore("segment-v3",c)};d.onerror=function(b){c.reject(new A(2,9,9001,d.error));b.preventDefault()};return c};
ii.prototype.destroy=function(){var b=this;return p(function d(){return v(d,function(d){switch(d.B){case 1:if(!b.a){d.X(2);break}return q(d,b.a.destroy(),2);case 2:if(!b.b){d.X(4);break}return q(d,b.b.destroy(),4);case 4:if(!b.c){d.X(6);break}return q(d,b.c.destroy(),6);case 6:b.f&&b.f.close(),d.B=0}})})};ii.prototype.getCells=function(){var b={};this.a&&(b.v1=this.a);this.b&&(b.v2=this.b);this.c&&(b.v3=this.c);return b};
ii.prototype.erase=function(){var b=this;return p(function d(){return v(d,function(d){switch(d.B){case 1:if(!b.a){d.X(2);break}return q(d,b.a.destroy(),2);case 2:if(!b.b){d.X(4);break}return q(d,b.b.destroy(),4);case 4:if(!b.c){d.X(6);break}return q(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),q(d,ji(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,q(d,b.init(),0)}})})};
function ji(){var b=new z,c=window.indexedDB.deleteDatabase("shaka_offline_db");c.onblocked=function(){};c.onsuccess=function(){b.resolve()};c.onerror=function(d){b.reject(new A(2,9,9001,c.error));d.preventDefault()};return b}Oh.idb=function(){return window.indexedDB?new ii:null};function ki(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}ki.prototype.$=function(){return this.g};ki.prototype.O=function(){return this.f};ki.prototype.key=function(){return this.c};ki.prototype.toString=function(){return this.b};
function li(b){b=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(b);if(null==b)return null;var c=b[1];if("manifest"!=c&&"segment"!=c)return null;var d=b[2];if(!d)return null;var e=b[3];return e&&null!=c?new ki(c,d,e,Number(b[4])):null};function mi(b,c){this.b=b;this.a=c}function ni(b,c){var d=new V(null,0);d.ja(c.duration);var e=c.periods.map(function(c){return oi(b,c,d)}),f=c.drmInfo?[c.drmInfo]:[];c.drmInfo&&e.forEach(function(b){b.variants.forEach(function(b){b.drmInfos=f})});return{presentationTimeline:d,minBufferTime:2,offlineSessionIds:c.sessionIds,periods:e}}
function oi(b,c,d){var e=c.streams.filter(function(b){return"audio"==b.contentType}),f=c.streams.filter(function(b){return"video"==b.contentType});e=pi(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return qi(b,c)});c.streams.forEach(function(c,e){var f=c.segments.map(function(c,d){return ri(b,d,c)});d.bb(f,0==e)});return{startTime:c.startTime,variants:e,textStreams:f}}
function pi(b,c,d){var e={},f=[];f.push.apply(f,c);f.push.apply(f,d);f.forEach(function(b){b.variantIds.forEach(function(b){e[b]=e[b]||{id:b,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0}})});c.forEach(function(c){var d=qi(b,c);c.variantIds.forEach(function(b){b=e[b];b.language=d.language;b.primary=b.primary||d.primary;b.audio=d})});d.forEach(function(c){var d=qi(b,c);c.variantIds.forEach(function(b){b=e[b];b.primary=b.primary||
d.primary;b.video=d})});return G(e)}
function qi(b,c){var d=c.segments.map(function(c,d){return ri(b,d,c)}),e=new U(d);d={id:c.id,createSegmentIndex:function(){return Promise.resolve()},findSegmentPosition:function(b){return e.find(b)},getSegmentReference:function(b){return e.get(b)},initSegmentReference:null,presentationTimeOffset:c.presentationTimeOffset,mimeType:c.mimeType,codecs:c.codecs,width:c.width||void 0,height:c.height||void 0,frameRate:c.frameRate||void 0,kind:c.kind,encrypted:c.encrypted,keyId:c.keyId,language:c.language,
label:c.label||null,type:c.contentType,primary:c.primary,trickModeVideo:null,containsEmsgBoxes:!1,roles:[],channelsCount:null};null!=c.initSegmentKey&&(d.initSegmentReference=si(b,c.initSegmentKey));return d}function ri(b,c,d){var e=new ki("segment",b.b,b.a,d.dataKey);return new Q(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function si(b,c){var d=new ki("segment",b.b,b.a,c);return new P(function(){return[d.toString()]},0,null)};function ti(){this.a=null}n=ti.prototype;n.configure=function(){};n.start=function(b){var c=li(b);this.a=c;if(null==c||"manifest"!=c.a)return Promise.reject(new A(2,1,9004,c));var d=new Nh;return lb([d],function(){return p(function f(){var b,h,k,l;return v(f,function(f){switch(f.B){case 1:return q(f,d.init(),2);case 2:return q(f,Rh(d,c.$(),c.O()),3);case 3:return b=f.M,q(f,b.getManifests([c.key()]),4);case 4:return h=f.M,k=h[0],l=new mi(c.$(),c.O()),f["return"](ni(l,k))}})})})};n.stop=function(){return Promise.resolve()};
n.update=function(){};n.onExpirationUpdated=function(b,c){var d=this.a,e=new Nh;return lb([e],function(){return p(function g(){var h,k,l,m,r;return v(g,function(g){switch(g.B){case 1:return q(g,e.init(),2);case 2:return q(g,Rh(e,d.$(),d.O()),3);case 3:return h=g.M,q(g,h.getManifests([d.key()]),4);case 4:k=g.M;l=k[0];m=0<=l.sessionIds.indexOf(b);r=void 0==l.expiration||l.expiration>c;if(m&&r)return q(g,h.updateManifestExpiration(d.key(),c),0);g.X(0)}})})})["catch"](function(){})};
mf["application/x-offline-manifest"]=ti;function ui(b){var c=li(b);return c&&"manifest"==c.a?ui.a(b):c&&"segment"==c.a?ui.b(c.key(),c):$a(new A(2,1,9004,b))}x("shaka.offline.OfflineScheme",ui);ui.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return bb(b)};
ui.b=function(b,c){var d=new Nh,e=lb([d],function(){return p(function g(){var b,e,l;return v(g,function(g){switch(g.B){case 1:return q(g,d.init(),2);case 2:return q(g,Rh(d,c.$(),c.O()),3);case 3:return b=g.M,q(g,b.getSegments([c.key()]),4);case 4:return e=g.M,l=e[0],g["return"]({uri:c,data:l.data,headers:{}})}})})});return cb(e)};pb("offline",ui);function X(b){this.a=null;this.b=b;for(var c=0;c<b.textTracks.length;++c){var d=b.textTracks[c];d.mode="disabled";"Shaka Player TextTrack"==d.label&&(this.a=d)}this.a||(this.a=b.addTextTrack("subtitles","Shaka Player TextTrack"));this.a.mode="hidden";this.c=this.a.cues}x("shaka.text.SimpleTextDisplayer",X);X.prototype.remove=function(b,c){if(!this.a)return!1;vi(this,function(d){return d.startTime>=c||d.endTime<=b?!1:!0});return!0};X.prototype.remove=X.prototype.remove;
X.prototype.append=function(b){var c=[];if(window.VTTRegion){var d=b.map(function(b){return b.region});d=d.filter(Db);for(var e=0;e<d.length;e++){var f=wi(this,d[e]);c.push(f)}}var g=[];for(d=0;d<b.length;d++)(e=xi(b[d],c))&&g.push(e);g.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:g.indexOf(c)-g.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};X.prototype.append=X.prototype.append;
X.prototype.destroy=function(){this.a&&vi(this,function(){return!0});this.b=this.a=null;return Promise.resolve()};X.prototype.destroy=X.prototype.destroy;X.prototype.isTextVisible=function(){return"showing"==this.a.mode};X.prototype.isTextVisible=X.prototype.isTextVisible;X.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};X.prototype.setTextVisibility=X.prototype.setTextVisibility;
function xi(b,c){if(b.startTime>=b.endTime)return null;var d=new VTTCue(b.startTime,b.endTime,b.payload);d.lineAlign=b.lineAlign;d.positionAlign=b.positionAlign;d.size=b.size;try{d.align=b.textAlign}catch(f){}"center"==b.textAlign&&"center"!=d.align&&(d.align="middle");2==b.writingDirection?d.vertical="lr":3==b.writingDirection&&(d.vertical="rl");1==b.lineInterpretation&&(d.snapToLines=!1);null!=b.line&&(d.line=b.line);null!=b.position&&(d.position=b.position);if(b.region.id.length){var e=c.filter(function(c){return c.id==
b.region.id});e.length&&(d.region=e[0])}return d}function wi(b,c){var d=new VTTRegion,e=b.b.offsetWidth,f=b.b.offsetHeight;d.id=c.id;d.regionAnchorX=c.regionAnchorX;d.regionAnchorY=c.regionAnchorY;d.scroll=c.scroll;2==c.heightUnits&&(d.lines=c.height);d.width=0==c.widthUnits?100*c.width/e:c.width;0==c.viewportAnchorUnits?(d.viewportAnchorX=100*c.viewportAnchorX/e,d.viewportAnchorY=100*c.viewportAnchorY/f):(d.viewportAnchorX=c.viewportAnchorX,d.viewportAnchorY=c.viewportAnchorY);return d}
function vi(b,c){for(var d=b.c,e=[],f=0;f<d.length;++f)c(d[f])&&e.push(d[f]);for(d=0;d<e.length;++d)b.a.removeCue(e[d])};function Y(b,c){L.call(this);this.xa=!1;this.f=null;this.Wa=!1;this.v=null;this.o=new D;this.h=this.Eb=this.b=this.m=this.a=this.A=this.g=this.i=this.l=this.u=null;this.ad=1E9;this.nb=[];this.qb=!1;this.ya=!0;this.T=this.rb=this.Ia=null;this.jc=!1;this.H=null;this.pb=[];this.K={};this.c=yi(this);this.ob={width:Infinity,height:Infinity};this.j=zi();this.mb=0;this.N=this.c.preferredAudioLanguage;this.wa=this.c.preferredTextLanguage;this.Ha=this.c.preferredVariantRole;this.Va=this.c.preferredTextRole;
this.fa=this.c.preferredAudioChannelCount;c&&c(this);this.u=new C(this.Je.bind(this));b&&this.sb(b,!0)}za(Y,L);x("shaka.Player",Y);function Ai(b){if(!b.Ia)return Promise.resolve();var c=Promise.resolve();b.m&&(c=b.m.stop(),b.m=null);return Promise.all([c,b.Ia()])}
Y.prototype.destroy=function(){var b=this;return p(function d(){var e;return v(d,function(d){switch(d.B){case 1:return q(d,b.detach(),2);case 2:return b.xa=!0,e=Promise.all([b.o?b.o.destroy():null,b.u?b.u.destroy():null]),b.Wa=!1,b.o=null,b.h=null,b.u=null,b.c=null,q(d,e,0)}})})};Y.prototype.destroy=Y.prototype.destroy;Y.version="v2.4.1";var Bi={};Y.registerSupportPlugin=function(b,c){Bi[b]=c};
Y.isBrowserSupported=function(){return!!window.Promise&&!!window.Uint8Array&&!!Array.prototype.forEach&&!!window.MediaSource&&!!MediaSource.isTypeSupported&&!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration};Y.probeSupport=function(){return oc().then(function(b){var c=of(),d=Rc();b={manifest:c,media:d,drm:b};for(var e in Bi)b[e]=Bi[e]();return b})};
Y.prototype.sb=function(b,c){var d=this;return p(function f(){return v(f,function(f){switch(f.B){case 1:void 0===c&&(c=!0);if(!d.f){f.X(2);break}return q(f,d.detach(),2);case 2:d.f=b;E(d.o,d.f,"error",d.be.bind(d));if(c)return d.i=new Qc(d.f),q(f,d.i.j,0);f.X(0)}})})};Y.prototype.attach=Y.prototype.sb;Y.prototype.detach=function(){var b=this;return p(function d(){return v(d,function(d){switch(d.B){case 1:return b.f?q(d,b.jb(!1),2):d["return"]();case 2:b.o.na(b.f,"error"),b.f=null,d.B=0}})})};
Y.prototype.detach=Y.prototype.detach;function Ci(b,c,d){return p(function f(){var g,h;return v(f,function(f){switch(f.B){case 1:return q(f,pf(c,b.u,b.c.manifest.retryParameters,d),2);case 2:return g=f.M,b.m=new g,b.m.configure(b.c.manifest),h={networkingEngine:b.u,filterNewPeriod:b.ub.bind(b),filterAllPeriods:b.dc.bind(b),onTimelineRegionAdded:b.ae.bind(b),onEvent:b.ib.bind(b),onError:b.Ua.bind(b)},f["return"](b.m.start(c,h))}})})}
function Di(b){b.b.periods.some(function(b){return b.variants.some(function(b){return b.video&&b.audio})})&&b.b.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return b.video&&b.audio})});if(0==b.b.periods.length)throw new A(2,4,4014);}function Ei(b){var c=b.b.presentationTimeline.S(),d=b.c.playRangeEnd,e=b.c.playRangeStart;0<e&&(b.P()||b.b.presentationTimeline.Tc(e));d<c&&(b.P()||b.b.presentationTimeline.ja(d))}
Y.prototype.load=function(b,c,d){var e=this;return p(function g(){var h,k,l,m,r,t,u,y,w,Ha,Wa;return v(g,function(g){switch(g.B){case 1:if(!e.f)throw new A(2,7,7002);k=new z;l=function(){h=new A(2,7,7E3);return k};e.dispatchEvent(new F("loading"));m=Date.now();g.qa=2;r=e.jb();e.Ia=l;return q(g,r,4);case 4:e.j=zi();E(e.o,e.f,"playing",e.kb.bind(e));E(e.o,e.f,"pause",e.kb.bind(e));E(e.o,e.f,"ended",e.kb.bind(e));t=e.c.abrFactory;e.h=new t;e.h.configure(e.c.abr);e.v=new e.c.textDisplayFactory;e.v.setTextVisibility(e.Wa);
if(h)throw h;u=e;return q(g,Ci(e,b,d),5);case 5:u.b=g.M;e.Eb=b;if(h)throw h;Di(e);e.l=new $b({Oa:e.u,onError:e.Ua.bind(e),zb:e.Md.bind(e),onExpirationUpdated:e.Jd.bind(e),onEvent:e.ib.bind(e)});e.l.configure(e.c.drm);return q(g,e.l.init(e.b,!1),6);case 6:if(h)throw h;e.dc(e.b.periods);e.mb=Date.now()/1E3;e.N=e.c.preferredAudioLanguage;e.wa=e.c.preferredTextLanguage;e.fa=e.c.preferredAudioChannelCount;Ei(e);return q(g,e.l.sb(e.f),7);case 7:if(h)throw h;e.h.init(e.Ke.bind(e));e.i||(e.i=new Qc(e.f));
e.i.o=e.v;e.g=new Lg(e.f,e.b,e.c.streaming,void 0==c?null:c,e.Ie.bind(e),e.ib.bind(e));e.A=new Qg(e.f,e.i,e.b,e.c.streaming,e.Uc.bind(e),e.ib.bind(e),e.He.bind(e));e.a=new Ug(e.b,{Qa:e.g,J:e.i,Oa:e.u,yc:e.Gd.bind(e),xc:e.ed.bind(e),onError:e.Ua.bind(e),onEvent:e.ib.bind(e),Nd:e.Od.bind(e),cb:e.Yd.bind(e),filterNewPeriod:e.ub.bind(e),filterAllPeriods:e.dc.bind(e)});e.a.configure(e.c.streaming);Fi(e);e.dispatchEvent(new F("streaming"));return q(g,e.a.init(),8);case 8:if(h)throw h;e.c.streaming.startAtSegmentBoundary&&
(y=Gi(e,Og(e.g)),Ig(e.g.a,y));e.b.periods.forEach(e.ub.bind(e));Hi(e);Ii(e);w=W(e.a);Ha=td(w.variants,e.N,e.Ha,e.fa);e.h.setVariants(Ha);w.variants.some(function(b){return b.primary});e.pb.forEach(e.A.o.bind(e.A));e.pb=[];yb(e.o,e.f,"loadeddata",function(){this.j.loadLatency=(Date.now()-m)/1E3}.bind(e));if(h)throw h;e.Ia=null;pa(g);break;case 2:return Wa=qa(g),k.resolve(),e.Ia==l&&(e.Ia=null,e.dispatchEvent(new F("unloading"))),h?g["return"](Promise.reject(h)):g["return"](Promise.reject(Wa))}})})};
Y.prototype.load=Y.prototype.load;
function Fi(b){function c(b){return(b.video?b.video.codecs.split(".")[0]:"")+"-"+(b.audio?b.audio.codecs.split(".")[0]:"")}var d=b.b.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=vd(d,b.c.preferredAudioChannelCount);var e={};d.forEach(function(b){var d=c(b);d in e||(e[d]=[]);e[d].push(b)});var f=null,g=Infinity;Jb(e,function(b,c){var d=0,e=0;c.forEach(function(b){d+=b.bandwidth||0;++e});var h=d/e;h<g&&(f=b,g=h)});b.b.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
f?!0:!1})})}Y.prototype.configure=function(b,c){if(2==arguments.length&&"string"==typeof b){for(var d=b,e={},f=e,g=0,h=0;;){g=d.indexOf(".",g);if(0>g)break;if(0==g||"\\"!=d[g-1])h=d.substring(h,g).replace(/\\\./g,"."),f[h]={},f=f[h],h=g+1;g+=1}f[d.substring(h).replace(/\\\./g,".")]=c;b=e}d=jb(this.c,b,yi(this),Ji(),"");Ki(this);return d};Y.prototype.configure=Y.prototype.configure;
function Ki(b){b.m&&b.m.configure(b.c.manifest);b.l&&b.l.configure(b.c.drm);if(b.a){b.a.configure(b.c.streaming);try{b.b.periods.forEach(b.ub.bind(b))}catch(f){b.Ua(f)}var c=Yg(b.a),d=$g(b.a),e=W(b.a);(c=zd(c,d,e.variants))&&c.allowedByApplication&&c.allowedByKeySystem||Li(b,e)}b.h&&(b.h.configure(b.c.abr),b.c.abr.enabled&&!b.ya?b.h.enable():b.h.disable())}Y.prototype.getConfiguration=function(){var b=yi(this);jb(b,this.c,yi(this),Ji(),"");return b};Y.prototype.getConfiguration=Y.prototype.getConfiguration;
Y.prototype.ve=function(){this.c=yi(this);Ki(this)};Y.prototype.resetConfiguration=Y.prototype.ve;Y.prototype.rd=function(){return this.f};Y.prototype.getMediaElement=Y.prototype.rd;Y.prototype.sc=function(){return this.u};Y.prototype.getNetworkingEngine=Y.prototype.sc;Y.prototype.Kb=function(){return this.Eb};Y.prototype.getManifestUri=Y.prototype.Kb;Y.prototype.P=function(){return this.b?this.b.presentationTimeline.P():!1};Y.prototype.isLive=Y.prototype.P;
Y.prototype.Ba=function(){return this.b?this.b.presentationTimeline.Ba():!1};Y.prototype.isInProgress=Y.prototype.Ba;Y.prototype.Cd=function(){if(!this.b||!this.b.periods.length)return!1;var b=this.b.periods[0].variants;return b.length?!b[0].video:!1};Y.prototype.isAudioOnly=Y.prototype.Cd;Y.prototype.xe=function(){var b=0,c=0;this.b&&(c=this.b.presentationTimeline,b=c.Ka(),c=c.la());return{start:b,end:c}};Y.prototype.seekRange=Y.prototype.xe;
Y.prototype.keySystem=function(){return this.l?this.l.keySystem():""};Y.prototype.keySystem=Y.prototype.keySystem;Y.prototype.drmInfo=function(){return this.l?this.l.b:null};Y.prototype.drmInfo=Y.prototype.drmInfo;Y.prototype.wb=function(){return this.l?this.l.wb():Infinity};Y.prototype.getExpiration=Y.prototype.wb;Y.prototype.vc=function(){return this.qb};Y.prototype.isBuffering=Y.prototype.vc;
Y.prototype.jb=function(b){var c=this;return p(function e(){return v(e,function(e){switch(e.B){case 1:if(c.xa)return e["return"]();void 0===b&&(b=!0);c.dispatchEvent(new F("unloading"));return q(e,Ai(c),2);case 2:return c.rb||(c.rb=Mi(c).then(function(){c.Uc(!1);c.rb=null})),q(e,c.rb,3);case 3:if(b)return c.i=new Qc(c.f),q(e,c.i.j,0);e.X(0)}})})};Y.prototype.unload=Y.prototype.jb;Y.prototype.Xa=function(){return this.g?this.g.Xa():0};Y.prototype.getPlaybackRate=Y.prototype.Xa;
Y.prototype.Te=function(b){this.g&&Kg(this.g.a,b);this.a&&fh(this.a,1!=b)};Y.prototype.trickPlay=Y.prototype.Te;Y.prototype.fd=function(){this.g&&Kg(this.g.a,1);this.a&&fh(this.a,!1)};Y.prototype.cancelTrickPlay=Y.prototype.fd;Y.prototype.zd=function(){if(!this.b||!this.g)return[];var b=Bd(this.b,Og(this.g)),c=this.K[b]||{};return pd(this.b.periods[b],c.audio,c.video)};Y.prototype.getVariantTracks=Y.prototype.zd;
Y.prototype.yd=function(){if(!this.b||!this.g)return[];var b=Bd(this.b,Og(this.g)),c=this.K[b]||{};if(!c.text){var d=xd(this.b.periods[b].textStreams,this.wa,this.Va);d.length&&(c.text=d[0].id)}return qd(this.b.periods[b],c.text).filter(function(b){return 0>this.nb.indexOf(b.id)}.bind(this))};Y.prototype.getTextTracks=Y.prototype.yd;
Y.prototype.Be=function(b){if(this.a){var c=W(this.a);a:{for(var d=0;d<c.textStreams.length;d++)if(c.textStreams[d].id==b.id){b=c.textStreams[d];break a}b=null}b&&(this.i.l=!1,Ni(this,b,!1),c=b,this.ya?this.H=c:gh(this.a,c,!0),this.wa=b.language)}};Y.prototype.selectTextTrack=Y.prototype.Be;Y.prototype.ze=function(){this.i.l=!0;eh(this.a)};Y.prototype.selectEmbeddedTextTrack=Y.prototype.ze;Y.prototype.Ye=function(){return this.i?this.i.l:!1};Y.prototype.usingEmbeddedTextTrack=Y.prototype.Ye;
Y.prototype.Ce=function(b,c){if(this.a){this.c.abr.enabled&&Ea("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var d=W(this.a),e=rd(d,b);e&&sd(e)&&(Oi(this,e,!1),Pi(this,e,c),this.N=e.language,e.audio&&e.audio.channelsCount&&(this.fa=e.audio.channelsCount),d=td(d.variants,this.N,this.Ha,this.fa),this.h.setVariants(d))}};Y.prototype.selectVariantTrack=Y.prototype.Ce;
Y.prototype.nd=function(){if(!this.a)return[];var b=W(this.a);b=od(b.variants).map(function(b){return b.audio}).filter(Db);return Qi(b)};Y.prototype.getAudioLanguagesAndRoles=Y.prototype.nd;Y.prototype.xd=function(){if(!this.a)return[];var b=W(this.a);return Qi(b.textStreams)};Y.prototype.getTextLanguagesAndRoles=Y.prototype.xd;Y.prototype.md=function(){if(!this.a)return[];var b=W(this.a);return od(b.variants).map(function(b){return b.language}).filter(Db)};Y.prototype.getAudioLanguages=Y.prototype.md;
Y.prototype.wd=function(){return this.a?W(this.a).textStreams.map(function(b){return b.language}).filter(Db):[]};Y.prototype.getTextLanguages=Y.prototype.wd;function Qi(b){var c=[];b.forEach(function(b){if(b){var d=b.language;b.roles.length?b.roles.forEach(function(b){c.push({language:d,role:b})}):c.push({language:d,role:""})}else c.push({language:"und",role:""})});return fb(c,function(b,c){return b.language==c.language&&b.role==c.role})}
Y.prototype.ye=function(b,c){if(this.a){var d=W(this.a);this.N=b;this.Ha=c||"";Li(this,d)}};Y.prototype.selectAudioLanguage=Y.prototype.ye;Y.prototype.Ae=function(b,c){if(this.a){var d=W(this.a);this.wa=b;this.Va=c||"";Li(this,d)}};Y.prototype.selectTextLanguage=Y.prototype.Ae;Y.prototype.Ob=function(){return this.v?this.v.isTextVisible():this.Wa};Y.prototype.isTextTrackVisible=Y.prototype.Ob;
Y.prototype.Fe=function(b){this.v&&this.v.setTextVisibility(b);this.Wa=b;Ri(this);!this.c.streaming.alwaysStreamText&&this.a&&(b?(b=W(this.a),(b=xd(b.textStreams,this.wa,this.Va)[0])&&ah(this.a,b,!0)):eh(this.a))};Y.prototype.setTextTrackVisibility=Y.prototype.Fe;Y.prototype.td=function(){return this.b?new Date(1E3*this.b.presentationTimeline.f+1E3*this.f.currentTime):null};Y.prototype.getPlayheadTimeAsDate=Y.prototype.td;
Y.prototype.vd=function(){return this.b?new Date(1E3*this.b.presentationTimeline.f):null};Y.prototype.getPresentationStartTimeAsDate=Y.prototype.vd;Y.prototype.Ib=function(){return this.i?this.i.Ib():{total:[],audio:[],video:[],text:[]}};Y.prototype.getBufferedInfo=Y.prototype.Ib;
Y.prototype.getStats=function(){Si(this);this.kb();var b=null,c=null,d=this.f;d=d&&d.getVideoPlaybackQuality?d.getVideoPlaybackQuality():{};if(this.g&&this.b){var e=Bd(this.b,Og(this.g)),f=this.b.periods[e];if(e=this.K[e])c=Ad(e.audio,e.video,f.variants),b=c.video||{}}b||(b={});c||(c={});return{width:b.width||0,height:b.height||0,streamBandwidth:c.bandwidth||0,decodedFrames:Number(d.totalVideoFrames),droppedFrames:Number(d.droppedVideoFrames),estimatedBandwidth:this.h?this.h.getBandwidthEstimate():
NaN,loadLatency:this.j.loadLatency,playTime:this.j.playTime,bufferingTime:this.j.bufferingTime,switchHistory:kb(this.j.switchHistory),stateHistory:kb(this.j.stateHistory)}};Y.prototype.getStats=Y.prototype.getStats;
Y.prototype.addTextTrack=function(b,c,d,e,f,g){if(!this.a)return Promise.reject();for(var h=W(this.a),k,l=0;l<this.b.periods.length;l++)if(this.b.periods[l]==h){if(l==this.b.periods.length-1){if(k=this.b.presentationTimeline.S()-h.startTime,Infinity==k)return Promise.reject()}else k=this.b.periods[l+1].startTime-h.startTime;break}var m={id:this.ad++,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(c){return 1!=c?null:new Q(1,0,
k,function(){return[b]},0,null)},initSegmentReference:null,presentationTimeOffset:0,mimeType:e,codecs:f||"",kind:d,encrypted:!1,keyId:null,language:c,label:g||null,type:"text",primary:!1,trickModeVideo:null,containsEmsgBoxes:!1,roles:[],channelsCount:null};this.nb.push(m.id);h.textStreams.push(m);return ah(this.a,m,this.Wa).then(function(){if(!this.xa){var b=this.b.periods.indexOf(h),e=Zg(this.a,"text");e&&(this.K[b].text=e.id);this.nb.splice(this.nb.indexOf(m.id),1);Li(this,h);Hi(this);return{id:m.id,
active:!1,type:"text",bandwidth:0,language:c,label:g||null,kind:d,width:null,height:null}}}.bind(this))};Y.prototype.addTextTrack=Y.prototype.addTextTrack;Y.prototype.bc=function(b,c){this.ob.width=b;this.ob.height=c};Y.prototype.setMaxHardwareResolution=Y.prototype.bc;Y.prototype.Nc=function(){if(this.a){var b=this.a;if(b.f)b=!1;else if(b.l)b=!1;else{for(var c in b.c){var d=b.c[c];d.$a&&(d.$a=!1,dh(b,d,.1))}b=!0}}else b=!1;return b};Y.prototype.retryStreaming=Y.prototype.Nc;Y.prototype.qd=function(){return this.b};
Y.prototype.getManifest=Y.prototype.qd;function Oi(b,c,d){c.video&&Ti(b,c.video);c.audio&&Ti(b,c.audio);var e=Xg(b.a);c!=zd(Yg(b.a),$g(b.a),e?e.variants:[])&&b.j.switchHistory.push({timestamp:Date.now()/1E3,id:c.id,type:"variant",fromAdaptation:d,bandwidth:c.bandwidth})}function Ni(b,c,d){Ti(b,c);b.j.switchHistory.push({timestamp:Date.now()/1E3,id:c.id,type:"text",fromAdaptation:d,bandwidth:null})}function Ti(b,c){var d=Cd(b.b,c);b.K[d]||(b.K[d]={});b.K[d][c.type]=c.id}
function Mi(b){b.o&&(b.o.na(b.f,"loadeddata"),b.o.na(b.f,"playing"),b.o.na(b.f,"pause"),b.o.na(b.f,"ended"));var c=Promise.all([b.h?b.h.stop():null,b.i?b.i.destroy():null,b.l?b.l.destroy():null,b.g?b.g.destroy():null,b.A?b.A.destroy():null,b.a?b.a.destroy():null,b.m?b.m.stop():null,b.v?b.v.destroy():null]);b.ya=!0;b.l=null;b.i=null;b.g=null;b.A=null;b.a=null;b.m=null;b.v=null;b.b=null;b.Eb=null;b.pb=[];b.K={};b.j=zi();return c}
function Ji(){return{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0)}}}
function yi(b){var c=5E5,d=Infinity;navigator.connection&&navigator.connection.type&&(c=1E6*navigator.connection.downlink,navigator.connection.saveData&&(d=360));return{drm:{retryParameters:Ya(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{retryParameters:Ya(),dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,xlinkFailGracefully:!1,defaultPresentationDelay:10}},streaming:{retryParameters:Ya(),failureCallback:b.jd.bind(b),rebufferingGoal:2,
bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1},abrFactory:K,textDisplayFactory:function(){return new X(b.f)},abr:{enabled:!0,defaultBandwidthEstimate:c,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:d,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity}},preferredAudioLanguage:"",
preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:Infinity,minPixels:0,maxPixels:Infinity,minBandwidth:0,maxBandwidth:Infinity},playRangeStart:0,playRangeEnd:Infinity}}n=Y.prototype;n.jd=function(b){var c=[1001,1002,1003];this.P()&&0<=c.indexOf(b.code)&&(b.severity=1,this.Nc())};
function zi(){return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:0,bufferingTime:0,switchHistory:[],stateHistory:[]}}
n.dc=function(b){b.forEach(jd.bind(null,this.l,this.a?Yg(this.a):null,this.a?$g(this.a):null));var c=ib(b,function(b){return b.variants.some(sd)});if(0==c)throw new A(2,4,4032);if(c<b.length)throw new A(2,4,4011);b.forEach(function(b){id(b,this.c.restrictions,this.ob)&&this.a&&W(this.a)==b&&Hi(this);if(!b.variants.some(sd))throw new A(2,4,4012);}.bind(this))};
n.ub=function(b){jd(this.l,this.a?Yg(this.a):null,this.a?$g(this.a):null,b);var c=b.variants,d=c.some(sd);id(b,this.c.restrictions,this.ob)&&this.a&&W(this.a)==b&&Hi(this);b=c.some(sd);if(!d)throw new A(2,4,4011);if(!b)throw new A(2,4,4012);};function Pi(b,c,d){b.ya?(b.T=c,b.jc=d||!1):hh(b.a,c,d||!1)}function Si(b){if(b.b){var c=Date.now()/1E3;b.qb?b.j.bufferingTime+=c-b.mb:b.j.playTime+=c-b.mb;b.mb=c}}
function Gi(b,c){function d(b,c){if(!b)return null;var d=b.findSegmentPosition(c-g.startTime);return null==d?null:(d=b.getSegmentReference(d))?d.startTime+g.startTime:null}var e=Yg(b.a),f=$g(b.a),g=W(b.a);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}n.Je=function(b,c){this.h&&this.h.segmentDownloaded(b,c)};n.Uc=function(b){Si(this);this.qb=b;this.kb();if(this.g){var c=this.g.a;b!=c.g&&(c.g=b,Kg(c,c.f))}this.dispatchEvent(new F("buffering",{buffering:b}))};n.He=function(){Hi(this)};
n.kb=function(){if(!this.xa){var b=this.qb?"buffering":this.f.ended?"ended":this.f.paused?"paused":"playing";var c=Date.now()/1E3;if(this.j.stateHistory.length){var d=this.j.stateHistory[this.j.stateHistory.length-1];d.duration=c-d.timestamp;if(b==d.state)return}this.j.stateHistory.push({timestamp:c,state:b,duration:0})}};n.Ie=function(){if(this.A){var b=this.A;b.c.forEach(b.m.bind(b,!0))}this.a&&kh(this.a)};
function Ui(b,c){if(!c||!c.length)return b.Ua(new A(2,4,4012)),null;b.h.setVariants(c);return b.h.chooseVariant()}function Li(b,c){var d=td(c.variants,b.N,b.Ha,b.fa),e=xd(c.textStreams,b.wa,b.Va);if(d=Ui(b,d))Oi(b,d,!0),Pi(b,d,!0);(e=e[0])&&(b.c.streaming.alwaysStreamText||b.Ob())&&(Ni(b,e,!0),b.ya?b.H=e:gh(b.a,e,!0));Ii(b)}
n.Gd=function(b){this.ya=!0;this.h.disable();var c={audio:!1,text:!1},d=td(b.variants,this.N,this.Ha,this.fa,c),e=xd(b.textStreams,this.wa,this.Va,c);d=Ui(this,d);e=e[0]||null;if(this.T){a:{var f=this.b;for(var g=0;g<f.periods.length;++g)for(var h=f.periods[g],k=0;k<h.variants.length;++k)if(h.variants[k]==this.T){f=g;break a}f=-1}this.b.periods[f]==b&&(d=this.T);this.T=null}this.H&&(this.b.periods[Cd(this.b,this.H)]==b&&(e=this.H),this.H=null);d&&Oi(this,d,!0);e&&(Ni(this,e,!0),!Xg(this.a)&&d&&d.audio&&
c.text&&e.language!=d.audio.language&&(this.v.setTextVisibility(!0),Ri(this)));return this.c.streaming.alwaysStreamText||this.Ob()?{variant:d,text:e}:{variant:d,text:null}};n.ed=function(){this.ya=!1;this.c.abr.enabled&&this.h.enable();this.T&&(hh(this.a,this.T,this.jc),this.T=null);this.H&&(gh(this.a,this.H,!0),this.H=null)};n.Od=function(){this.m&&this.m.update&&this.m.update()};n.Yd=function(){this.g&&this.g.cb()};n.Ke=function(b,c){Oi(this,b,!0);this.a&&(hh(this.a,b,c||!1),Ii(this))};
function Ii(b){Promise.resolve().then(function(){this.xa||this.dispatchEvent(new F("adaptation"))}.bind(b))}function Hi(b){Promise.resolve().then(function(){this.xa||this.dispatchEvent(new F("trackschanged"))}.bind(b))}function Ri(b){b.dispatchEvent(new F("texttrackvisibility"))}n.Ua=function(b){if(!this.xa){var c=new F("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};n.ae=function(b){this.A?this.A.o(b):this.pb.push(b)};n.ib=function(b){this.dispatchEvent(b)};
n.be=function(){if(this.f.error){var b=this.f.error.code;if(1!=b){var c=this.f.error.msExtendedCode;c&&(0>c&&(c+=Math.pow(2,32)),c=c.toString(16));this.Ua(new A(2,3,3016,b,c,this.f.error.message))}}};
n.Md=function(b){var c=["output-restricted","internal-error"],d=W(this.a),e=!1,f=Object.keys(b),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(d){var f=[];d.audio&&f.push(d.audio);d.video&&f.push(d.video);f.forEach(function(f){var h=d.allowedByKeySystem;f.keyId&&(f=b[g?"00":f.keyId],d.allowedByKeySystem=!!f&&0>c.indexOf(f));h!=d.allowedByKeySystem&&(e=!0)})});(f=zd(Yg(this.a),$g(this.a),d.variants))&&!f.allowedByKeySystem&&Li(this,d);e&&(Hi(this),d=td(d.variants,this.N,this.Ha,this.fa),
this.h.setVariants(d))};n.Jd=function(b,c){if(this.m&&this.m.onExpirationUpdated)this.m.onExpirationUpdated(b,c);this.dispatchEvent(new F("expirationupdated"))};function Vi(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.S();c=nd(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function Wi(b,c){var d=oi(new mi(b.$(),b.O()),c.periods[0],new V(null,0)),e=c.appMetadata||{};d=nd(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}};function Xi(){this.a={}}function Yi(b,c,d){d=d.endTime-d.startTime;return Zi(b,c)*d}function Zi(b,c){var d=b.a[c];null==d&&(d=0);return d};function Z(b){if(!b||b.constructor!=Y)throw new A(2,9,9008);this.a=b;this.b=$i(this);this.g=!1;this.c=null;this.f=[]}x("shaka.offline.Storage",Z);function aj(){return Th()}Z.support=aj;Z.prototype.destroy=function(){this.a=this.b=null;return Promise.resolve()};Z.prototype.destroy=Z.prototype.destroy;Z.prototype.configure=function(b){jb(this.b,b,$i(this),{},"")};Z.prototype.configure=Z.prototype.configure;
Z.prototype.store=function(b,c,d){var e=this;return p(function g(){var h,k,l,m,r,t;return v(g,function(g){switch(g.B){case 1:bj();if(e.g)return g["return"](Promise.reject(new A(2,9,9006)));e.g=!0;h=c||{};k=null;l=function(b){k=k||b};return q(g,cj(e,b,l,d),2);case 2:m=g.M;r=!m.manifest.presentationTimeline.P()&&!m.manifest.presentationTimeline.Ba();if(!r)throw new A(2,9,9005,b);dj(e);if(k)throw k;t=new Nh;return g["return"](lb([t,m.Gb],function(){return p(function w(){var c,d,g,l,r,u,Mb;return v(w,
function(w){switch(w.B){case 1:return oa(w),q(w,t.init(),4);case 4:return dj(e),ej(e,m.Gb,m.manifest.periods),q(w,Ph(t),5);case 5:return c=w.M,dj(e),w.qa=6,q(w,fj(e,c.O,m.Gb,m.manifest,b,h||{}),8);case 8:return d=w.M,dj(e),q(w,c.O.addManifests([d]),9);case 9:return g=w.M,dj(e),l=new ki("manifest",c.path.$,c.path.O,g[0]),w["return"](Wi(l,d));case 6:return r=qa(w),u=e.f,Mb=function(){},q(w,c.O.removeSegments(u,Mb),10);case 10:throw k||r;case 2:ra(w),e.g=!1,e.c=null,e.f=[],sa(w)}})})}))}})})};
Z.prototype.store=Z.prototype.store;function fj(b,c,d,e,f,g){var h=Vi(f,e,g),k=new Dh(function(c,d){h.size=d;b.b.progressCallback(h,c)}),l;return lb([k],function(){l=gj(b,k,c,d,e,f,g);return Fh(k,b.a.u)}).then(function(){l.size=h.size;return l})}
Z.prototype.remove=function(b){var c=this;bj();var d=li(b);if(null==d||"manifest"!=d.a)return Promise.reject(new A(2,9,9004,b));var e=new Nh;return lb([e],function(){return p(function g(){var b,k,l;return v(g,function(g){switch(g.B){case 1:return q(g,e.init(),2);case 2:return q(g,Rh(e,d.$(),d.O()),3);case 3:return b=g.M,q(g,b.getManifests([d.key()]),4);case 4:return k=g.M,l=k[0],q(g,Promise.all([hj(c,d,l),ij(c,b,d,l)]),0)}})})})};Z.prototype.remove=Z.prototype.remove;
function hj(b,c,d){var e,f=new $b({Oa:b.a.u,onError:function(b){6013!=b.code&&(e=b)},zb:function(){},onExpirationUpdated:function(){},onEvent:function(){}});f.configure(b.a.getConfiguration().drm);var g=ni(new mi(c.$(),c.O()),d);return lb([f],function(){return p(function k(){return v(k,function(c){switch(c.B){case 1:return q(c,f.init(g,b.b.usePersistentLicense),2);case 2:return q(c,dc(f,d.sessionIds),0)}})})}).then(function(){if(e)throw e;})}
function ij(b,c,d,e){function f(){k+=1;b.b.progressCallback(l,k/h)}var g=jj(e),h=g.length+1,k=0,l=Wi(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}
Z.prototype.list=function(){function b(b,d){return p(function h(){var e;return v(h,function(f){switch(f.B){case 1:return q(f,d.getAllManifests(),2);case 2:e=f.M,Jb(e,function(d,e){var f=Wi(new ki("manifest",b.$,b.O,d),e);c.push(f)}),f.B=0}})})}bj();var c=[],d=new Nh;return lb([d],function(){return p(function f(){var c;return v(f,function(f){switch(f.B){case 1:return q(f,d.init(),2);case 2:return c=Promise.resolve(),Qh(d,function(d,f){c=c.then(function(){return b(d,f)})}),q(f,c,0)}})})}).then(function(){return c})};
Z.prototype.list=Z.prototype.list;
function cj(b,c,d,e){function f(){}var g=b.a.u,h=b.a.getConfiguration(),k,l,m;return pf(c,g,h.manifest.retryParameters,e).then(function(b){var e=this;dj(this);l=new $b({Oa:g,onError:d,zb:f,onExpirationUpdated:function(){},onEvent:function(){}});l.configure(h.drm);var k={networkingEngine:g,filterAllPeriods:function(b){ej(e,l,b)},filterNewPeriod:function(b){kj(e,l,b)},onTimelineRegionAdded:function(){},onEvent:function(){},onError:d};m=new b;m.configure(h.manifest);return m.start(c,k)}.bind(b)).then(function(b){dj(this);
k=b;return l.init(k,this.b.usePersistentLicense)}.bind(b)).then(function(){dj(this);return lj(k)}.bind(b)).then(function(){dj(this);return cc(l)}.bind(b)).then(function(){dj(this);return m.stop()}.bind(b)).then(function(){dj(this);return{manifest:k,Gb:l}}.bind(b))["catch"](function(b){if(m)return m.stop().then(function(){throw b;});throw b;})}
function mj(b,c){var d=[],e=fd(b),f=[0,dd,ed],g=c.filter(function(b){return"variant"==b.type});f=f.map(function(b){return g.filter(function(c){c=fd(c.language);return cd(b,e,c)})});for(var h,k=0;k<f.length;k++)if(f[k].length){h=f[k];break}h||(f=g.filter(function(b){return b.primary}),f.length&&(h=f));h||(h=g,g.map(function(b){return b.language}).filter(Db));var l=h.filter(function(b){return b.height&&480>=b.height});l.length&&(l.sort(function(b,c){return c.height-b.height}),h=l.filter(function(b){return b.height==
l[0].height}));h.sort(function(b,c){return b.bandwidth-c.bandwidth});h.length&&d.push(h[Math.floor(h.length/2)]);d.push.apply(d,c.filter(function(b){return"text"==b.type}));return d}function $i(b){return{trackSelectionCallback:function(c){var d=b.a.getConfiguration();return mj(d.preferredAudioLanguage,c)},progressCallback:function(b,d){if(b||d)return null},usePersistentLicense:!0}}function ej(b,c,d){d.forEach(function(d){return kj(b,c,d)})}
function kj(b,c,d){var e=null;if(b.c){var f=b.c.filter(function(b){return"variant"==b.type})[0];f&&(e=rd(d,f))}var g=f=null;e&&(e.audio&&(f=e.audio),e.video&&(g=e.video));jd(c,f,g,d);id(d,b.a.getConfiguration().restrictions,{width:Infinity,height:Infinity})}
function lj(b){var c=b.periods.map(function(b){return b.variants}).reduce(Ab,[]).map(function(b){var c=[];b.audio&&c.push(b.audio);b.video&&c.push(b.video);return c}).reduce(Ab,[]).filter(Db);b=b.periods.map(function(b){return b.textStreams}).reduce(Ab,[]);c.push.apply(c,b);return Promise.all(c.map(function(b){return b.createSegmentIndex()}))}
function gj(b,c,d,e,f,g,h){var k=new Xi,l=f.periods.map(function(g){return nj(b,c,d,k,e,f,g)}),m=e.b,r=gc(e);if(m&&b.b.usePersistentLicense){if(!r.length)throw new A(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.S(),size:0,expiration:e.wb(),periods:l,sessionIds:b.b.usePersistentLicense?r:[],drmInfo:m,appMetadata:h}}
function nj(b,c,d,e,f,g,h){var k=pd(h,null,null),l=qd(h,null);k=b.b.trackSelectionCallback(k.concat(l));null==b.c&&(b.c=k,ej(b,f,g.periods));oj(k);g.periods.forEach(function(b){b.variants.forEach(function(b){var c=b.audio,d=b.video;c&&!d&&(e.a[c.id]=c.bandwidth||b.bandwidth);!c&&d&&(e.a[d.id]=d.bandwidth||b.bandwidth);if(c&&d){var f=c.bandwidth||393216,g=d.bandwidth||b.bandwidth-f;0>=g&&(g=b.bandwidth);e.a[c.id]=f;e.a[d.id]=g}});b.textStreams.forEach(function(b){e.a[b.id]=52})});var m={};k.forEach(function(b){"variant"==
b.type&&null!=b.audioId&&(m[b.audioId]=!0);"variant"==b.type&&null!=b.videoId&&(m[b.videoId]=!0);"text"==b.type&&(m[b.id]=!0)});var r={};pj(g).filter(function(b){return!!m[b.id]}).forEach(function(f){r[f.id]=qj(b,c,d,e,g,f)});k.forEach(function(b){"variant"==b.type&&null!=b.audioId&&r[b.audioId].variantIds.push(b.id);"variant"==b.type&&null!=b.videoId&&r[b.videoId].variantIds.push(b.id)});return{startTime:h.startTime,streams:G(r)}}
function qj(b,c,d,e,f,g){var h={id:g.id,primary:g.primary,presentationTimeOffset:g.presentationTimeOffset||0,contentType:g.type,mimeType:g.mimeType,codecs:g.codecs,frameRate:g.frameRate,kind:g.kind,language:g.language,label:g.label,width:g.width||null,height:g.height||null,initSegmentKey:null,encrypted:g.encrypted,keyId:g.keyId,segments:[],variantIds:[]};f=f.presentationTimeline.Za();var k=g.id;rj(g,f,function(f){Eh(c,k,sj(b,f),Yi(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.f.push(c[0]);
h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});(f=g.initSegmentReference)&&Eh(c,k,sj(b,f),.5*Zi(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.f.push(c[0]);h.initSegmentKey=c[0]})});return h}function rj(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function dj(b){if(!b.a)throw new A(2,9,7001);}function bj(){if(!Th())throw new A(2,9,9E3);}
function sj(b,c){var d=b.a.getConfiguration().streaming.retryParameters;d=qb(c.c(),d);if(0!=c.b||null!=c.a)d.headers.Range="bytes="+c.b+"-"+(null==c.a?"":c.a);return d}function jj(b){var c=[];b.periods.forEach(function(b){b.streams.forEach(function(b){null!=b.initSegmentKey&&c.push(b.initSegmentKey);b.segments.forEach(function(b){c.push(b.dataKey)})})});return c}
Z.deleteAll=function(b){var c=b.u,d=b.getConfiguration().drm,e=new Nh;return lb([e],function(){return p(function g(){var b,k;return v(g,function(g){switch(g.B){case 1:return q(g,e.init(),2);case 2:return q(g,tj(e),3);case 3:return b=g.M,k=Promise.resolve(),b.forEach(function(b){k=k.then(function(){return uj(c,d,b)})}),q(g,k,4);case 4:return q(g,Sh(e),0)}})})})};
function uj(b,c,d){var e=new $b({Oa:b,onError:function(){},zb:function(){},onExpirationUpdated:function(){},onEvent:function(){}});e.configure(c);return lb([e],function(){return p(function g(){return v(g,function(b){switch(b.B){case 1:return q(b,e.init(d,!0),2);case 2:return q(b,dc(e,d.offlineSessionIds),0)}})})})}function oj(b){b.some(function(c){return b.some(function(b){return c!=b&&c.type==b.type&&c.kind==b.kind&&c.language==b.language})})}
function pj(b){var c={};b.periods.forEach(function(b){b.textStreams.forEach(function(b){c[b.id]=b});b.variants.forEach(function(b){b.audio&&(c[b.audio.id]=b.audio);b.video&&(c[b.video.id]=b.video)})});return G(c)}function tj(b){var c=[],d=[];Qh(b,function(b,f){var e=new mi(b.$,b.O);d.push(f.getAllManifests().then(function(b){G(b).forEach(function(b){c.push(ni(e,b))})}))});return Promise.all(d).then(function(){return c})}Bi.offline=aj;x("shaka.polyfill.installAll",function(){for(var b=0;b<vj.length;++b)vj[b].cd()});var vj=[];function wj(b,c){c=c||0;for(var d={priority:c,cd:b},e=0;e<vj.length;e++)if(vj[e].priority<c){vj.splice(e,0,d);return}vj.push(d)}x("shaka.polyfill.register",wj);function xj(b){var c=b.type.replace(/^(webkit|moz|MS)/,"").toLowerCase();if("function"===typeof Event)var d=new Event(c,b);else d=document.createEvent("Event"),d.initEvent(c,b.bubbles,b.cancelable);b.target.dispatchEvent(d)}
wj(function(){if(window.Document){var b=Element.prototype;b.requestFullscreen=b.requestFullscreen||b.mozRequestFullScreen||b.msRequestFullscreen||b.webkitRequestFullscreen;b=Document.prototype;b.exitFullscreen=b.exitFullscreen||b.mozCancelFullScreen||b.msExitFullscreen||b.webkitExitFullscreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,
"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));document.addEventListener("webkitfullscreenchange",xj);document.addEventListener("webkitfullscreenerror",xj);document.addEventListener("mozfullscreenchange",xj);document.addEventListener("mozfullscreenerror",xj);document.addEventListener("MSFullscreenChange",xj);document.addEventListener("MSFullscreenError",xj)}});wj(function(){var b=navigator.userAgent;b&&0<=b.indexOf("CrKey")&&delete window.indexedDB});var yj;function zj(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}yj.call(this,b,c,d)}wj(function(){0>navigator.userAgent.indexOf("Trident/")||HTMLInputElement.prototype.addEventListener==zj||(yj=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=zj)});wj(function(){});function Aj(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var c=b.apply(this,arguments);c.abort=function(){};return c}}function Bj(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
function Cj(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(){for(var c=0,d=0;d<this.sourceBuffers.length;++d){var g=this.sourceBuffers[d];g=g.buffered.end(g.buffered.length-1);c=Math.max(c,g)}if(!isNaN(this.duration)&&c<this.duration)for(this.tc=!0,c=0;c<this.sourceBuffers.length;++c)this.sourceBuffers[c].oc=!1;return b.apply(this,arguments)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(){var b=d.apply(this,arguments);
b.mediaSource_=this;b.addEventListener("updateend",Dj,!1);c||(this.addEventListener("sourceclose",Ej,!1),c=!0);return b}}function Dj(b){var c=b.target,d=c.mediaSource_;if(d.tc){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.oc=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].oc)return;d.tc=!1}}
function Ej(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",Dj,!1);b.removeEventListener("sourceclose",Ej,!1)}function Fj(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1]?!1:b(c)}}
function Gj(){var b=MediaSource.isTypeSupported,c=/^dv(?:he|av)\./;MediaSource.isTypeSupported=function(d){for(var e=d.split(/ *; */),f=e[0],g={},h=1;h<e.length;++h){var k=e[h].split("="),l=k[0];k=k[1].replace(/"(.*)"/,"$1");g[l]=k}e=g.codecs;if(!e)return b(d);var m=!1,r=!1;d=e.split(",").filter(function(b){if(c.test(b))return r=!0,!1;/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});r&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var t in g)f+="; "+t+'="'+g[t]+'"';return cast.__platform__.canDisplayType(f)}}
wj(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)Gj();else if(navigator.vendor&&0<=navigator.vendor.indexOf("Apple")){var b=navigator.appVersion;Fj();0<=b.indexOf("Version/8")?window.MediaSource=null:0<=b.indexOf("Version/9")?Aj():0<=b.indexOf("Version/10")?(Aj(),Cj()):0<=b.indexOf("Version/11")&&(Aj(),Bj())}});function Hj(b){this.f=[];this.b=[];this.a=[];(new S).Y("pssh",this.c.bind(this)).parse(b.buffer)}Hj.prototype.c=function(b){if(!(1<b.version)){var c=Xb(b.s.Ea(16)),d=[];if(0<b.version)for(var e=b.s.C(),f=0;f<e;++f){var g=Xb(b.s.Ea(16));d.push(g)}e=b.s.C();b.s.F(e);this.b.push.apply(this.b,d);this.f.push(c);this.a.push({start:b.start,end:b.start+b.size-1})}};function Ij(b,c){try{var d=new Jj(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
function Jj(b,c){this.keySystem=b;for(var d=!1,e=0;e<c.length;++e){var f=c[e],g={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:f.initDataTypes,sessionTypes:["temporary"],label:f.label},h=!1;if(f.audioCapabilities)for(var k=0;k<f.audioCapabilities.length;++k){var l=f.audioCapabilities[k];if(l.contentType){h=!0;var m=l.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.audioCapabilities.push(l),d=!0)}}if(f.videoCapabilities)for(k=
0;k<f.videoCapabilities.length;++k)l=f.videoCapabilities[k],l.contentType&&(h=!0,m=l.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,m)&&(g.videoCapabilities.push(l),d=!0));h||(d=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4"));"required"==f.persistentState&&(d=!1);if(d){this.a=g;return}}d=Error("Unsupported keySystem");d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}Jj.prototype.createMediaKeys=function(){var b=new Kj(this.keySystem);return Promise.resolve(b)};
Jj.prototype.getConfiguration=function(){return this.a};function Lj(b){var c=this.mediaKeys;c&&c!=b&&Mj(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?Mj(b,this):Promise.resolve()}function Kj(b){this.a=new MSMediaKeys(b);this.b=new D}Kj.prototype.createSession=function(b){var c=b||"temporary";if("temporary"!=c)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new Nj(this.a,c)};Kj.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function Mj(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}wb(b.b);if(!c)return Promise.resolve();E(b.b,c,"msneedkey",Oj);var e=b;try{return 1<=c.readyState?c.msSetMediaKeys(b.a):c.addEventListener("loadedmetadata",d),Promise.resolve()}catch(f){return Promise.reject(f)}}function Nj(b){L.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new D;this.sessionId="";this.expiration=NaN;this.closed=new z;this.keyStatuses=new Pj}za(Nj,L);n=Nj.prototype;
n.generateRequest=function(b,c){this.a=new z;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),E(this.f,this.c,"mskeymessage",this.Sd.bind(this)),E(this.f,this.c,"mskeyadded",this.Qd.bind(this)),E(this.f,this.c,"mskeyerror",this.Rd.bind(this)),Qj(this,"status-pending")}catch(d){this.a.reject(d)}return this.a};n.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))};n.update=function(b){this.b=new z;try{this.c.update(new Uint8Array(b))}catch(c){this.b.reject(c)}return this.b};
n.close=function(){try{this.c.close(),this.closed.resolve(),wb(this.f)}catch(b){this.closed.reject(b)}return this.closed};n.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))};
function Oj(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";if(b=b.initData){var d=new Hj(b);if(!(1>=d.a.length)){for(var e=[],f=0;f<d.a.length;f++)e.push(b.subarray(d.a[f].start,d.a[f].end+1));b=fb(e,Rj);for(e=d=0;e<b.length;e++)d+=b[e].length;d=new Uint8Array(d);for(f=e=0;f<b.length;f++)d.set(b[f],e),e+=b[f].length;b=d}}c.initData=b;this.dispatchEvent(c)}function Rj(b,c){return Yb(b,c)}
n.Sd=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new F("message",{messageType:void 0==this.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message.buffer}))};n.Qd=function(){this.a?(Qj(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Qj(this,"usable"),this.b.resolve(),this.b=null)};
n.Rd=function(){var b=Error("EME PatchedMediaKeysMs key error");b.errorCode=this.c.error;if(null!=this.a)this.a.reject(b),this.a=null;else if(null!=this.b)this.b.reject(b),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Qj(this,"output-not-allowed");break;default:Qj(this,"internal-error")}};function Qj(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new F("keystatuseschange"))}
function Pj(){this.size=0;this.a=void 0}var Sj;n=Pj.prototype;n.forEach=function(b){this.a&&b(this.a,Sj)};n.get=function(b){if(this.has(b))return this.a};n.has=function(b){var c=Sj;return this.a&&Yb(new Uint8Array(b),new Uint8Array(c))?!0:!1};n.entries=function(){};n.keys=function(){};n.values=function(){};
wj(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(Sj=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Lj,window.MediaKeys=Kj,window.MediaKeySystemAccess=Jj,navigator.requestMediaKeySystemAccess=Ij)});function Tj(){return Promise.reject(Error("The key system specified is not supported."))}function Uj(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Vj(){throw new TypeError("Illegal constructor.");}Vj.prototype.createSession=function(){};Vj.prototype.setServerCertificate=function(){};function Wj(){throw new TypeError("Illegal constructor.");}Wj.prototype.getConfiguration=function(){};Wj.prototype.createMediaKeys=function(){};
wj(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Tj,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Uj,window.MediaKeys=Vj,window.MediaKeySystemAccess=Wj)},-10);var Xj="";function Yj(b){var c=Xj;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function Zj(b,c){try{var d=new ak(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function bk(b){var c=this.mediaKeys;c&&c!=b&&ck(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&ck(b,this);return Promise.resolve()}
function ak(b,c){this.a=this.keySystem=b;var d=!1;"org.w3.clearkey"==b&&(this.a="webkit-org.w3.clearkey",d=!1);var e=!1;var f=document.getElementsByTagName("video");f=f.length?f[0]:document.createElement("video");for(var g=0;g<c.length;++g){var h=c[g],k={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:h.initDataTypes,sessionTypes:["temporary"],label:h.label},l=!1;if(h.audioCapabilities)for(var m=0;m<h.audioCapabilities.length;++m){var r=
h.audioCapabilities[m];if(r.contentType){l=!0;var t=r.contentType.split(";")[0];f.canPlayType(t,this.a)&&(k.audioCapabilities.push(r),e=!0)}}if(h.videoCapabilities)for(m=0;m<h.videoCapabilities.length;++m)r=h.videoCapabilities[m],r.contentType&&(l=!0,f.canPlayType(r.contentType,this.a)&&(k.videoCapabilities.push(r),e=!0));l||(e=f.canPlayType("video/mp4",this.a)||f.canPlayType("video/webm",this.a));"required"==h.persistentState&&(d?(k.persistentState="required",k.sessionTypes=["persistent-license"]):
e=!1);if(e){this.b=k;return}}d="Unsupported keySystem";if("org.w3.clearkey"==b||"com.widevine.alpha"==b)d="None of the requested configurations were supported.";d=Error(d);d.name="NotSupportedError";d.code=DOMException.NOT_SUPPORTED_ERR;throw d;}ak.prototype.createMediaKeys=function(){var b=new dk(this.a);return Promise.resolve(b)};ak.prototype.getConfiguration=function(){return this.b};function dk(b){this.g=b;this.b=null;this.a=new D;this.c=[];this.f={}}
function ck(b,c){b.b=c;wb(b.a);var d=Xj;c&&(E(b.a,c,d+"needkey",b.fe.bind(b)),E(b.a,c,d+"keymessage",b.ee.bind(b)),E(b.a,c,d+"keyadded",b.ce.bind(b)),E(b.a,c,d+"keyerror",b.de.bind(b)))}n=dk.prototype;n.createSession=function(b){var c=b||"temporary";if("temporary"!=c&&"persistent-license"!=c)throw new TypeError("Session type "+b+" is unsupported on this platform.");b=this.b||document.createElement("video");b.src||(b.src="about:blank");c=new ek(b,this.g,c);this.c.push(c);return c};
n.setServerCertificate=function(){return Promise.resolve(!1)};n.fe=function(b){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="webm";c.initData=b.initData;this.b.dispatchEvent(c)};n.ee=function(b){var c=fk(this,b.sessionId);c&&(b=new F("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
n.ce=function(b){if(b=fk(this,b.sessionId))gk(b,"usable"),b.a&&b.a.resolve(),b.a=null};
n.de=function(b){var c=fk(this,b.sessionId);if(c){var d=Error("EME v0.1b key error");d.errorCode=b.errorCode;d.errorCode.systemCode=b.systemCode;!b.sessionId&&c.b?(d.method="generateRequest",45==b.systemCode&&(d.message="Unsupported session type."),c.b.reject(d),c.b=null):b.sessionId&&c.a?(d.method="update",c.a.reject(d),c.a=null):(d=b.systemCode,b.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?gk(c,"output-restricted"):1==d?gk(c,"expired"):gk(c,"internal-error"))}};
function fk(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function ek(b,c,d){L.call(this);this.f=b;this.h=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new z;this.keyStatuses=new hk}za(ek,L);
function ik(b,c,d){if(b.h)return Promise.reject(Error("The session is already initialized."));b.h=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(Qb("LOAD_SESSION|"+d));else{var f=Qb("PERSISTENT|"),g=new Uint8Array(f.byteLength+c.byteLength);g.set(new Uint8Array(f),0);g.set(new Uint8Array(c),f.byteLength);e=g}else e=new Uint8Array(c)}catch(k){return Promise.reject(k)}b.b=new z;var h=Yj("generateKeyRequest");try{b.f[h](b.c,e)}catch(k){if("InvalidStateError"!=k.name)return b.b=null,Promise.reject(k);
setTimeout(function(){try{this.f[h](this.c,e)}catch(l){this.b.reject(l),this.b=null}}.bind(b),10)}return b.b}n=ek.prototype;
n.ec=function(b,c){if(this.a)this.a.then(this.ec.bind(this,b,c))["catch"](this.ec.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=H(c);var e=JSON.parse(d);"oct"!=e.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null);d=Vb(e.keys[0].k);e=Vb(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=Yj("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
function gk(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new F("keystatuseschange"))}n.generateRequest=function(b,c){return ik(this,c,null)};n.load=function(b){return"persistent-license"==this.g?ik(this,null,b):Promise.reject(Error("Not a persistent session."))};n.update=function(b){var c=new z;this.ec(c,b);return c};
n.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var b=Yj("cancelKeyRequest");try{this.f[b](this.c,this.sessionId)}catch(c){}}this.closed.resolve();return this.closed};n.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};function hk(){this.size=0;this.a=void 0}var jk;n=hk.prototype;n.forEach=function(b){this.a&&b(this.a,jk)};n.get=function(b){if(this.has(b))return this.a};
n.has=function(b){var c=jk;return this.a&&Yb(new Uint8Array(b),new Uint8Array(c))?!0:!1};n.entries=function(){};n.keys=function(){};n.values=function(){};
wj(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Xj="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;jk=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=Zj;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=bk;window.MediaKeys=dk;window.MediaKeySystemAccess=
ak}});wj(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this,arguments);c&&c["catch"](function(){});return c}}});function kk(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}wj(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=kk)}});function lk(b,c,d){return new window.TextTrackCue(b,c,d)}function mk(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}wj(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=lk;else if(6==b)window.VTTCue=mk;else{try{var c=!!lk(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=lk)}}});function nk(){}nk.prototype.parseInit=function(){};
nk.prototype.parseMedia=function(b,c){var d=H(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(Ha){throw new A(2,2,2005);}if(g){if(f=g.getElementsByTagName("tt")[0]){g=f.getAttribute("ttp:frameRate");var h=f.getAttribute("ttp:subFrameRate");var k=f.getAttribute("ttp:frameRateMultiplier");var l=f.getAttribute("ttp:tickRate");d=f.getAttribute("xml:space")||"default"}else throw new A(2,2,2005);if("default"!=d&&"preserve"!=d)throw new A(2,2,2005);d="default"==d;g=new ok(g,h,
k,l);h=pk(f.getElementsByTagName("styling")[0]);k=pk(f.getElementsByTagName("layout")[0]);l=[];for(var m=0;m<k.length;m++){var r=k[m],t=h;var u=new vc;var y=r.getAttribute("xml:id");if(y){u.id=y;var w;if(w=qk(r,t,"tts:extent"))w=(y=rk.exec(w))||sk.exec(w),null!=w&&(u.width=Number(w[1]),u.height=Number(w[2]),u.widthUnits=y?Ic:0,u.heightUnits=y?Ic:0);if(r=qk(r,t,"tts:origin"))w=(y=rk.exec(r))||sk.exec(r),null!=w&&(u.viewportAnchorX=Number(w[1]),u.viewportAnchorY=Number(w[2]),u.viewportAnchorUnits=y?
Ic:0)}else u=null;u&&l.push(u)}f=pk(f.getElementsByTagName("body")[0]);for(m=0;m<f.length;m++)(u=tk(f[m],c.periodStart,g,h,k,l,d))&&e.push(u)}return e};
var rk=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,uk=/^(\d+px|\d+em)$/,sk=/^(\d+)px (\d+)px$/,vk=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wk=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,xk=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,yk=/^(\d*(?:\.\d*)?)f$/,zk=/^(\d*(?:\.\d*)?)t$/,Ak=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Bk={left:"start",center:Ac,right:"end",start:"start",end:"end"},Ck={left:"line-left",center:"center",right:"line-right"};
function pk(b){var c=[];if(!b)return c;for(var d=b.childNodes,e=0;e<d.length;e++){var f="span"==d[e].nodeName&&"p"==b.nodeName;d[e].nodeType!=Node.ELEMENT_NODE||"br"==d[e].nodeName||f||(f=pk(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function Dk(b,c){for(var d=b.childNodes,e=0;e<d.length;e++)if("br"==d[e].nodeName&&0<e)d[e-1].textContent+="\n";else if(0<d[e].childNodes.length)Dk(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
function tk(b,c,d,e,f,g,h){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;Dk(b,h);h=Ek(b.getAttribute("begin"),d);var k=Ek(b.getAttribute("end"),d);d=Ek(b.getAttribute("dur"),d);var l=b.textContent;null==k&&null!=d&&(k=h+d);if(null==h||null==k)throw new A(2,2,2001);c=new I(h+c,k+c,l);if((f=Fk(b,"region",f))&&f.getAttribute("xml:id")){var m=f.getAttribute("xml:id");g=g.filter(function(b){return b.id==m});c.region=g[0]}Gk(c,b,f,e);return c}
function Gk(b,c,d,e){"rtl"==Hk(c,d,e,"tts:direction")&&(b.writingDirection=1);var f=Hk(c,d,e,"tts:writingMode");"tb"==f||"tblr"==f?b.writingDirection=2:"tbrl"==f?b.writingDirection=3:"rltb"==f||"rl"==f?b.writingDirection=1:f&&(b.writingDirection=yc);if(f=Hk(c,d,e,"tts:textAlign"))b.positionAlign=Ck[f],b.lineAlign=Bk[f],b.textAlign=Ec[f.toUpperCase()];if(f=Hk(c,d,e,"tts:displayAlign"))b.displayAlign=Fc[f.toUpperCase()];if(f=Hk(c,d,e,"tts:color"))b.color=f;if(f=Hk(c,d,e,"tts:backgroundColor"))b.backgroundColor=
f;if(f=Hk(c,d,e,"tts:fontFamily"))b.fontFamily=f;(f=Hk(c,d,e,"tts:fontWeight"))&&"bold"==f&&(b.fontWeight=700);(f=Hk(c,d,e,"tts:wrapOption"))&&"noWrap"==f&&(b.wrapLine=!1);(f=Hk(c,d,e,"tts:lineHeight"))&&f.match(uk)&&(b.lineHeight=f);(f=Hk(c,d,e,"tts:fontSize"))&&f.match(uk)&&(b.fontSize=f);if(f=Hk(c,d,e,"tts:fontStyle"))b.fontStyle=Hc[f.toUpperCase()];(d=qk(d,e,"tts:textDecoration"))&&Ik(b,d);(c=Jk(c,e,"tts:textDecoration"))&&Ik(b,c)}
function Ik(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":0>b.textDecoration.indexOf("underline")&&b.textDecoration.push("underline");break;case "noUnderline":0<=b.textDecoration.indexOf("underline")&&hb(b.textDecoration,"underline");break;case "lineThrough":0>b.textDecoration.indexOf("lineThrough")&&b.textDecoration.push("lineThrough");break;case "noLineThrough":0<=b.textDecoration.indexOf("lineThrough")&&hb(b.textDecoration,"lineThrough");break;case "overline":0>b.textDecoration.indexOf("overline")&&
b.textDecoration.push("overline");break;case "noOverline":0<=b.textDecoration.indexOf("overline")&&hb(b.textDecoration,"overline")}}function Hk(b,c,d,e){return(b=Jk(b,d,e))?b:qk(c,d,e)}function qk(b,c,d){for(var e=pk(b),f=0;f<e.length;f++){var g=e[f].getAttribute(d);if(g)return g}return(b=Fk(b,"style",c))?b.getAttribute(d):null}function Jk(b,c,d){return(b=Fk(b,"style",c))?b.getAttribute(d):null}
function Fk(b,c,d){if(!b||1>d.length)return null;var e=null,f=b;for(b=null;f&&!(b=f.getAttribute(c))&&(f=f.parentNode,f instanceof Element););if(c=b)for(b=0;b<d.length;b++)if(d[b].getAttribute("xml:id")==c){e=d[b];break}return e}
function Ek(b,c){var d=null;if(vk.test(b)){d=vk.exec(b);var e=Number(d[1]),f=Number(d[2]),g=Number(d[3]),h=Number(d[4]);h+=(Number(d[5])||0)/c.b;g+=h/c.frameRate;d=g+60*f+3600*e}else wk.test(b)?d=Kk(wk,b):xk.test(b)?d=Kk(xk,b):yk.test(b)?(d=yk.exec(b),d=Number(d[1])/c.frameRate):zk.test(b)?(d=zk.exec(b),d=Number(d[1])/c.a):Ak.test(b)&&(d=Kk(Ak,b));return d}
function Kk(b,c){var d=b.exec(c);return null==d||""==d[0]?null:(Number(d[4])||0)/1E3+(Number(d[3])||0)+60*(Number(d[2])||0)+3600*(Number(d[1])||0)}function ok(b,c,d,e){this.frameRate=Number(b)||30;this.b=Number(c)||1;this.a=Number(e);0==this.a&&(this.a=b?this.frameRate*this.b:1);d&&(b=/^(\d+) (\d+)$/g.exec(d))&&(this.frameRate*=b[1]/b[2])}J["application/ttml+xml"]=nk;function Lk(){this.a=new nk}Lk.prototype.parseInit=function(b){var c=!1;(new S).D("moov",T).D("trak",T).D("mdia",T).D("minf",T).D("stbl",T).Y("stsd",Ke).D("stpp",function(b){c=!0;b.ra.stop()}).parse(b);if(!c)throw new A(2,2,2007);};Lk.prototype.parseMedia=function(b,c){var d=!1,e=[];(new S).D("mdat",Le(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new A(2,2,2007);return e};J['application/mp4; codecs="stpp"']=Lk;
J['application/mp4; codecs="stpp.TTML.im1t"']=Lk;function Mk(){}Mk.prototype.parseInit=function(){};
Mk.prototype.parseMedia=function(b,c){var d=H(b);d=d.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");d=d.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new A(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,0<=d[0].indexOf("X-TIMESTAMP-MAP"))){var f=d[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),g=d[0].match(/MPEGTS:(\d+)/m);f&&g&&(e=Nk(new Of(f[1])),e=c.periodStart+(Number(g[1])/9E4-e))}g=[];var h=d[0].split("\n");for(f=1;f<h.length;f++)if(/^Region:/.test(h[f])){var k=new Of(h[f]),
l=new vc;Rf(k);Pf(k);for(var m=Rf(k);m;){var r=l,t=m;(m=/^id=(.*)$/.exec(t))?r.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(t))?r.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(t))?(r.height=Number(m[1]),r.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(t))?(r.regionAnchorX=Number(m[1]),r.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(t))?(r.viewportAnchorX=Number(m[1]),r.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(t)&&(r.scroll="up");Pf(k);
m=Rf(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;t=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;0>m[0].indexOf("--\x3e")&&(l=m[0],m.splice(0,1));r=new Of(m[0]);var u=Nk(r),y=Qf(r,/[ \t]+--\x3e[ \t]+/g),w=Nk(r);if(null==u||null==y||null==w)throw new A(2,2,2001);m=new I(u+t,w+t,m.slice(1).join("\n").trim());Pf(r);for(t=Rf(r);t;)Ok(m,t,h),Pf(r),t=Rf(r);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
function Ok(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=xc:b.textAlign=Ec[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingDirection="lr"==e[1]?2:3;else if(e=/^size:([\d.]+)%$/.exec(c))b.size=Number(e[1]);else if(e=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(c))b.position=Number(e[1]),e[2]&&(c=e[2],b.positionAlign="line-left"==c||"start"==c?"line-left":"line-right"==c||"end"==c?"line-right":"center");
else if(e=/^region:(.*)$/.exec(c)){if(c=Pk(d,e[1]))b.region=c}else if(d=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=1,b.line=Number(d[1]),d[2]&&(b.lineAlign=Gc[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=zc,b.line=Number(d[1]),d[2]&&(b.lineAlign=Gc[d[2].toUpperCase()])}function Pk(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
function Nk(b){b=Qf(b,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3})/g);if(null==b)return null;var c=Number(b[2]),d=Number(b[3]);return 59<c||59<d?null:Number(b[4])/1E3+d+60*c+3600*(Number(b[1])||0)}J["text/vtt"]=Mk;J['text/vtt; codecs="vtt"']=Mk;function Qk(){this.a=null}Qk.prototype.parseInit=function(b){var c=!1;(new S).D("moov",T).D("trak",T).D("mdia",T).Y("mdhd",function(b){0==b.version?(b.s.F(4),b.s.F(4),this.a=b.s.C(),b.s.F(4)):(b.s.F(8),b.s.F(8),this.a=b.s.C(),b.s.F(8));b.s.F(4)}.bind(this)).D("minf",T).D("stbl",T).Y("stsd",Ke).D("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new A(2,2,2008);if(!c)throw new A(2,2,2008);};
Qk.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new A(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,r=null;(new S).D("moof",T).D("traf",T).Y("tfdt",function(b){k=!0;e=0==b.version?b.s.C():b.s.Sa()}).Y("tfhd",function(b){var c=b.flags;b=b.s;b.F(4);c&1&&b.F(8);c&2&&b.F(4);r=c&8?b.C():null}).Y("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.s;var e=b.C();d&1&&b.F(4);d&4&&b.F(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,fc:null};d&256&&(k.duration=b.C());d&
512&&(k.sampleSize=b.C());d&1024&&b.F(4);d&2048&&(k.fc=0==c?b.C():b.Kc());g.push(k)}f=g}).D("mdat",Le(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new A(2,2,2008);var t=e,u=new DataView(g.buffer,g.byteOffset,g.byteLength),y=new R(u,0);f.forEach(function(b){var f=b.duration||r,g=b.fc?e+b.fc:t;t=g+(f||0);var k=0;do{var l=y.C();k+=l;var m=y.C(),u=null;"vttc"==Me(m)?8<l&&(u=y.Ea(l-8)):y.F(l-8);f&&u&&h.push(Rk(u,c.periodStart+g/d.a,c.periodStart+t/d.a))}while(b.sampleSize&&k<b.sampleSize)});return h.filter(Cb)};
function Rk(b,c,d){var e,f,g;(new S).D("payl",Le(function(b){e=H(b)})).D("iden",Le(function(b){f=H(b)})).D("sttg",Le(function(b){g=H(b)})).parse(b);return e?Sk(e,f,g,c,d):null}function Sk(b,c,d,e,f){b=new I(e,f,b);c&&(b.id=c);if(d)for(c=new Of(d),d=Rf(c);d;)Ok(b,d,[]),Pf(c),d=Rf(c);return b}J['application/mp4; codecs="wvtt"']=Qk;}.call(g,this));
if (typeof(module)!="undefined"&&module.exports)module.exports=g.shaka;
else if (typeof(define)!="undefined" && define.amd)define(function(){return g.shaka});
else this.shaka=g.shaka;
}).call(typeof window === "object" ? window : global);
//# sourceMappingURL=shaka-player.compiled.map