crudely start bringing in functionality from The Apparatus

This commit is contained in:
Vivian Lim 2019-12-20 18:10:24 -08:00
parent 73f7698aeb
commit 21f031610b
22 changed files with 11933 additions and 42 deletions

View File

@ -148,6 +148,7 @@ COPY --from=build-ffmpeg /usr/lib/libfdk-aac.so.2 /usr/lib/libfdk-aac.so.2
# Add NGINX path, config and static files.
ENV PATH "${PATH}:/usr/local/nginx/sbin"
ADD nginx.conf /etc/nginx/nginx.conf
ADD streamer_configs /
RUN mkdir -p /opt/data && mkdir /www
ADD static /www/static

View File

@ -8,4 +8,8 @@ services:
- 8080:80
- 8443:443
volumes:
- ./certs:/opt/certs
#- ./certs:/opt/certs
- ./nginx.conf:/etc/nginx/nginx.conf
- ./streamer_configs:/streamer_configs
- ./static:/www/static
- ./hls:/www/hls

8
hls/STREAMER1 copy.m3u8 Normal file
View File

@ -0,0 +1,8 @@
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=5128000,NAME="720p60 (Source)",RESOLUTION=1280x720,FRAME_RATE=60
STREAMER1/src.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2509600,NAME="480p30",RESOLUTION=854x480,FRAME_RATE=30
STREAMER1/med.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1048000,NAME="240p30",RESOLUTION=426x240,FRAME_RATE=30
STREAMER1/low.m3u8

4
hls/STREAMER1.m3u8 Normal file
View File

@ -0,0 +1,4 @@
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=5128000,NAME="720p60 (Source)",RESOLUTION=1280x720,FRAME_RATE=60
STREAMER1/src.m3u8

View File

@ -1,46 +1,33 @@
daemon off;
error_log /dev/stdout info;
error_log /dev/stderr;
events {
worker_connections 1024;
}
rtmp {
access_log /dev/stdout combined;
server {
listen 1935;
chunk_size 4000;
live on;
application stream {
live on;
exec ffmpeg -i rtmp://localhost:1935/stream/$name
-c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 2500k -f flv -g 30 -r 30 -s 1280x720 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_720p2628kbs
-c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 1000k -f flv -g 30 -r 30 -s 854x480 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_480p1128kbs
-c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 750k -f flv -g 30 -r 30 -s 640x360 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_360p878kbs
-c:a libfdk_aac -b:a 128k -c:v libx264 -b:v 400k -f flv -g 30 -r 30 -s 426x240 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_240p528kbs
-c:a libfdk_aac -b:a 64k -c:v libx264 -b:v 200k -f flv -g 15 -r 15 -s 426x240 -preset superfast -profile:v baseline rtmp://localhost:1935/hls/$name_240p264kbs;
}
application hls {
live on;
hls on;
hls_fragment_naming system;
hls_fragment 5;
hls_playlist_length 10;
hls_path /opt/data/hls;
hls_nested on;
hls_variant _720p2628kbs BANDWIDTH=2628000,RESOLUTION=1280x720;
hls_variant _480p1128kbs BANDWIDTH=1128000,RESOLUTION=854x480;
hls_variant _360p878kbs BANDWIDTH=878000,RESOLUTION=640x360;
hls_variant _240p528kbs BANDWIDTH=528000,RESOLUTION=426x240;
hls_variant _240p264kbs BANDWIDTH=264000,RESOLUTION=426x240;
}
include /streamer_configs/*.conf;
}
}
http {
#include mime.types; # missing in my container for some reason.
types {
text/html html htm shtml;
text/css css;
text/xml xml;
image/gif gif;
image/jpeg jpeg jpg;
application/javascript js;
}
access_log /dev/stdout combined;
ssl_ciphers HIGH:!aNULL:!MD5;
@ -49,6 +36,7 @@ http {
ssl_session_timeout 10m;
server {
root /www;
listen 80;
# Uncomment these lines to enable SSL.
@ -57,24 +45,18 @@ http {
# ssl_certificate /opt/certs/example.com.crt;
# ssl_certificate_key /opt/certs/example.com.key;
location /hls {
root /www;
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
root /opt/data;
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
}
location /live {
alias /opt/data/hls;
types {
application/vnd.apple.mpegurl m3u8;
video/mp2t ts;
}
add_header Cache-Control no-cache;
add_header Access-Control-Allow-Origin *;
if ($request_method = OPTIONS) {
return 200;
}
}
location /stat {
@ -82,8 +64,8 @@ http {
rtmp_stat_stylesheet static/stat.xsl;
}
location /static {
alias /www/static;
location / {
root /www/static;
}
location = /crossdomain.xml {
@ -91,5 +73,42 @@ http {
default_type text/xml;
expires 24h;
}
# begin XMPP
# location /xmpp/bosh {
# proxy_pass http://xmpp:24714/http-bind;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_buffering off;
# tcp_nodelay on;
# }
# location /xmpp/websocket {
# proxy_pass http://xmpp:24714/xmpp-websocket;
# proxy_http_version 1.1;
# proxy_set_header Connection "Upgrade";
# proxy_set_header Upgrade $http_upgrade;
# proxy_read_timeout 900s;
# proxy_set_header Host $host;
# proxy_set_header X-Forwarded-For $remote_addr;
# proxy_buffering off;
# tcp_nodelay on;
# }
# end XMPP
# streamers
location ~ ^/(STREAMER1|STREAMER2|STREAMER3)$ {
default_type text/html;
alias /www/static/both.html;
}
location ~ ^/(STREAMER1|STREAMER2|STREAMER3)/chat$ {
default_type text/html;
alias /www/static/chat.html;
}
location ~ ^/(STREAMER1|STREAMER2|STREAMER3)/stream$ {
default_type text/html;
alias /www/static/stream.html;
}
}
}

11
notes.md Normal file
View File

@ -0,0 +1,11 @@
to play in vlc
http://192.168.1.69:8080/hls/STREAMER1.m3u8
to stream from obs
rtmp://192.168.1.69:1935/live_STREAMKEY
todo
* latency is high
* no xmpp yet
* configuring streamers is a huge pain
* medium and low transcodes are not working

1
static/STREAMER1.js Normal file
View File

@ -0,0 +1 @@
video.poster = "/STREAMER1.jpg";

126
static/app.css Normal file
View File

@ -0,0 +1,126 @@
*, *:before, *:after {
box-sizing: border-box;
font-family: sans-serif !important;
}
video {
object-fit: cover;
width: 100%;
height: 100%;
}
body {
background: #1A2327;
color: #FFF;
margin: 0;
padding: 0;
height: 100vh;
width: 100vw;
position: fixed;
}
.shaka-video-container {
width: calc(100vw - 300px);
height: calc((100vw - 300px) * (9 / 16));
position: relative;
top: calc((100vh - ((100vw - 300px) * (9 / 16))) / 2);
}
body.stream-only .shaka-video-container {
width: 100vw;
height: calc((100vw) * (9 / 16));
position: relative;
top: calc((100vh - ((100vw) * (9 / 16))) / 2);
}
#conversejs.chat {
position: absolute;
right: 0px;
top: 0px;
left: initial;
bottom: initial;
width: 300px;
height: 100vh;
overflow: hidden;
--chatroom-head-color: #009688;
--chatbox-border-radius: 0;
}
#conversejs .col-md-9 {
flex: 0 0 100%;
max-width: 100% !important;
}
#conversejs .message.chat-msg.chat-msg--followup .chat-msg__content {
margin-left: .5rem;
}
.chatroom-body, .chat-content, .chat-toolbar, .chat-textarea, .chatroom-form-container, .converse-form, .form-control, .separator-text {
background-color: #1A2327 !important;
color: #ECEFF1 !important;
}
.btn-primary {
background: #009688 !important;
color: #FFF !important;
opacity: 0.7;
transition: opacity 0.4s !important;
}
.btn-primary:hover {
opacity: 1;
}
.chat-msg__text {
color: inherit !important;
opacity: 0.8;
}
.chat-msg__time {
color: inherit !important;
opacity: 0.5;
}
.far:before {
font-family: ConverseFontAwesomeRegular !important;
}
.fa:before, .fas:before {
font-family: ConverseFontAwesomeSolid !important;
}
.chat-msg.correcting {
background: #F44336 !important;
}
.material-icons {
font-family: 'Material Icons' !important;
}
.chat-msg {
padding: .125rem .5rem !important;
}
.toggle-occupants, .occupants, .chat-head, .avatar, .chat-msg__receipt, .chat-state-notification {
display: none !important;
}
body.tall .shaka-video-container {
width: calc(100vw);
height: calc(100vw * (9 / 16));
top: 0;
}
body.stream-only.tall .shaka-video-container {
width: calc(100vw);
height: calc(100vw * (9 / 16));
top: calc((100vh - (100vw * (9 / 16))) / 2);
}
body.tall #conversejs.chat {
position: relative;
width: 100vw;
height: calc(100vh - (100vw * (9 / 16)));
}
body.wide .shaka-video-container {
width: calc(100vh * (16 / 9));
height: 100vh;
position: relative;
top: 0;
left: calc(((100vw - 300px) - (100vh * (16 / 9))) / 2);
}
body.stream-only.wide .shaka-video-container {
width: calc(100vh * (16 / 9));
height: 100vh;
position: relative;
top: 0;
left: calc(((100vw) - (100vh * (16 / 9))) / 2);
}
.popout-chat {
position: fixed !important;
top: 0 !important;
left: 0 !important;
right: 0 !important;
bottom: 0 !important;
width: 100vw !important;
height: 100vh !important;
}

33
static/both.html Normal file
View File

@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The Apparatus</title>
<script src="/mux.js"></script>
<script src="/shaka-player.compiled.js"></script>
<script src="/shaka-player.ui.js"></script>
<script src="/stream.js"></script>
<script src="/converse.min.js"></script>
<script src="/chat.js"></script>
<link rel="stylesheet" href="/material_icons.css"/>
<link rel="stylesheet" href="/controls.css"/>
<link rel="stylesheet" href="/converse.min.css"/>
<link rel="stylesheet" href="/app.css"/>
<script>
var streamer = window.location.pathname.substring(1);
document.getElementsByTagName("title")[0].textContent = streamer+" - The Apparatus";
</script>
</head>
<body>
<noscript>
The Apparatus requires JavaScript. Sorry.
</noscript>
<div id="shaka-mount-point">
<video id="video"></video>
</div>
<div class="chat" id="conversejs">
</div>
</body>
</html>

23
static/chat.html Normal file
View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The Apparatus</title>
<script src="/converse.min.js"></script>
<script src="/chat.js"></script>
<link rel="stylesheet" href="/converse.min.css"/>
<link rel="stylesheet" href="/app.css"/>
<script>
var streamer = window.location.pathname.split("/")[1];
document.getElementsByTagName("title")[0].textContent = streamer+" - The Apparatus";
</script>
</head>
<body>
<noscript>
The Apparatus requires JavaScript. Sorry.
</noscript>
<div id="conversejs" class="chat popout-chat"></div>
</body>
</html>

30
static/chat.js Normal file
View File

@ -0,0 +1,30 @@
document.addEventListener('DOMContentLoaded', function() {
var converseCfg = {
view_mode: "embedded",
anonymous: true,
jid: "chat.live.vvn.space",
auto_login: true,
allow_logout: false,
auto_reconnect: true,
play_sounds: false,
keepalive: true,
show_controlbox_by_default: true,
hide_muc_server: true,
allow_muc_invitations: false,
allow_contact_requests: false,
muc_show_join_leave: false,
use_system_emojis: false,
synchronize_availability: false,
authentication: "anonymous",
auto_join_rooms: [ {jid:streamer+"@muc-chat.live.vvn.space"}],
blacklisted_plugins: [
"converse-notification",
"converse-fullscreen",
]
};
if (window.location.hash !== "#bosh") {
converseCfg.websocket_url = "wss://chat.live.vvn.space/xmpp/websocket";
}
converseCfg.bosh_service_url = "https://chat.live.vvn.space/xmpp/bosh";
converse.initialize(converseCfg);
});

1011
static/controls.css Normal file

File diff suppressed because it is too large Load Diff

7
static/converse.min.css vendored Normal file

File diff suppressed because one or more lines are too long

160
static/converse.min.js vendored Normal file

File diff suppressed because one or more lines are too long

20
static/material_icons.css Normal file
View File

@ -0,0 +1,20 @@
@font-face {
font-family: 'Material Icons';
font-style: normal;
font-weight: 400;
src: url(material_icons.ttf) format('truetype');
}
.material-icons {
font-family: 'Material Icons';
font-weight: normal;
font-style: normal;
font-size: 24px;
line-height: 1;
letter-spacing: normal;
text-transform: none;
display: inline-block;
white-space: nowrap;
word-wrap: normal;
direction: ltr;
}

BIN
static/material_icons.ttf Normal file

Binary file not shown.

9085
static/mux.js Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,539 @@
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){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 ha(this)}});ea=function(){}}function ha(b){var c=0;return ka(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ka(b){ea();b={next:b};b[ba.Symbol.iterator]=function(){return this};return b}function q(b){ea();var c=b[Symbol.iterator];return c?c.call(b):ha(b)}
function la(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})}}
la("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.o),reject:b(this.f)}};c.prototype.o=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.s(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.m(b):this.h(b)}};c.prototype.m=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.v(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.l()};c.prototype.l=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.s=function(b){var c=this.c();b.Db(c.resolve,c.reject)};c.prototype.v=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(R){g(R)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.Db(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.Db=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=q(b),g=f.next();!g.done;g=f.next())e(g.value).Db(c,d)})};c.all=function(b){var d=q(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).Db(g(h.length-1),c),f=d.next();
while(!f.done)})};return c});la("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 ma(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 t(b){return ma(b())}
function na(){this.g=!1;this.c=null;this.u=void 0;this.j=1;this.b=this.f=0;this.i=this.a=null}function oa(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}na.prototype.h=function(b){this.u=b};function pa(b,c){b.a={Rc:c,fd:!0};b.j=b.f||b.b}na.prototype["return"]=function(b){this.a={"return":b};this.j=this.b};function u(b,c,d){b.j=d;return{value:c}}na.prototype.B=function(b){this.j=b};function qa(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function ra(b,c){b.f=0;b.b=c||0}
function sa(b,c){b.j=c;b.f=0}function ta(b){b.f=0;var c=b.a.Rc;b.a=null;return c}function ua(b){b.i=[b.a];b.f=0;b.b=0}function va(b,c){var d=b.i.splice(0)[0];(d=b.a=b.a||d)?d.fd?b.j=b.f||b.b:void 0!=d.B&&b.b<d.B?(b.j=d.B,b.a=null):b.j=b.b:b.j=c}function wa(b){this.a=new na;this.b=b}function xa(b,c){oa(b.a);var d=b.a.c;if(d)return ya(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return za(b)}
function ya(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,pa(b.a,h),za(b)}b.a.c=null;e.call(b.a,g);return za(b)}
function za(b){for(;b.a.j;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.u=void 0,pa(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.fd)throw c.Rc;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
function Aa(b){this.next=function(c){oa(b.a);b.a.c?c=ya(b,b.a.c.next,c,b.a.h):(b.a.h(c),c=za(b));return c};this["throw"]=function(c){oa(b.a);b.a.c?c=ya(b,b.a.c["throw"],c,b.a.h):(pa(b.a,c),c=za(b));return c};this["return"]=function(c){return xa(b,c)};ea();this[Symbol.iterator]=function(){return this}}function v(b,c){Aa.prototype=b.prototype;return new Aa(new wa(c))}function Ba(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
la("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){ca();ea();b=q(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Ba(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!Ba(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Ba(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Ba(b,f)&&Ba(b[f],this.a)};c.prototype["delete"]=function(b){return Ba(b,f)&&Ba(b[f],this.a)?delete b[f][this.a]:!1};return c});
la("Map",function(b){function c(){var b={};return b.ta=b.next=b.head=b}function d(b,c){var d=b.a;return ka(function(){if(d){for(;d.head!=b.a;)d=d.ta;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Ba(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,S:k}}return{id:d,
list:e,index:-1,S:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=q(b);for(var d;!(d=b.next()).done;)d=d.value,this.set(d[0],d[1])}}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b(q([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||
"t"!=f.value[1]||!e.next().done?!1:!0}catch(r){return!1}}())return b;ca();ea();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.S?d.S.value=c:(d.S={next:this.a,ta:this.a.ta,head:this.a,key:b,value:c},d.list.push(d.S),this.a.ta.next=d.S,this.a.ta=d.S,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.S&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.S.ta.next=b.S.next,b.S.next.ta=b.S.ta,b.S.head=
null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.ta=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).S};f.prototype.get=function(b){return(b=e(this,b).S)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),e;!(e=d.next()).done;)e=
e.value,b.call(c,e[1],e[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var h=0;return f});
la("Set",function(b){function c(b){this.a=new Map;if(b){b=q(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(q([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;ca();ea();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function Ca(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{bd:f,Kd:g}}return{bd:-1,Kd:void 0}}la("Array.prototype.findIndex",function(b){return b?b:function(b,d){return Ca(this,b,d).bd}});
function Da(b,c){ea();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}la("Array.prototype.keys",function(b){return b?b:function(){return Da(this,function(b){return b})}});la("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});
la("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});function Ea(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}
la("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Ea(this,b,"includes").indexOf(b,d||0)}});la("Array.from",function(b){return b?b:function(b,d,e){ea();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});la("Array.prototype.find",function(b){return b?b:function(b,d){return Ca(this,b,d).Kd}});
la("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Ea(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});var Fa=this;Fa.a=!0;function y(b,c){var d=b.split("."),e=Fa;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 Ga(b,c){function d(){}d.prototype=c.prototype;b.$f=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.Wf=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 Ha(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Ia(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 Ja(b){return b.a/(1-Math.pow(b.c,b.b))};function La(){this.b=new Ha(2);this.c=new Ha(5);this.a=0}La.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Ja(this.b),Ja(this.c))};function Ma(){}function Na(){}function Oa(){}window.console&&window.console.log.bind&&(Na=console.warn.bind(console),Ma=console.error.bind(console));var Pa=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Qa(b){var c;b instanceof Qa?(Ra(this,b.ka),this.La=b.La,this.pa=b.pa,Sa(this,b.Za),this.da=b.da,Ta(this,b.a.clone()),this.Ea=b.Ea):b&&(c=String(b).match(Pa))?(Ra(this,c[1]||"",!0),this.La=Ua(c[2]||""),this.pa=Ua(c[3]||"",!0),Sa(this,c[4]),this.da=Ua(c[5]||"",!0),Ta(this,c[6]||"",!0),this.Ea=Ua(c[7]||"")):this.a=new Va(null)}n=Qa.prototype;n.ka="";n.La="";n.pa="";n.Za=null;n.da="";n.Ea="";
n.toString=function(){var b=[],c=this.ka;c&&b.push(Wa(c,$a,!0),":");if(c=this.pa){b.push("//");var d=this.La;d&&b.push(Wa(d,$a,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.Za;null!=c&&b.push(":",String(c))}if(c=this.da)this.pa&&"/"!=c.charAt(0)&&b.push("/"),b.push(Wa(c,"/"==c.charAt(0)?ab:bb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.Ea)&&b.push("#",Wa(c,cb));return b.join("")};
n.resolve=function(b){var c=this.clone();"data"===c.ka&&(c=new Qa);var d=!!b.ka;d?Ra(c,b.ka):d=!!b.La;d?c.La=b.La:d=!!b.pa;d?c.pa=b.pa:d=null!=b.Za;var e=b.da;if(d)Sa(c,b.Za);else if(d=!!b.da){if("/"!=e.charAt(0))if(this.pa&&!this.da)e="/"+e;else{var f=c.da.lastIndexOf("/");-1!=f&&(e=c.da.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.da=e:d=""!==b.a.toString();d?Ta(c,b.a.clone()):d=!!b.Ea;d&&(c.Ea=b.Ea);return c};n.clone=function(){return new Qa(this)};function Ra(b,c,d){b.ka=d?Ua(c,!0):c;b.ka&&(b.ka=b.ka.replace(/:$/,""))}function Sa(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.Za=c}else b.Za=null}function Ta(b,c,d){c instanceof Va?b.a=c:(d||(c=Wa(c,db)),b.a=new Va(c))}
function Ua(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function Wa(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,eb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function eb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var $a=/[#\/\?@]/g,bb=/[#\?:]/g,ab=/[#\?]/g,db=/[#\?@]/g,cb=/#/g;function Va(b){this.a=b||null}n=Va.prototype;n.ca=null;n.Fb=null;
n.add=function(b,c){if(!this.ca&&(this.ca={},this.Fb=0,this.a))for(var d=this.a.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.a=null;(d=this.ca.hasOwnProperty(b)&&this.ca[b])||(this.ca[b]=d=[]);d.push(c);this.Fb++;return this};
n.toString=function(){if(this.a)return this.a;if(!this.ca)return"";var b=[],c;for(c in this.ca)for(var d=encodeURIComponent(c),e=this.ca[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};n.clone=function(){var b=new Va;b.a=this.a;if(this.ca){var c={},d;for(d in this.ca)c[d]=this.ca[d].concat();b.ca=c;b.Fb=this.Fb}return b};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 fb(b,c){var d=gb();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=void 0===c?!1:c)this.a=1}function ib(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 gb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function B(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}y("shaka.util.Error",B);B.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")};B.Severity={RECOVERABLE:1,CRITICAL:2};B.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9};
B.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,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,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 C(b,c){this.promise=b;this.b=c;this.a=!1}y("shaka.util.AbortableOperation",C);function jb(b){return new C(Promise.reject(b),function(){return Promise.resolve()})}C.failed=jb;function kb(){var b=Promise.reject(new B(2,7,7001));b["catch"](function(){});return new C(b,function(){return Promise.resolve()})}C.aborted=kb;function lb(b){return new C(Promise.resolve(b),function(){return Promise.resolve()})}C.completed=lb;
function mb(b){return new C(b,function(){return b["catch"](function(){})})}C.notAbortable=mb;C.prototype.abort=function(){this.a=!0;return this.b()};C.prototype.abort=C.prototype.abort;function nb(b){return new C(Promise.all(b.map(function(b){return b.promise})),function(){return Promise.all(b.map(function(b){return b.abort()}))})}C.all=nb;C.prototype["finally"]=function(b){this.promise.then(function(){return b(!0)},function(){return b(!1)});return this};C.prototype["finally"]=C.prototype["finally"];
C.prototype.Z=function(b,c){function d(){f.reject(new B(2,7,7001));return e.abort()}var e=this,f=new z;this.promise.then(function(c){e.a?f.reject(new B(2,7,7001)):b?d=ob(b,c,f):f.resolve(c)},function(b){c?d=ob(c,b,f):f.reject(b)});return new C(f,function(){return d()})};C.prototype.chain=C.prototype.Z;
function ob(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 D(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];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}D.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};D.prototype.stopImmediatePropagation=function(){this.a=!0};D.prototype.stopPropagation=function(){};function pb(){this.a={}}n=pb.prototype;n.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};n.get=function(b){return(b=this.a[b])?b.slice():null};n.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};n.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)};n.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function E(){this.Wb=new pb;this.yb=this}E.prototype.addEventListener=function(b,c){this.Wb.push(b,c)};E.prototype.removeEventListener=function(b,c){this.Wb.remove(b,c)};E.prototype.dispatchEvent=function(b){for(var c=this.Wb.get(b.type)||[],d=0;d<c.length;++d){b.target=this.yb;b.currentTarget=this.yb;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function qb(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function rb(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function sb(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function ub(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
function vb(b,c,d){d||(d=rb);if(b.length!=c.length)return!1;c=c.slice();var e={};b=q(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function wb(){this.a=[]}function xb(b,c){b.a.push(c["finally"](function(){sb(b.a,c)}))}wb.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 F(b){E.call(this);this.f=!1;this.g=new wb;this.a=new Set;this.b=new Set;this.c=b||null}Ga(F,E);y("shaka.net.NetworkingEngine",F);F.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};F.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var yb={};function zb(b,c,d){d=d||3;var e=yb[b];if(!e||d>=e.priority)yb[b]={priority:d,gf:c}}F.registerScheme=zb;F.unregisterScheme=function(b){delete yb[b]};F.prototype.hf=function(b){this.a.add(b)};F.prototype.registerRequestFilter=F.prototype.hf;
F.prototype.Lf=function(b){this.a["delete"](b)};F.prototype.unregisterRequestFilter=F.prototype.Lf;F.prototype.Zd=function(){this.a.clear()};F.prototype.clearAllRequestFilters=F.prototype.Zd;F.prototype.jf=function(b){this.b.add(b)};F.prototype.registerResponseFilter=F.prototype.jf;F.prototype.Mf=function(b){this.b["delete"](b)};F.prototype.unregisterResponseFilter=F.prototype.Mf;F.prototype.$d=function(){this.b.clear()};F.prototype.clearAllResponseFilters=F.prototype.$d;
function Ab(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}F.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};F.prototype.destroy=F.prototype.destroy;
F.prototype.request=function(b,c){var d=this;if(this.f)return kb();c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?qb(c.retryParameters):gb();c.uris=qb(c.uris);var e=Bb(this,b,c),f=e.Z(function(){return Cb(d,b,c,new fb(c.retryParameters,!1),0,null)}),g=f.Z(function(c){return Db(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.Z(function(c){var e=Date.now()-l,f=c.response;
f.timeMs+=k;f.timeMs+=e;c.ze||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});xb(this.g,e);return e};F.prototype.request=F.prototype.request;function Bb(b,c,d){var e=lb(void 0),f={};b=q(b.a);for(var g=b.next();!g.done;f={wc:f.wc},g=b.next())f.wc=g.value,e=e.Z(function(b){return function(){return b.wc(c,d)}}(f));return e.Z(void 0,function(b){if(b&&7001==b.code)throw b;throw new B(2,1,1006,b);})}
function Cb(b,c,d,e,f,g){var h=new Qa(d.uris[f]),k=h.ka,l=!1;k||(k=location.protocol,k=k.slice(0,-1),Ra(h,k),d.uris[f]=h.toString());var m=(k=yb[k])?k.gf:null;if(!m)return jb(new B(2,1,1E3,h));var p;return mb(ib(e)).Z(function(){if(b.f)return kb();p=Date.now();return m(d.uris[f],d,c,function(d,e){b.c&&1==c&&(b.c(d,e),l=!0)})}).Z(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-p);return{response:b,ze:l}},function(h){if(h&&7001==h.code)throw h;if(b.f)return kb();if(h&&1==h.severity)return b.dispatchEvent(new D("retry",
{error:h instanceof B?h:null})),f=(f+1)%d.uris.length,Cb(b,c,d,e,f,h);throw h||g;})}function Db(b,c,d){var e=lb(void 0);b=q(b.b);for(var f=b.next();!f.done;f=b.next())e=e.Z(f.value.bind(null,c,d.response));return e.Z(function(){return d},function(b){if(b&&7001==b.code)throw b;var c=2;b instanceof B&&(c=b.severity);throw new B(c,1,1007,b);})};function Eb(){this.a=new pb}Eb.prototype.L=function(){Fb(this);this.a=null};function G(b,c,d,e){b.a&&(c=new Gb(c,d,e),b.a.push(d,c))}function Hb(b,c,d,e){G(b,c,d,function(b){this.ua(c,d);e(b)}.bind(b))}Eb.prototype.ua=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.ua(),this.a.remove(c,f))}};function Fb(b){if(b.a){for(var c=b.a.getAll(),d=0;d<c.length;++d)c[d].ua();b.a.a={}}}
function Gb(b,c,d){this.target=b;this.type=c;this.a=d;this.target.addEventListener(c,d,!1)}Gb.prototype.ua=function(){this.target.removeEventListener(this.type,this.a,!1);this.a=this.target=null};function Ib(b,c){for(var d=[],e=q(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function Jb(b,c){for(var d=q(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0};function Kb(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function Lb(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function Mb(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function Nb(b){var c=[b.mimeType];Ob.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function Pb(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var Ob=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function Qb(b){return(navigator.userAgent||"").includes(b)};function Rb(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=escape(Sb(b));try{return decodeURIComponent(b)}catch(c){throw new B(2,2,2004);}}y("shaka.util.StringUtils.fromUTF8",Rb);
function Ub(b,c,d){if(!b)return"";if(!d&&0!=b.byteLength%2)throw new B(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 Sb(d)}y("shaka.util.StringUtils.fromUTF16",Ub);
function Vb(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return Rb(c);if(254==c[0]&&255==c[1])return Ub(c.subarray(2),!1);if(255==c[0]&&254==c[1])return Ub(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 Ub(b,!1);if(0==c[1]&&0==c[3])return Ub(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return Rb(b);throw new B(2,2,2003);}y("shaka.util.StringUtils.fromBytesAutoDetect",Vb);
function Wb(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}y("shaka.util.StringUtils.toUTF8",Wb);function Sb(b){for(var c="",d=0;d<b.length;d+=16E3)c+=String.fromCharCode.apply(null,b.subarray(d,d+16E3));return c};function H(b){this.b=b;this.a=null}y("shaka.util.Timer",H);H.prototype.Jf=function(){null!=this.a&&(clearTimeout(this.a),this.a=null);this.b()};H.prototype.tick=H.prototype.Jf;H.prototype.start=function(b,c){function d(){e.b();e.a=c?setTimeout(d,f):null}var e=this,f=1E3*b;null!=this.a&&clearTimeout(this.a);this.a=setTimeout(d,f)};H.prototype.start=H.prototype.start;H.prototype.stop=function(){null!=this.a&&clearTimeout(this.a);this.a=null};H.prototype.stop=H.prototype.stop;function Xb(b,c){var d=Sb(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}y("shaka.util.Uint8ArrayUtils.toBase64",Xb);function Yb(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}y("shaka.util.Uint8ArrayUtils.fromBase64",Yb);function Zb(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}
y("shaka.util.Uint8ArrayUtils.fromHex",Zb);function $b(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}y("shaka.util.Uint8ArrayUtils.toHex",$b);function ac(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}y("shaka.util.Uint8ArrayUtils.equal",ac);
function bc(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}y("shaka.util.Uint8ArrayUtils.concat",bc);function cc(b){var c=this;this.v=b;this.s=new Set;this.m=this.h=null;this.R=!1;this.a=null;this.i=new Eb;this.b=new Map;this.o=[];this.l=new z;this.f=null;this.g=function(d){c.l.reject(d);b.onError(d)};this.va=new Map;this.$=new Map;this.P=new H(function(){return dc(c)});this.c=!1;this.na=new z;this.A=!1;this.D=[];this.oa=!1;this.M=new H(function(){return ec(c)});this.M.start(1,!0);this.l["catch"](function(){})}n=cc.prototype;
n.destroy=function(){var b=this;return t(function d(){return v(d,function(d){switch(d.j){case 1:if(b.c)return u(d,b.na,0);b.c=!0;return u(d,fc(b),4);case 4:b.na.resolve(),d.B(0)}})})};
function fc(b){return t(function d(){var e;return v(d,function(d){switch(d.j){case 1:return b.i.L(),b.i=null,b.l.reject(),b.M.stop(),b.M=null,b.P.stop(),b.P=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return t(function k(){return v(k,function(d){switch(d.j){case 1:return qa(d,2),u(d,gc(b),4);case 4:sa(d,0);break;case 2:ta(d),d.j=0}})})})})),2);case 2:if(!b.m){d.B(3);break}qa(d,4);return u(d,b.m.setMediaKeys(null),6);case 6:sa(d,
5);break;case 4:ta(d);case 5:b.m=null;case 3:b.a=null,b.s.clear(),b.h=null,b.o=[],b.f=null,b.g=null,b.v=null,d.j=0}})})}n.configure=function(b){this.f=b};function hc(b,c,d){b.o=[];b.A=d;return ic(b,c)}function jc(b,c,d){b.o=d;b.A=0<d.length;return ic(b,c)}
function kc(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return lc(b,h)}
function ic(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=Kb(b.f.servers);mc(c,e)}var f=nc(b);if(f){var g=q(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=q(c);for(e=f.next();!e.done;e=f.next())for(e=q(e.value.drmInfos),g=e.next();!g.done;g=e.next())oc(g.value,Kb(b.f.servers),Kb(b.f.advanced||{}));e=pc(b,c);if(!e.size)return b.R=!0,Promise.resolve();e=lc(b,e);return d?e:e["catch"](function(){})}
n.Cb=function(b){var c=this;if(!this.h)return Hb(this.i,b,"encrypted",function(){c.g(new B(2,6,6010))}),Promise.resolve();this.m=b;Hb(this.i,this.m,"play",function(){for(var b=0;b<c.D.length;b++)qc(c,c.D[b]);c.oa=!0;c.D=[]});b=this.m.setMediaKeys(this.h);b=b["catch"](function(b){return Promise.reject(new B(2,6,6003,b.message))});var d=rc(this);return Promise.all([b,d]).then(function(){if(c.c)return Promise.reject();sc(c);c.a.initData.length||c.o.length||G(c.i,c.m,"encrypted",function(b){return tc(c,
b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.c)return Promise.reject(b)})};function rc(b){return t(function d(){var e;return v(d,function(d){switch(d.j){case 1:if(!(b.h&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.B(0);break}qa(d,3);return u(d,b.h.setServerCertificate(b.a.serverCertificate),5);case 5:sa(d,0);break;case 3:return e=ta(d),d["return"](Promise.reject(new B(2,6,6004,e.message)))}})})}
function uc(b,c){return t(function e(){var f,g,h;return v(e,function(e){switch(e.j){case 1:return u(e,vc(b,c),2);case 2:f=e.u;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.ma=new z,g.push(h.ma);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function sc(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return wc(b,c.initDataType,c.initData)});b.o.forEach(function(c){return vc(b,c)});c.length||b.o.length||b.l.resolve();return b.l}
function tc(b,c,d){var e=b.b.values();e=q(e);for(var f=e.next();!f.done;f=e.next())if(ac(d,f.value.initData))return;wc(b,c,d)}n.keySystem=function(){return this.a?this.a.keySystem:""};function xc(b,c){return Qb("Edge/")?!0:b.s.has(c)}function yc(b){b=b.b.keys();b=Ib(b,function(b){return b.sessionId});return Array.from(b)}n.Lb=function(){var b=Infinity,c=this.b.keys();c=q(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
function pc(b,c){for(var d=new Set,e=q(c),f=e.next();!f.done;f=e.next()){var g=q(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=q(d);for(f=e.next();!f.done;f=e.next())oc(f.value,Kb(b.f.servers),Kb(b.f.advanced||{}));g=b.A?"required":"optional";var h=b.A?["persistent-license"]:["temporary"];e=new Map;d=q(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
label:f.keySystem,drmInfos:[]});d=q(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?Mb(g.mimeType,g.codecs):"",l=h?Mb(h.mimeType,h.codecs):"",m=q(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var p=e.get(f.keySystem);p.drmInfos.push(f);f.distinctiveIdentifierRequired&&(p.distinctiveIdentifier="required");f.persistentStateRequired&&(p.persistentState="required");g&&p.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&p.videoCapabilities.push({robustness:f.videoRobustness||
"",contentType:l})}}return e}
function lc(b,c){if(1==c.size&&c.has(""))return Promise.reject(new B(2,6,6E3));for(var d=q(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new z;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.c)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.bind(b));
f=f["catch"](function(){return Promise.reject(new B(2,6,6001))});f=f.then(function(b){if(this.c)return Promise.reject();this.s.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=q(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.s.add(d.value.contentType);e=q(e);for(d=e.next();!d.done;d=e.next())this.s.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],p=[],r=[];zc(d.drmInfos,f,g,p,r);this.a={keySystem:e,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:p,keyIds:r};return this.a.licenseServerUri?b.createMediaKeys():Promise.reject(new B(2,6,6012))}.bind(b)).then(function(b){if(this.c)return Promise.reject();this.h=b;this.R=!0}.bind(b))["catch"](function(b){if(!this.c)return this.a=null,this.s.clear(),
b instanceof B?Promise.reject(b):Promise.reject(new B(2,6,6002,b.message))}.bind(b));d.reject();return f}
function nc(b){b=Kb(b.f.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=Zb(e),g=Zb(b);f={kty:"oct",kid:Xb(f,!1),k:Xb(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(Wb(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
initData:e,keyIds:[]}}
function vc(b,c){try{var d=b.h.createSession("persistent-license")}catch(g){var e=new B(2,6,6005,g.message);b.g(e);return Promise.reject(e)}G(b.i,d,"message",b.qd.bind(b));G(b.i,d,"keystatuseschange",b.md.bind(b));var f={initData:null,loaded:!1,pc:Infinity,ma:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.c)return Promise.reject();if(b)return f.loaded=!0,Ac(this)&&this.l.resolve(),d;this.b["delete"](d);this.g(new B(2,6,6013))}.bind(b),function(b){this.c||(this.b["delete"](d),this.g(new B(2,
6,6005,b.message)))}.bind(b))}
function wc(b,c,d){try{var e=b.A?b.h.createSession("persistent-license"):b.h.createSession()}catch(f){b.g(new B(2,6,6005,f.message));return}G(b.i,e,"message",b.qd.bind(b));G(b.i,e,"keystatuseschange",b.md.bind(b));b.b.set(e,{initData:d,loaded:!1,pc:Infinity,ma:null});e.generateRequest(c,d.buffer)["catch"](function(c){if(!b.c){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new B(2,6,6006,c.message,c,d))}})}
n.qd=function(b){this.f.delayLicenseRequestUntilPlayed&&this.m.paused&&!this.oa?this.D.push(b):qc(this,b)};
function qc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Ab([f],b.f.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||Bc(f);b.v.nb.request(2,f).promise.then(function(b){return this.c?Promise.reject():d.update(b.data).then(function(){var b=
this;this.v.onEvent(new D("drmsessionupdate"));e&&(e.ma&&e.ma.resolve(),Cc(Dc).then(function(){e.loaded=!0;Ac(b)&&b.l.resolve()}))}.bind(this))}.bind(b),function(b){this.c||(b=new B(2,6,6007,b),this.g(b),e&&e.ma&&e.ma.reject(b))}.bind(b))["catch"](function(b){this.c||(b=new B(2,6,6008,b.message),this.g(b),e&&e.ma&&e.ma.reject(b))}.bind(b))}
function Bc(b){var c=Ub(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){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=Yb(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
n.md=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!Qb("Tizen")){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.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=$b(new Uint8Array(e));
this.va.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.ma&&(this.b["delete"](b),b.close()["catch"](function(){}));Ac(this)&&(this.l.resolve(),this.P.start(Ec,!1))};function dc(b){var c=b.va,d=b.$;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new B(2,6,6014));b.v.qc(Lb(d))}
function Fc(){function b(b){return t(function h(){var c,f,m;return v(h,function(h){switch(h.j){case 1:return qa(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.u,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,Qb("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:sa(h,0);break;case 2:ta(h),e.set(b,null),h.j=0}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="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(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return Lb(e)})}
function Gc(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!xc(b,Mb(d.mimeType,d.codecs))||e&&e.encrypted&&!xc(b,Mb(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
function Hc(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}function ec(b){b.b.forEach(function(c,d){var e=c.pc,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.v.onExpirationUpdated(d.sessionId,f),c.pc=f)})}function Ac(b){b=b.b.values();return Jb(b,function(b){return b.loaded})}
function Cc(b){return new Promise(function(c){return setTimeout(c,1E3*b)})}function mc(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=q(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
function zc(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return ac(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&ac(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
function oc(b,c,d){var e=b.keySystem;if(e){if(c=c.get(e))b.licenseServerUri=c;b.keyIds||(b.keyIds=[]);if(d=d.get(e))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||(b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&
"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function gc(b){return t(function d(){var e,f;return v(d,function(d){switch(d.j){case 1:return e=b.close().then(function(){return!0}),f=Cc(Ic).then(function(){return!1}),u(d,Promise.race([e,f]),2);case 2:d.j=0}})})}var Ic=1,Dc=5,Ec=.5;function Jc(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}Jc.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};Jc.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};Jc.prototype.c=function(){this.a.resetCaptionStream()};function Kc(){}Kc.prototype.init=function(){};Kc.prototype.b=function(){};Kc.prototype.c=function(){};function Lc(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function Qc(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function Rc(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 Sc(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};var I={ae:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},Xb:function(b,c){return b.concat(c)},ob:function(){},wa:function(b){return null!=b}};function Tc(b,c){if(0==c.length)return b;var d=c.map(function(b){return new Qa(b)});return b.map(function(b){return new Qa(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce(I.Xb,[]).map(function(b){return b.toString()})}function Uc(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var Vc={Rd:"video",Md:"audio",Oa:"text",Tf:"application"},Wc=1/15;function Xc(){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))}Xc.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function Yc(b,c){return window.muxjs&&"mp2t"==b.split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(Zc(c,b)):MediaSource.isTypeSupported(Zc("audio",b))||MediaSource.isTypeSupported(Zc("video",b)):!1}
function Zc(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 $c(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 B(2,3,3018));return b.b}
Xc.prototype.i=function(b){this.c=b.captions;var 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)};Xc.prototype.h=function(){var b={data:bc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function ad(b){this.g=null;this.c=b;this.f=this.m=0;this.h=Infinity;this.b=this.a=null;this.l="";this.i=new Map}var bd={};y("shaka.text.TextEngine.registerParser",function(b,c){bd[b]=c});y("shaka.text.TextEngine.unregisterParser",function(b){delete bd[b]});function cd(b){return bd[b]||window.muxjs&&"application/cea-608"==b?!0:!1}ad.prototype.destroy=function(){this.c=this.g=null;this.i.clear();return Promise.resolve()};function dd(b,c){"application/cea-608"!=c&&(b.g=new bd[c])}
ad.prototype.ec=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new B(2,2,2009,d);}};
function ed(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.m,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.h}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.h)}}.bind(b))}
ad.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))};ad.prototype.Ud=function(b){this.c.append(b)};ad.prototype.appendCues=ad.prototype.Ud;
ad.prototype.Sb=function(b,c){this.l=b;var d=this.i.get(b);if(d)for(var e=q(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};ad.prototype.setSelectedClosedCaptionId=ad.prototype.Sb;
function fd(b,c,d,e,f){var g=d+" "+e,h=new Map;c=q(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.h&&(l=new gd(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.l&&b.c.append([l]))}f=q(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.i.has(g)||b.i.set(g,new Map),c=q(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
b.i.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.h))};function hd(b,c,d){this.f=b;this.l=d;this.b={};this.a=null;this.c={};this.h=new Eb;this.s=!1;this.i={};this.m=c;b=this.o=new z;c=new MediaSource;Hb(this.h,c,"sourceopen",b.resolve);this.f.src=window.URL.createObjectURL(c);this.g=c}function id(b){var c=Mb(b.mimeType,b.codecs),d=Nb(b);return cd(c)||MediaSource.isTypeSupported(d)||Yc(c,b.type)}
function jd(){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]=cd(c)||
MediaSource.isTypeSupported(c)||Yc(c);var d=c.split(";")[0];b[d]=b[d]||b[c]});return b}n=hd.prototype;
n.destroy=function(){var b=this;this.s=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"](I.ob));for(f=1;f<e.length;++f)e[f].p["catch"](I.ob),e[f].p.reject()}this.a&&c.push(this.a.destroy());this.l&&c.push(this.l.destroy());for(var g in this.i)c.push(this.i[g].destroy());return Promise.all(c).then(function(){b.h&&(b.h.L(),b.h=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.g=null;b.a=null;b.l=null;b.b={};b.i={};b.m=null;b.c={}})};
n.init=function(b,c){var d=this;return t(function f(){var g;return v(f,function(f){switch(f.j){case 1:return g=Vc,u(f,d.o,2);case 2:b.forEach(function(b,f){var h=Mb(b.mimeType,b.codecs);f==g.Oa?kd(d,h):(!c&&MediaSource.isTypeSupported(h)||!Yc(h,f)||(d.i[f]=new Xc,h=Zc(f,h)),h=d.g.addSourceBuffer(h),G(d.h,h,"error",d.Gf.bind(d,f)),G(d.h,h,"updateend",d.Xa.bind(d,f)),d.b[f]=h,d.c[f]=[])}),f.j=0}})})};function kd(b,c){b.a||(b.a=new ad(b.l));dd(b.a,c)}
function ld(b,c){if("text"==c)var d=b.a.a;else d=md(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 nd(b,c){return"text"==c?b.a.b:Lc(md(b,c))}function od(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=md(b,c);return Rc(b,d)}n.bc=function(){var b=this.a&&null!=this.a.a?[{start:this.a.a,end:this.a.b}]:[];return{total:Sc(this.f.buffered),audio:Sc(md(this,"audio")),video:Sc(md(this,"video")),text:b}};
function md(b,c){try{return b.b[c].buffered}catch(d){return null}}
function pd(b,c,d,e,f,g){if("text"==c)return ed(b.a,d,e,f);if(b.i[c])return $c(b.i[c],d).then(function(b){this.a||kd(this,"text/vtt");b.captions&&fd(this.a,b.captions,e,f,this.b.video.timestampOffset);return qd(this,c,this.Gd.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||kd(b,"text/vtt"),null==e&&null==f?b.m.init(d):b.m.b(d,function(c){c.length&&fd(b.a,c,e,f,b.b.video.timestampOffset)}));return qd(b,c,b.Gd.bind(b,c,d))}n.Sb=function(b){var c=nd(this,"video")||0;this.a.Sb(b,c)};
n.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):qd(this,b,this.Hd.bind(this,b,c,d))};function rd(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.m.c();return b.a.remove(0,Infinity)}return qd(b,c,b.Hd.bind(b,c,0,b.g.duration))}n.flush=function(b){return"text"==b?Promise.resolve():qd(this,b,this.ge.bind(this,b))};
function sd(b,c,d,e,f){return"text"==c?(b.a.m=d,b=b.a,b.f=e,b.h=f,Promise.resolve()):Promise.all([qd(b,c,b.Sd.bind(b,c)),qd(b,c,b.zf.bind(b,c,d)),qd(b,c,b.xf.bind(b,c,e,f))])}n.endOfStream=function(b){return td(this,function(){b?this.g.endOfStream(b):this.g.endOfStream()}.bind(this))};n.la=function(b){return td(this,function(){this.g.duration=b}.bind(this))};n.T=function(){return this.g.duration};n.Gd=function(b,c){this.b[b].appendBuffer(c)};
n.Hd=function(b,c,d){d<=c?this.Xa(b):this.b[b].remove(c,d)};n.Sd=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.Xa(b)};n.ge=function(b){this.f.currentTime-=.001;this.Xa(b)};n.zf=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.Xa(b)};n.xf=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.Xa(b)};
n.Gf=function(b){this.c[b][0].p.reject(new B(2,3,3014,this.f.error?this.f.error.code:0))};n.Xa=function(b){var c=this.c[b][0];c&&(c.p.resolve(),ud(this,b))};function qd(b,c,d){if(b.s)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 B(2,3,3017,c)):d.p.reject(new B(2,3,3015,e)),ud(b,c)}return d.p}
function td(b,c){if(b.s)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 B(2,3,3015,l))}for(var d in this.b)ud(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function ud(b,c){b.c[c].shift();var d=b.c[c][0];if(d)try{d.start()}catch(e){d.p.reject(new B(2,3,3015,e)),ud(b,c)}};function vd(b,c){b=J(b);c=J(c);return b.split("-")[0]==c.split("-")[0]}function wd(b,c){b=J(b);c=J(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function J(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=xd.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function yd(b){return b.language?J(b.language):b.audio&&b.audio.language?J(b.audio.language):b.video&&b.video.language?J(b.video.language):"und"}
function zd(b,c){for(var d=J(b),e=new Set,f=q(c),g=f.next();!g.done;g=f.next())e.add(J(g.value));f=q(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=q(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,wd(g,d))return g;f=q(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=J(h);k=J(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=q(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,wd(d,f))return f;return null}
var xd=new Map([["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"]]);var K={jc:function(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0},Lc:function(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=K.jc(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e},filterNewPeriod:function(b,
c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.R&&!Gc(b,e))return!1;var f=e.audio;e=e.video;return f&&!id(f)||e&&!id(e)||f&&c&&!K.Mc(f,c)||e&&d&&!K.Mc(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return cd(Mb(b.mimeType,b.codecs))})},Mc:function(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0},Gc:function(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=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});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:Array.from(l),videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,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.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||null,b.label=c.label);return b},Cc:function(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,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}},fe:function(b,c){for(var d=0;d<b.variants.length;d++)if(b.variants[d].id==c.id)return b.variants[d];return null},ee:function(b,c){for(var d=0;d<b.textStreams.length;d++)if(b.textStreams[d].id==c.id)return b.textStreams[d];return null},Ta:function(b){return b.allowedByApplication&&
b.allowedByKeySystem},pe:function(b){return b.filter(function(b){return K.Ta(b)})},Uc:function(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)]},Gb:function(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?
e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=zd(J(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return J(b.language)==h}))}if(d){if(b=K.Tc(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce(I.Xb,[]);return b.length?K.Tc(e,b[0]):e},Tc:function(b,c){return b.filter(function(b){return b.roles.includes(c)})},ad:function(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},Ib:function(b,c){for(var d=b.periods.length-1;0<d;--d)if(c+Wc>=b.periods[d].startTime)return d;return 0},de:function(b,c){for(var d=0;d<b.periods.length;++d)for(var e=b.periods[d],f=0;f<e.variants.length;++f)if(e.variants[f]==c)return d;return-1},Be:function(b){return"audio"==b.type},Ee:function(b){return"video"==b.type},Yc:function(b){var c=[];b.periods.forEach(function(b){b.variants.forEach(function(b){c.push(b)})});return c},we:function(b){var c=[];b.audio&&
c.push(b.audio);b.video&&c.push(b.video);return c},Yf:function(b){return K.Be(b)?"type=audio codecs="+b.codecs+" bandwidth="+b.bandwidth+" channelsCount="+b.channelsCount:K.Ee(b)?"type=video codecs="+b.codecs+" bandwidth="+b.bandwidth+" frameRate="+b.frameRate+" width="+b.width+" height="+b.height:"unexpected stream type"}};function L(){this.h=null;this.f=!1;this.b=new La;this.c=[];this.i=!1;this.a=this.g=null}y("shaka.abr.SimpleAbrManager",L);L.prototype.stop=function(){this.h=null;this.f=!1;this.c=[];this.g=null};L.prototype.stop=L.prototype.stop;L.prototype.init=function(b){this.h=b};L.prototype.init=L.prototype.init;
L.prototype.chooseVariant=function(){var b=Ad(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Ad(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};L.prototype.chooseVariant=L.prototype.chooseVariant;L.prototype.enable=function(){this.f=!0};
L.prototype.enable=L.prototype.enable;L.prototype.disable=function(){this.f=!1};L.prototype.disable=L.prototype.disable;L.prototype.segmentDownloaded=function(b,c){var d=this.b;if(!(16E3>c)){var e=8E3*c/b,f=b/1E3;d.a+=c;Ia(d.b,f,e);Ia(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)}};
L.prototype.segmentDownloaded=L.prototype.segmentDownloaded;L.prototype.getBandwidthEstimate=function(){return this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate)};L.prototype.getBandwidthEstimate=L.prototype.getBandwidthEstimate;L.prototype.setVariants=function(b){this.c=b};L.prototype.setVariants=L.prototype.setVariants;L.prototype.configure=function(b){this.a=b};L.prototype.configure=L.prototype.configure;
function Ad(b,c){b&&(c=c.filter(function(c){return K.jc(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Bd(b,c){this.a=b;this.b=c}Bd.prototype.toString=function(){return"v"+this.a+"."+this.b};function Cd(b,c){var d=new Bd(2,6),e=Dd,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Ed(b,c,d,e){Na([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Fd(b,c,d,e){Ma([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Dd=null;var Gd="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Hd="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Id=["loop","playbackRate"],Jd=["pause","play"],Kd="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),Ld={getAssetUri:2,getAudioLanguages:2,
getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2},Md={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},Nd=[["getConfiguration","configure"]],Od=[["isTextTrackVisible","setTextTrackVisibility"]],Pd="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),
Qd=["attach","detach","load","unload"];
function Rd(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof D){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=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
d:0>d?"-Infinity":"Infinity":d;return c}})}function Sd(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__?Td(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function Td(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function Ud(b,c,d,e,f,g){this.P=b;this.g=c;this.R=d;this.l=!1;this.D=e;this.M=f;this.v=g;this.b=this.h=!1;this.A="";this.i=null;this.m=this.kd.bind(this);this.o=this.Le.bind(this);this.a={video:{},player:{}};this.s=0;this.c={};this.f=null}var Vd=!1,Wd=null;n=Ud.prototype;n.destroy=function(){Xd(this);Wd&&Yd(this);this.M=this.D=this.g=null;this.b=this.h=!1;this.o=this.m=this.f=this.c=this.a=this.i=null;return Promise.resolve()};n.ba=function(){return this.b};n.uc=function(){return this.A};
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.P);b=new chrome.cast.ApiConfig(b,this.ld.bind(this),this.Re.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});Vd&&setTimeout(this.g.bind(this),20);(b=Wd)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.ld(b):Wd=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
n.yc=function(b){this.i=b;this.b&&Zd({type:"appData",appData:this.i})};n.cast=function(b){if(!this.h)return Promise.reject(new B(1,8,8E3));if(!Vd)return Promise.reject(new B(1,8,8001));if(this.b)return Promise.reject(new B(1,8,8002));this.f=new z;chrome.cast.requestSession(this.rc.bind(this,b),this.jd.bind(this));return this.f};n.Jb=function(){this.b&&(Xd(this),Wd&&(Yd(this),Wd.stop(function(){},function(){}),Wd=null))};
n.get=function(b,c){if("video"==b){if(Jd.includes(c))return this.xd.bind(this,b,c)}else if("player"==b){if(Md[c]&&!this.get("player","isLive")())return function(){};if(Pd.includes(c))return this.xd.bind(this,b,c);if(Qd.includes(c))return this.lf.bind(this,b,c);if(Ld[c])return this.ud.bind(this,b,c)}return this.ud(b,c)};n.set=function(b,c,d){this.a[b][c]=d;Zd({type:"set",targetName:b,property:c,value:d})};
n.rc=function(b,c){Wd=c;c.addUpdateListener(this.m);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.o);this.kd();Zd({type:"init",initState:b,appData:this.i});this.f.resolve()};n.jd=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 B(2,8,c,b))};n.ud=function(b,c){return this.a[b][c]};
n.xd=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];Zd({type:"call",targetName:b,methodName:c,args:e})};n.lf=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new z;var g=this.s.toString();this.s++;this.c[g]=f;Zd({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};n.ld=function(b){var c=this.v();this.f=new z;this.l=!0;this.rc(c,b)};n.Re=function(b){Vd="available"==b;this.g()};
function Yd(b){var c=Wd;c.removeUpdateListener(b.m);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.o)}n.kd=function(){var b=Wd?"connected"==Wd.status:!1;if(this.b&&!b){this.M();for(var c in this.a)this.a[c]={};Xd(this)}this.A=(this.b=b)?Wd.receiver.friendlyName:"";this.g()};function Xd(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new B(1,7,7E3))}}
n.Le=function(b,c){var d=Sd(c);switch(d.type){case "event":var e=d.event;this.D(d.targetName,new D(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.l&&(this.R(),this.l=!1);break;case "asyncComplete":if(f=d.id,d=d.error,g=this.c[f],delete this.c[f],g)if(d){f=new B(d.severity,d.category,d.code);for(e in d)f[e]=d[e];g.reject(f)}else g.resolve()}};function Zd(b){b=Rd(b);Wd.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Oa)};function M(b,c,d){E.call(this);this.c=b;this.b=c;this.i=this.g=this.f=this.l=this.h=null;this.a=new Ud(d,this.Bf.bind(this),this.Cf.bind(this),this.Df.bind(this),this.Ef.bind(this),this.Zc.bind(this));$d(this)}Ga(M,E);y("shaka.cast.CastProxy",M);M.prototype.destroy=function(b){b&&this.a&&this.a.Jb();this.i&&(this.i.L(),this.i=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.l=this.h=this.c=null;return Promise.all(b)};
M.prototype.destroy=M.prototype.destroy;M.prototype.ye=function(){return this.h};M.prototype.getVideo=M.prototype.ye;M.prototype.qe=function(){return this.l};M.prototype.getPlayer=M.prototype.qe;M.prototype.Wd=function(){return this.a?this.a.h&&Vd:!1};M.prototype.canCast=M.prototype.Wd;M.prototype.ba=function(){return this.a?this.a.ba():!1};M.prototype.isCasting=M.prototype.ba;M.prototype.uc=function(){return this.a?this.a.uc():""};M.prototype.receiverName=M.prototype.uc;
M.prototype.cast=function(){var b=this.Zc();return this.a.cast(b).then(function(){if(this.b)return this.b.wb()}.bind(this))};M.prototype.cast=M.prototype.cast;M.prototype.yc=function(b){this.a.yc(b)};M.prototype.setAppData=M.prototype.yc;M.prototype.If=function(){var b=this.a;if(b.b){var c=b.v();chrome.cast.requestSession(b.rc.bind(b,c),b.jd.bind(b))}};M.prototype.suggestDisconnect=M.prototype.If;M.prototype.Jb=function(){this.a.Jb()};M.prototype.forceDisconnect=M.prototype.Jb;
function $d(b){b.a.init();b.i=new Eb;Gd.forEach(function(b){G(this.i,this.c,b,this.Rf.bind(this))}.bind(b));Kd.forEach(function(b){G(this.i,this.b,b,this.ff.bind(this))}.bind(b));b.h={};for(var c in b.c)Object.defineProperty(b.h,c,{configurable:!1,enumerable:!0,get:b.Qf.bind(b,c),set:b.Sf.bind(b,c)});b.l={};for(var d in b.b)Object.defineProperty(b.l,d,{configurable:!1,enumerable:!0,get:b.td.bind(b,d)});b.f=new E;b.f.yb=b.h;b.g=new E;b.g.yb=b.l}n=M.prototype;
n.Zc=function(){var b={video:{},player:{},playerAfterLoad:{},manifest:this.b.ac(),startTime:null};this.c.pause();Id.forEach(function(c){b.video[c]=this.c[c]}.bind(this));this.c.ended||(b.startTime=this.c.currentTime);Nd.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.player[d]=c}.bind(this));Od.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.playerAfterLoad[d]=c}.bind(this));return b};n.Bf=function(){this.dispatchEvent(new D("caststatuschanged"))};
n.Cf=function(){this.f.dispatchEvent(new D(this.h.paused?"pause":"play"))};
n.Ef=function(){var b=this;Nd.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","getAssetUri")(),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={};Id.forEach(function(b){h[b]=this.a.get("video",b)}.bind(this));e.then(function(){b.c&&(Id.forEach(function(b){this.c[b]=h[b]}.bind(b)),Od.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 D("error",{detail:c}))})};n.Qf=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.ba()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a.ba()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
n.Sf=function(b,c){this.a.ba()?this.a.set("video",b,c):this.c[b]=c};n.Rf=function(b){this.a.ba()||this.f.dispatchEvent(new D(b.type,b))};
n.td=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("getSharedConfiguration"==b)return this.a.get("player","getConfiguration");if("getNetworkingEngine"==b)return this.b.hb.bind(this.b);if(this.a.ba()){if("getManifest"==b||"drmInfo"==b)return function(){Na(b+"() does not work while casting!");return null};if("getManifestUri"==
b)return Cd("getManifestUri",'Please use "getAssetUri" instead.'),this.td("getAssetUri");if("attach"==b||"detach"==b)return function(){Na(b+"() does not work while casting!");return Promise.resolve()}}return this.a.ba()&&0==Object.keys(this.a.a.video).length&&Ld[b]||!this.a.ba()?this.b[b].bind(this.b):this.a.get("player",b)};n.ff=function(b){this.a.ba()||this.g.dispatchEvent(b)};n.Df=function(b,c){this.a.ba()&&("video"==b?this.f.dispatchEvent(c):"player"==b&&this.g.dispatchEvent(c))};function ae(b,c,d,e){E.call(this);this.a=b;this.b=c;this.c=new Eb;this.v={video:b,player:c};this.A=d||function(){};this.D=e||function(b){return b};this.s=!1;this.h=!0;this.g=0;this.o=!1;this.l=!0;this.m=this.i=this.f=null;be(this)}Ga(ae,E);y("shaka.cast.CastReceiver",ae);ae.prototype.isConnected=function(){return this.s};ae.prototype.isConnected=ae.prototype.isConnected;ae.prototype.De=function(){return this.h};ae.prototype.isIdle=ae.prototype.De;
ae.prototype.destroy=function(){var b=this;return t(function d(){var e,f;return v(d,function(d){switch(d.j){case 1:return b.c&&(b.c.L(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),null!=b.m&&window.clearTimeout(b.m),b.a=null,b.v=null,b.A=null,b.s=!1,b.h=!0,b.f=null,b.i=null,b.m=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),d.j=0}})})};ae.prototype.destroy=ae.prototype.destroy;
function be(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.pd.bind(b);c.onSenderDisconnected=b.pd.bind(b);c.onSystemVolumeChanged=b.ce.bind(b);b.i=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.i.onMessage=b.He.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.Ue.bind(b);c.start();Gd.forEach(function(b){G(this.c,this.a,b,this.vd.bind(this,"video"))}.bind(b));Kd.forEach(function(b){G(this.c,this.b,b,this.vd.bind(this,"player"))}.bind(b));
cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.zc(3840,2160):b.b.zc(1920,1080);G(b.c,b.a,"loadeddata",function(){this.o=!0}.bind(b));G(b.c,b.b,"loading",function(){this.h=!1;ce(this)}.bind(b));G(b.c,b.a,"playing",function(){this.h=!1;ce(this)}.bind(b));G(b.c,b.a,"pause",function(){ce(this)}.bind(b));G(b.c,b.b,"unloading",function(){this.h=!0;ce(this)}.bind(b));G(b.c,b.a,"ended",function(){window.setTimeout(function(){this.a&&this.a.ended&&
(this.h=!0,ce(this))}.bind(this),5E3)}.bind(b))}n=ae.prototype;n.pd=function(){this.g=0;this.l=!0;this.s=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;ce(this)};function ce(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new D("caststatuschanged")),de(this)||ee(this,0))}.bind(b))}
function fe(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.A(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(),ee(b,0))}},function(c){b.b.dispatchEvent(new D("error",{detail:c}))})}n.vd=function(b,c){this.b&&(this.sc(),ge(this,{type:"event",targetName:b,event:c},this.f))};
n.sc=function(){null!=this.m&&window.clearTimeout(this.m);this.m=window.setTimeout(this.sc.bind(this),500);var b={video:{},player:{}};Hd.forEach(function(c){b.video[c]=this.a[c]}.bind(this));if(this.b.U())for(var c in Md)0==this.g%Md[c]&&(b.player[c]=this.b[c]());for(var d in Ld)0==this.g%Ld[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.o&&(this.g+=1);ge(this,{type:"update",update:b},this.f);de(this)};
function de(b){return b.l&&(b.a.duration||b.b.U())?(he(b),b.l=!1,!0):!1}function he(b){var c={contentId:b.b.ac(),streamType:b.b.U()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};ee(b,0,c)}n.ce=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&ge(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);ge(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
n.Ue=function(b){var c=Sd(b.data);switch(c.type){case "init":this.g=0;this.o=!1;this.l=!0;fe(this,c.initState,c.appData);this.sc();break;case "appData":this.A(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.v[d][e]=c;break;case "call":d=this.v[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.o=!1);f=c.id;b=b.senderId;var g=this.v[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.l=!0}.bind(this)));c.then(this.Cd.bind(this,b,f,null),this.Cd.bind(this,b,f))}};
n.He=function(b){var c=Sd(b.data);switch(c.type){case "PLAY":this.a.play();ee(this,0);break;case "PAUSE":this.a.pause();ee(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(),ee(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),ee(this,0));break;case "STOP":this.b.wb().then(function(){this.b&&ee(this,0)}.bind(this));break;case "GET_STATUS":ee(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||ee(this,0);break;case "LOAD":this.g=0;this.l=this.o=!1;b=c.currentTime;d=this.D(c.media.contentId);this.a.autoplay=!0;this.b.load(d,b).then(function(){this.b&&he(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");ge(this,{requestId:Number(c.requestId),type:d},this.i)}.bind(this));break;default:ge(this,{requestId:Number(c.requestId),
type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.i)}};n.Cd=function(b,c,d){this.b&&ge(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function ge(b,c,d,e){b.s&&(b=Rd(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
function ee(b,c,d){var e=b.a.playbackRate;var f=ie;f=b.h?f.IDLE:b.b.ed()?f.Nd:b.a.paused?f.Pd:f.Qd;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);ge(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.i)}var ie={IDLE:"IDLE",Qd:"PLAYING",Nd:"BUFFERING",Pd:"PAUSED"};var N={Hb:function(b,c){var d=N.N(b,c);return 1!=d.length?null:d[0]},Vc:function(b,c,d){b=N.Wc(b,c,d);return 1!=b.length?null:b[0]},N:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},Wc:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},Kb:function(b){return Array.prototype.every.call(b.childNodes,
function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},G:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},bf:function(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)},sa:function(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},Qb:function(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},parseInt:function(b){b=Number(b);return 0===b%1?b:null},Pb:function(b){b=Number(b);return 0===b%1&&0<b?b:null},Ya:function(b){b=Number(b);return 0===
b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},be:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1]/c[2]):Number(b);return isNaN(b)?null:b},sd:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},rd:function(b,c){try{var d=Rb(b);return N.sd(d,c)}catch(e){}}};var je=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
function ke(b,c,d){var e=le(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new B(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.Ad?(f=b.init||f,!1):!0}),g.length&&(b=me(f,c,g),0==b.length&&(b=[Uc("",f)])));if(e.length&&(d||!g.length))for(b=[],c=q(je.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(Uc(d,f));if(h=Array.from(h)[0]||null)for(c=q(b),d=c.next();!d.done;d=c.next())for(d=
q(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{Oc:h,Xf:f,drmInfos:b,Xc:!0}}function ne(b,c,d,e){var f=ke(b,c,e);if(d.Xc){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.Xc=!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 B(2,4,4008);return f.Oc||d.Oc}
function oe(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function pe(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
function me(b,c,d){var e=[];d=q(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=je.get(f.Ad);if(g){var h=Uc(g,f.init||b);if(g=qe.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=q(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}
var qe=(new Map).set("com.widevine.alpha",function(b){return(b=N.Vc(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=N.Vc(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=Yb(b.textContent);b=oe(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=Ub(b.value,!0);return(b=N.sd(b,"WRMHEADER"))?pe(b):""});function le(b){var c=[];b=q(b);for(var d=b.next();!d.done;d=b.next())(d=re(d.value))&&c.push(d);return c}
function re(b){var c=b.getAttribute("schemeIdUri"),d=N.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=N.Wc(b,"urn:mpeg:cenc:2013","pssh").map(N.Kb);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new B(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:Yb(b),keyId:null}})}catch(g){throw new B(2,4,4007);}return{node:b,Ad:c,keyId:d,init:0<f.length?f:null}};function se(b,c,d,e,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);"Time"==c&&(f=Math.round(f));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 te(b,c){var d=ue(b,c,"timescale"),e=1;d&&(e=N.Pb(d)||1);d=ue(b,c,"duration");(d=N.Pb(d||""))&&(d/=e);var f=ue(b,c,"startNumber"),g=Number(ue(b,c,"presentationTimeOffset"))||0,h=N.Ya(f||"");if(null==f||null==h)h=1;var k=ve(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.O.duration||Infinity;k=N.N(k,"S");for(var m=[],p=0,r=0;r<k.length;++r){var w=k[r],x=N.G(w,"t",N.Ya),A=N.G(w,"d",N.Ya);w=N.G(w,"r",N.parseInt);null!=x&&(x-=g);if(!A)break;x=null!=x?x:p;w=w||0;if(0>w)if(r+1<k.length){w=N.G(k[r+
1],"t",N.Ya);if(null==w)break;else if(x>=w)break;w=Math.ceil((w-x)/A)-1}else{if(Infinity==l)break;else if(x/f>=l)break;w=Math.ceil((l*f-x)/A)-1}0<m.length&&x!=p&&(m[m.length-1].end=x/f);for(var R=0;R<=w;++R)p=x+A,m.push({start:x/f,end:p/f,Nf:x}),x=p}f=m}return{timescale:e,V:d,Ka:h,ga:g/e||0,Fc:g,K:f}}function ue(b,c,d){return[c(b.w),c(b.Y),c(b.ea)].filter(I.wa).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
function ve(b,c,d){return[c(b.w),c(b.Y),c(b.ea)].filter(I.wa).map(function(b){return N.Hb(b,d)}).reduce(function(b,c){return b||c})}
function we(b,c,d,e,f,g){for(var h=N.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=N.getAttributeNS(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 jb(new B(2,4,4028));if("onLoad"!=k)return jb(new B(2,4,4027));var p=Tc([e],[h]);return f.request(0,Ab(p,c)).Z(function(e){e=N.rd(e.data,b.tagName);if(!e)return jb(new B(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 xe(b,c,d,p[0],f,g+1)})}
function xe(b,c,d,e,f,g){g=void 0===g?0:g;if(N.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=we(b,c,d,e,f,g);d&&(h=h.Z(void 0,function(){return xe(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==N.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push(xe(l,c,d,e,f,g)))}return nb(h).Z(function(){return b})};function ye(b,c,d){this.c=b;this.b=c;this.a=d}y("shaka.media.InitSegmentReference",ye);ye.prototype.Yb=function(){return this.c()};ye.prototype.createUris=ye.prototype.Yb;ye.prototype.dc=function(){return this.b};ye.prototype.getStartByte=ye.prototype.dc;ye.prototype.cc=function(){return this.a};ye.prototype.getEndByte=ye.prototype.cc;function O(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}y("shaka.media.SegmentReference",O);O.prototype.X=function(){return this.position};
O.prototype.getPosition=O.prototype.X;O.prototype.ec=function(){return this.startTime};O.prototype.getStartTime=O.prototype.ec;O.prototype.ke=function(){return this.endTime};O.prototype.getEndTime=O.prototype.ke;O.prototype.Yb=function(){return this.c()};O.prototype.createUris=O.prototype.Yb;O.prototype.dc=function(){return this.b};O.prototype.getStartByte=O.prototype.dc;O.prototype.cc=function(){return this.a};O.prototype.getEndByte=O.prototype.cc;function P(b,c){this.H=b;this.b=c==ze;this.a=0}y("shaka.util.DataViewReader",P);var ze=1;P.Endianness={Uf:0,Vf:ze};P.prototype.ia=function(){return this.a<this.H.byteLength};P.prototype.hasMoreData=P.prototype.ia;P.prototype.X=function(){return this.a};P.prototype.getPosition=P.prototype.X;P.prototype.le=function(){return this.H.byteLength};P.prototype.getLength=P.prototype.le;P.prototype.fa=function(){try{var b=this.H.getUint8(this.a);this.a+=1;return b}catch(c){Ae()}};P.prototype.readUint8=P.prototype.fa;
P.prototype.qb=function(){try{var b=this.H.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Ae()}};P.prototype.readUint16=P.prototype.qb;P.prototype.C=function(){try{var b=this.H.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Ae()}};P.prototype.readUint32=P.prototype.C;P.prototype.wd=function(){try{var b=this.H.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Ae()}};P.prototype.readInt32=P.prototype.wd;
P.prototype.$a=function(){try{if(this.b){var b=this.H.getUint32(this.a,!0);var c=this.H.getUint32(this.a+4,!0)}else c=this.H.getUint32(this.a,!1),b=this.H.getUint32(this.a+4,!1)}catch(d){Ae()}if(2097151<c)throw new B(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};P.prototype.readUint64=P.prototype.$a;P.prototype.Ia=function(b){this.a+b>this.H.byteLength&&Ae();var c=new Uint8Array(this.H.buffer,this.H.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};P.prototype.readBytes=P.prototype.Ia;
P.prototype.I=function(b){this.a+b>this.H.byteLength&&Ae();this.a+=b};P.prototype.skip=P.prototype.I;P.prototype.zd=function(b){this.a<b&&Ae();this.a-=b};P.prototype.rewind=P.prototype.zd;P.prototype.seek=function(b){(0>b||b>this.H.byteLength)&&Ae();this.a=b};P.prototype.seek=P.prototype.seek;P.prototype.tc=function(){for(var b=this.a;this.ia()&&0!=this.H.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.H.buffer,this.H.byteOffset+b,this.a-b);this.a+=1;return Rb(b)};
P.prototype.readTerminatedString=P.prototype.tc;function Ae(){throw new B(2,3,3E3);};function Q(){this.c=[];this.b=[];this.a=!1}y("shaka.util.Mp4Parser",Q);Q.prototype.F=function(b,c){var d=Be(b);this.c[d]=0;this.b[d]=c;return this};Q.prototype.box=Q.prototype.F;Q.prototype.aa=function(b,c){var d=Be(b);this.c[d]=1;this.b[d]=c;return this};Q.prototype.fullBox=Q.prototype.aa;Q.prototype.stop=function(){this.a=!0};Q.prototype.stop=Q.prototype.stop;
Q.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new P(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.ia()&&!this.a;)this.Ob(0,d,c)};Q.prototype.parse=Q.prototype.parse;
Q.prototype.Ob=function(b,c,d){var e=c.X(),f=c.C(),g=c.C();switch(f){case 0:f=c.H.byteLength-e;break;case 1:f=c.$a()}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.H.byteLength&&(g=c.H.byteLength);g-=c.X();c=0<g?c.Ia(g):new Uint8Array(0);c=new P(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.I(Math.min(e+f-c.X(),c.H.byteLength-c.X()))};
Q.prototype.parseNext=Q.prototype.Ob;function S(b){for(;b.reader.ia()&&!b.parser.a;)b.parser.Ob(b.start,b.reader,b.partialOkay)}Q.children=S;function Ce(b){for(var c=b.reader.C();0<c&&!b.parser.a;--c)b.parser.Ob(b.start,b.reader,b.partialOkay)}Q.sampleDescription=Ce;function De(b){return function(c){b(c.reader.Ia(c.reader.H.byteLength-c.reader.X()))}}Q.allData=De;function Be(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
function Ee(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}Q.typeToString=Ee;function Fe(b,c,d,e){var f,g=(new Q).aa("sidx",function(b){f=Ge(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new B(2,3,3004);}
function Ge(b,c,d,e){var f=[];e.reader.I(4);var g=e.reader.C();if(0==g)throw new B(2,3,3005);if(0==e.version){var h=e.reader.C();var k=e.reader.C()}else h=e.reader.$a(),k=e.reader.$a();e.reader.I(2);var l=e.reader.qb();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.C(),p=(m&2147483648)>>>31;m&=2147483647;var r=e.reader.C();e.reader.I(4);if(1==p)throw new B(2,3,3006);f.push(new O(f.length,h/g-c,(h+r)/g-c,function(){return d},b,b+m-1));h+=r;b+=m}e.parser.stop();return f};function T(b){this.a=b}y("shaka.media.SegmentIndex",T);T.prototype.destroy=function(){this.a=null;return Promise.resolve()};T.prototype.destroy=T.prototype.destroy;T.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};T.prototype.find=T.prototype.find;
T.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]};T.prototype.get=T.prototype.get;T.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};T.prototype.offset=T.prototype.offset;
T.prototype.kc=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 O(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 O(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};T.prototype.merge=T.prototype.kc;
T.prototype.Zb=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=[]};T.prototype.evict=T.prototype.Zb;function He(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[b.a.length-1];b.a[b.a.length-1]=new O(d.position,d.startTime,c,d.c,d.b,d.a)}};function Ie(b){this.b=b;this.a=new P(b,0);Je||(Je=[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 Je;Ie.prototype.ia=function(){return this.a.ia()};
function Ke(b){var c=Le(b);if(7<c.length)throw new B(2,3,3002);for(var d=0,e=0;e<c.length;e++)d=256*d+c[e];c=d;d=Le(b);a:{for(e=0;e<Je.length;e++)if(ac(d,Je[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.X();else{if(8==d.length&&d[1]&224)throw new B(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.X()+d<=b.b.byteLength?d:b.b.byteLength-b.a.X();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.X(),d);b.a.I(d);return new Me(c,e)}
function Le(b){var c=b.a.fa(),d;for(d=1;8>=d&&!(c&1<<8-d);d++);if(8<d)throw new B(2,3,3002);var e=new Uint8Array(d);e[0]=c;for(c=1;c<d;c++)e[c]=b.a.fa();return e}function Me(b,c){this.id=b;this.a=c}function Ne(b){if(8<b.a.byteLength)throw new B(2,3,3002);if(8==b.a.byteLength&&b.a.getUint8(0)&224)throw new B(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 Oe(){}
Oe.prototype.parse=function(b,c,d,e){var f;c=new Ie(new DataView(c));if(440786851!=Ke(c).id)throw new B(2,3,3008);var g=Ke(c);if(408125543!=g.id)throw new B(2,3,3009);c=g.a.byteOffset;g=new Ie(g.a);for(f=null;g.ia();){var h=Ke(g);if(357149030==h.id){f=h;break}}if(!f)throw new B(2,3,3010);g=new Ie(f.a);f=1E6;for(h=null;g.ia();){var k=Ke(g);if(2807729==k.id)f=Ne(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 B(2,3,3003);
}if(null==h)throw new B(2,3,3011);g=f/1E9;f=h*g;b=Ke(new Ie(new DataView(b)));if(475249515!=b.id)throw new B(2,3,3007);return Pe(b,c,g,f,d,e)};function Pe(b,c,d,e,f,g){function h(){return f}var k=[];b=new Ie(b.a);for(var l=null,m=null;b.ia();){var p=Ke(b);if(187==p.id){var r=Qe(p);r&&(p=d*r.Of,r=c+r.kf,null!=l&&k.push(new O(k.length,l-g,p-g,h,m,r-1)),l=p,m=r)}}null!=l&&k.push(new O(k.length,l-g,e-g,h,m,null));return k}
function Qe(b){var c=new Ie(b.a);b=Ke(c);if(179!=b.id)throw new B(2,3,3013);b=Ne(b);c=Ke(c);if(183!=c.id)throw new B(2,3,3012);c=new Ie(c.a);for(var d=0;c.ia();){var e=Ke(c);if(241==e.id){d=Ne(e);break}}return{Of:b,kf:d}};function Re(b,c){var d=ve(b,c,"Initialization");if(!d)return null;var e=b.w.ha,f=d.getAttribute("sourceURL");f&&(e=Tc(b.w.ha,[f]));f=0;var g=null;if(d=N.G(d,"range",N.Qb))f=d.start,g=d.end;return new ye(function(){return e},f,g)}
function Se(b,c){var d=Number(ue(b,Te,"presentationTimeOffset"))||0,e=ue(b,Te,"timescale"),f=1;e&&(f=N.Pb(e)||1);d=d/f||0;e=Re(b,Te);var g=b.w.contentType;f=b.w.mimeType.split("/")[1];if("text"!=g&&"mp4"!=f&&"webm"!=f)throw new B(2,4,4006);if("webm"==f&&!e)throw new B(2,4,4005);g=ve(b,Te,"RepresentationIndex");var h=ue(b,Te,"indexRange"),k=b.w.ha;h=N.Qb(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=Tc(b.w.ha,[l]));h=N.G(g,"range",N.Qb,h)}if(!h)throw new B(2,4,4002);f=Ue(b,c,e,k,h.start,h.end,
f,d);return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,ga:d}}
function Ue(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.Pa||!b.O.fc,p=b.O.start,r=b.O.duration,w=c,x=null;return{createSegmentIndex:function(){var b=[w(e,f,g),"webm"==h?w(d.c(),d.b,d.a):null];w=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?Fe(c,f,e,k):(new Oe).parse(c,b,e,k);l.Wa(c,p);x=new T(c);m&&He(x,r)})},findSegmentPosition:function(b){return x.find(b)},getSegmentReference:function(b){return x.get(b)}}}function Te(b){return b.rb};function Ve(b,c){var d=Re(b,We);var e=Xe(b);var f=te(b,We),g=f.Ka;0==g&&(g=1);var h=0;f.V?h=f.V*(g-1):f.K&&0<f.K.length&&(h=f.K[0].start);e={V:f.V,startTime:h,Ka:g,ga:f.ga,K:f.K,Va:e};if(!e.V&&!e.K&&1<e.Va.length)throw new B(2,4,4002);if(!e.V&&!b.O.duration&&!e.K&&1==e.Va.length)throw new B(2,4,4002);if(e.K&&0==e.K.length)throw new B(2,4,4002);g=f=null;b.ea.id&&b.w.id&&(g=b.ea.id+","+b.w.id,f=c[g]);h=Ye(b.O.duration,e.Ka,b.w.ha,e);f?(f.kc(h),g=b.presentationTimeline.kb(),f.Zb(g-b.O.start)):(b.presentationTimeline.Wa(h,
b.O.start),f=new T(h),g&&b.Pa&&(c[g]=f));b.Pa&&b.O.fc||He(f,b.O.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,ga:e.ga}}function We(b){return b.za}
function Ye(b,c,d,e){var f=e.Va.length;e.K&&e.K.length!=e.Va.length&&(f=Math.min(e.K.length,e.Va.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.Va[k],m=Tc(d,[l.Fe]),p=void 0;p=null!=e.V?h+e.V:e.K?e.K[k].end:h+b;g.push(new O(k+c,h,p,function(b){return b}.bind(null,m),l.start,l.end));h=p}return g}
function Xe(b){return[b.w.za,b.Y.za,b.ea.za].filter(I.wa).map(function(b){return N.N(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.dd&&(b.dd=!0);var d=c.getAttribute("media");c=N.G(c,"mediaRange",N.Qb,{start:0,end:null});return{Fe:d,start:c.start,end:c.end}})};function Ze(b,c,d,e){var f=$e(b);var g=te(b,af);var h=ue(b,af,"media"),k=ue(b,af,"index");g={V:g.V,timescale:g.timescale,Ka:g.Ka,ga:g.ga,Fc:g.Fc,K:g.K,ic:h,mb:k};h=g.mb?1:0;h+=g.K?1:0;h+=g.V?1:0;if(0==h)throw new B(2,4,4002);1!=h&&(g.mb&&(g.K=null),g.V=null);if(!g.mb&&!g.ic)throw new B(2,4,4002);if(g.mb){d=b.w.mimeType.split("/")[1];if("mp4"!=d&&"webm"!=d)throw new B(2,4,4006);if("webm"==d&&!f)throw new B(2,4,4005);e=se(g.mb,b.w.id,null,b.bandwidth||null,null);e=Tc(b.w.ha,[e]);b=Ue(b,c,f,e,0,null,
d,g.ga)}else g.V?(e||(b.presentationTimeline.mc(g.V),b.presentationTimeline.nc(b.O.start)),b=bf(b,g)):(h=c=null,b.ea.id&&b.w.id&&(h=b.ea.id+","+b.w.id,c=d[h]),k=cf(b,g),e=!b.Pa||!b.O.fc,c?(e&&He(new T(k),b.O.duration),c.kc(k),d=b.presentationTimeline.kb(),c.Zb(d-b.O.start)):(b.presentationTimeline.Wa(k,b.O.start),c=new T(k),h&&b.Pa&&(d[h]=c)),e&&He(c,b.O.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,ga:g.ga}}function af(b){return b.tb}
function bf(b,c){var d=b.O.duration,e=c.V,f=c.Ka,g=c.timescale,h=c.ic,k=b.bandwidth||null,l=b.w.id,m=b.w.ha;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,p=c+e;d&&(p=Math.min(p,d));return 0>p||d&&c>=d?null:new O(b,c,p,function(){var d=se(h,l,b+f,k,c*g);return Tc(m,[d])},0,null)}}}
function cf(b,c){for(var d=[],e=0;e<c.K.length;e++){var f=e+c.Ka;d.push(new O(f,c.K[e].start,c.K[e].end,function(b,c,d,e,f,p){b=se(b,c,f,d,p);return Tc(e,[b]).map(function(b){return b.toString()})}.bind(null,c.ic,b.w.id,b.bandwidth||null,b.w.ha,f,c.K[e].Nf+c.Fc),0,null))}return d}function $e(b){var c=ue(b,af,"initialization");if(!c)return null;var d=b.w.id,e=b.bandwidth||null,f=b.w.ha;return new ye(function(){var b=se(c,d,null,e,null);return Tc(f,[b])},0,null)};var df={},ef={};y("shaka.media.ManifestParser.registerParserByExtension",function(b,c){ef[b]=c});y("shaka.media.ManifestParser.registerParserByMime",function(b,c){df[b]=c});function ff(){var b={},c;for(c in df)b[c]=!0;for(var d in ef)b[d]=!0;["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(c){b[c]=!!df[c]});["mpd","m3u8","ism"].forEach(function(c){b[c]=!!ef[c]});return b}
function gf(b,c,d,e){return t(function g(){var h,k;return v(g,function(g){switch(g.j){case 1:return qa(g,2),u(g,hf(b,c,d,e),4);case 4:return h=g.u,g["return"](new h);case 2:throw k=ta(g),k.severity=2,k;}})})}
function hf(b,c,d,e){return t(function g(){var h,k,l,m,p,r,w,x,A,R;return v(g,function(g){switch(g.j){case 1:if(e&&(h=e.toLowerCase(),k=df[h]))return g["return"](k);l=new Qa(b);m=l.da.split("/");p=m.pop();r=p.split(".");return 1<r.length&&(w=r.pop().toLowerCase(),x=ef[w])?g["return"](x):u(g,jf(b,c,d),2);case 2:A=g.u;if(R=df[A])return g["return"](R);throw new B(2,4,4E3,b);}})})}
function jf(b,c,d){return t(function f(){var g,h,k;return v(f,function(f){switch(f.j){case 1:return g=Ab([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.u,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};function U(b,c,d){this.f=b;this.Rb=c;this.h=this.g=Infinity;this.a=1;this.b=this.c=null;this.l=0;this.m=!0;this.i=0;this.o=void 0===d?!0:d}y("shaka.media.PresentationTimeline",U);U.prototype.T=function(){return this.g};U.prototype.getDuration=U.prototype.T;U.prototype.la=function(b){this.g=b};U.prototype.setDuration=U.prototype.la;U.prototype.se=function(){return this.f};U.prototype.getPresentationStartTime=U.prototype.se;U.prototype.Dd=function(b){this.l=b};U.prototype.setClockOffset=U.prototype.Dd;
U.prototype.ub=function(b){this.m=b};U.prototype.setStatic=U.prototype.ub;U.prototype.Ac=function(b){this.h=b};U.prototype.setSegmentAvailabilityDuration=U.prototype.Ac;U.prototype.yf=function(b){this.Rb=b};U.prototype.setDelay=U.prototype.yf;U.prototype.je=function(){return this.Rb};U.prototype.getDelay=U.prototype.je;
U.prototype.Wa=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.nc(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.o&&(this.f=(Date.now()+this.l)/1E3-this.b-this.a)}};U.prototype.notifySegments=U.prototype.Wa;U.prototype.nc=function(b){this.c=null==this.c?b:Math.min(this.c,b)};U.prototype.notifyMinSegmentStartTime=U.prototype.nc;U.prototype.mc=function(b){this.a=Math.max(this.a,b)};
U.prototype.notifyMaxSegmentDuration=U.prototype.mc;U.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};U.prototype.offset=U.prototype.offset;U.prototype.U=function(){return Infinity==this.g&&!this.m};U.prototype.isLive=U.prototype.U;U.prototype.Ga=function(){return Infinity!=this.g&&!this.m};U.prototype.isInProgress=U.prototype.Ga;U.prototype.kb=function(){if(Infinity==this.h)return this.i;var b=this.Sa()-this.h;return Math.max(this.i,b)};
U.prototype.getSegmentAvailabilityStart=U.prototype.kb;U.prototype.Fd=function(b){this.i=b};U.prototype.setUserSeekStart=U.prototype.Fd;U.prototype.Sa=function(){return this.U()||this.Ga()?Math.min(Math.max(0,(Date.now()+this.l)/1E3-this.a-this.f),this.g):this.g};U.prototype.getSegmentAvailabilityEnd=U.prototype.Sa;U.prototype.jb=function(b){var c=Math.max(this.c,this.i);if(Infinity==this.h)return c;var d=this.Sa()-this.h;b=Math.min(d+b,this.qa());return Math.max(c,b)};
U.prototype.getSafeSeekRangeStart=U.prototype.jb;U.prototype.Ra=function(){return this.jb(0)};U.prototype.getSeekRangeStart=U.prototype.Ra;U.prototype.qa=function(){var b=this.U()||this.Ga()?this.Rb:0;return Math.max(0,this.Sa()-b)};U.prototype.getSeekRangeEnd=U.prototype.qa;U.prototype.Jd=function(){return null==this.f||null!=this.b?!1:!0};U.prototype.usingPresentationStartTime=U.prototype.Jd;function kf(){this.b=this.a=null;this.h=[];this.c=null;this.l=[];this.i=1;this.m={};this.o=0;this.s=new Ha(5);this.g=null;this.f=new wb}y("shaka.dash.DashParser",kf);n=kf.prototype;n.configure=function(b){this.a=b};n.start=function(b,c){this.h=[b];this.b=c;return lf(this).then(function(b){this.b&&mf(this,b);return this.c}.bind(this))};n.stop=function(){this.a=this.b=null;this.h=[];this.c=null;this.l=[];this.m={};null!=this.g&&(window.clearTimeout(this.g),this.g=null);return this.f.destroy()};
n.update=function(){lf(this)["catch"](function(b){if(this.b)this.b.onError(b)}.bind(this))};n.onExpirationUpdated=function(){};function lf(b){var c=Date.now(),d=b.b.networkingEngine.request(0,Ab(b.h,b.a.retryParameters));xb(b.f,d);return d.promise.then(function(c){if(b.b)return nf(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;Ia(b.s,1,d);return d})}
function nf(b,c,d){c=N.rd(c,"MPD");if(!c)throw new B(2,4,4001,d);c=xe(c,b.a.retryParameters,b.a.dash.xlinkFailGracefully,d,b.b.networkingEngine);xb(b.f,c);return c.promise.then(function(c){return of(b,c,d)})}
function of(b,c,d){return t(function f(){var g,h,k,l,m,p,r,w,x,A,R,X,Y,fa,ia,Ka,Xa,ja,mg,Mc,ng,og,pg,ak,qg,rg;return v(f,function(f){switch(f.j){case 1:l=I;m=N;p=[d];r=m.N(c,"Location").map(m.Kb).filter(l.wa);0<r.length&&(w=Tc(p,r),p=b.h=w);x=m.N(c,"BaseURL").map(m.Kb);A=Tc(p,x);(R=b.a.dash.ignoreMinBufferTime)||(X=m.G(c,"minBufferTime",m.sa));b.o=m.G(c,"minimumUpdatePeriod",m.sa,-1);Y=m.G(c,"availabilityStartTime",m.bf);fa=m.G(c,"timeShiftBufferDepth",m.sa);ia=m.G(c,"suggestedPresentationDelay",
m.sa);Ka=m.G(c,"maxSegmentDuration",m.sa);Xa=c.getAttribute("type")||"static";b.c?ja=b.c.presentationTimeline:(mg=Math.max(b.a.dash.defaultPresentationDelay,1.5*X),Mc=null!=ia?ia:mg,ja=new U(Y,Mc,b.a.dash.autoCorrectDrift));ng={Pa:"static"!=Xa,presentationTimeline:ja,ea:null,O:null,Y:null,w:null,bandwidth:0,dd:!1};for(var sg=ng,bk=A,Nc=N.G(c,"mediaPresentationDuration",N.sa),Oc=[],Ya=0,Tb=N.N(c,"Period"),tb=0;tb<Tb.length;tb++){var hb=Tb[tb];Ya=N.G(hb,"start",N.sa,Ya);var Pc=N.G(hb,"duration",N.sa),
Za=null;if(tb!=Tb.length-1){var tg=N.G(Tb[tb+1],"start",N.sa);null!=tg&&(Za=tg-Ya)}else null!=Nc&&(Za=Nc-Ya);null==Za&&(Za=Pc);hb=pf(b,sg,bk,{start:Ya,duration:Za,node:hb,fc:null==Za||tb==Tb.length-1});Oc.push(hb);Pc=sg.ea.id;b.l.includes(Pc)||(b.l.push(Pc),b.c&&(b.b.filterNewPeriod(hb),b.c.periods.push(hb)));if(null==Za){Ya=null;break}Ya+=Za}null==b.c&&b.b.filterAllPeriods(Oc);null!=Nc?(g=Oc,h=Nc,k=!1):(g=Oc,h=Ya,k=!0);og=h;pg=g;ja.ub("static"==Xa);"static"!=Xa&&k||ja.la(og||Infinity);(ak=ja.U())&&
!isNaN(b.a.availabilityWindowOverride)&&(fa=b.a.availabilityWindowOverride);null==fa&&(fa=Infinity);ja.Ac(fa);ja.mc(Ka||1);if(b.c){f.B(0);break}b.c={presentationTimeline:ja,periods:pg,offlineSessionIds:[],minBufferTime:X||0};if(!ja.Jd()){f.B(0);break}qg=m.N(c,"UTCTiming");return u(f,qf(b,A,qg),4);case 4:rg=f.u;if(!b.b)return f["return"]();ja.Dd(rg);f.j=0}})})}
function pf(b,c,d,e){c.ea=rf(e.node,null,d);c.O=e;c.ea.id||(c.ea.id="__shaka_period_"+e.start);N.N(e.node,"EventStream").forEach(b.df.bind(b,e.start,e.duration));d=N.N(e.node,"AdaptationSet").map(b.af.bind(b,c)).filter(I.wa);if(c.Pa){c=[];for(var f=q(d),g=f.next();!g.done;g=f.next()){g=q(g.value.nf);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new B(2,4,4018);}var k=d.filter(function(b){return!b.Ec});d.filter(function(b){return b.Ec}).forEach(function(b){var c=
b.streams[0],d=b.Ec;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=sf(k,"video");f=sf(k,"audio");if(!c.length&&!f.length)throw new B(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)tf(b,f[g],c[h],d);b=sf(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function sf(b,c){return b.filter(function(b){return b.contentType==c})}
function tf(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<Hc(f,g).length:1){g=Hc(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.hc||d.hc,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.hc,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.af=function(b,c){b.Y=rf(c,b.ea,null);var d=!1,e=N.N(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter(I.wa),g=void 0,h="text"==b.Y.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,p=!1;N.N(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
m=b.getAttribute("value"):p=!0});k=N.N(c,"Accessibility");var r=new Map;e={};k=q(k);for(l=k.next();!l.done;e={gb:e.gb},l=k.next()){l=l.value;var w=l.getAttribute("schemeIdUri");if("urn:scte:dash:cc:cea-608:2015"==w||"urn:scte:dash:cc:cea-708:2015"==w)e.gb=1,l=l.getAttribute("value"),null!=l?l.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.gb,b.gb+=2;r.set(d,J(c))}}(e)):
r.set("CC1","und")}if(p)return null;e=N.N(c,"ContentProtection");var x=ke(e,this.a.dash.customScheme,this.a.dash.ignoreDrmInfo);e=J(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=N.N(c,"Representation");f=k.map(this.ef.bind(this,b,x,g,e,l,d,f,r)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new B(2,4,4003);}b.Y.contentType&&"application"!=b.Y.contentType||(b.Y.contentType=uf(f[0].mimeType,f[0].codecs),f.forEach(function(c){c.type=b.Y.contentType}));f.forEach(function(b){x.drmInfos.forEach(function(c){b.keyId&&
c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter(I.wa);return{id:b.Y.id||"__fake__"+this.i++,contentType:b.Y.contentType,language:e,hc:d,streams:f,drmInfos:x.drmInfos,Ec:m,nf:h}};
n.ef=function(b,c,d,e,f,g,h,k,l){b.w=rf(l,b.Y,null);if(!vf(b.w))return null;b.bandwidth=N.G(l,"bandwidth",N.Pb)||0;var m=b.w.contentType;m="text"==m||"application"==m;try{var p=this.pf.bind(this);if(b.w.rb)var r=Se(b,p);else if(b.w.za)r=Ve(b,this.m);else if(b.w.tb)r=Ze(b,p,this.m,!!this.c);else{var w=b.w.ha,x=b.O.duration||0;r={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<x?1:null},getSegmentReference:function(b){return 1!=b?null:new O(1,0,x,function(){return w},
0,null)},initSegmentReference:null,ga:0}}}catch(A){if(m&&4002==A.code)return null;throw A;}l=N.N(l,"ContentProtection");l=ne(l,this.a.dash.customScheme,c,this.a.dash.ignoreDrmInfo);return{id:this.i++,originalId:b.w.id,createSegmentIndex:r.createSegmentIndex,findSegmentPosition:r.findSegmentPosition,getSegmentReference:r.getSegmentReference,initSegmentReference:r.initSegmentReference,presentationTimeOffset:r.ga,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:l,language:e,label:f,type:b.Y.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.w.emsgSchemeIdUris,roles:h,channelsCount:b.w.oc,closedCaptions:k}};n.Ff=function(){this.g=null;lf(this).then(function(b){this.b&&mf(this,b)}.bind(this))["catch"](function(b){this.b&&(b.severity=1,this.b.onError(b),mf(this,0))}.bind(this))};function mf(b,c){0>b.o||(b.g=window.setTimeout(b.Ff.bind(b),1E3*Math.max(3,b.o-c,Ja(b.s))))}
function rf(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,oc:null};d=d||c.ha;var e=N.Ya,f=N.be,g=N.N(b,"BaseURL").map(N.Kb),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=N.G(b,"frameRate",f)||c.frameRate;var m=N.N(b,"InbandEventStream"),p=c.emsgSchemeIdUris.slice();m=q(m);for(var r=m.next();!r.done;r=m.next())r=r.value.getAttribute("schemeIdUri"),p.includes(r)||p.push(r);m=N.N(b,
"AudioChannelConfiguration");m=wf(m)||c.oc;h||(h=uf(k,l));return{ha:Tc(d,g),rb:N.Hb(b,"SegmentBase")||c.rb,za:N.Hb(b,"SegmentList")||c.za,tb:N.Hb(b,"SegmentTemplate")||c.tb,width:N.G(b,"width",e)||c.width,height:N.G(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:p,id:b.getAttribute("id"),oc:m}}
function wf(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 vf(b){var c=b.rb?1:0;c+=b.za?1:0;c+=b.tb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.rb&&(b.za=null),b.tb=null);return!0}
function xf(b,c,d,e){c=Tc(c,[d]);c=Ab(c,b.a.retryParameters);c.method=e;c=b.b.networkingEngine.request(4,c);xb(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=Rb(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
function qf(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.a.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return I.ae(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return xf(this,c,b,"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 xf(this,
c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-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 Na("NTP UTCTiming scheme is not supported"),Promise.reject();default:return Na("Unrecognized scheme in UTCTiming element",d),Promise.reject()}}.bind(b))["catch"](function(){Na("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!");
return 0})}n.df=function(b,c,d){var e=N.Ya,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=N.G(d,"timescale",e)||1;N.N(d,"Event").forEach(function(d){var k=N.G(d,"presentationTime",e)||0,m=N.G(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.b.onTimelineRegionAdded(d)}.bind(this))};
n.pf=function(b,c,d){b=Ab(b,this.a.retryParameters);null!=c&&(b.headers.Range="bytes="+c+"-"+(null!=d?d:""));c=this.b.networkingEngine.request(1,b);xb(this.f,c);return c.promise.then(function(b){return b.data})};function uf(b,c){return cd(Mb(b,c))?"text":b.split("/")[0]}ef.mpd=kf;df["application/dash+xml"]=kf;function yf(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function zf(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}zf.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function Af(b,c){this.name=b;this.value=c}
zf.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function Bf(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function Cf(b,c){this.b=c;this.a=b};function Df(b,c){return b.filter(function(b){return b.name==c})}function Ef(b,c){var d=Df(b,c);return d.length?d[0]:null}function Ff(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 Gf(b){this.b=b;this.a=0}function Hf(b){If(b,/[ \t]+/gm)}function If(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,rf:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.rf}function Jf(b){return b.a==b.b.length?null:(b=If(b,/[^ \t\n]*/gm))?b[0]:null};function Kf(){this.a=0}
function Lf(b,c,d){c=Rb(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 B(2,4,4015);c=0;for(var f=1;f<e.length;f++)if(!/^#(?!EXT)/m.test(e[f])){var g=Mf(b,e[f]);--b.a;if(Nf.includes(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=Mf(b,e[g]);if(Of.includes(h.name)){if(1!=c)throw new B(2,4,4017);e=e.splice(g,e.length-g);b=Pf(b,d,e,f);return new yf(d,
c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==h.name&&(h.a.push(new Af("URI",e[g])),g+=1)}return new yf(d,c,f)}function Pf(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=Mf(b,d),Nf.includes(d.name)?e.push(d):g.push(d);else{if(/^#(?!EXT)/m.test(d))return[];d=Tc([c],[d.trim()])[0];f.push(new Cf(d,g));g=[]}});return f}
function Mf(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new B(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new Gf(g);var k;(k=If(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=If(g,l);)e.push(new Af(k[1],k[2]||k[3]))}return new zf(d,f,e,h)}var Nf="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(" "),Of="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function Qf(b){try{var c=Qf.parse(b);return lb({uri:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return jb(d)}}y("shaka.net.DataUriPlugin",Qf);
Qf.parse=function(b){var c=b.split(":");if(2>c.length||"data"!=c[0])throw new B(2,1,1004,b);c=c.slice(1).join(":").split(",");if(2>c.length)throw new B(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=Yb(c).buffer;else{if(e)throw new B(2,1,1005,b);b=Wb(c)}return{data:b,contentType:d[0]}};zb("data",Qf);function Rf(){var b=this;this.g=this.c=null;this.$=1;this.D=new Map;this.R=new Set;this.a=new Map;this.b=null;this.v="";this.s=new Kf;this.o=0;this.i=new H(function(){Sf(b)});this.f=Tf;this.m=null;this.A=0;this.M=Infinity;this.h=new wb;this.P=[];this.l=new Map}y("shaka.hls.HlsParser",Rf);n=Rf.prototype;n.configure=function(b){this.g=b};
n.start=function(b,c){var d=this;return t(function f(){var g;return v(f,function(f){switch(f.j){case 1:return d.c=c,u(f,Uf(d,b),2);case 2:return g=f.u,d.v=g.uri,u(f,Vf(d,g.data),3);case 3:return 0<d.o&&d.i.start(d.o,!1),f["return"](d.m)}})})};n.stop=function(){this.i.stop();this.g=this.c=null;this.D.clear();this.R.clear();this.a.clear();this.m=null;return this.h.destroy()};
n.update=function(){if(this.f!=Wf.Ca){for(var b=[],c=q(this.a.values()),d=c.next();!d.done;d=c.next())b.push(Xf(this,d.value));return Promise.all(b)}};function Xf(b,c){Uf(b,c.Td).then(function(b){var d=Wf,f=Lf(this.s,b.data,b.uri);if(1!=f.type)throw new B(2,4,4017);b=Ef(f.a,"EXT-X-MEDIA-SEQUENCE");var g=c.stream;Yf(this,c.Tb,f,b?Number(b.value):0,g.mimeType,g.codecs).then(function(b){c.sb.a=b;b=b[b.length-1];Ef(f.a,"EXT-X-ENDLIST")&&(Zf(this,d.Ca),this.b.la(b.endTime))}.bind(this))}.bind(b))}
n.onExpirationUpdated=function(){};
function Vf(b,c){var d=Lf(b.s,c,b.v);if(0!=d.type)throw new B(2,4,4022);return $f(b,d).then(function(b){this.c.filterAllPeriods([b]);for(var c=Infinity,d=0,e=Infinity,k=q(this.a.values()),l=k.next();!l.done;l=k.next())l=l.value,c=Math.min(c,l.lc),d=Math.max(d,l.lc),"text"!=l.stream.type&&(e=Math.min(e,l.duration));this.f!=Wf.Ca?(this.b=new U(0,3*this.A),this.b.ub(!1)):(this.b=new U(null,0),this.b.ub(!0));ag(this);if(this.f!=Wf.Ca){this.o=this.M;this.f==Wf.Hc&&(c=this.b.Rb,isNaN(this.g.availabilityWindowOverride)||
(c=this.g.availabilityWindowOverride),this.b.Ac(c));for(c=0;95443.7176888889<=d;)c+=95443.7176888889,d-=95443.7176888889;if(c)for(d=q(this.a.values()),l=d.next();!l.done;l=d.next())e=l.value,95443.7176888889>e.lc&&(e.stream.presentationTimeOffset=-c,e.sb.offset(c))}else for(this.b.la(e),this.b.offset(-c),d=q(this.a.values()),l=d.next();!l.done;l=d.next())l=l.value,l.stream.presentationTimeOffset=c,l.sb.offset(-c),He(l.sb,e);this.m={presentationTimeline:this.b,periods:[b],offlineSessionIds:[],minBufferTime:0}}.bind(b))}
function $f(b,c){var d=c.a,e=Df(c.a,"EXT-X-MEDIA"),f=e.filter(function(b){return"SUBTITLES"==V(b,"TYPE")}.bind(b)).map(function(b){return bg(this,b)}.bind(b));e=e.filter(function(b){return"CLOSED-CAPTIONS"==V(b,"TYPE")});cg(b,e);return Promise.all(f).then(function(b){var e=Df(d,"EXT-X-STREAM-INF").map(function(b){return dg(this,b,c)}.bind(this));return Promise.all(e).then(function(c){return{startTime:0,variants:c.reduce(I.Xb,[]),textStreams:b}}.bind(this))}.bind(b))}
function dg(b,c,d){var e=Bf(c,"CODECS","avc1.42E01E,mp4a.40.2").split(/\s*,\s*/),f=c.getAttribute("RESOLUTION"),g=null,h=null,k=Bf(c,"FRAME-RATE"),l=Number(V(c,"BANDWIDTH"));if(f){var m=f.value.split("x");g=m[0];h=m[1]}d=Df(d.a,"EXT-X-MEDIA");d=d.filter(function(b){return"CLOSED-CAPTIONS"!=V(b,"TYPE")});d=d.filter(function(b){var c=Bf(b,"URI")||"";return"SUBTITLES"==(Bf(b,"TYPE")||"")||""!=c});var p=Bf(c,"AUDIO"),r=Bf(c,"VIDEO");p?d=Ff(d,"AUDIO",p):r&&(d=Ff(d,"VIDEO",r));if(m=eg("text",e)){var w=
Bf(c,"SUBTITLES");w&&(w=Ff(d,"SUBTITLES",w),w.length&&(b.D.get(w[0].id).stream.codecs=m));sb(e,m)}d=d.map(function(b){return fg(this,b,e)}.bind(b));var x=[],A=[];return Promise.all(d).then(function(b){p?x=b:r&&(A=b);b=!1;if(x.length||A.length)if(x.length)if(V(c,"URI")==x[0].Tb){var d="audio";b=!0}else d="video";else d="audio";else 1==e.length?(d=eg("video",e),d=f||k||d?"video":"audio"):(d="video",e=[e.join(",")]);return b?Promise.resolve():gg(this,c,e,d)}.bind(b)).then(function(b){b&&("audio"==b.stream.type?
x=[b]:A=[b]);A&&hg(A);x&&hg(x);return ig(this,x,A,l,g,h,k)}.bind(b))}function hg(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 ig(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 p=c[l]?c[l].stream:null,r=d[m]?d[m].stream:null,w=c[l]?c[l].drmInfos:null,x=d[m]?d[m].drmInfos:null,A=void 0;if(p&&r)if(w.length&&x.length?0<Hc(w,x).length:1)A=Hc(w,x);else continue;else p?A=w:r&&(A=x);w=(d[l]?d[l].Tb:"")+" - "+(c[l]?c[l].Tb:
"");b.R.has(w)||(p=jg(b,p,r,e,A),k.push(p),b.R.add(w))}return k}function jg(b,c,d,e,f){return{id:b.$++,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 bg(b,c){V(c,"TYPE");return fg(b,c,[]).then(function(b){return b.stream})}
function cg(b,c){for(var d=q(c),e=d.next();!e.done;e=d.next()){e=e.value;V(e,"TYPE");var f=Bf(e,"LANGUAGE")||"und";f=J(f);var g=V(e,"GROUP-ID");e=V(e,"INSTREAM-ID");b.l.get(g)||b.l.set(g,new Map);b.l.get(g).set(e,f)}}
function fg(b,c,d){var e=V(c,"URI");if(b.a.has(e))return Promise.resolve(b.a.get(e));var f=V(c,"TYPE").toLowerCase();"subtitles"==f&&(f="text");var g=J(Bf(c,"LANGUAGE","und")),h=Bf(c,"NAME"),k=c.getAttribute("DEFAULT"),l=c.getAttribute("AUTOSELECT"),m=Bf(c,"CHANNELS");return kg(b,e,d,f,g,!!k||!!l,h,"audio"==f?lg(m):null,null).then(function(b){if(this.a.has(e))return this.a.get(e);this.D.set(c.id,b);this.a.set(e,b);return b}.bind(b))}
function lg(b){if(!b)return null;b=b.split("/")[0];return parseInt(b,10)}function gg(b,c,d,e){var f=V(c,"URI");if(b.a.has(f))return Promise.resolve(b.a.get(f));c=Bf(c,"CLOSED-CAPTIONS");var g=null;"video"==e&&c&&"NONE"!=c&&(g=b.l.get(c));return kg(b,f,d,e,"und",!1,null,null,g).then(function(b){if(this.a.has(f))return this.a.get(f);this.a.set(f,b);return b}.bind(b))}
function kg(b,c,d,e,f,g,h,k,l){var m=Tc([b.v],[c])[0],p,r="",w;return Uf(b,m).then(function(c){m=c.uri;p=Lf(b.s,c.data,m);if(1!=p.type)throw new B(2,4,4017);c=p;var f=Wf,g=Ef(c.a,"EXT-X-PLAYLIST-TYPE"),h=Ef(c.a,"EXT-X-ENDLIST");h=g&&"VOD"==g.value||h;g=g&&"EVENT"==g.value&&!h;g=!h&&!g;h?Zf(b,f.Ca):(g?Zf(b,f.Hc):Zf(b,f.Od),c=ug(c.a,"EXT-X-TARGETDURATION"),c=Number(c.value),b.A=Math.max(c,b.A),b.M=Math.min(c,b.M));if(1==d.length)r=d[0];else if(c=eg(e,d),null!=c)r=c;else throw new B(2,4,4025,d);return vg(b,
e,r,p)}).then(function(d){w=d;d=Ef(p.a,"EXT-X-MEDIA-SEQUENCE");return Yf(b,c,p,d?Number(d.value):0,w,r)}).then(function(d){var A=d[0].startTime,x=d[d.length-1].endTime,X=x-A;d=new T(d);var Y=wg(p),fa=void 0;"text"==e&&(fa="subtitle");var ia=[];p.segments.forEach(function(b){b=Df(b.b,"EXT-X-KEY");ia.push.apply(ia,b)});var Ka=!1,Xa=[],ja=null;ia.forEach(function(b){if("NONE"!=V(b,"METHOD")){Ka=!0;var c=V(b,"KEYFORMAT");if(b=(c=xg[c])?c(b):null)b.keyIds.length&&(ja=b.keyIds[0]),Xa.push(b)}});if(Ka&&
!Xa.length)throw new B(2,4,4026);return{stream:{id:b.$++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:d.find.bind(d),getSegmentReference:d.get.bind(d),initSegmentReference:Y,presentationTimeOffset:0,mimeType:w,codecs:r,kind:fa,encrypted:Ka,keyId:ja,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},sb:d,drmInfos:Xa,Tb:c,Td:m,lc:A,Zf:x,
duration:X}})}function wg(b){var c=Df(b.a,"EXT-X-MAP");if(!c.length)return null;if(1<c.length)throw new B(2,4,4020);c=c[0];var d=V(c,"URI"),e=Tc([b.b],[d])[0];b=0;d=null;if(c=Bf(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new ye(function(){return[e]},b,d)}
function yg(b,c,d,e){var f=c.b,g=c.a;c=ug(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=Ef(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new O(d,e,c,function(){return[g]},h,k)}function ag(b){b.b&&(b.P.forEach(function(c){b.b.Wa(c,0)}),b.P=[])}
function Yf(b,c,d,e,f,g){var h=d.segments,k=[],l=h[0].a,m=yg(null,h[0],e,0);d=wg(d);return zg(b,c,d,m,f,g).then(function(b){l.split("/").pop();for(var c=0;c<h.length;++c){var d=k[k.length-1];d=yg(d,h[c],e+c,0==c?b:d.endTime);k.push(d)}this.P.push(k);ag(this);return k}.bind(b))}
function Ag(b,c){var d=b.c.networkingEngine,e=Ab(c.c(),b.g.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);xb(b.h,f);return f.promise["catch"](function(){Na("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;var c=d.request(1,e);xb(b.h,c);return c.promise})}
function zg(b,c,d,e,f,g){if(b.m&&(c=b.a.get(c).sb.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||f.startsWith("text/")){b=b[0].data;var c=Mb(f,g);if(cd(c)){var d=new ad(null);dd(d,c);b=d.ec(b)}else b=0;return b}throw new B(2,
4,4030);}.bind(b))}function Bg(b,c){var d=0;(new Q).F("moov",S).F("trak",S).F("mdia",S).aa("mdhd",function(b){b.reader.I(0==b.version?8:16);d=b.reader.C();b.parser.stop()}).parse(c,!0);if(!d)throw new B(2,4,4030);var e=0,f=!1;(new Q).F("moof",S).F("traf",S).aa("tfdt",function(b){e=(0==b.version?b.reader.C():b.reader.$a())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new B(2,4,4030);return e}
function Cg(b){function c(){throw new B(2,4,4030);}b=new P(new DataView(b),0);for(var d=0,e=0;;)if(d=b.X(),e=b.fa(),71!=e&&c(),b.qb()&16384||c(),e=(b.fa()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.fa(),b.I(e)),1!=b.C()>>8)b.seek(d+188),e=b.fa(),71!=e&&(b.seek(d+192),e=b.fa()),71!=e&&(b.seek(d+204),e=b.fa()),71!=e&&c(),b.zd(1);else return b.I(3),d=b.fa()>>6,0!=d&&1!=d||c(),0==b.fa()&&c(),d=b.fa(),e=b.qb(),b=b.qb(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
function eg(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=e.segments[0].a;var f=(new Qa(e)).da.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=Ab([e],b.g.retryParameters);c.method="HEAD";c=b.c.networkingEngine.request(1,c);xb(b.h,c);return c.promise.then(function(b){b=b.headers["content-type"];if(!b)throw new B(2,4,4021,f);return b.split(";")[0]})}
function V(b,c){var d=b.getAttribute(c);if(!d)throw new B(2,4,4023,c);return d.value}function ug(b,c){var d=Ef(b,c);if(!d)throw new B(2,4,4024,c);return d}function Uf(b,c){var d=b.c.networkingEngine.request(0,Ab([c],b.g.retryParameters));xb(b.h,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"}};
function Sf(b){t(function d(){var e;return v(d,function(d){switch(d.j){case 1:if(!b.c)return d["return"]();qa(d,2);return u(d,b.update(),4);case 4:b.i.start(b.o,!1);sa(d,0);break;case 2:e=ta(d),e.severity=1,b.c.onError(e),b.i.start(.1,!1),d.j=0}})})}function Zf(b,c){b.f=c;b.b&&b.b.ub(b.f==Wf.Ca);b.f!=Wf.Ca||b.i.stop()}
var xg={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=V(b,"METHOD");Cd("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=V(b,"URI");c=Qf.parse(c);c=new Uint8Array(c.data);c=Uc("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=Bf(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},Tf="VOD",Wf={Ca:Tf,Od:"EVENT",Hc:"LIVE"};ef.m3u8=Rf;
df["application/x-mpegurl"]=Rf;df["application/vnd.apple.mpegurl"]=Rf;function Fg(){this.a=new Map}function Gg(b,c){b.a.has(c)||b.a.set(c,new Hg);return b.a.get(c)}function Hg(){this.text=this.variant=null};function Ig(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=q(c),e=d.next();!e.done;e=d.next())this.add(e.value)}Ig.prototype.add=function(b){return Jg(this.a,b)?(this.b.add(b),!0):!1};function Jg(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&Kg(d,e)&&Lg(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(Kg(d,e)&&Lg(d.roles,e.roles)));return d?!1:!0}
Ig.prototype.values=function(){return this.b.values()};function Kg(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return Pb(b)[0]}),e=c.codecs.split(",").map(function(b){return Pb(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
function Lg(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=q(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function Mg(b){this.a=b;this.b=new Ng(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}Mg.prototype.create=function(b){var c=this,d=b.filter(function(b){return Jg(c.a,b)});return d.length?new Ig(d[0],d):this.b.create(b)};function Ng(b,c,d){this.c=b;this.b=c;this.a=d}
Ng.prototype.create=function(b){var c=[];c=Og(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=Pg(c,this.b),b.length&&(c=b));this.a&&(b=K.Uc(c,this.a),b.length&&(c=b));b=new Ig(c[0]);c=q(c);for(d=c.next();!d.done;d=c.next())d=d.value,Jg(b.a,d)&&b.add(d);return b};function Og(b,c){var d=J(c),e=zd(d,b.map(function(b){return yd(b)}));return e?b.filter(function(b){return e==yd(b)}):[]}
function Pg(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function Qg(b){var c=this;this.c=b;this.a=new Set;this.b=new H(function(){Rg(c,!1)});this.b.start(.25,!0)}Qg.prototype.L=function(){this.b.stop();for(var b=q(this.a),c=b.next();!c.done;c=b.next())c.value.L();this.a.clear()};function Rg(b,c){for(var d=q(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function Sg(b,c,d){var e=this;this.c=Tg;this.f=.5;this.h=b;this.l=d;this.i=c;this.b=function(){};this.a=function(){};this.m=[{Ld:Tg,is:Ug,Pc:function(){return e.a()}},{Ld:Ug,is:Tg,Pc:function(){return e.b()}}];this.f>=this.h&&(Na("Rebuffering threshold is set too low! This could cause poor buffering behavior during playback!"),this.f=this.h/2)}Sg.prototype.L=function(){this.b=function(){};this.a=function(){}};
Sg.prototype.g=function(b){var c=this.c==Ug?this.f:this.h;b=this.i(b);c=this.l()||b>=c?Ug:Tg;b=q(this.m);for(var d=b.next();!d.done;d=b.next())d=d.value,this.c==d.Ld&&c==d.is&&d.Pc();this.c=c};function Vg(b,c,d){b.b=c;b.a=d}var Tg=0,Ug=1;function Wg(b){this.g=b;this.f=Xg(b);this.a=b.a.currentTime;this.b=Date.now()/1E3;this.c=function(){}}function Yg(b,c){b.c=c}function Zg(b){this.a=b}function Xg(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function $g(b,c,d,e){this.a=b;this.s=c;this.m=d;this.o=e;this.f=new Eb;this.b=null;this.h=!1;this.l=b.readyState;this.c=!1;this.v=new Wg(new Zg(b));Yg(this.v,function(){b.currentTime+=.1});this.g=!1;c=this.i.bind(this);G(this.f,b,"waiting",c);this.b=new H(c);this.b.start(.25,!0)}$g.prototype.L=function(){this.f&&(this.f.L(),this.f=null);null!=this.b&&(this.b.stop(),this.b=null);this.a=this.s=this.o=null};$g.prototype.pb=function(){this.g=!0;this.i()};
$g.prototype.i=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.h)return}else this.h=!1;if(!this.a.paused){this.a.readyState!=this.l&&(this.c=!1,this.l=this.a.readyState);var b=this.m.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=Qb("Edge/")||Qb("Trident/")||Qb("Tizen")||Qb("CrKey")?.5:.1;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){d=this.v;e=d.g;c=Xg(e);
e=e.a.currentTime;f=Date.now()/1E3;if(d.a!=e||d.f!=c)d.b=f,d.a=e,d.f=c;e=f-d.b;1<=e&&c&&d.c(d.a,e)}else if(0!=e||this.g){f=d.start(e);var g=this.s.qa();if(!(f>=g)){g=f-c;b=g<=b;var h=!1;.001>g||(b||this.c||(this.c=!0,c=new D("largegap",{currentTime:c,gapSize:g}),c.cancelable=!0,this.o(c),this.m.jumpLargeGaps&&!c.defaultPrevented&&(h=!0)),!b&&!h)||(0!=e&&d.end(e-1),this.a.currentTime=f)}}}}};function ah(b){this.c=b;this.a=null;this.b=function(){}}ah.prototype.L=function(){this.a=this.c=null;this.b=function(){}};ah.prototype.g=function(b){for(var c=this.a,d=this.c.periods[0],e=q(this.c.periods),f=e.next();!f.done;f=e.next())f=f.value,b>=f.startTime&&(d=f);b=d;c!=b&&this.b(b);this.a=b};function bh(b,c){b.b=c};function ch(b,c,d){this.a=b;this.i=c;this.h=d;this.c=new Eb;this.f=1;this.g=!1;this.b=null;0<b.readyState?this.nd():Hb(this.c,b,"loadedmetadata",this.nd.bind(this));G(this.c,b,"ratechange",this.Qe.bind(this))}n=ch.prototype;n.L=function(){this.c&&(this.c.L(),this.c=null);null!=this.b&&(this.b.stop(),this.b=null);this.a=this.i=null};function dh(b){return 0<b.a.readyState?b.a.currentTime:b.h}function eh(b,c){0<b.a.readyState?fh(b,b.a.currentTime,c):(b.h=c,setTimeout(b.i,0))}n.ib=function(){return this.f};
function gh(b,c){null!=b.b&&(b.b.stop(),b.b=null);b.f=c;b.a.playbackRate=b.g||0>c?0:c;!b.g&&0>c&&(b.b=new H(function(){b.a.currentTime+=c/4}),b.b.start(.25,!0))}n.Qe=function(){var b=this.g||0>this.f?0:this.f;this.a.playbackRate&&this.a.playbackRate!=b&&gh(this,this.a.playbackRate)};n.nd=function(){.001>Math.abs(this.a.currentTime-this.h)?this.od():(Hb(this.c,this.a,"seeking",this.od.bind(this)),this.a.currentTime=0==this.a.currentTime?this.h:this.a.currentTime)};
n.od=function(){var b=this;G(this.c,this.a,"seeking",function(){return b.i()})};function fh(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 hh(b,c,d,e,f,g,h){this.c=b;this.a=c;this.m=d;this.h=e;this.l=g;this.f=null;this.g=new $g(b,c,e,h);c=this.Se.bind(this);null==f?f=Infinity>this.a.T()?this.a.Ra():this.a.qa():0>f&&(f=this.a.qa()+f);f=ih(this,jh(this,f));this.b=new ch(b,c,f);this.f=new H(this.Pe.bind(this));this.f.start(.25,!0)}n=hh.prototype;n.L=function(){this.b&&(this.b.L(),this.b=null);this.g&&(this.g.L(),this.g=null);this.f&&(this.f.stop(),this.f=null);this.c=this.b=this.a=this.l=this.h=null};
function kh(b){var c=dh(b.b);0<b.c.readyState&&(b.c.paused||(c=jh(b,c)));return c}n.ib=function(){return this.b.ib()};n.pb=function(){this.g.pb()};n.Pe=function(){if(0!=this.c.readyState&&!this.c.paused){var b=this.c.currentTime,c=this.a.Ra(),d=this.a.qa();3>d-c&&(c=d-3);b<c&&(b=lh(this,b),this.c.currentTime=b)}};n.Se=function(){var b=this.g;b.h=!0;b.g=!1;b.c=!1;var c=dh(this.b);b=lh(this,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!this.i||this.i<c-1)){this.i=c;eh(this.b,b);return}this.l()};
function ih(b,c){var d=b.a.T();return c>=d?d-b.h.durationBackoff:c}function lh(b,c){var d=Qc.bind(null,b.c.buffered),e=Math.max(b.m,b.h.rebufferingGoal),f=b.h.safeSeekOffset,g=b.a.Ra(),h=b.a.qa(),k=b.a.T();3>h-g&&(g=h-3);var l=b.a.jb(e),m=b.a.jb(f);e=b.a.jb(e+f);return c>=k?ih(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}function jh(b,c){var d=b.a.Ra();if(c<d)return d;d=b.a.qa();return c>d?d:c};function mh(){this.b=function(){};this.a=new Set}mh.prototype.L=function(){this.b=function(){};this.a.clear()};function nh(b,c){b.b=c};function oh(b){var c=this;this.h=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.i=[{Na:null,Ma:ph,Fa:function(b,e){return c.a(b,e)}},{Na:qh,Ma:ph,Fa:function(b,e){return c.a(b,e)}},{Na:rh,Ma:ph,Fa:function(b,e){return c.a(b,e)}},{Na:ph,Ma:qh,Fa:function(b,e){return c.b(b,e)}},{Na:ph,Ma:rh,Fa:function(b,e){return c.b(b,e)}},{Na:qh,Ma:rh,Fa:function(b,e){return c.c(b,e)}},{Na:rh,Ma:qh,Fa:function(b,e){return c.c(b,e)}}]}
oh.prototype.L=function(){this.h=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};oh.prototype.g=function(b,c){for(var d=q(this.h.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?qh:b>e.endTime?rh:ph;this.f.set(e,g);for(var h=q(this.i),k=h.next();!k.done;k=h.next())k=k.value,k.Na==f&&k.Ma==g&&k.Fa(e,c)}};function sh(b,c,d,e){b.a=c;b.b=d;b.c=e}var qh=1,ph=2,rh=3;function th(b,c){this.a=c;this.b=b;this.g=null;this.l=1;this.s=Promise.resolve();this.h=[];this.i=new Map;this.c=new Map;this.o=!1;this.D=null;this.A=this.f=this.m=!1;this.v=0}n=th.prototype;n.destroy=function(){for(var b=q(this.c.values()),c=b.next();!c.done;c=b.next())uh(c.value);this.c.clear();this.i.clear();this.g=this.h=this.s=this.b=this.a=null;this.f=!0;return Promise.resolve()};
n.configure=function(b){this.g=b;this.D=new fb({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=this;return t(function d(){var e,f,g;return v(d,function(d){switch(d.j){case 1:return e=b.a.Qa(),f=K.Ib(b.b,e),g=b.a.hd(b.b.periods[f]),g.variant||g.text?u(d,vh(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](Promise.reject(new B(2,5,5005)));case 2:if(b.f)return d["return"]();b.a&&b.a.Ie&&b.a.Ie();d.j=0}})})};function wh(b){return xh(b,"audio")}function yh(b){return xh(b,"video")}
function xh(b,c){var d=b.c.get(c);return d?d.ya||d.stream:null}function zh(b,c){return t(function e(){var f,g,h,k,l,m,p,r;return v(e,function(e){switch(e.j){case 1:return f=Vc,rd(b.a.J,f.Oa),b.v++,b.A=!1,g=b.v,h=b.a.J,k=new Map,l=new Set,k.set(f.Oa,c),l.add(c),u(e,h.init(k,!1),2);case 2:return b.f?e["return"]():u(e,Ah(b,l),3);case 3:if(b.f)return e["return"]();b.v!=g||b.c.has(f.Oa)||b.A||(m=b.a.Qa(),p=K.Ib(b.b,m),r=Bh(c,p,0),b.c.set(f.Oa,r),b.o&&Ch(b,r,0));e.j=0}})})}
function Dh(b,c){var d=b.c.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.ya&&(Eh(b,f,!1,0),d.ya=e)}else if(e=d.ya)d.ya=null,Eh(b,e,!0,0)}}function Fh(b,c,d,e){c.video&&Eh(b,c.video,d,e);c.audio&&Eh(b,c.audio,d,e)}
function Eh(b,c,d,e){var f=b.c.get(c.type);if(!f&&"text"==c.type&&b.g.ignoreTextStreamFailures)zh(b,c);else if(f){var g=Gh(b,c);d&&g!=f.xa?Hh(b):(f.ya&&(c.trickModeVideo?(f.ya=c,c=c.trickModeVideo):f.ya=null),(g=b.h[g])&&g.ab&&(g=b.i.get(c.id))&&g.ab&&f.stream!=c&&("text"==c.type&&kd(b.a.J,Mb(c.mimeType,c.codecs)),f.stream=c,f.Nb=!0,d&&(f.Da?f.Ub=!0:f.Ha?(f.Ba=!0,f.Eb=e,f.Ub=!0):(uh(f),Ih(b,f,!0,e)))))}}
function Jh(b){var c=b.a.Qa(),d=b.g.smallGapLimit;Array.from(b.c.keys()).every(function(e){var f=b.a.J;"text"==e?(e=f.a,e=c>=e.a&&c<e.b):(e=md(f,e),e=Qc(e,c,d));return e})||Hh(b)}function Hh(b){b.c.forEach(function(c,d){c.Da||c.Ba||(c.Ha?(c.Ba=!0,c.Eb=0):null==ld(b.a.J,d)?null==c.Aa&&Ch(b,c,0):(uh(c),Ih(b,c,!1,0)))})}
function vh(b,c,d,e,f){return t(function h(){var k,l,m,p,r,w,x;return v(h,function(h){switch(h.j){case 1:return k=b.a.Qa(),l=K.Ib(b.b,k),m=Vc,p=new Map,r=new Set,c&&(p.set(m.Md,c),r.add(c)),d&&(p.set(m.Rd,d),r.add(d)),e&&(p.set(m.Oa,e),r.add(e)),w=b.a.J,x=b.g.forceTransmuxTS,u(h,w.init(p,x),2);case 2:if(b.f)return h["return"]();Kh(b);return u(h,Ah(b,r),3);case 3:if(b.f)return h["return"]();p.forEach(function(c,d){if(!b.c.has(d)){var e=Bh(c,l,f);b.c.set(d,e);Ch(b,e,0)}});h.j=0}})})}
function Bh(b,c,d){return{stream:b,type:b.type,Ua:null,ra:null,ya:null,Nb:!0,xa:c,endOfStream:!1,Ha:!1,Aa:null,Ba:!1,Eb:0,Ub:!1,Da:!1,vc:!1,lb:!1,yd:d}}
function Lh(b,c){var d=b.h[c];if(d)return d.promise;d={promise:new z,ab:!1};b.h[c]=d;for(var e=new Set,f=q(b.b.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=q(b.b.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.s=b.s.then(function(){if(!this.f)return Ah(this,e)}.bind(b)).then(function(){this.f||(this.h[c].promise.resolve(),this.h[c].ab=!0)}.bind(b))["catch"](function(b){this.f||
(this.h[c].promise["catch"](function(){}),this.h[c].promise.reject(),delete this.h[c],this.a.onError(b))}.bind(b));return d.promise}
function Ah(b,c){return t(function e(){var f,g,h,k,l,m,p;return v(e,function(e){switch(e.j){case 1:f=[];for(var r=q(c),x=r.next();!x.done;x=r.next())g=x.value,(h=b.i.get(g.id))?f.push(h.promise):(b.i.set(g.id,{promise:new z,ab:!1}),f.push(g.createSegmentIndex()));qa(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();sa(e,3);break;case 2:k=ta(e);if(b.f)return e["return"]();e=q(c);for(x=e.next();!x.done;x=e.next())l=x.value,b.i.get(l.id).promise["catch"](function(){}),b.i.get(l.id).promise.reject(),
b.i["delete"](l.id);throw k;case 3:r=q(c);for(x=r.next();!x.done;x=r.next())m=x.value,p=b.i.get(m.id),p.ab||(p.promise.resolve(),p.ab=!0);e.j=0}})})}function Kh(b){var c=b.b.presentationTimeline.T();Infinity>c?b.a.J.la(c):b.a.J.la(Math.pow(2,32))}
n.Hf=function(b){if(!this.f&&!b.Ha&&null!=b.Aa&&!b.Da)if(b.Aa=null,b.Ba)Ih(this,b,b.Ub,b.Eb);else{try{var c=Mh(this,b);null!=c&&(Ch(this,b,c),b.lb=!1)}catch(d){Nh(this,d);return}c=Array.from(this.c.values());Oh(this,b);c.every(function(b){return b.endOfStream})&&this.a.J.endOfStream().then(function(){if(!this.f){var b=this.a.J.T();b<this.b.presentationTimeline.T()&&this.b.presentationTimeline.la(b)}}.bind(this))}};
function Mh(b,c){function d(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}if(d(c))return b.a.J.Sb(c.stream.originalId||""),null;var e=b.a.Qa(),f=Ph(b,c,e),g=Gh(b,c.stream),h=K.Ib(b.b,f),k=od(b.a.J,c.type,e),l=Math.max(b.b.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.l;if(f>=b.b.presentationTimeline.T())return c.endOfStream=!0,"video"==c.type&&(f=b.c.get("text"))&&"application/cea-608"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.xa=h;if(h!=g)return null;
if(k>=l)return.5;h=nd(b.a.J,c.type);h=Qh(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.c.values()).forEach(function(c){d(c)||(c=Ph(b,c,e),m=Math.min(m,c))});if(f>=m+b.b.presentationTimeline.a)return 1;c.yd=0;Rh(b,c,e,g,h);return null}function Ph(b,c,d){if(!c.Ua||!c.ra)return Math.max(d,c.yd);d=Gh(b,c.Ua);return b.b.periods[d].startTime+c.ra.endTime}
function Qh(b,c,d,e,f){if(c.ra&&c.stream==c.Ua)return Sh(b,c,f,c.ra.position+1);c.ra?(d=Gh(b,c.Ua),d=c.stream.findSegmentPosition(Math.max(0,b.b.periods[d].startTime+c.ra.endTime-b.b.periods[f].startTime))):d=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.kb();e=e.Sa();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.T(),l=b.b.periods[e+1];e=Th(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.Ha=!0;c.Nb=!1;k=Uh(b,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.m)return Vh(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.m||(c.Ha=!1,c.vc=!1,c.Ba||this.a.pb(),Ch(this,c,0),Wh(this,h))}.bind(b))["catch"](function(b){this.f||this.m||(c.Ha=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.c["delete"]("text"):
3017==b.code?Xh(this,c,b):(c.lb=!0,b.severity=2,Nh(this,b)))}.bind(b))}function Xh(b,c,d){if(!Array.from(b.c.values()).some(function(b){return b!=c&&b.vc})){var e=Math.round(100*b.l);if(20<e)b.l-=.2;else if(4<e)b.l-=.04;else{c.lb=!0;b.m=!0;b.a.onError(d);return}c.vc=!0}Ch(b,c,4)}
function Th(b,c,d,e,f){if(!c.Nb)return Promise.resolve();d=sd(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 pd(this.a.J,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.Nb=!0;return Promise.reject(b)});return Promise.all([d,b])}
function Vh(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new Q).aa("emsg",b.cf.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return Yh(b,c,d).then(function(){if(!this.f)return pd(this.a.J,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.Ua=f,c.ra=g,Promise.resolve()}.bind(b))}
n.cf=function(b,c,d,e){var f=e.reader.tc(),g=e.reader.tc(),h=e.reader.C(),k=e.reader.C(),l=e.reader.C(),m=e.reader.C();e=e.reader.Ia(e.reader.H.byteLength-e.reader.X());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.Je();else this.a.onEvent(new D("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
function Yh(b,c,d){var e=Math.max(b.g.bufferBehind,b.b.presentationTimeline.a),f=ld(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=Array.from(b.c.values()).every(function(b){return"text"==b.type?!0:!b.Ba&&!b.Da&&b.ra}),b.o)){var d=Gh(b,c);b.h[d]||Lh(b,d).then(function(){this.f||this.a.gd()}.bind(b))["catch"](I.ob);for(d=0;d<b.b.periods.length;++d)Lh(b,d)["catch"](I.ob);b.a.Ve&&b.a.Ve()}}
function Oh(b,c){var d=Gh(b,c.stream);if(c.xa!=d){var e=c.xa,f=Array.from(b.c.values());f.every(function(b){return b.xa==e})&&f.every(Zh)&&Lh(b,e).then(function(){if(!this.f&&f.every(function(b){var c=Zh(b),d=Gh(this,b.stream);return c&&b.xa==e&&d!=e}.bind(this))){var b=this.b.periods[e],c=this.a.hd(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=q(this.c.keys());for(c=l.next();!c.done;c=
l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new B(2,5,5005));return}l=q(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.c.has(c))if("text"==c)vh(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new B(2,5,5005));return}b=q(Array.from(this.c.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(Eh(this,l,!1,0),Ch(this,this.c.get(c),0)):this.c["delete"](c);this.a.gd()}}.bind(b))["catch"](I.ob)}}
function Zh(b){return!b.Ha&&null==b.Aa&&!b.Ba&&!b.Da}function Gh(b,c){for(var d=b.b.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=q(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=q(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}
function Uh(b,c){var d=Ab(c.c(),b.g.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.nb.request(1,d).promise.then(function(b){return b.data})}
function Ih(b,c,d,e){t(function g(){var h,k,l;return v(g,function(g){switch(g.j){case 1:return c.Ba=!1,c.Ub=!1,c.Eb=0,c.Da=!0,e?(k=b.a.Qa(),l=b.a.J.T(),h=b.a.J.remove(c.type,k+e,l)):h=rd(b.a.J,c.type).then(function(){if(!this.f&&d)return this.a.J.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.Ua=null;c.ra=null;c.Da=!1;c.endOfStream=!1;Ch(b,c,0);g.j=0}})})}function Ch(b,c,d){c.Aa=window.setTimeout(b.Hf.bind(b,c),1E3*d)}
function uh(b){null!=b.Aa&&(window.clearTimeout(b.Aa),b.Aa=null)}function Nh(b,c){ib(b.D).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function $h(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=Vb(c)}catch(h){}throw new B(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function ai(b,c,d,e){var f=new ai.b;Kb(c.headers).forEach(function(b,c){f.append(c,b)});var g=new ai.a,h={body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},k={Nc:!1,Id:!1},l;c.retryParameters.timeout&&(l=setTimeout(function(){k.Id=!0;g.abort()},c.retryParameters.timeout));b=ai.h(b,d,h,k,l,e);return new C(b,function(){k.Nc=!0;g.abort();return Promise.resolve()})}y("shaka.net.HttpFetchPlugin",ai);
ai.h=function(b,c,d,e,f,g){return t(function k(){var l,m,p,r,w,x,A,R,X,Y,fa,ia;return v(k,function(k){switch(k.j){case 1:return l=ai.g,m=ai.c,x=w=0,A=Date.now(),qa(k,2,3),u(k,l(b,d),5);case 5:return p=k.u,R=p.clone().body.getReader(),X=function(b){function c(){return t(function Mc(){var d,e;return v(Mc,function(f){switch(f.j){case 1:return u(f,R.read(),2);case 2:d=f.u;d.done||(w+=d.value.byteLength);e=Date.now();if(100<e-A||d.done)g(e-A,w-x),x=w,A=e;d.done?b.close():(b.enqueue(d.value),c());f.j=0}})})}
c()},new m({start:X}),u(k,p.arrayBuffer(),6);case 6:r=k.u;case 3:ua(k);clearTimeout(f);va(k,4);break;case 2:Y=ta(k);if(e.Nc)throw new B(1,1,7001,b,c);if(e.Id)throw new B(1,1,1003,b,c);throw new B(1,1,1002,b,Y,c);case 4:return fa={},ia=p.headers,ia.forEach(function(b,c){fa[c.trim()]=b}),k["return"]($h(fa,r,p.status,b,p.url,c))}})})};ai.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};
ai.isSupported=ai.isSupported;ai.g=window.fetch;ai.a=window.AbortController;ai.c=window.ReadableStream;ai.b=window.Headers;ai.isSupported()&&(zb("http",ai,2),zb("https",ai,2));function bi(b,c,d,e){var f=new bi.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new B(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=q(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=$h(f,c.response,c.status,b,c.responseURL,
d);k(h)}catch(X){m(X)}};f.onerror=function(c){m(new B(1,1,1002,b,c,d))};f.ontimeout=function(){m(new B(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new C(k,function(){f.abort();return Promise.resolve()})}y("shaka.net.HttpXHRPlugin",bi);bi.f=window.XMLHttpRequest;zb("http",bi,1);zb("https",bi,1);function ci(b,c){this.i=b;this.c=new Map;this.g=!1;this.h=c;this.a=this.b=this.f=0}ci.prototype.destroy=function(){this.g=!0;return Promise.all(this.c.values()).then(function(){},function(){})};
function di(b,c,d,e,f){b.b+=e;var g=b.c.get(c)||Promise.resolve();b.c.set(c,g.then(function(){return t(function k(){var c,g;return v(k,function(k){switch(k.j){case 1:return u(k,ei(b,d),2);case 2:c=k.u;if(b.g)throw new B(2,9,7001);b.f+=e;b.a+=c.byteLength;g=b.b?b.f/b.b:0;b.h(g,b.a);return k["return"](f(c))}})})}))}function fi(b){return t(function d(){return v(d,function(d){switch(d.j){case 1:return u(d,Promise.all(b.c.values()),2);case 2:return d["return"](b.a)}})})}
function ei(b,c){return t(function e(){var f,g;return v(e,function(e){switch(e.j){case 1:return f=b.i.request(1,c),u(e,f.promise,2);case 2:return g=e.u,e["return"](g.data)}})})};function gi(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()}}gi.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
function hi(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}gi.prototype.store=function(){return this.b};gi.prototype.promise=function(){return this.a};function ii(b){this.b=b;this.a=[]}ii.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function ji(b,c){return ki(b,c,"readonly")}function li(b,c){return ki(b,c,"readwrite")}function ki(b,c,d){d=b.b.transaction([c],d);var e=new gi(d,c);b.a.push(e);e.promise().then(function(){sb(b.a,e)},function(){sb(b.a,e)});return e};function mi(b){this.a=new ii(b)}mi.prototype.destroy=function(){return this.a.destroy()};mi.prototype.getAll=function(){var b=this;return t(function d(){var e,f;return v(d,function(d){switch(d.j){case 1:return e=ji(b.a,"session-ids"),f=[],u(d,hi(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};mi.prototype.add=function(b){var c=li(this.a,"session-ids"),d=c.store();b=q(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
mi.prototype.remove=function(b){var c=this;return t(function e(){var f;return v(e,function(e){switch(e.j){case 1:return f=li(c.a,"session-ids"),u(e,hi(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function ni(){this.a=new Map}ni.prototype.destroy=function(){for(var b=[],c=q(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};ni.prototype.init=function(){var b=this;oi.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=q(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
function pi(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{ja:e,W:d},W:b})})});if(c)return c;throw new B(2,9,9013,"Could not find a cell that supports add-operations");}function qi(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({ja:e,W:d},b)})})}
function ri(b,c,d){b=b.a.get(c);if(!b)throw new B(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new B(2,9,9013,"Could not find cell with name "+d);return c}function si(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function ti(b){var c=Array.from(b.a.keys());if(!c.length)throw new B(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
ni.prototype.erase=function(){var b=this;return t(function d(){var e,f,g;return v(d,function(d){switch(d.j){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=oi,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.B(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function ui(b,c){oi.set(b,c)}y("shaka.offline.StorageMuxer.register",ui);y("shaka.offline.StorageMuxer.unregister",function(b){oi["delete"](b)});
function vi(){for(var b=q(oi.values()),c=b.next();!c.done;c=b.next())if(c=c.value,c=c())return c.destroy(),!0;return!1}var oi=new Map;function wi(b){this.a=new ii(b)}n=wi.prototype;n.destroy=function(){return this.a.destroy()};n.hasFixedKeySpace=function(){return!0};n.addSegments=function(){return xi("segment")};n.removeSegments=function(b,c){return yi(this,"segment",b,c)};n.getSegments=function(b){return zi(this,"segment",b).then(function(b){return b.map(Ai)})};n.addManifests=function(){return xi("manifest")};
n.updateManifestExpiration=function(b,c){var d=li(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 B(2,9,9012,"Could not find values for "+b))};return d.promise().then(function(){return f})};n.removeManifests=function(b,c){return yi(this,"manifest",b,c)};n.getManifests=function(b){return zi(this,"manifest",b).then(function(b){return b.map(Bi)})};
n.getAllManifests=function(){var b=this;return t(function d(){var e,f,g;return v(d,function(d){switch(d.j){case 1:return e=Bi,f=ji(b.a,"manifest"),g=new Map,u(d,hi(f,function(b,d){g.set(b,e(d))}),2);case 2:return u(d,f.promise(),3);case 3:return d["return"](g)}})})};function xi(b){return Promise.reject(new B(2,9,9011,"Cannot add new value to "+b))}function yi(b,c,d,e){b=li(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
function zi(b,c,d){b=ji(b.a,c);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 B(2,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})}
function Bi(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(Ci),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function Ci(b){Di(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(Ei)}}
function Ei(b){var c=b.Ae?Fi(b.Ae):null;return{id:b.id,originalId:null,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(Gi),variantIds:b.variantIds}}function Gi(b){var c=Fi(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
function Ai(b){return{data:b.data}}function Fi(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 B(2,9,9004,"Could not parse uri "+b);}
function Di(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 Hi(b,c,d,e){this.a=new ii(b);this.c=c;this.b=d;this.f=e}n=Hi.prototype;n.destroy=function(){return this.a.destroy()};n.hasFixedKeySpace=function(){return this.f};n.addSegments=function(b){return Ii(this,this.c,b)};n.removeSegments=function(b,c){return Ji(this,this.c,b,c)};n.getSegments=function(b){return Ki(this,this.c,b)};n.addManifests=function(b){return Ii(this,this.b,b)};
n.updateManifestExpiration=function(b,c){var d=li(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 Ji(this,this.b,b,c)};n.getManifests=function(b){return Ki(this,this.b,b)};
n.getAllManifests=function(){var b=this;return t(function d(){var e,f;return v(d,function(d){switch(d.j){case 1:return e=ji(b.a,b.b),f=new Map,u(d,hi(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
function Ii(b,c,d){if(b.f)return Promise.reject(new B(1,9,9011,"Cannot add new value to "+c));b=li(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 Ji(b,c,d,e){b=li(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
function Ki(b,c,d){b=ji(b.a,c);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 B(1,9,9012,"Could not find values for "+g)):d.map(function(b){return f[b]})})};function Li(){this.g=this.c=this.b=this.a=this.f=null}n=Li.prototype;
n.init=function(){var b=this,c=new z,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new wi(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Hi(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Hi(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
new mi(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=q(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new B(2,9,9001,d.error));b.preventDefault()};return c};
n.destroy=function(){var b=this;return t(function d(){return v(d,function(d){switch(d.j){case 1:if(!b.a){d.B(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.B(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.B(6);break}return u(d,b.c.destroy(),6);case 6:if(!b.g){d.B(8);break}return u(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),d.j=0}})})};n.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};n.getEmeSessionCell=function(){return this.g};
n.erase=function(){var b=this;return t(function d(){return v(d,function(d){switch(d.j){case 1:if(!b.a){d.B(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.B(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.B(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,Mi(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
function Mi(){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 B(2,9,9001,c.error));d.preventDefault()};return b}ui("idb",function(){return window.indexedDB?new Li:null});function Ni(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}Ni.prototype.ja=function(){return this.g};Ni.prototype.W=function(){return this.f};Ni.prototype.key=function(){return this.c};Ni.prototype.toString=function(){return this.b};
function Oi(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 Ni(c,d,e,Number(b[4])):null};function Pi(b,c){this.b=b;this.a=c}function Qi(b,c){var d=new U(null,0);d.la(c.duration);var e=c.periods.map(function(c){return Ri(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 Ri(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=Si(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return Ti(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return Ui(b,d,c)});d.Wa(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
function Si(b,c,d){for(var e=new Set,f=q(c),g=f.next();!g.done;g=f.next()){var h=q(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=q(d);for(g=f.next();!g.done;g=f.next())for(h=q(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=q(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=q(c);for(e=c.next();!e.done;e=c.next())for(e=
e.value,g=Ti(b,e),h=q(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;d=q(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=Ti(b,e),g=q(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
function Ti(b,c){var d=c.segments.map(function(c,d){return Ui(b,d,c)}),e=new T(d);d={id:c.id,originalId:c.originalId,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,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=Vi(b,c.initSegmentKey));return d}function Ui(b,c,d){var e=new Ni("segment",b.b,b.a,d.dataKey);return new O(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function Vi(b,c){var d=new Ni("segment",b.b,b.a,c);return new ye(function(){return[d.toString()]},0,null)};function Wi(b){this.a=!1;this.b=new z;this.c=b}Wi.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function Xi(b,c){return t(function e(){return v(e,function(e){switch(e.j){case 1:return ra(e,2),u(e,Promise.resolve(c()),4);case 4:return e["return"](e.u);case 2:return ua(e),u(e,Promise.all(b.map(function(b){return b.destroy()})),5);case 5:va(e,0)}})})};function Yi(){this.a=null}n=Yi.prototype;n.configure=function(){};n.start=function(b){var c=Oi(b);this.a=c;if(null==c||"manifest"!=c.a)return Promise.reject(new B(2,1,9004,c));var d=new ni;return Xi([d],function(){return t(function f(){var b,h,k,l;return v(f,function(f){switch(f.j){case 1:return u(f,d.init(),2);case 2:return u(f,ri(d,c.ja(),c.W()),3);case 3:return b=f.u,u(f,b.getManifests([c.key()]),4);case 4:return h=f.u,k=h[0],l=new Pi(c.ja(),c.W()),f["return"](Qi(l,k))}})})})};n.stop=function(){return Promise.resolve()};
n.update=function(){};n.onExpirationUpdated=function(b,c){var d=this.a,e=new ni;return Xi([e],function(){return t(function g(){var h,k,l,m,p;return v(g,function(g){switch(g.j){case 1:return u(g,e.init(),2);case 2:return u(g,ri(e,d.ja(),d.W()),3);case 3:return h=g.u,u(g,h.getManifests([d.key()]),4);case 4:k=g.u;l=k[0];m=l.sessionIds.includes(b);p=void 0==l.expiration||l.expiration>c;if(m&&p)return u(g,h.updateManifestExpiration(d.key(),c),0);g.B(0)}})})})["catch"](function(){})};
df["application/x-offline-manifest"]=Yi;function Zi(b){var c=Oi(b);return c&&"manifest"==c.a?Zi.a(b):c&&"segment"==c.a?Zi.b(c.key(),c):jb(new B(2,1,9004,b))}y("shaka.offline.OfflineScheme",Zi);Zi.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return lb(b)};
Zi.b=function(b,c){var d=new ni,e=Xi([d],function(){return t(function g(){var b,e,l;return v(g,function(g){switch(g.j){case 1:return u(g,d.init(),2);case 2:return u(g,ri(d,c.ja(),c.W()),3);case 3:return b=g.u,u(g,b.getSegments([c.key()]),4);case 4:return e=g.u,l=e[0],g["return"]({uri:c,data:l.data,headers:{}})}})})});return mb(e)};zb("offline",Zi);function $i(b,c,d){return t(function f(){var g,h,k,l,m,p;return v(f,function(f){switch(f.j){case 1:g=[];for(var r=[],x=q(d),A=x.next();!A.done;A=x.next()){A=A.value;for(var R=!1,X=q(r),Y=X.next();!Y.done;Y=X.next())if(Y=Y.value,aj(Y.info,A)){Y.sessionIds.push(A.sessionId);R=!0;break}R||r.push({info:A,sessionIds:[A.sessionId]})}h=q(r);k=h.next();case 2:if(k.done){f.B(4);break}l=k.value;m=bj(b,c,l);return u(f,m,5);case 5:p=f.u;g=g.concat(p);k=h.next();f.B(2);break;case 4:return f["return"](g)}})})}
function bj(b,c,d){return t(function f(){var g,h;return v(f,function(f){switch(f.j){case 1:return g=new cc({nb:c,onError:function(){},qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),qa(f,2),g.configure(b),u(f,kc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:sa(f,3);break;case 2:return ta(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return qa(f,6),u(f,rc(g),8);case 8:sa(f,7);break;case 6:return ta(f),
u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return t(function p(){return v(p,function(c){switch(c.j){case 1:return qa(c,2),u(c,uc(g,b),4);case 4:h.push(b);sa(c,0);break;case 2:ta(c),c.j=0}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
function aj(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&vb(b.audioCapabilities,c.audioCapabilities,d)&&vb(b.videoCapabilities,c.videoCapabilities,d)};function cj(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 d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=qb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=qb(m)),l=cj(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}y("shaka.util.ConfigUtils.mergeConfigObjects",cj);function dj(){var b=5E5,c=Infinity;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},e={drm:{retryParameters:gb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{retryParameters:gb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,
xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},streaming:{retryParameters:gb(),failureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5},offline:d,abrFactory:L,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,
restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,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,textDisplayFactory:function(){return null}};d.trackSelectionCallback=
function(b){return ej(b,e.preferredAudioLanguage)};return e}function fj(b,c,d){return cj(b,c,d||dj(),{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}},"")}
function ej(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=zd(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return J(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=q(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function gj(b){this.c=b;this.a=null;this.b=[]}function hj(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=q(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d}function ij(b,c){return c?"buffering":b.c.ended?"ended":b.c.paused?"paused":"playing"};function jj(){this.b=this.c=null;this.a=[]}function kj(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:"text",fromAdaptation:d,bandwidth:null}))};function lj(b){this.l=this.A=NaN;this.b=this.h=0;this.i=this.v=this.f=this.g=this.o=this.s=NaN;this.c=null;this.m=new gj(b);this.a=new jj}function mj(b,c){var d=Date.now()/1E3,e=null==b.c?0:d-b.c;c?b.b+=e:b.h+=e;b.c=d};function W(b,c){var d=this;E.call(this);this.f=null;this.fb=!1;this.o=new Eb;this.Vb=this.g=this.va=this.c=this.m=this.a=this.R=this.na=this.i=this.s=this.h=this.A=null;this.Kc=1E9;this.zb=new Set;this.cb=!1;this.oa=!0;this.M=this.Bb=this.$=null;this.Jc=!1;this.Ic=0;this.D=null;this.v=new Fg;this.b=nj(this);this.Ab={width:Infinity,height:Infinity};this.l=null;this.xb=new Ng(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.P=this.b.preferredTextLanguage;
this.bb=this.b.preferredTextRole;c&&c(this);this.A=oj(this);b&&this.Cb(b,!0);this.eb=new Wi(function(){d.o&&(d.o.L(),d.o=null);var b=[];d.A&&(b.push(d.A.destroy()),d.A=null);d.fb=!1;d.o=null;d.g=null;d.Vb=null;d.b=null;return Promise.all(b)});G(this.o,window,"online",function(){d.xc()})}Ga(W,E);y("shaka.Player",W);function pj(b){if(!b.$)return Promise.resolve();var c=Promise.resolve();b.m&&(c=b.m.stop(),b.m=null);return Promise.all([c,b.$()])}
W.prototype.destroy=function(){var b=this;return t(function d(){return v(d,function(d){switch(d.j){case 1:return u(d,b.detach(),2);case 2:return u(d,b.eb.destroy(),0)}})})};W.prototype.destroy=W.prototype.destroy;W.version="v2.5.0-beta3-uncompiled";var qj=["2","5"];Dd=new function(b){this.a=b;this.c=Ed;this.b=Fd}(new Bd(Number(qj[0]),Number(qj[1])));var rj=["output-restricted","internal-error"],sj={};W.registerSupportPlugin=function(b,c){sj[b]=c};
W.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};W.probeSupport=function(){return Fc().then(function(b){var c=ff(),d=jd();b={manifest:c,media:d,drm:b};for(var e in sj)b[e]=sj[e]();return b})};
W.prototype.Cb=function(b,c){var d=this;return t(function f(){return v(f,function(f){switch(f.j){case 1:void 0===c&&(c=!0);if(!d.f){f.B(2);break}return u(f,d.detach(),2);case 2:d.f=b;G(d.o,d.f,"error",d.We.bind(d));if(c)return d.s=tj(d),u(f,d.s.o,0);f.B(0)}})})};W.prototype.attach=W.prototype.Cb;W.prototype.detach=function(){var b=this;return t(function d(){return v(d,function(d){switch(d.j){case 1:return b.f?u(d,b.wb(!1),2):d["return"]();case 2:b.o.ua(b.f,"error"),b.f=null,d.j=0}})})};
W.prototype.detach=W.prototype.detach;function uj(b,c,d){return t(function f(){var g;return v(f,function(f){switch(f.j){case 1:return u(f,gf(c,b.A,b.b.manifest.retryParameters,d),2);case 2:return g=f.u,f["return"](g)}})})}
function vj(b){b.R=new mh;nh(b.R,function(c){wj(b,"timelineregionadded",c)});return b.m.start(b.va,{networkingEngine:b.A,filterNewPeriod:b.$b.bind(b),filterAllPeriods:b.Sc.bind(b),onTimelineRegionAdded:function(c){var d=b.R;a:{var e=q(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:b.vb.bind(b),onError:b.Ja.bind(b)})}
function xj(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.c.periods.some(function(b){return b.variants.some(c)})&&b.c.periods.forEach(function(b){b.variants=b.variants.filter(c)});if(0==b.c.periods.length)throw new B(2,4,4014);}
W.prototype.load=function(b,c,d){c=void 0===c?null:c;var e=this;return t(function g(){var h,k,l,m,p,r,w,x,A,R,X,Y,fa,ia,Ka;return v(g,function(g){switch(g.j){case 1:if(!e.f)throw new B(2,7,7002);k=new z;l=function(){h=new B(2,7,7E3);return k};e.dispatchEvent(new D("loading"));qa(g,2);m=e.f;p=e.wb();e.$=l;return u(g,p,4);case 4:e.l=new lj(m);e.l.g=Date.now()/1E3;G(e.o,m,"playing",function(){yj(e)});G(e.o,m,"pause",function(){yj(e)});G(e.o,m,"ended",function(){yj(e)});r=e.b.abrFactory;e.g&&e.Vb==r||
(e.Vb=r,e.g=new r,e.g.configure(e.b.abr));if(h)throw h;x=w=null;d&&("string"==typeof d?x=d:(Cd("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),w=d));A=e;if(w){R=new w;g.B(5);break}return u(g,uj(e,b,x),6);case 6:R=g.u;case 5:return A.m=R,e.m.configure(e.b.manifest),e.va=b,u(g,vj(e),7);case 7:X=g.u;e.c=X;if(h)throw h;xj(e);Y=e;return u(g,zj(e,X),8);case 8:Y.h=g.u;if(h)throw h;e.Sc(e.c.periods);Aj(e,e.c.periods);e.xb=new Ng(e.b.preferredAudioLanguage,
e.b.preferredVariantRole,e.b.preferredAudioChannelCount);e.P=e.b.preferredTextLanguage;Bj(e.c.presentationTimeline,e.b.playRangeStart,e.b.playRangeEnd);return u(g,e.h.Cb(m),9);case 9:if(h)throw h;e.g.init(function(b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;Cj(e,e.c.periods[K.de(e.c,b)],b,!0);e.a&&(Fh(e.a,b,c,d),Dj(e))});e.s||(e.s=tj(e));e.i=new hh(e.f,e.c.presentationTimeline,e.c.minBufferTime||0,e.b.streaming,c,e.Af.bind(e),e.vb.bind(e));e.na=Ej(e);e.a=Fj(e);e.a.configure(e.b.streaming);Gj(e);e.dispatchEvent(new D("streaming"));
return u(g,e.a.init(),10);case 10:if(h)throw h;e.b.streaming.startAtSegmentBoundary&&(fa=Hj(e,kh(e.i)),eh(e.i.b,fa));e.c.periods.forEach(e.$b.bind(e));Ij(e);Dj(e);ia=Jj(e);ia.variants.some(function(b){return b.primary});Kj(e,ia.variants);Hb(e.o,m,"loadeddata",function(){e.l.f=Date.now()/1E3});if(h)throw h;e.$=null;sa(g,0);break;case 2:return Ka=ta(g),k.resolve(),e.$==l&&(e.$=null,e.dispatchEvent(new D("unloading"))),g["return"](Promise.reject(h||Ka))}})})};W.prototype.load=W.prototype.load;
function Gj(b){function c(b){var c="";b.video&&(c=Pb(b.video.codecs)[0]);var d="";b.audio&&(d=Pb(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=K.Uc(d,b.b.preferredAudioChannelCount);var e=new pb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(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.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
f?!0:!1})})}function zj(b,c){return t(function e(){var f,g,h;return v(e,function(e){switch(e.j){case 1:return f={nb:b.A,onError:function(c){b.Ja(c)},qc:function(c){Lj(b,c)},onExpirationUpdated:function(c,e){if(b.m&&b.m.onExpirationUpdated)b.m.onExpirationUpdated(c,e);b.dispatchEvent(new D("expirationupdated"))},onEvent:function(c){b.vb(c)}},g=new cc(f),g.configure(b.b.drm),h=K.Yc(c),u(e,jc(g,h,c.offlineSessionIds),2);case 2:return e["return"](g)}})})}
function oj(b){return new F(function(c,d){b.g&&b.g.segmentDownloaded(c,d)})}
function Ej(b){var c=new ah(b.c);bh(c,function(){Ij(b)});var d=new oh(b.R);sh(d,function(c){wj(b,"timelineregionenter",c)},function(c){wj(b,"timelineregionexit",c)},function(c,d){d||(wj(b,"timelineregionenter",c),wj(b,"timelineregionexit",c))});var e=new Sg(Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),function(c){return Rc(b.f.buffered,c)},function(){var c;a:if((c=b.f.ended)||(c=b.s,c=c.g?"ended"==c.g.readyState:!0),c)c=!0;else{if(b.c.presentationTimeline.U()&&(c=b.c.presentationTimeline.Sa(),
Lc(b.f.buffered)>=c)){c=!0;break a}c=!1}return c});Vg(e,function(){return Mj(b,!0)},function(){return Mj(b,!1)});var f=new Qg(b.f);f.a.add(c);f.a.add(d);f.a.add(e);return f}function tj(b){var c=window.muxjs?new Jc:new Kc,d=new b.b.textDisplayFactory;d.setTextVisibility(b.fb);return new hd(b.f,c,d)}function Fj(b){return new th(b.c,{Qa:function(){return kh(b.i)},J:b.s,nb:b.A,hd:b.Ge.bind(b),gd:b.Xd.bind(b),onError:b.Ja.bind(b),onEvent:b.vb.bind(b),Je:b.Ke.bind(b),pb:b.Te.bind(b)})}
W.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=fj(this.b,b,nj(this));Nj(this);return d};W.prototype.configure=W.prototype.configure;
function Nj(b){b.m&&b.m.configure(b.b.manifest);b.h&&b.h.configure(b.b.drm);if(b.a){b.a.configure(b.b.streaming);try{b.c.periods.forEach(b.$b.bind(b))}catch(f){b.Ja(f)}var c=wh(b.a),d=yh(b.a),e=Jj(b);c=K.ad(c,d,e.variants);b.g&&c&&c.allowedByApplication&&c.allowedByKeySystem?Kj(b,e.variants):Oj(b,e)}b.g&&(b.g.configure(b.b.abr),b.b.abr.enabled&&!b.oa?b.g.enable():b.g.disable())}W.prototype.getConfiguration=function(){var b=nj(this);fj(b,this.b,nj(this));return b};W.prototype.getConfiguration=W.prototype.getConfiguration;
W.prototype.qf=function(){for(var b in this.b)delete this.b[b];fj(this.b,nj(this),nj(this));Nj(this)};W.prototype.resetConfiguration=W.prototype.qf;W.prototype.oe=function(){return this.f};W.prototype.getMediaElement=W.prototype.oe;W.prototype.hb=function(){return this.A};W.prototype.getNetworkingEngine=W.prototype.hb;W.prototype.ac=function(){return this.va};W.prototype.getAssetUri=W.prototype.ac;W.prototype.ne=function(){Cd("getManifestUri",'Please use "getAssetUri" instead.');return this.va};
W.prototype.getManifestUri=W.prototype.ne;W.prototype.U=function(){return this.c?this.c.presentationTimeline.U():!1};W.prototype.isLive=W.prototype.U;W.prototype.Ga=function(){return this.c?this.c.presentationTimeline.Ga():!1};W.prototype.isInProgress=W.prototype.Ga;W.prototype.Ce=function(){if(!this.c||!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1};W.prototype.isAudioOnly=W.prototype.Ce;
W.prototype.sf=function(){var b=0,c=0;this.c&&(c=this.c.presentationTimeline,b=c.Ra(),c=c.qa());return{start:b,end:c}};W.prototype.seekRange=W.prototype.sf;W.prototype.keySystem=function(){return this.h?this.h.keySystem():""};W.prototype.keySystem=W.prototype.keySystem;W.prototype.drmInfo=function(){return this.h?this.h.a:null};W.prototype.drmInfo=W.prototype.drmInfo;W.prototype.Lb=function(){return this.h?this.h.Lb():Infinity};W.prototype.getExpiration=W.prototype.Lb;W.prototype.ed=function(){return this.cb};
W.prototype.isBuffering=W.prototype.ed;W.prototype.wb=function(b){var c=this;return t(function e(){return v(e,function(e){switch(e.j){case 1:if(c.eb.a)return e["return"]();void 0===b&&(b=!0);c.dispatchEvent(new D("unloading"));return u(e,pj(c),2);case 2:return c.Bb||(c.Bb=Pj(c).then(function(){Mj(c,!1);c.Bb=null})),u(e,c.Bb,3);case 3:if(b)return c.s=tj(c),u(e,c.s.o,0);e.B(0)}})})};W.prototype.unload=W.prototype.wb;W.prototype.ib=function(){return this.i?this.i.ib():0};
W.prototype.getPlaybackRate=W.prototype.ib;W.prototype.Kf=function(b){this.i&&gh(this.i.b,b);this.a&&Dh(this.a,1!=b)};W.prototype.trickPlay=W.prototype.Kf;W.prototype.Yd=function(){this.i&&gh(this.i.b,1);this.a&&Dh(this.a,!1)};W.prototype.cancelTrickPlay=W.prototype.Yd;W.prototype.xe=function(){for(var b=Qj(this),c=[],d=q(Rj(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=K.Gc(e);f.active=e==b;c.push(f)}return c};W.prototype.getVariantTracks=W.prototype.xe;
W.prototype.$c=function(){var b=Jj(this);if(null==b)b=null;else{if(!Gg(this.v,b).text){var c=K.Gb(b.textStreams,this.P,this.bb);c.length&&(c=c[0],Gg(this.v,b).text=c)}b=Gg(this.v,b).text}c=[];for(var d=q(Sj(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=K.Cc(e);f.active=e==b;c.push(f)}return c};W.prototype.getTextTracks=W.prototype.$c;W.prototype.Bd=function(b){var c=Jj(this);null!=c&&(b=K.ee(c,b))&&(Gg(this.v,c).text=b,kj(this.l.a,b,!1),Tj(this,b),this.P=b.language)};
W.prototype.selectTextTrack=W.prototype.Bd;W.prototype.uf=function(){Cd("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.$c().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.Bd(b[0])};W.prototype.selectEmbeddedTextTrack=W.prototype.uf;
W.prototype.Pf=function(){Cd("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.a?xh(this.a,"text"):null;return null!=b&&"application/cea-608"==b.mimeType};W.prototype.usingEmbeddedTextTrack=W.prototype.Pf;
W.prototype.wf=function(b,c,d){d=void 0===d?0:d;var e=Jj(this);null!=e&&(this.b.abr.enabled&&Na("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack()."),(b=K.fe(e,b))&&K.Ta(b)&&(Cj(this,e,b,!1),Uj(this,b,c,d),this.xb=new Mg(b),Kj(this,e.variants)))};W.prototype.selectVariantTrack=W.prototype.wf;
W.prototype.ie=function(){for(var b=[],c=q(Rj(this)),d=c.next();!d.done;d=c.next())b.push(d.value.audio);return Vj(b)};W.prototype.getAudioLanguagesAndRoles=W.prototype.ie;W.prototype.ve=function(){return Vj(Sj(this))};W.prototype.getTextLanguagesAndRoles=W.prototype.ve;W.prototype.he=function(){for(var b=[],c=q(Rj(this)),d=c.next();!d.done;d=c.next())b.push(d.value.audio);return Array.from(Wj(b))};W.prototype.getAudioLanguages=W.prototype.he;W.prototype.ue=function(){return Array.from(Wj(Sj(this)))};
W.prototype.getTextLanguages=W.prototype.ue;W.prototype.tf=function(b,c){var d=Jj(this);null!=d&&(this.xb=new Ng(b,c||"",0),Oj(this,d))};W.prototype.selectAudioLanguage=W.prototype.tf;W.prototype.vf=function(b,c){var d=Jj(this);null!=d&&(this.P=b,this.bb=c||"",Oj(this,d))};W.prototype.selectTextLanguage=W.prototype.vf;W.prototype.gc=function(){return this.fb};W.prototype.isTextTrackVisible=W.prototype.gc;
W.prototype.Ed=function(b){var c=this;return t(function e(){var f,g,h,k;return v(e,function(e){switch(e.j){case 1:if(b==c.fb)return e["return"]();c.s&&c.s.l.setTextVisibility(b);c.fb=b;Xj(c);if(c.b.streaming.alwaysStreamText||!c.a)return e["return"]();f=K;if(b){if(g=Jj(c),h=f.Gb(g.textStreams,c.P,c.bb),k=h[0])return u(e,zh(c.a,k),0)}else{var l=c.a;l.A=!0;var p=l.c.get("text");p&&(uh(p),l.c["delete"]("text"))}e.B(0)}})})};W.prototype.setTextTrackVisibility=W.prototype.Ed;
W.prototype.re=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f+1E3*this.f.currentTime):null};W.prototype.getPlayheadTimeAsDate=W.prototype.re;W.prototype.te=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f):null};W.prototype.getPresentationStartTimeAsDate=W.prototype.te;W.prototype.bc=function(){return this.s?this.s.bc():{total:[],audio:[],video:[],text:[]}};W.prototype.getBufferedInfo=W.prototype.bc;
W.prototype.getStats=function(){if(null==this.l)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};mj(this.l,this.cb);yj(this);var b=this.f;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.l,d=Number(b.totalVideoFrames);c.s=Number(b.droppedVideoFrames);c.o=d}if(b=Qj(this))this.l.v=b.bandwidth;b&&b.video&&(c=this.l,d=b.video.height||NaN,c.A=
b.video.width||NaN,c.l=d);this.g&&(b=this.g.getBandwidthEstimate(),this.l.i=b);b=this.l;c=b.A;d=b.l;for(var e=b.v,f=b.o,g=b.s,h=b.i,k=b.f>b.g?b.f-b.g:NaN,l=b.h,m=b.b,p=[],r=q(b.a.a),w=r.next();!w.done;w=r.next())w=w.value,p.push({timestamp:w.timestamp,id:w.id,type:w.type,fromAdaptation:w.fromAdaptation,bandwidth:w.bandwidth});return{width:c,height:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,bufferingTime:m,switchHistory:p,stateHistory:hj(b.m)}};
W.prototype.getStats=W.prototype.getStats;
W.prototype.addTextTrack=function(b,c,d,e,f,g){var h=Jj(this);if(null==h)return Promise.reject();var k=this.c.periods.indexOf(h)+1,l=(k>=this.c.periods.length?this.c.presentationTimeline.T():this.c.periods[k].startTime)-h.startTime;if(Infinity==l)return Promise.reject(new B(1,4,4033));var m={id:this.Kc++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(c){return 1!=c?null:new O(1,0,l,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,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};this.zb.add(m);h.textStreams.push(m);return zh(this.a,m).then(function(){if(!this.eb.a){var b=xh(this.a,"text");b&&(Gg(this.v,h).text=b);this.zb["delete"](m);Oj(this,h);Ij(this);return{id:m.id,active:!1,type:"text",bandwidth:0,language:c,label:g||null,kind:d,
width:null,height:null}}}.bind(this))};W.prototype.addTextTrack=W.prototype.addTextTrack;W.prototype.zc=function(b,c){this.Ab.width=b;this.Ab.height=c};W.prototype.setMaxHardwareResolution=W.prototype.zc;W.prototype.xc=function(){if(this.a){var b=this.a;if(b.f)b=!1;else if(b.m)b=!1;else{for(var c=q(b.c.values()),d=c.next();!d.done;d=c.next())d=d.value,d.lb&&(d.lb=!1,Ch(b,d,.1));b=!0}}else b=!1;return b};W.prototype.retryStreaming=W.prototype.xc;W.prototype.me=function(){return this.c};
W.prototype.getManifest=W.prototype.me;function Cj(b,c,d,e){Gg(b.v,c).variant=d;b=b.l.a;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}
function Pj(b){b.o&&(b.o.ua(b.f,"loadeddata"),b.o.ua(b.f,"playing"),b.o.ua(b.f,"pause"),b.o.ua(b.f,"ended"));b.na&&(b.na.L(),b.na=null);b.i&&(b.i.L(),b.i=null);var c=b.h,d=Promise.all([b.g?b.g.stop():null,b.s?b.s.destroy():null,b.a?b.a.destroy():null,b.m?b.m.stop():null]).then(function(){return c?c.destroy():null});b.R&&(b.R.L(),b.R=null);b.oa=!0;b.h=null;b.s=null;b.a=null;b.m=null;b.c=null;b.va=null;b.v.a.clear();b.zb.clear();b.l=null;return d}
function nj(b){var c=dj();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.U()&&d.includes(c.code)&&(c.severity=1,b.xc())};c.textDisplayFactory=function(){return new Yj(b.f)};return c}
function Aj(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=q(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=q(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.Kc++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
codecs:"",kind:"caption",encrypted:!1,keyId:null,language:h.closedCaptions.get(l),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:h.roles,channelsCount:null,closedCaptions:null};f.set(l,m)}}f=q(f.values());for(g=f.next();!g.done;g=f.next())e.textStreams.push(g.value)}}n=W.prototype;
n.Sc=function(b){var c=this.a?wh(this.a):null,d=this.a?yh(this.a):null;b.forEach(K.filterNewPeriod.bind(null,this.h,c,d));c=ub(b,function(b){return b.variants.some(K.Ta)});if(0==c)throw new B(2,4,4032);if(c<b.length)throw new B(2,4,4011);b.forEach(function(b){K.Lc(b.variants,this.b.restrictions,this.Ab)&&this.a&&Jj(this)==b&&Ij(this);Zj(this,b.variants)}.bind(this))};
n.$b=function(b){var c=this.a?wh(this.a):null,d=this.a?yh(this.a):null;K.filterNewPeriod(this.h,c,d,b);c=b.variants;if(!c.some(K.Ta))throw new B(2,4,4011);Zj(this,b.variants);K.Lc(c,this.b.restrictions,this.Ab)&&this.a&&Jj(this)==b&&Ij(this);if(b=this.h?this.h.a:null)for(c=q(c),d=c.next();!d.done;d=c.next()){d=q(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=q(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,tc(this.h,f.initDataType,
f.initData)}}};function Uj(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.oa?(b.M=c,b.Jc=d,b.Ic=e):(Fh(b.a,c,d,e),ck(b,new D("variantchanged")))}function Tj(b,c){b.oa?b.D=c:(Eh(b.a,c,!0,0),ck(b,new D("textchanged")))}function Hj(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=wh(b.a),f=yh(b.a),g=Jj(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
function Mj(b,c){b.l&&mj(b.l,b.cb);b.cb=c;yj(b);if(b.i){var d=b.i.b;c!=d.g&&(d.g=c,gh(d,d.f))}b.dispatchEvent(new D("buffering",{buffering:c}))}function yj(b){if(b.l){var c=b.l.m,d=b.cb;null==c.a?c.a={timestamp:Date.now()/1E3,state:ij(c,d),duration:0}:(b=Date.now()/1E3,d=ij(c,d),c.a.duration=b-c.a.timestamp,c.a.state!=d&&(c.b.push(c.a),c.a={timestamp:b,state:d,duration:0}))}}n.Af=function(){this.na&&Rg(this.na,!0);this.a&&Jh(this.a)};
function Kj(b,c){try{Zj(b,c)}catch(e){return b.Ja(e),null}var d=c.filter(function(b){return K.Ta(b)});d=b.xb.create(d);b.g.setVariants(Array.from(d.values()));return b.g.chooseVariant()}function Oj(b,c){var d=Kj(b,c.variants);d&&(Cj(b,c,d,!0),Uj(b,d,!0));(d=K.Gb(c.textStreams,b.P,b.bb)[0]||null)&&(b.b.streaming.alwaysStreamText||b.gc())&&(Gg(b.v,c).text=d,kj(b.l.a,d,!0),Tj(b,d));Dj(b)}
n.Ge=function(b){try{this.oa=!0;this.g.disable();var c=Kj(this,b.variants),d=K.Gb(b.textStreams,this.P,this.bb)[0]||null;this.M&&(b.variants.includes(this.M)&&(c=this.M),this.M=null);this.D&&(b.textStreams.includes(this.D)&&(d=this.D),this.D=null);c&&Cj(this,b,c,!0);if(d){var e=d;Gg(this.v,b).text=e;kj(this.l.a,e,!0)}var f=this.a,g=f.c.get("video");if(g)var h=f.b.periods[g.xa];else{var k=f.c.get("audio");h=k?f.b.periods[k.xa]:null}var l=c?c.audio:null,m;if(m=!h&&l&&d){b=d;var p=J(this.b.preferredTextLanguage),
r=J(l.language),w=J(b.language);m=vd(w,p)&&!vd(r,w)}m&&(this.Ed(!0),Xj(this));return this.b.streaming.alwaysStreamText||this.gc()?{variant:c,text:d}:{variant:c,text:null}}catch(x){return this.Ja(x),{variant:null,text:null}}};n.Xd=function(){this.oa=!1;this.b.abr.enabled&&this.g.enable();this.M&&(Fh(this.a,this.M,this.Jc,this.Ic),this.M=null);this.D&&(Eh(this.a,this.D,!0,0),this.D=null)};n.Ke=function(){this.m&&this.m.update&&this.m.update()};n.Te=function(){this.i&&this.i.pb()};
function Dj(b){ck(b,new D("adaptation"))}function Ij(b){ck(b,new D("trackschanged"))}function Xj(b){b.dispatchEvent(new D("texttrackvisibility"))}n.Ja=function(b){if(!this.eb.a){var c=new D("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};n.vb=function(b){this.dispatchEvent(b)};function wj(b,c,d){b.vb(new D(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}
n.We=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.Ja(new B(2,3,3016,b,c,this.f.error.message))}}};
function Lj(b,c){var d=Jj(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){K.we(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!rj.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=wh(b.a);var h=yh(b.a);(f=K.ad(f,h,d.variants))&&!f.allowedByKeySystem&&Oj(b,d);e&&(Ij(b),Kj(b,d.variants))}function Bj(b,c,d){0<c&&(b.U()||b.Fd(c));d<b.T()&&(b.U()||b.la(d))}
function Zj(b,c){var d=b.h?Lb(b.h.$):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=q(c),m=l.next();!m.done;m=l.next()){m=m.value;var p=[];m.audio&&p.push(m.audio);m.video&&p.push(m.video);p=q(p);for(var r=p.next();!r.done;r=p.next())if(r=r.value,r.keyId){var w=d[e?"00":r.keyId];w?rj.includes(w)&&(k.includes(w)||k.push(w)):h.includes(r.keyId)||h.push(r.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new B(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
restrictedKeyStatuses:k});}function ck(b,c){t(function e(){return v(e,function(e){switch(e.j){case 1:return u(e,Promise.resolve(),2);case 2:b.eb.a||b.dispatchEvent(c),e.j=0}})})}function Wj(b){var c=new Set;b=q(b);for(var d=b.next();!d.done;d=b.next())(d=d.value)&&d.language?c.add(J(d.language)):c.add("und");return c}
function Vj(b){var c=new Map,d=[""];b=q(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e="und";var g=d;f&&f.language&&(e=J(f.language));f&&f.roles.length&&(g=f.roles);c.has(e)||c.set(e,new Set);f=q(g);for(g=f.next();!g.done;g=f.next())g=g.value,c.get(e).add(g)}var h=[];c.forEach(function(b,c){for(var d=q(b),e=d.next();!e.done;e=d.next())h.push({language:c,role:e.value})});return h}function Rj(b){b=Jj(b);return null==b?[]:b.variants.filter(function(b){return K.Ta(b)})}
function Sj(b){var c=Jj(b);return null==c?[]:c.textStreams.filter(function(c){return!b.zb.has(c)})}function Jj(b){if(null==b.c||null==b.i)return null;var c=kh(b.i),d=null;b=q(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function Qj(b){var c=Jj(b);return c?Gg(b.v,c).variant:null};function dk(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.T();c=ek(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function fk(b,c){var d=Ri(new Pi(b.ja(),b.W()),c.periods[0],new U(null,0)),e=c.appMetadata||{};d=ek(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
function ek(b){var c=[],d=K.pe(b.variants);d=q(d);for(var e=d.next();!e.done;e=d.next())c.push(K.Gc(e.value));b=q(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(K.Cc(d.value));return c};function gk(){this.a={}}function hk(b,c,d){d=d.endTime-d.startTime;return ik(b,c)*d}function ik(b,c){var d=b.a[c];null==d&&(d=0);return d};function jk(b,c){for(var d={width:Infinity,height:Infinity},e=q(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return K.jc(b,c,d)})}function kk(b){b=q(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&id(b.audio));b.video&&(c=c&&id(b.video));return c})}
function lk(b,c){for(var d=q(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return Gc(c,b)})}function mk(b){var c=new nk;b.periods.forEach(function(b,d){var e=ok(b.variants);if(0==d){e=q(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else pk(c,e)});b=q(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return qk(c,new rk(b))})}
function sk(b,c){var d=new nk;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return qk(d,new rk(b))}));c(b);d=ok(b.variants)})}function rk(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function nk(){this.a=[]}nk.prototype.add=function(b){qk(this,b)||this.a.push(b)};function pk(b,c){b.a=b.a.filter(function(b){return qk(c,b)})}
function qk(b,c){return b.a.some(function(b){return c.b==b.b&&c.a==b.a&&c.f==b.f&&c.c==b.c})}function ok(b){var c=new nk;b=q(b);for(var d=b.next();!d.done;d=b.next())c.add(new rk(d.value));return c};function Z(b){var c=this;if(b&&b.constructor!=W)throw new B(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.hb()):(this.a=dj(),this.b=new F);this.g=!1;this.c=[];this.f=[];var d=!b;this.h=new Wi(function(){return t(function f(){var b;return v(f,function(f){switch(f.j){case 1:return b=function(){},u(f,Promise.all(c.f.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.B(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,f.j=0}})})})}y("shaka.offline.Storage",Z);
function tk(){return vi()}Z.support=tk;Z.prototype.destroy=function(){return this.h.destroy()};Z.prototype.destroy=Z.prototype.destroy;
Z.prototype.configure=function(b){var c=!1;null!=b.trackSelectionCallback&&(c=!0,b.offline=b.offline||{},b.offline.trackSelectionCallback=b.trackSelectionCallback);null!=b.progressCallback&&(c=!0,b.offline=b.offline||{},b.offline.progressCallback=b.progressCallback);null!=b.usePersistentLicense&&(c=!0,b.offline=b.offline||{},b.offline.usePersistentLicense=b.usePersistentLicense);c&&Cd("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return fj(this.a,
b)};Z.prototype.configure=Z.prototype.configure;Z.prototype.hb=function(){return this.b};Z.prototype.getNetworkingEngine=Z.prototype.hb;
Z.prototype.store=function(b,c,d){var e=this;return uk(this,vk(this,b,c||{},function(){return t(function g(){var c,k;return v(g,function(g){switch(g.j){case 1:return d&&"string"!=typeof d?(Cd("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,gf(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.u,g["return"](k)}})})}))};Z.prototype.store=Z.prototype.store;
function vk(b,c,d,e){return t(function g(){var h,k,l,m,p,r,w,x,A,R;return v(g,function(g){switch(g.j){case 1:wk();if(b.g)return g["return"](Promise.reject(new B(2,9,9006)));b.g=!0;return u(g,xk(b,c,e),2);case 2:h=g.u;yk(b);k=!h.presentationTimeline.U()&&!h.presentationTimeline.Ga();if(!k)throw new B(2,9,9005,c);l=null;m=new ni;r=p=null;qa(g,3,4);return u(g,zk(b,h,function(b){r=r||b}),6);case 6:l=g.u;yk(b);if(r)throw r;Ak(b,h,l);return u(g,m.init(),7);case 7:return yk(b),u(g,pi(m),8);case 8:return p=
g.u,yk(b),u(g,Bk(b,p.W,l,h,c,d),9);case 9:w=g.u;yk(b);if(r)throw r;return u(g,p.W.addManifests([w]),10);case 10:return x=g.u,yk(b),A=new Ni("manifest",p.path.ja,p.path.W,x[0]),g["return"](fk(A,w));case 4:return ua(g),b.g=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.B(12);break}return u(g,l.destroy(),12);case 12:va(g,0);break;case 3:R=ta(g);if(!p){g.B(14);break}return u(g,p.W.removeSegments(b.c,function(){}),14);case 14:throw r||R;}})})}
function Ak(b,c,d){jk(c,b.a.restrictions);kk(c);lk(c,d);mk(c);sk(c,function(c){for(var d=[],e=q(c.variants),h=e.next();!h.done;h=e.next())d.push(K.Gc(h.value));e=q(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(K.Cc(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=q(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
Ck(c)}function Bk(b,c,d,e,f,g){return t(function k(){var l,m,p,r;return v(k,function(k){switch(k.j){case 1:return l=dk(f,e,g),m=new ci(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),ra(k,2),r=p=Dk(b,m,c,d,e,f,g),u(k,fi(m),4);case 4:return r.size=k.u,k["return"](p);case 2:return ua(k),u(k,m.destroy(),5);case 5:va(k,0)}})})}Z.prototype.remove=function(b){return uk(this,Ek(this,b))};Z.prototype.remove=Z.prototype.remove;
function Ek(b,c){wk();var d=Oi(c);if(null==d||"manifest"!=d.a)return Promise.reject(new B(2,9,9004,c));var e=new ni;return Xi([e],function(){return t(function g(){var c,k,l;return v(g,function(g){switch(g.j){case 1:return u(g,e.init(),2);case 2:return u(g,ri(e,d.ja(),d.W()),3);case 3:return c=g.u,u(g,c.getManifests([d.key()]),4);case 4:return k=g.u,l=k[0],u(g,Promise.all([Fk(b,l,e),Gk(b,c,d,l)]),0)}})})})}
function Hk(b,c){for(var d=[],e=q(b.periods),f=e.next();!f.done;f=e.next()){f=q(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:Mb(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:Mb(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function Fk(b,c,d){return t(function f(){return v(f,function(f){switch(f.j){case 1:return u(f,Ik(b.b,b.a.drm,d,c),0)}})})}
function Gk(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Jk(e),h=g.length+1,k=0,l=fk(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}Z.prototype.mf=function(){return uk(this,Kk(this))};Z.prototype.removeEmeSessions=Z.prototype.mf;
function Kk(b){wk();var c=b.b,d=b.a.drm,e=new ni;return Xi([e],function(){return t(function g(){var b,k,l,m,p,r,w;return v(g,function(g){switch(g.j){case 1:return u(g,e.init(),2);case 2:b=!1,k=[],si(e,function(b){return k.push(b)}),l=q(k),m=l.next();case 3:if(m.done){g.B(5);break}p=m.value;return u(g,p.getAll(),6);case 6:return r=g.u,u(g,$i(d,c,r),7);case 7:return w=g.u,u(g,p.remove(w),8);case 8:w.length!=r.length&&(b=!0);m=l.next();g.B(3);break;case 5:return g["return"](!b)}})})})}
Z.prototype.list=function(){return uk(this,Lk())};Z.prototype.list=Z.prototype.list;
function Lk(){function b(b,d){return t(function h(){var e;return v(h,function(f){switch(f.j){case 1:return u(f,d.getAllManifests(),2);case 2:e=f.u,e.forEach(function(d,e){var f=fk(new Ni("manifest",b.ja,b.W,e),d);c.push(f)}),f.j=0}})})}wk();var c=[],d=new ni;return Xi([d],function(){return t(function f(){var c;return v(f,function(f){switch(f.j){case 1:return u(f,d.init(),2);case 2:return c=Promise.resolve(),qi(d,function(d,f){c=c.then(function(){return b(d,f)})}),u(f,c,0)}})})}).then(function(){return c})}
function xk(b,c,d){return t(function f(){var g,h,k,l,m,p;return v(f,function(f){switch(f.j){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.u,l.configure(b.a.manifest),yk(b),ra(f,3),u(f,l.start(c,k),5);case 5:return m=f.u,yk(b),p=Mk(m),u(f,Promise.all(Array.from(p).map(function(b){return b.createSegmentIndex()})),6);case 6:yk(b);
if(g)throw g;return f["return"](m);case 3:return ua(f),u(f,l.stop(),7);case 7:va(f,0)}})})}function zk(b,c,d){return t(function f(){var g,h,k;return v(f,function(f){switch(f.j){case 1:return g=new cc({nb:b.b,onError:d,qc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=K.Yc(c),k=b.a,g.configure(k.drm),u(f,hc(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,rc(g),3);case 3:return u(f,sc(g),4);case 4:return f["return"](g)}})})}
function Dk(b,c,d,e,f,g,h){var k=new gk,l=f.periods.map(function(e){return Nk(b,c,d,k,f,e)}),m=e.a,p=yc(e);if(m&&b.a.offline.usePersistentLicense){if(!p.length)throw new B(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.T(),size:0,expiration:e.Lb(),periods:l,sessionIds:b.a.offline.usePersistentLicense?p:[],drmInfo:m,appMetadata:h}}
function Nk(b,c,d,e,f,g){f.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 h=Mk(f),k=new Map;h=q(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=Ok(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
k.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}
function Ok(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,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.kb();var k=g.id;Pk(g,f,function(f){di(c,k,Qk(b,f),hk(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);
h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});(f=g.initSegmentReference)&&di(c,k,Qk(b,f),.5*ik(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}function Pk(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function yk(b){if(b.h.a)throw new B(2,9,7001);}function wk(){if(!vi())throw new B(2,9,9E3);}
function Qk(b,c){var d=b.a.streaming.retryParameters;d=Ab(c.c(),d);if(0!=c.b||null!=c.a)d.headers.Range="bytes="+c.b+"-"+(null==c.a?"":c.a);return d}function uk(b,c){return t(function e(){return v(e,function(e){switch(e.j){case 1:return b.f.push(c),ra(e,2),u(e,c,4);case 4:return e["return"](e.u);case 2:ua(e),sb(b.f,c),va(e,0)}})})}
function Jk(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(){return t(function c(){var d;return v(c,function(c){switch(c.j){case 1:return d=new ni,ra(c,2),u(c,d.erase(),2);case 2:return ua(c),u(c,d.destroy(),5);case 5:va(c,0)}})})};
function Ik(b,c,d,e){return t(function g(){var h,k,l;return v(g,function(g){switch(g.j){case 1:if(!e.drmInfo)return g["return"]();h=ti(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:Hk(e,!1),videoCapabilities:Hk(e,!0)}});return u(g,$i(c,b,k),2);case 2:return l=g.u,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
0)}})})}function Mk(b){var c=new Set;b=q(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=q(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=q(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function Ck(b){if(0==b.periods.length)throw new B(2,4,4014);b=q(b.periods);for(var c=b.next();!c.done;c=b.next())Rk(c.value)}
function Rk(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=q(c),e=d.next();!e.done;e=d.next()){e=q(c);for(var f=e.next();!f.done;f=e.next());}c=q(b);for(d=c.next();!d.done;d=c.next())for(d=q(b),e=d.next();!e.done;e=d.next());}sj.offline=tk;y("shaka.polyfill.installAll",function(){for(var b=0;b<Sk.length;++b)Sk[b].Vd()});var Sk=[];function Tk(b,c){c=c||0;for(var d={priority:c,Vd:b},e=0;e<Sk.length;e++)if(Sk[e].priority<c){Sk.splice(e,0,d);return}Sk.push(d)}y("shaka.polyfill.register",Tk);function Uk(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)}
Tk(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",Uk);document.addEventListener("webkitfullscreenerror",Uk);document.addEventListener("mozfullscreenchange",Uk);document.addEventListener("mozfullscreenerror",Uk);document.addEventListener("MSFullscreenChange",Uk);document.addEventListener("MSFullscreenError",Uk)}});Tk(function(){Qb("CrKey")&&delete window.indexedDB});var Vk;function Wk(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}Vk.call(this,b,c,d)}Tk(function(){Qb("Trident/")&&HTMLInputElement.prototype.addEventListener!=Wk&&(Vk=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=Wk)});Tk(function(){});function Xk(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function Yk(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
function Zk(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.cd=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].Qc=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",$k,!1);c||(this.addEventListener("sourceclose",al,!1),c=!0);return e}}function $k(b){var c=b.target,d=c.mediaSource_;if(d.cd){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.Qc=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].Qc)return;d.cd=!1}}
function al(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",$k,!1);b.removeEventListener("sourceclose",al,!1)}function bl(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1]?!1:b(c)}}function cl(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=Pb(c)[0]&&b(c)}}
function dl(){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,p=!1;d=e.split(",").filter(function(b){if(c.test(b))return p=!0,!1;/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});p&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var r in g)f+="; "+r+'="'+g[r]+'"';return cast.__platform__.canDisplayType(f)}}
Tk(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)dl();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;bl();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))Xk();else if(b.includes("Version/10"))Xk(),Zk();else if(b.includes("Version/11")||b.includes("Version/12"))Xk(),Yk()}else Qb("Tizen")&&cl()});function el(b){this.f=[];this.b=[];this.a=[];(new Q).aa("pssh",this.c.bind(this)).parse(b.buffer)}el.prototype.c=function(b){if(!(1<b.version)){var c=$b(b.reader.Ia(16)),d=[];if(0<b.version)for(var e=b.reader.C(),f=0;f<e;++f){var g=$b(b.reader.Ia(16));d.push(g)}e=b.reader.C();b.reader.I(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 fl(b,c){try{var d=new gl(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
function gl(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;}gl.prototype.createMediaKeys=function(){var b=new hl(this.keySystem);return Promise.resolve(b)};
gl.prototype.getConfiguration=function(){return this.a};function il(b){var c=this.mediaKeys;c&&c!=b&&jl(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?jl(b,this):Promise.resolve()}function hl(b){this.a=new MSMediaKeys(b);this.b=new Eb}hl.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new kl(this.a,b)};hl.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function jl(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}Fb(b.b);if(!c)return Promise.resolve();G(b.b,c,"msneedkey",ll);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 kl(b){E.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new Eb;this.sessionId="";this.expiration=NaN;this.closed=new z;this.keyStatuses=new ml}Ga(kl,E);n=kl.prototype;
n.generateRequest=function(b,c){this.a=new z;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),G(this.f,this.c,"mskeymessage",this.Oe.bind(this)),G(this.f,this.c,"mskeyadded",this.Me.bind(this)),G(this.f,this.c,"mskeyerror",this.Ne.bind(this)),nl(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(),Fb(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 ll(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=ol(b.initData);this.dispatchEvent(c)}}
function ol(b){if(!b)return b;var c=new el(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=q(d);for(d=e.next();!d.done;c={Mb:c.Mb},d=e.next())c.Mb=d.value,b.some(function(b){return function(c){return ac(c,b.Mb)}}(c))||b.push(c.Mb);c=0;e=q(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=q(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
n.Oe=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new D("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};n.Me=function(){this.a?(nl(this,"usable"),this.a.resolve(),this.a=null):this.b&&(nl(this,"usable"),this.b.resolve(),this.b=null)};
n.Ne=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:nl(this,"output-not-allowed");break;default:nl(this,"internal-error")}};function nl(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new D("keystatuseschange"))}
function ml(){this.size=0;this.a=void 0}var pl;n=ml.prototype;n.forEach=function(b){this.a&&b(this.a,pl)};n.get=function(b){if(this.has(b))return this.a};n.has=function(b){var c=pl;return this.a&&ac(new Uint8Array(b),new Uint8Array(c))?!0:!1};n.entries=function(){};n.keys=function(){};n.values=function(){};
Tk(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(pl=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=il,window.MediaKeys=hl,window.MediaKeySystemAccess=gl,navigator.requestMediaKeySystemAccess=fl)});function ql(){return Promise.reject(Error("The key system specified is not supported."))}function rl(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function sl(){throw new TypeError("Illegal constructor.");}sl.prototype.createSession=function(){};sl.prototype.setServerCertificate=function(){};function tl(){throw new TypeError("Illegal constructor.");}tl.prototype.getConfiguration=function(){};tl.prototype.createMediaKeys=function(){};
Tk(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=ql,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=rl,window.MediaKeys=sl,window.MediaKeySystemAccess=tl)},-10);var ul="";function vl(b){var c=ul;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function wl(b,c){try{var d=new xl(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function yl(b){var c=this.mediaKeys;c&&c!=b&&zl(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&zl(b,this);return Promise.resolve()}
function xl(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 p=
h.audioCapabilities[m];if(p.contentType){l=!0;var r=p.contentType.split(";")[0];f.canPlayType(r,this.a)&&(k.audioCapabilities.push(p),e=!0)}}if(h.videoCapabilities)for(m=0;m<h.videoCapabilities.length;++m)p=h.videoCapabilities[m],p.contentType&&(l=!0,f.canPlayType(p.contentType,this.a)&&(k.videoCapabilities.push(p),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;}xl.prototype.createMediaKeys=function(){var b=new Al(this.a);return Promise.resolve(b)};xl.prototype.getConfiguration=function(){return this.b};function Al(b){this.g=b;this.b=null;this.a=new Eb;this.c=[];this.f={}}
function zl(b,c){b.b=c;Fb(b.a);var d=ul;c&&(G(b.a,c,d+"needkey",b.$e.bind(b)),G(b.a,c,d+"keymessage",b.Ze.bind(b)),G(b.a,c,d+"keyadded",b.Xe.bind(b)),G(b.a,c,d+"keyerror",b.Ye.bind(b)))}n=Al.prototype;n.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new Bl(c,this.g,b);this.c.push(b);return b};
n.setServerCertificate=function(){return Promise.resolve(!1)};n.$e=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.Ze=function(b){var c=Cl(this,b.sessionId);c&&(b=new D("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
n.Xe=function(b){if(b=Cl(this,b.sessionId))Dl(b,"usable"),b.a&&b.a.resolve(),b.a=null};
n.Ye=function(b){var c=Cl(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?Dl(c,"output-restricted"):1==d?Dl(c,"expired"):Dl(c,"internal-error"))}};
function Cl(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function Bl(b,c,d){E.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 El}Ga(Bl,E);
function Fl(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(Wb("LOAD_SESSION|"+d));else{var f=Wb("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=vl("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=Bl.prototype;
n.Bc=function(b,c){if(this.a)this.a.then(this.Bc.bind(this,b,c))["catch"](this.Bc.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=Rb(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=Yb(e.keys[0].k);e=Yb(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=vl("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
function Dl(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new D("keystatuseschange"))}n.generateRequest=function(b,c){return Fl(this,c,null)};n.load=function(b){return"persistent-license"==this.g?Fl(this,null,b):Promise.reject(Error("Not a persistent session."))};n.update=function(b){var c=new z;this.Bc(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=vl("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 El(){this.size=0;this.a=void 0}var Gl;n=El.prototype;n.forEach=function(b){this.a&&b(this.a,Gl)};n.get=function(b){if(this.has(b))return this.a};
n.has=function(b){var c=Gl;return this.a&&ac(new Uint8Array(b),new Uint8Array(c))?!0:!1};n.entries=function(){};n.keys=function(){};n.values=function(){};
Tk(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)ul="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;Gl=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=wl;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=yl;window.MediaKeys=Al;window.MediaKeySystemAccess=
xl}});Tk(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function Hl(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}Tk(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=Hl)}});function Il(b,c,d){return new window.TextTrackCue(b,c,d)}function Jl(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}Tk(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=Il;else if(6==b)window.VTTCue=Jl;else{try{var c=!!Il(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=Il)}}});function gd(b,c,d){this.startTime=b;this.direction=Kl;this.endTime=c;this.payload=d;this.region=new Ll;this.position=null;this.positionAlign=Ml;this.size=100;this.textAlign=Nl;this.writingMode=Ol;this.lineInterpretation=Pl;this.line=null;this.lineHeight="";this.lineAlign=Ql;this.displayAlign=Rl;this.fontSize=this.backgroundColor=this.color="";this.fontWeight=Sl;this.fontStyle=Tl;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}y("shaka.text.Cue",gd);var Ml="auto";
gd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:Ml};var Nl="center",Ul={LEFT:"left",RIGHT:"right",CENTER:Nl,START:"start",END:"end"};gd.textAlign=Ul;var Rl="after",Vl={BEFORE:"before",CENTER:"center",AFTER:Rl};gd.displayAlign=Vl;var Kl="ltr";gd.direction={HORIZONTAL_LEFT_TO_RIGHT:Kl,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var Ol="horizontal-tb";gd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:Ol,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var Pl=0;
gd.lineInterpretation={LINE_NUMBER:Pl,PERCENTAGE:1};var Ql="start",Wl={CENTER:"center",START:Ql,END:"end"};gd.lineAlign=Wl;var Sl=400;gd.fontWeight={NORMAL:Sl,BOLD:700};var Tl="normal",Xl={NORMAL:Tl,ITALIC:"italic",OBLIQUE:"oblique"};gd.fontStyle=Xl;gd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
function Ll(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Yl;this.scroll=Zl}y("shaka.text.CueRegion",Ll);var Yl=1;Ll.units={PX:0,PERCENTAGE:Yl,LINES:2};var Zl="";Ll.scrollMode={NONE:Zl,UP:"up"};function $l(){}$l.prototype.parseInit=function(){};
$l.prototype.parseMedia=function(b,c){var d=Rb(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(R){throw new B(2,2,2005);}if(g){if(f=g.getElementsByTagName("tt")[0]){g=N.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=N.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var k=N.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var l=N.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","tickRate");
d=f.getAttribute("xml:space")||"default"}else throw new B(2,2,2005);if("default"!=d&&"preserve"!=d)throw new B(2,2,2005);d="default"==d;g=new am(g,h,k,l);h=bm(f.getElementsByTagName("styling")[0]);k=bm(f.getElementsByTagName("layout")[0]);l=[];for(var m=0;m<k.length;m++){var p=k[m],r=h;var w=new Ll;var x=p.getAttribute("xml:id");if(x){w.id=x;var A;if(A=cm(p,r,"extent"))A=(x=dm.exec(A))||em.exec(A),null!=A&&(w.width=Number(A[1]),w.height=Number(A[2]),w.widthUnits=x?Yl:0,w.heightUnits=x?Yl:0);if(p=
cm(p,r,"origin"))A=(x=dm.exec(p))||em.exec(p),null!=A&&(w.viewportAnchorX=Number(A[1]),w.viewportAnchorY=Number(A[2]),w.viewportAnchorUnits=x?Yl:0)}else w=null;w&&l.push(w)}f=bm(f.getElementsByTagName("body")[0]);for(m=0;m<f.length;m++)(w=fm(f[m],c.periodStart,g,h,k,l,d))&&e.push(w)}return e};
var dm=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,gm=/^(\d+px|\d+em)$/,em=/^(\d+)px (\d+)px$/,hm=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,im=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,jm=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,km=/^(\d*(?:\.\d*)?)f$/,lm=/^(\d*(?:\.\d*)?)t$/,mm=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,nm={left:Ql,center:"center",right:"end",start:Ql,end:"end"},om={left:"line-left",center:"center",right:"line-right"};
function bm(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=bm(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function pm(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)pm(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
function fm(b,c,d,e,f,g,h){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;pm(b,h);h=qm(b.getAttribute("begin"),d);var k=qm(b.getAttribute("end"),d);d=qm(b.getAttribute("dur"),d);var l=b.textContent;null==k&&null!=d&&(k=h+d);if(null==h||null==k)throw new B(2,2,2001);c=new gd(h+c,k+c,l);if((f=rm(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]}sm(c,b,f,e);return c}
function sm(b,c,d,e){"rtl"==tm(c,d,e,"direction")&&(b.direction="rtl");var f=tm(c,d,e,"writingMode");"tb"==f||"tblr"==f?b.writingMode="vertical-lr":"tbrl"==f?b.writingMode="vertical-rl":"rltb"==f||"rl"==f?b.direction="rtl":f&&(b.direction=Kl);if(f=tm(c,d,e,"textAlign"))b.positionAlign=om[f],b.lineAlign=nm[f],b.textAlign=Ul[f.toUpperCase()];if(f=tm(c,d,e,"displayAlign"))b.displayAlign=Vl[f.toUpperCase()];if(f=tm(c,d,e,"color"))b.color=f;if(f=tm(c,d,e,"backgroundColor"))b.backgroundColor=f;if(f=tm(c,
d,e,"fontFamily"))b.fontFamily=f;(f=tm(c,d,e,"fontWeight"))&&"bold"==f&&(b.fontWeight=700);(f=tm(c,d,e,"wrapOption"))&&"noWrap"==f&&(b.wrapLine=!1);(f=tm(c,d,e,"lineHeight"))&&f.match(gm)&&(b.lineHeight=f);(f=tm(c,d,e,"fontSize"))&&f.match(gm)&&(b.fontSize=f);if(f=tm(c,d,e,"fontStyle"))b.fontStyle=Xl[f.toUpperCase()];(d=cm(d,e,"textDecoration"))&&um(b,d);(c=vm(c,e,"textDecoration"))&&um(b,c)}
function um(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&sb(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&sb(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&sb(b.textDecoration,"overline")}}function tm(b,c,d,e){return(b=vm(b,d,e))?b:cm(c,d,e)}function cm(b,c,d){for(var e=bm(b),f=0;f<e.length;f++){var g=N.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=rm(b,"style",c))?N.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
function vm(b,c,d){return(b=rm(b,"style",c))?N.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function rm(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 qm(b,c){var d=null;if(hm.test(b)){d=hm.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 im.test(b)?d=wm(im,b):jm.test(b)?d=wm(jm,b):km.test(b)?(d=km.exec(b),d=Number(d[1])/c.frameRate):lm.test(b)?(d=lm.exec(b),d=Number(d[1])/c.a):mm.test(b)&&(d=wm(mm,b));return d}
function wm(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 am(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])}bd["application/ttml+xml"]=$l;function xm(){this.a=new $l}xm.prototype.parseInit=function(b){var c=!1;(new Q).F("moov",S).F("trak",S).F("mdia",S).F("minf",S).F("stbl",S).aa("stsd",Ce).F("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new B(2,2,2007);};xm.prototype.parseMedia=function(b,c){var d=!1,e=[];(new Q).F("mdat",De(function(b){d=!0;e=e.concat(this.a.parseMedia(b,c))}.bind(this))).parse(b);if(!d)throw new B(2,2,2007);return e};bd['application/mp4; codecs="stpp"']=xm;
bd['application/mp4; codecs="stpp.TTML.im1t"']=xm;function ym(){}ym.prototype.parseInit=function(){};
ym.prototype.parseMedia=function(b,c){var d=Rb(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 B(2,2,2E3);var e=c.segmentStart;if(null==e&&(e=0,d[0].includes("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=zm(new Gf(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 Gf(h[f]),
l=new Ll;Jf(k);Hf(k);for(var m=Jf(k);m;){var p=l,r=m;(m=/^id=(.*)$/.exec(r))?p.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(r))?p.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(r))?(p.height=Number(m[1]),p.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(r))?(p.regionAnchorX=Number(m[1]),p.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(r))?(p.viewportAnchorX=Number(m[1]),p.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(r)&&(p.scroll="up");Hf(k);
m=Jf(k)}g.push(l)}f=[];for(k=1;k<d.length;k++){h=d[k].split("\n");m=h;r=e;h=g;if(1==m.length&&!m[0]||/^NOTE($|[ \t])/.test(m[0])||"STYLE"==m[0])h=null;else{l=null;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));p=new Gf(m[0]);var w=zm(p),x=If(p,/[ \t]+--\x3e[ \t]+/g),A=zm(p);if(null==w||null==x||null==A)throw new B(2,2,2001);m=new gd(w+r,A+r,m.slice(1).join("\n").trim());Hf(p);for(r=Jf(p);r;)Am(m,r,h),Hf(p),r=Jf(p);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
function Am(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=Nl:b.textAlign=Ul[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";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=Bm(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=Wl[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=Pl,b.line=Number(d[1]),d[2]&&(b.lineAlign=Wl[d[2].toUpperCase()])}function Bm(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
function zm(b){b=If(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)}bd["text/vtt"]=ym;bd['text/vtt; codecs="vtt"']=ym;function Cm(){this.a=null}Cm.prototype.parseInit=function(b){var c=!1;(new Q).F("moov",S).F("trak",S).F("mdia",S).aa("mdhd",function(b){0==b.version?(b.reader.I(4),b.reader.I(4),this.a=b.reader.C(),b.reader.I(4)):(b.reader.I(8),b.reader.I(8),this.a=b.reader.C(),b.reader.I(8));b.reader.I(4)}.bind(this)).F("minf",S).F("stbl",S).aa("stsd",Ce).F("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new B(2,2,2008);if(!c)throw new B(2,2,2008);};
Cm.prototype.parseMedia=function(b,c){var d=this;if(!this.a)throw new B(2,2,2008);var e=0,f=[],g,h=[],k=!1,l=!1,m=!1,p=null;(new Q).F("moof",S).F("traf",S).aa("tfdt",function(b){k=!0;e=0==b.version?b.reader.C():b.reader.$a()}).aa("tfhd",function(b){var c=b.flags;b=b.reader;b.I(4);c&1&&b.I(8);c&2&&b.I(4);p=c&8?b.C():null}).aa("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.C();d&1&&b.I(4);d&4&&b.I(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,Dc:null};d&256&&
(k.duration=b.C());d&512&&(k.sampleSize=b.C());d&1024&&b.I(4);d&2048&&(k.Dc=0==c?b.C():b.wd());g.push(k)}f=g}).F("mdat",De(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new B(2,2,2008);var r=e,w=new DataView(g.buffer,g.byteOffset,g.byteLength),x=new P(w,0);f.forEach(function(b){var f=b.duration||p,g=b.Dc?e+b.Dc:r;r=g+(f||0);var k=0;do{var l=x.C();k+=l;var m=x.C(),w=null;"vttc"==Ee(m)?8<l&&(w=x.Ia(l-8)):x.I(l-8);f&&w&&h.push(Dm(w,c.periodStart+g/d.a,c.periodStart+r/d.a))}while(b.sampleSize&&
k<b.sampleSize)});return h.filter(I.wa)};function Dm(b,c,d){var e,f,g;(new Q).F("payl",De(function(b){e=Rb(b)})).F("iden",De(function(b){f=Rb(b)})).F("sttg",De(function(b){g=Rb(b)})).parse(b);return e?Em(e,f,g,c,d):null}function Em(b,c,d,e,f){b=new gd(e,f,b);c&&(b.id=c);if(d)for(c=new Gf(d),d=Jf(c);d;)Am(b,d,[]),Hf(c),d=Jf(c);return b}bd['application/mp4; codecs="wvtt"']=Cm;function Yj(b){this.a=null;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"}y("shaka.text.SimpleTextDisplayer",Yj);Yj.prototype.remove=function(b,c){if(!this.a)return!1;Fm(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};Yj.prototype.remove=Yj.prototype.remove;
Yj.prototype.append=function(b){for(var c=Gm,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};Yj.prototype.append=Yj.prototype.append;Yj.prototype.destroy=function(){this.a&&Fm(this.a,function(){return!0});this.a=null;return Promise.resolve()};Yj.prototype.destroy=Yj.prototype.destroy;
Yj.prototype.isTextVisible=function(){return"showing"==this.a.mode};Yj.prototype.isTextVisible=Yj.prototype.isTextVisible;Yj.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};Yj.prototype.setTextVisibility=Yj.prototype.setTextVisibility;
function Gm(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
function Fm(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
//# sourceMappingURL=shaka-player.compiled.map

713
static/shaka-player.ui.js Normal file
View File

@ -0,0 +1,713 @@
(function(){var innerGlobal=typeof window!="undefined"?window:global;var exportTo={};(function(window,global){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 ea(){ea=function(){};ba.Symbol||(ba.Symbol=fa)}var fa=function(){var b=0;return function(c){return"jscomp_symbol_"+(c||"")+b++}}();
function ha(){ea();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 ia(this)}});ha=function(){}}function ia(b){var c=0;return ja(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})}function ja(b){ha();b={next:b};b[ba.Symbol.iterator]=function(){return this};return b}function q(b){ha();var c=b[Symbol.iterator];return c?c.call(b):ia(b)}
function ka(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})}}
ka("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.j()})};var f=ba.setTimeout;d.prototype.c=function(b){f(b,0)};d.prototype.j=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.u),reject:b(this.f)}};c.prototype.u=function(b){if(b===this)this.f(new TypeError("A Promise cannot resolve to itself"));else if(b instanceof c)this.v(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.o(b):this.j(b)}};c.prototype.o=function(b){var c=void 0;try{c=b.then}catch(l){this.f(l);return}"function"==typeof c?this.w(c,b):this.j(b)};c.prototype.f=function(b){this.l(2,b)};c.prototype.j=function(b){this.l(1,b)};c.prototype.l=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.m()};c.prototype.m=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.v=function(b){var c=this.c();b.cc(c.resolve,c.reject)};c.prototype.w=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(R){g(R)}}:c}var f,g,h=new c(function(b,c){f=b;g=c});this.cc(e(b,f),e(d,g));return h};c.prototype["catch"]=function(b){return this.then(void 0,b)};c.prototype.cc=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=q(b),g=f.next();!g.done;g=f.next())e(g.value).cc(c,d)})};c.all=function(b){var d=q(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).cc(g(h.length-1),c),f=d.next();
while(!f.done)})};return c});ka("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 la(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 r(b){return la(b())}
var na="function"==typeof Object.create?Object.create:function(b){function c(){}c.prototype=b;return new c},oa;if("function"==typeof Object.setPrototypeOf)oa=Object.setPrototypeOf;else{var pa;a:{var qa={Ue:!0},ta={};try{ta.__proto__=qa;pa=ta.Ue;break a}catch(b){}pa=!1}oa=pa?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null}var ua=oa;
function va(b,c){b.prototype=na(c.prototype);b.prototype.constructor=b;if(ua)ua(b,c);else for(var d in c)if("prototype"!=d)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(c,d);e&&Object.defineProperty(b,d,e)}else b[d]=c[d];b.dh=c.prototype}function wa(){this.g=!1;this.c=null;this.C=void 0;this.s=1;this.b=this.f=0;this.l=this.a=null}function xa(b){if(b.g)throw new TypeError("Generator is already running");b.g=!0}wa.prototype.j=function(b){this.C=b};
function ya(b,c){b.a={Bd:c,Ud:!0};b.s=b.f||b.b}wa.prototype["return"]=function(b){this.a={"return":b};this.s=this.b};function u(b,c,d){b.s=d;return{value:c}}wa.prototype.I=function(b){this.s=b};function za(b,c,d){b.f=c;void 0!=d&&(b.b=d)}function Aa(b,c){b.f=0;b.b=c||0}function Ba(b,c){b.s=c;b.f=0}function Ca(b){b.f=0;var c=b.a.Bd;b.a=null;return c}function Da(b){b.l=[b.a];b.f=0;b.b=0}
function Ea(b,c){var d=b.l.splice(0)[0];(d=b.a=b.a||d)?d.Ud?b.s=b.f||b.b:void 0!=d.I&&b.b<d.I?(b.s=d.I,b.a=null):b.s=b.b:b.s=c}function Fa(b){this.a=new wa;this.b=b}function Ga(b,c){xa(b.a);var d=b.a.c;if(d)return Ha(b,"return"in d?d["return"]:function(b){return{value:b,done:!0}},c,b.a["return"]);b.a["return"](c);return Ia(b)}
function Ha(b,c,d,e){try{var f=c.call(b.a.c,d);if(!(f instanceof Object))throw new TypeError("Iterator result "+f+" is not an object");if(!f.done)return b.a.g=!1,f;var g=f.value}catch(h){return b.a.c=null,ya(b.a,h),Ia(b)}b.a.c=null;e.call(b.a,g);return Ia(b)}
function Ia(b){for(;b.a.s;)try{var c=b.b(b.a);if(c)return b.a.g=!1,{value:c.value,done:!1}}catch(d){b.a.C=void 0,ya(b.a,d)}b.a.g=!1;if(b.a.a){c=b.a.a;b.a.a=null;if(c.Ud)throw c.Bd;return{value:c["return"],done:!0}}return{value:void 0,done:!0}}
function Ja(b){this.next=function(c){xa(b.a);b.a.c?c=Ha(b,b.a.c.next,c,b.a.j):(b.a.j(c),c=Ia(b));return c};this["throw"]=function(c){xa(b.a);b.a.c?c=Ha(b,b.a.c["throw"],c,b.a.j):(ya(b.a,c),c=Ia(b));return c};this["return"]=function(c){return Ga(b,c)};ha();this[Symbol.iterator]=function(){return this}}function v(b,c){Ja.prototype=b.prototype;return new Ja(new Fa(c))}function Ka(b,c){return Object.prototype.hasOwnProperty.call(b,c)}
ka("WeakMap",function(b){function c(b){this.a=(g+=Math.random()+1).toString();if(b){ea();ha();b=q(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}}function d(b){Ka(b,f)||aa(b,f,{value:{}})}function e(b){var c=Object[b];c&&(Object[b]=function(b){d(b);return c(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e["delete"](c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(m){return!1}}())return b;
var f="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var g=0;c.prototype.set=function(b,c){d(b);if(!Ka(b,f))throw Error("WeakMap key fail: "+b);b[f][this.a]=c;return this};c.prototype.get=function(b){return Ka(b,f)?b[f][this.a]:void 0};c.prototype.has=function(b){return Ka(b,f)&&Ka(b[f],this.a)};c.prototype["delete"]=function(b){return Ka(b,f)&&Ka(b[f],this.a)?delete b[f][this.a]:!1};return c});
ka("Map",function(b){function c(){var b={};return b.Pa=b.next=b.head=b}function d(b,c){var d=b.a;return ja(function(){if(d){for(;d.head!=b.a;)d=d.Pa;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})}function e(b,c){var d=c&&typeof c;"object"==d||"function"==d?g.has(c)?d=g.get(c):(d=""+ ++h,g.set(c,d)):d="p_"+c;var e=b.b[d];if(e&&Ka(b.b,d))for(var f=0;f<e.length;f++){var k=e[f];if(c!==c&&k.key!==k.key||c===k.key)return{id:d,list:e,index:f,ia:k}}return{id:d,
list:e,index:-1,ia:void 0}}function f(b){this.b={};this.a=c();this.size=0;if(b){b=q(b);for(var d;!(d=b.next()).done;)d=d.value,this.set(d[0],d[1])}}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b(q([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||
"t"!=f.value[1]||!e.next().done?!1:!0}catch(t){return!1}}())return b;ea();ha();var g=new WeakMap;f.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.b[d.id]=[]);d.ia?d.ia.value=c:(d.ia={next:this.a,Pa:this.a.Pa,head:this.a,key:b,value:c},d.list.push(d.ia),this.a.Pa.next=d.ia,this.a.Pa=d.ia,this.size++);return this};f.prototype["delete"]=function(b){b=e(this,b);return b.ia&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.b[b.id],b.ia.Pa.next=b.ia.next,b.ia.next.Pa=b.ia.Pa,
b.ia.head=null,this.size--,!0):!1};f.prototype.clear=function(){this.b={};this.a=this.a.Pa=c();this.size=0};f.prototype.has=function(b){return!!e(this,b).ia};f.prototype.get=function(b){return(b=e(this,b).ia)&&b.value};f.prototype.entries=function(){return d(this,function(b){return[b.key,b.value]})};f.prototype.keys=function(){return d(this,function(b){return b.key})};f.prototype.values=function(){return d(this,function(b){return b.value})};f.prototype.forEach=function(b,c){for(var d=this.entries(),
e;!(e=d.next()).done;)e=e.value,b.call(c,e[1],e[0],this)};f.prototype[Symbol.iterator]=f.prototype.entries;var h=0;return f});
ka("Set",function(b){function c(b){this.a=new Map;if(b){b=q(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.a.size}if(function(){if(!b||"function"!=typeof b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b(q([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||
g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;ea();ha();c.prototype.add=function(b){this.a.set(b,b);this.size=this.a.size;return this};c.prototype["delete"]=function(b){b=this.a["delete"](b);this.size=this.a.size;return b};c.prototype.clear=function(){this.a.clear();this.size=0};c.prototype.has=function(b){return this.a.has(b)};c.prototype.entries=function(){return this.a.entries()};c.prototype.values=function(){return this.a.values()};c.prototype.keys=c.prototype.values;
c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.a.forEach(function(e){return b.call(c,e,e,d)})};return c});function La(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{Pd:f,Le:g}}return{Pd:-1,Le:void 0}}ka("Array.prototype.findIndex",function(b){return b?b:function(b,d){return La(this,b,d).Pd}});
function Ma(b,c){ha();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e}ka("Array.prototype.keys",function(b){return b?b:function(){return Ma(this,function(b){return b})}});ka("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}});
ka("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length,g=d||0;for(0>g&&(g=Math.max(g+f,0));g<f;g++){var h=c[g];if(h===b||Object.is(h,b))return!0}return!1}});function Na(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""}
ka("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==Na(this,b,"includes").indexOf(b,d||0)}});ka("Array.from",function(b){return b?b:function(b,d,e){ha();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}});ka("Array.prototype.find",function(b){return b?b:function(b,d){return La(this,b,d).Le}});
ka("String.prototype.startsWith",function(b){return b?b:function(b,d){for(var c=Na(this,b,"startsWith"),f=c.length,g=b.length,h=Math.max(0,Math.min(d|0,c.length)),k=0;k<g&&h<f;)if(c[h++]!=b[k++])return!1;return k>=g}});var Oa=this;Oa.a=!0;function y(b,c){var d=b.split("."),e=Oa;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 Pa(b,c){function d(){}d.prototype=c.prototype;b.dh=c.prototype;b.prototype=new d;b.prototype.constructor=b;b.ph=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 Qa(b){this.c=Math.exp(Math.log(.5)/b);this.b=this.a=0}function Sa(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 Ta(b){return b.a/(1-Math.pow(b.c,b.b))};function Ua(){this.b=new Qa(2);this.c=new Qa(5);this.a=0}Ua.prototype.getBandwidthEstimate=function(b){return 128E3>this.a?b:Math.min(Ta(this.b),Ta(this.c))};function Va(){}function Wa(){}function Xa(){}window.console&&window.console.log.bind&&(Wa=console.warn.bind(console),Va=console.error.bind(console));var Ya=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;function Za(b){var c;b instanceof Za?($a(this,b.Ha),this.ob=b.ob,this.La=b.La,ab(this,b.Fb),this.xa=b.xa,bb(this,b.a.clone()),this.ab=b.ab):b&&(c=String(b).match(Ya))?($a(this,c[1]||"",!0),this.ob=cb(c[2]||""),this.La=cb(c[3]||"",!0),ab(this,c[4]),this.xa=cb(c[5]||"",!0),bb(this,c[6]||"",!0),this.ab=cb(c[7]||"")):this.a=new db(null)}n=Za.prototype;n.Ha="";n.ob="";n.La="";n.Fb=null;n.xa="";n.ab="";
n.toString=function(){var b=[],c=this.Ha;c&&b.push(eb(c,ib,!0),":");if(c=this.La){b.push("//");var d=this.ob;d&&b.push(eb(d,ib,!0),"@");b.push(encodeURIComponent(c).replace(/%25([0-9a-fA-F]{2})/g,"%$1"));c=this.Fb;null!=c&&b.push(":",String(c))}if(c=this.xa)this.La&&"/"!=c.charAt(0)&&b.push("/"),b.push(eb(c,"/"==c.charAt(0)?jb:kb,!0));(c=this.a.toString())&&b.push("?",c);(c=this.ab)&&b.push("#",eb(c,lb));return b.join("")};
n.resolve=function(b){var c=this.clone();"data"===c.Ha&&(c=new Za);var d=!!b.Ha;d?$a(c,b.Ha):d=!!b.ob;d?c.ob=b.ob:d=!!b.La;d?c.La=b.La:d=null!=b.Fb;var e=b.xa;if(d)ab(c,b.Fb);else if(d=!!b.xa){if("/"!=e.charAt(0))if(this.La&&!this.xa)e="/"+e;else{var f=c.xa.lastIndexOf("/");-1!=f&&(e=c.xa.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.xa=e:d=""!==b.a.toString();d?bb(c,b.a.clone()):d=!!b.ab;d&&(c.ab=b.ab);return c};n.clone=function(){return new Za(this)};function $a(b,c,d){b.Ha=d?cb(c,!0):c;b.Ha&&(b.Ha=b.Ha.replace(/:$/,""))}function ab(b,c){if(c){c=Number(c);if(isNaN(c)||0>c)throw Error("Bad port number "+c);b.Fb=c}else b.Fb=null}function bb(b,c,d){c instanceof db?b.a=c:(d||(c=eb(c,mb)),b.a=new db(c))}
function cb(b,c){return b?c?decodeURI(b):decodeURIComponent(b):""}function eb(b,c,d){return"string"==typeof b?(b=encodeURI(b).replace(c,nb),d&&(b=b.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),b):null}function nb(b){b=b.charCodeAt(0);return"%"+(b>>4&15).toString(16)+(b&15).toString(16)}var ib=/[#\/\?@]/g,kb=/[#\?:]/g,jb=/[#\?]/g,mb=/[#\?@]/g,lb=/#/g;function db(b){this.a=b||null}n=db.prototype;n.wa=null;n.ec=null;
n.add=function(b,c){if(!this.wa&&(this.wa={},this.ec=0,this.a))for(var d=this.a.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.a=null;(d=this.wa.hasOwnProperty(b)&&this.wa[b])||(this.wa[b]=d=[]);d.push(c);this.ec++;return this};
n.toString=function(){if(this.a)return this.a;if(!this.wa)return"";var b=[],c;for(c in this.wa)for(var d=encodeURIComponent(c),e=this.wa[c],f=0;f<e.length;f++){var g=d;""!==e[f]&&(g+="="+encodeURIComponent(e[f]));b.push(g)}return this.a=b.join("&")};n.clone=function(){var b=new db;b.a=this.a;if(this.wa){var c={},d;for(d in this.wa)c[d]=this.wa[d].concat();b.wa=c;b.ec=this.ec}return b};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 ob(b,c){var d=pb();this.l=null==b.maxAttempts?d.maxAttempts:b.maxAttempts;this.f=null==b.baseDelay?d.baseDelay:b.baseDelay;this.j=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=void 0===c?!1:c)this.a=1}function qb(b){if(b.a>=b.l)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.j)),b.b*=b.g):c.resolve();b.a++;return c}
function pb(){return{maxAttempts:2,baseDelay:1E3,backoffFactor:2,fuzzFactor:.5,timeout:0}};function A(b,c,d,e){for(var f=[],g=3;g<arguments.length;++g)f[g-3]=arguments[g];this.severity=b;this.category=c;this.code=d;this.data=f;this.handled=!1}y("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,CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM:4033,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}y("shaka.util.AbortableOperation",B);function sb(b){return new B(Promise.reject(b),function(){return Promise.resolve()})}B.failed=sb;function tb(){var b=Promise.reject(new A(2,7,7001));b["catch"](function(){});return new B(b,function(){return Promise.resolve()})}B.aborted=tb;function ub(b){return new B(Promise.resolve(b),function(){return Promise.resolve()})}B.completed=ub;
function vb(b){return new B(b,function(){return b["catch"](function(){})})}B.notAbortable=vb;B.prototype.abort=function(){this.a=!0;return this.b()};B.prototype.abort=B.prototype.abort;function wb(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=wb;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.sa=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=xb(b,c,f):f.resolve(c)},function(b){c?d=xb(c,b,f):f.reject(b)});return new B(f,function(){return d()})};B.prototype.chain=B.prototype.sa;
function xb(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 C(b,c){c=void 0===c?{}:c;for(var d in c)this[d]=c[d];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}C.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)};C.prototype.stopImmediatePropagation=function(){this.a=!0};C.prototype.stopPropagation=function(){};function yb(){this.a={}}n=yb.prototype;n.push=function(b,c){this.a.hasOwnProperty(b)?this.a[b].push(c):this.a[b]=[c]};n.get=function(b){return(b=this.a[b])?b.slice():null};n.getAll=function(){var b=[],c;for(c in this.a)b.push.apply(b,this.a[c]);return b};n.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)};n.forEach=function(b){for(var c in this.a)b(c,this.a[c])};function D(){this.Ra=new yb;this.Ca=this}D.prototype.addEventListener=function(b,c){this.Ra.push(b,c)};D.prototype.removeEventListener=function(b,c){this.Ra.remove(b,c)};D.prototype.dispatchEvent=function(b){for(var c=this.Ra.get(b.type)||[],d=0;d<c.length;++d){b.target=this.Ca;b.currentTarget=this.Ca;var e=c[d];try{e.handleEvent?e.handleEvent(b):e.call(this,b)}catch(f){}if(b.a)break}return b.defaultPrevented};function zb(b){function c(b){switch(typeof b){case "undefined":case "boolean":case "number":case "string":case "symbol":case "function":return b;default:if(!b||b.buffer&&b.buffer.constructor==ArrayBuffer)return b;if(d.has(b))return null;var e=b.constructor==Array;if(b.constructor!=Object&&!e)return null;d.add(b);var g=e?[]:{},h;for(h in b)g[h]=c(b[h]);e&&(g.length=b.length);return g}}var d=new Set;return c(b)};function Ab(b,c){return"number"===typeof b&&"number"===typeof c&&isNaN(b)&&isNaN(c)?!0:b===c}function Bb(b,c){var d=b.indexOf(c);-1<d&&b.splice(d,1)}function Cb(b,c){var d=0;b.forEach(function(b){d+=c(b)?1:0});return d}
function Db(b,c,d){d||(d=Ab);if(b.length!=c.length)return!1;c=c.slice();var e={};b=q(b);for(var f=b.next();!f.done;e={item:e.item},f=b.next()){e.item=f.value;f=c.findIndex(function(b){return function(c){return d(b.item,c)}}(e));if(-1==f)return!1;c[f]=c[c.length-1];c.pop()}return 0==c.length};function Eb(){this.a=[]}function Gb(b,c){b.a.push(c["finally"](function(){Bb(b.a,c)}))}Eb.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 E(b){D.call(this);this.f=!1;this.g=new Eb;this.a=new Set;this.b=new Set;this.c=b||null}Pa(E,D);y("shaka.net.NetworkingEngine",E);E.RequestType={MANIFEST:0,SEGMENT:1,LICENSE:2,APP:3,TIMING:4};E.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:3};var Hb={};function Ib(b,c,d){d=d||3;var e=Hb[b];if(!e||d>=e.priority)Hb[b]={priority:d,Eg:c}}E.registerScheme=Ib;E.unregisterScheme=function(b){delete Hb[b]};E.prototype.Gg=function(b){this.a.add(b)};E.prototype.registerRequestFilter=E.prototype.Gg;
E.prototype.eh=function(b){this.a["delete"](b)};E.prototype.unregisterRequestFilter=E.prototype.eh;E.prototype.bf=function(){this.a.clear()};E.prototype.clearAllRequestFilters=E.prototype.bf;E.prototype.Hg=function(b){this.b.add(b)};E.prototype.registerResponseFilter=E.prototype.Hg;E.prototype.fh=function(b){this.b["delete"](b)};E.prototype.unregisterResponseFilter=E.prototype.fh;E.prototype.cf=function(){this.b.clear()};E.prototype.clearAllResponseFilters=E.prototype.cf;
function Jb(b,c){return{uris:b,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:c,licenseRequestType:null}}E.prototype.destroy=function(){this.f=!0;this.a.clear();this.b.clear();return this.g.destroy()};E.prototype.destroy=E.prototype.destroy;
E.prototype.request=function(b,c){var d=this;if(this.f)return tb();c.method=c.method||"GET";c.headers=c.headers||{};c.retryParameters=c.retryParameters?zb(c.retryParameters):pb();c.uris=zb(c.uris);var e=Kb(this,b,c),f=e.sa(function(){return Lb(d,b,c,new ob(c.retryParameters,!1),0,null)}),g=f.sa(function(c){return Mb(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.sa(function(c){var e=Date.now()-l,f=
c.response;f.timeMs+=k;f.timeMs+=e;c.If||!d.c||f.fromCache||1!=b||d.c(f.timeMs,f.data.byteLength);return f},function(b){b&&(b.severity=2);throw b;});Gb(this.g,e);return e};E.prototype.request=E.prototype.request;function Kb(b,c,d){var e=ub(void 0),f={};b=q(b.a);for(var g=b.next();!g.done;f={cd:f.cd},g=b.next())f.cd=g.value,e=e.sa(function(b){return function(){return b.cd(c,d)}}(f));return e.sa(void 0,function(b){if(b&&7001==b.code)throw b;throw new A(2,1,1006,b);})}
function Lb(b,c,d,e,f,g){var h=new Za(d.uris[f]),k=h.Ha,l=!1;k||(k=location.protocol,k=k.slice(0,-1),$a(h,k),d.uris[f]=h.toString());var m=(k=Hb[k])?k.Eg:null;if(!m)return sb(new A(2,1,1E3,h));var p;return vb(qb(e)).sa(function(){if(b.f)return tb();p=Date.now();return m(d.uris[f],d,c,function(d,e){b.c&&1==c&&(b.c(d,e),l=!0)})}).sa(function(b){void 0==b.timeMs&&(b.timeMs=Date.now()-p);return{response:b,If:l}},function(h){if(h&&7001==h.code)throw h;if(b.f)return tb();if(h&&1==h.severity)return b.dispatchEvent(new C("retry",
{error:h instanceof A?h:null})),f=(f+1)%d.uris.length,Lb(b,c,d,e,f,h);throw h||g;})}function Mb(b,c,d){var e=ub(void 0);b=q(b.b);for(var f=b.next();!f.done;f=b.next())e=e.sa(f.value.bind(null,c,d.response));return e.sa(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 Nb(){this.a=new yb}Nb.prototype.R=function(){Ob(this);this.a=null};function G(b,c,d,e){b.a&&(c=new Pb(c,d,e),b.a.push(d,c))}function Qb(b,c,d,e){G(b,c,d,function(b){this.Ja(c,d);e(b)}.bind(b))}Nb.prototype.Ja=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.Ja(),this.a.remove(c,f))}};function Ob(b){if(b.a){for(var c=b.a.getAll(),d=0;d<c.length;++d)c[d].Ja();b.a.a={}}}
function Pb(b,c,d){this.target=b;this.type=c;this.a=d;this.target.addEventListener(c,d,!1)}Pb.prototype.Ja=function(){this.target.removeEventListener(this.type,this.a,!1);this.a=this.target=null};function Rb(b,c){for(var d=[],e=q(b),f=e.next();!f.done;f=e.next())d.push(c(f.value));return d}function Sb(b,c){for(var d=q(b),e=d.next();!e.done;e=d.next())if(!c(e.value))return!1;return!0}function Tb(b,c){for(var d=q(b),e=d.next();!e.done;e=d.next())if(c(e.value))return!0;return!1}function Ub(b,c){for(var d=[],e=q(b),f=e.next();!f.done;f=e.next())f=f.value,c(f)&&d.push(f);return d};function Vb(b){var c=new Map;Object.keys(b).forEach(function(d){c.set(d,b[d])});return c}function Wb(b){var c={};b.forEach(function(b,e){c[e]=b});return c};function Xb(b,c){var d=b;c&&(d+='; codecs="'+c+'"');return d}function Yb(b){var c=[b.mimeType];Zb.forEach(function(d,e){var f=b[e];f&&c.push(d+'="'+f+'"')});return c.join(";")}function $b(b){b=b.split(".");var c=b[0];b.pop();return[c,b.join(".")]}var Zb=(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels");function ac(b){return(navigator.userAgent||"").includes(b)};function bc(b){if(!b)return"";b=new Uint8Array(b);239==b[0]&&187==b[1]&&191==b[2]&&(b=b.subarray(3));b=escape(cc(b));try{return decodeURIComponent(b)}catch(c){throw new A(2,2,2004);}}y("shaka.util.StringUtils.fromUTF8",bc);
function dc(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 cc(d)}y("shaka.util.StringUtils.fromUTF16",dc);
function ec(b){var c=new Uint8Array(b);if(239==c[0]&&187==c[1]&&191==c[2])return bc(c);if(254==c[0]&&255==c[1])return dc(c.subarray(2),!1);if(255==c[0]&&254==c[1])return dc(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 dc(b,!1);if(0==c[1]&&0==c[3])return dc(b,!0);if(d(0)&&d(1)&&d(2)&&d(3))return bc(b);throw new A(2,2,2003);}y("shaka.util.StringUtils.fromBytesAutoDetect",ec);
function fc(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}y("shaka.util.StringUtils.toUTF8",fc);function cc(b){for(var c="",d=0;d<b.length;d+=16E3)c+=String.fromCharCode.apply(null,b.subarray(d,d+16E3));return c};function H(b){this.b=b;this.a=null}y("shaka.util.Timer",H);H.prototype.mb=function(){null!=this.a&&(clearTimeout(this.a),this.a=null);this.b()};H.prototype.tick=H.prototype.mb;H.prototype.start=function(b,c){function d(){e.b();e.a=c?setTimeout(d,f):null}var e=this,f=1E3*b;null!=this.a&&clearTimeout(this.a);this.a=setTimeout(d,f)};H.prototype.start=H.prototype.start;H.prototype.stop=function(){null!=this.a&&clearTimeout(this.a);this.a=null};H.prototype.stop=H.prototype.stop;function gc(b,c){var d=cc(b);c=void 0==c?!0:c;d=window.btoa(d).replace(/\+/g,"-").replace(/\//g,"_");return c?d:d.replace(/=*$/,"")}y("shaka.util.Uint8ArrayUtils.toBase64",gc);function ic(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}y("shaka.util.Uint8ArrayUtils.fromBase64",ic);function jc(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}
y("shaka.util.Uint8ArrayUtils.fromHex",jc);function kc(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}y("shaka.util.Uint8ArrayUtils.toHex",kc);function lc(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}y("shaka.util.Uint8ArrayUtils.equal",lc);
function mc(b){for(var c=[],d=0;d<arguments.length;++d)c[d]=arguments[d];for(var e=d=0;e<c.length;++e)d+=c[e].length;d=new Uint8Array(d);for(var f=e=0;f<c.length;++f)d.set(c[f],e),e+=c[f].length;return d}y("shaka.util.Uint8ArrayUtils.concat",mc);function nc(b){var c=this;this.w=b;this.v=new Set;this.o=this.j=null;this.H=!1;this.a=null;this.l=new Nb;this.b=new Map;this.u=[];this.m=new z;this.f=null;this.g=function(d){c.m.reject(d);b.onError(d)};this.V=new Map;this.K=new Map;this.G=new H(function(){return oc(c)});this.c=!1;this.P=new z;this.A=!1;this.B=[];this.S=!1;this.F=new H(function(){return pc(c)});this.F.start(1,!0);this.m["catch"](function(){})}n=nc.prototype;
n.destroy=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:if(b.c)return u(d,b.P,0);b.c=!0;return u(d,qc(b),4);case 4:b.P.resolve(),d.I(0)}})})};
function qc(b){return r(function d(){var e;return v(d,function(d){switch(d.s){case 1:return b.l.R(),b.l=null,b.m.reject(),b.F.stop(),b.F=null,b.G.stop(),b.G=null,e=Array.from(b.b.keys()),b.b.clear(),u(d,Promise.all(e.map(function(b){return Promise.resolve().then(function(){return r(function k(){return v(k,function(d){switch(d.s){case 1:return za(d,2),u(d,rc(b),4);case 4:Ba(d,0);break;case 2:Ca(d),d.s=0}})})})})),2);case 2:if(!b.o){d.I(3);break}za(d,4);return u(d,b.o.setMediaKeys(null),6);case 6:Ba(d,
5);break;case 4:Ca(d);case 5:b.o=null;case 3:b.a=null,b.v.clear(),b.j=null,b.u=[],b.f=null,b.g=null,b.w=null,d.s=0}})})}n.configure=function(b){this.f=b};function sc(b,c,d){b.u=[];b.A=d;return tc(b,c)}function uc(b,c,d){b.u=d;b.A=0<d.length;return tc(b,c)}
function vc(b,c,d,e,f,g){var h=new Map;h.set(c,{audioCapabilities:f,videoCapabilities:g,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:c,drmInfos:[{keySystem:c,licenseServerUri:d,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:e,initData:null,keyIds:null}]});return wc(b,h)}
function tc(b,c){var d=c.some(function(b){return 0<b.drmInfos.length});if(!d){var e=Vb(b.f.servers);xc(c,e)}var f=yc(b);if(f){var g=q(c);for(e=g.next();!e.done;e=g.next())e.value.drmInfos=[f]}f=q(c);for(e=f.next();!e.done;e=f.next())for(e=q(e.value.drmInfos),g=e.next();!g.done;g=e.next())zc(g.value,Vb(b.f.servers),Vb(b.f.advanced||{}));e=Ac(b,c);if(!e.size)return b.H=!0,Promise.resolve();e=wc(b,e);return d?e:e["catch"](function(){})}
n.bc=function(b){var c=this;if(!this.j)return Qb(this.l,b,"encrypted",function(){c.g(new A(2,6,6010))}),Promise.resolve();this.o=b;Qb(this.l,this.o,"play",function(){for(var b=0;b<c.B.length;b++)Bc(c,c.B[b]);c.S=!0;c.B=[]});b=this.o.setMediaKeys(this.j);b=b["catch"](function(b){return Promise.reject(new A(2,6,6003,b.message))});var d=Cc(this);return Promise.all([b,d]).then(function(){if(c.c)return Promise.reject();Dc(c);c.a.initData.length||c.u.length||G(c.l,c.o,"encrypted",function(b){return Ec(c,
b.initDataType,new Uint8Array(b.initData))})})["catch"](function(b){if(!c.c)return Promise.reject(b)})};function Cc(b){return r(function d(){var e;return v(d,function(d){switch(d.s){case 1:if(!(b.j&&b.a&&b.a.serverCertificate&&b.a.serverCertificate.length)){d.I(0);break}za(d,3);return u(d,b.j.setServerCertificate(b.a.serverCertificate),5);case 5:Ba(d,0);break;case 3:return e=Ca(d),d["return"](Promise.reject(new A(2,6,6004,e.message)))}})})}
function Fc(b,c){return r(function e(){var f,g,h;return v(e,function(e){switch(e.s){case 1:return u(e,Gc(b,c),2);case 2:f=e.C;if(!f)return e["return"]();g=[];if(h=b.b.get(f))h.Ka=new z,g.push(h.Ka);g.push(f.remove());return u(e,Promise.all(g),0)}})})}function Dc(b){var c=b.a?b.a.initData:[];c.forEach(function(c){return Hc(b,c.initDataType,c.initData)});b.u.forEach(function(c){return Gc(b,c)});c.length||b.u.length||b.m.resolve();return b.m}
function Ec(b,c,d){var e=b.b.values();e=q(e);for(var f=e.next();!f.done;f=e.next())if(lc(d,f.value.initData))return;Hc(b,c,d)}n.keySystem=function(){return this.a?this.a.keySystem:""};function Ic(b,c){return ac("Edge/")?!0:b.v.has(c)}function Jc(b){b=b.b.keys();b=Rb(b,function(b){return b.sessionId});return Array.from(b)}n.kc=function(){var b=Infinity,c=this.b.keys();c=q(c);for(var d=c.next();!d.done;d=c.next())d=d.value,isNaN(d.expiration)||(b=Math.min(b,d.expiration));return b};
function Ac(b,c){for(var d=new Set,e=q(c),f=e.next();!f.done;f=e.next()){var g=q(f.value.drmInfos);for(f=g.next();!f.done;f=g.next())d.add(f.value)}e=q(d);for(f=e.next();!f.done;f=e.next())zc(f.value,Vb(b.f.servers),Vb(b.f.advanced||{}));g=b.A?"required":"optional";var h=b.A?["persistent-license"]:["temporary"];e=new Map;d=q(d);for(f=d.next();!f.done;f=d.next())f=f.value,e.set(f.keySystem,{audioCapabilities:[],videoCapabilities:[],distinctiveIdentifier:"optional",persistentState:g,sessionTypes:h,
label:f.keySystem,drmInfos:[]});d=q(c);for(f=d.next();!f.done;f=d.next()){f=f.value;g=f.audio;h=f.video;var k=g?Xb(g.mimeType,g.codecs):"",l=h?Xb(h.mimeType,h.codecs):"",m=q(f.drmInfos);for(f=m.next();!f.done;f=m.next()){f=f.value;var p=e.get(f.keySystem);p.drmInfos.push(f);f.distinctiveIdentifierRequired&&(p.distinctiveIdentifier="required");f.persistentStateRequired&&(p.persistentState="required");g&&p.audioCapabilities.push({robustness:f.audioRobustness||"",contentType:k});h&&p.videoCapabilities.push({robustness:f.videoRobustness||
"",contentType:l})}}return e}
function wc(b,c){if(1==c.size&&c.has(""))return Promise.reject(new A(2,6,6E3));for(var d=q(c.values()),e=d.next();!e.done;e=d.next())e=e.value,0==e.audioCapabilities.length&&delete e.audioCapabilities,0==e.videoCapabilities.length&&delete e.videoCapabilities;var f=d=new z;[!0,!1].forEach(function(b){var d=this;c.forEach(function(c,e){c.drmInfos.some(function(b){return!!b.licenseServerUri})==b&&(f=f["catch"](function(){if(!this.c)return navigator.requestMediaKeySystemAccess(e,[c])}.bind(d)))})}.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();this.v.clear();var d=b.getConfiguration(),e=d.videoCapabilities||[],f=q(d.audioCapabilities||[]);for(d=f.next();!d.done;d=f.next())this.v.add(d.value.contentType);e=q(e);for(d=e.next();!d.done;d=e.next())this.v.add(d.value.contentType);e=b.keySystem;d=c.get(b.keySystem);f=[];var g=[],p=[],t=[];Kc(d.drmInfos,f,g,p,t);this.a={keySystem:e,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:p,keyIds:t};return this.a.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.H=!0}.bind(b))["catch"](function(b){if(!this.c)return this.a=null,this.v.clear(),
b instanceof A?Promise.reject(b):Promise.reject(new A(2,6,6002,b.message))}.bind(b));d.reject();return f}
function yc(b){b=Vb(b.f.clearKeys);if(0==b.size)return null;var c=[],d=[];b.forEach(function(b,e){var f=jc(e),g=jc(b);f={kty:"oct",kid:gc(f,!1),k:gc(g,!1)};c.push(f);d.push(f.kid)});b=JSON.stringify({keys:c});var e=JSON.stringify({kids:d});e=[{initData:new Uint8Array(fc(e)),initDataType:"keyids"}];return{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+window.btoa(b),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,
initData:e,keyIds:[]}}
function Gc(b,c){try{var d=b.j.createSession("persistent-license")}catch(g){var e=new A(2,6,6005,g.message);b.g(e);return Promise.reject(e)}G(b.l,d,"message",b.ke.bind(b));G(b.l,d,"keystatuseschange",b.ce.bind(b));var f={initData:null,loaded:!1,Wc:Infinity,Ka:null};b.b.set(d,f);return d.load(c).then(function(b){if(this.c)return Promise.reject();if(b)return f.loaded=!0,Lc(this)&&this.m.resolve(),d;this.b["delete"](d);this.g(new A(2,6,6013))}.bind(b),function(b){this.c||(this.b["delete"](d),this.g(new A(2,
6,6005,b.message)))}.bind(b))}
function Hc(b,c,d){try{var e=b.A?b.j.createSession("persistent-license"):b.j.createSession()}catch(f){b.g(new A(2,6,6005,f.message));return}G(b.l,e,"message",b.ke.bind(b));G(b.l,e,"keystatuseschange",b.ce.bind(b));b.b.set(e,{initData:d,loaded:!1,Wc:Infinity,Ka:null});e.generateRequest(c,d.buffer)["catch"](function(c){if(!b.c){b.b["delete"](e);if(c.errorCode&&c.errorCode.systemCode){var d=c.errorCode.systemCode;0>d&&(d+=Math.pow(2,32));d="0x"+d.toString(16)}b.g(new A(2,6,6006,c.message,c,d))}})}
n.ke=function(b){this.f.delayLicenseRequestUntilPlayed&&this.o.paused&&!this.S?this.B.push(b):Bc(this,b)};
function Bc(b,c){var d=c.target,e=b.b.get(d),f=b.a.licenseServerUri,g=b.f.advanced[b.a.keySystem];"individualization-request"==c.messageType&&g&&g.individualizationServer&&(f=g.individualizationServer);f=Jb([f],b.f.retryParameters);f.body=c.message;f.method="POST";f.licenseRequestType=c.messageType;"com.microsoft.playready"!=b.a.keySystem&&"com.chromecast.playready"!=b.a.keySystem||Mc(f);b.w.Pb.request(2,f).promise.then(function(b){return this.c?Promise.reject():d.update(b.data).then(function(){var b=
this;this.w.onEvent(new C("drmsessionupdate"));e&&(e.Ka&&e.Ka.resolve(),Nc(Oc).then(function(){e.loaded=!0;Lc(b)&&b.m.resolve()}))}.bind(this))}.bind(b),function(b){this.c||(b=new A(2,6,6007,b),this.g(b),e&&e.Ka&&e.Ka.reject(b))}.bind(b))["catch"](function(b){this.c||(b=new A(2,6,6008,b.message),this.g(b),e&&e.Ka&&e.Ka.reject(b))}.bind(b))}
function Mc(b){var c=dc(b.body,!0,!0);if(c.includes("PlayReadyKeyMessage")){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=ic(c.querySelector("Challenge").textContent).buffer}else b.headers["Content-Type"]="text/xml; charset=utf-8"}
n.ce=function(b){b=b.target;var c=this.b.get(b),d=!1;b.keyStatuses.forEach(function(b,e){if("string"==typeof e){var f=e;e=b;b=f}if("com.microsoft.playready"==this.a.keySystem&&16==e.byteLength&&!ac("Tizen")){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.a.keySystem&&"status-pending"==b&&(b="usable");"status-pending"!=b&&(c.loaded=!0);"expired"==b&&(d=!0);f=kc(new Uint8Array(e));
this.V.set(f,b)}.bind(this));var e=b.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.Ka&&(this.b["delete"](b),b.close()["catch"](function(){}));Lc(this)&&(this.m.resolve(),this.G.start(Pc,!1))};function oc(b){var c=b.V,d=b.K;d.clear();c.forEach(function(b,c){return d.set(c,b)});c=Array.from(d.values());c.length&&c.every(function(b){return"expired"==b})&&b.g(new A(2,6,6014));b.w.Xc(Wb(d))}
function Qc(){function b(b){return r(function h(){var c,f,m;return v(h,function(h){switch(h.s){case 1:return za(h,2),u(h,navigator.requestMediaKeySystemAccess(b,d),4);case 4:return c=h.C,m=(f=c.getConfiguration().sessionTypes)?f.includes("persistent-license"):!1,ac("Tizen 3")&&(m=!1),e.set(b,{persistentState:m}),u(h,c.createMediaKeys(),5);case 5:Ba(h,0);break;case 2:Ca(h),e.set(b,null),h.s=0}})})}var c=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],d=[{videoCapabilities:c,
persistentState:"required",sessionTypes:["persistent-license"]},{videoCapabilities:c}],e=new Map;c="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(" ").map(function(c){return b(c)});return Promise.all(c).then(function(){return Wb(e)})}
function Rc(b,c){var d=c.audio,e=c.video;if(d&&d.encrypted&&!Ic(b,Xb(d.mimeType,d.codecs))||e&&e.encrypted&&!Ic(b,Xb(e.mimeType,e.codecs)))return!1;var f=b.keySystem();return 0==c.drmInfos.length||c.drmInfos.some(function(b){return b.keySystem==f})}
function Sc(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}function pc(b){b.b.forEach(function(c,d){var e=c.Wc,f=d.expiration;isNaN(f)&&(f=Infinity);f!=e&&(b.w.onExpirationUpdated(d.sessionId,f),c.Wc=f)})}function Lc(b){b=b.b.values();return Sb(b,function(b){return b.loaded})}
function Nc(b){return new Promise(function(c){return setTimeout(c,1E3*b)})}function xc(b,c){var d=[];c.forEach(function(b,c){d.push({keySystem:c,licenseServerUri:b,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:[],keyIds:[]})});for(var e=q(b),f=e.next();!f.done;f=e.next())f.value.drmInfos=d}
function Kc(b,c,d,e,f){b.forEach(function(b){c.includes(b.licenseServerUri)||c.push(b.licenseServerUri);b.serverCertificate&&(d.some(function(c){return lc(c,b.serverCertificate)})||d.push(b.serverCertificate));b.initData&&b.initData.forEach(function(b){e.some(function(c){return c.keyId&&c.keyId==b.keyId?!0:c.initDataType==b.initDataType&&lc(c.initData,b.initData)})||e.push(b)});if(b.keyIds)for(var g=0;g<b.keyIds.length;++g)f.includes(b.keyIds[g])||f.push(b.keyIds[g])})}
function zc(b,c,d){var e=b.keySystem;if(e){if(c=c.get(e))b.licenseServerUri=c;b.keyIds||(b.keyIds=[]);if(d=d.get(e))b.distinctiveIdentifierRequired||(b.distinctiveIdentifierRequired=d.distinctiveIdentifierRequired),b.persistentStateRequired||(b.persistentStateRequired=d.persistentStateRequired),b.videoRobustness||(b.videoRobustness=d.videoRobustness),b.audioRobustness||(b.audioRobustness=d.audioRobustness),b.serverCertificate||(b.serverCertificate=d.serverCertificate);window.cast&&window.cast.__platform__&&
"com.microsoft.playready"==b.keySystem&&(b.keySystem="com.chromecast.playready")}}function rc(b){return r(function d(){var e,f;return v(d,function(d){switch(d.s){case 1:return e=b.close().then(function(){return!0}),f=Nc(Tc).then(function(){return!1}),u(d,Promise.race([e,f]),2);case 2:d.s=0}})})}var Tc=1,Oc=5,Pc=.5;function Uc(){this.a=new muxjs.mp4.CaptionParser;this.g=[];this.f={}}Uc.prototype.init=function(b){var c=muxjs.mp4.probe;b=new Uint8Array(b);this.g=c.videoTrackIds(b);this.f=c.timescale(b);this.a.init()};Uc.prototype.b=function(b,c){var d=new Uint8Array(b);(d=this.a.parse(d,this.g,this.f))&&d.captions&&c(d.captions);this.a.clearParsedCaptions()};Uc.prototype.c=function(){this.a.resetCaptionStream()};function Vc(){}Vc.prototype.init=function(){};Vc.prototype.b=function(){};Vc.prototype.c=function(){};function Wc(b){return!b||1==b.length&&1E-6>b.end(0)-b.start(0)?null:b.length?b.end(b.length-1):null}function Xc(b,c,d){d=void 0===d?0:d;return!b||!b.length||1==b.length&&1E-6>b.end(0)-b.start(0)||c>b.end(b.length-1)?!1:c+d>=b.start(0)}function Yc(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 Zc(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};var $c={df:function(b,c){return b.reduce(function(b,c,f){return c["catch"](b.bind(null,f))}.bind(null,c),Promise.reject())},Dc:function(b,c){return b.concat(c)},Qb:function(){},Sa:function(b){return null!=b}};function ad(b,c){if(0==c.length)return b;var d=c.map(function(b){return new Za(b)});return b.map(function(b){return new Za(b)}).map(function(b){return d.map(b.resolve.bind(b))}).reduce($c.Dc,[]).map(function(b){return b.toString()})}function bd(b,c){return{keySystem:b,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,initData:c||[],keyIds:[]}}var cd={Te:"video",Ne:"audio",rb:"text",mh:"application"},hd=1/15;function id(){this.a=new muxjs.mp4.Transmuxer({keepOriginalTimestamps:!0});this.b=null;this.g=[];this.c=[];this.f=!1;this.a.on("data",this.l.bind(this));this.a.on("done",this.j.bind(this))}id.prototype.destroy=function(){this.a.dispose();this.a=null;return Promise.resolve()};function jd(b,c){return window.muxjs&&"mp2t"==b.split(";")[0].split("/")[1]?c?MediaSource.isTypeSupported(kd(c,b)):MediaSource.isTypeSupported(kd("audio",b))||MediaSource.isTypeSupported(kd("video",b)):!1}
function kd(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 ld(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}
id.prototype.l=function(b){this.c=b.captions;var 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)};id.prototype.j=function(){var b={data:mc.apply(null,this.g),captions:this.c};this.b.resolve(b);this.f=!1};function md(b){this.g=null;this.c=b;this.f=this.o=0;this.j=Infinity;this.b=this.a=null;this.m="";this.l=new Map}var nd={};y("shaka.text.TextEngine.registerParser",function(b,c){nd[b]=c});y("shaka.text.TextEngine.unregisterParser",function(b){delete nd[b]});function od(b){return nd[b]||window.muxjs&&"application/cea-608"==b?!0:!1}md.prototype.destroy=function(){this.c=this.g=null;this.l.clear();return Promise.resolve()};function pd(b,c){"application/cea-608"!=c&&(b.g=new nd[c])}
md.prototype.Lc=function(b){var c={periodStart:0,segmentStart:null,segmentEnd:0};try{return this.g.parseMedia(new Uint8Array(b),c)[0].startTime}catch(d){throw new A(2,2,2009,d);}};
function qd(b,c,d,e){return Promise.resolve().then(function(){if(this.g&&this.c)if(null==d||null==e)this.g.parseInit(new Uint8Array(c));else{var b={periodStart:this.o,segmentStart:d,segmentEnd:e};b=this.g.parseMedia(new Uint8Array(c),b).filter(function(b){return b.startTime>=this.f&&b.startTime<this.j}.bind(this));this.c.append(b);null==this.a&&(this.a=Math.max(d,this.f));this.b=Math.min(e,this.j)}}.bind(b))}
md.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))};md.prototype.Ye=function(b){this.c.append(b)};md.prototype.appendCues=md.prototype.Ye;
md.prototype.vc=function(b,c){this.m=b;var d=this.l.get(b);if(d)for(var e=q(d.keys()),f=e.next();!f.done;f=e.next())if(f=d.get(f.value))f=f.filter(function(b){return b.endTime<=c}),this.c.append(f)};md.prototype.setSelectedClosedCaptionId=md.prototype.vc;
function rd(b,c,d,e,f){var g=d+" "+e,h=new Map;c=q(c);for(var k=c.next();!k.done;k=c.next()){var l=k.value;k=l.stream;h.has(k)||h.set(k,new Map);h.get(k).has(g)||h.get(k).set(g,[]);l.startTime+=f;l.endTime+=f;l.startTime>=b.f&&l.startTime<b.j&&(l=new sd(l.startTime,l.endTime,l.text),h.get(k).get(g).push(l),k==b.m&&b.c.append([l]))}f=q(h.keys());for(g=f.next();!g.done;g=f.next())for(g=g.value,b.l.has(g)||b.l.set(g,new Map),c=q(h.get(g).keys()),k=c.next();!k.done;k=c.next())k=k.value,l=h.get(g).get(k),
b.l.get(g).set(k,l);b.a=null==b.a?Math.max(d,b.f):Math.min(b.a,Math.max(d,b.f));b.b=Math.max(b.b,Math.min(e,b.j))};function td(b,c,d){this.f=b;this.m=d;this.b={};this.a=null;this.c={};this.j=new Nb;this.v=!1;this.l={};this.o=c;b=this.u=new z;c=new MediaSource;Qb(this.j,c,"sourceopen",b.resolve);this.f.src=window.URL.createObjectURL(c);this.g=c}function ud(b){var c=Xb(b.mimeType,b.codecs),d=Yb(b);return od(c)||MediaSource.isTypeSupported(d)||jd(c,b.type)}
function vd(){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]=od(c)||
MediaSource.isTypeSupported(c)||jd(c);var d=c.split(";")[0];b[d]=b[d]||b[c]});return b}n=td.prototype;
n.destroy=function(){var b=this;this.v=!0;var c=[],d;for(d in this.c){var e=this.c[d],f=e[0];this.c[d]=e.slice(0,1);f&&c.push(f.p["catch"]($c.Qb));for(f=1;f<e.length;++f)e[f].p["catch"]($c.Qb),e[f].p.reject()}this.a&&c.push(this.a.destroy());this.m&&c.push(this.m.destroy());for(var g in this.l)c.push(this.l[g].destroy());return Promise.all(c).then(function(){b.j&&(b.j.R(),b.j=null);b.f&&(b.f.removeAttribute("src"),b.f.load(),b.f=null);b.g=null;b.a=null;b.m=null;b.b={};b.l={};b.o=null;b.c={}})};
n.init=function(b,c){var d=this;return r(function f(){var g;return v(f,function(f){switch(f.s){case 1:return g=cd,u(f,d.u,2);case 2:b.forEach(function(b,f){var h=Xb(b.mimeType,b.codecs);f==g.rb?wd(d,h):(!c&&MediaSource.isTypeSupported(h)||!jd(h,f)||(d.l[f]=new id,h=kd(f,h)),h=d.g.addSourceBuffer(h),G(d.j,h,"error",d.ah.bind(d,f)),G(d.j,h,"updateend",d.Db.bind(d,f)),d.b[f]=h,d.c[f]=[])}),f.s=0}})})};function wd(b,c){b.a||(b.a=new md(b.m));pd(b.a,c)}
function xd(b,c){if("text"==c)var d=b.a.a;else d=yd(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 zd(b,c){return"text"==c?b.a.b:Wc(yd(b,c))}function Ad(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=yd(b,c);return Yc(b,d)}n.Ic=function(){var b=this.a&&null!=this.a.a?[{start:this.a.a,end:this.a.b}]:[];return{total:Zc(this.f.buffered),audio:Zc(yd(this,"audio")),video:Zc(yd(this,"video")),text:b}};
function yd(b,c){try{return b.b[c].buffered}catch(d){return null}}
function Bd(b,c,d,e,f,g){if("text"==c)return qd(b.a,d,e,f);if(b.l[c])return ld(b.l[c],d).then(function(b){this.a||wd(this,"text/vtt");b.captions&&rd(this.a,b.captions,e,f,this.b.video.timestampOffset);return Cd(this,c,this.Ge.bind(this,c,b.data.buffer))}.bind(b));g&&window.muxjs&&(b.a||wd(b,"text/vtt"),null==e&&null==f?b.o.init(d):b.o.b(d,function(c){c.length&&rd(b.a,c,e,f,b.b.video.timestampOffset)}));return Cd(b,c,b.Ge.bind(b,c,d))}n.vc=function(b){var c=zd(this,"video")||0;this.a.vc(b,c)};
n.remove=function(b,c,d){return"text"==b?this.a.remove(c,d):Cd(this,b,this.He.bind(this,b,c,d))};function Dd(b,c){if("text"==c){if(!b.a)return Promise.resolve();b.o.c();return b.a.remove(0,Infinity)}return Cd(b,c,b.He.bind(b,c,0,b.g.duration))}n.flush=function(b){return"text"==b?Promise.resolve():Cd(this,b,this.mf.bind(this,b))};
function Ed(b,c,d,e,f){return"text"==c?(b.a.o=d,b=b.a,b.f=e,b.j=f,Promise.resolve()):Promise.all([Cd(b,c,b.Ve.bind(b,c)),Cd(b,c,b.Ug.bind(b,c,d)),Cd(b,c,b.Rg.bind(b,c,e,f))])}n.endOfStream=function(b){return Fd(this,function(){b?this.g.endOfStream(b):this.g.endOfStream()}.bind(this))};n.Ia=function(b){return Fd(this,function(){this.g.duration=b}.bind(this))};n.ka=function(){return this.g.duration};n.Ge=function(b,c){this.b[b].appendBuffer(c)};
n.He=function(b,c,d){d<=c?this.Db(b):this.b[b].remove(c,d)};n.Ve=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.Db(b)};n.mf=function(b){this.f.currentTime-=.001;this.Db(b)};n.Ug=function(b,c){0>c&&(c+=.001);this.b[b].timestampOffset=c;this.Db(b)};n.Rg=function(b,c,d){this.b[b].appendWindowStart=0;this.b[b].appendWindowEnd=d;this.b[b].appendWindowStart=c;this.Db(b)};
n.ah=function(b){this.c[b][0].p.reject(new A(2,3,3014,this.f.error?this.f.error.code:0))};n.Db=function(b){var c=this.c[b][0];c&&(c.p.resolve(),Gd(this,b))};function Cd(b,c,d){if(b.v)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)),Gd(b,c)}return d.p}
function Fd(b,c){if(b.v)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)Gd(this,d);return b}.bind(b),function(){return Promise.reject()}.bind(b))}function Gd(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)),Gd(b,c)}};function Hd(b,c){b=I(b);c=I(c);return b.split("-")[0]==c.split("-")[0]}function Id(b,c){b=I(b);c=I(c);var d=b.split("-"),e=c.split("-");return d[0]==e[0]&&1==d.length&&2==e.length}function I(b){var c=b.split("-");b=c[0]||"";c=c[1]||"";b=b.toLowerCase();b=Jd.get(b)||b;return(c=c.toUpperCase())?b+"-"+c:b}function Kd(b){var c=b.indexOf("-");b=0<=c?b.substring(0,c):b;b=b.toLowerCase();return b=Jd.get(b)||b}
function Ld(b){return b.language?I(b.language):b.audio&&b.audio.language?I(b.audio.language):b.video&&b.video.language?I(b.video.language):"und"}
function Md(b,c){for(var d=I(b),e=new Set,f=q(c),g=f.next();!g.done;g=f.next())e.add(I(g.value));f=q(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,g==d)return g;f=q(e);for(g=f.next();!g.done;g=f.next())if(g=g.value,Id(g,d))return g;f=q(e);for(g=f.next();!g.done;g=f.next()){var h=g=g.value,k=d;h=I(h);k=I(k);h=h.split("-");k=k.split("-");if(2==h.length&&2==k.length&&h[0]==k[0])return g}e=q(e);for(g=e.next();!g.done;g=e.next())if(f=g.value,Id(d,f))return f;return null}
var Jd=new Map([["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"]]);var J={Qc:function(b,c,d){function e(b,c,d){return b>=c&&b<=d}var f=b.video;return f&&f.width&&f.height&&!(e(f.width,c.minWidth,Math.min(c.maxWidth,d.width))&&e(f.height,c.minHeight,Math.min(c.maxHeight,d.height))&&e(f.width*f.height,c.minPixels,c.maxPixels))||!e(b.bandwidth,c.minBandwidth,c.maxBandwidth)?!1:!0},rd:function(b,c,d){var e=!1;b.forEach(function(b){var f=b.allowedByApplication;b.allowedByApplication=J.Qc(b,c,d);f!=b.allowedByApplication&&(e=!0)});return e},filterNewPeriod:function(b,
c,d,e){e.variants=e.variants.filter(function(e){if(b&&b.H&&!Rc(b,e))return!1;var f=e.audio;e=e.video;return f&&!ud(f)||e&&!ud(e)||f&&c&&!J.sd(f,c)||e&&d&&!J.sd(e,d)?!1:!0});e.textStreams=e.textStreams.filter(function(b){return od(Xb(b.mimeType,b.codecs))})},sd:function(b,c){return b.mimeType!=c.mimeType||b.codecs.split(".")[0]!=c.codecs.split(".")[0]?!1:!0},pd:function(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=new Set;c&&c.roles.forEach(function(b){return l.add(b)});d&&d.roles.forEach(function(b){return l.add(b)});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:Array.from(l),videoId:null,audioId:null,channelsCount:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,
originalAudioId:null,originalTextId:null};d&&(b.videoId=d.id,b.originalVideoId=d.originalId,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.originalAudioId=c.originalId,b.channelsCount=c.channelsCount,b.audioBandwidth=c.bandwidth||null,b.label=c.label);return b},kd:function(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,originalVideoId:null,originalAudioId:null,originalTextId:b.originalId}},lf:function(b,c){for(var d=0;d<b.variants.length;d++)if(b.variants[d].id==c.id)return b.variants[d];return null},kf:function(b,c){for(var d=0;d<b.textStreams.length;d++)if(b.textStreams[d].id==c.id)return b.textStreams[d];return null},yb:function(b){return b.allowedByApplication&&
b.allowedByKeySystem},Bf:function(b){return b.filter(function(b){return J.yb(b)})},Ed:function(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)]},fc:function(b,c,d){var e=b,f=b.filter(function(b){return b.primary});f.length&&(e=f);var g=e.length?
e[0].language:"";e=e.filter(function(b){return b.language==g});if(c){var h=Md(I(c),b.map(function(b){return b.language}));h&&(e=b.filter(function(b){return I(b.language)==h}))}if(d){if(b=J.Dd(e,d),b.length)return b}else if(b=e.filter(function(b){return 0==b.roles.length}),b.length)return b;b=e.map(function(b){return b.roles}).reduce($c.Dc,[]);return b.length?J.Dd(e,b[0]):e},Dd:function(b,c){return b.filter(function(b){return b.roles.includes(c)})},Nd:function(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},hc:function(b,c){for(var d=b.periods.length-1;0<d;--d)if(c+hd>=b.periods[d].startTime)return d;return 0},jf:function(b,c){for(var d=0;d<b.periods.length;++d)for(var e=b.periods[d],f=0;f<e.variants.length;++f)if(e.variants[f]==c)return d;return-1},Kf:function(b){return"audio"==b.type},Pf:function(b){return"video"==b.type},Id:function(b){var c=[];b.periods.forEach(function(b){b.variants.forEach(function(b){c.push(b)})});return c},Gf:function(b){var c=[];b.audio&&
c.push(b.audio);b.video&&c.push(b.video);return c},rh:function(b){return J.Kf(b)?"type=audio codecs="+b.codecs+" bandwidth="+b.bandwidth+" channelsCount="+b.channelsCount:J.Pf(b)?"type=video codecs="+b.codecs+" bandwidth="+b.bandwidth+" frameRate="+b.frameRate+" width="+b.width+" height="+b.height:"unexpected stream type"}};function K(){this.j=null;this.g=!1;this.b=new Ua;this.c=[];this.l=!1;this.a=this.f=null}y("shaka.abr.SimpleAbrManager",K);K.prototype.stop=function(){this.j=null;this.g=!1;this.c=[];this.f=null};K.prototype.stop=K.prototype.stop;K.prototype.init=function(b){this.j=b};K.prototype.init=K.prototype.init;
K.prototype.chooseVariant=function(){var b=Nd(this.a.restrictions,this.c),c=this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.c.length&&!b.length&&(b=Nd(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.f=Date.now();return d};K.prototype.chooseVariant=K.prototype.chooseVariant;K.prototype.enable=function(){this.g=!0};
K.prototype.enable=K.prototype.enable;K.prototype.disable=function(){this.g=!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;Sa(d.b,f,e);Sa(d.c,f,e)}if(null!=this.f&&this.g)a:{if(!this.l){if(!(128E3<=this.b.a))break a;this.l=!0}else if(Date.now()-this.f<1E3*this.a.switchInterval)break a;d=this.chooseVariant();this.b.getBandwidthEstimate(this.a.defaultBandwidthEstimate);this.j(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 Nd(b,c){b&&(c=c.filter(function(c){return J.Qc(c,b,{width:Infinity,height:Infinity})}));return c.sort(function(b,c){return b.bandwidth-c.bandwidth})};function Od(b,c){this.a=b;this.b=c}Od.prototype.toString=function(){return"v"+this.a+"."+this.b};function Pd(b,c){var d=new Od(2,6),e=Qd,f=e.a,g=d.b-f.b;(0<(d.a-f.a||g)?e.c:e.b)(e.a,d,b,c)}function Rd(b,c,d,e){Wa([d,"has been deprecated and will be removed in",c,". We are currently at version",b,". Additional information:",e].join(" "))}function Sd(b,c,d,e){Va([d,"has been deprecated and has been removed in",c,". We are now at version",b,". Additional information:",e].join(""))}var Qd=null;var Td="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Ud="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),Vd=["loop","playbackRate"],Wd=["pause","play"],Xd="adaptation buffering emsg error loading streaming texttrackvisibility timelineregionadded timelineregionenter timelineregionexit trackschanged unloading variantchanged textchanged".split(" "),Yd={getAssetUri:2,getAudioLanguages:2,
getAudioLanguagesAndRoles:2,getBufferedInfo:2,getConfiguration:2,getExpiration:2,getPlaybackRate:2,getTextLanguages:2,getTextLanguagesAndRoles:2,getTextTracks:2,getStats:5,getVariantTracks:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,usingEmbeddedTextTrack:2},Zd={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},$d=[["getConfiguration","configure"]],ae=[["isTextTrackVisible","setTextTrackVisibility"]],be="addTextTrack cancelTrickPlay configure resetConfiguration retryStreaming selectAudioLanguage selectEmbeddedTextTrack selectTextLanguage selectTextTrack selectVariantTrack setTextTrackVisibility trickPlay".split(" "),
ce=["attach","detach","load","unload"];
function de(b){return JSON.stringify(b,function(b,d){if("function"!=typeof d){if(d instanceof Event||d instanceof C){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=d instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(d)}:"number"==typeof d?isNaN(d)?"NaN":isFinite(d)?
d:0>d?"-Infinity":"Infinity":d;return c}})}function ee(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__?fe(d):d&&"object"==typeof d&&"Uint8Array"==d.__type__?new Uint8Array(d.entries):d})}function fe(b){return{length:b.length,start:function(c){return b.start[c]},end:function(c){return b.end[c]}}};function ge(b,c,d,e,f,g){this.G=b;this.g=c;this.H=d;this.m=!1;this.B=e;this.F=f;this.w=g;this.b=this.j=!1;this.A="";this.l=null;this.o=this.$d.bind(this);this.u=this.eg.bind(this);this.a={video:{},player:{}};this.v=0;this.c={};this.f=null}var he=!1,ie=null;n=ge.prototype;n.destroy=function(){je(this);ie&&ke(this);this.F=this.B=this.g=null;this.b=this.j=!1;this.u=this.o=this.f=this.c=this.a=this.l=null;return Promise.resolve()};n.ba=function(){return this.b};n.uc=function(){return this.A};
n.init=function(){if(window.chrome&&chrome.cast&&chrome.cast.isAvailable){delete window.__onGCastApiAvailable;this.j=!0;this.g();var b=new chrome.cast.SessionRequest(this.G);b=new chrome.cast.ApiConfig(b,this.ae.bind(this),this.mg.bind(this),"origin_scoped");chrome.cast.initialize(b,function(){},function(){});he&&setTimeout(this.g.bind(this),20);(b=ie)&&b.status!=chrome.cast.SessionStatus.STOPPED?this.ae(b):ie=null}else window.__onGCastApiAvailable=function(b){b&&this.init()}.bind(this)};
n.ed=function(b){this.l=b;this.b&&le({type:"appData",appData:this.l})};n.cast=function(b){if(!this.j)return Promise.reject(new A(1,8,8E3));if(!he)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.Yc.bind(this,b),this.Zd.bind(this));return this.f};n.ic=function(){this.b&&(je(this),ie&&(ke(this),ie.stop(function(){},function(){}),ie=null))};
n.get=function(b,c){if("video"==b){if(Wd.includes(c))return this.se.bind(this,b,c)}else if("player"==b){if(Zd[c]&&!this.get("player","isLive")())return function(){};if(be.includes(c))return this.se.bind(this,b,c);if(ce.includes(c))return this.Jg.bind(this,b,c);if(Yd[c])return this.pe.bind(this,b,c)}return this.pe(b,c)};n.set=function(b,c,d){this.a[b][c]=d;le({type:"set",targetName:b,property:c,value:d})};
n.Yc=function(b,c){ie=c;c.addUpdateListener(this.o);c.addMessageListener("urn:x-cast:com.google.shaka.v2",this.u);this.$d();le({type:"init",initState:b,appData:this.l});this.f.resolve()};n.Zd=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.pe=function(b,c){return this.a[b][c]};
n.se=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];le({type:"call",targetName:b,methodName:c,args:e})};n.Jg=function(b,c,d){for(var e=[],f=2;f<arguments.length;++f)e[f-2]=arguments[f];f=new z;var g=this.v.toString();this.v++;this.c[g]=f;le({type:"asyncCall",targetName:b,methodName:c,args:e,id:g});return f};n.ae=function(b){var c=this.w();this.f=new z;this.m=!0;this.Yc(c,b)};n.mg=function(b){he="available"==b;this.g()};
function ke(b){var c=ie;c.removeUpdateListener(b.o);c.removeMessageListener("urn:x-cast:com.google.shaka.v2",b.u)}n.$d=function(){var b=ie?"connected"==ie.status:!1;if(this.b&&!b){this.F();for(var c in this.a)this.a[c]={};je(this)}this.A=(this.b=b)?ie.receiver.friendlyName:"";this.g()};function je(b){for(var c in b.c){var d=b.c[c];delete b.c[c];d.reject(new A(1,7,7E3))}}
n.eg=function(b,c){var d=ee(c);switch(d.type){case "event":var e=d.event;this.B(d.targetName,new C(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.m&&(this.H(),this.m=!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 le(b){b=de(b);ie.sendMessage("urn:x-cast:com.google.shaka.v2",b,function(){},Xa)};function L(b,c,d){D.call(this);this.c=b;this.b=c;this.l=this.g=this.f=this.m=this.j=null;this.a=new ge(d,this.Wg.bind(this),this.Xg.bind(this),this.Yg.bind(this),this.Zg.bind(this),this.Ld.bind(this));me(this)}Pa(L,D);y("shaka.cast.CastProxy",L);L.prototype.destroy=function(b){b&&this.a&&this.a.ic();this.l&&(this.l.R(),this.l=null);b=[];this.b&&(b.push(this.b.destroy()),this.b=null);this.a&&(b.push(this.a.destroy()),this.a=null);this.m=this.j=this.c=null;return Promise.all(b)};
L.prototype.destroy=L.prototype.destroy;L.prototype.Mb=function(){return this.j};L.prototype.getVideo=L.prototype.Mb;L.prototype.cb=function(){return this.m};L.prototype.getPlayer=L.prototype.cb;L.prototype.td=function(){return this.a?this.a.j&&he:!1};L.prototype.canCast=L.prototype.td;L.prototype.ba=function(){return this.a?this.a.ba():!1};L.prototype.isCasting=L.prototype.ba;L.prototype.uc=function(){return this.a?this.a.uc():""};L.prototype.receiverName=L.prototype.uc;
L.prototype.cast=function(){var b=this.Ld();return this.a.cast(b).then(function(){if(this.b)return this.b.$b()}.bind(this))};L.prototype.cast=L.prototype.cast;L.prototype.ed=function(b){this.a.ed(b)};L.prototype.setAppData=L.prototype.ed;L.prototype.Ie=function(){var b=this.a;if(b.b){var c=b.w();chrome.cast.requestSession(b.Yc.bind(b,c),b.Zd.bind(b))}};L.prototype.suggestDisconnect=L.prototype.Ie;L.prototype.ic=function(){this.a.ic()};L.prototype.forceDisconnect=L.prototype.ic;
function me(b){b.a.init();b.l=new Nb;Td.forEach(function(b){G(this.l,this.c,b,this.kh.bind(this))}.bind(b));Xd.forEach(function(b){G(this.l,this.b,b,this.Dg.bind(this))}.bind(b));b.j={};for(var c in b.c)Object.defineProperty(b.j,c,{configurable:!1,enumerable:!0,get:b.jh.bind(b,c),set:b.lh.bind(b,c)});b.m={};for(var d in b.b)Object.defineProperty(b.m,d,{configurable:!1,enumerable:!0,get:b.oe.bind(b,d)});b.f=new D;b.f.Ca=b.j;b.g=new D;b.g.Ca=b.m}n=L.prototype;
n.Ld=function(){var b={video:{},player:{},playerAfterLoad:{},manifest:this.b.Hc(),startTime:null};this.c.pause();Vd.forEach(function(c){b.video[c]=this.c[c]}.bind(this));this.c.ended||(b.startTime=this.c.currentTime);$d.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.player[d]=c}.bind(this));ae.forEach(function(c){var d=c[1];c=this.b[c[0]]();b.playerAfterLoad[d]=c}.bind(this));return b};n.Wg=function(){this.dispatchEvent(new C("caststatuschanged"))};
n.Xg=function(){this.f.dispatchEvent(new C(this.j.paused?"pause":"play"))};
n.Zg=function(){var b=this;$d.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","getAssetUri")(),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={};Vd.forEach(function(b){h[b]=this.a.get("video",b)}.bind(this));e.then(function(){b.c&&(Vd.forEach(function(b){this.c[b]=h[b]}.bind(b)),ae.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 C("error",{detail:c}))})};n.jh=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.ba()&&0==Object.keys(this.a.a.video).length){var c=this.c[b];if("function"!=typeof c)return c}return this.a.ba()?this.a.get("video",b):(b=this.c[b],"function"==typeof b&&(b=b.bind(this.c)),b)};
n.lh=function(b,c){this.a.ba()?this.a.set("video",b,c):this.c[b]=c};n.kh=function(b){this.a.ba()||this.f.dispatchEvent(new C(b.type,b))};
n.oe=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.j}.bind(this);if("getSharedConfiguration"==b)return this.a.get("player","getConfiguration");if("getNetworkingEngine"==b)return this.b.Jb.bind(this.b);if(this.a.ba()){if("getManifest"==b||"drmInfo"==b)return function(){Wa(b+"() does not work while casting!");return null};if("getManifestUri"==
b)return Pd("getManifestUri",'Please use "getAssetUri" instead.'),this.oe("getAssetUri");if("attach"==b||"detach"==b)return function(){Wa(b+"() does not work while casting!");return Promise.resolve()}}return this.a.ba()&&0==Object.keys(this.a.a.video).length&&Yd[b]||!this.a.ba()?this.b[b].bind(this.b):this.a.get("player",b)};n.Dg=function(b){this.a.ba()||this.g.dispatchEvent(b)};n.Yg=function(b,c){this.a.ba()&&("video"==b?this.f.dispatchEvent(c):"player"==b&&this.g.dispatchEvent(c))};function ne(b,c,d,e){D.call(this);this.a=b;this.b=c;this.c=new Nb;this.w={video:b,player:c};this.A=d||function(){};this.B=e||function(b){return b};this.v=!1;this.j=!0;this.g=0;this.u=!1;this.m=!0;this.o=this.l=this.f=null;oe(this)}Pa(ne,D);y("shaka.cast.CastReceiver",ne);ne.prototype.isConnected=function(){return this.v};ne.prototype.isConnected=ne.prototype.isConnected;ne.prototype.Nf=function(){return this.j};ne.prototype.isIdle=ne.prototype.Nf;
ne.prototype.destroy=function(){var b=this;return r(function d(){var e,f;return v(d,function(d){switch(d.s){case 1:return b.c&&(b.c.R(),b.c=null),e=[],b.b&&(e.push(b.b.destroy()),b.b=null),null!=b.o&&window.clearTimeout(b.o),b.a=null,b.w=null,b.A=null,b.v=!1,b.j=!0,b.f=null,b.l=null,b.o=null,u(d,Promise.all(e),2);case 2:f=cast.receiver.CastReceiverManager.getInstance(),f.stop(),d.s=0}})})};ne.prototype.destroy=ne.prototype.destroy;
function oe(b){var c=cast.receiver.CastReceiverManager.getInstance();c.onSenderConnected=b.je.bind(b);c.onSenderDisconnected=b.je.bind(b);c.onSystemVolumeChanged=b.hf.bind(b);b.l=c.getCastMessageBus("urn:x-cast:com.google.cast.media");b.l.onMessage=b.Zf.bind(b);b.f=c.getCastMessageBus("urn:x-cast:com.google.shaka.v2");b.f.onMessage=b.qg.bind(b);c.start();Td.forEach(function(b){G(this.c,this.a,b,this.qe.bind(this,"video"))}.bind(b));Xd.forEach(function(b){G(this.c,this.b,b,this.qe.bind(this,"player"))}.bind(b));
cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?b.b.gd(3840,2160):b.b.gd(1920,1080);G(b.c,b.a,"loadeddata",function(){this.u=!0}.bind(b));G(b.c,b.b,"loading",function(){this.j=!1;pe(this)}.bind(b));G(b.c,b.a,"playing",function(){this.j=!1;pe(this)}.bind(b));G(b.c,b.a,"pause",function(){pe(this)}.bind(b));G(b.c,b.b,"unloading",function(){this.j=!0;pe(this)}.bind(b));G(b.c,b.a,"ended",function(){window.setTimeout(function(){this.a&&this.a.ended&&
(this.j=!0,pe(this))}.bind(this),5E3)}.bind(b))}n=ne.prototype;n.je=function(){this.g=0;this.m=!0;this.v=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length;pe(this)};function pe(b){Promise.resolve().then(function(){this.b&&(this.dispatchEvent(new C("caststatuschanged")),qe(this)||re(this,0))}.bind(b))}
function se(b,c,d){for(var e in c.player)b.b[e](c.player[e]);b.A(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(),re(b,0))}},function(c){b.b.dispatchEvent(new C("error",{detail:c}))})}n.qe=function(b,c){this.b&&(this.$c(),te(this,{type:"event",targetName:b,event:c},this.f))};
n.$c=function(){null!=this.o&&window.clearTimeout(this.o);this.o=window.setTimeout(this.$c.bind(this),500);var b={video:{},player:{}};Ud.forEach(function(c){b.video[c]=this.a[c]}.bind(this));if(this.b.Z())for(var c in Zd)0==this.g%Zd[c]&&(b.player[c]=this.b[c]());for(var d in Yd)0==this.g%Yd[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.u&&(this.g+=1);te(this,{type:"update",update:b},this.f);qe(this)};
function qe(b){return b.m&&(b.a.duration||b.b.Z())?(ue(b),b.m=!1,!0):!1}function ue(b){var c={contentId:b.b.Hc(),streamType:b.b.Z()?"LIVE":"BUFFERED",duration:b.a.duration,contentType:""};re(b,0,c)}n.hf=function(){var b=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();b&&te(this,{type:"update",update:{video:{volume:b.level,muted:b.muted}}},this.f);te(this,{type:"event",targetName:"video",event:{type:"volumechange"}},this.f)};
n.qg=function(b){var c=ee(b.data);switch(c.type){case "init":this.g=0;this.u=!1;this.m=!0;se(this,c.initState,c.appData);this.$c();break;case "appData":this.A(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.w[d][e]=c;break;case "call":d=this.w[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.u=!1);f=c.id;b=b.senderId;var g=this.w[d];c=g[e].apply(g,c.args);"player"==d&&"load"==e&&(c=c.then(function(){this.m=!0}.bind(this)));c.then(this.Be.bind(this,b,f,null),this.Be.bind(this,b,f))}};
n.Zf=function(b){var c=ee(b.data);switch(c.type){case "PLAY":this.a.play();re(this,0);break;case "PAUSE":this.a.pause();re(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(),re(this,0)):d&&"PLAYBACK_PAUSE"==d&&(this.a.pause(),re(this,0));break;case "STOP":this.b.$b().then(function(){this.b&&re(this,0)}.bind(this));break;case "GET_STATUS":re(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||re(this,0);break;case "LOAD":this.g=0;this.m=this.u=!1;b=c.currentTime;d=this.B(c.media.contentId);this.a.autoplay=!0;this.b.load(d,b).then(function(){this.b&&ue(this)}.bind(this))["catch"](function(b){var d="LOAD_FAILED";7==b.category&&7E3==b.code&&(d="LOAD_CANCELLED");te(this,{requestId:Number(c.requestId),type:d},this.l)}.bind(this));break;default:te(this,{requestId:Number(c.requestId),
type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},this.l)}};n.Be=function(b,c,d){this.b&&te(this,{type:"asyncComplete",id:c,error:d},this.f,b)};function te(b,c,d,e){b.v&&(b=de(c),e?d.getCastChannel(e).send(b):d.broadcast(b))}
function re(b,c,d){var e=b.a.playbackRate;var f=ve;f=b.j?f.IDLE:b.b.Td()?f.Oe:b.a.paused?f.Qe:f.Re;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);te(b,{requestId:c,type:"MEDIA_STATUS",status:[e]},b.l)}var ve={IDLE:"IDLE",Re:"PLAYING",Oe:"BUFFERING",Qe:"PAUSED"};var M={gc:function(b,c){var d=M.X(b,c);return 1!=d.length?null:d[0]},Fd:function(b,c,d){b=M.Gd(b,c,d);return 1!=b.length?null:b[0]},X:function(b,c){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.tagName==c})},Gd:function(b,c,d){return Array.prototype.filter.call(b.childNodes,function(b){return b instanceof Element&&b.localName==d&&b.namespaceURI==c})},getAttributeNS:function(b,c,d){return b.hasAttributeNS(c,d)?b.getAttributeNS(c,d):null},jc:function(b){return Array.prototype.every.call(b.childNodes,
function(b){return b.nodeType==Node.TEXT_NODE||b.nodeType==Node.CDATA_SECTION_NODE})?b.textContent.trim():null},M:function(b,c,d,e){e=void 0===e?null:e;var f=null;b=b.getAttribute(c);null!=b&&(f=d(b));return null==f?e:f},zg:function(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)},Oa:function(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},sc:function(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},parseInt:function(b){b=Number(b);return 0===b%1?b:null},rc:function(b){b=Number(b);return 0===b%1&&0<b?b:null},Eb:function(b){b=Number(b);return 0===
b%1&&0<=b?b:null},parseFloat:function(b){b=Number(b);return isNaN(b)?null:b},gf:function(b){var c;b=(c=b.match(/^(\d+)\/(\d+)$/))?Number(c[1]/c[2]):Number(b);return isNaN(b)?null:b},me:function(b,c){var d=new DOMParser;try{var e=d.parseFromString(b,"text/xml")}catch(g){}if(e&&e.documentElement.tagName==c)var f=e.documentElement;return f&&0<f.getElementsByTagName("parsererror").length?null:f},le:function(b,c){try{var d=bc(b);return M.me(d,c)}catch(e){}}};var we=(new Map).set("urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b","org.w3.clearkey").set("urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed","com.widevine.alpha").set("urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95","com.microsoft.playready").set("urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb","com.adobe.primetime");
function xe(b,c,d){var e=ye(b),f=null;b=[];var g=[],h=new Set(e.map(function(b){return b.keyId}));h["delete"](null);if(1<h.size)throw new A(2,4,4010);d||(g=e.filter(function(b){return"urn:mpeg:dash:mp4protection:2011"==b.we?(f=b.init||f,!1):!0}),g.length&&(b=ze(f,c,g),0==b.length&&(b=[bd("",f)])));if(e.length&&(d||!g.length))for(b=[],c=q(we.values()),d=c.next();!d.done;d=c.next())d=d.value,"org.w3.clearkey"!=d&&b.push(bd(d,f));if(h=Array.from(h)[0]||null)for(c=q(b),d=c.next();!d.done;d=c.next())for(d=
q(d.value.initData),e=d.next();!e.done;e=d.next())e.value.keyId=h;return{xd:h,qh:f,drmInfos:b,Hd:!0}}function Ae(b,c,d,e){var f=xe(b,c,e);if(d.Hd){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.Hd=!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.xd||d.xd}
function Be(b){var c=0,d=(new DataView(b)).getUint32(c,!0);if(d!==b.byteLength)return[];c+=6;d=[];for(var e=new DataView(b);c<b.byteLength-1;){var f=e.getUint16(c,!0);c+=2;var g=e.getUint16(c,!0);c+=2;var h=new Uint8Array(b,c,g);d.push({type:f,value:h});c+=g}return d}function Ce(b){return(b=b.querySelector("DATA > LA_URL"))?b.textContent:""}
function ze(b,c,d){var e=[];d=q(d);for(var f=d.next();!f.done;f=d.next()){f=f.value;var g=we.get(f.we);if(g){var h=bd(g,f.init||b);if(g=De.get(g))h.licenseServerUri=g(f);e.push(h)}else for(f=c(f.node)||[],f=q(f),h=f.next();!h.done;h=f.next())e.push(h.value)}return e}
var De=(new Map).set("com.widevine.alpha",function(b){return(b=M.Fd(b.node,"urn:microsoft","laurl"))?b.getAttribute("licenseUrl")||"":""}).set("com.microsoft.playready",function(b){b=M.Fd(b.node,"urn:microsoft:playready","pro");if(!b)return"";b=ic(b.textContent);b=Be(b.buffer).filter(function(b){return 1===b.type})[0];if(!b)return"";b=dc(b.value,!0);return(b=M.me(b,"WRMHEADER"))?Ce(b):""});function ye(b){var c=[];b=q(b);for(var d=b.next();!d.done;d=b.next())(d=Ee(d.value))&&c.push(d);return c}
function Ee(b){var c=b.getAttribute("schemeIdUri"),d=M.getAttributeNS(b,"urn:mpeg:cenc:2013","default_KID"),e=M.Gd(b,"urn:mpeg:cenc:2013","pssh").map(M.jc);if(!c)return null;c=c.toLowerCase();if(d&&(d=d.replace(/-/g,"").toLowerCase(),d.includes(" ")))throw new A(2,4,4009);var f=[];try{f=e.map(function(b){return{initDataType:"cenc",initData:ic(b),keyId:null}})}catch(g){throw new A(2,4,4007);}return{node:b,we:c,keyId:d,init:0<f.length?f:null}};function Fe(b,c,d,e,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);"Time"==c&&(f=Math.round(f));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 Ge(b,c){var d=He(b,c,"timescale"),e=1;d&&(e=M.rc(d)||1);d=He(b,c,"duration");(d=M.rc(d||""))&&(d/=e);var f=He(b,c,"startNumber"),g=Number(He(b,c,"presentationTimeOffset"))||0,h=M.Eb(f||"");if(null==f||null==h)h=1;var k=Ie(b,c,"SegmentTimeline");f=null;if(k){f=e;var l=b.Y.duration||Infinity;k=M.X(k,"S");for(var m=[],p=0,t=0;t<k.length;++t){var w=k[t],x=M.M(w,"t",M.Eb),F=M.M(w,"d",M.Eb);w=M.M(w,"r",M.parseInt);null!=x&&(x-=g);if(!F)break;x=null!=x?x:p;w=w||0;if(0>w)if(t+1<k.length){w=M.M(k[t+
1],"t",M.Eb);if(null==w)break;else if(x>=w)break;w=Math.ceil((w-x)/F)-1}else{if(Infinity==l)break;else if(x/f>=l)break;w=Math.ceil((l*f-x)/F)-1}0<m.length&&x!=p&&(m[m.length-1].end=x/f);for(var R=0;R<=w;++R)p=x+F,m.push({start:x/f,end:p/f,gh:x}),x=p}f=m}return{timescale:e,ma:d,kb:h,Aa:g/e||0,od:g,U:f}}function He(b,c,d){return[c(b.D),c(b.ra),c(b.ya)].filter($c.Sa).map(function(b){return b.getAttribute(d)}).reduce(function(b,c){return b||c})}
function Ie(b,c,d){return[c(b.D),c(b.ra),c(b.ya)].filter($c.Sa).map(function(b){return M.gc(b,d)}).reduce(function(b,c){return b||c})}
function Je(b,c,d,e,f,g){for(var h=M.getAttributeNS(b,"http://www.w3.org/1999/xlink","href"),k=M.getAttributeNS(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 sb(new A(2,4,4028));if("onLoad"!=k)return sb(new A(2,4,4027));var p=ad([e],[h]);return f.request(0,Jb(p,c)).sa(function(e){e=M.le(e.data,b.tagName);if(!e)return sb(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 Ke(b,c,d,p[0],f,g+1)})}
function Ke(b,c,d,e,f,g){g=void 0===g?0:g;if(M.getAttributeNS(b,"http://www.w3.org/1999/xlink","href")){var h=Je(b,c,d,e,f,g);d&&(h=h.sa(void 0,function(){return Ke(b,c,d,e,f,g)}));return h}h=[];for(var k=0;k<b.childNodes.length;k++){var l=b.childNodes[k];l instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==M.getAttributeNS(l,"http://www.w3.org/1999/xlink","href")?(b.removeChild(l),--k):"SegmentTimeline"!=l.tagName&&h.push(Ke(l,c,d,e,f,g)))}return wb(h).sa(function(){return b})};function Le(b,c,d){this.c=b;this.b=c;this.a=d}y("shaka.media.InitSegmentReference",Le);Le.prototype.Ec=function(){return this.c()};Le.prototype.createUris=Le.prototype.Ec;Le.prototype.Kc=function(){return this.b};Le.prototype.getStartByte=Le.prototype.Kc;Le.prototype.Jc=function(){return this.a};Le.prototype.getEndByte=Le.prototype.Jc;function N(b,c,d,e,f,g){this.position=b;this.startTime=c;this.endTime=d;this.c=e;this.b=f;this.a=g}y("shaka.media.SegmentReference",N);N.prototype.oa=function(){return this.position};
N.prototype.getPosition=N.prototype.oa;N.prototype.Lc=function(){return this.startTime};N.prototype.getStartTime=N.prototype.Lc;N.prototype.uf=function(){return this.endTime};N.prototype.getEndTime=N.prototype.uf;N.prototype.Ec=function(){return this.c()};N.prototype.createUris=N.prototype.Ec;N.prototype.Kc=function(){return this.b};N.prototype.getStartByte=N.prototype.Kc;N.prototype.Jc=function(){return this.a};N.prototype.getEndByte=N.prototype.Jc;function O(b,c){this.N=b;this.b=c==Me;this.a=0}y("shaka.util.DataViewReader",O);var Me=1;O.Endianness={nh:0,oh:Me};O.prototype.Fa=function(){return this.a<this.N.byteLength};O.prototype.hasMoreData=O.prototype.Fa;O.prototype.oa=function(){return this.a};O.prototype.getPosition=O.prototype.oa;O.prototype.vf=function(){return this.N.byteLength};O.prototype.getLength=O.prototype.vf;O.prototype.za=function(){try{var b=this.N.getUint8(this.a);this.a+=1;return b}catch(c){Ne()}};O.prototype.readUint8=O.prototype.za;
O.prototype.Ub=function(){try{var b=this.N.getUint16(this.a,this.b);this.a+=2;return b}catch(c){Ne()}};O.prototype.readUint16=O.prototype.Ub;O.prototype.J=function(){try{var b=this.N.getUint32(this.a,this.b);this.a+=4;return b}catch(c){Ne()}};O.prototype.readUint32=O.prototype.J;O.prototype.re=function(){try{var b=this.N.getInt32(this.a,this.b);this.a+=4;return b}catch(c){Ne()}};O.prototype.readInt32=O.prototype.re;
O.prototype.Gb=function(){try{if(this.b){var b=this.N.getUint32(this.a,!0);var c=this.N.getUint32(this.a+4,!0)}else c=this.N.getUint32(this.a,!1),b=this.N.getUint32(this.a+4,!1)}catch(d){Ne()}if(2097151<c)throw new A(2,3,3001);this.a+=8;return c*Math.pow(2,32)+b};O.prototype.readUint64=O.prototype.Gb;O.prototype.hb=function(b){this.a+b>this.N.byteLength&&Ne();var c=new Uint8Array(this.N.buffer,this.N.byteOffset+this.a,b);this.a+=b;return new Uint8Array(c)};O.prototype.readBytes=O.prototype.hb;
O.prototype.O=function(b){this.a+b>this.N.byteLength&&Ne();this.a+=b};O.prototype.skip=O.prototype.O;O.prototype.ve=function(b){this.a<b&&Ne();this.a-=b};O.prototype.rewind=O.prototype.ve;O.prototype.seek=function(b){(0>b||b>this.N.byteLength)&&Ne();this.a=b};O.prototype.seek=O.prototype.seek;O.prototype.ad=function(){for(var b=this.a;this.Fa()&&0!=this.N.getUint8(this.a);)this.a+=1;b=new Uint8Array(this.N.buffer,this.N.byteOffset+b,this.a-b);this.a+=1;return bc(b)};
O.prototype.readTerminatedString=O.prototype.ad;function Ne(){throw new A(2,3,3E3);};function P(){this.c=[];this.b=[];this.a=!1}y("shaka.util.Mp4Parser",P);P.prototype.L=function(b,c){var d=Oe(b);this.c[d]=0;this.b[d]=c;return this};P.prototype.box=P.prototype.L;P.prototype.va=function(b,c){var d=Oe(b);this.c[d]=1;this.b[d]=c;return this};P.prototype.fullBox=P.prototype.va;P.prototype.stop=function(){this.a=!0};P.prototype.stop=P.prototype.stop;
P.prototype.parse=function(b,c){var d=new Uint8Array(b);d=new O(new DataView(d.buffer,d.byteOffset,d.byteLength),0);for(this.a=!1;d.Fa()&&!this.a;)this.qc(0,d,c)};P.prototype.parse=P.prototype.parse;
P.prototype.qc=function(b,c,d){var e=c.oa(),f=c.J(),g=c.J();switch(f){case 0:f=c.N.byteLength-e;break;case 1:f=c.Gb()}var h=this.b[g];if(h){var k=null,l=null;1==this.c[g]&&(l=c.J(),k=l>>>24,l&=16777215);g=e+f;d&&g>c.N.byteLength&&(g=c.N.byteLength);g-=c.oa();c=0<g?c.hb(g):new Uint8Array(0);c=new O(new DataView(c.buffer,c.byteOffset,c.byteLength),0);h({parser:this,partialOkay:d||!1,version:k,flags:l,reader:c,size:f,start:e+b})}else c.O(Math.min(e+f-c.oa(),c.N.byteLength-c.oa()))};
P.prototype.parseNext=P.prototype.qc;function Pe(b){for(;b.reader.Fa()&&!b.parser.a;)b.parser.qc(b.start,b.reader,b.partialOkay)}P.children=Pe;function Qe(b){for(var c=b.reader.J();0<c&&!b.parser.a;--c)b.parser.qc(b.start,b.reader,b.partialOkay)}P.sampleDescription=Qe;function Re(b){return function(c){b(c.reader.hb(c.reader.N.byteLength-c.reader.oa()))}}P.allData=Re;function Oe(b){for(var c=0,d=0;d<b.length;d++)c=c<<8|b.charCodeAt(d);return c}
function Se(b){return String.fromCharCode(b>>24&255,b>>16&255,b>>8&255,b&255)}P.typeToString=Se;function Te(b,c,d,e){var f,g=(new P).va("sidx",function(b){f=Ue(c,e,d,b)});b&&g.parse(b);if(f)return f;throw new A(2,3,3004);}
function Ue(b,c,d,e){var f=[];e.reader.O(4);var g=e.reader.J();if(0==g)throw new A(2,3,3005);if(0==e.version){var h=e.reader.J();var k=e.reader.J()}else h=e.reader.Gb(),k=e.reader.Gb();e.reader.O(2);var l=e.reader.Ub();b=b+e.size+k;for(k=0;k<l;k++){var m=e.reader.J(),p=(m&2147483648)>>>31;m&=2147483647;var t=e.reader.J();e.reader.O(4);if(1==p)throw new A(2,3,3006);f.push(new N(f.length,h/g-c,(h+t)/g-c,function(){return d},b,b+m-1));h+=t;b+=m}e.parser.stop();return f};function Q(b){this.a=b}y("shaka.media.SegmentIndex",Q);Q.prototype.destroy=function(){this.a=null;return Promise.resolve()};Q.prototype.destroy=Q.prototype.destroy;Q.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};Q.prototype.find=Q.prototype.find;
Q.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]};Q.prototype.get=Q.prototype.get;Q.prototype.offset=function(b){for(var c=0;c<this.a.length;++c)this.a[c].startTime+=b,this.a[c].endTime+=b};Q.prototype.offset=Q.prototype.offset;
Q.prototype.Rc=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 N(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 N(d++,f.startTime,f.endTime,f.c,f.b,f.a),c.push(f);else c=b;this.a=c};Q.prototype.merge=Q.prototype.Rc;
Q.prototype.Fc=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=[]};Q.prototype.evict=Q.prototype.Fc;function Ve(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[b.a.length-1];b.a[b.a.length-1]=new N(d.position,d.startTime,c,d.c,d.b,d.a)}};function We(b){this.b=b;this.a=new O(b,0);Xe||(Xe=[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 Xe;We.prototype.Fa=function(){return this.a.Fa()};
function Ye(b){var c=Ze(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=Ze(b);a:{for(e=0;e<Xe.length;e++)if(lc(d,Xe[e])){e=!0;break a}e=!1}if(e)d=b.b.byteLength-b.a.oa();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.oa()+d<=b.b.byteLength?d:b.b.byteLength-b.a.oa();e=new DataView(b.b.buffer,b.b.byteOffset+b.a.oa(),d);b.a.O(d);return new $e(c,e)}
function Ze(b){var c=b.a.za(),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.za();return e}function $e(b,c){this.id=b;this.a=c}function af(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 bf(){}
bf.prototype.parse=function(b,c,d,e){var f;c=new We(new DataView(c));if(440786851!=Ye(c).id)throw new A(2,3,3008);var g=Ye(c);if(408125543!=g.id)throw new A(2,3,3009);c=g.a.byteOffset;g=new We(g.a);for(f=null;g.Fa();){var h=Ye(g);if(357149030==h.id){f=h;break}}if(!f)throw new A(2,3,3010);g=new We(f.a);f=1E6;for(h=null;g.Fa();){var k=Ye(g);if(2807729==k.id)f=af(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=Ye(new We(new DataView(b)));if(475249515!=b.id)throw new A(2,3,3007);return cf(b,c,g,f,d,e)};function cf(b,c,d,e,f,g){function h(){return f}var k=[];b=new We(b.a);for(var l=null,m=null;b.Fa();){var p=Ye(b);if(187==p.id){var t=df(p);t&&(p=d*t.hh,t=c+t.Ig,null!=l&&k.push(new N(k.length,l-g,p-g,h,m,t-1)),l=p,m=t)}}null!=l&&k.push(new N(k.length,l-g,e-g,h,m,null));return k}
function df(b){var c=new We(b.a);b=Ye(c);if(179!=b.id)throw new A(2,3,3013);b=af(b);c=Ye(c);if(183!=c.id)throw new A(2,3,3012);c=new We(c.a);for(var d=0;c.Fa();){var e=Ye(c);if(241==e.id){d=af(e);break}}return{hh:b,Ig:d}};function ef(b,c){var d=Ie(b,c,"Initialization");if(!d)return null;var e=b.D.Ba,f=d.getAttribute("sourceURL");f&&(e=ad(b.D.Ba,[f]));f=0;var g=null;if(d=M.M(d,"range",M.sc))f=d.start,g=d.end;return new Le(function(){return e},f,g)}
function ff(b,c){var d=Number(He(b,gf,"presentationTimeOffset"))||0,e=He(b,gf,"timescale"),f=1;e&&(f=M.rc(e)||1);d=d/f||0;e=ef(b,gf);var g=b.D.contentType;f=b.D.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=Ie(b,gf,"RepresentationIndex");var h=He(b,gf,"indexRange"),k=b.D.Ba;h=M.sc(h||"");if(g){var l=g.getAttribute("sourceURL");l&&(k=ad(b.D.Ba,[l]));h=M.M(g,"range",M.sc,h)}if(!h)throw new A(2,4,4002);f=hf(b,c,e,k,h.start,h.end,
f,d);return{createSegmentIndex:f.createSegmentIndex,findSegmentPosition:f.findSegmentPosition,getSegmentReference:f.getSegmentReference,initSegmentReference:e,Aa:d}}
function hf(b,c,d,e,f,g,h,k){var l=b.presentationTimeline,m=!b.ub||!b.Y.Nc,p=b.Y.start,t=b.Y.duration,w=c,x=null;return{createSegmentIndex:function(){var b=[w(e,f,g),"webm"==h?w(d.c(),d.b,d.a):null];w=null;return Promise.all(b).then(function(b){var c=b[0];b=b[1]||null;c="mp4"==h?Te(c,f,e,k):(new bf).parse(c,b,e,k);l.Cb(c,p);x=new Q(c);m&&Ve(x,t)})},findSegmentPosition:function(b){return x.find(b)},getSegmentReference:function(b){return x.get(b)}}}function gf(b){return b.Vb};function jf(b,c){var d=ef(b,kf);var e=lf(b);var f=Ge(b,kf),g=f.kb;0==g&&(g=1);var h=0;f.ma?h=f.ma*(g-1):f.U&&0<f.U.length&&(h=f.U[0].start);e={ma:f.ma,startTime:h,kb:g,Aa:f.Aa,U:f.U,Bb:e};if(!e.ma&&!e.U&&1<e.Bb.length)throw new A(2,4,4002);if(!e.ma&&!b.Y.duration&&!e.U&&1==e.Bb.length)throw new A(2,4,4002);if(e.U&&0==e.U.length)throw new A(2,4,4002);g=f=null;b.ya.id&&b.D.id&&(g=b.ya.id+","+b.D.id,f=c[g]);h=mf(b.Y.duration,e.kb,b.D.Ba,e);f?(f.Rc(h),g=b.presentationTimeline.Lb(),f.Fc(g-b.Y.start)):
(b.presentationTimeline.Cb(h,b.Y.start),f=new Q(h),g&&b.ub&&(c[g]=f));b.ub&&b.Y.Nc||Ve(f,b.Y.duration);return{createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:f.find.bind(f),getSegmentReference:f.get.bind(f),initSegmentReference:d,Aa:e.Aa}}function kf(b){return b.Va}
function mf(b,c,d,e){var f=e.Bb.length;e.U&&e.U.length!=e.Bb.length&&(f=Math.min(e.U.length,e.Bb.length));for(var g=[],h=e.startTime,k=0;k<f;k++){var l=e.Bb[k],m=ad(d,[l.Sf]),p=void 0;p=null!=e.ma?h+e.ma:e.U?e.U[k].end:h+b;g.push(new N(k+c,h,p,function(b){return b}.bind(null,m),l.start,l.end));h=p}return g}
function lf(b){return[b.D.Va,b.ra.Va,b.ya.Va].filter($c.Sa).map(function(b){return M.X(b,"SegmentURL")}).reduce(function(b,d){return 0<b.length?b:d}).map(function(c){c.getAttribute("indexRange")&&!b.Sd&&(b.Sd=!0);var d=c.getAttribute("media");c=M.M(c,"mediaRange",M.sc,{start:0,end:null});return{Sf:d,start:c.start,end:c.end}})};function nf(b,c,d,e){var f=of(b);var g=Ge(b,pf);var h=He(b,pf,"media"),k=He(b,pf,"index");g={ma:g.ma,timescale:g.timescale,kb:g.kb,Aa:g.Aa,od:g.od,U:g.U,Pc:h,Ob:k};h=g.Ob?1:0;h+=g.U?1:0;h+=g.ma?1:0;if(0==h)throw new A(2,4,4002);1!=h&&(g.Ob&&(g.U=null),g.ma=null);if(!g.Ob&&!g.Pc)throw new A(2,4,4002);if(g.Ob){d=b.D.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=Fe(g.Ob,b.D.id,null,b.bandwidth||null,null);e=ad(b.D.Ba,[e]);b=hf(b,c,f,e,0,
null,d,g.Aa)}else g.ma?(e||(b.presentationTimeline.Tc(g.ma),b.presentationTimeline.Uc(b.Y.start)),b=qf(b,g)):(h=c=null,b.ya.id&&b.D.id&&(h=b.ya.id+","+b.D.id,c=d[h]),k=rf(b,g),e=!b.ub||!b.Y.Nc,c?(e&&Ve(new Q(k),b.Y.duration),c.Rc(k),d=b.presentationTimeline.Lb(),c.Fc(d-b.Y.start)):(b.presentationTimeline.Cb(k,b.Y.start),c=new Q(k),h&&b.ub&&(d[h]=c)),e&&Ve(c,b.Y.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,Aa:g.Aa}}function pf(b){return b.Xb}
function qf(b,c){var d=b.Y.duration,e=c.ma,f=c.kb,g=c.timescale,h=c.Pc,k=b.bandwidth||null,l=b.D.id,m=b.D.Ba;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,p=c+e;d&&(p=Math.min(p,d));return 0>p||d&&c>=d?null:new N(b,c,p,function(){var d=Fe(h,l,b+f,k,c*g);return ad(m,[d])},0,null)}}}
function rf(b,c){for(var d=[],e=0;e<c.U.length;e++){var f=e+c.kb;d.push(new N(f,c.U[e].start,c.U[e].end,function(b,c,d,e,f,p){b=Fe(b,c,f,d,p);return ad(e,[b]).map(function(b){return b.toString()})}.bind(null,c.Pc,b.D.id,b.bandwidth||null,b.D.Ba,f,c.U[e].gh+c.od),0,null))}return d}function of(b){var c=He(b,pf,"initialization");if(!c)return null;var d=b.D.id,e=b.bandwidth||null,f=b.D.Ba;return new Le(function(){var b=Fe(c,d,null,e,null);return ad(f,[b])},0,null)};var sf={},tf={};y("shaka.media.ManifestParser.registerParserByExtension",function(b,c){tf[b]=c});y("shaka.media.ManifestParser.registerParserByMime",function(b,c){sf[b]=c});function uf(){var b={},c;for(c in sf)b[c]=!0;for(var d in tf)b[d]=!0;["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"].forEach(function(c){b[c]=!!sf[c]});["mpd","m3u8","ism"].forEach(function(c){b[c]=!!tf[c]});return b}
function vf(b,c,d,e){return r(function g(){var h,k;return v(g,function(g){switch(g.s){case 1:return za(g,2),u(g,wf(b,c,d,e),4);case 4:return h=g.C,g["return"](new h);case 2:throw k=Ca(g),k.severity=2,k;}})})}
function wf(b,c,d,e){return r(function g(){var h,k,l,m,p,t,w,x,F,R;return v(g,function(g){switch(g.s){case 1:if(e&&(h=e.toLowerCase(),k=sf[h]))return g["return"](k);l=new Za(b);m=l.xa.split("/");p=m.pop();t=p.split(".");return 1<t.length&&(w=t.pop().toLowerCase(),x=tf[w])?g["return"](x):u(g,xf(b,c,d),2);case 2:F=g.C;if(R=sf[F])return g["return"](R);throw new A(2,4,4E3,b);}})})}
function xf(b,c,d){return r(function f(){var g,h,k;return v(f,function(f){switch(f.s){case 1:return g=Jb([b],d),g.method="HEAD",u(f,c.request(0,g).promise,2);case 2:return h=f.C,k=h.headers["content-type"],f["return"](k?k.toLowerCase():"")}})})};function S(b,c,d){this.f=b;this.tc=c;this.j=this.g=Infinity;this.a=1;this.b=this.c=null;this.m=0;this.o=!0;this.l=0;this.u=void 0===d?!0:d}y("shaka.media.PresentationTimeline",S);S.prototype.ka=function(){return this.g};S.prototype.getDuration=S.prototype.ka;S.prototype.Ia=function(b){this.g=b};S.prototype.setDuration=S.prototype.Ia;S.prototype.Df=function(){return this.f};S.prototype.getPresentationStartTime=S.prototype.Df;S.prototype.Ce=function(b){this.m=b};S.prototype.setClockOffset=S.prototype.Ce;
S.prototype.Yb=function(b){this.o=b};S.prototype.setStatic=S.prototype.Yb;S.prototype.hd=function(b){this.j=b};S.prototype.setSegmentAvailabilityDuration=S.prototype.hd;S.prototype.Sg=function(b){this.tc=b};S.prototype.setDelay=S.prototype.Sg;S.prototype.tf=function(){return this.tc};S.prototype.getDelay=S.prototype.tf;
S.prototype.Cb=function(b,c){if(0!=b.length){var d=b[b.length-1].endTime+c;this.Uc(b[0].startTime+c);this.a=b.reduce(function(b,c){return Math.max(b,c.endTime-c.startTime)},this.a);this.b=Math.max(this.b,d);null!=this.f&&this.u&&(this.f=(Date.now()+this.m)/1E3-this.b-this.a)}};S.prototype.notifySegments=S.prototype.Cb;S.prototype.Uc=function(b){this.c=null==this.c?b:Math.min(this.c,b)};S.prototype.notifyMinSegmentStartTime=S.prototype.Uc;S.prototype.Tc=function(b){this.a=Math.max(this.a,b)};
S.prototype.notifyMaxSegmentDuration=S.prototype.Tc;S.prototype.offset=function(b){null!=this.c&&(this.c+=b);null!=this.b&&(this.b+=b)};S.prototype.offset=S.prototype.offset;S.prototype.Z=function(){return Infinity==this.g&&!this.o};S.prototype.isLive=S.prototype.Z;S.prototype.fb=function(){return Infinity!=this.g&&!this.o};S.prototype.isInProgress=S.prototype.fb;S.prototype.Lb=function(){if(Infinity==this.j)return this.l;var b=this.xb()-this.j;return Math.max(this.l,b)};
S.prototype.getSegmentAvailabilityStart=S.prototype.Lb;S.prototype.Fe=function(b){this.l=b};S.prototype.setUserSeekStart=S.prototype.Fe;S.prototype.xb=function(){return this.Z()||this.fb()?Math.min(Math.max(0,(Date.now()+this.m)/1E3-this.a-this.f),this.g):this.g};S.prototype.getSegmentAvailabilityEnd=S.prototype.xb;S.prototype.Kb=function(b){var c=Math.max(this.c,this.l);if(Infinity==this.j)return c;var d=this.xb()-this.j;b=Math.min(d+b,this.Ma());return Math.max(c,b)};
S.prototype.getSafeSeekRangeStart=S.prototype.Kb;S.prototype.wb=function(){return this.Kb(0)};S.prototype.getSeekRangeStart=S.prototype.wb;S.prototype.Ma=function(){var b=this.Z()||this.fb()?this.tc:0;return Math.max(0,this.xb()-b)};S.prototype.getSeekRangeEnd=S.prototype.Ma;S.prototype.Ke=function(){return null==this.f||null!=this.b?!1:!0};S.prototype.usingPresentationStartTime=S.prototype.Ke;function yf(){this.b=this.a=null;this.j=[];this.c=null;this.m=[];this.l=1;this.o={};this.u=0;this.v=new Qa(5);this.g=null;this.f=new Eb}y("shaka.dash.DashParser",yf);n=yf.prototype;n.configure=function(b){this.a=b};n.start=function(b,c){this.j=[b];this.b=c;return zf(this).then(function(b){this.b&&Af(this,b);return this.c}.bind(this))};n.stop=function(){this.a=this.b=null;this.j=[];this.c=null;this.m=[];this.o={};null!=this.g&&(window.clearTimeout(this.g),this.g=null);return this.f.destroy()};
n.update=function(){zf(this)["catch"](function(b){if(this.b)this.b.onError(b)}.bind(this))};n.onExpirationUpdated=function(){};function zf(b){var c=Date.now(),d=b.b.networkingEngine.request(0,Jb(b.j,b.a.retryParameters));Gb(b.f,d);return d.promise.then(function(c){if(b.b)return Bf(b,c.data,c.uri)}).then(function(){var d=(Date.now()-c)/1E3;Sa(b.v,1,d);return d})}
function Bf(b,c,d){c=M.le(c,"MPD");if(!c)throw new A(2,4,4001,d);c=Ke(c,b.a.retryParameters,b.a.dash.xlinkFailGracefully,d,b.b.networkingEngine);Gb(b.f,c);return c.promise.then(function(c){return Cf(b,c,d)})}
function Cf(b,c,d){return r(function f(){var g,h,k,l,m,p,t,w,x,F,R,ca,da,ma,ra,Ra,fb,sa,ch,dd,dh,eh,fh,rl,gh,hh;return v(f,function(f){switch(f.s){case 1:l=$c;m=M;p=[d];t=m.X(c,"Location").map(m.jc).filter(l.Sa);0<t.length&&(w=ad(p,t),p=b.j=w);x=m.X(c,"BaseURL").map(m.jc);F=ad(p,x);(R=b.a.dash.ignoreMinBufferTime)||(ca=m.M(c,"minBufferTime",m.Oa));b.u=m.M(c,"minimumUpdatePeriod",m.Oa,-1);da=m.M(c,"availabilityStartTime",m.zg);ma=m.M(c,"timeShiftBufferDepth",m.Oa);ra=m.M(c,"suggestedPresentationDelay",
m.Oa);Ra=m.M(c,"maxSegmentDuration",m.Oa);fb=c.getAttribute("type")||"static";b.c?sa=b.c.presentationTimeline:(ch=Math.max(b.a.dash.defaultPresentationDelay,1.5*ca),dd=null!=ra?ra:ch,sa=new S(da,dd,b.a.dash.autoCorrectDrift));dh={ub:"static"!=fb,presentationTimeline:sa,ya:null,Y:null,ra:null,D:null,bandwidth:0,Sd:!1};for(var ih=dh,sl=F,ed=M.M(c,"mediaPresentationDuration",M.Oa),fd=[],gb=0,hc=M.X(c,"Period"),Fb=0;Fb<hc.length;Fb++){var rb=hc[Fb];gb=M.M(rb,"start",M.Oa,gb);var gd=M.M(rb,"duration",
M.Oa),hb=null;if(Fb!=hc.length-1){var jh=M.M(hc[Fb+1],"start",M.Oa);null!=jh&&(hb=jh-gb)}else null!=ed&&(hb=ed-gb);null==hb&&(hb=gd);rb=Df(b,ih,sl,{start:gb,duration:hb,node:rb,Nc:null==hb||Fb==hc.length-1});fd.push(rb);gd=ih.ya.id;b.m.includes(gd)||(b.m.push(gd),b.c&&(b.b.filterNewPeriod(rb),b.c.periods.push(rb)));if(null==hb){gb=null;break}gb+=hb}null==b.c&&b.b.filterAllPeriods(fd);null!=ed?(g=fd,h=ed,k=!1):(g=fd,h=gb,k=!0);eh=h;fh=g;sa.Yb("static"==fb);"static"!=fb&&k||sa.Ia(eh||Infinity);(rl=
sa.Z())&&!isNaN(b.a.availabilityWindowOverride)&&(ma=b.a.availabilityWindowOverride);null==ma&&(ma=Infinity);sa.hd(ma);sa.Tc(Ra||1);if(b.c){f.I(0);break}b.c={presentationTimeline:sa,periods:fh,offlineSessionIds:[],minBufferTime:ca||0};if(!sa.Ke()){f.I(0);break}gh=m.X(c,"UTCTiming");return u(f,Ef(b,F,gh),4);case 4:hh=f.C;if(!b.b)return f["return"]();sa.Ce(hh);f.s=0}})})}
function Df(b,c,d,e){c.ya=Ff(e.node,null,d);c.Y=e;c.ya.id||(c.ya.id="__shaka_period_"+e.start);M.X(e.node,"EventStream").forEach(b.Bg.bind(b,e.start,e.duration));d=M.X(e.node,"AdaptationSet").map(b.yg.bind(b,c)).filter($c.Sa);if(c.ub){c=[];for(var f=q(d),g=f.next();!g.done;g=f.next()){g=q(g.value.Lg);for(var h=g.next();!h.done;h=g.next())c.push(h.value)}if(c.length!=(new Set(c)).size)throw new A(2,4,4018);}var k=d.filter(function(b){return!b.md});d.filter(function(b){return b.md}).forEach(function(b){var c=
b.streams[0],d=b.md;k.forEach(function(b){b.id==d&&b.streams.forEach(function(b){b.trickModeVideo=c})})});c=Gf(k,"video");f=Gf(k,"audio");if(!c.length&&!f.length)throw new A(2,4,4004);f.length||(f=[null]);c.length||(c=[null]);d=[];for(g=0;g<f.length;g++)for(h=0;h<c.length;h++)Hf(b,f[g],c[h],d);b=Gf(k,"text");c=[];for(f=0;f<b.length;f++)c.push.apply(c,b[f].streams);return{startTime:e.start,textStreams:c,variants:d}}function Gf(b,c){return b.filter(function(b){return b.contentType==c})}
function Hf(b,c,d,e){if(c||d)if(c&&d){var f=c.drmInfos;var g=d.drmInfos;if(f.length&&g.length?0<Sc(f,g).length:1){g=Sc(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.l++,language:c.language,primary:c.Oc||d.Oc,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.l++,language:g.language||"und",primary:g.Oc,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.yg=function(b,c){b.ra=Ff(c,b.ya,null);var d=!1,e=M.X(c,"Role"),f=e.map(function(b){return b.getAttribute("value")}).filter($c.Sa),g=void 0,h="text"==b.ra.contentType;h&&(g="subtitle");for(var k=0;k<e.length;k++){var l=e[k].getAttribute("schemeIdUri");if(null==l||"urn:mpeg:dash:role:2011"==l)switch(l=e[k].getAttribute("value"),l){case "main":d=!0;break;case "caption":case "subtitle":g=l}}var m=null,p=!1;M.X(c,"EssentialProperty").forEach(function(b){"http://dashif.org/guidelines/trickmode"==b.getAttribute("schemeIdUri")?
m=b.getAttribute("value"):p=!0});k=M.X(c,"Accessibility");var t=new Map;e={};k=q(k);for(l=k.next();!l.done;e={Ib:e.Ib},l=k.next()){l=l.value;var w=l.getAttribute("schemeIdUri");if("urn:scte:dash:cc:cea-608:2015"==w||"urn:scte:dash:cc:cea-708:2015"==w)e.Ib=1,l=l.getAttribute("value"),null!=l?l.split(";").forEach(function(b){return function(c){if(c.includes("=")){c=c.split("=");var d=c[0].startsWith("CC")?c[0]:"CC"+c[0];c=c[1].split(",")[0].split(":").pop()}else d="CC"+b.Ib,b.Ib+=2;t.set(d,I(c))}}(e)):
t.set("CC1","und")}if(p)return null;e=M.X(c,"ContentProtection");var x=xe(e,this.a.dash.customScheme,this.a.dash.ignoreDrmInfo);e=I(c.getAttribute("lang")||"und");l=c.getAttribute("label");k=M.X(c,"Representation");f=k.map(this.Cg.bind(this,b,x,g,e,l,d,f,t)).filter(function(b){return!!b});if(0==f.length){if(h)return null;throw new A(2,4,4003);}b.ra.contentType&&"application"!=b.ra.contentType||(b.ra.contentType=If(f[0].mimeType,f[0].codecs),f.forEach(function(c){c.type=b.ra.contentType}));f.forEach(function(b){x.drmInfos.forEach(function(c){b.keyId&&
c.keyIds.push(b.keyId)})});h=k.map(function(b){return b.getAttribute("id")}).filter($c.Sa);return{id:b.ra.id||"__fake__"+this.l++,contentType:b.ra.contentType,language:e,Oc:d,streams:f,drmInfos:x.drmInfos,md:m,Lg:h}};
n.Cg=function(b,c,d,e,f,g,h,k,l){b.D=Ff(l,b.ra,null);if(!Jf(b.D))return null;b.bandwidth=M.M(l,"bandwidth",M.rc)||0;var m=b.D.contentType;m="text"==m||"application"==m;try{var p=this.Mg.bind(this);if(b.D.Vb)var t=ff(b,p);else if(b.D.Va)t=jf(b,this.o);else if(b.D.Xb)t=nf(b,p,this.o,!!this.c);else{var w=b.D.Ba,x=b.Y.duration||0;t={createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(b){return 0<=b&&b<x?1:null},getSegmentReference:function(b){return 1!=b?null:new N(1,0,x,function(){return w},
0,null)},initSegmentReference:null,Aa:0}}}catch(F){if(m&&4002==F.code)return null;throw F;}l=M.X(l,"ContentProtection");l=Ae(l,this.a.dash.customScheme,c,this.a.dash.ignoreDrmInfo);return{id:this.l++,originalId:b.D.id,createSegmentIndex:t.createSegmentIndex,findSegmentPosition:t.findSegmentPosition,getSegmentReference:t.getSegmentReference,initSegmentReference:t.initSegmentReference,presentationTimeOffset:t.Aa,mimeType:b.D.mimeType,codecs:b.D.codecs,frameRate:b.D.frameRate,bandwidth:b.bandwidth,width:b.D.width,
height:b.D.height,kind:d,encrypted:0<c.drmInfos.length,keyId:l,language:e,label:f,type:b.ra.contentType,primary:g,trickModeVideo:null,emsgSchemeIdUris:b.D.emsgSchemeIdUris,roles:h,channelsCount:b.D.Vc,closedCaptions:k}};n.$g=function(){this.g=null;zf(this).then(function(b){this.b&&Af(this,b)}.bind(this))["catch"](function(b){this.b&&(b.severity=1,this.b.onError(b),Af(this,0))}.bind(this))};function Af(b,c){0>b.u||(b.g=window.setTimeout(b.$g.bind(b),1E3*Math.max(3,b.u-c,Ta(b.v))))}
function Ff(b,c,d){c=c||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,Vc:null};d=d||c.Ba;var e=M.Eb,f=M.gf,g=M.X(b,"BaseURL").map(M.jc),h=b.getAttribute("contentType")||c.contentType,k=b.getAttribute("mimeType")||c.mimeType,l=b.getAttribute("codecs")||c.codecs;f=M.M(b,"frameRate",f)||c.frameRate;var m=M.X(b,"InbandEventStream"),p=c.emsgSchemeIdUris.slice();m=q(m);for(var t=m.next();!t.done;t=m.next())t=t.value.getAttribute("schemeIdUri"),p.includes(t)||p.push(t);m=M.X(b,
"AudioChannelConfiguration");m=Kf(m)||c.Vc;h||(h=If(k,l));return{Ba:ad(d,g),Vb:M.gc(b,"SegmentBase")||c.Vb,Va:M.gc(b,"SegmentList")||c.Va,Xb:M.gc(b,"SegmentTemplate")||c.Xb,width:M.M(b,"width",e)||c.width,height:M.M(b,"height",e)||c.height,contentType:h,mimeType:k,codecs:l,frameRate:f,emsgSchemeIdUris:p,id:b.getAttribute("id"),Vc:m}}
function Kf(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 Jf(b){var c=b.Vb?1:0;c+=b.Va?1:0;c+=b.Xb?1:0;if(0==c)return"text"==b.contentType||"application"==b.contentType?!0:!1;1!=c&&(b.Vb&&(b.Va=null),b.Xb=null);return!0}
function Lf(b,c,d,e){c=ad(c,[d]);c=Jb(c,b.a.retryParameters);c.method=e;c=b.b.networkingEngine.request(4,c);Gb(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=bc(b.data);b=Date.parse(b);return isNaN(b)?0:b-Date.now()})}
function Ef(b,c,d){d=d.map(function(b){return{scheme:b.getAttribute("schemeIdUri"),value:b.getAttribute("value")}});var e=b.a.dash.clockSyncUri;!d.length&&e&&d.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:e});return $c.df(d,function(b){var d=b.scheme;b=b.value;switch(d){case "urn:mpeg:dash:utc:http-head:2014":case "urn:mpeg:dash:utc:http-head:2012":return Lf(this,c,b,"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 Lf(this,
c,b,"GET");case "urn:mpeg:dash:utc:direct:2014":case "urn:mpeg:dash:utc:direct:2012":return d=Date.parse(b),isNaN(d)?0:d-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 Wa("NTP UTCTiming scheme is not supported"),Promise.reject();default:return Wa("Unrecognized scheme in UTCTiming element",d),Promise.reject()}}.bind(b))["catch"](function(){Wa("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!");
return 0})}n.Bg=function(b,c,d){var e=M.Eb,f=d.getAttribute("schemeIdUri")||"",g=d.getAttribute("value")||"",h=M.M(d,"timescale",e)||1;M.X(d,"Event").forEach(function(d){var k=M.M(d,"presentationTime",e)||0,m=M.M(d,"duration",e)||0;k=k/h+b;m=k+m/h;null!=c&&(k=Math.min(k,b+c),m=Math.min(m,b+c));d={schemeIdUri:f,value:g,startTime:k,endTime:m,id:d.getAttribute("id")||"",eventElement:d};this.b.onTimelineRegionAdded(d)}.bind(this))};
n.Mg=function(b,c,d){b=Jb(b,this.a.retryParameters);null!=c&&(b.headers.Range="bytes="+c+"-"+(null!=d?d:""));c=this.b.networkingEngine.request(1,b);Gb(this.f,c);return c.promise.then(function(b){return b.data})};function If(b,c){return od(Xb(b,c))?"text":b.split("/")[0]}tf.mpd=yf;sf["application/dash+xml"]=yf;function Mf(b,c,d,e){this.b=b;this.type=c;this.a=d;this.segments=e||null}function Nf(b,c,d,e){this.id=b;this.name=c;this.a=d;this.value=void 0===e?null:e}Nf.prototype.toString=function(){function b(b){return b.name+"="+(isNaN(Number(b.value))?'"'+b.value+'"':b.value)}var c="#"+this.name,d=this.a?this.a.map(b):[];this.value&&d.unshift(this.value);0<d.length&&(c+=":"+d.join(","));return c};function Of(b,c){this.name=b;this.value=c}
Nf.prototype.getAttribute=function(b){var c=this.a.filter(function(c){return c.name==b});return c.length?c[0]:null};function Pf(b,c,d){return(b=b.getAttribute(c))?b.value:d||null}function Qf(b,c){this.b=c;this.a=b};function Rf(b,c){return b.filter(function(b){return b.name==c})}function Sf(b,c){var d=Rf(b,c);return d.length?d[0]:null}function Tf(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 Uf(b){this.b=b;this.a=0}function Vf(b){Wf(b,/[ \t]+/gm)}function Wf(b,c){c.lastIndex=b.a;var d=c.exec(b.b);d=null==d?null:{position:d.index,length:d[0].length,Pg:d};if(b.a==b.b.length||null==d||d.position!=b.a)return null;b.a+=d.length;return d.Pg}function Xf(b){return b.a==b.b.length?null:(b=Wf(b,/[^ \t\n]*/gm))?b[0]:null};function Yf(){this.a=0}
function Zf(b,c,d){c=bc(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=$f(b,e[f]);--b.a;if(ag.includes(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=$f(b,e[g]);if(bg.includes(h.name)){if(1!=c)throw new A(2,4,4017);e=e.splice(g,e.length-g);b=cg(b,d,e,f);return new Mf(d,
c,f,b)}f.push(h);g+=1;"EXT-X-STREAM-INF"==h.name&&(h.a.push(new Of("URI",e[g])),g+=1)}return new Mf(d,c,f)}function cg(b,c,d,e){var f=[],g=[];d.forEach(function(d){if(/^(#EXT)/.test(d))d=$f(b,d),ag.includes(d.name)?e.push(d):g.push(d);else{if(/^#(?!EXT)/m.test(d))return[];d=ad([c],[d.trim()])[0];f.push(new Qf(d,g));g=[]}});return f}
function $f(b,c){var d=b.a++,e=c.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!e)throw new A(2,4,4016,c);var f=e[1],g=e[2];e=[];var h;if(g){g=new Uf(g);var k;(k=Wf(g,/^([^,=]+)(?:,|$)/g))&&(h=k[1]);for(var l=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;k=Wf(g,l);)e.push(new Of(k[1],k[2]||k[3]))}return new Nf(d,f,e,h)}var ag="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(" "),bg="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE".split(" ");function dg(b){try{var c=dg.parse(b);return ub({uri:b,data:c.data,headers:{"content-type":c.contentType}})}catch(d){return sb(d)}}y("shaka.net.DataUriPlugin",dg);
dg.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=ic(c).buffer;else{if(e)throw new A(2,1,1005,b);b=fc(c)}return{data:b,contentType:d[0]}};Ib("data",dg);function eg(){var b=this;this.g=this.c=null;this.K=1;this.B=new Map;this.H=new Set;this.a=new Map;this.b=null;this.w="";this.v=new Yf;this.u=0;this.l=new H(function(){fg(b)});this.f=gg;this.o=null;this.A=0;this.F=Infinity;this.j=new Eb;this.G=[];this.m=new Map}y("shaka.hls.HlsParser",eg);n=eg.prototype;n.configure=function(b){this.g=b};
n.start=function(b,c){var d=this;return r(function f(){var g;return v(f,function(f){switch(f.s){case 1:return d.c=c,u(f,hg(d,b),2);case 2:return g=f.C,d.w=g.uri,u(f,ig(d,g.data),3);case 3:return 0<d.u&&d.l.start(d.u,!1),f["return"](d.o)}})})};n.stop=function(){this.l.stop();this.g=this.c=null;this.B.clear();this.H.clear();this.a.clear();this.o=null;return this.j.destroy()};
n.update=function(){if(this.f!=jg.Ya){for(var b=[],c=q(this.a.values()),d=c.next();!d.done;d=c.next())b.push(kg(this,d.value));return Promise.all(b)}};function kg(b,c){hg(b,c.We).then(function(b){var d=jg,f=Zf(this.v,b.data,b.uri);if(1!=f.type)throw new A(2,4,4017);b=Sf(f.a,"EXT-X-MEDIA-SEQUENCE");var g=c.stream;lg(this,c.xc,f,b?Number(b.value):0,g.mimeType,g.codecs).then(function(b){c.Wb.a=b;b=b[b.length-1];Sf(f.a,"EXT-X-ENDLIST")&&(mg(this,d.Ya),this.b.Ia(b.endTime))}.bind(this))}.bind(b))}
n.onExpirationUpdated=function(){};
function ig(b,c){var d=Zf(b.v,c,b.w);if(0!=d.type)throw new A(2,4,4022);return ng(b,d).then(function(b){this.c.filterAllPeriods([b]);for(var c=Infinity,d=0,e=Infinity,k=q(this.a.values()),l=k.next();!l.done;l=k.next())l=l.value,c=Math.min(c,l.Sc),d=Math.max(d,l.Sc),"text"!=l.stream.type&&(e=Math.min(e,l.duration));this.f!=jg.Ya?(this.b=new S(0,3*this.A),this.b.Yb(!1)):(this.b=new S(null,0),this.b.Yb(!0));og(this);if(this.f!=jg.Ya){this.u=this.F;this.f==jg.qd&&(c=this.b.tc,isNaN(this.g.availabilityWindowOverride)||
(c=this.g.availabilityWindowOverride),this.b.hd(c));for(c=0;95443.7176888889<=d;)c+=95443.7176888889,d-=95443.7176888889;if(c)for(d=q(this.a.values()),l=d.next();!l.done;l=d.next())e=l.value,95443.7176888889>e.Sc&&(e.stream.presentationTimeOffset=-c,e.Wb.offset(c))}else for(this.b.Ia(e),this.b.offset(-c),d=q(this.a.values()),l=d.next();!l.done;l=d.next())l=l.value,l.stream.presentationTimeOffset=c,l.Wb.offset(-c),Ve(l.Wb,e);this.o={presentationTimeline:this.b,periods:[b],offlineSessionIds:[],minBufferTime:0}}.bind(b))}
function ng(b,c){var d=c.a,e=Rf(c.a,"EXT-X-MEDIA"),f=e.filter(function(b){return"SUBTITLES"==pg(b,"TYPE")}.bind(b)).map(function(b){return qg(this,b)}.bind(b));e=e.filter(function(b){return"CLOSED-CAPTIONS"==pg(b,"TYPE")});rg(b,e);return Promise.all(f).then(function(b){var e=Rf(d,"EXT-X-STREAM-INF").map(function(b){return sg(this,b,c)}.bind(this));return Promise.all(e).then(function(c){return{startTime:0,variants:c.reduce($c.Dc,[]),textStreams:b}}.bind(this))}.bind(b))}
function sg(b,c,d){var e=Pf(c,"CODECS","avc1.42E01E,mp4a.40.2").split(/\s*,\s*/),f=c.getAttribute("RESOLUTION"),g=null,h=null,k=Pf(c,"FRAME-RATE"),l=Number(pg(c,"BANDWIDTH"));if(f){var m=f.value.split("x");g=m[0];h=m[1]}d=Rf(d.a,"EXT-X-MEDIA");d=d.filter(function(b){return"CLOSED-CAPTIONS"!=pg(b,"TYPE")});d=d.filter(function(b){var c=Pf(b,"URI")||"";return"SUBTITLES"==(Pf(b,"TYPE")||"")||""!=c});var p=Pf(c,"AUDIO"),t=Pf(c,"VIDEO");p?d=Tf(d,"AUDIO",p):t&&(d=Tf(d,"VIDEO",t));if(m=tg("text",e)){var w=
Pf(c,"SUBTITLES");w&&(w=Tf(d,"SUBTITLES",w),w.length&&(b.B.get(w[0].id).stream.codecs=m));Bb(e,m)}d=d.map(function(b){return ug(this,b,e)}.bind(b));var x=[],F=[];return Promise.all(d).then(function(b){p?x=b:t&&(F=b);b=!1;if(x.length||F.length)if(x.length)if(pg(c,"URI")==x[0].xc){var d="audio";b=!0}else d="video";else d="audio";else 1==e.length?(d=tg("video",e),d=f||k||d?"video":"audio"):(d="video",e=[e.join(",")]);return b?Promise.resolve():vg(this,c,e,d)}.bind(b)).then(function(b){b&&("audio"==b.stream.type?
x=[b]:F=[b]);F&&wg(F);x&&wg(x);return xg(this,x,F,l,g,h,k)}.bind(b))}function wg(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 xg(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 p=c[l]?c[l].stream:null,t=d[m]?d[m].stream:null,w=c[l]?c[l].drmInfos:null,x=d[m]?d[m].drmInfos:null,F=void 0;if(p&&t)if(w.length&&x.length?0<Sc(w,x).length:1)F=Sc(w,x);else continue;else p?F=w:t&&(F=x);w=(d[l]?d[l].xc:"")+" - "+(c[l]?c[l].xc:
"");b.H.has(w)||(p=yg(b,p,t,e,F),k.push(p),b.H.add(w))}return k}function yg(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 qg(b,c){pg(c,"TYPE");return ug(b,c,[]).then(function(b){return b.stream})}
function rg(b,c){for(var d=q(c),e=d.next();!e.done;e=d.next()){e=e.value;pg(e,"TYPE");var f=Pf(e,"LANGUAGE")||"und";f=I(f);var g=pg(e,"GROUP-ID");e=pg(e,"INSTREAM-ID");b.m.get(g)||b.m.set(g,new Map);b.m.get(g).set(e,f)}}
function ug(b,c,d){var e=pg(c,"URI");if(b.a.has(e))return Promise.resolve(b.a.get(e));var f=pg(c,"TYPE").toLowerCase();"subtitles"==f&&(f="text");var g=I(Pf(c,"LANGUAGE","und")),h=Pf(c,"NAME"),k=c.getAttribute("DEFAULT"),l=c.getAttribute("AUTOSELECT"),m=Pf(c,"CHANNELS");return zg(b,e,d,f,g,!!k||!!l,h,"audio"==f?Ag(m):null,null).then(function(b){if(this.a.has(e))return this.a.get(e);this.B.set(c.id,b);this.a.set(e,b);return b}.bind(b))}
function Ag(b){if(!b)return null;b=b.split("/")[0];return parseInt(b,10)}function vg(b,c,d,e){var f=pg(c,"URI");if(b.a.has(f))return Promise.resolve(b.a.get(f));c=Pf(c,"CLOSED-CAPTIONS");var g=null;"video"==e&&c&&"NONE"!=c&&(g=b.m.get(c));return zg(b,f,d,e,"und",!1,null,null,g).then(function(b){if(this.a.has(f))return this.a.get(f);this.a.set(f,b);return b}.bind(b))}
function zg(b,c,d,e,f,g,h,k,l){var m=ad([b.w],[c])[0],p,t="",w;return hg(b,m).then(function(c){m=c.uri;p=Zf(b.v,c.data,m);if(1!=p.type)throw new A(2,4,4017);c=p;var f=jg,g=Sf(c.a,"EXT-X-PLAYLIST-TYPE"),h=Sf(c.a,"EXT-X-ENDLIST");h=g&&"VOD"==g.value||h;g=g&&"EVENT"==g.value&&!h;g=!h&&!g;h?mg(b,f.Ya):(g?mg(b,f.qd):mg(b,f.Pe),c=Bg(c.a,"EXT-X-TARGETDURATION"),c=Number(c.value),b.A=Math.max(c,b.A),b.F=Math.min(c,b.F));if(1==d.length)t=d[0];else if(c=tg(e,d),null!=c)t=c;else throw new A(2,4,4025,d);return Cg(b,
e,t,p)}).then(function(d){w=d;d=Sf(p.a,"EXT-X-MEDIA-SEQUENCE");return lg(b,c,p,d?Number(d.value):0,w,t)}).then(function(d){var x=d[0].startTime,R=d[d.length-1].endTime,ca=R-x;d=new Q(d);var da=Dg(p),ma=void 0;"text"==e&&(ma="subtitle");var ra=[];p.segments.forEach(function(b){b=Rf(b.b,"EXT-X-KEY");ra.push.apply(ra,b)});var Ra=!1,fb=[],sa=null;ra.forEach(function(b){if("NONE"!=pg(b,"METHOD")){Ra=!0;var c=pg(b,"KEYFORMAT");if(b=(c=Eg[c])?c(b):null)b.keyIds.length&&(sa=b.keyIds[0]),fb.push(b)}});if(Ra&&
!fb.length)throw new A(2,4,4026);return{stream:{id:b.K++,originalId:h,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:d.find.bind(d),getSegmentReference:d.get.bind(d),initSegmentReference:da,presentationTimeOffset:0,mimeType:w,codecs:t,kind:ma,encrypted:Ra,keyId:sa,language:f,label:h,type:e,primary:g,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:[],channelsCount:k,closedCaptions:l},Wb:d,drmInfos:fb,xc:c,We:m,Sc:x,
sh:R,duration:ca}})}function Dg(b){var c=Rf(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=pg(c,"URI"),e=ad([b.b],[d])[0];b=0;d=null;if(c=Pf(c,"BYTERANGE"))b=c.split("@"),c=Number(b[0]),b=Number(b[1]),d=b+c-1;return new Le(function(){return[e]},b,d)}
function Fg(b,c,d,e){var f=c.b,g=c.a;c=Bg(f,"EXTINF").value.split(",");c=e+Number(c[0]);var h=0,k=null;if(f=Sf(f,"EXT-X-BYTERANGE"))h=f.value.split("@"),f=Number(h[0]),h=h[1]?Number(h[1]):b.a+1,k=h+f-1;return new N(d,e,c,function(){return[g]},h,k)}function og(b){b.b&&(b.G.forEach(function(c){b.b.Cb(c,0)}),b.G=[])}
function lg(b,c,d,e,f,g){var h=d.segments,k=[],l=h[0].a,m=Fg(null,h[0],e,0);d=Dg(d);return Gg(b,c,d,m,f,g).then(function(b){l.split("/").pop();for(var c=0;c<h.length;++c){var d=k[k.length-1];d=Fg(d,h[c],e+c,0==c?b:d.endTime);k.push(d)}this.G.push(k);og(this);return k}.bind(b))}
function Hg(b,c){var d=b.c.networkingEngine,e=Jb(c.c(),b.g.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);Gb(b.j,f);return f.promise["catch"](function(){Wa("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;var c=d.request(1,e);Gb(b.j,c);return c.promise})}
function Gg(b,c,d,e,f,g){if(b.o&&(c=b.a.get(c).Wb.get(e.position)))return Promise.resolve(c.startTime);e=[Hg(b,e)];if("video/mp4"==f||"audio/mp4"==f)d?e.push(Hg(b,d)):e.push(e[0]);return Promise.all(e).then(function(b){if("video/mp4"==f||"audio/mp4"==f)return Ig(b[0].data,b[1].data);if("audio/mpeg"==f)return 0;if("video/mp2t"==f)return Jg(b[0].data);if("application/mp4"==f||f.startsWith("text/")){b=b[0].data;var c=Xb(f,g);if(od(c)){var d=new md(null);pd(d,c);b=d.Lc(b)}else b=0;return b}throw new A(2,
4,4030);}.bind(b))}function Ig(b,c){var d=0;(new P).L("moov",Pe).L("trak",Pe).L("mdia",Pe).va("mdhd",function(b){b.reader.O(0==b.version?8:16);d=b.reader.J();b.parser.stop()}).parse(c,!0);if(!d)throw new A(2,4,4030);var e=0,f=!1;(new P).L("moof",Pe).L("traf",Pe).va("tfdt",function(b){e=(0==b.version?b.reader.J():b.reader.Gb())/d;f=!0;b.parser.stop()}).parse(b,!0);if(!f)throw new A(2,4,4030);return e}
function Jg(b){function c(){throw new A(2,4,4030);}b=new O(new DataView(b),0);for(var d=0,e=0;;)if(d=b.oa(),e=b.za(),71!=e&&c(),b.Ub()&16384||c(),e=(b.za()&48)>>4,0!=e&&2!=e||c(),3==e&&(e=b.za(),b.O(e)),1!=b.J()>>8)b.seek(d+188),e=b.za(),71!=e&&(b.seek(d+192),e=b.za()),71!=e&&(b.seek(d+204),e=b.za()),71!=e&&c(),b.ve(1);else return b.O(3),d=b.za()>>6,0!=d&&1!=d||c(),0==b.za()&&c(),d=b.za(),e=b.Ub(),b=b.Ub(),(1073741824*((d&14)>>1)+((e&65534)<<14|(b&65534)>>1))/9E4}
function tg(b,c){for(var d=Kg[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 Cg(b,c,d,e){e=e.segments[0].a;var f=(new Za(e)).xa.split(".").pop(),g=Lg[c][f];if(g)return Promise.resolve(g);if("text"==c)return d&&"vtt"!=d?Promise.resolve("application/mp4"):Promise.resolve("text/vtt");c=Jb([e],b.g.retryParameters);c.method="HEAD";c=b.c.networkingEngine.request(1,c);Gb(b.j,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 pg(b,c){var d=b.getAttribute(c);if(!d)throw new A(2,4,4023,c);return d.value}function Bg(b,c){var d=Sf(b,c);if(!d)throw new A(2,4,4024,c);return d}function hg(b,c){var d=b.c.networkingEngine.request(0,Jb([c],b.g.retryParameters));Gb(b.j,d);return d.promise}
var Kg={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]},Lg={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"}};
function fg(b){r(function d(){var e;return v(d,function(d){switch(d.s){case 1:if(!b.c)return d["return"]();za(d,2);return u(d,b.update(),4);case 4:b.l.start(b.u,!1);Ba(d,0);break;case 2:e=Ca(d),e.severity=1,b.c.onError(e),b.l.start(.1,!1),d.s=0}})})}function mg(b,c){b.f=c;b.b&&b.b.Yb(b.f==jg.Ya);b.f!=jg.Ya||b.l.stop()}
var Eg={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(b){var c=pg(b,"METHOD");Pd("HLS SAMPLE-AES-CENC","SAMPLE-AES-CENC will no longer be supported, see Issue #1227");if(!["SAMPLE-AES","SAMPLE-AES-CTR","SAMPLE-AES-CENC"].includes(c))return null;c=pg(b,"URI");c=dg.parse(c);c=new Uint8Array(c.data);c=bd("com.widevine.alpha",[{initDataType:"cenc",initData:c}]);if(b=Pf(b,"KEYID"))c.keyIds=[b.substr(2).toLowerCase()];return c}},gg="VOD",jg={Ya:gg,Pe:"EVENT",qd:"LIVE"};tf.m3u8=eg;
sf["application/x-mpegurl"]=eg;sf["application/vnd.apple.mpegurl"]=eg;function Mg(){this.a=new Map}function Ng(b,c){b.a.has(c)||b.a.set(c,new Og);return b.a.get(c)}function Og(){this.text=this.variant=null};function Pg(b,c){this.a=b;this.b=new Set([b]);c=c||[];for(var d=q(c),e=d.next();!e.done;e=d.next())this.add(e.value)}Pg.prototype.add=function(b){return Qg(this.a,b)?(this.b.add(b),!0):!1};function Qg(b,c){var d;if(!(d=!!b.audio!=!!c.audio||!!b.video!=!!c.video||b.language!=c.language)&&(d=b.audio&&c.audio)){d=b.audio;var e=c.audio;d=!(d.channelsCount==e.channelsCount&&Rg(d,e)&&Sg(d.roles,e.roles))}!d&&(d=b.video&&c.video)&&(d=b.video,e=c.video,d=!(Rg(d,e)&&Sg(d.roles,e.roles)));return d?!1:!0}
Pg.prototype.values=function(){return this.b.values()};function Rg(b,c){if(b.mimeType!=c.mimeType)return!1;var d=b.codecs.split(",").map(function(b){return $b(b)[0]}),e=c.codecs.split(",").map(function(b){return $b(b)[0]});if(d.length!=e.length)return!1;d.sort();e.sort();for(var f=0;f<d.length;f++)if(d[f]!=e[f])return!1;return!0}
function Sg(b,c){var d=new Set(b),e=new Set(c);d["delete"]("main");e["delete"]("main");if(d.size!=e.size)return!1;d=q(d);for(var f=d.next();!f.done;f=d.next())if(!e.has(f.value))return!1;return!0};function Tg(b){this.a=b;this.b=new Ug(b.language,"",b.audio&&b.audio.channelsCount?b.audio.channelsCount:0)}Tg.prototype.create=function(b){var c=this,d=b.filter(function(b){return Qg(c.a,b)});return d.length?new Pg(d[0],d):this.b.create(b)};function Ug(b,c,d){this.c=b;this.b=c;this.a=d}
Ug.prototype.create=function(b){var c=[];c=Vg(b,this.c);var d=b.filter(function(b){return b.primary});c=c.length?c:d.length?d:b;this.b&&(b=Wg(c,this.b),b.length&&(c=b));this.a&&(b=J.Ed(c,this.a),b.length&&(c=b));b=new Pg(c[0]);c=q(c);for(d=c.next();!d.done;d=c.next())d=d.value,Qg(b.a,d)&&b.add(d);return b};function Vg(b,c){var d=I(c),e=Md(d,b.map(function(b){return Ld(b)}));return e?b.filter(function(b){return e==Ld(b)}):[]}
function Wg(b,c){return b.filter(function(b){var d=b.audio;b=b.video;return d&&0<=d.roles.indexOf(c)||b&&0<=b.roles.indexOf(c)})};function Xg(b){var c=this;this.c=b;this.a=new Set;this.b=new H(function(){Yg(c,!1)});this.b.start(.25,!0)}Xg.prototype.R=function(){this.b.stop();for(var b=q(this.a),c=b.next();!c.done;c=b.next())c.value.R();this.a.clear()};function Yg(b,c){for(var d=q(b.a),e=d.next();!e.done;e=d.next())e.value.g(b.c.currentTime,c)};function Zg(b,c,d){var e=this;this.c=$g;this.f=.5;this.j=b;this.m=d;this.l=c;this.b=function(){};this.a=function(){};this.o=[{Me:$g,is:ah,yd:function(){return e.a()}},{Me:ah,is:$g,yd:function(){return e.b()}}];this.f>=this.j&&(Wa("Rebuffering threshold is set too low! This could cause poor buffering behavior during playback!"),this.f=this.j/2)}Zg.prototype.R=function(){this.b=function(){};this.a=function(){}};
Zg.prototype.g=function(b){var c=this.c==ah?this.f:this.j;b=this.l(b);c=this.m()||b>=c?ah:$g;b=q(this.o);for(var d=b.next();!d.done;d=b.next())d=d.value,this.c==d.Me&&c==d.is&&d.yd();this.c=c};function bh(b,c,d){b.b=c;b.a=d}var $g=0,ah=1;function kh(b){this.g=b;this.f=lh(b);this.a=b.a.currentTime;this.b=Date.now()/1E3;this.c=function(){}}function mh(b,c){b.c=c}function nh(b){this.a=b}function lh(b){if(b.a.paused||0==b.a.playbackRate||null==b.a.buffered)var c=!1;else a:{c=b.a.buffered;b=b.a.currentTime;for(var d=0;d<c.length;d++){var e=c.start(d),f=c.end(d);if(!(b<e||b>f-.5)){c=!0;break a}}c=!1}return c};function oh(b,c,d,e){this.a=b;this.v=c;this.o=d;this.u=e;this.f=new Nb;this.b=null;this.j=!1;this.m=b.readyState;this.c=!1;this.w=new kh(new nh(b));mh(this.w,function(){b.currentTime+=.1});this.g=!1;c=this.l.bind(this);G(this.f,b,"waiting",c);this.b=new H(c);this.b.start(.25,!0)}oh.prototype.R=function(){this.f&&(this.f.R(),this.f=null);null!=this.b&&(this.b.stop(),this.b=null);this.a=this.v=this.u=null};oh.prototype.Tb=function(){this.g=!0;this.l()};
oh.prototype.l=function(){if(0!=this.a.readyState){if(this.a.seeking){if(!this.j)return}else this.j=!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=ac("Edge/")||ac("Trident/")||ac("Tizen")||ac("CrKey")?.5:.1;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){d=this.w;e=d.g;c=lh(e);
e=e.a.currentTime;f=Date.now()/1E3;if(d.a!=e||d.f!=c)d.b=f,d.a=e,d.f=c;e=f-d.b;1<=e&&c&&d.c(d.a,e)}else if(0!=e||this.g){f=d.start(e);var g=this.v.Ma();if(!(f>=g)){g=f-c;b=g<=b;var h=!1;.001>g||(b||this.c||(this.c=!0,c=new C("largegap",{currentTime:c,gapSize:g}),c.cancelable=!0,this.u(c),this.o.jumpLargeGaps&&!c.defaultPrevented&&(h=!0)),!b&&!h)||(0!=e&&d.end(e-1),this.a.currentTime=f)}}}}};function ph(b){this.c=b;this.a=null;this.b=function(){}}ph.prototype.R=function(){this.a=this.c=null;this.b=function(){}};ph.prototype.g=function(b){for(var c=this.a,d=this.c.periods[0],e=q(this.c.periods),f=e.next();!f.done;f=e.next())f=f.value,b>=f.startTime&&(d=f);b=d;c!=b&&this.b(b);this.a=b};function qh(b,c){b.b=c};function rh(b,c,d){this.a=b;this.l=c;this.j=d;this.c=new Nb;this.f=1;this.g=!1;this.b=null;0<b.readyState?this.ee():Qb(this.c,b,"loadedmetadata",this.ee.bind(this));G(this.c,b,"ratechange",this.lg.bind(this))}n=rh.prototype;n.R=function(){this.c&&(this.c.R(),this.c=null);null!=this.b&&(this.b.stop(),this.b=null);this.a=this.l=null};function sh(b){return 0<b.a.readyState?b.a.currentTime:b.j}function th(b,c){0<b.a.readyState?uh(b,b.a.currentTime,c):(b.j=c,setTimeout(b.l,0))}n.bb=function(){return this.f};
function vh(b,c){null!=b.b&&(b.b.stop(),b.b=null);b.f=c;b.a.playbackRate=b.g||0>c?0:c;!b.g&&0>c&&(b.b=new H(function(){b.a.currentTime+=c/4}),b.b.start(.25,!0))}n.lg=function(){var b=this.g||0>this.f?0:this.f;this.a.playbackRate&&this.a.playbackRate!=b&&vh(this,this.a.playbackRate)};n.ee=function(){.001>Math.abs(this.a.currentTime-this.j)?this.ie():(Qb(this.c,this.a,"seeking",this.ie.bind(this)),this.a.currentTime=0==this.a.currentTime?this.j:this.a.currentTime)};
n.ie=function(){var b=this;G(this.c,this.a,"seeking",function(){return b.l()})};function uh(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 wh(b,c,d,e,f,g,h){this.c=b;this.a=c;this.o=d;this.j=e;this.m=g;this.f=null;this.g=new oh(b,c,e,h);c=this.og.bind(this);null==f?f=Infinity>this.a.ka()?this.a.wb():this.a.Ma():0>f&&(f=this.a.Ma()+f);f=xh(this,yh(this,f));this.b=new rh(b,c,f);this.f=new H(this.kg.bind(this));this.f.start(.25,!0)}n=wh.prototype;n.R=function(){this.b&&(this.b.R(),this.b=null);this.g&&(this.g.R(),this.g=null);this.f&&(this.f.stop(),this.f=null);this.c=this.b=this.a=this.m=this.j=null};
function zh(b){var c=sh(b.b);0<b.c.readyState&&(b.c.paused||(c=yh(b,c)));return c}n.bb=function(){return this.b.bb()};n.Tb=function(){this.g.Tb()};n.kg=function(){if(0!=this.c.readyState&&!this.c.paused){var b=this.c.currentTime,c=this.a.wb(),d=this.a.Ma();3>d-c&&(c=d-3);b<c&&(b=Ah(this,b),this.c.currentTime=b)}};n.og=function(){var b=this.g;b.j=!0;b.g=!1;b.c=!1;var c=sh(this.b);b=Ah(this,c);if(.001<Math.abs(b-c)&&(c=(new Date).getTime()/1E3,!this.l||this.l<c-1)){this.l=c;th(this.b,b);return}this.m()};
function xh(b,c){var d=b.a.ka();return c>=d?d-b.j.durationBackoff:c}function Ah(b,c){var d=Xc.bind(null,b.c.buffered),e=Math.max(b.o,b.j.rebufferingGoal),f=b.j.safeSeekOffset,g=b.a.wb(),h=b.a.Ma(),k=b.a.ka();3>h-g&&(g=h-3);var l=b.a.Kb(e),m=b.a.Kb(f);e=b.a.Kb(e+f);return c>=k?xh(b,c):c>h?h:c<g?d(m)?m:e:c>=l||d(c)?c:e}function yh(b,c){var d=b.a.wb();if(c<d)return d;d=b.a.Ma();return c>d?d:c};function Bh(){this.b=function(){};this.a=new Set}Bh.prototype.R=function(){this.b=function(){};this.a.clear()};function Ch(b,c){b.b=c};function Dh(b){var c=this;this.j=b;this.f=new Map;this.a=function(){};this.b=function(){};this.c=function(){};this.l=[{qb:null,pb:Eh,eb:function(b,e){return c.a(b,e)}},{qb:Fh,pb:Eh,eb:function(b,e){return c.a(b,e)}},{qb:Gh,pb:Eh,eb:function(b,e){return c.a(b,e)}},{qb:Eh,pb:Fh,eb:function(b,e){return c.b(b,e)}},{qb:Eh,pb:Gh,eb:function(b,e){return c.b(b,e)}},{qb:Fh,pb:Gh,eb:function(b,e){return c.c(b,e)}},{qb:Gh,pb:Fh,eb:function(b,e){return c.c(b,e)}}]}
Dh.prototype.R=function(){this.j=null;this.f.clear();this.a=function(){};this.b=function(){};this.c=function(){}};Dh.prototype.g=function(b,c){for(var d=q(this.j.a),e=d.next();!e.done;e=d.next()){e=e.value;var f=this.f.get(e),g=b<e.startTime?Fh:b>e.endTime?Gh:Eh;this.f.set(e,g);for(var h=q(this.l),k=h.next();!k.done;k=h.next())k=k.value,k.qb==f&&k.pb==g&&k.eb(e,c)}};function Hh(b,c,d,e){b.a=c;b.b=d;b.c=e}var Fh=1,Eh=2,Gh=3;function Ih(b,c){this.a=c;this.b=b;this.g=null;this.m=1;this.v=Promise.resolve();this.j=[];this.l=new Map;this.c=new Map;this.u=!1;this.B=null;this.A=this.f=this.o=!1;this.w=0}n=Ih.prototype;n.destroy=function(){for(var b=q(this.c.values()),c=b.next();!c.done;c=b.next())Jh(c.value);this.c.clear();this.l.clear();this.g=this.j=this.v=this.b=this.a=null;this.f=!0;return Promise.resolve()};
n.configure=function(b){this.g=b;this.B=new ob({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=this;return r(function d(){var e,f,g;return v(d,function(d){switch(d.s){case 1:return e=b.a.vb(),f=J.hc(b.b,e),g=b.a.Yd(b.b.periods[f]),g.variant||g.text?u(d,Kh(b,g.variant?g.variant.audio:null,g.variant?g.variant.video:null,g.text,e),2):d["return"](Promise.reject(new A(2,5,5005)));case 2:if(b.f)return d["return"]();b.a&&b.a.$f&&b.a.$f();d.s=0}})})};function Lh(b){return Mh(b,"audio")}function Nh(b){return Mh(b,"video")}
function Mh(b,c){var d=b.c.get(c);return d?d.Ua||d.stream:null}function Oh(b,c){return r(function e(){var f,g,h,k,l,m,p,t;return v(e,function(e){switch(e.s){case 1:return f=cd,Dd(b.a.T,f.rb),b.w++,b.A=!1,g=b.w,h=b.a.T,k=new Map,l=new Set,k.set(f.rb,c),l.add(c),u(e,h.init(k,!1),2);case 2:return b.f?e["return"]():u(e,Ph(b,l),3);case 3:if(b.f)return e["return"]();b.w!=g||b.c.has(f.rb)||b.A||(m=b.a.vb(),p=J.hc(b.b,m),t=Qh(c,p,0),b.c.set(f.rb,t),b.u&&Rh(b,t,0));e.s=0}})})}
function Sh(b,c){var d=b.c.get("video");if(d){var e=d.stream;if(e)if(c){var f=e.trickModeVideo;f&&!d.Ua&&(Th(b,f,!1,0),d.Ua=e)}else if(e=d.Ua)d.Ua=null,Th(b,e,!0,0)}}function Uh(b,c,d,e){c.video&&Th(b,c.video,d,e);c.audio&&Th(b,c.audio,d,e)}
function Th(b,c,d,e){var f=b.c.get(c.type);if(!f&&"text"==c.type&&b.g.ignoreTextStreamFailures)Oh(b,c);else if(f){var g=Vh(b,c);d&&g!=f.Ta?Wh(b):(f.Ua&&(c.trickModeVideo?(f.Ua=c,c=c.trickModeVideo):f.Ua=null),(g=b.j[g])&&g.Hb&&(g=b.l.get(c.id))&&g.Hb&&f.stream!=c&&("text"==c.type&&wd(b.a.T,Xb(c.mimeType,c.codecs)),f.stream=c,f.pc=!0,d&&(f.$a?f.yc=!0:f.gb?(f.Xa=!0,f.dc=e,f.yc=!0):(Jh(f),Xh(b,f,!0,e)))))}}
function Yh(b){var c=b.a.vb(),d=b.g.smallGapLimit;Array.from(b.c.keys()).every(function(e){var f=b.a.T;"text"==e?(e=f.a,e=c>=e.a&&c<e.b):(e=yd(f,e),e=Xc(e,c,d));return e})||Wh(b)}function Wh(b){b.c.forEach(function(c,d){c.$a||c.Xa||(c.gb?(c.Xa=!0,c.dc=0):null==xd(b.a.T,d)?null==c.Wa&&Rh(b,c,0):(Jh(c),Xh(b,c,!1,0)))})}
function Kh(b,c,d,e,f){return r(function h(){var k,l,m,p,t,w,x;return v(h,function(h){switch(h.s){case 1:return k=b.a.vb(),l=J.hc(b.b,k),m=cd,p=new Map,t=new Set,c&&(p.set(m.Ne,c),t.add(c)),d&&(p.set(m.Te,d),t.add(d)),e&&(p.set(m.rb,e),t.add(e)),w=b.a.T,x=b.g.forceTransmuxTS,u(h,w.init(p,x),2);case 2:if(b.f)return h["return"]();Zh(b);return u(h,Ph(b,t),3);case 3:if(b.f)return h["return"]();p.forEach(function(c,d){if(!b.c.has(d)){var e=Qh(c,l,f);b.c.set(d,e);Rh(b,e,0)}});h.s=0}})})}
function Qh(b,c,d){return{stream:b,type:b.type,Ab:null,Na:null,Ua:null,pc:!0,Ta:c,endOfStream:!1,gb:!1,Wa:null,Xa:!1,dc:0,yc:!1,$a:!1,bd:!1,Nb:!1,ue:d}}
function $h(b,c){var d=b.j[c];if(d)return d.promise;d={promise:new z,Hb:!1};b.j[c]=d;for(var e=new Set,f=q(b.b.periods[c].variants),g=f.next();!g.done;g=f.next())g=g.value,g.video&&e.add(g.video),g.video&&g.video.trickModeVideo&&e.add(g.video.trickModeVideo),g.audio&&e.add(g.audio);f=q(b.b.periods[c].textStreams);for(g=f.next();!g.done;g=f.next())e.add(g.value);b.v=b.v.then(function(){if(!this.f)return Ph(this,e)}.bind(b)).then(function(){this.f||(this.j[c].promise.resolve(),this.j[c].Hb=!0)}.bind(b))["catch"](function(b){this.f||
(this.j[c].promise["catch"](function(){}),this.j[c].promise.reject(),delete this.j[c],this.a.onError(b))}.bind(b));return d.promise}
function Ph(b,c){return r(function e(){var f,g,h,k,l,m,p;return v(e,function(e){switch(e.s){case 1:f=[];for(var t=q(c),x=t.next();!x.done;x=t.next())g=x.value,(h=b.l.get(g.id))?f.push(h.promise):(b.l.set(g.id,{promise:new z,Hb:!1}),f.push(g.createSegmentIndex()));za(e,2);return u(e,Promise.all(f),4);case 4:if(b.f)return e["return"]();Ba(e,3);break;case 2:k=Ca(e);if(b.f)return e["return"]();e=q(c);for(x=e.next();!x.done;x=e.next())l=x.value,b.l.get(l.id).promise["catch"](function(){}),b.l.get(l.id).promise.reject(),
b.l["delete"](l.id);throw k;case 3:t=q(c);for(x=t.next();!x.done;x=t.next())m=x.value,p=b.l.get(m.id),p.Hb||(p.promise.resolve(),p.Hb=!0);e.s=0}})})}function Zh(b){var c=b.b.presentationTimeline.ka();Infinity>c?b.a.T.Ia(c):b.a.T.Ia(Math.pow(2,32))}
n.bh=function(b){if(!this.f&&!b.gb&&null!=b.Wa&&!b.$a)if(b.Wa=null,b.Xa)Xh(this,b,b.yc,b.dc);else{try{var c=ai(this,b);null!=c&&(Rh(this,b,c),b.Nb=!1)}catch(d){bi(this,d);return}c=Array.from(this.c.values());ci(this,b);c.every(function(b){return b.endOfStream})&&this.a.T.endOfStream().then(function(){if(!this.f){var b=this.a.T.ka();b<this.b.presentationTimeline.ka()&&this.b.presentationTimeline.Ia(b)}}.bind(this))}};
function ai(b,c){function d(b){return"text"==b.type&&"application/cea-608"==b.stream.mimeType}if(d(c))return b.a.T.vc(c.stream.originalId||""),null;var e=b.a.vb(),f=di(b,c,e),g=Vh(b,c.stream),h=J.hc(b.b,f),k=Ad(b.a.T,c.type,e),l=Math.max(b.b.minBufferTime||0,b.g.rebufferingGoal,b.g.bufferingGoal)*b.m;if(f>=b.b.presentationTimeline.ka())return c.endOfStream=!0,"video"==c.type&&(f=b.c.get("text"))&&"application/cea-608"==f.stream.mimeType&&(f.endOfStream=!0),null;c.endOfStream=!1;c.Ta=h;if(h!=g)return null;
if(k>=l)return.5;h=zd(b.a.T,c.type);h=ei(b,c,e,h,g);if(!h)return 1;var m=Infinity;Array.from(b.c.values()).forEach(function(c){d(c)||(c=di(b,c,e),m=Math.min(m,c))});if(f>=m+b.b.presentationTimeline.a)return 1;c.ue=0;fi(b,c,e,g,h);return null}function di(b,c,d){if(!c.Ab||!c.Na)return Math.max(d,c.ue);d=Vh(b,c.Ab);return b.b.periods[d].startTime+c.Na.endTime}
function ei(b,c,d,e,f){if(c.Na&&c.stream==c.Ab)return gi(b,c,f,c.Na.position+1);c.Na?(d=Vh(b,c.Ab),d=c.stream.findSegmentPosition(Math.max(0,b.b.periods[d].startTime+c.Na.endTime-b.b.periods[f].startTime))):d=c.stream.findSegmentPosition(Math.max(0,(e||d)-b.b.periods[f].startTime));if(null==d)return null;var g=null;null==e&&(g=gi(b,c,f,Math.max(0,d-1)));return g||gi(b,c,f,d)}
function gi(b,c,d,e){d=b.b.periods[d];c=c.stream.getSegmentReference(e);if(!c)return null;e=b.b.presentationTimeline;b=e.Lb();e=e.xb();return d.startTime+c.endTime<b||d.startTime+c.startTime>e?null:c}
function fi(b,c,d,e,f){var g=b.b.periods[e],h=c.stream,k=b.b.presentationTimeline.ka(),l=b.b.periods[e+1];e=hi(b,c,e,Math.max(0,g.startTime-.1),l?l.startTime+.01:k);c.gb=!0;c.pc=!1;k=ii(b,f);Promise.all([e,k]).then(function(b){if(!this.f&&!this.o)return ji(this,c,d,g,h,f,b[1])}.bind(b)).then(function(){this.f||this.o||(c.gb=!1,c.bd=!1,c.Xa||this.a.Tb(),Rh(this,c,0),ki(this,h))}.bind(b))["catch"](function(b){this.f||this.o||(c.gb=!1,"text"==c.type&&this.g.ignoreTextStreamFailures?this.c["delete"]("text"):
3017==b.code?li(this,c,b):(c.Nb=!0,b.severity=2,bi(this,b)))}.bind(b))}function li(b,c,d){if(!Array.from(b.c.values()).some(function(b){return b!=c&&b.bd})){var e=Math.round(100*b.m);if(20<e)b.m-=.2;else if(4<e)b.m-=.04;else{c.Nb=!0;b.o=!0;b.a.onError(d);return}c.bd=!0}Rh(b,c,4)}
function hi(b,c,d,e,f){if(!c.pc)return Promise.resolve();d=Ed(b.a.T,c.type,b.b.periods[d].startTime-c.stream.presentationTimeOffset,e,f);if(!c.stream.initSegmentReference)return d;b=ii(b,c.stream.initSegmentReference).then(function(b){if(!this.f)return Bd(this.a.T,c.type,b,null,null,c.stream.closedCaptions&&0<c.stream.closedCaptions.size)}.bind(b))["catch"](function(b){c.pc=!0;return Promise.reject(b)});return Promise.all([d,b])}
function ji(b,c,d,e,f,g,h){var k=f.closedCaptions&&0<f.closedCaptions.size;null!=f.emsgSchemeIdUris&&0<f.emsgSchemeIdUris.length&&(new P).va("emsg",b.Ag.bind(b,e,g,f.emsgSchemeIdUris)).parse(h);return mi(b,c,d).then(function(){if(!this.f)return Bd(this.a.T,c.type,h,g.startTime+e.startTime,g.endTime+e.startTime,k)}.bind(b)).then(function(){if(!this.f)return c.Ab=f,c.Na=g,Promise.resolve()}.bind(b))}
n.Ag=function(b,c,d,e){var f=e.reader.ad(),g=e.reader.ad(),h=e.reader.J(),k=e.reader.J(),l=e.reader.J(),m=e.reader.J();e=e.reader.hb(e.reader.N.byteLength-e.reader.oa());b=b.startTime+c.startTime+k/h;if(d.includes(f))if("urn:mpeg:dash:event:2012"==f)this.a.cg();else this.a.onEvent(new C("emsg",{detail:{startTime:b,endTime:b+l/h,schemeIdUri:f,value:g,timescale:h,presentationTimeDelta:k,eventDuration:l,id:m,messageData:e}}))};
function mi(b,c,d){var e=Math.max(b.g.bufferBehind,b.b.presentationTimeline.a),f=xd(b.a.T,c.type);if(null==f)return Promise.resolve();d=d-f-e;return 0>=d?Promise.resolve():b.a.T.remove(c.type,f,f+d).then(function(){}.bind(b))}
function ki(b,c){if(!b.u&&(b.u=Array.from(b.c.values()).every(function(b){return"text"==b.type?!0:!b.Xa&&!b.$a&&b.Na}),b.u)){var d=Vh(b,c);b.j[d]||$h(b,d).then(function(){this.f||this.a.Xd()}.bind(b))["catch"]($c.Qb);for(d=0;d<b.b.periods.length;++d)$h(b,d)["catch"]($c.Qb);b.a.rg&&b.a.rg()}}
function ci(b,c){var d=Vh(b,c.stream);if(c.Ta!=d){var e=c.Ta,f=Array.from(b.c.values());f.every(function(b){return b.Ta==e})&&f.every(ni)&&$h(b,e).then(function(){if(!this.f&&f.every(function(b){var c=ni(b),d=Vh(this,b.stream);return c&&b.Ta==e&&d!=e}.bind(this))){var b=this.b.periods[e],c=this.a.Yd(b),d=new Map;c.variant&&c.variant.video&&d.set("video",c.variant.video);c.variant&&c.variant.audio&&d.set("audio",c.variant.audio);c.text&&d.set("text",c.text);var l=q(this.c.keys());for(c=l.next();!c.done;c=
l.next())if(c=c.value,!d.has(c)&&"text"!=c){this.a.onError(new A(2,5,5005));return}l=q(Array.from(d.keys()));for(c=l.next();!c.done;c=l.next())if(c=c.value,!this.c.has(c))if("text"==c)Kh(this,null,null,d.get("text"),b.startTime),d["delete"](c);else{this.a.onError(new A(2,5,5005));return}b=q(Array.from(this.c.keys()));for(c=b.next();!c.done;c=b.next())c=c.value,(l=d.get(c))?(Th(this,l,!1,0),Rh(this,this.c.get(c),0)):this.c["delete"](c);this.a.Xd()}}.bind(b))["catch"]($c.Qb)}}
function ni(b){return!b.gb&&null==b.Wa&&!b.Xa&&!b.$a}function Vh(b,c){for(var d=b.b.periods,e=0;e<d.length;e++){for(var f=d[e],g=new Set,h=q(f.variants),k=h.next();!k.done;k=h.next())k=k.value,k.audio&&g.add(k.audio),k.video&&g.add(k.video),k.video&&k.video.trickModeVideo&&g.add(k.video.trickModeVideo);f=q(f.textStreams);for(h=f.next();!h.done;h=f.next())g.add(h.value);if(g.has(c))return e}return-1}
function ii(b,c){var d=Jb(c.c(),b.g.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.Pb.request(1,d).promise.then(function(b){return b.data})}
function Xh(b,c,d,e){r(function g(){var h,k,l;return v(g,function(g){switch(g.s){case 1:return c.Xa=!1,c.yc=!1,c.dc=0,c.$a=!0,e?(k=b.a.vb(),l=b.a.T.ka(),h=b.a.T.remove(c.type,k+e,l)):h=Dd(b.a.T,c.type).then(function(){if(!this.f&&d)return this.a.T.flush(c.type)}.bind(b)),u(g,h,2);case 2:if(b.f)return g["return"]();c.Ab=null;c.Na=null;c.$a=!1;c.endOfStream=!1;Rh(b,c,0);g.s=0}})})}function Rh(b,c,d){c.Wa=window.setTimeout(b.bh.bind(b,c),1E3*d)}
function Jh(b){null!=b.Wa&&(window.clearTimeout(b.Wa),b.Wa=null)}function bi(b,c){qb(b.B).then(function(){this.f||(this.a.onError(c),c.handled||this.g.failureCallback(c))}.bind(b))};function oi(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=ec(c)}catch(h){}throw new A(401==d||403==d?2:1,1,1001,e,d,f,b,g);};function pi(b,c,d,e){var f=new pi.b;Vb(c.headers).forEach(function(b,c){f.append(c,b)});var g=new pi.a,h={body:c.body||void 0,headers:f,method:c.method,signal:g.signal,credentials:c.allowCrossSiteCredentials?"include":void 0},k={vd:!1,Je:!1},l;c.retryParameters.timeout&&(l=setTimeout(function(){k.Je=!0;g.abort()},c.retryParameters.timeout));b=pi.j(b,d,h,k,l,e);return new B(b,function(){k.vd=!0;g.abort();return Promise.resolve()})}y("shaka.net.HttpFetchPlugin",pi);
pi.j=function(b,c,d,e,f,g){return r(function k(){var l,m,p,t,w,x,F,R,ca,da,ma,ra;return v(k,function(k){switch(k.s){case 1:return l=pi.g,m=pi.c,x=w=0,F=Date.now(),za(k,2,3),u(k,l(b,d),5);case 5:return p=k.C,R=p.clone().body.getReader(),ca=function(b){function c(){return r(function dd(){var d,e;return v(dd,function(f){switch(f.s){case 1:return u(f,R.read(),2);case 2:d=f.C;d.done||(w+=d.value.byteLength);e=Date.now();if(100<e-F||d.done)g(e-F,w-x),x=w,F=e;d.done?b.close():(b.enqueue(d.value),c());f.s=
0}})})}c()},new m({start:ca}),u(k,p.arrayBuffer(),6);case 6:t=k.C;case 3:Da(k);clearTimeout(f);Ea(k,4);break;case 2:da=Ca(k);if(e.vd)throw new A(1,1,7001,b,c);if(e.Je)throw new A(1,1,1003,b,c);throw new A(1,1,1002,b,da,c);case 4:return ma={},ra=p.headers,ra.forEach(function(b,c){ma[c.trim()]=b}),k["return"](oi(ma,t,p.status,b,p.url,c))}})})};pi.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(b){return!1}else return!1;return!(!window.fetch||!window.AbortController)};
pi.isSupported=pi.isSupported;pi.g=window.fetch;pi.a=window.AbortController;pi.c=window.ReadableStream;pi.b=window.Headers;pi.isSupported()&&(Ib("http",pi,2),Ib("https",pi,2));function qi(b,c,d,e){var f=new qi.f,g=Date.now(),h=0,k=new Promise(function(k,m){f.open(c.method,b,!0);f.responseType="arraybuffer";f.timeout=c.retryParameters.timeout;f.withCredentials=c.allowCrossSiteCredentials;f.onabort=function(){m(new A(1,1,7001,b,d))};f.onload=function(c){c=c.target;var e=c.getAllResponseHeaders().trim().split("\r\n"),f={};e=q(e);for(var g=e.next();!g.done;g=e.next())g=g.value.split(": "),f[g[0].toLowerCase()]=g.slice(1).join(": ");try{var h=oi(f,c.response,c.status,b,c.responseURL,
d);k(h)}catch(ca){m(ca)}};f.onerror=function(c){m(new A(1,1,1002,b,c,d))};f.ontimeout=function(){m(new A(1,1,1003,b,d))};f.onprogress=function(b){var c=Date.now();if(100<c-g||b.lengthComputable&&b.loaded==b.total)e(c-g,b.loaded-h),h=b.loaded,g=c};for(var l in c.headers)f.setRequestHeader(l.toLowerCase(),c.headers[l]);f.send(c.body)});return new B(k,function(){f.abort();return Promise.resolve()})}y("shaka.net.HttpXHRPlugin",qi);qi.f=window.XMLHttpRequest;Ib("http",qi,1);Ib("https",qi,1);function ri(b,c){this.l=b;this.c=new Map;this.g=!1;this.j=c;this.a=this.b=this.f=0}ri.prototype.destroy=function(){this.g=!0;return Promise.all(this.c.values()).then(function(){},function(){})};
function si(b,c,d,e,f){b.b+=e;var g=b.c.get(c)||Promise.resolve();b.c.set(c,g.then(function(){return r(function k(){var c,g;return v(k,function(k){switch(k.s){case 1:return u(k,ti(b,d),2);case 2:c=k.C;if(b.g)throw new A(2,9,7001);b.f+=e;b.a+=c.byteLength;g=b.b?b.f/b.b:0;b.j(g,b.a);return k["return"](f(c))}})})}))}function ui(b){return r(function d(){return v(d,function(d){switch(d.s){case 1:return u(d,Promise.all(b.c.values()),2);case 2:return d["return"](b.a)}})})}
function ti(b,c){return r(function e(){var f,g;return v(e,function(e){switch(e.s){case 1:return f=b.l.request(1,c),u(e,f.promise,2);case 2:return g=e.C,e["return"](g.data)}})})};function vi(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()}}vi.prototype.abort=function(){try{this.c.abort()}catch(b){}return this.a["catch"](function(){})};
function wi(b,c){return new Promise(function(d,e){var f=b.b.openCursor();f.onerror=e;f.onsuccess=function(b){b=b.target.result;if(!b)return d();c(b.key,b.value,b);b["continue"]()}})}vi.prototype.store=function(){return this.b};vi.prototype.promise=function(){return this.a};function xi(b){this.b=b;this.a=[]}xi.prototype.destroy=function(){return Promise.all(this.a.map(function(b){return b.abort()}))};function yi(b,c){return zi(b,c,"readonly")}function Ai(b,c){return zi(b,c,"readwrite")}function zi(b,c,d){d=b.b.transaction([c],d);var e=new vi(d,c);b.a.push(e);e.promise().then(function(){Bb(b.a,e)},function(){Bb(b.a,e)});return e};function Bi(b){this.a=new xi(b)}Bi.prototype.destroy=function(){return this.a.destroy()};Bi.prototype.getAll=function(){var b=this;return r(function d(){var e,f;return v(d,function(d){switch(d.s){case 1:return e=yi(b.a,"session-ids"),f=[],u(d,wi(e,function(b,d){f.push(d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};Bi.prototype.add=function(b){var c=Ai(this.a,"session-ids"),d=c.store();b=q(b);for(var e=b.next();!e.done;e=b.next())d.add(e.value);return c.promise()};
Bi.prototype.remove=function(b){var c=this;return r(function e(){var f;return v(e,function(e){switch(e.s){case 1:return f=Ai(c.a,"session-ids"),u(e,wi(f,function(c,e,f){0<=b.indexOf(e.sessionId)&&f["delete"]()}),2);case 2:return u(e,f.promise(),0)}})})};function Ci(){this.a=new Map}Ci.prototype.destroy=function(){for(var b=[],c=q(this.a.values()),d=c.next();!d.done;d=c.next())b.push(d.value.destroy());this.a.clear();return Promise.all(b)};Ci.prototype.init=function(){var b=this;Di.forEach(function(c,d){var e=c();e&&b.a.set(d,e)});for(var c=[],d=q(this.a.values()),e=d.next();!e.done;e=d.next())c.push(e.value.init());return Promise.all(c)};
function Ei(b){var c=null;b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){b.hasFixedKeySpace()||c||(c={path:{Ga:e,na:d},na:b})})});if(c)return c;throw new A(2,9,9013,"Could not find a cell that supports add-operations");}function Fi(b,c){b.a.forEach(function(b,e){b.getCells().forEach(function(b,d){c({Ga:e,na:d},b)})})}
function Gi(b,c,d){b=b.a.get(c);if(!b)throw new A(2,9,9013,"Could not find mechanism with name "+c);c=b.getCells().get(d);if(!c)throw new A(2,9,9013,"Could not find cell with name "+d);return c}function Hi(b,c){b.a.forEach(function(b){c(b.getEmeSessionCell())})}function Ii(b){var c=Array.from(b.a.keys());if(!c.length)throw new A(2,9,9E3,"No supported storage mechanisms found");return b.a.get(c[0]).getEmeSessionCell()}
Ci.prototype.erase=function(){var b=this;return r(function d(){var e,f,g;return v(d,function(d){switch(d.s){case 1:return e=Array.from(b.a.values()),f=0<e.length,f||(g=Di,g.forEach(function(b){(b=b())&&e.push(b)})),u(d,Promise.all(e.map(function(b){return b.erase()})),2);case 2:if(f)d.I(0);else return u(d,Promise.all(e.map(function(b){return b.destroy()})),0)}})})};function Ji(b,c){Di.set(b,c)}y("shaka.offline.StorageMuxer.register",Ji);y("shaka.offline.StorageMuxer.unregister",function(b){Di["delete"](b)});
function Ki(){for(var b=q(Di.values()),c=b.next();!c.done;c=b.next())if(c=c.value,c=c())return c.destroy(),!0;return!1}var Di=new Map;function Li(b){this.a=new xi(b)}n=Li.prototype;n.destroy=function(){return this.a.destroy()};n.hasFixedKeySpace=function(){return!0};n.addSegments=function(){return Mi("segment")};n.removeSegments=function(b,c){return Ni(this,"segment",b,c)};n.getSegments=function(b){return Oi(this,"segment",b).then(function(b){return b.map(Pi)})};n.addManifests=function(){return Mi("manifest")};
n.updateManifestExpiration=function(b,c){var d=Ai(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 Ni(this,"manifest",b,c)};n.getManifests=function(b){return Oi(this,"manifest",b).then(function(b){return b.map(Qi)})};
n.getAllManifests=function(){var b=this;return r(function d(){var e,f,g;return v(d,function(d){switch(d.s){case 1:return e=Qi,f=yi(b.a,"manifest"),g=new Map,u(d,wi(f,function(b,d){g.set(b,e(d))}),2);case 2:return u(d,f.promise(),3);case 3:return d["return"](g)}})})};function Mi(b){return Promise.reject(new A(2,9,9011,"Cannot add new value to "+b))}function Ni(b,c,d,e){b=Ai(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
function Oi(b,c,d){b=yi(b.a,c);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 Qi(b){return{originalManifestUri:b.originalManifestUri,duration:b.duration,size:b.size,expiration:null==b.expiration?Infinity:b.expiration,periods:b.periods.map(Ri),sessionIds:b.sessionIds,drmInfo:b.drmInfo,appMetadata:b.appMetadata}}function Ri(b){Si(b);b.streams.forEach(function(){});return{startTime:b.startTime,streams:b.streams.map(Ti)}}
function Ti(b){var c=b.Jf?Ui(b.Jf):null;return{id:b.id,originalId:null,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(Vi),variantIds:b.variantIds}}function Vi(b){var c=Ui(b.uri);return{startTime:b.startTime,endTime:b.endTime,dataKey:c}}
function Pi(b){return{data:b.data}}function Ui(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 Si(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 Wi(b,c,d,e){this.a=new xi(b);this.c=c;this.b=d;this.f=e}n=Wi.prototype;n.destroy=function(){return this.a.destroy()};n.hasFixedKeySpace=function(){return this.f};n.addSegments=function(b){return Xi(this,this.c,b)};n.removeSegments=function(b,c){return Yi(this,this.c,b,c)};n.getSegments=function(b){return Zi(this,this.c,b)};n.addManifests=function(b){return Xi(this,this.b,b)};
n.updateManifestExpiration=function(b,c){var d=Ai(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 Yi(this,this.b,b,c)};n.getManifests=function(b){return Zi(this,this.b,b)};
n.getAllManifests=function(){var b=this;return r(function d(){var e,f;return v(d,function(d){switch(d.s){case 1:return e=yi(b.a,b.b),f=new Map,u(d,wi(e,function(b,d){f.set(b,d)}),2);case 2:return u(d,e.promise(),3);case 3:return d["return"](f)}})})};
function Xi(b,c,d){if(b.f)return Promise.reject(new A(1,9,9011,"Cannot add new value to "+c));b=Ai(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 Yi(b,c,d,e){b=Ai(b.a,c);var f=b.store();d.forEach(function(b){f["delete"](b).onsuccess=function(){return e(b)}});return b.promise()}
function Zi(b,c,d){b=yi(b.a,c);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 $i(){this.g=this.c=this.b=this.a=this.f=null}n=$i.prototype;
n.init=function(){var b=this,c=new z,d=window.indexedDB.open("shaka_offline_db",4);d.onsuccess=function(d){d=d.target.result;b.f=d;var e=d.objectStoreNames;e=e.contains("manifest")&&e.contains("segment")?new Li(d):null;b.a=e;e=d.objectStoreNames;e=e.contains("manifest-v2")&&e.contains("segment-v2")?new Wi(d,"segment-v2","manifest-v2",!0):null;b.b=e;e=d.objectStoreNames;e=e.contains("manifest-v3")&&e.contains("segment-v3")?new Wi(d,"segment-v3","manifest-v3",!1):null;b.c=e;d=d.objectStoreNames.contains("session-ids")?
new Bi(d):null;b.g=d;c.resolve()};d.onupgradeneeded=function(b){b=b.target.result;for(var c=q(["segment-v3","manifest-v3","session-ids"]),d=c.next();!d.done;d=c.next())d=d.value,b.objectStoreNames.contains(d)||b.createObjectStore(d,{autoIncrement:!0})};d.onerror=function(b){c.reject(new A(2,9,9001,d.error));b.preventDefault()};return c};
n.destroy=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:if(!b.a){d.I(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.I(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.I(6);break}return u(d,b.c.destroy(),6);case 6:if(!b.g){d.I(8);break}return u(d,b.g.destroy(),8);case 8:b.f&&b.f.close(),d.s=0}})})};n.getCells=function(){var b=new Map;this.a&&b.set("v1",this.a);this.b&&b.set("v2",this.b);this.c&&b.set("v3",this.c);return b};n.getEmeSessionCell=function(){return this.g};
n.erase=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:if(!b.a){d.I(2);break}return u(d,b.a.destroy(),2);case 2:if(!b.b){d.I(4);break}return u(d,b.b.destroy(),4);case 4:if(!b.c){d.I(6);break}return u(d,b.c.destroy(),6);case 6:return b.f&&b.f.close(),u(d,aj(),8);case 8:return b.f=null,b.a=null,b.b=null,b.c=null,u(d,b.init(),0)}})})};
function aj(){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}Ji("idb",function(){return window.indexedDB?new $i:null});function bj(b,c,d,e){this.a=b;this.g=c;this.f=d;this.c=e;this.b=["offline:",b,"/",c,"/",d,"/",e].join("")}bj.prototype.Ga=function(){return this.g};bj.prototype.na=function(){return this.f};bj.prototype.key=function(){return this.c};bj.prototype.toString=function(){return this.b};
function cj(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 bj(c,d,e,Number(b[4])):null};function dj(b,c){this.b=b;this.a=c}function ej(b,c){var d=new S(null,0);d.Ia(c.duration);var e=c.periods.map(function(c){return fj(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 fj(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=gj(b,e,f);f=c.streams.filter(function(b){return"text"==b.contentType}).map(function(c){return hj(b,c)});c.streams.forEach(function(e){e=e.segments.map(function(c,d){return ij(b,d,c)});d.Cb(e,c.startTime)});return{startTime:c.startTime,variants:Array.from(e.values()),textStreams:f}}
function gj(b,c,d){for(var e=new Set,f=q(c),g=f.next();!g.done;g=f.next()){var h=q(g.value.variantIds);for(g=h.next();!g.done;g=h.next())e.add(g.value)}f=q(d);for(g=f.next();!g.done;g=f.next())for(h=q(g.value.variantIds),g=h.next();!g.done;g=h.next())e.add(g.value);f=new Map;e=q(e);for(g=e.next();!g.done;g=e.next())g=g.value,f.set(g,{id:g,language:"",primary:!1,audio:null,video:null,bandwidth:0,drmInfos:[],allowedByApplication:!0,allowedByKeySystem:!0});c=q(c);for(e=c.next();!e.done;e=c.next())for(e=
e.value,g=hj(b,e),h=q(e.variantIds),e=h.next();!e.done;e=h.next())e=f.get(e.value),e.language=g.language,e.primary=e.primary||g.primary,e.audio=g;d=q(d);for(c=d.next();!c.done;c=d.next())for(e=c.value,c=hj(b,e),g=q(e.variantIds),e=g.next();!e.done;e=g.next())e=f.get(e.value),e.primary=e.primary||c.primary,e.video=c;return f}
function hj(b,c){var d=c.segments.map(function(c,d){return ij(b,d,c)}),e=new Q(d);d={id:c.id,originalId:c.originalId,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,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};null!=c.initSegmentKey&&(d.initSegmentReference=jj(b,c.initSegmentKey));return d}function ij(b,c,d){var e=new bj("segment",b.b,b.a,d.dataKey);return new N(c,d.startTime,d.endTime,function(){return[e.toString()]},0,null)}function jj(b,c){var d=new bj("segment",b.b,b.a,c);return new Le(function(){return[d.toString()]},0,null)};function kj(b){this.a=!1;this.b=new z;this.c=b}kj.prototype.destroy=function(){var b=this;if(this.a)return this.b;this.a=!0;return this.c().then(function(){b.b.resolve()},function(){b.b.resolve()})};function lj(b,c){return r(function e(){return v(e,function(e){switch(e.s){case 1:return Aa(e,2),u(e,Promise.resolve(c()),4);case 4:return e["return"](e.C);case 2:return Da(e),u(e,Promise.all(b.map(function(b){return b.destroy()})),5);case 5:Ea(e,0)}})})};function mj(){this.a=null}n=mj.prototype;n.configure=function(){};n.start=function(b){var c=cj(b);this.a=c;if(null==c||"manifest"!=c.a)return Promise.reject(new A(2,1,9004,c));var d=new Ci;return lj([d],function(){return r(function f(){var b,h,k,l;return v(f,function(f){switch(f.s){case 1:return u(f,d.init(),2);case 2:return u(f,Gi(d,c.Ga(),c.na()),3);case 3:return b=f.C,u(f,b.getManifests([c.key()]),4);case 4:return h=f.C,k=h[0],l=new dj(c.Ga(),c.na()),f["return"](ej(l,k))}})})})};n.stop=function(){return Promise.resolve()};
n.update=function(){};n.onExpirationUpdated=function(b,c){var d=this.a,e=new Ci;return lj([e],function(){return r(function g(){var h,k,l,m,p;return v(g,function(g){switch(g.s){case 1:return u(g,e.init(),2);case 2:return u(g,Gi(e,d.Ga(),d.na()),3);case 3:return h=g.C,u(g,h.getManifests([d.key()]),4);case 4:k=g.C;l=k[0];m=l.sessionIds.includes(b);p=void 0==l.expiration||l.expiration>c;if(m&&p)return u(g,h.updateManifestExpiration(d.key(),c),0);g.I(0)}})})})["catch"](function(){})};
sf["application/x-offline-manifest"]=mj;function nj(b){var c=cj(b);return c&&"manifest"==c.a?nj.a(b):c&&"segment"==c.a?nj.b(c.key(),c):sb(new A(2,1,9004,b))}y("shaka.offline.OfflineScheme",nj);nj.a=function(b){b={uri:b,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}};return ub(b)};
nj.b=function(b,c){var d=new Ci,e=lj([d],function(){return r(function g(){var b,e,l;return v(g,function(g){switch(g.s){case 1:return u(g,d.init(),2);case 2:return u(g,Gi(d,c.Ga(),c.na()),3);case 3:return b=g.C,u(g,b.getSegments([c.key()]),4);case 4:return e=g.C,l=e[0],g["return"]({uri:c,data:l.data,headers:{}})}})})});return vb(e)};Ib("offline",nj);function oj(b,c,d){return r(function f(){var g,h,k,l,m,p;return v(f,function(f){switch(f.s){case 1:g=[];for(var t=[],x=q(d),F=x.next();!F.done;F=x.next()){F=F.value;for(var R=!1,ca=q(t),da=ca.next();!da.done;da=ca.next())if(da=da.value,pj(da.info,F)){da.sessionIds.push(F.sessionId);R=!0;break}R||t.push({info:F,sessionIds:[F.sessionId]})}h=q(t);k=h.next();case 2:if(k.done){f.I(4);break}l=k.value;m=qj(b,c,l);return u(f,m,5);case 5:p=f.C;g=g.concat(p);k=h.next();f.I(2);break;case 4:return f["return"](g)}})})}
function qj(b,c,d){return r(function f(){var g,h;return v(f,function(f){switch(f.s){case 1:return g=new nc({Pb:c,onError:function(){},Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),za(f,2),g.configure(b),u(f,vc(g,d.info.keySystem,d.info.licenseUri,d.info.serverCertificate,d.info.audioCapabilities,d.info.videoCapabilities),4);case 4:Ba(f,3);break;case 2:return Ca(f),u(f,g.destroy(),5);case 5:return f["return"]([]);case 3:return za(f,6),u(f,Cc(g),8);case 8:Ba(f,7);break;case 6:return Ca(f),
u(f,g.destroy(),9);case 9:return f["return"]([]);case 7:return h=[],u(f,Promise.all(d.sessionIds.map(function(b){return r(function p(){return v(p,function(c){switch(c.s){case 1:return za(c,2),u(c,Fc(g,b),4);case 4:h.push(b);Ba(c,0);break;case 2:Ca(c),c.s=0}})})})),10);case 10:return u(f,g.destroy(),11);case 11:return f["return"](h)}})})}
function pj(b,c){function d(b,c){return b.robustness==c.robustness&&b.contentType==c.contentType}return b.keySystem==c.keySystem&&b.licenseUri==c.licenseUri&&Db(b.audioCapabilities,c.audioCapabilities,d)&&Db(b.videoCapabilities,c.videoCapabilities,d)};function rj(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 d?void 0===c[k]?void 0===m||g?delete b[k]:b[k]=zb(m):m.constructor==Object&&c[k]&&c[k].constructor==Object?(b[k]||(b[k]=zb(m)),l=rj(b[k],c[k],m,e,l),h=h&&l):typeof c[k]!=typeof m||null==c[k]||c[k].constructor!=m.constructor?h=!1:b[k]=c[k]:h=!1}return h}y("shaka.util.ConfigUtils.mergeConfigObjects",rj);function sj(){var b=5E5,c=Infinity;navigator.connection&&navigator.connection.type&&(b=1E6*navigator.connection.downlink,navigator.connection.saveData&&(c=360));var d={trackSelectionCallback:function(b){return b},progressCallback:function(){},usePersistentLicense:!0},e={drm:{retryParameters:pb(),servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1},manifest:{retryParameters:pb(),availabilityWindowOverride:NaN,dash:{customScheme:function(b){if(b)return null},clockSyncUri:"",ignoreDrmInfo:!1,
xlinkFailGracefully:!1,defaultPresentationDelay:10,ignoreMinBufferTime:!1,autoCorrectDrift:!0}},streaming:{retryParameters:pb(),failureCallback:function(){},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5},offline:d,abrFactory:K,abr:{enabled:!0,defaultBandwidthEstimate:b,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,
restrictions:{minWidth:0,maxWidth:Infinity,minHeight:0,maxHeight:c,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,textDisplayFactory:function(){return null}};d.trackSelectionCallback=
function(b){return tj(b,e.preferredAudioLanguage)};return e}function uj(b,c,d){return rj(b,c,d||sj(),{".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",serverCertificate:new Uint8Array(0),individualizationServer:""}},"")}
function tj(b,c){var d=b.filter(function(b){return"variant"==b.type}),e=[],f=Md(c,d.map(function(b){return b.language}));f&&(e=d.filter(function(b){return I(b.language)==f}));0==e.length&&(e=d.filter(function(b){return b.primary}));0==e.length&&(d.map(function(b){return b.language}),e=d);var g=e.filter(function(b){return b.height&&480>=b.height});g.length&&(g.sort(function(b,c){return c.height-b.height}),e=g.filter(function(b){return b.height==g[0].height}));d=[];if(e.length){var h=Math.floor(e.length/
2);e.sort(function(b,c){return b.bandwidth-c.bandwidth});d.push(e[h])}e=q(b);for(h=e.next();!h.done;h=e.next())h=h.value,"text"==h.type&&d.push(h);return d};function vj(b){this.c=b;this.a=null;this.b=[]}function wj(b){function c(b){return{timestamp:b.timestamp,state:b.state,duration:b.duration}}for(var d=[],e=q(b.b),f=e.next();!f.done;f=e.next())d.push(c(f.value));b.a&&d.push(c(b.a));return d}function xj(b,c){return c?"buffering":b.c.ended?"ended":b.c.paused?"paused":"playing"};function yj(){this.b=this.c=null;this.a=[]}function zj(b,c,d){b.b!=c&&(b.b=c,b.a.push({timestamp:Date.now()/1E3,id:c.id,type:"text",fromAdaptation:d,bandwidth:null}))};function Aj(b){this.m=this.A=NaN;this.b=this.j=0;this.l=this.w=this.f=this.g=this.u=this.v=NaN;this.c=null;this.o=new vj(b);this.a=new yj}function Bj(b,c){var d=Date.now()/1E3,e=null==b.c?0:d-b.c;c?b.b+=e:b.j+=e;b.c=d};function T(b,c){var d=this;D.call(this);this.f=null;this.ha=!1;this.u=new Nb;this.Qa=this.g=this.V=this.c=this.o=this.a=this.H=this.P=this.l=this.v=this.j=this.A=null;this.tb=1E9;this.ua=new Set;this.aa=!1;this.S=!0;this.F=this.Ea=this.K=null;this.sb=!1;this.Za=0;this.B=null;this.w=new Mg;this.b=Cj(this);this.Da={width:Infinity,height:Infinity};this.m=null;this.qa=new Ug(this.b.preferredAudioLanguage,this.b.preferredVariantRole,this.b.preferredAudioChannelCount);this.G=this.b.preferredTextLanguage;
this.$=this.b.preferredTextRole;c&&c(this);this.A=Dj(this);b&&this.bc(b,!0);this.ea=new kj(function(){d.u&&(d.u.R(),d.u=null);var b=[];d.A&&(b.push(d.A.destroy()),d.A=null);d.ha=!1;d.u=null;d.g=null;d.Qa=null;d.b=null;return Promise.all(b)});G(this.u,window,"online",function(){d.dd()})}Pa(T,D);y("shaka.Player",T);function Ej(b){if(!b.K)return Promise.resolve();var c=Promise.resolve();b.o&&(c=b.o.stop(),b.o=null);return Promise.all([c,b.K()])}
T.prototype.destroy=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:return u(d,b.detach(),2);case 2:return u(d,b.ea.destroy(),0)}})})};T.prototype.destroy=T.prototype.destroy;T.version="v2.5.0-beta3-uncompiled";var Fj=["2","5"];Qd=new function(b){this.a=b;this.c=Rd;this.b=Sd}(new Od(Number(Fj[0]),Number(Fj[1])));var Gj=["output-restricted","internal-error"],Hj={};T.registerSupportPlugin=function(b,c){Hj[b]=c};
function Ij(){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}T.isBrowserSupported=Ij;T.probeSupport=function(){return Qc().then(function(b){var c=uf(),d=vd();b={manifest:c,media:d,drm:b};for(var e in Hj)b[e]=Hj[e]();return b})};
T.prototype.bc=function(b,c){var d=this;return r(function f(){return v(f,function(f){switch(f.s){case 1:void 0===c&&(c=!0);if(!d.f){f.I(2);break}return u(f,d.detach(),2);case 2:d.f=b;G(d.u,d.f,"error",d.sg.bind(d));if(c)return d.v=Jj(d),u(f,d.v.u,0);f.I(0)}})})};T.prototype.attach=T.prototype.bc;T.prototype.detach=function(){var b=this;return r(function d(){return v(d,function(d){switch(d.s){case 1:return b.f?u(d,b.$b(!1),2):d["return"]();case 2:b.u.Ja(b.f,"error"),b.f=null,d.s=0}})})};
T.prototype.detach=T.prototype.detach;function Kj(b,c,d){return r(function f(){var g;return v(f,function(f){switch(f.s){case 1:return u(f,vf(c,b.A,b.b.manifest.retryParameters,d),2);case 2:return g=f.C,f["return"](g)}})})}
function Lj(b){b.H=new Bh;Ch(b.H,function(c){Mj(b,"timelineregionadded",c)});return b.o.start(b.V,{networkingEngine:b.A,filterNewPeriod:b.Gc.bind(b),filterAllPeriods:b.Cd.bind(b),onTimelineRegionAdded:function(c){var d=b.H;a:{var e=q(d.a);for(var f=e.next();!f.done;f=e.next())if(f=f.value,f.schemeIdUri==c.schemeIdUri&&f.startTime==c.startTime&&f.endTime==c.endTime){e=f;break a}e=null}null==e&&(d.a.add(c),d.b(c))},onEvent:b.Zb.bind(b),onError:b.jb.bind(b)})}
function Nj(b){function c(b){return b.video&&b.audio||b.video&&b.video.codecs.includes(",")}b.c.periods.some(function(b){return b.variants.some(c)})&&b.c.periods.forEach(function(b){b.variants=b.variants.filter(c)});if(0==b.c.periods.length)throw new A(2,4,4014);}
T.prototype.load=function(b,c,d){c=void 0===c?null:c;var e=this;return r(function g(){var h,k,l,m,p,t,w,x,F,R,ca,da,ma,ra,Ra;return v(g,function(g){switch(g.s){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 C("loading"));za(g,2);m=e.f;p=e.$b();e.K=l;return u(g,p,4);case 4:e.m=new Aj(m);e.m.g=Date.now()/1E3;G(e.u,m,"playing",function(){Oj(e)});G(e.u,m,"pause",function(){Oj(e)});G(e.u,m,"ended",function(){Oj(e)});t=e.b.abrFactory;e.g&&e.Qa==
t||(e.Qa=t,e.g=new t,e.g.configure(e.b.abr));if(h)throw h;x=w=null;d&&("string"==typeof d?x=d:(Pd("Loading with a manifest parser factory","Please register a manifest parser and for the mime-type."),w=d));F=e;if(w){R=new w;g.I(5);break}return u(g,Kj(e,b,x),6);case 6:R=g.C;case 5:return F.o=R,e.o.configure(e.b.manifest),e.V=b,u(g,Lj(e),7);case 7:ca=g.C;e.c=ca;if(h)throw h;Nj(e);da=e;return u(g,Pj(e,ca),8);case 8:da.j=g.C;if(h)throw h;e.Cd(e.c.periods);Qj(e,e.c.periods);e.qa=new Ug(e.b.preferredAudioLanguage,
e.b.preferredVariantRole,e.b.preferredAudioChannelCount);e.G=e.b.preferredTextLanguage;Rj(e.c.presentationTimeline,e.b.playRangeStart,e.b.playRangeEnd);return u(g,e.j.bc(m),9);case 9:if(h)throw h;e.g.init(function(b,c,d){c=void 0===c?!1:c;d=void 0===d?0:d;Sj(e,e.c.periods[J.jf(e.c,b)],b,!0);e.a&&(Uh(e.a,b,c,d),Tj(e))});e.v||(e.v=Jj(e));e.l=new wh(e.f,e.c.presentationTimeline,e.c.minBufferTime||0,e.b.streaming,c,e.Vg.bind(e),e.Zb.bind(e));e.P=Uj(e);e.a=Vj(e);e.a.configure(e.b.streaming);Wj(e);e.dispatchEvent(new C("streaming"));
return u(g,e.a.init(),10);case 10:if(h)throw h;e.b.streaming.startAtSegmentBoundary&&(ma=Xj(e,zh(e.l)),th(e.l.b,ma));e.c.periods.forEach(e.Gc.bind(e));Yj(e);Tj(e);ra=Zj(e);ra.variants.some(function(b){return b.primary});ak(e,ra.variants);Qb(e.u,m,"loadeddata",function(){e.m.f=Date.now()/1E3});if(h)throw h;e.K=null;Ba(g,0);break;case 2:return Ra=Ca(g),k.resolve(),e.K==l&&(e.K=null,e.dispatchEvent(new C("unloading"))),g["return"](Promise.reject(h||Ra))}})})};T.prototype.load=T.prototype.load;
function Wj(b){function c(b){var c="";b.video&&(c=$b(b.video.codecs)[0]);var d="";b.audio&&(d=$b(b.audio.codecs)[0]);return c+"-"+d}var d=b.c.periods.reduce(function(b,c){return b.concat(c.variants)},[]);d=J.Ed(d,b.b.preferredAudioChannelCount);var e=new yb;d.forEach(function(b){var d=c(b);e.push(d,b)});var f=null,g=Infinity;e.forEach(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.c.periods.forEach(function(b){b.variants=b.variants.filter(function(b){return c(b)==
f?!0:!1})})}function Pj(b,c){return r(function e(){var f,g,h;return v(e,function(e){switch(e.s){case 1:return f={Pb:b.A,onError:function(c){b.jb(c)},Xc:function(c){bk(b,c)},onExpirationUpdated:function(c,e){if(b.o&&b.o.onExpirationUpdated)b.o.onExpirationUpdated(c,e);b.dispatchEvent(new C("expirationupdated"))},onEvent:function(c){b.Zb(c)}},g=new nc(f),g.configure(b.b.drm),h=J.Id(c),u(e,uc(g,h,c.offlineSessionIds),2);case 2:return e["return"](g)}})})}
function Dj(b){return new E(function(c,d){b.g&&b.g.segmentDownloaded(c,d)})}
function Uj(b){var c=new ph(b.c);qh(c,function(){Yj(b)});var d=new Dh(b.H);Hh(d,function(c){Mj(b,"timelineregionenter",c)},function(c){Mj(b,"timelineregionexit",c)},function(c,d){d||(Mj(b,"timelineregionenter",c),Mj(b,"timelineregionexit",c))});var e=new Zg(Math.max(b.c.minBufferTime,b.b.streaming.rebufferingGoal),function(c){return Yc(b.f.buffered,c)},function(){var c;a:if((c=b.f.ended)||(c=b.v,c=c.g?"ended"==c.g.readyState:!0),c)c=!0;else{if(b.c.presentationTimeline.Z()&&(c=b.c.presentationTimeline.xb(),
Wc(b.f.buffered)>=c)){c=!0;break a}c=!1}return c});bh(e,function(){return ck(b,!0)},function(){return ck(b,!1)});var f=new Xg(b.f);f.a.add(c);f.a.add(d);f.a.add(e);return f}function Jj(b){var c=window.muxjs?new Uc:new Vc,d=new b.b.textDisplayFactory;d.setTextVisibility(b.ha);return new td(b.f,c,d)}function Vj(b){return new Ih(b.c,{vb:function(){return zh(b.l)},T:b.v,Pb:b.A,Yd:b.Wf.bind(b),Xd:b.$e.bind(b),onError:b.jb.bind(b),onEvent:b.Zb.bind(b),cg:b.dg.bind(b),Tb:b.pg.bind(b)})}
T.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=uj(this.b,b,Cj(this));dk(this);return d};T.prototype.configure=T.prototype.configure;
function dk(b){b.o&&b.o.configure(b.b.manifest);b.j&&b.j.configure(b.b.drm);if(b.a){b.a.configure(b.b.streaming);try{b.c.periods.forEach(b.Gc.bind(b))}catch(f){b.jb(f)}var c=Lh(b.a),d=Nh(b.a),e=Zj(b);c=J.Nd(c,d,e.variants);b.g&&c&&c.allowedByApplication&&c.allowedByKeySystem?ak(b,e.variants):ek(b,e)}b.g&&(b.g.configure(b.b.abr),b.b.abr.enabled&&!b.S?b.g.enable():b.g.disable())}T.prototype.getConfiguration=function(){var b=Cj(this);uj(b,this.b,Cj(this));return b};T.prototype.getConfiguration=T.prototype.getConfiguration;
T.prototype.Ng=function(){for(var b in this.b)delete this.b[b];uj(this.b,Cj(this),Cj(this));dk(this)};T.prototype.resetConfiguration=T.prototype.Ng;T.prototype.Af=function(){return this.f};T.prototype.getMediaElement=T.prototype.Af;T.prototype.Jb=function(){return this.A};T.prototype.getNetworkingEngine=T.prototype.Jb;T.prototype.Hc=function(){return this.V};T.prototype.getAssetUri=T.prototype.Hc;T.prototype.zf=function(){Pd("getManifestUri",'Please use "getAssetUri" instead.');return this.V};
T.prototype.getManifestUri=T.prototype.zf;T.prototype.Z=function(){return this.c?this.c.presentationTimeline.Z():!1};T.prototype.isLive=T.prototype.Z;T.prototype.fb=function(){return this.c?this.c.presentationTimeline.fb():!1};T.prototype.isInProgress=T.prototype.fb;T.prototype.Lf=function(){if(!this.c||!this.c.periods.length)return!1;var b=this.c.periods[0].variants;return b.length?!b[0].video:!1};T.prototype.isAudioOnly=T.prototype.Lf;
T.prototype.ib=function(){var b=0,c=0;this.c&&(c=this.c.presentationTimeline,b=c.wb(),c=c.Ma());return{start:b,end:c}};T.prototype.seekRange=T.prototype.ib;T.prototype.keySystem=function(){return this.j?this.j.keySystem():""};T.prototype.keySystem=T.prototype.keySystem;T.prototype.drmInfo=function(){return this.j?this.j.a:null};T.prototype.drmInfo=T.prototype.drmInfo;T.prototype.kc=function(){return this.j?this.j.kc():Infinity};T.prototype.getExpiration=T.prototype.kc;T.prototype.Td=function(){return this.aa};
T.prototype.isBuffering=T.prototype.Td;T.prototype.$b=function(b){var c=this;return r(function e(){return v(e,function(e){switch(e.s){case 1:if(c.ea.a)return e["return"]();void 0===b&&(b=!0);c.dispatchEvent(new C("unloading"));return u(e,Ej(c),2);case 2:return c.Ea||(c.Ea=fk(c).then(function(){ck(c,!1);c.Ea=null})),u(e,c.Ea,3);case 3:if(b)return c.v=Jj(c),u(e,c.v.u,0);e.I(0)}})})};T.prototype.unload=T.prototype.$b;T.prototype.bb=function(){return this.l?this.l.bb():0};
T.prototype.getPlaybackRate=T.prototype.bb;T.prototype.nd=function(b){this.l&&vh(this.l.b,b);this.a&&Sh(this.a,1!=b)};T.prototype.trickPlay=T.prototype.nd;T.prototype.ud=function(){this.l&&vh(this.l.b,1);this.a&&Sh(this.a,!1)};T.prototype.cancelTrickPlay=T.prototype.ud;T.prototype.mc=function(){for(var b=gk(this),c=[],d=q(hk(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=J.pd(e);f.active=e==b;c.push(f)}return c};T.prototype.getVariantTracks=T.prototype.mc;
T.prototype.lc=function(){var b=Zj(this);if(null==b)b=null;else{if(!Ng(this.w,b).text){var c=J.fc(b.textStreams,this.G,this.$);c.length&&(c=c[0],Ng(this.w,b).text=c)}b=Ng(this.w,b).text}c=[];for(var d=q(ik(this)),e=d.next();!e.done;e=d.next()){e=e.value;var f=J.kd(e);f.active=e==b;c.push(f)}return c};T.prototype.getTextTracks=T.prototype.lc;T.prototype.ze=function(b){var c=Zj(this);null!=c&&(b=J.kf(c,b))&&(Ng(this.w,c).text=b,zj(this.m.a,b,!1),jk(this,b),this.G=b.language)};
T.prototype.selectTextTrack=T.prototype.ze;T.prototype.Qg=function(){Pd("selectEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. Please use SelectTextTrack.");var b=this.lc().filter(function(b){return"application/cea-608"==b.mimeType});0<b.length&&this.ze(b[0])};T.prototype.selectEmbeddedTextTrack=T.prototype.Qg;
T.prototype.ih=function(){Pd("usingEmbeddedTextTrack","If closed captions are signaled in the manifest, a text stream will be created to represent them. There should be no reason to know if the player is playing embedded text.");var b=this.a?Mh(this.a,"text"):null;return null!=b&&"application/cea-608"==b.mimeType};T.prototype.usingEmbeddedTextTrack=T.prototype.ih;
T.prototype.Ae=function(b,c,d){d=void 0===d?0:d;var e=Zj(this);null!=e&&(this.b.abr.enabled&&Wa("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack()."),(b=J.lf(e,b))&&J.yb(b)&&(Sj(this,e,b,!1),kk(this,b,c,d),this.qa=new Tg(b),ak(this,e.variants)))};T.prototype.selectVariantTrack=T.prototype.Ae;
T.prototype.Jd=function(){for(var b=[],c=q(hk(this)),d=c.next();!d.done;d=c.next())b.push(d.value.audio);return lk(b)};T.prototype.getAudioLanguagesAndRoles=T.prototype.Jd;T.prototype.Md=function(){return lk(ik(this))};T.prototype.getTextLanguagesAndRoles=T.prototype.Md;T.prototype.nf=function(){for(var b=[],c=q(hk(this)),d=c.next();!d.done;d=c.next())b.push(d.value.audio);return Array.from(mk(b))};T.prototype.getAudioLanguages=T.prototype.nf;T.prototype.Ff=function(){return Array.from(mk(ik(this)))};
T.prototype.getTextLanguages=T.prototype.Ff;T.prototype.xe=function(b,c){var d=Zj(this);null!=d&&(this.qa=new Ug(b,c||"",0),ek(this,d))};T.prototype.selectAudioLanguage=T.prototype.xe;T.prototype.ye=function(b,c){var d=Zj(this);null!=d&&(this.G=b,this.$=c||"",ek(this,d))};T.prototype.selectTextLanguage=T.prototype.ye;T.prototype.zb=function(){return this.ha};T.prototype.isTextTrackVisible=T.prototype.zb;
T.prototype.wc=function(b){var c=this;return r(function e(){var f,g,h,k;return v(e,function(e){switch(e.s){case 1:if(b==c.ha)return e["return"]();c.v&&c.v.m.setTextVisibility(b);c.ha=b;nk(c);if(c.b.streaming.alwaysStreamText||!c.a)return e["return"]();f=J;if(b){if(g=Zj(c),h=f.fc(g.textStreams,c.G,c.$),k=h[0])return u(e,Oh(c.a,k),0)}else{var l=c.a;l.A=!0;var p=l.c.get("text");p&&(Jh(p),l.c["delete"]("text"))}e.I(0)}})})};T.prototype.setTextTrackVisibility=T.prototype.wc;
T.prototype.Cf=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f+1E3*this.f.currentTime):null};T.prototype.getPlayheadTimeAsDate=T.prototype.Cf;T.prototype.Ef=function(){return this.c?new Date(1E3*this.c.presentationTimeline.f):null};T.prototype.getPresentationStartTimeAsDate=T.prototype.Ef;T.prototype.Ic=function(){return this.v?this.v.Ic():{total:[],audio:[],video:[],text:[]}};T.prototype.getBufferedInfo=T.prototype.Ic;
T.prototype.getStats=function(){if(null==this.m)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,estimatedBandwidth:NaN,loadLatency:NaN,playTime:NaN,bufferingTime:NaN,switchHistory:[],stateHistory:[]};Bj(this.m,this.aa);Oj(this);var b=this.f;if(b.getVideoPlaybackQuality){b=b.getVideoPlaybackQuality();var c=this.m,d=Number(b.totalVideoFrames);c.v=Number(b.droppedVideoFrames);c.u=d}if(b=gk(this))this.m.w=b.bandwidth;b&&b.video&&(c=this.m,d=b.video.height||NaN,c.A=
b.video.width||NaN,c.m=d);this.g&&(b=this.g.getBandwidthEstimate(),this.m.l=b);b=this.m;c=b.A;d=b.m;for(var e=b.w,f=b.u,g=b.v,h=b.l,k=b.f>b.g?b.f-b.g:NaN,l=b.j,m=b.b,p=[],t=q(b.a.a),w=t.next();!w.done;w=t.next())w=w.value,p.push({timestamp:w.timestamp,id:w.id,type:w.type,fromAdaptation:w.fromAdaptation,bandwidth:w.bandwidth});return{width:c,height:d,streamBandwidth:e,decodedFrames:f,droppedFrames:g,estimatedBandwidth:h,loadLatency:k,playTime:l,bufferingTime:m,switchHistory:p,stateHistory:wj(b.o)}};
T.prototype.getStats=T.prototype.getStats;
T.prototype.addTextTrack=function(b,c,d,e,f,g){var h=Zj(this);if(null==h)return Promise.reject();var k=this.c.periods.indexOf(h)+1,l=(k>=this.c.periods.length?this.c.presentationTimeline.ka():this.c.periods[k].startTime)-h.startTime;if(Infinity==l)return Promise.reject(new A(1,4,4033));var m={id:this.tb++,originalId:null,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return 1},getSegmentReference:function(c){return 1!=c?null:new N(1,0,l,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,emsgSchemeIdUris:null,roles:[],channelsCount:null,closedCaptions:null};this.ua.add(m);h.textStreams.push(m);return Oh(this.a,m).then(function(){if(!this.ea.a){var b=Mh(this.a,"text");b&&(Ng(this.w,h).text=b);this.ua["delete"](m);ek(this,h);Yj(this);return{id:m.id,active:!1,type:"text",bandwidth:0,language:c,label:g||null,kind:d,
width:null,height:null}}}.bind(this))};T.prototype.addTextTrack=T.prototype.addTextTrack;T.prototype.gd=function(b,c){this.Da.width=b;this.Da.height=c};T.prototype.setMaxHardwareResolution=T.prototype.gd;T.prototype.dd=function(){if(this.a){var b=this.a;if(b.f)b=!1;else if(b.o)b=!1;else{for(var c=q(b.c.values()),d=c.next();!d.done;d=c.next())d=d.value,d.Nb&&(d.Nb=!1,Rh(b,d,.1));b=!0}}else b=!1;return b};T.prototype.retryStreaming=T.prototype.dd;T.prototype.yf=function(){return this.c};
T.prototype.getManifest=T.prototype.yf;function Sj(b,c,d,e){Ng(b.w,c).variant=d;b=b.m.a;b.c!=d&&(b.c=d,b.a.push({timestamp:Date.now()/1E3,id:d.id,type:"variant",fromAdaptation:e,bandwidth:d.bandwidth}))}
function fk(b){b.u&&(b.u.Ja(b.f,"loadeddata"),b.u.Ja(b.f,"playing"),b.u.Ja(b.f,"pause"),b.u.Ja(b.f,"ended"));b.P&&(b.P.R(),b.P=null);b.l&&(b.l.R(),b.l=null);var c=b.j,d=Promise.all([b.g?b.g.stop():null,b.v?b.v.destroy():null,b.a?b.a.destroy():null,b.o?b.o.stop():null]).then(function(){return c?c.destroy():null});b.H&&(b.H.R(),b.H=null);b.S=!0;b.j=null;b.v=null;b.a=null;b.o=null;b.c=null;b.V=null;b.w.a.clear();b.ua.clear();b.m=null;return d}
function Cj(b){var c=sj();c.streaming.failureCallback=function(c){var d=[1001,1002,1003];b.Z()&&d.includes(c.code)&&(c.severity=1,b.dd())};c.textDisplayFactory=function(){return new ok(b.f)};return c}
function Qj(b,c){for(var d=0;d<c.length;d++){for(var e=c[d],f=new Map,g=q(e.variants),h=g.next();!h.done;h=g.next())if(h=h.value,h.video&&h.video.closedCaptions){h=h.video;for(var k=q(h.closedCaptions.keys()),l=k.next();!l.done;l=k.next())if(l=l.value,!f.has(l)){var m={id:b.tb++,originalId:l,createSegmentIndex:Promise.resolve.bind(Promise),findSegmentPosition:function(){return null},getSegmentReference:function(){return null},initSegmentReference:null,presentationTimeOffset:0,mimeType:"application/cea-608",
codecs:"",kind:"caption",encrypted:!1,keyId:null,language:h.closedCaptions.get(l),label:null,type:"text",primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:h.roles,channelsCount:null,closedCaptions:null};f.set(l,m)}}f=q(f.values());for(g=f.next();!g.done;g=f.next())e.textStreams.push(g.value)}}n=T.prototype;
n.Cd=function(b){var c=this.a?Lh(this.a):null,d=this.a?Nh(this.a):null;b.forEach(J.filterNewPeriod.bind(null,this.j,c,d));c=Cb(b,function(b){return b.variants.some(J.yb)});if(0==c)throw new A(2,4,4032);if(c<b.length)throw new A(2,4,4011);b.forEach(function(b){J.rd(b.variants,this.b.restrictions,this.Da)&&this.a&&Zj(this)==b&&Yj(this);pk(this,b.variants)}.bind(this))};
n.Gc=function(b){var c=this.a?Lh(this.a):null,d=this.a?Nh(this.a):null;J.filterNewPeriod(this.j,c,d,b);c=b.variants;if(!c.some(J.yb))throw new A(2,4,4011);pk(this,b.variants);J.rd(c,this.b.restrictions,this.Da)&&this.a&&Zj(this)==b&&Yj(this);if(b=this.j?this.j.a:null)for(c=q(c),d=c.next();!d.done;d=c.next()){d=q(d.value.drmInfos);for(var e=d.next();!e.done;e=d.next())if(e=e.value,e.keySystem==b.keySystem){e=q(e.initData||[]);for(var f=e.next();!f.done;f=e.next())f=f.value,Ec(this.j,f.initDataType,
f.initData)}}};function kk(b,c,d,e){d=void 0===d?!1:d;e=void 0===e?0:e;b.S?(b.F=c,b.sb=d,b.Za=e):(Uh(b.a,c,d,e),qk(b,new C("variantchanged")))}function jk(b,c){b.S?b.B=c:(Th(b.a,c,!0,0),qk(b,new C("textchanged")))}function Xj(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=Lh(b.a),f=Nh(b.a),g=Zj(b);e=d(e,c);f=d(f,c);return null!=f&&null!=e?Math.max(f,e):null!=f?f:null!=e?e:c}
function ck(b,c){b.m&&Bj(b.m,b.aa);b.aa=c;Oj(b);if(b.l){var d=b.l.b;c!=d.g&&(d.g=c,vh(d,d.f))}b.dispatchEvent(new C("buffering",{buffering:c}))}function Oj(b){if(b.m){var c=b.m.o,d=b.aa;null==c.a?c.a={timestamp:Date.now()/1E3,state:xj(c,d),duration:0}:(b=Date.now()/1E3,d=xj(c,d),c.a.duration=b-c.a.timestamp,c.a.state!=d&&(c.b.push(c.a),c.a={timestamp:b,state:d,duration:0}))}}n.Vg=function(){this.P&&Yg(this.P,!0);this.a&&Yh(this.a)};
function ak(b,c){try{pk(b,c)}catch(e){return b.jb(e),null}var d=c.filter(function(b){return J.yb(b)});d=b.qa.create(d);b.g.setVariants(Array.from(d.values()));return b.g.chooseVariant()}function ek(b,c){var d=ak(b,c.variants);d&&(Sj(b,c,d,!0),kk(b,d,!0));(d=J.fc(c.textStreams,b.G,b.$)[0]||null)&&(b.b.streaming.alwaysStreamText||b.zb())&&(Ng(b.w,c).text=d,zj(b.m.a,d,!0),jk(b,d));Tj(b)}
n.Wf=function(b){try{this.S=!0;this.g.disable();var c=ak(this,b.variants),d=J.fc(b.textStreams,this.G,this.$)[0]||null;this.F&&(b.variants.includes(this.F)&&(c=this.F),this.F=null);this.B&&(b.textStreams.includes(this.B)&&(d=this.B),this.B=null);c&&Sj(this,b,c,!0);if(d){var e=d;Ng(this.w,b).text=e;zj(this.m.a,e,!0)}var f=this.a,g=f.c.get("video");if(g)var h=f.b.periods[g.Ta];else{var k=f.c.get("audio");h=k?f.b.periods[k.Ta]:null}var l=c?c.audio:null,m;if(m=!h&&l&&d){b=d;var p=I(this.b.preferredTextLanguage),
t=I(l.language),w=I(b.language);m=Hd(w,p)&&!Hd(t,w)}m&&(this.wc(!0),nk(this));return this.b.streaming.alwaysStreamText||this.zb()?{variant:c,text:d}:{variant:c,text:null}}catch(x){return this.jb(x),{variant:null,text:null}}};n.$e=function(){this.S=!1;this.b.abr.enabled&&this.g.enable();this.F&&(Uh(this.a,this.F,this.sb,this.Za),this.F=null);this.B&&(Th(this.a,this.B,!0,0),this.B=null)};n.dg=function(){this.o&&this.o.update&&this.o.update()};n.pg=function(){this.l&&this.l.Tb()};
function Tj(b){qk(b,new C("adaptation"))}function Yj(b){qk(b,new C("trackschanged"))}function nk(b){b.dispatchEvent(new C("texttrackvisibility"))}n.jb=function(b){if(!this.ea.a){var c=new C("error",{detail:b});this.dispatchEvent(c);c.defaultPrevented&&(b.handled=!0)}};n.Zb=function(b){this.dispatchEvent(b)};function Mj(b,c,d){b.Zb(new C(c,{detail:{schemeIdUri:d.schemeIdUri,value:d.value,startTime:d.startTime,endTime:d.endTime,id:d.id,eventElement:d.eventElement}}))}
n.sg=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.jb(new A(2,3,3016,b,c,this.f.error.message))}}};
function bk(b,c){var d=Zj(b),e=!1,f=Object.keys(c),g=1==f.length&&"00"==f[0];f.length&&d.variants.forEach(function(b){J.Gf(b).forEach(function(d){var f=b.allowedByKeySystem;d.keyId&&(d=c[g?"00":d.keyId],b.allowedByKeySystem=!!d&&!Gj.includes(d));f!=b.allowedByKeySystem&&(e=!0)})});f=Lh(b.a);var h=Nh(b.a);(f=J.Nd(f,h,d.variants))&&!f.allowedByKeySystem&&ek(b,d);e&&(Yj(b),ak(b,d.variants))}function Rj(b,c,d){0<c&&(b.Z()||b.Fe(c));d<b.ka()&&(b.Z()||b.Ia(d))}
function pk(b,c){var d=b.j?Wb(b.j.K):{},e=Object.keys(d);e=e.length&&"00"==e[0];for(var f=!1,g=!1,h=[],k=[],l=q(c),m=l.next();!m.done;m=l.next()){m=m.value;var p=[];m.audio&&p.push(m.audio);m.video&&p.push(m.video);p=q(p);for(var t=p.next();!t.done;t=p.next())if(t=t.value,t.keyId){var w=d[e?"00":t.keyId];w?Gj.includes(w)&&(k.includes(w)||k.push(w)):h.includes(t.keyId)||h.push(t.keyId)}m.allowedByApplication?m.allowedByKeySystem&&(f=!0):g=!0}if(!f)throw new A(2,4,4012,{hasAppRestrictions:g,missingKeys:h,
restrictedKeyStatuses:k});}function qk(b,c){r(function e(){return v(e,function(e){switch(e.s){case 1:return u(e,Promise.resolve(),2);case 2:b.ea.a||b.dispatchEvent(c),e.s=0}})})}function mk(b){var c=new Set;b=q(b);for(var d=b.next();!d.done;d=b.next())(d=d.value)&&d.language?c.add(I(d.language)):c.add("und");return c}
function lk(b){var c=new Map,d=[""];b=q(b);for(var e=b.next();!e.done;e=b.next()){var f=e.value;e="und";var g=d;f&&f.language&&(e=I(f.language));f&&f.roles.length&&(g=f.roles);c.has(e)||c.set(e,new Set);f=q(g);for(g=f.next();!g.done;g=f.next())g=g.value,c.get(e).add(g)}var h=[];c.forEach(function(b,c){for(var d=q(b),e=d.next();!e.done;e=d.next())h.push({language:c,role:e.value})});return h}function hk(b){b=Zj(b);return null==b?[]:b.variants.filter(function(b){return J.yb(b)})}
function ik(b){var c=Zj(b);return null==c?[]:c.textStreams.filter(function(c){return!b.ua.has(c)})}function Zj(b){if(null==b.c||null==b.l)return null;var c=zh(b.l),d=null;b=q(b.c.periods);for(var e=b.next();!e.done;e=b.next())e=e.value,e.startTime<=c&&(d=e);return d}function gk(b){var c=Zj(b);return c?Ng(b.w,c).variant:null};function rk(b,c,d){var e=void 0==c.expiration?Infinity:c.expiration,f=c.presentationTimeline.ka();c=sk(c.periods[0]);return{offlineUri:null,originalManifestUri:b,duration:f,size:0,expiration:e,tracks:c,appMetadata:d}}function tk(b,c){var d=fj(new dj(b.Ga(),b.na()),c.periods[0],new S(null,0)),e=c.appMetadata||{};d=sk(d);return{offlineUri:b.toString(),originalManifestUri:c.originalManifestUri,duration:c.duration,size:c.size,expiration:c.expiration,tracks:d,appMetadata:e}}
function sk(b){var c=[],d=J.Bf(b.variants);d=q(d);for(var e=d.next();!e.done;e=d.next())c.push(J.pd(e.value));b=q(b.textStreams);for(d=b.next();!d.done;d=b.next())c.push(J.kd(d.value));return c};function uk(){this.a={}}function vk(b,c,d){d=d.endTime-d.startTime;return wk(b,c)*d}function wk(b,c){var d=b.a[c];null==d&&(d=0);return d};function xk(b,c){for(var d={width:Infinity,height:Infinity},e=q(b.periods),f=e.next();!f.done;f=e.next())f=f.value,f.variants=f.variants.filter(function(b){return J.Qc(b,c,d)})}function yk(b){b=q(b.periods);for(var c=b.next();!c.done;c=b.next())c=c.value,c.variants=c.variants.filter(function(b){var c=!0;b.audio&&(c=c&&ud(b.audio));b.video&&(c=c&&ud(b.video));return c})}
function zk(b,c){for(var d=q(b.periods),e=d.next();!e.done;e=d.next())e=e.value,e.variants=e.variants.filter(function(b){return Rc(c,b)})}function Ak(b){var c=new Bk;b.periods.forEach(function(b,d){var e=Ck(b.variants);if(0==d){e=q(e.a);for(var f=e.next();!f.done;f=e.next())c.add(f.value)}else Dk(c,e)});b=q(b.periods);for(var d=b.next();!d.done;d=b.next())d=d.value,d.variants=d.variants.filter(function(b){return c.contains(new Ek(b))})}
function Fk(b,c){var d=new Bk;b.periods.forEach(function(b,f){0<f&&(b.variants=b.variants.filter(function(b){return d.contains(new Ek(b))}));c(b);d=Ck(b.variants)})}function Ek(b){var c=b.audio;b=b.video;this.b=c?c.mimeType:null;this.a=c?c.codecs.split(".")[0]:null;this.f=b?b.mimeType:null;this.c=b?b.codecs.split(".")[0]:null}function Bk(){this.a=[]}Bk.prototype.add=function(b){this.contains(b)||this.a.push(b)};function Dk(b,c){b.a=b.a.filter(function(b){return c.contains(b)})}
Bk.prototype.contains=function(b){return this.a.some(function(c){return b.b==c.b&&b.a==c.a&&b.f==c.f&&b.c==c.c})};function Ck(b){var c=new Bk;b=q(b);for(var d=b.next();!d.done;d=b.next())c.add(new Ek(d.value));return c};function U(b){var c=this;if(b&&b.constructor!=T)throw new A(2,9,9008);this.b=this.a=null;b?(this.a=b.b,this.b=b.Jb()):(this.a=sj(),this.b=new E);this.g=!1;this.c=[];this.f=[];var d=!b;this.j=new kj(function(){return r(function f(){var b;return v(f,function(f){switch(f.s){case 1:return b=function(){},u(f,Promise.all(c.f.map(function(c){return c.then(b,b)})),2);case 2:if(!d){f.I(3);break}return u(f,c.b.destroy(),3);case 3:c.a=null,c.b=null,f.s=0}})})})}y("shaka.offline.Storage",U);
function Gk(){return Ki()}U.support=Gk;U.prototype.destroy=function(){return this.j.destroy()};U.prototype.destroy=U.prototype.destroy;
U.prototype.configure=function(b){var c=!1;null!=b.trackSelectionCallback&&(c=!0,b.offline=b.offline||{},b.offline.trackSelectionCallback=b.trackSelectionCallback);null!=b.progressCallback&&(c=!0,b.offline=b.offline||{},b.offline.progressCallback=b.progressCallback);null!=b.usePersistentLicense&&(c=!0,b.offline=b.offline||{},b.offline.usePersistentLicense=b.usePersistentLicense);c&&Pd("Storage.configure with OfflineConfig","Please configure storage with a player configuration.");return uj(this.a,
b)};U.prototype.configure=U.prototype.configure;U.prototype.Jb=function(){return this.b};U.prototype.getNetworkingEngine=U.prototype.Jb;
U.prototype.store=function(b,c,d){var e=this;return Hk(this,Ik(this,b,c||{},function(){return r(function g(){var c,k;return v(g,function(g){switch(g.s){case 1:return d&&"string"!=typeof d?(Pd("Storing with a manifest parser factory","Please register a manifest parser and for the mime-type."),c=d,g["return"](new c)):u(g,vf(b,e.b,e.a.manifest.retryParameters,d),2);case 2:return k=g.C,g["return"](k)}})})}))};U.prototype.store=U.prototype.store;
function Ik(b,c,d,e){return r(function g(){var h,k,l,m,p,t,w,x,F,R;return v(g,function(g){switch(g.s){case 1:Jk();if(b.g)return g["return"](Promise.reject(new A(2,9,9006)));b.g=!0;return u(g,Kk(b,c,e),2);case 2:h=g.C;Lk(b);k=!h.presentationTimeline.Z()&&!h.presentationTimeline.fb();if(!k)throw new A(2,9,9005,c);l=null;m=new Ci;t=p=null;za(g,3,4);return u(g,Mk(b,h,function(b){t=t||b}),6);case 6:l=g.C;Lk(b);if(t)throw t;Nk(b,h,l);return u(g,m.init(),7);case 7:return Lk(b),u(g,Ei(m),8);case 8:return p=
g.C,Lk(b),u(g,Ok(b,p.na,l,h,c,d),9);case 9:w=g.C;Lk(b);if(t)throw t;return u(g,p.na.addManifests([w]),10);case 10:return x=g.C,Lk(b),F=new bj("manifest",p.path.Ga,p.path.na,x[0]),g["return"](tk(F,w));case 4:return Da(g),b.g=!1,b.c=[],u(g,m.destroy(),11);case 11:if(!l){g.I(12);break}return u(g,l.destroy(),12);case 12:Ea(g,0);break;case 3:R=Ca(g);if(!p){g.I(14);break}return u(g,p.na.removeSegments(b.c,function(){}),14);case 14:throw t||R;}})})}
function Nk(b,c,d){xk(c,b.a.restrictions);yk(c);zk(c,d);Ak(c);Fk(c,function(c){for(var d=[],e=q(c.variants),h=e.next();!h.done;h=e.next())d.push(J.pd(h.value));e=q(c.textStreams);for(h=e.next();!h.done;h=e.next())d.push(J.kd(h.value));d=b.a.offline.trackSelectionCallback(d);var k=new Set,l=new Set;d=q(d);for(e=d.next();!e.done;e=d.next())e=e.value,"variant"==e.type&&k.add(e.id),"text"==e.type&&l.add(e.id);c.variants=c.variants.filter(function(b){return k.has(b.id)});c.textStreams=c.textStreams.filter(function(b){return l.has(b.id)})});
Pk(c)}function Ok(b,c,d,e,f,g){return r(function k(){var l,m,p,t;return v(k,function(k){switch(k.s){case 1:return l=rk(f,e,g),m=new ri(b.b,function(c,d){l.size=d;b.a.offline.progressCallback(l,c)}),Aa(k,2),t=p=Qk(b,m,c,d,e,f,g),u(k,ui(m),4);case 4:return t.size=k.C,k["return"](p);case 2:return Da(k),u(k,m.destroy(),5);case 5:Ea(k,0)}})})}U.prototype.remove=function(b){return Hk(this,Rk(this,b))};U.prototype.remove=U.prototype.remove;
function Rk(b,c){Jk();var d=cj(c);if(null==d||"manifest"!=d.a)return Promise.reject(new A(2,9,9004,c));var e=new Ci;return lj([e],function(){return r(function g(){var c,k,l;return v(g,function(g){switch(g.s){case 1:return u(g,e.init(),2);case 2:return u(g,Gi(e,d.Ga(),d.na()),3);case 3:return c=g.C,u(g,c.getManifests([d.key()]),4);case 4:return k=g.C,l=k[0],u(g,Promise.all([Sk(b,l,e),Tk(b,c,d,l)]),0)}})})})}
function Uk(b,c){for(var d=[],e=q(b.periods),f=e.next();!f.done;f=e.next()){f=q(f.value.streams);for(var g=f.next();!g.done;g=f.next())g=g.value,c&&"video"==g.contentType?d.push({contentType:Xb(g.mimeType,g.codecs),robustness:b.drmInfo.videoRobustness}):c||"audio"!=g.contentType||d.push({contentType:Xb(g.mimeType,g.codecs),robustness:b.drmInfo.audioRobustness})}return d}function Sk(b,c,d){return r(function f(){return v(f,function(f){switch(f.s){case 1:return u(f,Vk(b.b,b.a.drm,d,c),0)}})})}
function Tk(b,c,d,e){function f(){k+=1;b.a.offline.progressCallback(l,k/h)}var g=Wk(e),h=g.length+1,k=0,l=tk(d,e);return Promise.all([c.removeSegments(g,f),c.removeManifests([d.key()],f)])}U.prototype.Kg=function(){return Hk(this,Xk(this))};U.prototype.removeEmeSessions=U.prototype.Kg;
function Xk(b){Jk();var c=b.b,d=b.a.drm,e=new Ci;return lj([e],function(){return r(function g(){var b,k,l,m,p,t,w;return v(g,function(g){switch(g.s){case 1:return u(g,e.init(),2);case 2:b=!1,k=[],Hi(e,function(b){return k.push(b)}),l=q(k),m=l.next();case 3:if(m.done){g.I(5);break}p=m.value;return u(g,p.getAll(),6);case 6:return t=g.C,u(g,oj(d,c,t),7);case 7:return w=g.C,u(g,p.remove(w),8);case 8:w.length!=t.length&&(b=!0);m=l.next();g.I(3);break;case 5:return g["return"](!b)}})})})}
U.prototype.list=function(){return Hk(this,Yk())};U.prototype.list=U.prototype.list;
function Yk(){function b(b,d){return r(function h(){var e;return v(h,function(f){switch(f.s){case 1:return u(f,d.getAllManifests(),2);case 2:e=f.C,e.forEach(function(d,e){var f=tk(new bj("manifest",b.Ga,b.na,e),d);c.push(f)}),f.s=0}})})}Jk();var c=[],d=new Ci;return lj([d],function(){return r(function f(){var c;return v(f,function(f){switch(f.s){case 1:return u(f,d.init(),2);case 2:return c=Promise.resolve(),Fi(d,function(d,f){c=c.then(function(){return b(d,f)})}),u(f,c,0)}})})}).then(function(){return c})}
function Kk(b,c,d){return r(function f(){var g,h,k,l,m,p;return v(f,function(f){switch(f.s){case 1:return g=null,h=b.b,k={networkingEngine:h,filterAllPeriods:function(){},filterNewPeriod:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(b){g=b}},u(f,d(),2);case 2:return l=f.C,l.configure(b.a.manifest),Lk(b),Aa(f,3),u(f,l.start(c,k),5);case 5:return m=f.C,Lk(b),p=Zk(m),u(f,Promise.all(Array.from(p).map(function(b){return b.createSegmentIndex()})),6);case 6:Lk(b);
if(g)throw g;return f["return"](m);case 3:return Da(f),u(f,l.stop(),7);case 7:Ea(f,0)}})})}function Mk(b,c,d){return r(function f(){var g,h,k;return v(f,function(f){switch(f.s){case 1:return g=new nc({Pb:b.b,onError:d,Xc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),h=J.Id(c),k=b.a,g.configure(k.drm),u(f,sc(g,h,k.offline.usePersistentLicense),2);case 2:return u(f,Cc(g),3);case 3:return u(f,Dc(g),4);case 4:return f["return"](g)}})})}
function Qk(b,c,d,e,f,g,h){var k=new uk,l=f.periods.map(function(e){return $k(b,c,d,k,f,e)}),m=e.a,p=Jc(e);if(m&&b.a.offline.usePersistentLicense){if(!p.length)throw new A(2,9,9007,g);m.initData=[]}return{originalManifestUri:g,duration:f.presentationTimeline.ka(),size:0,expiration:e.kc(),periods:l,sessionIds:b.a.offline.usePersistentLicense?p:[],drmInfo:m,appMetadata:h}}
function $k(b,c,d,e,f,g){f.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 h=Zk(f),k=new Map;h=q(h);for(var l=h.next();!l.done;l=h.next()){l=l.value;var m=al(b,c,d,e,f,l);k.set(l.id,m)}g.variants.forEach(function(b){b.audio&&
k.get(b.audio.id).variantIds.push(b.id);b.video&&k.get(b.video.id).variantIds.push(b.id)});return{startTime:g.startTime,streams:Array.from(k.values())}}
function al(b,c,d,e,f,g){var h={id:g.id,originalId:g.originalId,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.Lb();var k=g.id;bl(g,f,function(f){si(c,k,cl(b,f),vk(e,g.id,f),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);
h.segments.push({startTime:f.startTime,endTime:f.endTime,dataKey:c[0]})})})});(f=g.initSegmentReference)&&si(c,k,cl(b,f),.5*wk(e,g.id),function(c){return d.addSegments([{data:c}]).then(function(c){b.c.push(c[0]);h.initSegmentKey=c[0]})});return h}function bl(b,c,d){c=b.findSegmentPosition(c);for(var e=null==c?null:b.getSegmentReference(c);e;)d(e),e=b.getSegmentReference(++c)}function Lk(b){if(b.j.a)throw new A(2,9,7001);}function Jk(){if(!Ki())throw new A(2,9,9E3);}
function cl(b,c){var d=b.a.streaming.retryParameters;d=Jb(c.c(),d);if(0!=c.b||null!=c.a)d.headers.Range="bytes="+c.b+"-"+(null==c.a?"":c.a);return d}function Hk(b,c){return r(function e(){return v(e,function(e){switch(e.s){case 1:return b.f.push(c),Aa(e,2),u(e,c,4);case 4:return e["return"](e.C);case 2:Da(e),Bb(b.f,c),Ea(e,0)}})})}
function Wk(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}U.deleteAll=function(){return r(function c(){var d;return v(c,function(c){switch(c.s){case 1:return d=new Ci,Aa(c,2),u(c,d.erase(),2);case 2:return Da(c),u(c,d.destroy(),5);case 5:Ea(c,0)}})})};
function Vk(b,c,d,e){return r(function g(){var h,k,l;return v(g,function(g){switch(g.s){case 1:if(!e.drmInfo)return g["return"]();h=Ii(d);k=e.sessionIds.map(function(b){return{sessionId:b,keySystem:e.drmInfo.keySystem,licenseUri:e.drmInfo.licenseServerUri,serverCertificate:e.drmInfo.serverCertificate,audioCapabilities:Uk(e,!1),videoCapabilities:Uk(e,!0)}});return u(g,oj(c,b,k),2);case 2:return l=g.C,u(g,h.remove(l),3);case 3:return u(g,h.add(k.filter(function(b){return-1==l.indexOf(b.sessionId)})),
0)}})})}function Zk(b){var c=new Set;b=q(b.periods);for(var d=b.next();!d.done;d=b.next()){d=d.value;for(var e=q(d.textStreams),f=e.next();!f.done;f=e.next())c.add(f.value);d=q(d.variants);for(e=d.next();!e.done;e=d.next())e=e.value,e.audio&&c.add(e.audio),e.video&&c.add(e.video)}return c}function Pk(b){if(0==b.periods.length)throw new A(2,4,4014);b=q(b.periods);for(var c=b.next();!c.done;c=b.next())dl(c.value)}
function dl(b){b.variants.map(function(b){return b.video});var c=new Set(b.variants.map(function(b){return b.audio}));b=b.textStreams;for(var d=q(c),e=d.next();!e.done;e=d.next()){e=q(c);for(var f=e.next();!f.done;f=e.next());}c=q(b);for(d=c.next();!d.done;d=c.next())for(d=q(b),e=d.next();!e.done;e=d.next());}Hj.offline=Gk;function el(){for(var b=0;b<fl.length;++b)fl[b].Ze()}y("shaka.polyfill.installAll",el);var fl=[];function gl(b,c){c=c||0;for(var d={priority:c,Ze:b},e=0;e<fl.length;e++)if(fl[e].priority<c){fl.splice(e,0,d);return}fl.push(d)}y("shaka.polyfill.register",gl);function hl(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)}
gl(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",hl);document.addEventListener("webkitfullscreenerror",hl);document.addEventListener("mozfullscreenchange",hl);document.addEventListener("mozfullscreenerror",hl);document.addEventListener("MSFullscreenChange",hl);document.addEventListener("MSFullscreenError",hl)}});gl(function(){ac("CrKey")&&delete window.indexedDB});var il;function jl(b,c,d){if("input"==b)switch(this.type){case "range":b="change"}il.call(this,b,c,d)}gl(function(){ac("Trident/")&&HTMLInputElement.prototype.addEventListener!=jl&&(il=HTMLInputElement.prototype.addEventListener,HTMLInputElement.prototype.addEventListener=jl)});gl(function(){});function kl(){var b=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];d=b.apply(this,d);d.abort=function(){};return d}}function ll(){var b=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(c,d){return b.call(this,c,d-.001)}}
function ml(){var b=MediaSource.prototype.endOfStream;MediaSource.prototype.endOfStream=function(c){for(var d=[],e=0;e<arguments.length;++e)d[e]=arguments[e];for(var h=e=0;h<this.sourceBuffers.length;++h){var k=this.sourceBuffers[h];k=k.buffered.end(k.buffered.length-1);e=Math.max(e,k)}if(!isNaN(this.duration)&&e<this.duration)for(this.Rd=!0,e=0;e<this.sourceBuffers.length;++e)this.sourceBuffers[e].Ad=!1;return b.apply(this,d)};var c=!1,d=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=
function(b){for(var e=[],g=0;g<arguments.length;++g)e[g]=arguments[g];e=d.apply(this,e);e.mediaSource_=this;e.addEventListener("updateend",nl,!1);c||(this.addEventListener("sourceclose",ol,!1),c=!0);return e}}function nl(b){var c=b.target,d=c.mediaSource_;if(d.Rd){b.preventDefault();b.stopPropagation();b.stopImmediatePropagation();c.Ad=!0;for(b=0;b<d.sourceBuffers.length;++b)if(0==d.sourceBuffers[b].Ad)return;d.Rd=!1}}
function ol(b){b=b.target;for(var c=0;c<b.sourceBuffers.length;++c)b.sourceBuffers[c].removeEventListener("updateend",nl,!1);b.removeEventListener("sourceclose",ol,!1)}function pl(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"mp2t"==c.split(/ *; */)[0].split("/")[1]?!1:b(c)}}function ql(){var b=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(c){return"opus"!=$b(c)[0]&&b(c)}}
function tl(){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,p=!1;d=e.split(",").filter(function(b){if(c.test(b))return p=!0,!1;/^(hev|hvc)1\.2/.test(b)&&(m=!0);return!0});p&&(m=!1);g.codecs=d.join(",");m&&(g.eotf="smpte2084");for(var t in g)f+="; "+t+'="'+g[t]+'"';return cast.__platform__.canDisplayType(f)}}
gl(function(){if(window.MediaSource)if(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType)tl();else if(navigator.vendor&&navigator.vendor.includes("Apple")){var b=navigator.appVersion;pl();if(b.includes("Version/8"))window.MediaSource=null;else if(b.includes("Version/9"))kl();else if(b.includes("Version/10"))kl(),ml();else if(b.includes("Version/11")||b.includes("Version/12"))kl(),ll()}else ac("Tizen")&&ql()});function ul(b){this.f=[];this.b=[];this.a=[];(new P).va("pssh",this.c.bind(this)).parse(b.buffer)}ul.prototype.c=function(b){if(!(1<b.version)){var c=kc(b.reader.hb(16)),d=[];if(0<b.version)for(var e=b.reader.J(),f=0;f<e;++f){var g=kc(b.reader.hb(16));d.push(g)}e=b.reader.J();b.reader.O(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 vl(b,c){try{var d=new wl(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}
function wl(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;}wl.prototype.createMediaKeys=function(){var b=new xl(this.keySystem);return Promise.resolve(b)};
wl.prototype.getConfiguration=function(){return this.a};function yl(b){var c=this.mediaKeys;c&&c!=b&&zl(c,null);delete this.mediaKeys;return(this.mediaKeys=b)?zl(b,this):Promise.resolve()}function xl(b){this.a=new MSMediaKeys(b);this.b=new Nb}xl.prototype.createSession=function(b){b=b||"temporary";if("temporary"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");return new Al(this.a,b)};xl.prototype.setServerCertificate=function(){return Promise.resolve(!1)};
function zl(b,c){function d(){c.msSetMediaKeys(e.a);c.removeEventListener("loadedmetadata",d)}Ob(b.b);if(!c)return Promise.resolve();G(b.b,c,"msneedkey",Bl);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 Al(b){D.call(this);this.c=null;this.g=b;this.b=this.a=null;this.f=new Nb;this.sessionId="";this.expiration=NaN;this.closed=new z;this.keyStatuses=new Cl}Pa(Al,D);n=Al.prototype;
n.generateRequest=function(b,c){this.a=new z;try{this.c=this.g.createSession("video/mp4",new Uint8Array(c),null),G(this.f,this.c,"mskeymessage",this.jg.bind(this)),G(this.f,this.c,"mskeyadded",this.hg.bind(this)),G(this.f,this.c,"mskeyerror",this.ig.bind(this)),Dl(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(),Ob(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 Bl(b){if(b.initData){var c=document.createEvent("CustomEvent");c.initCustomEvent("encrypted",!1,!1,null);c.initDataType="cenc";c.initData=El(b.initData);this.dispatchEvent(c)}}
function El(b){if(!b)return b;var c=new ul(b);if(1>=c.a.length)return b;for(var d=[],e=0;e<c.a.length;e++)d.push(b.subarray(c.a[e].start,c.a[e].end+1));b=[];c={};e=q(d);for(d=e.next();!d.done;c={nc:c.nc},d=e.next())c.nc=d.value,b.some(function(b){return function(c){return lc(c,b.nc)}}(c))||b.push(c.nc);c=0;e=q(b);for(d=e.next();!d.done;d=e.next())c+=d.value.length;c=new Uint8Array(c);e=0;b=q(b);for(d=b.next();!d.done;d=b.next())d=d.value,c.set(d,e),e+=d.length;return c}
n.jg=function(b){this.a&&(this.a.resolve(),this.a=null);this.dispatchEvent(new C("message",{messageType:void 0==this.keyStatuses.a?"license-request":"license-renewal",message:b.message.buffer}))};n.hg=function(){this.a?(Dl(this,"usable"),this.a.resolve(),this.a=null):this.b&&(Dl(this,"usable"),this.b.resolve(),this.b=null)};
n.ig=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:Dl(this,"output-not-allowed");break;default:Dl(this,"internal-error")}};function Dl(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new C("keystatuseschange"))}
function Cl(){this.size=0;this.a=void 0}var Fl;n=Cl.prototype;n.forEach=function(b){this.a&&b(this.a,Fl)};n.get=function(b){if(this.has(b))return this.a};n.has=function(b){var c=Fl;return this.a&&lc(new Uint8Array(b),new Uint8Array(c))?!0:!1};n.entries=function(){};n.keys=function(){};n.values=function(){};
gl(function(){!window.HTMLVideoElement||!window.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(Fl=(new Uint8Array([0])).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=yl,window.MediaKeys=xl,window.MediaKeySystemAccess=wl,navigator.requestMediaKeySystemAccess=vl)});function Gl(){return Promise.reject(Error("The key system specified is not supported."))}function Hl(b){return null==b?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Il(){throw new TypeError("Illegal constructor.");}Il.prototype.createSession=function(){};Il.prototype.setServerCertificate=function(){};function Jl(){throw new TypeError("Illegal constructor.");}Jl.prototype.getConfiguration=function(){};Jl.prototype.createMediaKeys=function(){};
gl(function(){!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=Gl,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Hl,window.MediaKeys=Il,window.MediaKeySystemAccess=Jl)},-10);var Kl="";function Ll(b){var c=Kl;return c?c+b.charAt(0).toUpperCase()+b.slice(1):b}function Ml(b,c){try{var d=new Nl(b,c);return Promise.resolve(d)}catch(e){return Promise.reject(e)}}function Ol(b){var c=this.mediaKeys;c&&c!=b&&Pl(c,null);delete this.mediaKeys;(this.mediaKeys=b)&&Pl(b,this);return Promise.resolve()}
function Nl(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 p=
h.audioCapabilities[m];if(p.contentType){l=!0;var t=p.contentType.split(";")[0];f.canPlayType(t,this.a)&&(k.audioCapabilities.push(p),e=!0)}}if(h.videoCapabilities)for(m=0;m<h.videoCapabilities.length;++m)p=h.videoCapabilities[m],p.contentType&&(l=!0,f.canPlayType(p.contentType,this.a)&&(k.videoCapabilities.push(p),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;}Nl.prototype.createMediaKeys=function(){var b=new Ql(this.a);return Promise.resolve(b)};Nl.prototype.getConfiguration=function(){return this.b};function Ql(b){this.g=b;this.b=null;this.a=new Nb;this.c=[];this.f={}}
function Pl(b,c){b.b=c;Ob(b.a);var d=Kl;c&&(G(b.a,c,d+"needkey",b.xg.bind(b)),G(b.a,c,d+"keymessage",b.wg.bind(b)),G(b.a,c,d+"keyadded",b.ug.bind(b)),G(b.a,c,d+"keyerror",b.vg.bind(b)))}n=Ql.prototype;n.createSession=function(b){b=b||"temporary";if("temporary"!=b&&"persistent-license"!=b)throw new TypeError("Session type "+b+" is unsupported on this platform.");var c=this.b||document.createElement("video");c.src||(c.src="about:blank");b=new Rl(c,this.g,b);this.c.push(b);return b};
n.setServerCertificate=function(){return Promise.resolve(!1)};n.xg=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.wg=function(b){var c=Sl(this,b.sessionId);c&&(b=new C("message",{messageType:void 0==c.keyStatuses.a?"licenserequest":"licenserenewal",message:b.message}),c.b&&(c.b.resolve(),c.b=null),c.dispatchEvent(b))};
n.ug=function(b){if(b=Sl(this,b.sessionId))Tl(b,"usable"),b.a&&b.a.resolve(),b.a=null};
n.vg=function(b){var c=Sl(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?Tl(c,"output-restricted"):1==d?Tl(c,"expired"):Tl(c,"internal-error"))}};
function Sl(b,c){var d=b.f[c];return d?d:(d=b.c.shift())?(d.sessionId=c,b.f[c]=d):null}function Rl(b,c,d){D.call(this);this.f=b;this.j=!1;this.a=this.b=null;this.c=c;this.g=d;this.sessionId="";this.expiration=NaN;this.closed=new z;this.keyStatuses=new Ul}Pa(Rl,D);
function Vl(b,c,d){if(b.j)return Promise.reject(Error("The session is already initialized."));b.j=!0;try{if("persistent-license"==b.g)if(d)var e=new Uint8Array(fc("LOAD_SESSION|"+d));else{var f=fc("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=Ll("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=Rl.prototype;
n.jd=function(b,c){if(this.a)this.a.then(this.jd.bind(this,b,c))["catch"](this.jd.bind(this,b,c));else{this.a=b;if("webkit-org.w3.clearkey"==this.c){var d=bc(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=ic(e.keys[0].k);e=ic(e.keys[0].kid)}else d=new Uint8Array(c),e=null;var f=Ll("addKey");try{this.f[f](this.c,d,e,this.sessionId)}catch(g){this.a.reject(g),this.a=null}}};
function Tl(b,c){var d=b.keyStatuses;d.size=void 0==c?0:1;d.a=c;b.dispatchEvent(new C("keystatuseschange"))}n.generateRequest=function(b,c){return Vl(this,c,null)};n.load=function(b){return"persistent-license"==this.g?Vl(this,null,b):Promise.reject(Error("Not a persistent session."))};n.update=function(b){var c=new z;this.jd(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=Ll("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 Ul(){this.size=0;this.a=void 0}var Wl;n=Ul.prototype;n.forEach=function(b){this.a&&b(this.a,Wl)};n.get=function(b){if(this.has(b))return this.a};
n.has=function(b){var c=Wl;return this.a&&lc(new Uint8Array(b),new Uint8Array(c))?!0:!1};n.entries=function(){};n.keys=function(){};n.values=function(){};
gl(function(){if(!(!window.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if(HTMLMediaElement.prototype.webkitGenerateKeyRequest)Kl="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;Wl=(new Uint8Array([0])).buffer;navigator.requestMediaKeySystemAccess=Ml;delete HTMLMediaElement.prototype.mediaKeys;HTMLMediaElement.prototype.mediaKeys=null;HTMLMediaElement.prototype.setMediaKeys=Ol;window.MediaKeys=Ql;window.MediaKeySystemAccess=
Nl}});gl(function(){if(window.HTMLMediaElement){var b=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var c=b.apply(this);c&&c["catch"](function(){});return c}}});function Xl(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}gl(function(){if(window.HTMLVideoElement){var b=HTMLVideoElement.prototype;!b.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in b&&(b.getVideoPlaybackQuality=Xl)}});function Yl(b,c,d){return new window.TextTrackCue(b,c,d)}function Zl(b,c,d){return new window.TextTrackCue(b+"-"+c+"-"+d,b,c,d)}gl(function(){if(!window.VTTCue&&window.TextTrackCue){var b=TextTrackCue.length;if(3==b)window.VTTCue=Yl;else if(6==b)window.VTTCue=Zl;else{try{var c=!!Yl(1,2,"")}catch(d){c=!1}c&&(window.VTTCue=Yl)}}});function sd(b,c,d){this.startTime=b;this.direction=$l;this.endTime=c;this.payload=d;this.region=new am;this.position=null;this.positionAlign=bm;this.size=100;this.textAlign=cm;this.writingMode=dm;this.lineInterpretation=em;this.line=null;this.lineHeight="";this.lineAlign=fm;this.displayAlign=gm;this.fontSize=this.backgroundColor=this.color="";this.fontWeight=hm;this.fontStyle=im;this.fontFamily="";this.textDecoration=[];this.wrapLine=!0;this.id=""}y("shaka.text.Cue",sd);var bm="auto";
sd.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:bm};var cm="center",jm={LEFT:"left",RIGHT:"right",CENTER:cm,START:"start",END:"end"};sd.textAlign=jm;var gm="after",km={BEFORE:"before",CENTER:"center",AFTER:gm};sd.displayAlign=km;var $l="ltr";sd.direction={HORIZONTAL_LEFT_TO_RIGHT:$l,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var dm="horizontal-tb";sd.writingMode={HORIZONTAL_TOP_TO_BOTTOM:dm,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var em=0;
sd.lineInterpretation={LINE_NUMBER:em,PERCENTAGE:1};var fm="start",lm={CENTER:"center",START:fm,END:"end"};sd.lineAlign=lm;var hm=400;sd.fontWeight={NORMAL:hm,BOLD:700};var im="normal",mm={NORMAL:im,ITALIC:"italic",OBLIQUE:"oblique"};sd.fontStyle=mm;sd.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"};
function am(){this.id="";this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0;this.height=this.width=100;this.viewportAnchorUnits=this.widthUnits=this.heightUnits=nm;this.scroll=om}y("shaka.text.CueRegion",am);var nm=1;am.units={PX:0,PERCENTAGE:nm,LINES:2};var om="";am.scrollMode={NONE:om,UP:"up"};function pm(){}pm.prototype.parseInit=function(){};
pm.prototype.parseMedia=function(b,c){var d=bc(b),e=[],f=new DOMParser,g=null;try{g=f.parseFromString(d,"text/xml")}catch(R){throw new A(2,2,2005);}if(g){if(f=g.getElementsByTagName("tt")[0]){g=M.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","frameRate");var h=M.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","subFrameRate");var k=M.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier");var l=M.getAttributeNS(f,"http://www.w3.org/ns/ttml#parameter","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 qm(g,h,k,l);h=rm(f.getElementsByTagName("styling")[0]);k=rm(f.getElementsByTagName("layout")[0]);l=[];for(var m=0;m<k.length;m++){var p=k[m],t=h;var w=new am;var x=p.getAttribute("xml:id");if(x){w.id=x;var F;if(F=sm(p,t,"extent"))F=(x=tm.exec(F))||um.exec(F),null!=F&&(w.width=Number(F[1]),w.height=Number(F[2]),w.widthUnits=x?nm:0,w.heightUnits=x?nm:0);if(p=
sm(p,t,"origin"))F=(x=tm.exec(p))||um.exec(p),null!=F&&(w.viewportAnchorX=Number(F[1]),w.viewportAnchorY=Number(F[2]),w.viewportAnchorUnits=x?nm:0)}else w=null;w&&l.push(w)}f=rm(f.getElementsByTagName("body")[0]);for(m=0;m<f.length;m++)(w=vm(f[m],c.periodStart,g,h,k,l,d))&&e.push(w)}return e};
var tm=/^(\d{1,2}|100)% (\d{1,2}|100)%$/,wm=/^(\d+px|\d+em)$/,um=/^(\d+)px (\d+)px$/,xm=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ym=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,zm=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Am=/^(\d*(?:\.\d*)?)f$/,Bm=/^(\d*(?:\.\d*)?)t$/,Cm=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Dm={left:fm,center:"center",right:"end",start:fm,end:"end"},Em={left:"line-left",center:"center",right:"line-right"};
function rm(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=rm(d[e]),c=c.concat(f))}c.length||c.push(b);return c}function Fm(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)Fm(d[e],c);else if(c){var f=d[e].textContent.trim();f=f.replace(/\s+/g," ");d[e].textContent=f}}
function vm(b,c,d,e,f,g,h){if(!b.hasAttribute("begin")&&!b.hasAttribute("end")&&/^\s*$/.test(b.textContent))return null;Fm(b,h);h=Gm(b.getAttribute("begin"),d);var k=Gm(b.getAttribute("end"),d);d=Gm(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 sd(h+c,k+c,l);if((f=Hm(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]}Im(c,b,f,e);return c}
function Im(b,c,d,e){"rtl"==Jm(c,d,e,"direction")&&(b.direction="rtl");var f=Jm(c,d,e,"writingMode");"tb"==f||"tblr"==f?b.writingMode="vertical-lr":"tbrl"==f?b.writingMode="vertical-rl":"rltb"==f||"rl"==f?b.direction="rtl":f&&(b.direction=$l);if(f=Jm(c,d,e,"textAlign"))b.positionAlign=Em[f],b.lineAlign=Dm[f],b.textAlign=jm[f.toUpperCase()];if(f=Jm(c,d,e,"displayAlign"))b.displayAlign=km[f.toUpperCase()];if(f=Jm(c,d,e,"color"))b.color=f;if(f=Jm(c,d,e,"backgroundColor"))b.backgroundColor=f;if(f=Jm(c,
d,e,"fontFamily"))b.fontFamily=f;(f=Jm(c,d,e,"fontWeight"))&&"bold"==f&&(b.fontWeight=700);(f=Jm(c,d,e,"wrapOption"))&&"noWrap"==f&&(b.wrapLine=!1);(f=Jm(c,d,e,"lineHeight"))&&f.match(wm)&&(b.lineHeight=f);(f=Jm(c,d,e,"fontSize"))&&f.match(wm)&&(b.fontSize=f);if(f=Jm(c,d,e,"fontStyle"))b.fontStyle=mm[f.toUpperCase()];(d=sm(d,e,"textDecoration"))&&Km(b,d);(c=Lm(c,e,"textDecoration"))&&Km(b,c)}
function Km(b,c){for(var d=c.split(" "),e=0;e<d.length;e++)switch(d[e]){case "underline":b.textDecoration.includes("underline")||b.textDecoration.push("underline");break;case "noUnderline":b.textDecoration.includes("underline")&&Bb(b.textDecoration,"underline");break;case "lineThrough":b.textDecoration.includes("lineThrough")||b.textDecoration.push("lineThrough");break;case "noLineThrough":b.textDecoration.includes("lineThrough")&&Bb(b.textDecoration,"lineThrough");break;case "overline":b.textDecoration.includes("overline")||
b.textDecoration.push("overline");break;case "noOverline":b.textDecoration.includes("overline")&&Bb(b.textDecoration,"overline")}}function Jm(b,c,d,e){return(b=Lm(b,d,e))?b:sm(c,d,e)}function sm(b,c,d){for(var e=rm(b),f=0;f<e.length;f++){var g=M.getAttributeNS(e[f],"http://www.w3.org/ns/ttml#styling",d);if(g)return g}return(b=Hm(b,"style",c))?M.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}
function Lm(b,c,d){return(b=Hm(b,"style",c))?M.getAttributeNS(b,"http://www.w3.org/ns/ttml#styling",d):null}function Hm(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 Gm(b,c){var d=null;if(xm.test(b)){d=xm.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 ym.test(b)?d=Mm(ym,b):zm.test(b)?d=Mm(zm,b):Am.test(b)?(d=Am.exec(b),d=Number(d[1])/c.frameRate):Bm.test(b)?(d=Bm.exec(b),d=Number(d[1])/c.a):Cm.test(b)&&(d=Mm(Cm,b));return d}
function Mm(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 qm(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])}nd["application/ttml+xml"]=pm;function Nm(){this.a=new pm}Nm.prototype.parseInit=function(b){var c=!1;(new P).L("moov",Pe).L("trak",Pe).L("mdia",Pe).L("minf",Pe).L("stbl",Pe).va("stsd",Qe).L("stpp",function(b){c=!0;b.parser.stop()}).parse(b);if(!c)throw new A(2,2,2007);};Nm.prototype.parseMedia=function(b,c){var d=!1,e=[];(new P).L("mdat",Re(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};nd['application/mp4; codecs="stpp"']=Nm;
nd['application/mp4; codecs="stpp.TTML.im1t"']=Nm;function Om(){}Om.prototype.parseInit=function(){};
Om.prototype.parseMedia=function(b,c){var d=bc(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,d[0].includes("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=Pm(new Uf(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 Uf(h[f]),
l=new am;Xf(k);Vf(k);for(var m=Xf(k);m;){var p=l,t=m;(m=/^id=(.*)$/.exec(t))?p.id=m[1]:(m=/^width=(\d{1,2}|100)%$/.exec(t))?p.width=Number(m[1]):(m=/^lines=(\d+)$/.exec(t))?(p.height=Number(m[1]),p.heightUnits=2):(m=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(t))?(p.regionAnchorX=Number(m[1]),p.regionAnchorY=Number(m[2])):(m=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(t))?(p.viewportAnchorX=Number(m[1]),p.viewportAnchorY=Number(m[2])):/^scroll=up$/.exec(t)&&(p.scroll="up");Vf(k);
m=Xf(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;m[0].includes("--\x3e")||(l=m[0],m.splice(0,1));p=new Uf(m[0]);var w=Pm(p),x=Wf(p,/[ \t]+--\x3e[ \t]+/g),F=Pm(p);if(null==w||null==x||null==F)throw new A(2,2,2001);m=new sd(w+t,F+t,m.slice(1).join("\n").trim());Vf(p);for(t=Xf(p);t;)Qm(m,t,h),Vf(p),t=Xf(p);null!=l&&(m.id=l);h=m}h&&f.push(h)}return f};
function Qm(b,c,d){var e;if(e=/^align:(start|middle|center|end|left|right)$/.exec(c))c=e[1],"middle"==c?b.textAlign=cm:b.textAlign=jm[c.toUpperCase()];else if(e=/^vertical:(lr|rl)$/.exec(c))b.writingMode="lr"==e[1]?"vertical-lr":"vertical-rl";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=Rm(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=lm[d[2].toUpperCase()]);else if(d=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(c))b.lineInterpretation=em,b.line=Number(d[1]),d[2]&&(b.lineAlign=lm[d[2].toUpperCase()])}function Rm(b,c){var d=b.filter(function(b){return b.id==c});return d.length?d[0]:null}
function Pm(b){b=Wf(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)}nd["text/vtt"]=Om;nd['text/vtt; codecs="vtt"']=Om;function Sm(){this.a=null}Sm.prototype.parseInit=function(b){var c=!1;(new P).L("moov",Pe).L("trak",Pe).L("mdia",Pe).va("mdhd",function(b){0==b.version?(b.reader.O(4),b.reader.O(4),this.a=b.reader.J(),b.reader.O(4)):(b.reader.O(8),b.reader.O(8),this.a=b.reader.J(),b.reader.O(8));b.reader.O(4)}.bind(this)).L("minf",Pe).L("stbl",Pe).va("stsd",Qe).L("wvtt",function(){c=!0}).parse(b);if(!this.a)throw new A(2,2,2008);if(!c)throw new A(2,2,2008);};
Sm.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,p=null;(new P).L("moof",Pe).L("traf",Pe).va("tfdt",function(b){k=!0;e=0==b.version?b.reader.J():b.reader.Gb()}).va("tfhd",function(b){var c=b.flags;b=b.reader;b.O(4);c&1&&b.O(8);c&2&&b.O(4);p=c&8?b.J():null}).va("trun",function(b){l=!0;var c=b.version,d=b.flags;b=b.reader;var e=b.J();d&1&&b.O(4);d&4&&b.O(4);for(var g=[],h=0;h<e;h++){var k={duration:null,sampleSize:null,ld:null};d&256&&
(k.duration=b.J());d&512&&(k.sampleSize=b.J());d&1024&&b.O(4);d&2048&&(k.ld=0==c?b.J():b.re());g.push(k)}f=g}).L("mdat",Re(function(b){m=!0;g=b})).parse(b);if(!m&&!k&&!l)throw new A(2,2,2008);var t=e,w=new DataView(g.buffer,g.byteOffset,g.byteLength),x=new O(w,0);f.forEach(function(b){var f=b.duration||p,g=b.ld?e+b.ld:t;t=g+(f||0);var k=0;do{var l=x.J();k+=l;var m=x.J(),w=null;"vttc"==Se(m)?8<l&&(w=x.hb(l-8)):x.O(l-8);f&&w&&h.push(Tm(w,c.periodStart+g/d.a,c.periodStart+t/d.a))}while(b.sampleSize&&
k<b.sampleSize)});return h.filter($c.Sa)};function Tm(b,c,d){var e,f,g;(new P).L("payl",Re(function(b){e=bc(b)})).L("iden",Re(function(b){f=bc(b)})).L("sttg",Re(function(b){g=bc(b)})).parse(b);return e?Um(e,f,g,c,d):null}function Um(b,c,d,e,f){b=new sd(e,f,b);c&&(b.id=c);if(d)for(c=new Uf(d),d=Xf(c);d;)Qm(b,d,[]),Vf(c),d=Xf(c);return b}nd['application/mp4; codecs="wvtt"']=Sm;function ok(b){this.a=null;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"}y("shaka.text.SimpleTextDisplayer",ok);ok.prototype.remove=function(b,c){if(!this.a)return!1;Vm(this.a,function(d){return d.startTime<c&&d.endTime>b});return!0};ok.prototype.remove=ok.prototype.remove;
ok.prototype.append=function(b){for(var c=Wm,d=[],e=0;e<b.length;e++){var f=c(b[e]);f&&d.push(f)}d.slice().sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime!=c.endTime?b.endTime-c.startTime:d.indexOf(c)-d.indexOf(b)}).forEach(function(b){this.a.addCue(b)}.bind(this))};ok.prototype.append=ok.prototype.append;ok.prototype.destroy=function(){this.a&&Vm(this.a,function(){return!0});this.a=null;return Promise.resolve()};ok.prototype.destroy=ok.prototype.destroy;
ok.prototype.isTextVisible=function(){return"showing"==this.a.mode};ok.prototype.isTextVisible=ok.prototype.isTextVisible;ok.prototype.setTextVisibility=function(b){this.a.mode=b?"showing":"hidden"};ok.prototype.setTextVisibility=ok.prototype.setTextVisibility;
function Wm(b){if(b.startTime>=b.endTime)return null;var c=new VTTCue(b.startTime,b.endTime,b.payload);c.lineAlign=b.lineAlign;c.positionAlign=b.positionAlign;c.size=b.size;try{c.align=b.textAlign}catch(d){}"center"==b.textAlign&&"center"!=c.align&&(c.align="middle");"vertical-lr"==b.writingMode?c.vertical="lr":"vertical-rl"==b.writingMode&&(c.vertical="rl");1==b.lineInterpretation&&(c.snapToLines=!1);null!=b.line&&(c.line=b.line);null!=b.position&&(c.position=b.position);return c}
function Vm(b,c){var d=b.mode;b.mode="showing"==d?"showing":"hidden";for(var e=b.cues,f=e.length-1;0<=f;f--){var g=e[f];g&&c(g)&&b.removeCue(g)}b.mode=d};/*
Copyright 2013 Ali Al Dallal
Licensed under the MIT license.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
for(var Xm={ach:{h:"Lwo",i:"Acholi"},ady:{h:"\u0410\u0434\u044b\u0433\u044d\u0431\u0437\u044d",i:"Adyghe"},af:{h:"Afrikaans",i:"Afrikaans"},"af-NA":{h:"Afrikaans (Namibia)",i:"Afrikaans (Namibia)"},"af-ZA":{h:"Afrikaans (South Africa)",i:"Afrikaans (South Africa)"},ak:{h:"T\u0255\u0265i",i:"Akan"},ar:{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic"},"ar-AR":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic"},"ar-MA":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629",i:"Arabic (Morocco)"},
"ar-SA":{h:"\u0627\u0644\u0639\u0631\u0628\u064a\u0629 (\u0627\u0644\u0633\u0639\u0648\u062f\u064a\u0629)",i:"Arabic (Saudi Arabia)"},"ay-BO":{h:"Aymar aru",i:"Aymara"},az:{h:"Az\u0259rbaycan dili",i:"Azerbaijani"},"az-AZ":{h:"Az\u0259rbaycan dili",i:"Azerbaijani"},"be-BY":{h:"\u0411\u0435\u043b\u0430\u0440\u0443\u0441\u043a\u0430\u044f",i:"Belarusian"},bg:{h:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",i:"Bulgarian"},"bg-BG":{h:"\u0411\u044a\u043b\u0433\u0430\u0440\u0441\u043a\u0438",
i:"Bulgarian"},bn:{h:"\u09ac\u09be\u0982\u09b2\u09be",i:"Bengali"},"bn-IN":{h:"\u09ac\u09be\u0982\u09b2\u09be (\u09ad\u09be\u09b0\u09a4)",i:"Bengali (India)"},"bn-BD":{h:"\u09ac\u09be\u0982\u09b2\u09be(\u09ac\u09be\u0982\u09b2\u09be\u09a6\u09c7\u09b6)",i:"Bengali (Bangladesh)"},"bs-BA":{h:"Bosanski",i:"Bosnian"},ca:{h:"Catal\u00e0",i:"Catalan"},"ca-ES":{h:"Catal\u00e0",i:"Catalan"},cak:{h:"Maya Kaqchikel",i:"Kaqchikel"},"ck-US":{h:"\u13e3\u13b3\u13a9 (tsalagi)",i:"Cherokee"},cs:{h:"\u010ce\u0161tina",
i:"Czech"},"cs-CZ":{h:"\u010ce\u0161tina",i:"Czech"},cy:{h:"Cymraeg",i:"Welsh"},"cy-GB":{h:"Cymraeg",i:"Welsh"},da:{h:"Dansk",i:"Danish"},"da-DK":{h:"Dansk",i:"Danish"},de:{h:"Deutsch",i:"German"},"de-AT":{h:"Deutsch (\u00d6sterreich)",i:"German (Austria)"},"de-DE":{h:"Deutsch (Deutschland)",i:"German (Germany)"},"de-CH":{h:"Deutsch (Schweiz)",i:"German (Switzerland)"},dsb:{h:"Dolnoserb\u0161\u0107ina",i:"Lower Sorbian"},el:{h:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",i:"Greek"},"el-GR":{h:"\u0395\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ac",
i:"Greek (Greece)"},en:{h:"English",i:"English"},"en-GB":{h:"English (UK)",i:"English (UK)"},"en-AU":{h:"English (Australia)",i:"English (Australia)"},"en-CA":{h:"English (Canada)",i:"English (Canada)"},"en-IE":{h:"English (Ireland)",i:"English (Ireland)"},"en-IN":{h:"English (India)",i:"English (India)"},"en-PI":{h:"English (Pirate)",i:"English (Pirate)"},"en-UD":{h:"English (Upside Down)",i:"English (Upside Down)"},"en-US":{h:"English (US)",i:"English (US)"},"en-ZA":{h:"English (South Africa)",
i:"English (South Africa)"},"en@pirate":{h:"English (Pirate)",i:"English (Pirate)"},eo:{h:"Esperanto",i:"Esperanto"},"eo-EO":{h:"Esperanto",i:"Esperanto"},es:{h:"Espa\u00f1ol",i:"Spanish"},"es-AR":{h:"Espa\u00f1ol (Argentine)",i:"Spanish (Argentina)"},"es-419":{h:"Espa\u00f1ol (Latinoam\u00e9rica)",i:"Spanish (Latin America)"},"es-CL":{h:"Espa\u00f1ol (Chile)",i:"Spanish (Chile)"},"es-CO":{h:"Espa\u00f1ol (Colombia)",i:"Spanish (Colombia)"},"es-EC":{h:"Espa\u00f1ol (Ecuador)",i:"Spanish (Ecuador)"},
"es-ES":{h:"Espa\u00f1ol (Espa\u00f1a)",i:"Spanish (Spain)"},"es-LA":{h:"Espa\u00f1ol (Latinoam\u00e9rica)",i:"Spanish (Latin America)"},"es-NI":{h:"Espa\u00f1ol (Nicaragua)",i:"Spanish (Nicaragua)"},"es-MX":{h:"Espa\u00f1ol (M\u00e9xico)",i:"Spanish (Mexico)"},"es-US":{h:"Espa\u00f1ol (Estados Unidos)",i:"Spanish (United States)"},"es-VE":{h:"Espa\u00f1ol (Venezuela)",i:"Spanish (Venezuela)"},et:{h:"eesti keel",i:"Estonian"},"et-EE":{h:"Eesti (Estonia)",i:"Estonian (Estonia)"},eu:{h:"Euskara",i:"Basque"},
"eu-ES":{h:"Euskara",i:"Basque"},fa:{h:"\u0641\u0627\u0631\u0633\u06cc",i:"Persian"},"fa-IR":{h:"\u0641\u0627\u0631\u0633\u06cc",i:"Persian"},"fb-LT":{h:"Leet Speak",i:"Leet"},ff:{h:"Fulah",i:"Fulah"},fi:{h:"Suomi",i:"Finnish"},"fi-FI":{h:"Suomi",i:"Finnish"},"fo-FO":{h:"F\u00f8royskt",i:"Faroese"},fr:{h:"Fran\u00e7ais",i:"French"},"fr-CA":{h:"Fran\u00e7ais (Canada)",i:"French (Canada)"},"fr-FR":{h:"Fran\u00e7ais (France)",i:"French (France)"},"fr-BE":{h:"Fran\u00e7ais (Belgique)",i:"French (Belgium)"},
"fr-CH":{h:"Fran\u00e7ais (Suisse)",i:"French (Switzerland)"},"fy-NL":{h:"Frysk",i:"Frisian (West)"},ga:{h:"Gaeilge",i:"Irish"},"ga-IE":{h:"Gaeilge (Gaelic)",i:"Irish (Gaelic)"},gl:{h:"Galego",i:"Galician"},"gl-ES":{h:"Galego",i:"Galician"},"gn-PY":{h:"Ava\u00f1e'\u1ebd",i:"Guarani"},"gu-IN":{h:"\u0a97\u0ac1\u0a9c\u0ab0\u0abe\u0aa4\u0ac0",i:"Gujarati"},"gx-GR":{h:"\u1f19\u03bb\u03bb\u03b7\u03bd\u03b9\u03ba\u03ae \u1f00\u03c1\u03c7\u03b1\u03af\u03b1",i:"Classical Greek"},he:{h:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",
i:"Hebrew"},"he-IL":{h:"\u05e2\u05d1\u05e8\u05d9\u05ea\u200f",i:"Hebrew"},hi:{h:"\u0939\u093f\u0928\u094d\u0926\u0940",i:"Hindi"},"hi-IN":{h:"\u0939\u093f\u0928\u094d\u0926\u0940",i:"Hindi"},hr:{h:"Hrvatski",i:"Croatian"},"hr-HR":{h:"Hrvatski",i:"Croatian"},hsb:{h:"Hornjoserb\u0161\u0107ina",i:"Upper Sorbian"},ht:{h:"Krey\u00f2l",i:"Haitian Creole"},hu:{h:"Magyar",i:"Hungarian"},"hu-HU":{h:"Magyar",i:"Hungarian"},"hy-AM":{h:"\u0540\u0561\u0575\u0565\u0580\u0565\u0576",i:"Armenian"},id:{h:"Bahasa Indonesia",
i:"Indonesian"},"id-ID":{h:"Bahasa Indonesia",i:"Indonesian"},is:{h:"\u00cdslenska",i:"Icelandic"},"is-IS":{h:"\u00cdslenska (Iceland)",i:"Icelandic (Iceland)"},it:{h:"Italiano",i:"Italian"},"it-IT":{h:"Italiano",i:"Italian"},ja:{h:"\u65e5\u672c\u8a9e",i:"Japanese"},"ja-JP":{h:"\u65e5\u672c\u8a9e",i:"Japanese"},"jv-ID":{h:"Basa Jawa",i:"Javanese"},"ka-GE":{h:"\u10e5\u10d0\u10e0\u10d7\u10e3\u10da\u10d8",i:"Georgian"},"kk-KZ":{h:"\u049a\u0430\u0437\u0430\u049b\u0448\u0430",i:"Kazakh"},km:{h:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",
i:"Khmer"},"km-KH":{h:"\u1797\u17b6\u179f\u17b6\u1781\u17d2\u1798\u17c2\u179a",i:"Khmer"},kab:{h:"Taqbaylit",i:"Kabyle"},kn:{h:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1",i:"Kannada"},"kn-IN":{h:"\u0c95\u0ca8\u0ccd\u0ca8\u0ca1 (India)",i:"Kannada (India)"},ko:{h:"\ud55c\uad6d\uc5b4",i:"Korean"},"ko-KR":{h:"\ud55c\uad6d\uc5b4 (\u97e9\u56fd)",i:"Korean (Korea)"},ku:{h:"Kurd\u00ee",i:"Kurdish"},"ku-TR":{h:"Kurd\u00ee",i:"Kurdish"},la:{h:"Latin",i:"Latin"},"la-VA":{h:"Latin",i:"Latin"},lb:{h:"L\u00ebtzebuergesch",
i:"Luxembourgish"},"li-NL":{h:"L\u00e8mb\u00f6rgs",i:"Limburgish"},lt:{h:"Lietuvi\u0173",i:"Lithuanian"},"lt-LT":{h:"Lietuvi\u0173",i:"Lithuanian"},lv:{h:"Latvie\u0161u",i:"Latvian"},"lv-LV":{h:"Latvie\u0161u",i:"Latvian"},mai:{h:"\u092e\u0948\u0925\u093f\u0932\u0940, \u09ae\u09c8\u09a5\u09bf\u09b2\u09c0",i:"Maithili"},"mg-MG":{h:"Malagasy",i:"Malagasy"},mk:{h:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438",i:"Macedonian"},"mk-MK":{h:"\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438 (\u041c\u0430\u043a\u0435\u0434\u043e\u043d\u0441\u043a\u0438)",
i:"Macedonian (Macedonian)"},ml:{h:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",i:"Malayalam"},"ml-IN":{h:"\u0d2e\u0d32\u0d2f\u0d3e\u0d33\u0d02",i:"Malayalam"},"mn-MN":{h:"\u041c\u043e\u043d\u0433\u043e\u043b",i:"Mongolian"},mr:{h:"\u092e\u0930\u093e\u0920\u0940",i:"Marathi"},"mr-IN":{h:"\u092e\u0930\u093e\u0920\u0940",i:"Marathi"},ms:{h:"Bahasa Melayu",i:"Malay"},"ms-MY":{h:"Bahasa Melayu",i:"Malay"},mt:{h:"Malti",i:"Maltese"},"mt-MT":{h:"Malti",i:"Maltese"},my:{h:"\u1017\u1019\u102c\u1005\u1000\u102c",
i:"Burmese"},nb:{h:"Norsk (bokm\u00e5l)",i:"Norwegian (bokmal)"},"nb-NO":{h:"Norsk (bokm\u00e5l)",i:"Norwegian (bokmal)"},ne:{h:"\u0928\u0947\u092a\u093e\u0932\u0940",i:"Nepali"},"ne-NP":{h:"\u0928\u0947\u092a\u093e\u0932\u0940",i:"Nepali"},nl:{h:"Nederlands",i:"Dutch"},"nl-BE":{h:"Nederlands (Belgi\u00eb)",i:"Dutch (Belgium)"},"nl-NL":{h:"Nederlands (Nederland)",i:"Dutch (Netherlands)"},"nn-NO":{h:"Norsk (nynorsk)",i:"Norwegian (nynorsk)"},no:{h:"Norsk",i:"Norwegian"},oc:{h:"Occitan",i:"Occitan"},
"or-IN":{h:"\u0b13\u0b21\u0b3c\u0b3f\u0b06",i:"Oriya"},pa:{h:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40",i:"Punjabi"},"pa-IN":{h:"\u0a2a\u0a70\u0a1c\u0a3e\u0a2c\u0a40 (\u0a2d\u0a3e\u0a30\u0a24 \u0a28\u0a42\u0a70)",i:"Punjabi (India)"},pl:{h:"Polski",i:"Polish"},"pl-PL":{h:"Polski",i:"Polish"},"ps-AF":{h:"\u067e\u069a\u062a\u0648",i:"Pashto"},pt:{h:"Portugu\u00eas",i:"Portuguese"},"pt-BR":{h:"Portugu\u00eas (Brasil)",i:"Portuguese (Brazil)"},"pt-PT":{h:"Portugu\u00eas (Portugal)",i:"Portuguese (Portugal)"},
"qu-PE":{h:"Qhichwa",i:"Quechua"},"rm-CH":{h:"Rumantsch",i:"Romansh"},ro:{h:"Rom\u00e2n\u0103",i:"Romanian"},"ro-RO":{h:"Rom\u00e2n\u0103",i:"Romanian"},ru:{h:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",i:"Russian"},"ru-RU":{h:"\u0420\u0443\u0441\u0441\u043a\u0438\u0439",i:"Russian"},"sa-IN":{h:"\u0938\u0902\u0938\u094d\u0915\u0943\u0924\u092e\u094d",i:"Sanskrit"},"se-NO":{h:"Davvis\u00e1megiella",i:"Northern S\u00e1mi"},"si-LK":{h:"\u0db4\u0dc5\u0dcf\u0dad",i:"Sinhala (Sri Lanka)"},sk:{h:"Sloven\u010dina",
i:"Slovak"},"sk-SK":{h:"Sloven\u010dina (Slovakia)",i:"Slovak (Slovakia)"},sl:{h:"Sloven\u0161\u010dina",i:"Slovenian"},"sl-SI":{h:"Sloven\u0161\u010dina",i:"Slovenian"},"so-SO":{h:"Soomaaliga",i:"Somali"},sq:{h:"Shqip",i:"Albanian"},"sq-AL":{h:"Shqip",i:"Albanian"},sr:{h:"\u0421\u0440\u043f\u0441\u043a\u0438",i:"Serbian"},"sr-RS":{h:"\u0421\u0440\u043f\u0441\u043a\u0438 (Serbia)",i:"Serbian (Serbia)"},su:{h:"Basa Sunda",i:"Sundanese"},sv:{h:"Svenska",i:"Swedish"},"sv-SE":{h:"Svenska",i:"Swedish"},
sw:{h:"Kiswahili",i:"Swahili"},"sw-KE":{h:"Kiswahili",i:"Swahili (Kenya)"},ta:{h:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",i:"Tamil"},"ta-IN":{h:"\u0ba4\u0bae\u0bbf\u0bb4\u0bcd",i:"Tamil"},te:{h:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",i:"Telugu"},"te-IN":{h:"\u0c24\u0c46\u0c32\u0c41\u0c17\u0c41",i:"Telugu"},tg:{h:"\u0437\u0430\u0431\u043e\u0301\u043d\u0438 \u0442\u043e\u04b7\u0438\u043a\u04e3\u0301",i:"Tajik"},"tg-TJ":{h:"\u0442\u043e\u04b7\u0438\u043a\u04e3",i:"Tajik"},th:{h:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22",
i:"Thai"},"th-TH":{h:"\u0e20\u0e32\u0e29\u0e32\u0e44\u0e17\u0e22 (\u0e1b\u0e23\u0e30\u0e40\u0e17\u0e28\u0e44\u0e17\u0e22)",i:"Thai (Thailand)"},tl:{h:"Filipino",i:"Filipino"},"tl-PH":{h:"Filipino",i:"Filipino"},tlh:{h:"tlhIngan-Hol",i:"Klingon"},tr:{h:"T\u00fcrk\u00e7e",i:"Turkish"},"tr-TR":{h:"T\u00fcrk\u00e7e",i:"Turkish"},"tt-RU":{h:"\u0442\u0430\u0442\u0430\u0440\u0447\u0430",i:"Tatar"},uk:{h:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",i:"Ukrainian"},"uk-UA":{h:"\u0423\u043a\u0440\u0430\u0457\u043d\u0441\u044c\u043a\u0430",
i:"Ukrainian"},ur:{h:"\u0627\u0631\u062f\u0648",i:"Urdu"},"ur-PK":{h:"\u0627\u0631\u062f\u0648",i:"Urdu"},uz:{h:"O'zbek",i:"Uzbek"},"uz-UZ":{h:"O'zbek",i:"Uzbek"},vi:{h:"Ti\u1ebfng Vi\u1ec7t",i:"Vietnamese"},"vi-VN":{h:"Ti\u1ebfng Vi\u1ec7t",i:"Vietnamese"},"xh-ZA":{h:"isiXhosa",i:"Xhosa"},yi:{h:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9",i:"Yiddish"},"yi-DE":{h:"\u05d9\u05d9\u05b4\u05d3\u05d9\u05e9 (German)",i:"Yiddish (German)"},zh:{h:"\u4e2d\u6587",i:"Chinese"},"zh-HANS":{h:"\u4e2d\u6587\u7b80\u4f53",
i:"Chinese Simplified"},"zh-HANT":{h:"\u4e2d\u6587\u7e41\u9ad4",i:"Chinese Traditional"},"zh-CN":{h:"\u4e2d\u6587\uff08\u4e2d\u56fd\uff09",i:"Chinese Simplified (China)"},"zh-HK":{h:"\u4e2d\u6587\uff08\u9999\u6e2f\uff09",i:"Chinese Traditional (Hong Kong)"},"zh-SG":{h:"\u4e2d\u6587\uff08\u65b0\u52a0\u5761\uff09",i:"Chinese Simplified (Singapore)"},"zh-TW":{h:"\u4e2d\u6587\uff08\u53f0\u7063\uff09",i:"Chinese Traditional (Taiwan)"},"zu-ZA":{h:"isiZulu",i:"Zulu"}},Ym=q(Object.keys(Xm)),Zm=Ym.next();!Zm.done;Zm=
Ym.next()){var $m=Zm.value;Xm[$m.toLowerCase()]=Xm[$m]};function V(b){this.g=I(b);this.f=new Map;this.b=new Set;this.c=new Map;this.a=new D}y("shaka.ui.Localization",V);V.prototype.addEventListener=function(b,c,d){this.a.addEventListener(b,c,d)};V.prototype.addEventListener=V.prototype.addEventListener;V.prototype.removeEventListener=function(b,c,d){this.a.removeEventListener(b,c,d||void 0)};V.prototype.removeEventListener=V.prototype.removeEventListener;V.prototype.dispatchEvent=function(b){return this.a.dispatchEvent(b)};V.prototype.dispatchEvent=V.prototype.dispatchEvent;
V.prototype.wd=function(b){var c=this;this.b.clear();b=q(b);for(var d=b.next();!d.done;d=b.next())this.b.add(I(d.value));an(this);this.a.dispatchEvent(new C("locale-changed"));b=Ub(this.b,function(b){return!c.c.has(b)});b.length&&this.a.dispatchEvent(new C("unknown-locales",{Rf:b}))};V.prototype.changeLocale=V.prototype.wd;
V.prototype.W=function(b,c,d){var e=bn;b=I(b);void 0===d&&(d=e.Se);var f=this.c.get(b)||new Map;c.forEach(function(b,c){f.has(c)&&d!=e.Se||f.set(c,b)});this.c.set(b,f);an(this);this.a.dispatchEvent(new C("locale-updated"));return this};V.prototype.insert=V.prototype.W;V.prototype.Og=function(b){for(var c=q(b.keys()),d=c.next();!d.done;d=c.next())d=d.value,b.set(d,this.resolve(d))};V.prototype.resolveDictionary=V.prototype.Og;
V.prototype.resolve=function(b){var c=this.f.get(b);if(c)return c;b={locales:Array.from(this.b),missing:b};this.a.dispatchEvent(new C("unknown-localization",b));return""};V.prototype.resolve=V.prototype.resolve;
function an(b){for(var c=b.c,d=b.g,e=b.b,f=new Set,g={},h=q(e),k=h.next();!k.done;g={locale:g.locale},k=h.next()){g.locale=k.value;f.add(g.locale);f.add(Kd(g.locale));k=Ub(c.keys(),function(b){return function(c){var d=b.locale,e=Kd(c),f=Kd(d);return c!=e&&d!=f&&e==f}}(g));k.sort();var l=q(k);for(k=l.next();!k.done;k=l.next())f.add(k.value);k=Ub(c.keys(),function(b){return function(c){return Kd(c)==b.locale}}(g));k.sort();l=q(k);for(k=l.next();!k.done;k=l.next())f.add(k.value)}f.add(d);d=[];f=q(f);
for(k=f.next();!k.done;k=f.next())(k=c.get(k.value))&&d.push(k);d.reverse();b.f.clear();c=q(d);for(k=c.next();!k.done;k=c.next())k.value.forEach(function(c,d){b.f.set(d,c)});c=b.f.keys();f=new Set;d=q(b.b);for(k=d.next();!k.done;k=d.next())k=b.c.get(k.value)||new Map,cn(k,c,f);0<f.size&&(e={Rf:Array.from(e),uh:Array.from(f)},b.a.dispatchEvent(new C("missing-localizations",e)))}function cn(b,c,d){c=q(c);for(var e=c.next();!e.done;e=c.next())e=e.value,b.get(e)||d.add(e)}var bn={USE_OLD:0,USE_NEW:1};
V.ConflictResolution=bn;y("shaka.ui.Utils.getFirstDescendantWithClassName",function(b,c){return dn(b,c)});function dn(b,c){var d=b.getElementsByClassName(c);return d.length?d[0]:null}function en(b){return(b=b.mc().filter(function(b){return 1==b.active})[0])?"video/mp2t"==b.mimeType:!1}function W(b){return document.createElement(b)};function X(b,c,d,e){var f=this;D.call(this);this.w=!0;this.$=!1;this.P=e;this.o=new L(d,b,this.P.castReceiverAppId);this.ea=!0;this.a=this.o.Mb();this.qa=d;this.A=this.o.cb();this.f=c;this.g=!1;this.V=new H(function(){f.a.currentTime=parseFloat(f.b.value)});this.H=new H(function(){f.f.style.cursor="none";f.a.paused&&!f.g||f.$?fn(f,1):fn(f,0)});this.j=new H(function(){for(var b=q(f.K),c=b.next();!c.done;c=b.next())Y(c.value,!1)});this.aa=new H(function(){gn(f)});this.v=null;this.ua=[];this.l=hn();
jn(this);kn(this);this.F=new Nb;ln(this);this.S=new Set;mn(this);this.aa.start(.125,!0)}Pa(X,D);y("shaka.ui.Controls",X);var nn=new Map;X.prototype.destroy=function(){this.F&&(this.F.R(),this.F=null);this.V&&(this.V.stop(),this.V=null);this.H&&(this.H.stop(),this.H=null);this.j&&(this.j.stop(),this.j=null);this.aa&&(this.aa.stop(),this.aa=null);this.l=null;this.S.clear();return Promise.resolve()};X.prototype.destroy=X.prototype.destroy;function on(b,c){nn.set(b,c)}X.registerElement=on;
X.prototype.Xe=function(b){this.ea=b;mn(this)};X.prototype.allowCast=X.prototype.Xe;X.prototype.Qf=function(){this.Sb()};X.prototype.loadComplete=X.prototype.Qf;X.prototype.fd=function(b){(this.w=b)?(Y(this.u.parentElement,!0),this.a.tabIndex=-1,this.a.controls=!1):Y(this.u.parentElement,!1);this.Sb()};X.prototype.setEnabledShakaControls=X.prototype.fd;X.prototype.De=function(b){this.a.controls=b;this.a.tabIndex=b?0:-1;b&&this.fd(!1)};X.prototype.setEnabledNativeControls=X.prototype.De;
X.prototype.pf=function(){return this.o};X.prototype.getCastProxy=X.prototype.pf;X.prototype.xf=function(){return this.l};X.prototype.getLocalization=X.prototype.xf;X.prototype.Hf=function(){return this.f};X.prototype.getVideoContainer=X.prototype.Hf;X.prototype.Mb=function(){return this.a};X.prototype.getVideo=X.prototype.Mb;X.prototype.wf=function(){return this.qa};X.prototype.getLocalVideo=X.prototype.wf;X.prototype.cb=function(){return this.A};X.prototype.getPlayer=X.prototype.cb;
X.prototype.sf=function(){return this.c};X.prototype.getControlsContainer=X.prototype.sf;X.prototype.qf=function(){return this.P};X.prototype.getConfig=X.prototype.qf;X.prototype.Of=function(){return this.g};X.prototype.isSeeking=X.prototype.Of;X.prototype.Mf=function(){return this.ea};X.prototype.isCastAllowed=X.prototype.Mf;X.prototype.Kd=function(){return this.g?Number(this.b.value):Number(this.a.currentTime)};X.prototype.getDisplayTime=X.prototype.Kd;X.prototype.Ee=function(b){this.v=b};
X.prototype.setLastTouchEventTime=X.prototype.Ee;function Y(b,c){b&&(c?(b.classList.add("shaka-displayed"),b.classList.remove("shaka-hidden")):(b.classList.add("shaka-hidden"),b.classList.remove("shaka-displayed")))}X.setDisplay=Y;X.prototype.Zc=function(){this.$=!0};X.prototype.overrideCssShowControls=X.prototype.Zc;X.prototype.ac=function(){return this.K.some(function(b){return b.classList.contains("shaka-displayed")})};X.prototype.anySettingsMenusAreOpen=X.prototype.ac;X.prototype.Mc=function(){this.j.mb()};
X.prototype.hideSettingsMenus=X.prototype.Mc;function kn(b){b.b&&b.b.setAttribute("aria-label",b.l.resolve("5553522235935533682"));b.m.setAttribute("aria-label",b.l.resolve(b.a.paused&&!b.g?"836055097473758014":"9042260521669277115"))}
function jn(b){b.B=null;b.b=null;b.f.classList.add("shaka-video-container");b.a.classList.add("shaka-video");b.c=W("div");b.c.classList.add("shaka-controls-container");b.f.appendChild(b.c);b.ha=W("div");b.ha.classList.add("shaka-play-button-container");b.c.appendChild(b.ha);b.m=W("button");b.m.classList.add("shaka-play-button");b.m.setAttribute("icon","play");b.ha.appendChild(b.m);b.G=document.createElementNS("http://www.w3.org/2000/svg","svg");b.G.setAttribute("class","shaka-spinner-svg");b.G.setAttribute("viewBox",
"0 0 30 30");b.m.appendChild(b.G);var c=document.createElementNS("http://www.w3.org/2000/svg","circle");c.setAttribute("class","shaka-spinner-path");c.setAttribute("cx","15");c.setAttribute("cy","15");c.setAttribute("r","14.5");c.setAttribute("fill","none");c.setAttribute("stroke-width","1");c.setAttribute("stroke-miterlimit","10");b.G.appendChild(c);b.u=W("div");b.u.classList.add("shaka-controls-button-panel");b.u.classList.add("shaka-no-propagation");b.u.classList.add("shaka-show-controls-on-mouse-over");
b.c.appendChild(b.u);for(c=0;c<b.P.controlPanelElements.length;c++){var d=b.P.controlPanelElements[c];nn.get(d)&&-1!=pn.indexOf(d)&&(d=nn.get(d),b.ua.push(d.create(b.u,b)))}b.P.addSeekBar&&(b.B=W("div"),b.B.classList.add("shaka-seek-bar-container"),b.b=document.createElement("input"),b.b.classList.add("shaka-seek-bar"),b.b.type="range",b.b.setAttribute("step","any"),b.b.setAttribute("min","0"),b.b.setAttribute("max","1"),b.b.value="0",b.b.classList.add("shaka-no-propagation"),b.b.classList.add("shaka-show-controls-on-mouse-over"),
b.B.appendChild(b.b),b.c.appendChild(b.B));b.K=Array.from(b.f.getElementsByClassName("shaka-settings-menu"));if(!b.b)for(b=q(b.K),c=b.next();!c.done;c=b.next())c.value.classList.add("shaka-low-position")}
function ln(b){b.A.addEventListener("buffering",b.Vf.bind(b));G(b.F,window,"keydown",b.be.bind(b));b.a.addEventListener("play",b.Sb.bind(b));b.a.addEventListener("pause",b.Sb.bind(b));b.a.addEventListener("ended",b.Sb.bind(b));b.b&&(b.b.addEventListener("mousedown",b.ge.bind(b)),b.b.addEventListener("touchstart",b.ge.bind(b),{passive:!0}),b.b.addEventListener("input",b.ng.bind(b)),b.b.addEventListener("touchend",b.fe.bind(b)),b.b.addEventListener("mouseup",b.fe.bind(b)));b.c.addEventListener("touchstart",
b.Yf.bind(b),{passive:!1});b.c.addEventListener("click",b.Xf.bind(b));for(var c=b.f.getElementsByClassName("shaka-no-propagation"),d=0;d<c.length;d++)c[d].addEventListener("click",function(b){b.stopPropagation()});c=b.f.getElementsByClassName("shaka-show-controls-on-mouse-over");for(d=0;d<c.length;d++){var e=c[d];e.addEventListener("mouseover",function(){b.$=!0});e.addEventListener("mouseleave",function(){b.$=!1})}b.f.addEventListener("mousemove",b.Rb.bind(b));b.f.addEventListener("touchmove",b.Rb.bind(b),
{passive:!0});b.f.addEventListener("touchend",b.Rb.bind(b),{passive:!0});b.f.addEventListener("mouseleave",b.gg.bind(b));b.u.addEventListener("click",function(){b.j.mb()});b.o.addEventListener("caststatuschanged",function(){mn(b)});b.f.addEventListener("keyup",b.ag.bind(b));b.l.addEventListener("locale-updated",function(){return kn(b)});b.l.addEventListener("locale-changed",function(){return kn(b)})}n=X.prototype;
n.Rb=function(b){"mousemove"==b.type&&this.c.classList.remove("shaka-keyboard-navigation");"touchstart"==b.type||"touchmove"==b.type||"touchend"==b.type||"keyup"==b.type?this.v=Date.now():this.v+1E3<Date.now()&&(this.v=null);this.v&&"mousemove"==b.type||(this.f.style.cursor="",this.j.stop(),fn(this,1),gn(this),this.H.stop(),"touchend"!=b.type&&"keyup"!=b.type&&this.v||this.H.start(3,!1))};n.gg=function(){this.v||this.H.mb()};
n.Yf=function(b){this.a.duration&&(qn(this)?this.v=Date.now():(this.Rb(b),b.preventDefault()))};n.Xf=function(){this.w&&(this.ac()?this.j.mb():rn(this))};function rn(b){b.w&&b.a.duration&&(b.A.ud(),b.a.paused?b.a.play():b.a.pause())}function mn(b){var c=b.o.ba();b.dispatchEvent(new C("caststatuschanged",{vh:c}));c?b.c.setAttribute("casting","true"):b.c.removeAttribute("casting")}
n.Sb=function(){this.a.ended&&!this.a.paused&&this.a.pause();this.w&&this.a.paused&&!this.g?(this.m.setAttribute("icon","play"),this.m.setAttribute("aria-label",this.l.resolve("836055097473758014"))):(this.m.setAttribute("icon","pause"),this.m.setAttribute("aria-label",this.l.resolve("9042260521669277115")))};n.ge=function(){this.w&&(this.g=!0,this.a.pause())};n.ng=function(){this.w&&this.a.duration&&(gn(this),this.V.start(.125,!1))};n.fe=function(){this.w&&(this.V.mb(),this.g=!1,this.a.play())};
n.ag=function(b){var c=b.key,d=document.activeElement,e=d&&d.classList?d.classList.contains("shaka-volume-bar"):!1,f=d&&d.classList&&d.classList.contains("shaka-seek-bar");this.c.contains(d)&&this.Rb(b);this.S["delete"](b.keyCode);switch(c){case "ArrowLeft":e||(this.a.currentTime-=5,gn(this));break;case "ArrowRight":e||(this.a.currentTime+=5,gn(this));break;case "Home":b=this.A.ib().start;this.a.currentTime=b;gn(this);break;case "End":b=this.A.ib().end;this.a.currentTime=b;gn(this);break;case " ":f&&
rn(this)}};n.Vf=function(b){b.buffering?this.G.setAttribute("class","shaka-spinner-svg"):this.G.setAttribute("class","shaka-spinner-svg shaka-hidden")};function qn(b){return b.w?b.o&&b.o.ba()?!0:null!=b.c.getAttribute("shown"):!1}
function gn(b){if(qn(b)){b.dispatchEvent(new C("timeandseekrangeupdated"));var c=b.g?Number(b.b.value):Number(b.a.currentTime),d=b.a.buffered.length,e=d?b.a.buffered.start(0):0,f=d?b.a.buffered.end(d-1):0,g=b.A.ib(),h=g.end-g.start;b.b&&(b.b.min=g.start,b.b.max=g.end);b.A.Z()?(c=Math.max(0,Math.floor(g.end-c)),!b.g&&b.b&&(b.b.value=g.end-c)):!b.g&&b.b&&(b.b.value=c);if(b.b)if(g=b.A.ib(),5>g.end-g.start){Y(b.B,!1);b=q(b.K);for(var k=b.next();!k.done;k=b.next())k.value.classList.add("shaka-low-position")}else{Y(b.B,
!0);var l=q(b.K);for(k=l.next();!k.done;k=l.next())k.value.classList.remove("shaka-low-position");k=["to right"];0==d?k.push("#000 0%"):(d=(Math.max(e,g.start)-g.start)/h||0,f=(Math.min(f,g.end)-g.start)/h||0,c=(c-g.start)/h||0,k.push("rgba(255, 255, 255, 0.3) "+100*d+"%"),k.push("rgb(255, 255, 255) "+100*d+"%"),k.push("rgb(255, 255, 255) "+100*c+"%"),k.push("rgba(255, 255, 255, 0.54) "+100*c+"%"),k.push("rgba(255, 255, 255, 0.54) "+100*f+"%"),k.push("rgba(255, 255, 255, 0.3) "+100*f+"%"));b.B.style.background=
"linear-gradient("+k.join(",")+")"}}}n.be=function(b){this.S.add(b.keyCode);var c=this.ac();9==b.keyCode&&(this.c.classList.add("shaka-keyboard-navigation"),G(this.F,window,"mousedown",this.fg.bind(this)));27==b.keyCode&&this.j.mb();c&&this.S.has(9)&&sn(this,b)};
function sn(b,c){var d=b.K.filter(function(b){return b.classList.contains("shaka-displayed")})[0];if(d.childNodes.length){for(var e=d.firstElementChild;e&&e.classList.contains("shaka-hidden");)e=e.nextElementSibling;for(d=d.lastElementChild;d&&d.classList.contains("shaka-hidden");)d=d.previousElementSibling;var f=document.activeElement;b.S.has(16)?f==e&&(c.preventDefault(),d.focus()):f==d&&(c.preventDefault(),e.focus())}}n.fg=function(){this.F.Ja(window,"mousedown");G(this.F,window,"keydown",this.be.bind(this))};
function fn(b,c){1==c?b.c.setAttribute("shown","true"):(b.c.removeAttribute("shown"),b.j.start(2,!1))}
function hn(){var b=new V("en");b.W("ar",new Map([["1050953507607739202","\u0627\u0644\u062d\u062c\u0645"],["1077325112364709655","\u0631\u062c\u0648\u0639"],["1142734805932039923","\u0625\u0631\u062c\u0627\u0639"],["142853231704504146","\u062a\u0634\u063a\u064a\u0644"],["1774834209035716827","\u062a\u0642\u062f\u064a\u0645 \u0633\u0631\u064a\u0639"],["1911090580951495029","\u0627\u0644\u062a\u0631\u062c\u0645\u0629"],["2023925063728908356","\u0625\u0644\u063a\u0627\u0621 \u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],
["298626259350585300","\u063a\u064a\u0631 \u0645\u0639\u0631\u0648\u0641\u0629"],["3045980486001972586","\u0645\u0628\u0627\u0634\u0631"],["3278592358864783064","\u0627\u0644\u0644\u063a\u0629"],["4242938254936928940",'\u0627\u0644\u062f\u062e\u0648\u0644 \u0641\u064a \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["4259064532355692191","\u062a\u0644\u0642\u0627\u0626\u064a"],["4388316720828367903","\u0625\u0639\u062f\u0627\u062f\u0627\u062a \u0625\u0636\u0627\u0641\u064a\u0629"],
["5146287486336231188","\u063a\u064a\u0631 \u0633\u0627\u0631\u064d"],["5553522235935533682","\u0634\u0631\u064a\u0637 \u062a\u0645\u0631\u064a\u0631 \u0627\u0644\u0628\u062d\u062b"],["5963689277976480680","\u0643\u062a\u0645 \u0627\u0644\u0635\u0648\u062a"],["6073266792045231479",""],["6161306839322897077","\u0625\u0646\u0647\u0627\u0621 \u0648\u0636\u0639 \u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["622115170869907732","\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0627\u0644\u0646\u0627\u0641\u0630\u0629"],
["6614181658619787283",'\u0627\u0644\u062e\u0631\u0648\u062c \u0645\u0646 \u0648\u0636\u0639 "\u0646\u0627\u0641\u0630\u0629 \u0636\u0645\u0646 \u0646\u0627\u0641\u0630\u0629"'],["7071612439610534706","\u0625\u0631\u0633\u0627\u0644..."],["8145129506114534451","\u0625\u064a\u0642\u0627\u0641"],["8345190086337560158","\u0645\u0644\u0621 \u0627\u0644\u0634\u0627\u0634\u0629"],["836055097473758014","\u062a\u0634\u063a\u064a\u0644"],["9042260521669277115","\u0625\u064a\u0642\u0627\u0641 \u0645\u0624\u0642\u062a"]]));
b.W("de",new Map([["1050953507607739202","Lautst\u00e4rke"],["1077325112364709655","Zur\u00fcck"],["1142734805932039923","Zur\u00fcckspulen"],["142853231704504146","An"],["1774834209035716827","Vorspulen"],["1911090580951495029","Untertitel"],["2023925063728908356","Stummschaltung aufheben"],["298626259350585300","Unbekannt"],["3045980486001972586","Live"],["3278592358864783064","Sprache"],["4242938254936928940","Bild-im-Bild-Modus aktivieren"],["4259064532355692191","Automatisch"],["4388316720828367903",
"Weitere Einstellungen"],["5146287486336231188","Nicht zutreffend"],["5553522235935533682","Schieberegler f\u00fcr Suche"],["5963689277976480680","Stummschalten"],["6073266792045231479","Aufl\u00f6sung"],["6161306839322897077","Vollbildmodus beenden"],["622115170869907732","Bild-in-Bild"],["6614181658619787283","Bild-im-Bild-Modus beenden"],["7071612439610534706","Streamen\u2026"],["8145129506114534451","Aus"],["8345190086337560158","Vollbild"],["836055097473758014","Wiedergeben"],["9042260521669277115",
"Pausieren"]]));b.W("en",new Map([["1050953507607739202","volume"],["1077325112364709655","Back"],["1142734805932039923","Rewind"],["142853231704504146","on"],["1774834209035716827","Fast-forward"],["1911090580951495029","Captions"],["2023925063728908356","Unmute"],["298626259350585300","Unknown"],["3045980486001972586","Live"],["3278592358864783064","Language"],["4242938254936928940","enter picture-in-picture"],["4259064532355692191","Auto"],["4388316720828367903","More settings"],["5146287486336231188",
"Not applicable"],["5553522235935533682","Seek slider"],["5963689277976480680","Mute"],["6073266792045231479","Resolution"],["6161306839322897077","Exit full screen"],["622115170869907732","Picture in Picture"],["6614181658619787283","exit picture-in-picture"],["7071612439610534706","Cast..."],["8145129506114534451","Off"],["8345190086337560158","Full screen"],["836055097473758014","Play"],["9042260521669277115","Pause"]]));b.W("en-GB",new Map([["1050953507607739202","volume"],["1077325112364709655",
"Back"],["1142734805932039923","Rewind"],["142853231704504146","on"],["1774834209035716827","Fast-forward"],["1911090580951495029","Captions"],["2023925063728908356","Unmute"],["298626259350585300","Unknown"],["3045980486001972586","Live"],["3278592358864783064","Language"],["4242938254936928940","enter picture-in-picture"],["4259064532355692191","Auto"],["4388316720828367903","More settings"],["5146287486336231188","Not applicable"],["5553522235935533682","Seek slider"],["5963689277976480680","Mute"],
["6073266792045231479","Resolution"],["6161306839322897077","Exit full screen"],["622115170869907732","Picture in Picture"],["6614181658619787283","exit picture-in-picture"],["7071612439610534706","Cast..."],["8145129506114534451","Off"],["8345190086337560158","Full screen"],["836055097473758014","Play"],["9042260521669277115","Pause"]]));b.W("es",new Map([["1050953507607739202","volumen"],["1077325112364709655","Atr\u00e1s"],["1142734805932039923","Retroceder"],["142853231704504146","activado"],
["1774834209035716827","Avance r\u00e1pido"],["1911090580951495029","Subt\u00edtulos"],["2023925063728908356","Activar sonido"],["298626259350585300","Desconocido"],["3045980486001972586","En directo"],["3278592358864783064","Idioma"],["4242938254936928940","abrir el modo imagen en imagen"],["4259064532355692191","Autom\u00e1tica"],["4388316720828367903","M\u00e1s ajustes"],["5146287486336231188","No aplicable"],["5553522235935533682","Barra deslizante de b\u00fasqueda"],["5963689277976480680","Silenciar"],
["6073266792045231479","Resoluci\u00f3n"],["6161306839322897077","Salir del modo de pantalla completa"],["622115170869907732","Imagen en imagen"],["6614181658619787283","salir del modo imagen en imagen"],["7071612439610534706","Reparto..."],["8145129506114534451","No"],["8345190086337560158","Pantalla completa"],["836055097473758014","Reproducir"],["9042260521669277115","Pausa"]]));b.W("es-419",new Map([["1050953507607739202","volumen"],["1077325112364709655","Atr\u00e1s"],["1142734805932039923",
"Retroceder"],["142853231704504146","activado"],["1774834209035716827","Avance r\u00e1pido"],["1911090580951495029","Subt\u00edtulos"],["2023925063728908356","Activar sonido"],["298626259350585300","Desconocido"],["3045980486001972586","En vivo"],["3278592358864783064","Idioma"],["4242938254936928940","ingresar al modo de pantalla en pantalla"],["4259064532355692191","Auto"],["4388316720828367903","M\u00e1s opciones de configuraci\u00f3n"],["5146287486336231188","No aplicable"],["5553522235935533682",
"Barra deslizante de b\u00fasqueda"],["5963689277976480680","Silenciar"],["6073266792045231479","Resoluci\u00f3n"],["6161306839322897077","Salir de pantalla completa"],["622115170869907732","Pantalla en pantalla"],["6614181658619787283","salir del modo de pantalla en pantalla"],["7071612439610534706","Transmitir\u2026"],["8145129506114534451","Desactivado"],["8345190086337560158","Pantalla completa"],["836055097473758014","Jugar"],["9042260521669277115","Detener"]]));b.W("fr",new Map([["1050953507607739202",
"volume"],["1077325112364709655","Retour"],["1142734805932039923","Retour arri\u00e8re"],["142853231704504146","activ\u00e9"],["1774834209035716827","Avance rapide"],["1911090580951495029","Sous-titres"],["2023925063728908356","Activer le son"],["298626259350585300","Inconnue"],["3045980486001972586","En direct"],["3278592358864783064","Langue"],["4242938254936928940","utiliser le mode PIP"],["4259064532355692191","Auto"],["4388316720828367903","Autres param\u00e8tres"],["5146287486336231188","Non applicable"],
["5553522235935533682","Barre de recherche"],["5963689277976480680","D\u00e9sactiver le son"],["6073266792045231479","R\u00e9solution"],["6161306839322897077","Quitter le mode plein \u00e9cran"],["622115170869907732","Picture-in-picture"],["6614181658619787283","quitter le mode PIP"],["7071612439610534706","Caster sur\u2026"],["8145129506114534451","D\u00e9sactiv\u00e9e"],["8345190086337560158","Plein \u00e9cran"],["836055097473758014","Lire"],["9042260521669277115","Mettre en veille"]]));b.W("it",
new Map([["1050953507607739202","volume"],["1077325112364709655","Indietro"],["1142734805932039923","Riavvolgi"],["142853231704504146","on"],["1774834209035716827","Avanti veloce"],["1911090580951495029","Sottotitoli"],["2023925063728908356","Riattiva audio"],["298626259350585300","Sconosciuto"],["3045980486001972586","Dal vivo"],["3278592358864783064","Lingua"],["4242938254936928940","attiva picture in picture"],["4259064532355692191","Auto"],["4388316720828367903","Altre impostazioni"],["5146287486336231188",
"Non applicable"],["5553522235935533682","Dispositivo di scorrimento"],["5963689277976480680","Disattiva audio"],["6073266792045231479","Risoluzione"],["6161306839322897077","Esci dalla modalit\u00e0 a schermo intero"],["622115170869907732","Picture in picture"],["6614181658619787283","esci da picture in picture"],["7071612439610534706","Trasmetti\u2026"],["8145129506114534451","Disattivato"],["8345190086337560158","Schermo intero"],["836055097473758014","Riproduci"],["9042260521669277115","Metti in pausa"]]));
b.W("ja",new Map([["1050953507607739202","\u97f3\u91cf"],["1077325112364709655","\u623b\u308b"],["1142734805932039923","\u5dfb\u304d\u623b\u3057"],["142853231704504146","\u30aa\u30f3"],["1774834209035716827","\u65e9\u9001\u308a"],["1911090580951495029","\u5b57\u5e55"],["2023925063728908356","\u30df\u30e5\u30fc\u30c8\u89e3\u9664"],["298626259350585300","\u4e0d\u660e"],["3045980486001972586","\u30e9\u30a4\u30d6"],["3278592358864783064","\u8a00\u8a9e"],["4242938254936928940","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u958b\u59cb\u3057\u307e\u3059"],
["4259064532355692191","\u81ea\u52d5"],["4388316720828367903","\u305d\u306e\u4ed6\u306e\u8a2d\u5b9a"],["5146287486336231188","--"],["5553522235935533682","\u30b7\u30fc\u30af \u30d0\u30fc"],["5963689277976480680","\u30df\u30e5\u30fc\u30c8"],["6073266792045231479","\u89e3\u50cf\u5ea6"],["6161306839322897077","\u5168\u753b\u9762\u30e2\u30fc\u30c9\u306e\u7d42\u4e86"],["622115170869907732","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc"],["6614181658619787283","\u30d4\u30af\u30c1\u30e3\u30fc \u30a4\u30f3 \u30d4\u30af\u30c1\u30e3\u30fc\u3092\u7d42\u4e86\u3057\u307e\u3059"],
["7071612439610534706","\u30ad\u30e3\u30b9\u30c8..."],["8145129506114534451","\u30aa\u30d5"],["8345190086337560158","\u5168\u753b\u9762"],["836055097473758014","\u518d\u751f"],["9042260521669277115","\u4e00\u6642\u505c\u6b62"]]));b.W("ko",new Map([["1050953507607739202","\ubcfc\ub968"],["1077325112364709655","\ub4a4\ub85c"],["1142734805932039923","\ub418\uac10\uae30"],["142853231704504146","\uc0ac\uc6a9"],["1774834209035716827","\ube68\ub9ac\uac10\uae30"],["1911090580951495029","\uc790\ub9c9"],["2023925063728908356",
"\uc74c\uc18c\uac70 \ud574\uc81c"],["298626259350585300","\uc54c \uc218 \uc5c6\uc74c"],["3045980486001972586","\ub77c\uc774\ube0c"],["3278592358864783064","\uc5b8\uc5b4"],["4242938254936928940","PIP \ubaa8\ub4dc \uc2dc\uc791"],["4259064532355692191","\uc790\ub3d9"],["4388316720828367903","\uc124\uc815 \ub354\ubcf4\uae30"],["5146287486336231188","\ud574\ub2f9 \uc0ac\ud56d \uc5c6\uc74c"],["5553522235935533682","\ud0d0\uc0c9 \uc2ac\ub77c\uc774\ub354"],["5963689277976480680","\uc74c\uc18c\uac70"],["6073266792045231479",
"\ud574\uc0c1\ub3c4"],["6161306839322897077","\uc804\uccb4\ud654\uba74 \uc885\ub8cc"],["622115170869907732","PIP \ubaa8\ub4dc"],["6614181658619787283","PIP \ubaa8\ub4dc \uc885\ub8cc"],["7071612439610534706","\uc804\uc1a1..."],["8145129506114534451","\uc0ac\uc6a9 \uc548\ud568"],["8345190086337560158","\uc804\uccb4\ud654\uba74"],["836055097473758014","\uc7ac\uc0dd"],["9042260521669277115","\uc77c\uc2dc\uc911\uc9c0"]]));b.W("nl",new Map([["1050953507607739202","volume"],["1077325112364709655","Terug"],
["1142734805932039923","Terugspoelen"],["142853231704504146","aan"],["1774834209035716827","Vooruitspoelen"],["1911090580951495029","Ondertiteling"],["2023925063728908356","Dempen opheffen"],["298626259350585300","Onbekend"],["3045980486001972586","Live"],["3278592358864783064","Taal"],["4242938254936928940","scherm-in-scherm openen"],["4259064532355692191","Automatisch"],["4388316720828367903","Meer instellingen"],["5146287486336231188","Niet van toepassing"],["5553522235935533682","Zoekschuifbalk"],
["5963689277976480680","Dempen"],["6073266792045231479","Resolutie"],["6161306839322897077","Volledig scherm afsluiten"],["622115170869907732","Scherm-in-scherm"],["6614181658619787283","scherm-in-scherm afsluiten"],["7071612439610534706","Casten..."],["8145129506114534451","Uit"],["8345190086337560158","Volledig scherm"],["836055097473758014","Afspelen"],["9042260521669277115","Onderbreken"]]));b.W("pl",new Map([["1050953507607739202","g\u0142o\u015bno\u015b\u0107"],["1077325112364709655","Wstecz"],
["1142734805932039923","Przewi\u0144 do ty\u0142u"],["142853231704504146","w\u0142."],["1774834209035716827","Przewi\u0144 do przodu"],["1911090580951495029","Napisy"],["2023925063728908356","Wy\u0142\u0105cz wyciszenie"],["298626259350585300","Nieznane"],["3045980486001972586","Na \u017cywo"],["3278592358864783064","J\u0119zyk"],["4242938254936928940","w\u0142\u0105cz tryb obrazu w obrazie"],["4259064532355692191","Automatyczna"],["4388316720828367903","Wi\u0119cej ustawie\u0144"],["5146287486336231188",
"Nie dotyczy"],["5553522235935533682","Suwak przewijania"],["5963689277976480680","Wycisz"],["6073266792045231479","Rozdzielczo\u015b\u0107"],["6161306839322897077","Zamknij pe\u0142ny ekran"],["622115170869907732","Obraz w obrazie"],["6614181658619787283","wy\u0142\u0105cz tryb obrazu w obrazie"],["7071612439610534706","Prze\u015blij..."],["8145129506114534451","Wy\u0142\u0105czone"],["8345190086337560158","Pe\u0142ny ekran"],["836055097473758014","Odtwarzaj"],["9042260521669277115","Wstrzymaj"]]));
b.W("pt-BR",new Map([["1050953507607739202","volume"],["1077325112364709655","Voltar"],["1142734805932039923","Retroceder"],["142853231704504146","ativado"],["1774834209035716827","Avan\u00e7ar"],["1911090580951495029","Legendas ocultas"],["2023925063728908356","Ativar som"],["298626259350585300","Desconhecido"],["3045980486001972586","Ao vivo"],["3278592358864783064","Idioma"],["4242938254936928940","entrar no modo picture-in-picture"],["4259064532355692191","Autom\u00e1tico"],["4388316720828367903",
"Mais configura\u00e7\u00f5es"],["5146287486336231188","N\u00e3o aplic\u00e1vel"],["5553522235935533682","Bot\u00e3o deslizante de busca"],["5963689277976480680","Desativar som"],["6073266792045231479","Resolu\u00e7\u00e3o"],["6161306839322897077","Sair da tela inteira"],["622115170869907732","Picture-in-picture"],["6614181658619787283","sair de picture-in-picture"],["7071612439610534706","Elenco..."],["8145129506114534451","Desativado"],["8345190086337560158","Tela inteira"],["836055097473758014",
"Reproduzir"],["9042260521669277115","Pausar"]]));b.W("pt-PT",new Map([["1050953507607739202","volume"],["1077325112364709655","Anterior"],["1142734805932039923","Recuar"],["142853231704504146","ativado"],["1774834209035716827","Avan\u00e7ar"],["1911090580951495029","Legendas"],["2023925063728908356","Reativar o som"],["298626259350585300","Desconhecida"],["3045980486001972586","Em direto"],["3278592358864783064","Idioma"],["4242938254936928940","entrar no modo ecr\u00e3 no ecr\u00e3"],["4259064532355692191",
"Autom\u00e1tico"],["4388316720828367903","Mais defini\u00e7\u00f5es"],["5146287486336231188","N\u00e3o aplic\u00e1vel"],["5553522235935533682","Controlo de deslize da procura"],["5963689277976480680","Desativar o som"],["6073266792045231479","Resolu\u00e7\u00e3o"],["6161306839322897077","Sair do ecr\u00e3 inteiro"],["622115170869907732","Ecr\u00e3 no ecr\u00e3"],["6614181658619787283","sair do modo ecr\u00e3 no ecr\u00e3"],["7071612439610534706","Transmitir..."],["8145129506114534451","Desativado"],
["8345190086337560158","Ecr\u00e3 inteiro"],["836055097473758014","Reproduzir"],["9042260521669277115","Colocar em pausa"]]));b.W("ru",new Map([["1050953507607739202","\u0433\u0440\u043e\u043c\u043a\u043e\u0441\u0442\u044c"],["1077325112364709655","\u041d\u0430\u0437\u0430\u0434"],["1142734805932039923","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0430\u0434"],["142853231704504146","\u0412\u041a\u041b"],["1774834209035716827","\u041f\u0435\u0440\u0435\u043c\u043e\u0442\u0430\u0442\u044c \u0432\u043f\u0435\u0440\u0435\u0434"],
["1911090580951495029","\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044b"],["2023925063728908356","\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],["298626259350585300","\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e"],["3045980486001972586","\u0412 \u044d\u0444\u0438\u0440\u0435"],["3278592358864783064","\u042f\u0437\u044b\u043a"],["4242938254936928940",'\u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["4259064532355692191","\u0410\u0432\u0442\u043e\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430"],["4388316720828367903","\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438"],["5146287486336231188","\u041d\u0435\u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u043e"],["5553522235935533682","\u041f\u043e\u043b\u0437\u0443\u043d\u043e\u043a \u043f\u043e\u0438\u0441\u043a\u0430"],["5963689277976480680","\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0432\u0443\u043a"],
["6073266792045231479","\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0438\u0435"],["6161306839322897077","\u0412\u044b\u0445\u043e\u0434 \u0438\u0437 \u043f\u043e\u043b\u043d\u043e\u044d\u043a\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0436\u0438\u043c\u0430"],["622115170869907732","\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"],["6614181658619787283",'\u0432\u044b\u0439\u0442\u0438 \u0438\u0437 \u0440\u0435\u0436\u0438\u043c\u0430 "\u041a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0432 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435"'],
["7071612439610534706","\u0425\u0440\u043e\u043c\u043a\u0430\u0441\u0442"],["8145129506114534451","\u0412\u044b\u043a\u043b."],["8345190086337560158","\u0412\u043e \u0432\u0435\u0441\u044c \u044d\u043a\u0440\u0430\u043d"],["836055097473758014","\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c"],["9042260521669277115","\u041f\u0440\u0438\u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c"]]));b.W("th",new Map([["1050953507607739202","\u0e23\u0e30\u0e14\u0e31\u0e1a\u0e40\u0e2a\u0e35\u0e22\u0e07"],
["1077325112364709655","\u0e01\u0e25\u0e31\u0e1a"],["1142734805932039923","\u0e01\u0e23\u0e2d\u0e01\u0e25\u0e31\u0e1a"],["142853231704504146","\u0e40\u0e1b\u0e34\u0e14"],["1774834209035716827","\u0e01\u0e23\u0e2d\u0e44\u0e1b\u0e02\u0e49\u0e32\u0e07\u0e2b\u0e19\u0e49\u0e32"],["1911090580951495029","\u0e04\u0e33\u0e2d\u0e18\u0e34\u0e1a\u0e32\u0e22\u0e27\u0e34\u0e14\u0e35\u0e42\u0e2d"],["2023925063728908356","\u0e40\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["298626259350585300","\u0e44\u0e21\u0e48\u0e17\u0e23\u0e32\u0e1a"],
["3045980486001972586","\u0e2a\u0e14"],["3278592358864783064","\u0e20\u0e32\u0e29\u0e32"],["4242938254936928940","\u0e40\u0e02\u0e49\u0e32\u0e2a\u0e39\u0e48\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["4259064532355692191","\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34"],["4388316720828367903","\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e40\u0e1e\u0e34\u0e48\u0e21\u0e40\u0e15\u0e34\u0e21"],["5146287486336231188",
"\u0e44\u0e21\u0e48\u0e40\u0e01\u0e35\u0e48\u0e22\u0e27\u0e02\u0e49\u0e2d\u0e07"],["5553522235935533682","\u0e41\u0e16\u0e1a\u0e40\u0e25\u0e37\u0e48\u0e2d\u0e19\u0e04\u0e49\u0e19\u0e2b\u0e32"],["5963689277976480680","\u0e1b\u0e34\u0e14\u0e40\u0e2a\u0e35\u0e22\u0e07"],["6073266792045231479","\u0e04\u0e27\u0e32\u0e21\u0e25\u0e30\u0e40\u0e2d\u0e35\u0e22\u0e14"],["6161306839322897077","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e42\u0e2b\u0e21\u0e14\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],
["622115170869907732","\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["6614181658619787283","\u0e2d\u0e2d\u0e01\u0e08\u0e32\u0e01\u0e01\u0e32\u0e23\u0e41\u0e2a\u0e14\u0e07\u0e20\u0e32\u0e1e\u0e0b\u0e49\u0e2d\u0e19\u0e20\u0e32\u0e1e"],["7071612439610534706","\u0e41\u0e04\u0e2a\u0e15\u0e4c..."],["8145129506114534451","\u0e1b\u0e34\u0e14"],["8345190086337560158","\u0e40\u0e15\u0e47\u0e21\u0e2b\u0e19\u0e49\u0e32\u0e08\u0e2d"],["836055097473758014",
"\u0e40\u0e25\u0e48\u0e19"],["9042260521669277115","\u0e2b\u0e22\u0e38\u0e14\u0e0a\u0e31\u0e48\u0e27\u0e04\u0e23\u0e32\u0e27"]]));b.W("tr",new Map([["1050953507607739202","ses d\u00fczeyi"],["1077325112364709655","Geri"],["1142734805932039923","Geri sar"],["142853231704504146","a\u00e7\u0131k"],["1774834209035716827","\u0130leri sar"],["1911090580951495029","Altyaz\u0131lar"],["2023925063728908356","Sesi a\u00e7"],["298626259350585300","Bilinmiyor"],["3045980486001972586","Canl\u0131"],["3278592358864783064",
"Dil"],["4242938254936928940","pencere i\u00e7inde pencere moduna gir"],["4259064532355692191","Otomatik"],["4388316720828367903","Di\u011fer ayarlar"],["5146287486336231188","Kullan\u0131lm\u0131yor"],["5553522235935533682","Arama kayd\u0131rma \u00e7ubu\u011fu"],["5963689277976480680","Sesi kapat"],["6073266792045231479","\u00c7\u00f6z\u00fcn\u00fcrl\u00fck"],["6161306839322897077","Tam ekrandan \u00e7\u0131k"],["622115170869907732","Pencere i\u00e7inde Pencere"],["6614181658619787283","pencere i\u00e7inde pencere modundan \u00e7\u0131k\u0131n"],
["7071612439610534706","Yay\u0131nla..."],["8145129506114534451","Kapal\u0131"],["8345190086337560158","Tam ekran"],["836055097473758014","Oynat"],["9042260521669277115","Duraklat"]]));b.W("zh-CN",new Map([["1050953507607739202","\u97f3\u91cf"],["1077325112364709655","\u8fd4\u56de"],["1142734805932039923","\u5feb\u9000"],["142853231704504146","\u5f00\u542f"],["1774834209035716827","\u5feb\u8fdb"],["1911090580951495029","\u5b57\u5e55"],["2023925063728908356","\u53d6\u6d88\u9759\u97f3"],["298626259350585300",
"\u672a\u77e5"],["3045980486001972586","\u76f4\u64ad"],["3278592358864783064","\u8bed\u8a00"],["4242938254936928940","\u8fdb\u5165\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["4259064532355692191","\u81ea\u52a8"],["4388316720828367903","\u66f4\u591a\u8bbe\u7f6e"],["5146287486336231188","\u4e0d\u9069\u7528"],["5553522235935533682","\u64ad\u653e\u6ed1\u5757"],["5963689277976480680","\u9759\u97f3"],["6073266792045231479","\u5206\u8fa8\u7387"],["6161306839322897077","\u9000\u51fa\u5168\u5c4f"],["622115170869907732",
"\u753b\u4e2d\u753b"],["6614181658619787283","\u9000\u51fa\u201c\u753b\u4e2d\u753b\u201d\u6a21\u5f0f"],["7071612439610534706","\u6295\u5c04\u2026"],["8145129506114534451","\u5173\u95ed"],["8345190086337560158","\u5168\u5c4f"],["836055097473758014","\u64ad\u653e"],["9042260521669277115","\u6682\u505c"]]));b.W("zh-HK",new Map([["1050953507607739202","\u97f3\u91cf"],["1077325112364709655","\u8fd4\u56de"],["1142734805932039923","\u5012\u5e36"],["142853231704504146",""],["1774834209035716827","\u5feb\u8f49"],
["1911090580951495029","\u5b57\u5e55"],["2023925063728908356","\u89e3\u9664\u975c\u97f3"],["298626259350585300","\u4e0d\u660e"],["3045980486001972586","\u76f4\u64ad"],["3278592358864783064","\u8a9e\u8a00"],["4242938254936928940","\u9032\u5165\u756b\u4e2d\u756b"],["4259064532355692191","\u81ea\u52d5"],["4388316720828367903","\u66f4\u591a\u8a2d\u5b9a"],["5146287486336231188","\u4e0d\u9069\u7528"],["5553522235935533682","\u641c\u5c0b\u6ed1\u687f"],["5963689277976480680","\u975c\u97f3"],["6073266792045231479",
""],["6161306839322897077","\u7d50\u675f\u5168\u87a2\u5e55"],["622115170869907732","\u756b\u4e2d\u756b"],["6614181658619787283","\u9000\u51fa\u756b\u4e2d\u756b"],["7071612439610534706","\u6295\u653e\u2026"],["8145129506114534451","\u672a\u9078\u53d6"],["8345190086337560158","\u5168\u87a2\u5e55"],["836055097473758014","\u64ad\u653e"],["9042260521669277115","\u66ab\u505c"]]));b.W("zh-TW",new Map([["1050953507607739202","\u97f3\u91cf"],["1077325112364709655","\u8fd4\u56de"],["1142734805932039923","\u5012\u8f49"],
["142853231704504146","\u958b\u555f"],["1774834209035716827","\u5feb\u8f49"],["1911090580951495029","\u5b57\u5e55"],["2023925063728908356","\u89e3\u9664\u975c\u97f3"],["298626259350585300","\u672a\u77e5"],["3045980486001972586","\u76f4\u64ad"],["3278592358864783064","\u8a9e\u8a00"],["4242938254936928940","\u9032\u5165\u5b50\u6bcd\u756b\u9762"],["4259064532355692191","\u81ea\u52d5"],["4388316720828367903","\u66f4\u591a\u8a2d\u5b9a"],["5146287486336231188","\u4e0d\u9069\u7528"],["5553522235935533682",
"\u641c\u5c0b\u6ed1\u687f"],["5963689277976480680","\u975c\u97f3"],["6073266792045231479","\u89e3\u6790\u5ea6"],["6161306839322897077","\u7d50\u675f\u5168\u87a2\u5e55"],["622115170869907732","\u5b50\u6bcd\u756b\u9762"],["6614181658619787283","\u96e2\u958b\u5b50\u6bcd\u756b\u9762"],["7071612439610534706","\u6295\u653e\u2026"],["8145129506114534451","\u95dc\u9589"],["8345190086337560158","\u5168\u87a2\u5e55"],["836055097473758014","\u64ad\u653e"],["9042260521669277115","\u66ab\u505c"]]));b.wd(navigator.languages||
[]);return b}var pn="time_and_duration mute volume fullscreen overflow_menu rewind fast_forward spacer".split(" ");function Z(b,c){this.G=b;this.f=c;this.a=new Nb;this.b=this.f.l;this.c=this.f.cb();this.video=this.f.Mb()}y("shaka.ui.Element",Z);Z.prototype.destroy=function(){this.a.R();return Promise.resolve()};Z.prototype.destroy=Z.prototype.destroy;function tn(b,c){Z.call(this,b,c);var d=this;this.g=W("button");this.g.classList.add("material-icons");this.g.classList.add("shaka-fast-forward-button");this.g.textContent="fast_forward";this.G.appendChild(this.g);un(this);G(this.a,this.b,"locale-updated",function(){un(d)});G(this.a,this.b,"locale-changed",function(){un(d)});G(this.a,this.g,"click",function(){if(d.video.duration){var b=d.c.bb();d.c.nd(0>b||4<b?1:2*b)}})}va(tn,Z);y("shaka.ui.FastForwardButton",tn);
function un(b){b.g.setAttribute("aria-label",b.b.resolve("1774834209035716827"))}function vn(){}vn.prototype.create=function(b,c){return new tn(b,c)};on("fast_forward",new vn);function wn(b,c){Z.call(this,b,c);var d=this;this.g=W("button");this.g.classList.add("shaka-fullscreen-button");this.g.classList.add("material-icons");this.g.textContent="fullscreen";this.G.appendChild(this.g);xn(this);this.j=this.f.f;G(this.a,this.b,"locale-updated",function(){xn(d)});G(this.a,this.b,"locale-changed",function(){xn(d)});G(this.a,this.g,"click",function(){yn(d)});screen.orientation&&G(this.a,screen.orientation,"change",function(){d.video&&0!=d.video.readyState&&!d.f.o.ba()&&(screen.orientation.type.includes("landscape")&&
!document.fullscreenElement?d.j.requestFullscreen():screen.orientation.type.includes("portrait")&&document.fullscreenElement&&document.exitFullscreen())});G(this.a,document,"fullscreenchange",function(){d.g.textContent=document.fullscreenElement?"fullscreen_exit":"fullscreen";xn(d)})}va(wn,Z);y("shaka.ui.FullscreenButton",wn);function xn(b){b.g.setAttribute("aria-label",b.b.resolve(document.fullscreenElement?"6161306839322897077":"8345190086337560158"))}
function yn(b){r(function d(){return v(d,function(d){switch(d.s){case 1:if(document.fullscreenElement)document.exitFullscreen(),d.I(0);else return u(d,b.j.requestFullscreen(),0)}})})}function zn(){}zn.prototype.create=function(b,c){return new wn(b,c)};on("fullscreen",new zn);function An(b,c){Z.call(this,b,c);var d=this;this.g=W("button");this.g.classList.add("shaka-mute-button");this.g.classList.add("material-icons");this.g.textContent="volume_up";this.G.appendChild(this.g);Bn(this);G(this.a,this.b,"locale-updated",function(){Bn(d)});G(this.a,this.b,"locale-changed",function(){Bn(d)});G(this.a,this.g,"click",function(){d.video.muted=!d.video.muted});G(this.a,this.video,"volumechange",function(){Bn(d);d.g.textContent=d.video.muted?"volume_off":"volume_up"})}va(An,Z);
y("shaka.ui.MuteButton",An);function Bn(b){b.g.setAttribute("aria-label",b.b.resolve(b.video.muted?"2023925063728908356":"5963689277976480680"))}function Cn(){}Cn.prototype.create=function(b,c){return new An(b,c)};on("mute",new Cn);function Dn(b,c){Z.call(this,b,c);var d=this;this.Da=this.f.P;this.Vd=this.f.qa;this.ha=this.f.o;this.ea=this.H=this.Za=this.m=this.K=this.Qa=this.tb=this.Ra=this.Cc=this.Ac=this.qa=this.V=this.P=this.S=this.sb=this.zc=this.aa=this.$=this.Bc=this.ua=this.o=this.u=this.j=this.B=this.w=this.F=this.Ca=this.l=this.A=this.v=null;this.Qd=new Map([["captions",function(){d.v=W("button");d.v.classList.add("shaka-caption-button");d.A=W("i");d.A.classList.add("material-icons");d.A.textContent="closed_caption";
d.v.appendChild(d.A);var b=W("label");b.classList.add("shaka-overflow-button-label");d.zc=W("span");b.appendChild(d.zc);d.aa=W("span");d.aa.classList.add("shaka-current-selection-span");b.appendChild(d.aa);d.v.appendChild(b);d.g.appendChild(d.v)}],["cast",function(){d.l=W("button");d.l.classList.add("shaka-cast-button");d.l.classList.add("shaka-hidden");d.l.setAttribute("aria-pressed","false");d.Ca=W("i");d.Ca.classList.add("material-icons");d.Ca.textContent="cast";d.l.appendChild(d.Ca);var b=W("label");
b.classList.add("shaka-overflow-button-label");d.Bc=W("span");b.appendChild(d.Bc);d.qa=W("span");d.qa.classList.add("shaka-current-selection-span");b.appendChild(d.qa);d.l.appendChild(b);d.g.appendChild(d.l)}],["quality",function(){d.w=W("button");d.w.classList.add("shaka-resolution-button");var b=W("i");b.classList.add("material-icons");b.textContent="settings";d.w.appendChild(b);b=W("label");b.classList.add("shaka-overflow-button-label");d.Cc=W("span");b.appendChild(d.Cc);d.ua=W("span");d.ua.classList.add("shaka-current-selection-span");
b.appendChild(d.ua);d.w.appendChild(b);d.g.appendChild(d.w)}],["language",function(){d.B=W("button");d.B.classList.add("shaka-language-button");var b=W("i");b.classList.add("material-icons");b.textContent="language";d.B.appendChild(b);b=W("label");b.classList.add("shaka-overflow-button-label");d.Ra=W("span");d.Ra.classList.add("languageSpan");b.appendChild(d.Ra);d.$=W("span");d.$.classList.add("shaka-current-selection-span");var c=d.c.getConfiguration().preferredAudioLanguage;d.$.textContent=En(d,
c);b.appendChild(d.$);d.B.appendChild(b);d.g.appendChild(d.B)}],["picture_in_picture",function(){d.m=W("button");d.m.classList.add("shaka-pip-button");d.ea=W("i");d.ea.classList.add("material-icons");d.ea.textContent="picture_in_picture_alt";d.m.appendChild(d.ea);var b=W("label");b.classList.add("shaka-overflow-button-label");d.Za=W("span");d.Za.textContent=d.b.resolve("622115170869907732");b.appendChild(d.Za);d.H=W("span");d.H.classList.add("shaka-current-selection-span");d.H.textContent=d.b.resolve("8145129506114534451");
b.appendChild(d.H);d.m.appendChild(b);d.g.appendChild(d.m);document.pictureInPictureEnabled&&!d.video.disablePictureInPicture||Y(d.m,!1)}]]);this.Ea=this.f.c;this.F=W("button");this.F.classList.add("shaka-overflow-menu-button");this.F.classList.add("shaka-no-propagation");this.F.classList.add("material-icons");this.F.textContent="more_vert";this.G.appendChild(this.F);Fn(this);this.Od=this.f.f.getElementsByClassName("shaka-back-to-overflow-button");for(var e=0;e<this.Od.length;e++)this.Od[e].addEventListener("click",
function(){d.f.Mc();Y(d.g,!0);d.g.childNodes.length&&d.g.childNodes[0].focus();d.f.Zc()});G(this.a,this.b,"locale-updated",function(){Gn(d)});G(this.a,this.b,"locale-changed",function(){Gn(d)});G(this.a,this.Vd,"enterpictureinpicture",function(){d.ea.textContent="branding_watermark";d.m.setAttribute("aria-label",d.b.resolve("6614181658619787283"));d.H.textContent=d.b.resolve("142853231704504146")});G(this.a,this.Vd,"leavepictureinpicture",function(){d.ea.textContent="picture_in_picture_alt";d.m.setAttribute("aria-label",
d.b.resolve("4242938254936928940"));d.H.textContent=d.b.resolve("8145129506114534451")});this.l&&G(this.a,this.l,"click",function(){Hn(d)});this.v&&G(this.a,this.v,"click",function(){Y(d.g,!1);Y(d.o,!0);In(d.o)});this.m&&G(this.a,this.m,"click",function(){Jn(d)});G(this.a,this.c,"texttrackvisibility",function(){Kn(d)});G(this.a,this.c,"trackschanged",function(){if(d.v)if(en(d.c))Y(d.v,!0);else{var b=d.c.lc().length;Y(d.v,0<b)}Ln(d);Mn(d);Nn(d)});G(this.a,this.c,"variantchanged",function(){Ln(d);Mn(d)});
G(this.a,this.c,"textchanged",function(){Nn(d)});G(this.a,this.g,"touchstart",function(b){d.f.Ee(Date.now());b.stopPropagation()});G(this.a,this.F,"click",function(){On(d)});this.w&&G(this.a,this.w,"click",function(){Y(d.g,!1);Y(d.j,!0);In(d.j)});this.B&&G(this.a,this.B,"click",function(){Y(d.g,!1);Y(d.u,!0);In(d.u)});G(this.a,this.f,"caststatuschange",function(b){var c=d.ha.td()&&d.f.ea;b=b.newStatus;d.l&&(Y(d.l,c),d.Ca.textContent=b?"cast_connected":"cast",c&&(b?d.l.setAttribute("aria-pressed",
"true"):d.l.setAttribute("aria-pressed","false")));Pn(d);c=document.pictureInPictureEnabled&&!d.video.disablePictureInPicture&&null!=d.m;b?c&&Y(d.m,!1):c&&Y(d.m,!0)});G(this.a,this.Ea,"touchstart",function(b){d.g.classList.contains("shaka-displayed")&&(Y(d.g,!1),b.preventDefault())});Kn(this);this.zd=(new Map).set(this.v,"1911090580951495029").set(this.K,"1077325112364709655").set(this.S,"1077325112364709655").set(this.P,"1077325112364709655").set(this.w,"6073266792045231479").set(this.B,"3278592358864783064").set(this.l,
"7071612439610534706").set(this.F,"4388316720828367903");this.Wd=(new Map).set(this.zc,"1911090580951495029").set(this.sb,"1911090580951495029").set(this.V,"8145129506114534451").set(this.Bc,"7071612439610534706").set(this.Ac,"6073266792045231479").set(this.Cc,"6073266792045231479").set(this.Qa,"4259064532355692191").set(this.Ra,"3278592358864783064").set(this.tb,"3278592358864783064").set(this.Za,"622115170869907732");Gn(this)}va(Dn,Z);y("shaka.ui.OverflowMenu",Dn);
function Fn(b){b.g=W("div");b.g.classList.add("shaka-overflow-menu");b.g.classList.add("shaka-no-propagation");b.g.classList.add("shaka-show-controls-on-mouse-over");b.g.classList.add("shaka-settings-menu");b.Ea.appendChild(b.g);for(var c=0;c<b.Da.overflowMenuButtons.length;c++){var d=b.Da.overflowMenuButtons[c];b.Qd.get(d)&&b.Qd.get(d)()}-1<b.Da.overflowMenuButtons.indexOf("quality")&&(b.j=W("div"),b.j.classList.add("shaka-resolutions"),b.j.classList.add("shaka-no-propagation"),b.j.classList.add("shaka-show-controls-on-mouse-over"),
b.j.classList.add("shaka-settings-menu"),b.S=W("button"),b.S.classList.add("shaka-back-to-overflow-button"),b.j.appendChild(b.S),c=W("i"),c.classList.add("material-icons"),c.textContent="arrow_back",b.S.appendChild(c),b.Ac=W("span"),b.S.appendChild(b.Ac),c=W("button"),c.setAttribute("aria-selected","true"),b.j.appendChild(c),d=W("i"),d.classList.add("material-icons"),d.classList.add("shaka-chosen-item"),d.textContent="done",d.setAttribute("aria-hidden","true"),c.appendChild(d),b.Qa=W("span"),b.Qa.classList.add("shaka-auto-span"),
c.appendChild(b.Qa),b.Ea.appendChild(b.j));-1<b.Da.overflowMenuButtons.indexOf("language")&&(b.u=W("div"),b.u.classList.add("shaka-audio-languages"),b.u.classList.add("shaka-no-propagation"),b.u.classList.add("shaka-show-controls-on-mouse-over"),b.u.classList.add("shaka-settings-menu"),b.P=W("button"),b.P.classList.add("shaka-back-to-overflow-button"),b.u.appendChild(b.P),c=W("i"),c.classList.add("material-icons"),c.textContent="arrow_back",b.P.appendChild(c),b.tb=W("span"),b.P.appendChild(b.tb),
b.Ea.appendChild(b.u));-1<b.Da.overflowMenuButtons.indexOf("captions")&&(b.o=W("div"),b.o.classList.add("shaka-text-languages"),b.o.classList.add("shaka-no-propagation"),b.o.classList.add("shaka-show-controls-on-mouse-over"),b.o.classList.add("shaka-settings-menu"),b.K=W("button"),b.K.classList.add("shaka-back-to-overflow-button"),b.o.appendChild(b.K),c=W("i"),c.classList.add("material-icons"),c.textContent="arrow_back",b.K.appendChild(c),b.sb=W("span"),b.K.appendChild(b.sb),c=W("button"),c.setAttribute("aria-selected",
"true"),b.o.appendChild(c),d=W("i"),d.classList.add("material-icons"),d.classList.add("shaka-chosen-item"),d.textContent="done",d.setAttribute("aria-hidden","true"),c.appendChild(d),b.V=W("span"),b.V.classList.add("shaka-auto-span"),c.appendChild(b.V),b.Ea.appendChild(b.o))}
function Ln(b){if(b.w&&b.j){var c=b.c.mc();if(c.length&&!c[0].height)Y(b.j,!1),Y(b.w,!1);else{c.sort(function(b,c){return b.height-c.height});c.reverse();var d=c.find(function(b){return b.active});if(d){var e=d.language;c=c.filter(function(b){return b.language==e})}for(var f=dn(b.j,"shaka-back-to-overflow-button");b.j.firstChild;)b.j.removeChild(b.j.firstChild);b.j.appendChild(f);var g=b.c.getConfiguration().abr.enabled;c.forEach(function(c){var e=W("button");e.classList.add("explicit-resolution");
e.addEventListener("click",b.Fg.bind(b,c));var f=W("span");f.textContent=c.height+"p";e.appendChild(f);g||c!=d||(e.setAttribute("aria-selected","true"),e.appendChild(Qn()),f.classList.add("shaka-chosen-item"),b.ua.textContent=f.textContent);b.j.appendChild(e)});c=W("button");c.addEventListener("click",function(){this.c.configure({abr:{enabled:!0}});Ln(this)}.bind(b));f=W("span");f.textContent=b.b.resolve("4259064532355692191");c.appendChild(f);g&&(c.setAttribute("aria-selected","true"),c.appendChild(Qn()),
f.classList.add("shaka-chosen-item"),b.ua.textContent=b.b.resolve("4259064532355692191"));b.j.appendChild(c);In(b.j)}}}function Mn(b){if(b.B&&b.u&&b.$){var c=b.c.mc(),d=b.c.Jd().map(function(b){return b.language});Rn(b,c,b.u,d,b.Tf,!0,b.$);In(b.u)}}
function Nn(b){if(b.v&&b.o&&b.aa){var c=b.c.lc(),d=b.c.Md().map(function(b){return b.language});Rn(b,c,b.o,d,b.Uf,b.c.zb(),b.aa);c=W("button");c.addEventListener("click",function(){b.c.wc(!1);Nn(b)});c.appendChild(b.V);b.o.appendChild(c);b.c.zb()||(c.setAttribute("aria-selected","true"),c.appendChild(Qn()),b.V.classList.add("shaka-chosen-item"),b.aa.textContent=b.b.resolve("8145129506114534451"));In(b.o)}}
function Rn(b,c,d,e,f,g,h){var k=c.filter(function(b){return 1==b.active})[0];for(c=dn(d,"shaka-back-to-overflow-button");d.firstChild;)d.removeChild(d.firstChild);d.appendChild(c);e.forEach(function(c){var e=W("button");e.addEventListener("click",f.bind(b,c));var l=W("span");l.textContent=En(b,c);e.appendChild(l);g&&c==k.language&&(e.appendChild(Qn()),l.classList.add("shaka-chosen-item"),e.setAttribute("aria-selected","true"),h.textContent=l.textContent);d.appendChild(e)})}
function En(b,c){if(!c)return"";switch(c){case "mul":return b.b.resolve("411375375680850814");case "zxx":return b.b.resolve("5146287486336231188")}var d=Kd(c);return c in Xm?Xm[c].h:d in Xm?Xm[d].h+" ("+c+")":b.b.resolve("298626259350585300")+" ("+c+")"}Dn.prototype.Fg=function(b){this.c.configure({abr:{enabled:!1}});this.c.Ae(b,!0)};Dn.prototype.Tf=function(b){this.c.xe(b)};
Dn.prototype.Uf=function(b){var c=this;return r(function e(){return v(e,function(e){switch(e.s){case 1:return u(e,c.c.wc(!0),2);case 2:c.c.ye(b),e.s=0}})})};function In(b){b&&(b=dn(b,"shaka-chosen-item"))&&b.parentElement.focus()}function Qn(){var b=W("i");b.classList.add("material-icons");b.textContent="done";b.setAttribute("aria-hidden","true");return b}
function Kn(b){b.A&&(b.c.zb()?(b.A.classList.add("shaka-captions-on"),b.A.classList.remove("shaka-captions-off")):(b.A.classList.add("shaka-captions-off"),b.A.classList.remove("shaka-captions-on")))}
function Hn(b){r(function d(){return v(d,function(d){switch(d.s){case 1:if(b.ha.ba())b.ha.Ie();else if(b.l.disabled=!0,b.ha.cast().then(function(){this.l.disabled=!1}.bind(b),function(b){this.l.disabled=!1;8004!=b.code&&this.f.dispatchEvent(new C("error",{ef:b}))}.bind(b)),document.pictureInPictureElement&&null!=b.m)return u(d,Jn(b),0);d.I(0)}})})}
function Jn(b){return r(function d(){var e;return v(d,function(d){switch(d.s){case 1:return za(d,2),document.pictureInPictureElement?u(d,document.exitPictureInPicture(),5):u(d,b.video.requestPictureInPicture(),5);case 5:Ba(d,0);break;case 2:e=Ca(d),b.f.dispatchEvent(new C("error",{ef:e})),d.s=0}})})}function On(b){if(b.f.ac())b.f.Mc();else{Y(b.g,!0);b.f.Zc();var c=function(b){return 0==b.classList.contains("shaka-hidden")};Tb(b.g.childNodes,c)&&Ub(b.g.childNodes,c)[0].focus()}}
function Pn(b){b.qa&&(b.qa.textContent=b.ha.ba()?b.ha.uc():b.b.resolve("8145129506114534451"))}
function Gn(b){var c=b.zd.keys();c=q(c);for(var d=c.next();!d.done;d=c.next())if(d=d.value,null!=d){var e=b.zd.get(d);d.setAttribute("aria-label",b.b.resolve(e))}b.m&&(b.m.setAttribute("aria-label",b.b.resolve(document.pictureInPictureElement?"6614181658619787283":"4242938254936928940")),b.H.textContent=b.b.resolve(document.pictureInPictureElement?"142853231704504146":"8145129506114534451"));Pn(b);Ln(b);Nn(b);c=b.Wd.keys();c=q(c);for(d=c.next();!d.done;d=c.next())d=d.value,null!=d&&(e=b.Wd.get(d),
d.textContent=b.b.resolve(e))}function Sn(){}Sn.prototype.create=function(b,c){return new Dn(b,c)};on("overflow_menu",new Sn);function Tn(b,c){Z.call(this,b,c);var d=this;this.g=W("div");this.g.classList.add("shaka-current-time");this.g.textContent="0:00";this.G.appendChild(this.g);G(this.a,this.g,"click",function(){d.c.Z()&&(d.video.currentTime=d.c.ib().end)});G(this.a,this.f,"timeandseekrangeupdated",function(){var b=d.f.g,c=d.f.Kd(),g=d.video.duration,h=d.c.ib(),k=h.end-h.start;d.c.Z()?(c=Math.max(0,Math.floor(h.end-c)),g=3600<=k,1<=c||b?(d.g.textContent="- "+Un(c,g),d.g.style.cursor="pointer"):(d.g.textContent=d.b.resolve("3045980486001972586"),
d.g.style.cursor="")):(b=3600<=g,d.g.textContent=Un(c,b),g&&(d.g.textContent+=" / "+Un(g,b)),d.g.style.cursor="")})}va(Tn,Z);y("shaka.ui.PresentationTimeTracker",Tn);function Un(b,c){var d=Math.floor(b/3600),e=Math.floor(b/60%60),f=Math.floor(b%60);10>f&&(f="0"+f);f=e+":"+f;c&&(10>e&&(f="0"+f),f=d+":"+f);return f}function Vn(){}Vn.prototype.create=function(b,c){return new Tn(b,c)};on("time_and_duration",new Vn);function Wn(b,c){Z.call(this,b,c);var d=this;this.g=W("button");this.g.classList.add("material-icons");this.g.classList.add("shaka-rewind-button");this.g.textContent="fast_rewind";this.G.appendChild(this.g);Xn(this);G(this.a,this.b,"locale-updated",function(){Xn(d)});G(this.a,this.b,"locale-changed",function(){Xn(d)});G(this.a,this.g,"click",function(){if(d.video.duration){var b=d.c.bb();d.c.nd(0<b||-4>b?-1:2*b)}})}va(Wn,Z);y("shaka.ui.RewindButton",Wn);
function Xn(b){b.g.setAttribute("aria-label",b.b.resolve("1142734805932039923"))}function Yn(){}Yn.prototype.create=function(b,c){return new Wn(b,c)};on("rewind",new Yn);function Zn(b,c){Z.call(this,b,c);var d=W("div");d.classList.add("shaka-spacer");d.setAttribute("aria-hidden",!0);this.G.appendChild(d)}va(Zn,Z);y("shaka.ui.Spacer",Zn);function $n(){}$n.prototype.create=function(b,c){return new Zn(b,c)};on("spacer",new $n);function ao(b,c){var d=this;this.g=!1;this.c=[];this.l=b;this.j=c;this.a=W("div");this.a.classList.add("shaka-text-container");this.j.appendChild(this.a);this.f=new H(function(){return bo(d)});this.f.start(.25,!0);this.b=new Map}y("shaka.ui.TextDisplayer",ao);ao.prototype.append=function(b){this.c=this.c.concat(b)};ao.prototype.append=ao.prototype.append;ao.prototype.destroy=function(){this.j.removeChild(this.a);this.a=null;this.g=!1;this.c=[];this.f&&this.f.stop();this.b.clear()};
ao.prototype.destroy=ao.prototype.destroy;ao.prototype.remove=function(b,c){if(!this.a)return!1;for(var d=new Set,e=q(this.c),f=e.next();!f.done;f=e.next())f=f.value,f.startTime>b&&f.endTime<c&&d.add(f);e=q(d);for(f=e.next();!f.done;f=e.next()){f=f.value;var g=this.b.get(f);g&&(this.a.removeChild(g),this.b["delete"](f))}this.c=this.c.filter(function(b){return!d.has(b)});return!0};ao.prototype.remove=ao.prototype.remove;ao.prototype.isTextVisible=function(){return this.g};
ao.prototype.isTextVisible=ao.prototype.isTextVisible;ao.prototype.setTextVisibility=function(b){this.g=b};ao.prototype.setTextVisibility=ao.prototype.setTextVisibility;
function bo(b){for(var c=b.l.currentTime,d=q(b.b.keys()),e=d.next();!e.done;e=d.next())if(e=e.value,!(e.startTime<=c&&e.endTime>=c)){var f=b.b.get(e);b.a.removeChild(f);b.b["delete"](e)}d=b.c.filter(function(d){return d.startTime<=c&&d.endTime>=c&&!b.b.has(d)}).sort(function(b,c){return b.startTime!=c.startTime?b.startTime-c.startTime:b.endTime-c.endTime});d=q(d);for(e=d.next();!e.done;e=d.next())e=e.value,f=W("span"),co(b,f,e),b.b.set(e,f),b.a.appendChild(f)}
function co(b,c,d){var e=c.style,f=b.a.style;c.textContent=d.payload;e.backgroundColor=d.backgroundColor;e.color=d.color;e.direction=d.direction;f.alignItems="before"==d.displayAlign?"flex-start":"center"==d.displayAlign?"flex-top":"flex-end";e.fontFamily=d.fontFamily;e.fontWeight=d.fontWeight.toString();e.fontSize=d.fontSize;e.fontStyle=d.fontStyle;d.line&&1==d.lineInterpretation&&(d.writingMode==dm?d.lineAlign==fm?b.a.top=d.line+"%":"end"==d.lineAlign&&(b.a.bottom=d.line+"%"):"vertical-lr"==d.writingMode?
d.lineAlign==fm?b.a.left=d.line+"%":"end"==d.lineAlign&&(b.a.right=d.line+"%"):d.lineAlign==fm?b.a.right=d.line+"%":"end"==d.lineAlign&&(b.a.left=d.line+"%"));e.lineHeight=d.lineHeight;d.position&&(d.writingMode==dm?b.a.paddingLeft=d.position:b.a.paddingTop=d.position);"line-left"==d.positionAlign?f.a="left":"line-right"==d.positionAlign?f.a="right":f.margin="auto";e.textAlign=d.textAlign;e.textDecoration=d.textDecoration.join(" ");e.writingMode=d.writingMode;d.writingMode==dm?b.a.width=d.size+"%":
b.a.height=d.size+"%";e.textAlign=d.textAlign;e.textDecoration=d.textDecoration.join(" ");e.writingMode=d.writingMode};function eo(b,c,d,e){this.c=b;this.a=fo();e&&rj(this.a,e,fo(),{},"");this.a.castReceiverAppId&&!this.a.overflowMenuButtons.includes("cast")&&this.a.overflowMenuButtons.push("cast");this.b=new X(b,c,d,this.a)}y("shaka.ui.Overlay",eo);eo.prototype.cb=function(){return this.c};eo.prototype.getPlayer=eo.prototype.cb;eo.prototype.rf=function(){return this.b};eo.prototype.getControls=eo.prototype.rf;eo.prototype.Tg=function(b){this.b.fd(b)};eo.prototype.setEnabled=eo.prototype.Tg;
function fo(){return{controlPanelElements:"time_and_duration spacer mute volume fullscreen overflow_menu".split(" "),overflowMenuButtons:["captions","quality","language","picture_in_picture"],addSeekBar:!0,castReceiverAppId:""}}
function go(){el();if(Ij()){var b=document.querySelectorAll("[data-shaka-player-container]"),c=document.querySelectorAll("[data-shaka-player]");if(c.length||b.length)if(c.length&&!b.length)for(b=0;b<c.length;b++){var d=c[b];d.classList.add("video");var e=document.createElement("div");d.parentElement.replaceChild(e,d);e.appendChild(d);var f="";d.dataset&&d.dataset.shakaPlayerCastReceiverId&&(f=d.dataset.shakaPlayerCastReceiverId);e=ho(e,d,{castReceiverAppId:f});d.controls&&e.b.De(!0)}else for(e=0;e<
b.length;e++){f=b[e];d="";f.dataset&&f.dataset.shakaPlayerCastReceiverId&&(d=f.dataset.shakaPlayerCastReceiverId);for(var g=null,h=0;h<c.length;h++)if(c[h].parentElement==f){g=c[h];break}g||(g=document.createElement("video"),f.appendChild(g));g.dataset&&g.dataset.shakaPlayerCastReceiverId&&(d=g.dataset.shakaPlayerCastReceiverId);ho(f,g,{castReceiverAppId:d})}c=document.createEvent("CustomEvent");c.initCustomEvent("shaka-ui-loaded",!1,!1,null);document.dispatchEvent(c)}}
function ho(b,c,d){var e=new T(c);d=new eo(e,b,c,d);c.controls||e.configure("textDisplayFactory",function(){return new ao(c,b)});b.ui=d;return c.ui=d}"complete"==document.readyState?Promise.resolve().then(go):window.addEventListener("load",go);function io(b,c){Z.call(this,b,c);var d=this;this.j=W("div");this.j.classList.add("shaka-volume-bar-container");this.g=document.createElement("input");this.g.classList.add("shaka-volume-bar");this.g.setAttribute("type","range");this.g.setAttribute("step","any");this.g.setAttribute("min","0");this.g.setAttribute("max","1");this.g.setAttribute("value","0");this.j.appendChild(this.g);this.G.appendChild(this.j);jo(this);G(this.a,this.video,"volumechange",function(){ko(d)});G(this.a,this.g,"input",function(){d.video.volume=
parseFloat(d.g.value);d.video.muted=0==d.video.volume?!0:!1});G(this.a,this.b,"locale-updated",function(){jo(d)});G(this.a,this.b,"locale-changed",function(){jo(d)});ko(this)}va(io,Z);y("shaka.ui.VolumeBar",io);function ko(b){b.g.value=b.video.muted?0:b.video.volume;var c=["to right"];c.push("rgb(255, 255, 255)"+100*b.g.value+"%");c.push("rgba(255, 255, 255, 0.54)"+100*b.g.value+"%");c.push("rgba(255, 255, 255, 0.54)100%");b.j.style.background="linear-gradient("+c.join(",")+")"}
function jo(b){b.g.setAttribute("aria-label",b.b.resolve("1050953507607739202"))}function lo(){}lo.prototype.create=function(b,c){return new io(b,c)};on("volume",new lo);}).call(exportTo,innerGlobal,innerGlobal);if(typeof exports!="undefined")for(var k in exportTo.shaka)exports[k]=exportTo.shaka[k];else if(typeof define!="undefined"&&define.amd)define(function(){return exportTo.shaka});else innerGlobal.shaka=exportTo.shaka})();
//# sourceMappingURL=shaka-player.ui.map

29
static/stream.html Normal file
View File

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The Apparatus</title>
<script src="/mux.js"></script>
<script src="/shaka-player.compiled.js"></script>
<script src="/shaka-player.ui.js"></script>
<script src="/stream.js"></script>
<link rel="stylesheet" href="/material_icons.css"/>
<link rel="stylesheet" href="/controls.css"/>
<link rel="stylesheet" href="/app.css"/>
<script>
var streamer = window.location.pathname.split("/")[1];
document.getElementsByTagName("title")[0].textContent = streamer+" - The Apparatus";
</script>
</head>
<body class="stream-only">
<noscript>
The Apparatus requires JavaScript. Sorry.
</noscript>
<div id="shaka-mount-point">
<video id="video"></video>
</div>
</div>
</body>
</html>

52
static/stream.js Normal file
View File

@ -0,0 +1,52 @@
document.addEventListener('DOMContentLoaded', function() {
if (shaka.log) {
shaka.log.setLevel(shaka.log.Level.V1);
}
var video = document.getElementById("video");
var script = document.createElement("script");
script.src = "/"+streamer+".js";
window.video = video;
document.head.appendChild(script);
var mount = document.getElementById("shaka-mount-point");
var player = new shaka.Player(video);
var ui = new shaka.ui.Overlay(player, mount, video, {
addSeekBar: false,
controlPanelElements: ['spacer', 'mute', 'volume', 'fullscreen', 'overflow_menu'],
overflowMenuButtons: ['quality', 'picture_in_picture']
});
var controls = ui.getControls();
window.ui = ui;
window.player = player;
window.controls = controls;
player.addEventListener("error", console.error);
controls.addEventListener("error", console.error);
player.configure({
});
player.load("/hls/"+streamer+".m3u8").then(function() {
video.play();
console.log("Loaded!");
}).catch(function(e) {
if (e.code === 1001) {
if (e.data[1] === 404) {
console.error("missing a stream. cannot continue");
return
}
}
console.error(e);
});
});
function onResize() {
var streamOnly = document.body.classList.contains("stream-only");
if ((window.innerWidth/(window.innerHeight-(streamOnly ? 0 : 100))) < (16/9) || (!streamOnly && window.innerWidth < 960)) {
document.body.classList.remove("wide");
document.body.classList.add("tall");
} else if (((window.innerWidth-(streamOnly ? 0 : 300))/window.innerHeight) > (16/9)) {
document.body.classList.add("wide");
document.body.classList.remove("tall");
} else {
document.body.classList.remove("wide");
document.body.classList.remove("tall");
}
}
window.addEventListener('resize', onResize);
document.addEventListener('DOMContentLoaded', onResize);

View File

@ -0,0 +1,15 @@
application live_STREAMKEY {
push rtmp://192.168.1.69:1935/trans_STREAMKEY/src live=1;
exec_push ffmpeg -i rtmp://192.168.1.69:1935/$app -vcodec libx264 -acodec aac -vprofile baseline -pix_fmt yuv420p -s 854x480 -r 30 -vb 2.5M -ab 96k -preset veryfast -f flv rtmp://192.168.1.69:1935/trans_STREAMKEY/med >>/tmp/ffmpeg-med.log 2>&1;
exec_push ffmpeg -i rtmp://192.168.1.69:1935/$app -vcodec libx264 -acodec aac -vprofile baseline -pix_fmt yuv420p -s 426x240 -r 30 -vb 1M -ab 48k -preset veryfast -f flv rtmp://192.168.1.69:1935/trans_STREAMKEY/low >>/tmp/ffmpeg-low.log 2>&1;
}
application trans_STREAMKEY {
hls on;
hls_fragment 5s;
hls_variant src BANDWIDTH=5128000,RESOLUTION=1280x720;
hls_variant med BANDWIDTH=2509600,RESOLUTION=854x480;
hls_variant low BANDWIDTH=1048000,RESOLUTION=426x240;
hls_path /www/hls/STREAMER1; # todo write somewhere else that isn't config
}