1/*! 2 JW Player version 8.24.6 3 Copyright (c) 2022, JW Player, All Rights Reserved 4 This source code and its use and distribution is subject to the terms 5 and conditions of the applicable license agreement. 6 https://www.jwplayer.com/tos/ 7 This product includes portions of other software. For the full text of licenses, see 8 https://ssl.p.jwpcdn.com/player/v/8.24.6/notice.txt 9*/ 10(self.webpackChunkjwplayer=self.webpackChunkjwplayer||[]).push([[371,347],{8377:function(e,t,n){"use strict";function r(e,t){var n=e.kind||"cc";return e.default||e.defaulttrack?"default":e._id||e.file||n+t}function i(e,t){var n=e.label||e.name||e.language;return n||(n="Unknown CC",(t+=1)>1&&(n+=" ["+t+"]")),{label:n,unknownCount:t}}n.d(t,{M:function(){return r},_:function(){return i}})},6103:function(e,t,n){"use strict";n.d(t,{V:function(){return f},x:function(){return d}});var r=n(7477),i=n(2894),a=n(6886),o=n(7941),s=n(7387),u=n(2957),l=n(4446);function c(e){throw new l.rG(null,e)}function d(e,t,r){e.xhr=(0,a.h)(e.file,(function(a){!function(e,t,r,a){var d,f,p=e.responseXML?e.responseXML.firstChild:null;if(p)for("xml"===(0,o.r1)(p)&&(p=p.nextSibling);p&&p.nodeType===p.COMMENT_NODE;)p=p.nextSibling;try{if(p&&"tt"===(0,o.r1)(p)){if(!e.responseXML)throw new Error("Empty XML response");d=function(e){e||c(306007);var t=[],n=e.getElementsByTagName("p"),r=30,i=e.getElementsByTagName("tt");if(i&&i[0]){var a=parseFloat(i[0].getAttribute("ttp:frameRate")||"");isNaN(a)||(r=a)}n||c(306005),n.length||(n=e.getElementsByTagName("tt:p")).length||(n=e.getElementsByTagName("tts:p"));for(var o=0;o<n.length;o++){for(var s=n[o],l=s.getElementsByTagName("br"),d=0;d<l.length;d++){var f=l[d];f&&f.parentNode&&f.parentNode.replaceChild(e.createTextNode("\r\n"),f)}var h=s.innerHTML||s.textContent||s.text||"",p=(0,u.fy)(h).replace(/>\s+</g,"><").replace(/(<\/?)tts?:/g,"$1").replace(/<br.*?\/>/g,"\r\n");if(p){var g=s.getAttribute("begin")||"",m=s.getAttribute("dur")||"",v=s.getAttribute("end")||"",y={begin:(0,u.m9)(g,r),text:p};v?y.end=(0,u.m9)(v,r):m&&(y.end=(y.begin||0)+(0,u.m9)(m,r)),t.push(y)}}return t.length||c(306005),t}(e.responseXML),f=h(d),delete t.xhr,r(f)}else{var g=e.responseText;g.indexOf("WEBVTT")>=0?n.e(347).then(function(e){return n(2776).default}
10.bind(null,n)).catch((0,i.Jt)(301131)).then((function(e){var n=new e(window);f=[],n.oncue=function(e){f.push(e)},n.onflush=function(){delete t.xhr,r(f)},n.parse(g)})).catch((function(e){delete t.xhr,a((0,l.Mm)(null,l.Y7,e))})):(d=(0,s.Z)(g),f=h(d),delete t.xhr,r(f))}}catch(e){delete t.xhr,a((0,l.Mm)(null,l.Y7,e))}}(a,e,t,r)}),(function(e,t,n,i){r((0,l.l9)(i,l.Y7))}))}function f(e){e&&e.forEach((function(e){var t=e.xhr;t&&(t.onload=null,t.onreadystatechange=null,t.onerror=null,"abort"in t&&t.abort()),delete e.xhr}))}function h(e){return e.map((function(e){return new r.Z(e.begin,e.end,e.text)}))}},7387:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(2957);function i(e){var t=[],n=(e=(0,r.fy)(e)).split("\r\n\r\n");1===n.length&&(n=e.split("\n\n"));for(var i=0;i<n.length;i++)if("WEBVTT"!==n[i]){var o=a(n[i]);o.text&&t.push(o)}return t}function a(e){var t={},n=e.split("\r\n");1===n.length&&(n=e.split("\n"));var i=1;if(n[0].indexOf(" --\x3e ")>0&&(i=0),n.length>i+1&&n[i+1]){var a=n[i],o=a.indexOf(" --\x3e ");o>0&&(t.begin=(0,r.m9)(a.substr(0,o)),t.end=(0,r.m9)(a.substr(o+5)),t.text=n.slice(i+1).join("\r\n"))}return t}},7477:function(e,t){"use strict";var n=window.VTTCue;function r(e){if("string"!=typeof e)return!1;return!!{start:!0,middle:!0,end:!0,left:!0,right:!0}[e.toLowerCase()]&&e.toLowerCase()}if(!n){var i="auto";(n=function(e,t,n){var a=this;a.hasBeenReset=!1;var o="",s=!1,u=e,l=t,c=n,d=null,f="",h=!0,p=i,g="start",m=i,v=100,y="middle";Object.defineProperty(a,"id",{enumerable:!0,get:function(){return o},set:function(e){o=""+e}}),Object.defineProperty(a,"pauseOnExit",{enumerable:!0,get:function(){return s},set:function(e){s=!!e}}),Object.defineProperty(a,"startTime",{enumerable:!0,get:function(){return u},set:function(e){if("number"!=typeof e)throw new TypeError("Start time must be set to a number.");u=e,this.hasBeenReset=!0}}),Object.defineProperty(a,"endTime",{enumerable:!0,get:function(){return l},set:function(e){if("number"!=typeof e)throw new TypeError("End time must be set to a number.");l=e,this.hasBeenReset=!0}}),Object.defineProperty(a,"text",{enumerable:!0,get:function(){return c},set:function(e){c=""+e,this.hasBeenReset=!0}}),Object.defineProperty(a,"region",{enumerable:!0,get:function(){return d},set:function(e){d=e,this.hasBeenReset=!0}}),Object.defineProperty(a,"vertical",{enumerable:!0,get:function(){return f},set:function(e){var t=function(e){return"string"==typeof e&&(!!{"":!0,lr:!0,rl:!0}[e.toLowerCase()]&&e.toLowerCase())}(e);if(!1===t)throw new SyntaxError("An invalid or illegal string was specified.");f=t,this.hasBeenReset=!0}}),Object.defineProperty(a,"snapToLines",{enumerable:!0,get:function(){return h},set:function(e){h=!!e,this.hasBeenReset=!0}}),Object.defineProperty(a,"line",{enumerable:!0,get:function(){return p},set:function(e){if("number"!=typeof e&&e!==i)throw new SyntaxError("An invalid number or illegal string was specified.");p=e,this.hasBeenReset=!0}}),Object.defineProperty(a,"lineAlign",{enumerable:!0,get:function(){return g},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");g=t,this.hasBeenReset=!0}}),Object.defineProperty(a,"position",{enumerable:!0,get:function(){return m},set:function(e){if(e<0||e>100)throw new Error("Position must be between 0 and 100.");m=e,this.hasBeenReset=!0}}),Object.defineProperty(a,"size",{enumerable:!0,get:function(){return v},set:function(e){if(e<0||e>100)throw new Error("Size must be between 0 and 100.");v=e,this.hasBeenReset=!0}}),Object.defineProperty(a,"align",{enumerable:!0,get:function(){return y},set:function(e){var t=r(e);if(!t)throw new SyntaxError("An invalid or illegal string was specified.");y=t,this.hasBeenReset=!0}}),a.displayState=void 0}).prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)}}t.Z=n},2776:function(e,t,n){"use strict";n.r(t);var r=n(1776),i=n(7477),a=/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/,o=/^-?\d+$/,s=/\r\n|\n/,u=/^NOTE($|[ \t])/,l=/^[^\sa-zA-Z-]+/,c=/:/,d=/\s/,f=/^\s+/,h=/-->/,p=/^WEBVTT([ \t].*)?$/,g=function(e,t,n){this.window=e,this.state="INITIAL",this.buffer="",this.decoder=t||new m,this.syncCueParsing=n,this.regionList=[],this.maxCueBatch=1e3};function m(){return{decode:function(e){if(!e)return"";if("string"!=typeof e)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}}function v(){this.values=Object.create(null)}v.prototype={set:function(e,t){this.get(e)||""===t||(this.values[e]=t)},get:function(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t},has:function(e){return e in this.values},alt:function(e,t,n){for(var r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}},integer:function(e,t){o.test(t)&&this.set(e,parseInt(t,10))},percent:function(e,t){return(t=parseFloat(t))>=0&&t<=100&&(this.set(e,t),!0)}};var y=new i.Z(0,0,0),b="middle"===y.align?"middle":"center";function T(e,t,n){var r=e;function i(){var t=function(e){function t(e,t,n,r){return 3600*(0|e)+60*(0|t)+(0|n)+(0|r)/1e3}var n=e.match(a);return n?n[3]?t(n[1],n[2],n[3].replace(":",""),n[4]):n[1]>59?t(n[1],n[2],0,n[4]):t(0,n[1],n[2],n[4]):null}(e);if(null===t)throw new Error("Malformed timestamp: "+r);return e=e.replace(l,""),t}function o(){e=e.replace(f,"")}if(o(),t.startTime=i(),o(),"--\x3e"!==e.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+r);e=e.substr(3),o(),t.endTime=i(),o(),function(e,t){var r=new v;!function(e,t,n,r){for(var i=r?e.split(r):[e],a=0;a<=i.length;a+=1)if("string"==typeof i[a]){var o=i[a].split(n);2===o.length&&t(o[0],o[1])}}(e,(function(e,t){switch(e){case"region":for(var i=n.length-1;i>=0;i--)if(n[i].id===t){r.set(e,n[i].region);break}break;case"vertical":r.alt(e,t,["rl","lr"]);break;case"line":var a=t.split(","),o=a[0];r.integer(e,o),r.percent(e,o)&&r.set("snapToLines",!1),r.alt(e,o,["auto"]),2===a.length&&r.alt("lineAlign",a[1],["start",b,"end"]);break;case"position":var s=t.split(",");r.percent(e,s[0]),2===s.length&&r.alt("positionAlign",s[1],["start",b,"end","line-left","line-right","auto"]);break;case"size":r.percent(e,t);break;case"align":r.alt(e,t,["start",b,"end","left","right"])}}),c,d),t.region=r.get("region",null),t.vertical=r.get("vertical","");var i=r.get("line","auto");"auto"===i&&-1===y.line&&(i=-1),t.line=i,t.lineAlign=r.get("lineAlign","start"),t.snapToLines=r.get("snapToLines",!0),t.size=r.get("size",100),t.align=r.get("align",b);var a=r.get("position","auto");"auto"===a&&50===y.position&&(a="start"===t.align||"left"===t.align?0:"end"===t.align||"right"===t.align?100:50),t.position=a}(e,t)}g.prototype={parse:function(e,t){var n,a=this;function o(){for(var e=a.buffer,t=0;t<e.length&&"\r"!==e[t]&&"\n"!==e[t];)++t;var n=e.substr(0,t);return"\r"===e[t]&&++t,"\n"===e[t]&&++t,a.buffer=e.substr(t),n}function l(){"CUETEXT"===a.state&&a.cue&&a.oncue&&a.oncue(a.cue),a.cue=null,a.state="INITIAL"===a.state?"BADWEBVTT":"BADCUE"}e&&(a.buffer+=a.decoder.decode(e,{stream:!0}));try{if("INITIAL"===a.state){if(!s.test(a.buffer))return this;var d=(n=o()).match(p);if(!d||!d[0])throw new Error("Malformed WebVTT signature.");a.state="HEADER"}}catch(e){return l(),this}var f=!1,g=0;!function e(){try{for(;a.buffer&&(g<=a.maxCueBatch||a.syncCueParsing);){if(!s.test(a.buffer))return a.flush(),this;switch(f?f=!1:n=o(),a.state){case"HEADER":c.test(n)||n||(a.state="ID");break;case"NOTE":n||(a.state="ID");break;case"ID":if(u.test(n)){a.state="NOTE";break}if(!n)break;if(a.cue=new i.Z(0,0,""),a.state="CUE",!h.test(n)){a.cue.id=n;break}case"CUE":try{T(n,a.cue,a.regionList)}catch(e){a.cue=null,a.state="BADCUE";break}a.state="CUETEXT";break;case"CUETEXT":var d=h.test(n);if(!n||d&&(f=!0)){a.oncue&&(g+=1,a.oncue(a.cue)),a.cue=null,a.state="ID";break}a.cue.text&&(a.cue.text+="\n"),a.cue.text+=n;break;case"BADCUE":n||(a.state="ID")}}if(g=0,a.buffer)(0,r.U)(e);else if(!t)return a.flush(),this}catch(e){return l(),this}}()},flush:function(){var e=this;if(e.buffer+=e.decoder.decode(),(e.cue||"HEADER"===e.state)&&(e.buffer+="\n\n",e.parse(void 0,!0)),"INITIAL"===e.state)throw new Error("Malformed WebVTT signature.");return e.onflush&&e.onflush(),this}},t.default=g},2728:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(1643),i=n(6042);function a(e,t){var n,a=t;return{start:function(){this.stop(),n=window.setInterval((function(){var t=e.getBandwidthEstimate();(0,i.qh)(t)&&(a=t,e.trigger(r.qG,{bandwidthEstimate:a}))}),1e3)},stop:function(){clearInterval(n)},getEstimate:function(){return a}}}},548:function(e,t,n){"use strict";n.d(t,{Zv:function(){return r},pR:function(){return i},i0:function(){return a}});var r=1,i=r+1,a=25},4506:function(e,t,n){"use strict";function r(e){return{bitrate:e.bitrate,label:e.label,width:e.width,height:e.height}}n.d(t,{Z:function(){return r}})},3328:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var r=n(6103),i=n(8377),a={TIT2:"title",TT2:"title",WXXX:"url",TPE1:"artist",TP1:"artist",TALB:"album",TAL:"album"};function o(e,t){for(var n,r,i,a=e.length,o="",s=t||0;s<a;)if(0!==(n=e[s++])&&3!==n)switch(n>>
vendor: 18,605 bytes, line 10
104){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(n);break;case 12:case 13:r=e[s++],o+=String.fromCharCode((31&n)<<6|63&r);break;case 14:r=e[s++],i=e[s++],o+=String.fromCharCode((15&n)<<12|(63&r)<<6|(63&i)<<0)}return o}function s(e){var t=function(e){for(var t="0x",n=0;n<e.length;n++)e[n]<16&&(t+="0"),t+=e[n].toString(16);return parseInt(t)}(e);return 127&t|(32512&t)>>1|(8323072&t)>>2|(2130706432&t)>>3}function u(e){return void 0===e&&(e=[]),e.reduce((function(e,t){if(!("value"in t)&&"data"in t&&t.data instanceof ArrayBuffer){var n=new Uint8Array(t.data),r=n.length;t={value:{key:"",data:""}};for(var i=10;i<14&&i<n.length&&0!==n[i];)t.value.key+=String.fromCharCode(n[i]),i++;var u=19,l=n[u];3!==l&&0!==l||(l=n[++u],r--);var c=0;if(1!==l&&2!==l)for(var d=u+1;d<r;d++)if(0===n[d]){c=d-u;break}if(c>0){var f=o(n.subarray(u,u+=c),0);if("PRIV"===t.value.key){if("com.apple.streaming.transportStreamTimestamp"===f){var h=1&s(n.subarray(u,u+=4)),p=s(n.subarray(u,u+=4))+(h?4294967296:0);t.value.data=p}else t.value.data=o(n,u+1);t.value.info=f}else t.value.info=f,t.value.data=o(n,u+1)}else{var g=n[u];t.value.data=1===g||2===g?function(e,t){for(var n=e.length-1,r="",i=t||0;i<n;)254===e[i]&&255===e[i+1]||(r+=String.fromCharCode((e[i]<<8)+e[i+1])),i+=2;return r}(n,u+1):o(n,u+1)}}if(Object.prototype.hasOwnProperty.call(a,t.value.key)&&(e[a[t.value.key]]=t.value.data),t.value.info){var m=e[t.value.key];m!==Object(m)&&(m={},e[t.value.key]=m),m[t.value.info]=t.value.data}else e[t.value.key]=t.value.data;return e}),{})}var l=n(8348),c=n(1643),d=n(6042);function f(){var e=this.video.textTracks,t=(0,d.hX)(e,(function(e){return(e.inuse||!e._id)&&y(e.kind)}));if(this._textTracks&&!h.call(this,t)){for(var n=-1,r=0;r<this._textTracks.length;r++)if("showing"===this._textTracks[r].mode){n=r;break}n!==this._currentTextTrackIndex&&this.setSubtitlesTrack(n+1)}else this.setTextTracks(e)}function h(e){var t=this._textTracks,n=this._tracksById;if(e.length>t.length)return!0;for(var r=0;r<e.length;r++){var i=e[r];if(!i._id||!n[i._id])return!0}return!1}function p(e){var t=e.track;t&&t._id||this.setTextTracks(this.video.textTracks)}function g(e){var t=e.target,n=t.activeCues,r=t.cues,i=t._id,a=this._cues,o=this._activeCues;if(r&&r.length){var s=a[i];a[i]=Array.prototype.slice.call(r),this.parseNativeID3Cues(r,s)}else delete a[i];if(n&&n.length){var u=o[i],l=o[i]=Array.prototype.slice.call(n);this.triggerActiveCues(l,u)}else delete o[i]}function m(e,t,n){if(l.Browser.ie){var r=n;(e||"metadata"===t.kind)&&(r=new window.TextTrackCue(n.startTime,n.endTime,n.text),n.value&&(r.value=n.value)),function(e,t){var n=[],r=e.mode;e.mode="hidden";var i=e.cues;if(i)for(var a=i.length-1;a>=0&&i[a].startTime>t.startTime;a--)n.unshift(i[a]),e.removeCue(i[a]);try{e.addCue(t),n.forEach((function(t){return e.addCue(t)}))}catch(e){console.error(e)}e.mode=r}(t,r)}else try{t.addCue(n)}catch(e){console.error(e)}}function v(e,t,n){t&&t.length&&(0,d.S6)(t,(function(t){var r=t._id||"";if(n&&(t._id=void 0),!l.Browser.ie&&!l.Browser.safari||!e||!/^(native|subtitle|cc)/.test(r)){if(l.Browser.ie&&"disabled"===t.mode||(t.mode="disabled",t.mode="hidden"),t.cues)for(var i=t.cues.length;i--;)t.removeCue(t.cues[i]);t.embedded||(t.mode="disabled"),t.inuse=!1}}))}function y(e){return"captions"===e||"subtitles"===e}function b(e){return/^native(?:captions|subtitles)/.test(e)}function T(e){var t=u(e);return{metadataType:"id3",metadataTime:e[0].startTime,metadata:t}}function w(e,t){return e.startTime===t.startTime&&e.endTime===t.endTime&&e.text===t.text&&e.data===t.data&&JSON.stringify(e.value)===JSON.stringify(t.value)}var x={_itemTracks:null,_textTracks:null,_currentTextTrackIndex:-1,_tracksById:null,_cuesByTrackId:null,_cachedVTTCues:null,_metaCuesByTextTime:null,_unknownCount:0,_activeCues:null,_cues:null,textTrackChangeHandler:null,addTrackHandler:null,cueChangeHandler:null,renderNatively:!1,_initTextTracks:function(){this._textTracks=[],this._tracksById={},this._metaCuesByTextTime={},this._cuesByTrackId={},this._cachedVTTCues={},this._cues={},this._activeCues={},this._unknownCount=0},addTracksListener:function(e,t,n){e&&(this.removeTracksListener(e,t,n),this.instreamMode||(e.addEventListener?e.addEventListener(t,n):e["on"+t]=n))},removeTracksListener:function(e,t,n){e&&(e.removeEventListener&&n?e.removeEventListener(t,n):e["on"+t]=null)},clearTracks:function(){var e=this;(0,r.V)(this._itemTracks);var t=this._tracksById;if(t&&Object.keys(t).forEach((function(n){if(0===n.indexOf("nativemetadata")){var r=t[n];e.cueChangeHandler&&r.removeEventListener("cuechange",e.cueChangeHandler),v(e.renderNatively,[r],!0)}})),this._itemTracks=null,this._textTracks=null,this._tracksById=null,this._cuesByTrackId=null,this._metaCuesByTextTime=null,this._unknownCount=0,this._currentTextTrackIndex=-1,this._activeCues={},this._cues={},this.renderNatively){var n=this.video.textTracks;this.textTrackChangeHandler&&this.removeTracksListener(n,"change",this.textTrackChangeHandler),v(this.renderNatively,n,!0)}},clearMetaCues:function(){var e=this,t=this._tracksById,n=this._cachedVTTCues;t&&n&&Object.keys(t).forEach((function(r){if(0===r.indexOf("nativemetadata")){var i=t[r];v(e.renderNatively,[i],!1),i.mode="hidden",i.inuse=!0,i._id&&(n[i._id]={})}}))},clearCueData:function(e){var t=this._cachedVTTCues;t&&t[e]&&(t[e]={},this._tracksById&&(this._tracksById[e].data=[]))},disableTextTrack:function(){var e=this.getCurrentTextTrack();if(e){e.mode="disabled";var t=e._id;(t&&b(t)||this.renderNatively&&l.OS.iOS)&&(e.mode="hidden")}},enableTextTrack:function(){var e=this.getCurrentTextTrack();e&&(e.mode="showing")},getCurrentTextTrack:function(){if(this._textTracks)return this._textTracks[this._currentTextTrackIndex]},getSubtitlesTrack:function(){return this._currentTextTrackIndex},addTextTracks:function(e){var t=this,n=[];return e?(this._textTracks||this._initTextTracks(),e.forEach((function(e){if(!(e.includedInManifest||e.kind&&!y(e.kind))){var i=t._createTrack(e);t._addTrackToList(i),n.push(i),e.file&&(e.data=[],(0,r.x)(e,(function(e){i.sideloaded=!0,t.addVTTCuesToTrack(i,e)}),(function(e){t.trigger(c.cM,e)})))}})),this._textTracks&&this._textTracks.length&&this.trigger(c.jt,{tracks:this._textTracks}),n):n},setTextTracks:function(e){var t=this;if(this._currentTextTrackIndex=-1,e){if(this._textTracks){var n=this._tracksById;this._activeCues={},this._cues={},this._unknownCount=0,this._textTracks=this._textTracks.filter((function(e){var r=e._id;return t.renderNatively&&r&&b(r)?(delete n[r],!1):(e.name&&0===e.name.indexOf("Unknown")&&t._unknownCount++,0===r.indexOf("nativemetadata")&&"com.apple.streaming"===e.inBandMetadataTrackDispatchType&&delete n[r],!0)}),this)}else this._initTextTracks();if(e.length)for(var r=0,a=e.length,o=this._tracksById,s=this._cuesByTrackId;r<a;r++){var u=e[r],l=u._id||"";if(!l){if(!1===u.inuse&&y(u.kind)&&this.renderNatively){u._id="native"+u.kind+r;continue}if(y(u.kind)||"metadata"===u.kind){if(l=u._id="native"+u.kind+r,!u.label&&"captions"===u.kind){var d=(0,i._)(u,this._unknownCount);u.name=d.label,this._unknownCount=d.unknownCount}}else l=u._id=(0,i.M)(u,this._textTracks?this._textTracks.length:0);if(o[l])continue;u.inuse=!0}if(u.inuse&&!o[l])if("metadata"===u.kind){u.mode="hidden";var f=this.cueChangeHandler=this.cueChangeHandler||g.bind(this);u.removeEventListener("cuechange",f),u.addEventListener("cuechange",f),o[l]=u}else if(y(u.kind)){var h=u.mode,p=void 0;if(u.mode="hidden",(!u.cues||!u.cues.length)&&u.embedded)continue;if(("disabled"!==h||b(l))&&(u.mode=h),s[l]&&!s[l].loaded){for(var v=s[l].cues;p=v.shift();)m(this.renderNatively,u,p);u.mode=h,s[l].loaded=!0}this._addTrackToList(u)}}this.renderNatively&&this.addTrackListeners(e),this._textTracks&&this._textTracks.length&&this.trigger(c.jt,{tracks:this._textTracks})}},addTrackListeners:function(e){var t=this.textTrackChangeHandler=this.textTrackChangeHandler||f.bind(this);this.removeTracksListener(e,"change",t),this.addTracksListener(e,"change",t),(l.Browser.edge&&l.Browser.ie||l.Browser.firefox)&&(t=this.addTrackHandler=this.addTrackHandler||p.bind(this),this.removeTracksListener(e,"addtrack",t),this.addTracksListener(e,"addtrack",t))},setupSideloadedTracks:function(e){if(this.renderNatively){var t=(e=e||null)===this._itemTracks;t||(0,r.V)(this._itemTracks),this._itemTracks=e,e&&(t||(this.disableTextTrack(),this._clearSideloadedTextTracks(),this.addTextTracks(e)))}},setSubtitlesTrack:function(e){if(this.renderNatively){if(this._textTracks&&(0===e&&this._textTracks.forEach((function(e){e.mode=e.embedded?"hidden":"disabled"})),this._currentTextTrackIndex!==e-1)){this.disableTextTrack(),this._currentTextTrackIndex=e-1;var t=this.getCurrentTextTrack();t&&(t.mode="showing"),this.trigger(c.UF,{currentTrack:this._currentTextTrackIndex+1,tracks:this._textTracks})}}else this.setCurrentSubtitleTrack&&this.setCurrentSubtitleTrack(e-1)},createCue:function(e,t,n){return new(window.VTTCue||window.TextTrackCue)(e,Math.max(t||0,e+.25),n)},addVTTCue:function(e,t){this._tracksById||this._initTextTracks();var n=e.track?e.track:"native"+e.type,r=this._tracksById[n],i="captions"===e.type?"Unknown CC":"ID3 Metadata",a=e.cue;if(!r){var o={kind:e.type,_id:n,label:i,default:!1};this.renderNatively||"metadata"===o.kind?((r=this._createTrack(o)).embedded=!0,this.setTextTracks(this.video.textTracks)):r=this.addTextTracks([o])[0]}if(this._cacheVTTCue(r,a,t)){var s=this.renderNatively||"metadata"===r.kind;return s?m(s,r,a):r.data.push(a),a}return null},addVTTCuesToTrack:function(e,t){if(this.renderNatively){var n,r=e._id,i=this._tracksById,a=this._cuesByTrackId,o=i[r];if(!o)return a||(a=this._cuesByTrackId={}),void(a[r]={cues:t,loaded:!1});if(!a[r]||!a[r].loaded)for(a[r]={cues:t,loaded:!0};n=t.shift();)m(this.renderNatively,o,n)}},parseNativeID3Cues:function(e,t){var n=e[e.length-1];if(!t||t.length!==e.length||!n._parsed&&!w(t[t.length-1],n)){for(var r=[],i=[],a=-1,o=-1,s=-1,u=0;u<e.length;u++){var l=e[u];if(!l._extended&&(l.data||l.value)){if(l.startTime!==o||null===l.endTime){s=o,o=l.startTime;var d=r[a];if(r[++a]=[],i[a]=[],d&&o-s>0)for(var f=0;f<d.length;f++){var h=d[f];h.endTime=o,h._extended=!0}}r[a].push(l),l._parsed||(i[a].push(l),l.endTime-o<.25&&(l.endTime=o+.25),l._parsed=!0)}}for(var p=0;p<i.length;p++)if(i[p].length){var g=T(i[p]);this.trigger(c.O1,g)}}},triggerActiveCues:function(e,t){var n=this,r=e.filter((function(e){if(t&&t.some((function(t){return w(e,t)})))return!1;if(e.data)return!0;var r=e.text?function(e){var t;try{t=JSON.parse(e.text)}catch(e){return null}var n={metadataType:t.metadataType,metadataTime:e.startTime,metadata:t};t.programDateTime&&(n.programDateTime=t.programDateTime);return n}(e):null;if(r)"emsg"===r.metadataType&&(r.metadata=r.metadata||{},r.metadata.messageData=e.value),n.trigger(c.rx,r);else if(e.value)return!0;return!1}));if(r.length){var i=T(r);this.trigger(c.rx,i)}},ensureMetaTracksActive:function(){for(var e=this.video.textTracks,t=e.length,n=0;n<t;n++){var r=e[n];"metadata"===r.kind&&"disabled"===r.mode&&(r.mode="hidden")}},_cacheVTTCue:function(e,t,n){var r=e.kind,i=e._id,a=this._cachedVTTCues;a[i]||(a[i]={});var o,s=a[i];switch(r){case"captions":case"subtitles":o=n||Math.floor(20*t.startTime);var u="_"+(t.line||"auto"),l=Math.floor(20*t.endTime),c=s[o+u]||s[o+1+u]||s[o-1+u];return!(c&&Math.abs(c-l)<=1)&&(s[o+u]=l,!0);case"metadata":var d=t.data?new Uint8Array(t.data).join(""):t.text;return!s[o=n||t.startTime+d]&&(s[o]=t.endTime,!0);default:return!1}},_addTrackToList:function(e){this._textTracks.push(e),this._tracksById[e._id]=e},_createTrack:function(e){var t,n=(0,i._)(e,this._unknownCount),r=n.label;if(this._unknownCount=n.unknownCount,this.renderNatively||"metadata"===e.kind){var a=this.video.textTracks;(t=(0,d._e)(a,{label:r}))||(t=this.video.addTextTrack(e.kind,r,e.language||"")),t.default=e.default,t.mode="disabled",t.inuse=!0}else(t=e).data=t.data||[];return t._id||(t._id=(0,i.M)(e,this._textTracks?this._textTracks.length:0)),t},_clearSideloadedTextTracks:function(){if(this._textTracks){var e=this._textTracks.filter((function(e){return e.embedded||"subs"===e.groupid}));this._initTextTracks();var t=this._tracksById;e.forEach((function(e){t[e._id]=e})),this._textTracks=e}}}},9601:function(e,t,n){"use strict";n.d(t,{Z:function(){return i},E:function(){return a}});var r=n(4446);function i(e,t,n){var i=e+1e3,o=r.ul;return t>0?(403===t&&(o=r.H4),i+=a(t)):"http:"===(""+n).substring(0,5)&&"https:"===document.location.protocol?i+=12:0===t&&(i+=11),{code:i,key:o}}var a=function(e){return e>=400&&e<600?e:6}},5099:function(e,t,n){"use strict";function r(e){return new Promise((function(t,n){if(e.paused)return n(i("NotAllowedError",0,"play() failed."));var r=function(){e.removeEventListener("play",a),e.removeEventListener("playing",o),e.removeEventListener("pause",o),e.removeEventListener("abort",o),e.removeEventListener("error",o)},a=function(){e.addEventListener("playing",o),e.addEventListener("abort",o),e.addEventListener("error",o),e.addEventListener("pause",o)},o=function(e){if(r(),"playing"!==e.type){var a='The play() request was interrupted by a "'+e.type+'" event.';return"error"===e.type?n(i("NotSupportedError",9,a)):n(i("AbortError",20,a))}t()};e.addEventListener("play",a)}))}function i(e,t,n){var r=new Error(n);return r.name=e,r.code=t,r}n.d(t,{Z:function(){return r}})},5256:function(e,t,n){"use strict";function r(e,t,n){if(!e)return"";var r=e.bitrate||e.bandwidth;return function(e,t){var n=null;if(t&&e){var r=Object.keys(e);if(r.length){var a=function(e,t){var n,r=null,i=1/0;return e.forEach((function(e){(n=Math.abs(parseFloat(e)-t))<i&&(r=e,i=n)})),r}(r,i(t));a&&(n=e[a])}}return n}(t,r)||e.label||function(e,t,n){if(!e&&!t)return"";var r="",a="";t&&(r=a=i(t)+" kbps");e&&(r=e+"p",t&&n&&(r+=" ("+a+")"));return r}(e.height,r,n)}function i(e){return Math.floor(e/1e3)}function a(e){return!!Array.isArray(e)&&s(e,["height","bitrate","bandwidth"])}function o(e){return!!Array.isArray(e)&&s(e,["label"])}function s(e,t){return e.some((function(e){for(var n,r=0;r<t.length&&!(n=e[t[r]]);r++);if(!n)return!1;var i=this[n]||!1;return this[n]=!0,i}),{})}n.d(t,{ji:function(){return r},_T:function(){return i},c3:function(){return a},s_:function(){return o}})},686:function(e,t,n){"use strict";function r(e,t){return e!==1/0&&Math.abs(e)>=Math.max(a(t),0)}function i(e,t){var n="VOD";return e===1/0?n="LIVE":e<0&&(n=r(e,a(t))?"DVR":"LIVE"),n}function a(e){return void 0===e?120:Math.max(e,0)}n.d(t,{s:function(){return r},v:function(){return i}})},3949:function(e,t,n){"use strict";var r=n(8348),i=n(974),a=n(9974),o={container:null,volume:function(e){this.video.volume=Math.min(Math.max(0,e/100),1)},mute:function(e){this.video.muted=!!e,this.video.muted||this.video.removeAttribute("muted")},resize:function(e,t,n){var a=this.video,o=a.videoWidth,s=a.videoHeight;if(e&&t&&o&&s){var u={objectFit:"",width:"",height:""},l=e/t,c=o/s;if("uniform"===n)(l>c?e-e/(l/c):t-t/(c/l))<6&&(u.objectFit="fill",n="exactfit");if(r.Browser.ie||r.OS.iOS&&(r.OS.version.major||0)<9||r.Browser.androidNative)if("uniform"!==n){u.objectFit="contain";var d=1,f=1;"none"===n?d=f=l>c?Math.ceil(100*s/t)/100:Math.ceil(100*o/e)/100:"fill"===n?d=f=l>c?l/c:c/l:"exactfit"===n&&(l>c?(d=l/c,f=1):(d=1,f=c/l)),(0,i.vs)(a,"matrix("+d.toFixed(2)+", 0, 0, "+f.toFixed(2)+", 0, 0)")}else u.top=u.left=u.margin="",(0,i.vs)(a,"");(0,i.oB)(a,u)}},getContainer:function(){return this.container},setContainer:function(e){this.container=e,this.video.parentNode!==e&&e.appendChild(this.video)},removeFromContainer:function(){var e=this.container,t=this.video;this.container=null,e&&e===t.parentNode&&e.removeChild(t)},remove:function(){this.stop(),this.destroy(),this.removeFromContainer()},atEdgeOfLiveStream:function(){if(!this.isLive())return!1;return(0,a.Z)(this.video.buffered)-this.video.currentTime<=2}};t.Z=o},186:function(e,t){"use strict";t.Z={eventsOn_:function(){},eventsOff_:function(){},attachMedia:function(){this.eventsOn_()},detachMedia:function(){return this.eventsOff_()}}},8702:function(e,t,n){"use strict";var r=n(1643),i=n(1261),a={canplay:function(){this.renderNatively&&this.setTextTracks(this.video.textTracks),this.trigger(r.Jl)},play:function(){this.stallTime=-1,this.video.paused||this.state===r.r0||this.setState(r.ik)},loadedmetadata:function(){var e={metadataType:"media",duration:this.getDuration(),height:this.video.videoHeight,width:this.video.videoWidth,seekRange:this.getSeekRange()},t=this.drmUsed;t&&(e.drm=t),this.trigger(r.rx,e)},timeupdate:function(){var e=this.video.currentTime,t=this.getCurrentTime(),n=this.getDuration();if(!isNaN(n)){this.seeking||this.video.paused||this.state!==r.nQ&&this.state!==r.ik||this.stallTime===e||(this.stallTime=-1,this.setState(r.r0),this.trigger(r.Gj));var i={position:t,duration:n,currentTime:e,seekRange:this.getSeekRange(),metadata:{currentTime:e}},a=this.getLiveLatency();if(null!==a&&(i.latency=a,this.getTargetLatency)){var o=this.getTargetLatency();null!==o&&(i.targetLatency=o)}(this.state===r.r0||this.seeking&&this.state!==r.bc)&&this.trigger(r.R2,i)}},click:function(e){this.trigger(r.ot,e)},volumechange:function(){var e=this.video;this.trigger(r.yH,{volume:Math.round(100*e.volume)}),this.trigger(r.gy,{mute:e.muted})},seeking:function(){if(this.state===r.ik){var e=this.video.buffered.length?this.video.buffered.start(0):-1;if(this.video.currentTime===e)return}else if(this.state===r.bc)return;this.seeking=!0},seeked:function(){this.seeking&&(this.seeking=!1,this.trigger(r.aQ))},playing:function(){-1===this.stallTime&&this.setState(r.r0),this.trigger(r.Gj)},pause:function(){this.state!==r.xQ&&(this.video.ended||this.video.error||this.video.currentTime!==this.video.duration&&this.setState(r._5))},progress:function(){var e=this.getDuration();if(!(e<=0||e===1/0)){var t=this.video.buffered;if(t&&0!==t.length){var n=(0,i.v)(t.end(t.length-1)/e,0,1);this.trigger(r.uT,{bufferPercent:100*n,position:this.getCurrentTime(),duration:e,currentTime:this.video.currentTime,seekRange:this.getSeekRange()})}}},ratechange:function(){this.trigger(r.TJ,{playbackRate:this.video.playbackRate})},ended:function(){this.state!==r.bc&&this.state!==r.xQ&&this.trigger(r.Ms)}};t.Z=a},9974:function(e,t,n){"use strict";function r(e){return e&&e.length?e.end(e.length-1):0}n.d(t,{Z:function(){return r}})},2287:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Me}});var r=n(6042),i=n(4506),a=n(548),o=n(2776);function s(){}s.prototype.parseInit=function(){},s.prototype.parseMedia=function(e,t){var n=t.periodStart,r=t.segmentStart,i=function(e){var t,n="";if(!e)return"";
10239===(t=new Uint8Array(e))[0]&&187===t[1]&&191===t[2]&&(t=t.subarray(3));for(var r=0;r<t.length;r+=65535)n+=String.fromCharCode.apply(null,t.subarray(r,r+65535));return window.decodeURIComponent(window.escape(n))}(e);return function(e,t){void 0===t&&(t=0);var n=new o.default(window,void 0,!0),r=[];return n.oncue=function(e){t&&(e.startTime+=t,e.endTime+=t),r.push(e)},n.parse(e),r}(i=i.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n"),n+r)};var u=n(7477),l=n(8348);function c(e){this._service=e}function d(e,t,n){if(e.payload&&e.startTime===t&&n.push(e.payload),e.nestedCues)for(var r=0;r<e.nestedCues.length;r++)n.concat.apply(n,d(e.nestedCues[r],t,n));return n}c.prototype.append=function(e){if(e.length){var t=e[0].nestedCues&&e[0].nestedCues.length;(e[0].payload||t)&&(e=e.reduce((function(e,t){var n=d(t,t.startTime,[]);return t.payload=n.join(" "),e.push(function(e){var t=l.Browser.safari?"center":"middle",n=new u.Z(e.startTime,e.endTime,e.payload);n.align="center"===e.textAlign?t:e.textAlign,n.lineAlign="center"===e.lineAlign?t:e.lineAlign,n.size=e.size,null!==e.line&&(n.line=e.line);null!==e.position&&(n.position=e.position);return n}(t)),e}),[])),this._service.trigger("cues",e)}},c.prototype.remove=function(){return!0},c.prototype.isTextVisible=function(){return!0},c.prototype.setTextVisibility=function(){},c.prototype.destroy=function(){return Promise.resolve()};var f=n(328),h=n(1123),p=n.n(h),g=n(686);function m(e,t){return m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},m(e,t)}p().polyfill.installAll(),p().text.TextEngine.registerParser("text/vtt",s),p().text.TextEngine.registerParser('text/vtt; codecs="vtt"',s);var v=function(e){var t,n;function i(t,n){var r;return(r=e.call(this)||this).shakaPlayer=t,r.videoTag=n,r.loadedItem=null,r.streamType="VOD",r}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,m(t,n);var a=i.prototype;return a.setup=function(e,t,n,i){var a=this,o=!(0,r.qh)(i);o||(n=i/this.shakaPlayer.getConfiguration().abr.bandwidthDowngradeTarget);this.shakaPlayer.configure({abr:{enabled:o,defaultBandwidthEstimate:n},drm:e,preferredTextLanguage:t,textDisplayFactory:function(){return new c(a)}})},a.enableAbr=function(e){this.shakaPlayer.configure({abr:{enabled:!!e}})},a.abrEnabled=function(){return this.shakaPlayer.getConfiguration().abr.enabled},a.setMaxBuffer=function(e){this.shakaPlayer.configure({streaming:{bufferingGoal:e}})},a.setPlaybackRate=function(e){this.videoTag.playbackRate=this.videoTag.defaultPlaybackRate=e,this.shakaPlayer&&this.shakaPlayer.getLoadMode()>1&&this.shakaPlayer.trickPlay(e)},a.seek=function(e){if("LIVE"!==this.streamType){var t=this.shakaPlayer.seekRange().end;this.videoTag.currentTime=e<0?t+e:e}},a.getPlaybackRate=function(){return this.shakaPlayer?this.shakaPlayer.getPlaybackRate()||1:this.videoTag.playbackRate},a.isLive=function(){return this.shakaPlayer.isLive()},a.isDvr=function(){return"DVR"===this.streamType},a.getCurrentTime=function(){var e=this.videoTag.currentTime;return this.shakaPlayer.isLive()&&"DVR"===this.streamType&&(e-=this.shakaPlayer.seekRange().end),e},a.getDuration=function(){var e=this.loadedItem,t=this.shakaPlayer,n=this.videoTag.duration;if(!e)return n;var r=e.minDvrWindow;if(this.shakaPlayer.isLive()){var i=t.seekRange();n=i.start-i.end,n=(0,g.s)(n,r)?n:1/0}return this.streamType=(0,g.v)(n,r),n},a.getLoadedItem=function(){return this.loadedItem},a.getSeekRange=function(){return this.shakaPlayer.seekRange()},a.getVariantHistory=function(e){return e=e||0,this.shakaPlayer.getStats().switchHistory.filter((function(t){return"variant"===t.type&&t.timestamp>e}))},a.setLoadedItem=function(e){this.loadedItem=e,this.streamType="VOD"},a.unload=function(){this.loadedItem=null,this.shakaPlayer.unload()},a.destroy=function(){return window.VTTCue=u.Z,this.loadedItem=null,this.shakaPlayer.destroy()},i}(f.ZP),y=n(1918),b=n(5256),T=n(1643),w=n(974),x=n(8518),E=n(6886),S=n(6528),k=n(8702),A=n(3949),I=n(186),C=n(3328),M=n(5099),R=n(2728),D=n(4446),_=n(9601),N=24e4,L=241e3,P=244e3,j=246e3,O=241005,U=p().util.Error,B=U.Severity.RECOVERABLE,F=U.Category,V=F.NETWORK,H=F.MEDIA,K=F.MANIFEST,G=F.PLAYER,q=F.DRM,z=U.Code,X=z.UNSUPPORTED_SCHEME,W=z.BAD_HTTP_STATUS,Y=z.HTTP_ERROR,$=z.TIMEOUT,J=z.MP4_SIDX_WRONG_BOX_TYPE,Z=z.VIDEO_ERROR,Q=z.DASH_INVALID_XML,ee=z.CONTENT_UNSUPPORTED_BY_BROWSER,te=z.RESTRICTIONS_CANNOT_BE_MET,ne=z.REQUEST_FILTER_ERROR,re=z.RESPONSE_FILTER_ERROR,ie=z.NO_RECOGNIZED_KEY_SYSTEMS,ae=z.REQUESTED_
10KEY_SYSTEM_CONFIG_UNAVAILABLE,oe=z.FAILED_TO_CREATE_CDM,se=z.FAILED_TO_ATTACH_TO_VIDEO,ue=z.INVALID_SERVER_CERTIFICATE,le=z.FAILED_TO_CREATE_SESSION,ce=z.FAILED_TO_GENERATE_LICENSE_REQUEST,de=z.LICENSE_REQUEST_FAILED,fe=z.LICENSE_RESPONSE_REJECTED,he=z.ENCRYPTED_CONTENT_WITHOUT_DRM_INFO,pe=z.NO_LICENSE_SERVER_GIVEN,ge=z.OFFLINE_SESSION_REMOVED,me=z.EXPIRED,ve=z.SERVER_CERTIFICATE_REQUIRED,ye=z.INIT_DATA_TRANSFORM_ERROR,be=z.SERVER_CERTIFICATE_REQUEST_FAILED,Te=new Map([[$,241001],[J,244604],[Q,242601],[te,242635],[ne,O],[re,O],[ie,j],[ae,246001],[oe,246002],[se,246003],[ue,246004],[le,246005],[ce,246006],[de,246007],[fe,246008],[he,246010],[pe,246012],[ge,246013],[me,246014],[ve,246015],[ye,246016],[be,246017]]);var we,xe=n(4742),Ee=Object.prototype.hasOwnProperty,Se=(we="warn",xe.Z.debug?console[we].bind(console):function(){}),ke=function(e){return function(t,n,r,i,a){void 0===a&&(a=function(){});var o=new XMLHttpRequest,s=Date.now(),u=0,l=new Promise((function(l,c){o.open(n.method,t,!0);try{e(o,t)}catch(e){Se(e)}o.responseType="arraybuffer",o.timeout=n.retryParameters.timeout,o.withCredentials=n.allowCrossSiteCredentials,o.onabort=function(){c(new(p().util.Error)(p().util.Error.Severity.RECOVERABLE,p().util.Error.Category.NETWORK,p().util.Error.Code.OPERATION_ABORTED,t,r))};var d=!1;for(var f in o.onreadystatechange=function(){if(2===o.readyState&&!d){var e=Ae(o);a(e),d=!0}},o.onload=function(){var e=Ae(o),n=o.response;try{var i=function(e,t,n,r,i,a){if(n>=200&&n<=299&&202!==n){return{uri:i||r,originalUri:r,data:t,status:n,headers:e,fromCache:!!e["x-shaka-from-cache"]}}var o=null;try{o=p().util.StringUtils.fromBytesAutoDetect(t)}catch(e){Se(e)}Se("HTTP error text:",o);var s=401===n||403===n?p().util.Error.Severity.CRITICAL:p().util.Error.Severity.RECOVERABLE;throw new(p().util.Error)(s,p().util.Error.Category.NETWORK,p().util.Error.Code.BAD_HTTP_STATUS,r,n,o,e,a)}(e,n,o.status,t,o.responseURL,r);l(i)}catch(e){c(e)}},o.onerror=function(e){c(new(p().util.Error)(p().util.Error.Severity.RECOVERABLE,p().util.Error.Category.NETWORK,p().util.Error.Code.HTTP_ERROR,t,e,r))},o.ontimeout=function(){c(new(p().util.Error)(p().util.Error.Severity.RECOVERABLE,p().util.Error.Category.NETWORK,p().util.Error.Code.TIMEOUT,t,r))},o.onprogress=function(e){var t=Date.now();(t-s>100||e.lengthComputable&&e.loaded===e.total)&&(i(t-s,e.loaded-u,e.total-e.loaded),u=e.loaded,s=t)},n.headers)if(Ee.call(n.headers,f)){var h=f.toLowerCase();o.setRequestHeader(h,n.headers[f])}o.send(n.body)}));return new(p().util.AbortableOperation)(l,(function(){return o.abort(),Promise.resolve()}))}};function Ae(e){var t=e.getAllResponseHeaders().trim().split("\r\n"),n={};return t.forEach((function(e){var t=e.split(": ");n[t[0].toLowerCase()]=t.slice(1).join(": ")})),n}var Ie=function(e){void 0===e&&(e=null);var t=p().net.HttpXHRPlugin.parse;e&&"function"==typeof e&&(t=ke(e)),p().net.NetworkingEngine.registerScheme("http",t,p().net.NetworkingEngine.PluginPriority.APPLICATION,!0),p().net.NetworkingEngine.registerScheme("https",t,p().net.NetworkingEngine.PluginPriority.APPLICATION,!0),p().net.NetworkingEngine.registerScheme("blob",t,p().net.NetworkingEngine.PluginPriority.APPLICATION,!0)};function Ce(e,t,n){var o,s,u,c,d=this,h={},g=null,m=null,S=(0,R.Z)(this,t.bandwidthEstimate),O=t.bitrateSelection;function U(){m.addEventListener("error",ne),m.addEventListener("trackschanged",ce),m.addEventListener("adaptation",(function(){d.pollAdaptation=!0})),m.addEventListener("emsg",F),(0,r.S6)(h,(function(e,t){n.addEventListener(t,e)})),d.service.on("cues",ye),S.start()}function F(e){var t=e.detail,n=t.startTime,r=t.endTime,i=t.id,a=t.schemeIdUri,o=t.timescale,s=t.presentationTimeDelta,u=t.eventDuration,l=t.messageData,c={metadataType:"emsg",id:i,schemeIdUri:a,timescale:o,presentationTimeOffset:s,duration:u,start:n,end:r},f=d.createCue(n,r,JSON.stringify(c));f.value=l,f._parsed=!0,d.addVTTCue({type:"metadata",cue:f},i+"_"+s+"_"+n+"_"+r)&&(delete c.metadataType,c.messageData=l,d.trigger(T.O1,{metadataType:"emsg",metadata:c}))}function z(e,n){return(0,b.ji)(e,t.qualityLabels,n)}function $(){m&&(m.removeEventListener("error",ne),m.removeEventListener("trackschanged",ce),m.removeEventListener("emsg",F)),(0,r.S6)(h,(function(e,t){n.removeEventListener(t,e)})),d.service&&d.service.off("cues",ye),S.stop()}function Q(){if(g=null,$(),m){var e=m.getNetworkingEngine();e.clearAllRequestFilters(),e.clearAllResponseFilters(),m=null}if(d.service){var t=d.service.destroy();return d.service=null,t}}function te(){d.seeking?d.setState(T.ik):d.state!==T.r0&&d.state!==T.ik||(d.stallTime=n.currentTime,d.setState(T.nQ))}function ne(e){if(!(n.src||n.played&&n.played.length))return d.destroy(),void(m=re(n));
10var t=e.detail?e.detail:e,i=function(e){var t=e.category,n=e.code,i=e.data,a=e.severity!==B,o=n===J,s=a?N:34e4,u=a?D.ul:null,c={key:u,code:s,fatal:a,changeLevel:o};if(!a)return c;if(Te.has(n))return(0,r.l7)(c,{code:Te.get(n)});if(n===X)s=241004;else if(n===W){var d=(0,_.Z)(N,i[1],i[0]);s=d.code,u=d.key}else if(n===Y){var f=(0,_.Z)(N,0,i[0]);s=f.code,u=f.key}else n===Z?(s=P,i[0]>1&&i[0]<5&&(s+=i[0]-1)):n===ee?(u=D.zO,s=242632):l.Browser.ie&&e.message&&0===e.message.indexOf("Access is denied.")?s=241012:t===K?s=242600:t===V?s=L:t===H?s=P:t===G?s=249e3:t===q&&(s=j);return(0,r.l7)(c,{code:s,key:u})}(t),a=i.key,o=i.code,s=i.fatal,u=i.changeLevel;if(s){if(u){var c=function(){var e=(0,r._e)(d.shakaLevels,{active:!0});if(e)for(var t=0;t<d.jwLevels.length;t+=1)if(e.id===d.jwLevels[t].shakaId)return t;return null}();if(fe(c,d.jwLevels))return void ve(c)}d.service&&d.service.unload(),me(),d.trigger(T.Ew,new D.rG(a,o,t))}else d.trigger(T.cM,new D.rG(null,o,t))}function re(e){var t=new(p().Player)(e);return d.service=new v(t,e),d.adaptationId=-1,d.adaptationTs=-1,t}function ie(e){n.textTracks&&(e&&e.length&&d.setupSideloadedTracks(e),d.setTextTracks(n.textTracks))}function ae(e){o=e.sources[0].drm||{},d.service.setLoadedItem(e),d.clearTracks(),d.setupSideloadedTracks(e.tracks),d.on(T.uT,(function(){n&&1===n.readyState&&n.buffered.length>0&&n.currentTime<n.buffered.start(0)&&setTimeout((function(){n.currentTime=n.buffered.start(0)}),0)}));var r=m.getNetworkingEngine();r.clearAllRequestFilters(),r.clearAllResponseFilters(),(e.withCredentials||t.withCredentials)&&r.registerRequestFilter(oe);var i=o.widevine?o.widevine.serverCertificateUrl:void 0;return i?new Promise((function(t,n){(0,E.h)({url:i,responseType:"arraybuffer"},(function(n){return se(e,n).then(t)}),(function(e,t,r,i){return n(i)}))})):se(e)}function oe(e,t){t.allowCrossSiteCredentials=!0}function se(e,n){void 0===e&&(e={sources:[]}),void 0===n&&(n={});var r=null;n.response&&(r=new Uint8Array(n.response));var i=S.getEstimate();d.service.setup(function(e){void 0===e&&(e=null);var t,n,r={},i="";if(o.clearkey&&(0,y.Gb)("clearkey"))return(n=o.clearkey).keyId=n.keyId?n.keyId.replace(/-/g,""):null,r.clearKeys={},r.clearKeys[n.keyId]=n.key,r;if(o.widevine&&(0,y.Gb)("widevine"))d.drmUsed="widevine",t="com.widevine.alpha",i="http://widevine-proxy.appspot.com/proxy";else{if(!o.playready||!(0,y.Gb)("playready"))return r;d.drmUsed="playready",t="com.microsoft.playready",i="http://microsoft-proxy.appspot.com/proxy"}if(!(n=o[d.drmUsed]))return r;var a=n,s=a.audioRobustness,u=void 0===s?"":s,l=a.videoRobustness,c=void 0===l?"":l;(e||u||c)&&(r.advanced={},r.advanced[t]={serverCertificate:e,audioRobustness:u,videoRobustness:c});r.servers=r.servers||{},r.servers[t]=n.url||i;var f=m.getNetworkingEngine(),h=p().net.NetworkingEngine.RequestType.LICENSE,g=n,v=g.licenseRequestFilter,b=g.licenseResponseFilter,T=function(e,t){if(e===h){try{Object.defineProperties(t,{open:{get:function(){return function(e,n){t.uris=[e],t.method=n}},enumerable:!0},setRequestHeader:{get:function(){return function(e,n){t.headers[e]=n}},enumerable:!0},withCredentials:{get:function(){return t.allowCrossSiteCredentials},set:function(e){t.allowCrossSiteCredentials=e},enumerable:!0}})}catch(e){}return function(e,t){[].concat(e.headers||[]).concat(e.licenseRequestHeaders||[]).forEach((function(e){t.headers[e.name]=e.value}));var n=e.customData;n&&(t.headers.customData=n)}(n,t),"function"==typeof v?v.call(m,t,m.drmInfo()):void 0}},w=function(e,t){if(e===h)return"function"==typeof b?b.call(m,t,m.drmInfo()):void 0};return f.registerRequestFilter(T),f.registerResponseFilter(w),r}(r),t.selectedCaptionCode||(0,x.Cq)(t.captionLabel),i,O);var a=e.sources[0].file;return(e.starttime?m.load(a,e.starttime):m.load(a)).then((function(){d.livePausedItem=null,g=null,d.state===T.bc&&m&&m.isLive()&&ge()})).catch(ne)}function ue(e){if(fe(e,d.jwLevels)){d.service.enableAbr(!1);var t=d.jwLevels[e].shakaId,n=(0,r._e)(d.shakaLevels,{id:t});if(n){var i=n.bandwidth>O,a=n.language!==s;O=n.bandwidth,m.selectVariantTrack(n,i||a)}var o=0===e;d.service.enableAbr(o),o||(d.pollAdaptation=!0)}}function le(e){var t=d.audioTracks[e||he()];if(t){var n=d.shakaAudioTracks[t.shakaIndex];
10n&&(s=n.language,u=n.audioRoles?n.audioRoles[0]:"",d.service.enableAbr(!1),m.selectAudioLanguage(s,u),d.service.enableAbr(!0),ve(d.currentQuality))}}function ce(){var e=m.getTextTracks();d._tracksById&&e.length===Object.keys(d._tracksById).length||(e=e.filter((function(e){return"Shaka Player TextTrack"!==e.label})).map((function(e){var t=e;return t.kind=(t.kind||"subtitles").replace(/^(.+[^s])$/,"$1s"),t.embedded=!0,t.label=t.label?t.label:(0,x.id)(t.language),t.source="currentTime",t})),d.addTextTracks(e));var t=m.getVariantTracks();t=t.map((function(e){return e.label||(e.label=(0,x.id)(e.language)),e}));var n=(0,r._e)(t,{active:!0}),i=(0,r.vM)(t,"language"),a=(0,r.vM)(t,"label"),o="video";if(d.tracksByLang=i,d.tracksByLabel=a,(0,r.dp)(i)&&n){Object.keys(a).length!==Object.keys(i).length?de(a[n.label]):de(i[n.language]);var s=0;if(!d.service.abrEnabled()){var u=d.service.getVariantHistory();if(u.length){var l=u[0].id,c=(0,r._e)(d.jwLevels,{shakaId:l});s=d.jwLevels.indexOf(c)}}d.currentQuality=Math.max(0,s),ue(d.currentQuality),d.trigger(T.UZ,{levels:d.jwLevels,currentQuality:d.currentQuality}),function(e,t){var n=(0,r.sE)(e[t],(function(e){return e.active})),i=[];Object.keys(e).forEach((function(r){r===t?i.push(n):i.push(e[r][0])})),Array.isArray(i)&&pe(i);d.trigger(T.j0,{tracks:d.audioTracks,currentTrack:d.currentAudioIndex})}(a,(0,x.id)(n.language)),le(d.currentAudioIndex),n.mimeType.indexOf("audio")>-1&&(o="audio"),d.trigger(T.oZ,{mediaType:o})}}function de(e){d.shakaLevels=e,d.shakaLevels.sort((function(e,t){return e.height<t.height||e.bandwidth<t.bandwidth?1:-1}));var t=(0,b.c3)(d.shakaLevels),n=(0,b.s_)(d.shakaLevels);d.jwLevels=d.shakaLevels.reduce((function(e,r){return n&&(r.label=null),e.push({shakaId:r.id,bitrate:r.bandwidth,label:z(r,t),height:r.height,width:r.width}),e}),[]),d.shakaLevels.length>1&&d.jwLevels.unshift({label:"Auto",shakaId:"auto"})}function fe(e,t){return(0,r.hj)(e)&&!(0,r.i2)(e)&&e>=0&&e<(0,r.dp)(t)}function he(){return fe(d.currentAudioIndex,d.audioTracks)?d.currentAudioIndex:-1}function pe(e){var t,n;Array.isArray(e)&&(d.shakaAudioTracks=e,d.audioTracks=(t=e).map((function(e,n){var i=e.language,a=(0,r.ar)(t,{language:i}).length>1,o=!!e.label&&(0,r.ar)(t,{label:e.label}).length>1,s=(0,x.id)(i);return"und"===i?s="Unknown":"dv"===i&&(s="Audio Description"),a&&!o?s=e.label?e.label:(0,x.id)(i):a&&o&&(s+=" ("+(0,b._T)(e.bandwidth)+" kbps)"),{autoselect:!1,defaulttrack:!!e.active,groupid:e.primary?"default":"",language:e.language,name:s,shakaIndex:n,shakaId:e.id}})),d.currentAudioIndex=fe(d.currentAudioIndex,d.audioTracks)?d.currentAudioIndex:((n=(0,r.sE)(d.audioTracks,(function(e){return e.defaulttrack&&"dv"!==e.language})))||(n=(0,r.sE)(d.audioTracks,(function(e){return"dv"!==e.language}))),n?n.shakaIndex:0))}function ge(){d.livePausedItem=d.service.loadedItem,d.service.unload()}function me(){$(),d.service&&(d.service.setLoadedItem(null),d.service.unload()),g=null}function ve(e){d.tracksByLabel&&d.tracksByLang&&d.audioTracks&&Object.keys(d.tracksByLabel).length!==Object.keys(d.tracksByLang).length?de(d.tracksByLabel[d.audioTracks[d.currentAudioIndex].name]):d.tracksByLang&&d.audioTracks&&de(d.tracksByLang[d.audioTracks[d.currentAudioIndex].language]),ue(e),d.currentQuality=e}function ye(e){var t=m.getTextTracks(),n=d.getSubtitlesTrack();if(n<0){var i=(0,r._e)(t,{active:!0});n=(0,r.cq)(t,i)}var a=t[n];if(a){var o,s=(0,r._e)(d._tracksById,{language:a.language});o=s?s._id:a.kind+"s"+n,e.forEach((function(e){l.Browser.ie?e.align="middle":e.align="center",d.addVTTCue({type:a.kind+"s",cue:e,track:o})}))}return[]}d.video=n,d.drmUsed=null,d.position=0,d.levels=[],d.currentQuality=-1,d.supportsPlaybackRate=!0,d.service=null,d.adaptationId=-1,d.adaptationTs=-1,d.pollAdaptation=!1,d.livePausedItem=null,d.jwLevels=[],d.state=T.bc,(0,r.S6)(k.Z,(function(e,t){h[t]=e.bind(d)})),d.checkAdaptation=function(){var e=n.videoWidth,t=n.videoHeight,i=m.getStats(),a=i.width,o=i.height;d.shakaLevels||ce();var s=d.service.getVariantHistory(d.adaptationTs);if(s.length){var u=-1===d.adaptationTs,l=(0,r.sE)(d.jwLevels,(function(n){return s.some((function(r){var i=r.id===n.shakaId&&(n.width===e&&n.height===t||null===n.width);return i&&(d.adaptationTs=r.timestamp),i}))}));if(l&&l.shakaId!==d.adaptationId){d.adaptationId=l.shakaId,d.pollAdaptation=!1;var c=d.jwLevels.indexOf(l),f=l.label,h=l.bitrate,p=d.service.abrEnabled(),g=p?"auto":"manual",v=p?"auto":"api";u&&(v="initial choice"),d.trigger(T.ug,{level:{index:c,label:f,bitrate:h,width:a,height:o},bandwidth:i.estimatedBandwidth,mode:g,reason:v})}}else d.pollAdaptation=!1},(0,r.l7)(d,f.ZP,A.Z,I.Z,C.Z,{seeking:!1,eventsOn_:function(){m||(m=re(n)),U()},eventsOff_:function(){if(!o||!l.Browser.firefox)return Q();d.remove(),d.setContainer(d.container)},init:function(e){Ie(e.sources[0].onXhrOpen),d.currentAudioIndex=-1,d.adaptationId=-1,d.adaptationTs=-1},preload:function(e){var t="auto"===e.preload?a.i0:a.pR;m||(m=re(n));d.service.setMaxBuffer(t),$(),U(),g=ae(e)},load:function(e){$(),m&&n.src||(d.destroy(),m=re(n),d.service.setLoadedItem(null));if(U(),d.service.setMaxBuffer(a.i0),d.setState(T.ik),d.service.getLoadedItem()!==e)return d.adaptationId=-1,d.adaptationTs=-1,d.drmUsed=null,g=ae(e),n.play(),g;return ie(e.tracks),g},pause:function(){m&&m.isLive()&&!d.service.isDvr()&&!d.livePausedItem&&(ge(),d.setState(T._5));n.pause()},getQualityLevels:function(){return(0,r.UI)(d.jwLevels,(function(e){return(0,i.Z)(e)}))},getCurrentQuality:function(){return d.currentQuality},getAudioTracks:function(){if(!Array.isArray(d.audioTracks))return[];return d.audioTracks},getCurrentAudioTrack:he,play:function(){var e=d.livePausedItem;e&&(d.livePausedItem=null,d.load(e));return n.play()||(0,M.Z)(n)},seek:function(e){var t=d.getSeekRange(),n=t.end,i=t.start,a=e<0?n-i+e:e,o=d.getDuration(),s=this.video.currentTime;if(d.trigger(T.NZ,{position:d.getCurrentTime(),offset:a,duration:o,currentTime:s,seekRange:t,metadata:{currentTime:s}}),d.seeking=!0,d.service.seek(e),0!==o&&o!==1/0&&(0,r.qh)(o)){var u=this.video.currentTime;d.trigger(T.R2,{position:d.getCurrentTime(),duration:o,currentTime:u,seekRange:t,metadata:{currentTime:u}})}},setCurrentQuality:function(e){fe(e,d.jwLevels)&&e!==d.currentQuality&&(ve(e),d.trigger(T.aM,{currentQuality:e,levels:d.jwLevels}))},setAudioTracks:function(e){Array.isArray(e)&&(pe(e),d.trigger(T.j0,{tracks:d.audioTracks,currentTrack:d.currentAudioIndex}))},setCurrentAudioTrack:function(e){var t;fe(e,d.audioTracks)&&(t=e,d.currentAudioIndex=t,fe(t,d.audioTracks)&&le(d.currentAudioIndex),d.trigger(T.j0,{tracks:d.audioTracks,currentTrack:e}),d.trigger(T._B,{tracks:d.audioTracks,currentTrack:e}))},setPlaybackRate:function(e){d.service&&d.service.setPlaybackRate(e)},getPlaybackRate:function(){return d.service?d.service.getPlaybackRate():1},isLive:function(){return!!d.service&&d.service.isLive()},getCurrentTime:function(){return d.service?d.service.getCurrentTime():0},getDuration:function(){return d.service?d.service.getDuration():0},getSeekRange:function(){return d.service?d.service.getSeekRange():{start:0,end:0}},getLiveLatency:function(){var e=null,t=this.service.getSeekRange().end;return d.isLive()&&t&&(e=t-n.currentTime),e},setVisibility:function(e){(e=!!e)?(0,w.oB)(d.container,{visibility:"visible",opacity:1}):(0,w.oB)(d.container,{visibility:"",opacity:0}
10)},stop:function(){me(),n.pause(),d.setState(T.bc)},setShakaPlayer:function(e){m=e},destroy:Q,supportsFullscreen:(0,r.a9)(!0),getName:(0,r.a9)({name:"shaka"}),renderNatively:(c=t.renderCaptionsNatively,l.Browser.chrome&&c),setSubtitlesTrack:function(e){C.Z.setSubtitlesTrack.call(d,e);var n=m.getTextTracks()[e-1];d.renderNatively||(d._currentTextTrackIndex=e-1),n&&(m.selectTextLanguage(n.language,Array.isArray(n.roles)&&n.roles.length?n.roles[0]:""),t.selectedCaptionCode=n.language),ve(d.currentQuality)},getBandwidthEstimate:function(){return m?m.getStats().estimatedBandwidth:null}}),h.loadeddata=function(){d.checkAdaptation(),[].forEach.call(n.textTracks,(function(e){if("Shaka Player TextTrack"===e.label)return e.inuse=!1,e.mode="hidden",void(e.embedded=!0)}))},h.timeupdate=function(){d.pollAdaptation&&d.checkAdaptation(),k.Z.timeupdate.call(d)},h.waiting=te,h.ratechange=function(){if(0===n.playbackRate&&0!==n.defaultPlaybackRate){if(n.duration-n.currentTime<.4)return void k.Z.ended.call(d);te()}else k.Z.ratechange.call(d)}}(0,r.l7)(Ce.prototype,S.Z),Ce.getName=(0,r.a9)({name:"shaka"});var Me=Ce},1123:function(e,t){ 11/* 12 @license 13 Shaka Player 14 Copyright 2016 Google LLC 15 SPDX-License-Identifier: Apache-2.0 16*/ 17!function(){var e="undefined"!=typeof window?window:global,n={};for(var r in function(e,t,n){var r;function i(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var a="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,n){return e==Array.prototype||e==Object.prototype||(e[t]=n.value),e};var o=function(n){n=["object"==typeof globalThis&&globalThis,n,"object"==typeof e&&e,"object"==typeof self&&self,"object"==typeof t&&t];for(var r=0;r<n.length;++r){var i=n[r];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this);function s(e,t){if(t)e:{for(var n=o,r=e.split("."),i=0;i<r.length-1;i++){var s=r[i];if(!(s in n))break e;n=n[s]}(s=t(i=n[r=r[r.length-1]]))!=i&&null!=s&&a(n,r,{configurable:!0,writable:!0,value:s})}}function u(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function l(e){var t="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return t?t.call(e):{next:i(e)}}function c(e){if(!(e instanceof Array)){e=l(e);for(var t,n=[];!(t=e.next()).done;)n.push(t.value);e=n}return e}s("Symbol",(function(e){function t(e,t){this.g=e,a(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.g};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return function e(i){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(i||"")+"_"+r++,i)}})),s("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var t="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),n=0;n<t.length;n++){var r=o[t[n]];"function"==typeof r&&"function"!=typeof r.prototype[e]&&a(r.prototype,e,{configurable:!0,writable:!0,value:function(){return u(i(this))}})}return e}));var d,f="function"==typeof Object.create?Object.create:function(e){function t(){}return t.prototype=e,new t};if("function"==typeof Object.setPrototypeOf)d=Object.setPrototypeOf;else{var h;e:{var p={};try{p.__proto__={a:!0},h=p.a;break e}catch(e){}h=!1}d=h?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var g=d;function m(e,t){if(e.prototype=f(t.prototype),e.prototype.constructor=e,g)g(e,t);else for(var n in t)if("prototype"!=n)if(Object.defineProperties){var r=Object.getOwnPropertyDescriptor(t,n);r&&Object.defineProperty(e,n,r)}else e[n]=t[n];e.Eg=t.prototype}function v(){this.s=!1,this.l=null,this.h=void 0,this.g=1,this.j=this.m=0,this.D=this.i=null}function y(e){if(e.s)throw new TypeError("Generator is already running");e.s=!0}function b(e,t){e.i={$d:t,fe:!0},e.g=e.m||e.j}function T(e,t,n){return e.g=n,{value:t}}function w(e){e.g=0}function x(e,t,n){e.m=t,null!=n&&(e.j=n)}function E(e){e.m=0,e.j=2}function S(e,t){e.g=t,e.m=0}function k(e){e.m=0;var t=e.i.$d;return e.i=null,t}function A(e){e.D=[e.i],e.m=0,e.j=0}function I(e,t){var n=e.D.splice(0)[0];(n=e.i=e.i||n)?n.fe?e.g=e.m||e.j:null!=n.v&&e.j<n.v?(e.g=n.v,e.i=null):e.g=e.j:e.g=t}function C(e){this.g=new v,this.h=e}function M(e,t,n,r){try{var i=t.call(e.g.l,n);if(!(i instanceof Object))throw new TypeError("Iterator result "+i+" is not an object");
17if(!i.done)return e.g.s=!1,i;var a=i.value}catch(t){return e.g.l=null,b(e.g,t),R(e)}return e.g.l=null,r.call(e.g,a),R(e)}function R(e){for(;e.g.g;)try{var t=e.h(e.g);if(t)return e.g.s=!1,{value:t.value,done:!1}}catch(t){e.g.h=void 0,b(e.g,t)}if(e.g.s=!1,e.g.i){if(t=e.g.i,e.g.i=null,t.fe)throw t.$d;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function D(e){this.next=function(t){return y(e.g),e.g.l?t=M(e,e.g.l.next,t,e.g.u):(e.g.u(t),t=R(e)),t},this.throw=function(t){return y(e.g),e.g.l?t=M(e,e.g.l.throw,t,e.g.u):(b(e.g,t),t=R(e)),t},this.return=function(t){return function(e,t){y(e.g);var n=e.g.l;return n?M(e,"return"in n?n.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),R(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function _(e,t){var n=new D(new C(t));return g&&e.prototype&&g(n,e.prototype),n}function N(e){return function(e){function t(t){return e.next(t)}function n(t){return e.throw(t)}return new Promise((function(r,i){!function e(a){a.done?r(a.value):Promise.resolve(a.value).then(t,n).then(e,i)}(e.next())}))}(new D(new C(e)))}function L(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function P(e,t,n){e instanceof String&&(e=String(e));for(var r=e.length,i=0;i<r;i++){var a=e[i];if(t.call(n,a,i,e))return{ha:i,ze:a}}return{ha:-1,ze:void 0}}function j(e,t,n){if(null==e)throw new TypeError("The 'this' value for String.prototype."+n+" must not be null or undefined");if(t instanceof RegExp)throw new TypeError("First argument to String.prototype."+n+" must not be a regular expression");return e+""}function O(e,t){e instanceof String&&(e+="");var n=0,r=!1,i={next:function(){if(!r&&n<e.length){var i=n++;return{value:t(i,e[i]),done:!1}}return r=!0,{done:!0,value:void 0}}};return i[Symbol.iterator]=function(){return i},i}v.prototype.u=function(e){this.h=e},v.prototype.return=function(e){this.i={return:e},this.g=this.j},v.prototype.v=function(e){this.g=e},s("Promise",(function(e){function t(e){this.h=0,this.i=void 0,this.g=[],this.s=!1;var t=this.j();try{e(t.resolve,t.reject)}catch(e){t.reject(e)}}function n(){this.g=null}function r(e){return e instanceof t?e:new t((function(t){t(e)}))}if(e)return e;n.prototype.h=function(e){if(null==this.g){this.g=[];var t=this;this.i((function(){t.l()}))}this.g.push(e)};var i=o.setTimeout;n.prototype.i=function(e){i(e,0)},n.prototype.l=function(){for(;this.g&&this.g.length;){var e=this.g;this.g=[];for(var t=0;t<e.length;++t){var n=e[t];e[t]=null;try{n()}catch(e){this.j(e)}}}this.g=null},n.prototype.j=function(e){this.i((function(){throw e}))},t.prototype.j=function(){function e(e){return function(r){n||(n=!0,e.call(t,r))}}var t=this,n=!1;return{resolve:e(this.J),reject:e(this.l)}},t.prototype.J=function(e){if(e===this)this.l(new TypeError("A Promise cannot resolve to itself"));else if(e instanceof t)this.N(e);else{e:switch(typeof e){case"object":var n=null!=e;break e;case"function":n=!0;break e;default:n=!1}n?this.H(e):this.m(e)}},t.prototype.H=function(e){var t=void 0;try{t=e.then}catch(e){return void this.l(e)}"function"==typeof t?this.T(t,e):this.m(e)},t.prototype.l=function(e){this.u(2,e)},t.prototype.m=function(e){this.u(1,e)},t.prototype.u=function(e,t){if(0!=this.h)throw Error("Cannot settle("+e+", "+t+"): Promise already settled in state"+this.h);this.h=e,this.i=t,2===this.h&&this.L(),this.D()},t.prototype.L=function(){var e=this;i((function(){if(e.F()){var t=o.console;void 0!==t&&t.error(e.i)}}),1)},t.prototype.F=function(){if(this.s)return!1;var e=o.CustomEvent,t=o.Event,n=o.dispatchEvent;return void 0===n||("function"==typeof e?e=new e("unhandledrejection",{cancelable:!0}):"function"==typeof t?e=new t("unhandledrejection",{cancelable:!0}):(e=o.document.createEvent("CustomEvent")).initCustomEvent("unhandledrejection",!1,!0,e),e.promise=this,e.reason=this.i,n(e))},t.prototype.D=function(){if(null!=this.g){for(var e=0;e<this.g.length;++e)a.h(this.g[e]);this.g=null}};var a=new n;return t.prototype.N=function(e){var t=this.j();e.tc(t.resolve,t.reject)},t.prototype.T=function(e,t){var n=this.j();try{e.call(t,n.resolve,n.reject)}catch(e){n.reject(e)}},t.prototype.then=function(e,n){function r(e,t){return"function"==typeof e?function(t){try{i(e(t))}catch(e){a(e)}}:t}var i,a,o=new t((function(e,t){i=e,a=t}));return this.tc(r(e,i),r(n,a)),o},t.prototype.catch=function(e){return this.then(void 0,e)},t.prototype.tc=function(e,t){function n(){switch(r.h){case 1:e(r.i);break;case 2:t(r.i);break;default:throw Error("Unexpected state: "+r.h)}}
17var r=this;null==this.g?a.h(n):this.g.push(n),this.s=!0},t.resolve=r,t.reject=function(e){return new t((function(t,n){n(e)}))},t.race=function(e){return new t((function(t,n){for(var i=l(e),a=i.next();!a.done;a=i.next())r(a.value).tc(t,n)}))},t.all=function(e){var n=l(e),i=n.next();return i.done?r([]):new t((function(e,t){function a(t){return function(n){o[t]=n,0==--s&&e(o)}}var o=[],s=0;do{o.push(void 0),s++,r(i.value).tc(a(o.length-1),t),i=n.next()}while(!i.done)}))},t})),s("WeakMap",(function(e){function t(e){if(this.g=(u+=Math.random()+1).toString(),e){e=l(e);for(var t;!(t=e.next()).done;)t=t.value,this.set(t[0],t[1])}}function n(){}function r(e){var t=typeof e;return"object"===t&&null!==e||"function"===t}function i(e){if(!L(e,s)){var t=new n;a(e,s,{value:t})}}function o(e){var t=Object[e];t&&(Object[e]=function(e){return e instanceof n?e:(Object.isExtensible(e)&&i(e),t(e))})}if(function(){if(!e||!Object.seal)return!1;try{var t=Object.seal({}),n=Object.seal({}),r=new e([[t,2],[n,3]]);return 2==r.get(t)&&3==r.get(n)&&(r.delete(t),r.set(n,4),!r.has(t)&&4==r.get(n))}catch(e){return!1}}())return e;var s="$jscomp_hidden_"+Math.random();o("freeze"),o("preventExtensions"),o("seal");var u=0;return t.prototype.set=function(e,t){if(!r(e))throw Error("Invalid WeakMap key");if(i(e),!L(e,s))throw Error("WeakMap key fail: "+e);return e[s][this.g]=t,this},t.prototype.get=function(e){return r(e)&&L(e,s)?e[s][this.g]:void 0},t.prototype.has=function(e){return r(e)&&L(e,s)&&L(e[s],this.g)},t.prototype.delete=function(e){return!!(r(e)&&L(e,s)&&L(e[s],this.g))&&delete e[s][this.g]},t})),s("Map",(function(e){function t(){var e={};return e.Sa=e.next=e.head=e}function n(e,t){var n=e.g;return u((function(){if(n){for(;n.head!=e.g;)n=n.Sa;for(;n.next!=n.head;)return n=n.next,{done:!1,value:t(n)};n=null}return{done:!0,value:void 0}}))}function r(e,t){var n=t&&typeof t;"object"==n||"function"==n?a.has(t)?n=a.get(t):(n=""+ ++o,a.set(t,n)):n="p_"+t;var r=e.h[n];if(r&&L(e.h,n))for(var i=0;i<r.length;i++){var s=r[i];if(t!=t&&s.key!=s.key||t===s.key)return{id:n,list:r,index:i,ga:s}}return{id:n,list:r,index:-1,ga:void 0}}function i(e){if(this.h={},this.g=t(),this.size=0,e){e=l(e);for(var n;!(n=e.next()).done;)n=n.value,this.set(n[0],n[1])}}if(function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(l([[t,"s"]]));if("s"!=n.get(t)||1!=n.size||n.get({x:4})||n.set({x:4},"t")!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&"s"==i.value[1]&&!((i=r.next()).done||4!=i.value[0].x||"t"!=i.value[1]||!r.next().done)}catch(e){return!1}}())return e;var a=new WeakMap;i.prototype.set=function(e,t){var n=r(this,e=0===e?0:e);return n.list||(n.list=this.h[n.id]=[]),n.ga?n.ga.value=t:(n.ga={next:this.g,Sa:this.g.Sa,head:this.g,key:e,value:t},n.list.push(n.ga),this.g.Sa.next=n.ga,this.g.Sa=n.ga,this.size++),this},i.prototype.delete=function(e){return!(!(e=r(this,e)).ga||!e.list)&&(e.list.splice(e.index,1),e.list.length||delete this.h[e.id],e.ga.Sa.next=e.ga.next,e.ga.next.Sa=e.ga.Sa,e.ga.head=null,this.size--,!0)},i.prototype.clear=function(){this.h={},this.g=this.g.Sa=t(),this.size=0},i.prototype.has=function(e){return!!r(this,e).ga},i.prototype.get=function(e){return(e=r(this,e).ga)&&e.value},i.prototype.entries=function(){return n(this,(function(e){return[e.key,e.value]}))},i.prototype.keys=function(){return n(this,(function(e){return e.key}))},i.prototype.values=function(){return n(this,(function(e){return e.value}))},i.prototype.forEach=function(e,t){for(var n,r=this.entries();!(n=r.next()).done;)n=n.value,e.call(t,n[1],n[0],this)},i.prototype[Symbol.iterator]=i.prototype.entries;var o=0;return i})),s("Set",(function(e){function t(e){if(this.g=new Map,e){e=l(e);for(var t;!(t=e.next()).done;)this.add(t.value)}this.size=this.g.size}return function(){if(!e||"function"!=typeof e||!e.prototype.entries||"function"!=typeof Object.seal)return!1;try{var t=Object.seal({x:4}),n=new e(l([t]));if(!n.has(t)||1!=n.size||n.add(t)!=n||1!=n.size||n.add({x:4})!=n||2!=n.size)return!1;var r=n.entries(),i=r.next();return!i.done&&i.value[0]==t&&i.value[1]==t&&(!(i=r.next()).done&&i.value[0]!=t&&4==i.value[0].x&&i.value[1]==i.value[0]&&r.next().done)}catch(e){return!1}}()?e:(t.prototype.add=function(e){return e=0===e?0:e,this.g.set(e,e),this.size=this.g.size,this},t.prototype.delete=function(e){return e=this.g.delete(e),this.size=this.g.size,e},t.prototype.clear=function(){this.g.clear(),this.size=0},t.prototype.has=function(e){return this.g.has(e)},t.prototype.entries=function(){return this.g.entries()},t.prototype.values=function(){return this.g.values()},t.prototype.keys=t.prototype.values,t.prototype[Symbol.iterator]=t.prototype.values,t.prototype.forEach=function(e,t){var n=this;this.g.forEach((function(r){return e.call(t,r,r,n)}))},t)})),s("Array.prototype.findIndex",(function(e){return e||function(e,t){return P(this,e,t).ha}})),s("Object.is",(function(e){return e||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}})),s("Array.prototype.includes",(function(e){return e||function(e,t){var n=this;n instanceof String&&(n=String(n));var r=n.length,i=t||0;for(0>i&&(i=Math.max(i+r,0));i<r;i++){var a=n[i];if(a===e||Object.is(a,e))return!0}return!1}}
17)),s("String.prototype.includes",(function(e){return e||function(e,t){return-1!==j(this,e,"includes").indexOf(e,t||0)}})),s("Array.prototype.find",(function(e){return e||function(e,t){return P(this,e,t).ze}})),s("String.prototype.startsWith",(function(e){return e||function(e,t){for(var n=j(this,e,"startsWith"),r=n.length,i=e.length,a=Math.max(0,Math.min(0|t,n.length)),o=0;o<i&&a<r;)if(n[a++]!=e[o++])return!1;return o>=i}})),s("Array.prototype.keys",(function(e){return e||function(){return O(this,(function(e){return e}))}}));var U="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;n<arguments.length;n++){var r=arguments[n];if(r)for(var i in r)L(r,i)&&(e[i]=r[i])}return e};s("Object.assign",(function(e){return e||U})),s("Array.from",(function(e){return e||function(e,t,n){t=null!=t?t:function(e){return e};var r=[],i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];if("function"==typeof i){e=i.call(e);for(var a=0;!(i=e.next()).done;)r.push(t.call(n,i.value,a++))}else for(i=e.length,a=0;a<i;a++)r.push(t.call(n,e[a],a));return r}})),s("Array.prototype.values",(function(e){return e||function(){return O(this,(function(e,t){return t}))}})),s("Promise.prototype.finally",(function(e){return e||function(e){return this.then((function(t){return Promise.resolve(e()).then((function(){return t}))}),(function(t){return Promise.resolve(e()).then((function(){throw t}))}))}})),s("Array.prototype.entries",(function(e){return e||function(){return O(this,(function(e,t){return[e,t]}))}})),s("String.prototype.repeat",(function(e){return e||function(e){var t=j(this,null,"repeat");if(0>e||1342177279<e)throw new RangeError("Invalid count value");e|=0;for(var n="";e;)1&e&&(n+=t),(e>>>=1)&&(t+=t);return n}})),s("Object.values",(function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push(e[t]);return n}})),s("Math.log2",(function(e){return e||function(e){return Math.log(e)/Math.LN2}})),s("Object.entries",(function(e){return e||function(e){var t,n=[];for(t in e)L(e,t)&&n.push([t,e[t]]);return n}}));var B=this||self;function F(e,t){var n,r=e.split("."),i=B;r[0]in i||void 0===i.execScript||i.execScript("var "+r[0]);for(;r.length&&(n=r.shift());)r.length||void 0===t?i=i[n]&&i[n]!==Object.prototype[n]?i[n]:i[n]={}:i[n]=t} 18/* 19 @license 20 Shaka Player 21 Copyright 2016 Google LLC 22 SPDX-License-Identifier: Apache-2.0 23*/ 24function V(e){this.i=Math.exp(Math.log(.5)/e),this.h=this.g=0}function H(e,t,n){var r=Math.pow(e.i,t);n=n*(1-r)+r*e.g,isNaN(n)||(e.g=n,e.h+=t)}function K(e){return e.g/(1-Math.pow(e.i,e.h))}function G(){this.h=new V(2),this.i=new V(5),this.g=0}function q(){}function z(){}function X(){}function W(e,t){for(var n=[],r=1;r<arguments.length;++r)n[r-1]=arguments[r];$.has(e)||($.add(e),X.apply(q,c(n)))}function Y(){}G.prototype.getBandwidthEstimate=function(e){return 128e3>this.g?e:Math.min(K(this.h),K(this.i))};var $=new Set;if(e.console&&e.console.log.bind){var J={},Z=(J[1]=console.error.bind(console),J[2]=console.warn.bind(console),J[3]=console.info.bind(console),J[4]=console.log.bind(console),J[5]=console.debug.bind(console),J[6]=console.debug.bind(console),J);X=Z[2],z=Z[1]}function Q(e,t){for(var n=[],r=l(e),i=r.next();!i.done;i=r.next())n.push(t(i.value));return n}var ee=function e(t){var n;return _(e,(function(e){return 1==e.g&&(n=0),3!=e.g?n<t?T(e,n,3):e.v(0):(n++,e.v(2))}))},te=function e(t){var n,r,i,a,o,s;return _(e,(function(e){return 1==e.g&&(n=-1,i=r=void 0,a=l(t),o=a.next()),5!=e.g?o.done?-1==n?e.v(0):T(e,{ha:n,Df:r,item:i,next:void 0},0):(s=o.value,0<=n?T(e,{ha:n,item:i,Df:r,next:s},5):e.v(5)):(n++,r=i,i=s,o=a.next(),e.v(2))}))};function ne(e,t){return!("number"!=typeof e||"number"!=typeof t||!isNaN(e)||!isNaN(t))||e===t}function re(e,t){var n=e.indexOf(t);-1<n&&e.splice(n,1)}function ie(e,t,n){if(n||(n=ne),e.length!=t.length)return!1;t=t.slice();for(var r={},i=(e=l(e)).next();!i.done;r={Tc:r.Tc},i=e.next()){if(r.Tc=i.value,-1==(i=t.findIndex(function(e){return function(t){return n(e.Tc,t)}}(r))))return!1;t[i]=t[t.length-1],t.pop()}return 0==t.length}function ae(e,t,n){if(n||(n=ne),e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function oe(e,t,n){this.startTime=e,this.direction=he,this.endTime=t,this.payload=n,this.region=new Ee,this.position=null,this.positionAlign=ue,this.size=0,this.textAlign=le,this.writingMode=pe,this.lineInterpretation=ge,this.line=null,this.lineHeight="",this.lineAlign=me,this.displayAlign=de,this.fontSize=this.border=this.backgroundImage=this.backgroundColor=this.color="",this.fontWeight=Te,this.fontStyle=we,this.linePadding=this.letterSpacing=this.fontFamily="",this.opacity=1,this.textDecoration=[],this.wrapLine=!0,this.id="",this.nestedCues=[],this.spacer=this.lineBreak=!1,this.cellResolution={columns:32,rows:15}}function se(e,t){if(e.startTime!=t.startTime||e.endTime!=t.endTime||e.payload!=t.payload)return!1;for(var n in e)if("startTime"!=n&&"endTime"!=n&&"payload"!=n)if("nestedCues"==n){if(!ae(e.nestedCues,t.nestedCues,se))return!1}else if("region"==n||"cellResolution"==n){for(var r in e[n])if(e[
24n][r]!=t[n][r])return!1}else if(Array.isArray(e[n])){if(!ae(e[n],t[n]))return!1}else if(e[n]!=t[n])return!1;return!0}oe.prototype.clone=function(){var e,t=new oe(0,0,"");for(e in this)t[e]=this[e],t[e]&&t[e].constructor==Array&&(t[e]=t[e].slice());return t},F("shaka.text.Cue",oe);var ue="auto";oe.positionAlign={LEFT:"line-left",RIGHT:"line-right",CENTER:"center",AUTO:ue};var le="center",ce={LEFT:"left",RIGHT:"right",CENTER:le,START:"start",END:"end"};oe.textAlign=ce;var de="after",fe={BEFORE:"before",CENTER:"center",AFTER:de};oe.displayAlign=fe;var he="ltr";oe.direction={HORIZONTAL_LEFT_TO_RIGHT:he,HORIZONTAL_RIGHT_TO_LEFT:"rtl"};var pe="horizontal-tb";oe.writingMode={HORIZONTAL_TOP_TO_BOTTOM:pe,VERTICAL_LEFT_TO_RIGHT:"vertical-lr",VERTICAL_RIGHT_TO_LEFT:"vertical-rl"};var ge=0;oe.lineInterpretation={LINE_NUMBER:ge,PERCENTAGE:1};var me="start",ve={CENTER:"center",START:me,END:"end"};oe.lineAlign=ve;var ye={white:"#FFF",lime:"#0F0",cyan:"#0FF",red:"#F00",yellow:"#FF0",magenta:"#F0F",blue:"#00F",black:"#000"};oe.defaultTextColor=ye;var be={bg_white:"#FFF",bg_lime:"#0F0",bg_cyan:"#0FF",bg_red:"#F00",bg_yellow:"#FF0",bg_magenta:"#F0F",bg_blue:"#00F",bg_black:"#000"};oe.defaultTextBackgroundColor=be;var Te=400;oe.fontWeight={NORMAL:Te,BOLD:700};var we="normal",xe={NORMAL:we,ITALIC:"italic",OBLIQUE:"oblique"};function Ee(){this.id="",this.regionAnchorY=this.regionAnchorX=this.viewportAnchorY=this.viewportAnchorX=0,this.height=this.width=100,this.viewportAnchorUnits=this.widthUnits=this.heightUnits=Se,this.scroll=ke}oe.fontStyle=xe,oe.textDecoration={UNDERLINE:"underline",LINE_THROUGH:"lineThrough",OVERLINE:"overline"},F("shaka.text.CueRegion",Ee);var Se=1;Ee.units={PX:0,PERCENTAGE:Se,LINES:2};var ke="";function Ae(){}function Ie(e,t){if(!e&&!t)return!0;if(!e||!t||e.byteLength!=t.byteLength)return!1;if(Ce(e)==Ce(t)&&(e.byteOffset||0)==(t.byteOffset||0))return!0;for(var n=Re(e),r=Re(t),i=l(ee(e.byteLength)),a=i.next();!a.done;a=i.next())if(n[a=a.value]!=r[a])return!1;return!0}function Ce(e){return e instanceof ArrayBuffer?e:e.buffer}function Me(e){return e instanceof ArrayBuffer?e:0==e.byteOffset&&e.byteLength==e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function Re(e,t,n){return _e(e,void 0===t?0:t,n=void 0===n?1/0:n,Uint8Array)}function De(e,t,n){return _e(e,void 0===t?0:t,n=void 0===n?1/0:n,DataView)}function _e(e,t,n,r){var i=(e.byteOffset||0)+e.byteLength;return t=Math.max(0,Math.min((e.byteOffset||0)+t,i)),new r(Ce(e),t,Math.min(t+Math.max(n,0),i)-t)}function Ne(e,t){this.g=e,this.h=t}function Le(e,t){var n=new Ne(4,0),r=Oe,i=r.g,a=n.h-i.h;(0<(n.g-i.g||a)?r.i:r.h)(r.g,n,e,t)}function Pe(e,t,n,r){X([n,"has been deprecated and will be removed in",t,". We are currently at version",e,". Additional information:",r].join(" "))}function je(e,t,n,r){z([n,"has been deprecated and has been removed in",t,". We are now at version",e,". Additional information:",r].join(""))}Ee.scrollMode={NONE:ke,UP:"up"},F("shaka.util.BufferUtils",Ae),Ae.toDataView=De,Ae.toUint8=Re,Ae.toArrayBuffer=Me,Ae.equal=Ie,Ne.prototype.toString=function(){return"v"+this.g+"."+this.h};var Oe=null;function Ue(e,t){return e.concat(t)}function Be(){}function Fe(e){return null!=e}function Ve(e){var t=Object.create(e.prototype||Object.prototype);try{var n=e.call(t);n||(Le("Factories requiring new","Factories should be plain functions"),n=t)}catch(t){Le("Factories requiring new","Factories should be plain functions"),n=new e}return n}function He(){}F("shaka.dependencies",He),He.has=function(e){return Ge.has(e)},He.add=function(e,t){if(!Ke[e])throw Error(e+" is not supported");Ge.set(e,(function(){return t}))};var Ke={muxjs:"muxjs"};He.Allowed=Ke;var Ge=new Map([["muxjs",function(){return e.muxjs}]]);function qe(e,t,n,r){for(var i=[],a=3;a<arguments.length;++a)i[a-3]=arguments[a];this.severity=e,this.category=t,this.code=n,this.data=i,this.handled=!1}qe.prototype.toString=function(){return"shaka.util.Error "+JSON.stringify(this,null," ")},F("shaka.util.Error",qe),qe.Severity={RECOVERABLE:1,CRITICAL:2},qe.Category={NETWORK:1,TEXT:2,MEDIA:3,MANIFEST:4,STREAMING:5,DRM:6,PLAYER:7,CAST:8,STORAGE:9,ADS:10},qe.Code={UNSUPPORTED_SCHEME:1e3,BAD_HTTP_STATUS:1001,HTTP_ERROR:1002,TIMEOUT:1003,MALFORMED_DATA_URI:1004,REQUEST_FILTER_ERROR:1006,RESPONSE_FILTER_ERROR:1007,MALFORMED_TEST_URI:1008,UNEXPECTED_TEST_REQUEST:1009,ATTEMPTS_EXHAUSTED:1010,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,INVA
24LID_MP4_CEA:2010,TEXT_COULD_NOT_GUESS_MIME_TYPE:2011,CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS:2012,TEXT_ONLY_WEBVTT_SRC_EQUALS:2013,MISSING_TEXT_PLUGIN:2014,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,CONTENT_TRANSFORMATION_FAILED:3019,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,RESTRICTIONS_CANNOT_BE_MET:4012,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_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,HLS_AES_128_ENCRYPTION_NOT_SUPPORTED:4034,HLS_INTERNAL_SKIP_STREAM:4035,NO_VARIANTS:4036,PERIOD_FLATTENING_FAILED:4037,INCONSISTENT_DRM_ACROSS_PERIODS:4038,HLS_VARIABLE_NOT_FOUND:4039,STREAMING_ENGINE_STARTUP_INVALID_STATE:5006,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,SERVER_CERTIFICATE_REQUIRED:6015,INIT_DATA_TRANSFORM_ERROR:6016,SERVER_CERTIFICATE_REQUEST_FAILED:6017,LOAD_INTERRUPTED:7e3,OPERATION_ABORTED:7001,NO_VIDEO_ELEMENT:7002,OBJECT_DESTROYED:7003,CONTENT_NOT_LOADED:7004,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,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,STORAGE_LIMIT_REACHED:9014,DOWNLOAD_SIZE_CALLBACK_ERROR:9015,CS_IMA_SDK_MISSING:1e4,CS_AD_MANAGER_NOT_INITIALIZED:10001,SS_IMA_SDK_MISSING:10002,SS_AD_MANAGER_NOT_INITIALIZED:10003,CURRENT_DAI_REQUEST_NOT_FINISHED:10004}; 25/* 26 @license 27 Copyright 2008 The Closure Library Authors 28 SPDX-License-Identifier: Apache-2.0 29*/ 30var ze=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?=[/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/; 31/* 32 @license 33 Copyright 2006 The Closure Library Authors 34 SPDX-License-Identifier: Apache-2.0 35*/function Xe(e){var t;e instanceof Xe?(We(this,e.Da),this.qb=e.qb,this.Ga=e.Ga,Ye(this,e.Eb),this.xa=e.xa,$e(this,e.g.clone()),this.fb=e.fb):e&&(t=String(e).match(ze))?(We(this,t[1]||"",!0),this.qb=Je(t[2]||""),this.Ga=Je(t[3]||"",!0),Ye(this,t[4]),this.xa=Je(t[5]||"",!0),$e(this,t[6]||"",!0),this.fb=Je(t[7]||"")):this.g=new at(null)}function We(e,t,n){e.Da=n?Je(t,!0):t,e.Da&&(e.Da=e.Da.replace(/:$/,""))}function Ye(e,t){if(t){if(t=Number(t),isNaN(t)||0>t)throw Error("Bad port number "+t);e.Eb=t}else e.Eb=null}function $e(e,t,n){t instanceof at?e.g=t:(n||(t=Ze(t,rt)),e.g=new at(t))}function Je(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Ze(e,t,n){return null!=e?(e=encodeURI(e).replace(t,Qe),n&&(e=e.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e):null}function Qe(e){return"%"+((e=e.charCodeAt(0))>>4&15).toString(16)+(15&e).toString(16)}(r=Xe.prototype).Da="",r.qb="",r.Ga="",r.Eb=null,r.xa="",r.fb="",r.toString=function(){var e=[],t=this.Da;if(t&&e.push(Ze(t,et,!0),":"),t=this.Ga){e.push("//");var n=this.qb;n&&e.push(Ze(n,et,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Eb)&&e.push(":",String(t))}return(t=this.xa)&&(this.Ga&&"/"!=t.charAt(0)&&e.push("/"),e.push(Ze(t,"/"==t.charAt(0)?nt:tt,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.fb)&&e.push("#",Ze(t,it)),e.join("")},r.resolve=function(e){var t=this.clone();"data"===t.Da&&(t=new Xe);var n=!!e.Da;n?We(t,e.Da):n=!!e.qb,n?t.qb=e.qb:n=!!e.Ga,n?t.Ga=e.Ga:n=null!=e.Eb;var r=e.xa;if(n)Ye(t,e.Eb);else if(n=!!e.xa){if("/"!=r.charAt(0))if(this.Ga&&!this.xa)r="/"+r;else{var i=t.xa.lastIndexOf("/");-1!=i&&(r=t.xa.substr(0,i+1)+r)}if(".."==r||"."==r)r="";else if(-1!=r.indexOf("./")||-1!=r.indexOf("/.")){i=0==r.lastIndexOf("/",0),r=r.split("/");for(var a=[],o=0;o<r.length;){var s=r[o++];"."==s?i&&o==r.length&&a.push(""):".."==s?((1<a.length||1==a.length&&""!=a[0])&&a.pop(),i&&o==r.length&&a.push("")):(a.push(s),i=!0)}r=a.join("/")}}return n?t.xa=r:n=""!==e.g.toString(),n?$e(t,e.g.clone()):n=!!e.fb,n&&(t.fb=e.fb),t},r.clone=function(){return new Xe(this)};var et=/[#\/\?@]/g,tt=/[#\?:]/g,nt=/[#\?]/g,rt=/[#\?@]/g,it=/#/g;function at(e){this.g=e||null}function ot(e,t){if(0==t.length)return e;var n=t.map((function(e){return new Xe(e)}));return e.map((function(e){return new Xe(e)})).map((function(e){return n.map((function(t){return e.resolve(t)}))}
35)).reduce(Ue,[]).map((function(e){return e.toString()}))}function st(e,t){return{keySystem:e,licenseServerUri:"",distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:t||[],keyIds:new Set}}function ut(e,t){if(1==t.length)return t[0];var n=lt(e,t);if(null!=n)return n;throw new qe(2,4,4025,t)}function lt(e,t){for(var n=l(ft[e]),r=n.next();!r.done;r=n.next()){r=r.value;for(var i=l(t),a=i.next();!a.done;a=i.next())if(a=a.value,r.test(a.trim()))return a.trim()}return e==ct?"":null}(r=at.prototype).ua=null,r.vc=null,r.add=function(e,t){if(!this.ua&&(this.ua={},this.vc=0,this.g))for(var n=this.g.split("&"),r=0;r<n.length;r++){var i=n[r].indexOf("="),a=null;if(0<=i){var o=n[r].substring(0,i);a=n[r].substring(i+1)}else o=n[r];o=decodeURIComponent(o.replace(/\+/g," ")),a=a||"",this.add(o,decodeURIComponent(a.replace(/\+/g," ")))}return this.g=null,(n=this.ua.hasOwnProperty(e)&&this.ua[e])||(this.ua[e]=n=[]),n.push(t),this.vc++,this},r.toString=function(){if(this.g)return this.g;if(!this.ua)return"";var e,t=[];for(e in this.ua)for(var n=encodeURIComponent(e),r=this.ua[e],i=0;i<r.length;i++){var a=n;""!==r[i]&&(a+="="+encodeURIComponent(r[i])),t.push(a)}return this.g=t.join("&")},r.clone=function(){var e=new at;if(e.g=this.g,this.ua){var t,n={};for(t in this.ua)n[t]=this.ua[t].concat();e.ua=n,e.vc=this.vc}return e};var ct="text",dt={Na:"video",bb:"audio",aa:ct,Mb:"image",$f:"application"},ft={audio:[/^vorbis$/,/^opus$/,/^flac$/,/^mp4a/,/^[ae]c-3$/],video:[/^avc/,/^hev/,/^hvc/,/^vp0?[89]/,/^av1$/],text:[/^vtt$/,/^wvtt/,/^stpp/]};function ht(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function pt(e){this.h=e,this.g=void 0}function gt(){}function mt(e){return e?(239==(e=Re(e))[0]&&187==e[1]&&191==e[2]&&(e=e.subarray(3)),(e=(new TextDecoder).decode(e)).includes("�")&&z('Decoded string contains an "unknown character" codepoint. That probably means the UTF8 encoding was incorrect!'),e):""}function vt(e,t,n){if(!e)return"";if(!n&&0!=e.byteLength%2)throw new qe(2,2,2004);var r=Math.floor(e.byteLength/2);n=new Uint16Array(r),e=De(e);for(var i=(r=l(ee(r))).next();!i.done;i=r.next())n[i=i.value]=e.getUint16(2*i,t);return wt.value()(n)}function yt(e){function t(e){return n.byteLength<=e||32<=n[e]&&126>=n[e]}if(!e)return"";var n=Re(e);if(239==n[0]&&187==n[1]&&191==n[2])return mt(n);if(254==n[0]&&255==n[1])return vt(n.subarray(2),!1);if(255==n[0]&&254==n[1])return vt(n.subarray(2),!0);if(0==n[0]&&0==n[2])return vt(e,!1);if(0==n[1]&&0==n[3])return vt(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return mt(e);throw new qe(2,2,2003)}function bt(e){return Me((new TextEncoder).encode(e))}function Tt(e,t){for(var n=new ArrayBuffer(2*e.length),r=new DataView(n),i=l(te(e)),a=i.next();!a.done;a=i.next())a=a.value,r.setUint16(2*a.ha,a.item.charCodeAt(0),t);return n}ht.prototype.resolve=function(){},ht.prototype.reject=function(){},pt.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},F("shaka.util.StringUtils",gt),gt.resetFromCharCode=function(){wt.g=void 0},gt.toUTF16=Tt,gt.toUTF8=bt,gt.fromBytesAutoDetect=yt,gt.fromUTF16=vt,gt.fromUTF8=mt;var wt=new pt((function(){function e(e){try{var t=new Uint8Array(e);return 0<String.fromCharCode.apply(null,t).length}catch(e){return!1}}for(var t={Ua:65536};0<t.Ua;(t={Ua:t.Ua}).Ua/=2)if(e(t.Ua))return function(e){return function(t){for(var n="",r=0;r<t.length;r+=e.Ua)n+=String.fromCharCode.apply(null,t.subarray(r,r+e.Ua));return n}}(t);return null}));function xt(){}function Et(e){return e=Re(e),e=wt.value()(e),btoa(e)}function St(e,t){t=null==t||t;var n=Et(e).replace(/\+/g,"-").replace(/\//g,"_");return t?n:n.replace(/[=]*$/,"")}function kt(t){var n=e.atob(t.replace(/-/g,"+").replace(/_/g,"/"));t=new Uint8Array(n.length);for(var r=(n=l(te(n))).next();!r.done;r=n.next())t[(r=r.value).ha]=r.item.charCodeAt(0);return t}function At(t){for(var n=t.length/2,r=new Uint8Array(n),i=(n=l(ee(n))).next();!i.done;i=n.next())r[i=i.value]=e.parseInt(t.substr(2*i,2),16);return r}function It(e){var t=Re(e);e="";for(var n=(t=l(t)).next();!n.done;n=t.next())1==(n=(n=n.value).toString(16)).length&&(n="0"+n),e+=n;return e}function Ct(e){for(var t=[],n=0;n<arguments.length;++n)t[n]=arguments[n];var r=0,i=l(t);for(n=i.next();!n.done;n=i.next())r+=n.value.byteLength;for(r=new Uint8Array(r),i=0,n=(t=l(t)).next();!n.done;n=t.next())n=n.value,r.set(Re(n),i),i+=n.byteLength;return r}function Mt(){var e=this;this.s=Ge.get("muxjs")(),this.g=new this.s.mp4.Transmuxer({keepOriginalTimestamps:!0}),this.h=null,this.m=[],this.j=[],this.i=[],this.l=!1,this.g.on("data",(function(t){e.j=t.captions,e.i=t.metadata,e.m.push(Ct(t.initSegment,t.data))})),this.g.on("done",(function(){var t={data:Ct.apply(xt,c(e.m)),captions:e.j,metadata:e.i};e.h.resolve(t),e.l=!1}))}function Rt(e,t){if(!Ge.get("muxjs")()||!Dt(e))return!1;
35if(t)return MediaSource.isTypeSupported(_t(t,e));var n=_t("audio",e),r=_t("video",e);return MediaSource.isTypeSupported(n)||MediaSource.isTypeSupported(r)}function Dt(e){return"mp2t"==e.toLowerCase().split(";")[0].split("/")[1]}function _t(e,t){var n=t.replace(/mp2t/i,"mp4");"audio"==e&&(n=n.replace("video","audio"));var r=/avc1\.(66|77|100)\.(\d+)/.exec(n);if(r){var i="avc1.",a=r[1],o=Number(r[2]);i=("66"==a?i+"4200":"77"==a?i+"4d00":i+"6400")+(o>>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function Nt(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function Lt(e,t,n){return e=Nt(e,t),Ge.get("muxjs")()&&Dt(e)?_t(n,e):e}function Pt(e){var t=(e=e.split("."))[0];return e.pop(),t}function jt(e){return(e=e.split(/ *; */)).shift(),(e=e.find((function(e){return e.startsWith("codecs=")})))?e.split("=")[1].replace(/^"|"$/g,""):""}function Ot(e){this.s=null,this.i=e,this.j=this.D=0,this.l=1/0,this.h=this.g=null,this.u="",this.m=new Map}function Ut(e){return!(!Vt[e]&&"application/cea-608"!=e&&"application/cea-708"!=e)}function Bt(e,t,n){if(e.u=t,t=e.m.get(t))for(var r=l(t.keys()),i=r.next();!i.done;i=r.next())(i=t.get(i.value).filter((function(e){return e.endTime<=n})))&&e.i.append(i)}function Ft(e,t,n,r,i){for(var a=n+" "+r,o=new Map,s=(t=l(t)).next();!s.done;s=t.next()){var u=s.value;s=u.stream,u=u.cue,o.has(s)||o.set(s,new Map),o.get(s).has(a)||o.get(s).set(a,[]),u.startTime+=i,u.endTime+=i,u.startTime>=e.j&&u.startTime<e.l&&(o.get(s).get(a).push(u),s==e.u&&e.i.append([u]))}for(a=(i=l(o.keys())).next();!a.done;a=i.next())for(a=a.value,e.m.has(a)||e.m.set(a,new Map),s=(t=l(o.get(a).keys())).next();!s.done;s=t.next())s=s.value,u=o.get(a).get(s),e.m.get(a).set(s,u);e.g=null==e.g?Math.max(n,e.j):Math.min(e.g,Math.max(n,e.j)),e.h=Math.max(e.h,Math.min(r,e.l))}F("shaka.util.Uint8ArrayUtils",xt),xt.concat=Ct,xt.toHex=It,xt.fromHex=At,xt.fromBase64=kt,xt.toBase64=St,xt.toStandardBase64=Et,xt.equal=function(e,t){return Le("shaka.util.Uint8ArrayUtils.equal","Please use shaka.util.BufferUtils.equal instead."),Ie(e,t)},Mt.prototype.destroy=function(){return this.g.dispose(),this.g=null,Promise.resolve()},(new Map).set("codecs","codecs").set("frameRate","framerate").set("bandwidth","bitrate").set("width","width").set("height","height").set("channelsCount","channels"),Ot.prototype.destroy=function(){return this.i=this.s=null,this.m.clear(),Promise.resolve()},Ot.prototype.remove=function(e,t){var n=this;return N((function(r){if(1==r.g)return T(r,Promise.resolve(),2);!n.i||!n.i.remove(e,t)||null==n.g||t<=n.g||e>=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&t<n.h?n.g=t:e>n.g&&t>=n.h&&(n.h=e)),w(r)}))},F("shaka.text.TextEngine",Ot),Ot.prototype.destroy=Ot.prototype.destroy,Ot.findParser=function(e){return Vt[e]},Ot.unregisterParser=function(e){delete Vt[e]},Ot.registerParser=function(e,t){Vt[e]=t};var Vt={};function Ht(e,t){return e=qt(e),t=qt(t),e.split("-")[0]==t.split("-")[0]}function Kt(e,t){e=qt(e),t=qt(t);var n=e.split("-"),r=t.split("-");return n[0]==r[0]&&1==n.length&&2==r.length}function Gt(e,t){e=qt(e),t=qt(t);var n=e.split("-"),r=t.split("-");return 2==n.length&&2==r.length&&n[0]==r[0]}function qt(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Yt.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}
35function zt(e,t){return e=qt(e),(t=qt(t))==e?4:Kt(t,e)?3:Gt(t,e)?2:Kt(e,t)?1:0}function Xt(e){return e.language?qt(e.language):e.audio&&e.audio.language?qt(e.audio.language):e.video&&e.video.language?qt(e.video.language):"und"}function Wt(e,t){for(var n=qt(e),r=new Set,i=l(t),a=i.next();!a.done;a=i.next())r.add(qt(a.value));for(a=(i=l(r)).next();!a.done;a=i.next())if((a=a.value)==n)return a;for(a=(i=l(r)).next();!a.done;a=i.next())if(Kt(a=a.value,n))return a;for(a=(i=l(r)).next();!a.done;a=i.next())if(Gt(a=a.value,n))return a;for(a=(r=l(r)).next();!a.done;a=r.next())if(Kt(n,a=a.value))return a;return null}var Yt=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"]]);function $t(){this.g={}}function Jt(e,t){for(var n in e.g)t(n,e.g[n])}function Zt(e){this.h=e,this.g=null}function Qt(e){this.h=e,this.g=null}function en(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function tn(e){return""!=un().canPlayType(e)}function nn(){return sn("Tizen")}function rn(){return sn("CrKey")}function an(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!nn()}function on(){if(!an())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function sn(e){return(navigator.userAgent||"").includes(e)}function un(){return cn||(ln||(ln=new Qt((function(){cn=null}))),(cn=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(cn=document.createElement("video")),ln.S(1),cn)}(r=$t.prototype).push=function(e,t){this.g.hasOwnProperty(e)?this.g[e].push(t):this.g[e]=[t]},r.get=function(e){return(e=this.g[e])?e.slice():null},r.remove=function(e,t){e in this.g&&(this.g[e]=this.g[e].filter((function(e){return e!=t})),0==this.g[e].length&&delete this.g[e])},r.size=function(){return Object.keys(this.g).length},r.keys=function(){return Object.keys(this.g)},Zt.prototype.S=function(t){var n=this;this.stop();var r=!0,i=null;return this.g=function(){e.clearTimeout(i),r=!1},i=e.setTimeout((function(){r&&n.h()}),1e3*t),this},Zt.prototype.stop=function(){this.g&&(this.g(),this.g=null)},Qt.prototype.Hb=function(){return this.stop(),this.h(),this},Qt.prototype.S=function(e){var t=this;return this.stop(),this.g=new Zt((function(){t.h()})).S(e),this},Qt.prototype.Ba=function(e){var t=this;return this.stop(),this.g=new Zt((function(){t.g.S(e),t.h()})).S(e),this},Qt.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},F("shaka.util.Timer",Qt),Qt.prototype.stop=Qt.prototype.stop,Qt.prototype.tickEvery=Qt.prototype.Ba,Qt.prototype.tickAfter=Qt.prototype.S,Qt.prototype.tickNow=Qt.prototype.Hb;var ln=null,cn=null;function dn(e,t,n,r,i){var a=e.variants;(t.length||n.length)&&(a=function(e,t,n){for(var r={},i=(t=l(t)).next();!i.done;r={ed:r.ed},i=t.next())if(r.ed=i.value,i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.ed)}}(r)),i.length){e=i;break}for(r={},n=l(n),t=n.next();!t.done;r={Qc:r.Qc},t=n.next())if(r.Qc=t.value,t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.Qc)}}(r)),t.length){e=t;break}return e}(a,t,n)),t=function(e){for(var t=new $t,n=(e=l(e)).next();!n.done;n=e.next()){var r=hn(n=n.value);t.push(r,n)}return t}(a=Mn(a,r)),t=function(e){var t=0,n=new Map,r=e.size();return Jt(e,(function(e,i){for(var a=l(i),o=a.next();!o.done;o=a.next()){var s=(o=o.value).video;
35if(s&&s.width&&s.height){s=s.width*s.height*(s.frameRate||1),n.has(s)||n.set(s,new $t);var u=n.get(s);u.push(e,o),u.size()===r&&(t=Math.max(t,s))}}})),t?n.get(t):e}(t);var o=function(e,t){for(var n=l(t),r=n.next();!r.done;r=n.next())if((r=r.value)==Pn||r==jn){if(1==(e=fn(e,r)).size())return e.keys()[0]}else if(r==On)break;return function(e){var t="",n=1/0;return Jt(e,(function(e,r){for(var i=0,a=0,o=l(r),s=o.next();!s.done;s=o.next())i+=s.value.bandwidth||0,++a;(i/=a)<n&&(t=e,n=i)})),t}(e)}(t,i);e.variants=e.variants.filter((function(e){return hn(e)==o}))}function fn(e,t){var n=0,r=new $t;return Jt(e,(function(e,i){for(var a=0,o=0,s=l(i),u=s.next();!u.done;u=s.next())(u=u.value).decodingInfos.length&&(a+=u.decodingInfos[0][t]?1:0,o++);(a/=o)>n?(r.g={},r.push(e,i),n=a):a==n&&r.push(e,i)})),r}function hn(e){var t="";e.video&&(t=Pt(e.video.codecs));var n="";return e.audio&&(n=Pt(e.audio.codecs)),t+"-"+n}function pn(e,t,n){function r(e,t,n){return e>=t&&e<=n}var i=e.video;return!(i&&i.width&&i.height&&(!r(i.width,t.minWidth,Math.min(t.maxWidth,n.width))||!r(i.height,t.minHeight,Math.min(t.maxHeight,n.height))||!r(i.width*i.height,t.minPixels,t.maxPixels))||e&&e.video&&e.video.frameRate&&!r(e.video.frameRate,t.minFrameRate,t.maxFrameRate)||!r(e.bandwidth,t.minBandwidth,t.maxBandwidth))}function gn(e,t){return N((function(n){if(1==n.g)return T(n,mn(t,0<t.offlineSessionIds.length),2);bn(e,t),function(e){e.textStreams=e.textStreams.filter((function(e){return Ut(Nt(e.mimeType,e.codecs))}))}(t),function(e){e.imageStreams=e.imageStreams.filter((function(e){var t=["image/svg+xml","image/png","image/jpeg"];return(sn("Web0S")||nn()||rn())&&t.push("image/webp"),t.includes(e.mimeType)}))}(t),w(n)}))}function mn(e,t){return N((function(n){if(1==n.g)return T(n,vn(e.variants,t),2);e.variants=e.variants.filter((function(e){var t=e.video;return sn("Xbox One")&&t&&(t.width&&1920<t.width||t.height&&1080<t.height)&&t.codecs.includes("avc1.")?(_n(e),!1):((t=e.decodingInfos.some((function(e){return e.supported})))||_n(e),t)})),w(n)}))}function vn(e,t){var n,r,i,a,o,s,u,c,d,f;return N((function(h){if(e.some((function(e){return e.decodingInfos.length})))return h.return();for(n=navigator.mediaCapabilities,r=[],i=function(e,t){var r;return N((function(i){return 1==i.g?(x(i,2),T(i,n.decodingInfo(t),4)):2!=i.g?(r=i.h,e.decodingInfos.push(r),S(i,0)):(k(i),JSON.stringify(t),void w(i))}))},a=l(e),o=a.next();!o.done;o=a.next())for(s=o.value,u=yn(s,t),c=l(u),d=c.next();!d.done;d=c.next())f=d.value,r.push(i(s,f));return T(h,Promise.all(r),0)}))}function yn(e,t){var n=e.audio,r=e.video,i={type:"media-source"};if(r){var a=r.codecs;if(r.codecs.includes(",")){var o=r.codecs.split(",");a="vp9"==(a=ut("video",o))?"vp09.00.10.08":a,o=ut("audio",o),o=Lt(r.mimeType,o,"audio"),i.audio={contentType:o,channels:2,bitrate:e.bandwidth||1,samplerate:1,spatialRendering:!1}}a=Lt(r.mimeType,"vp9"==a?"vp09.00.10.08":a,"video"),i.video={contentType:a,width:r.width||1,height:r.height||1,bitrate:r.bandwidth||e.bandwidth||1,framerate:r.frameRate||1}}n&&(a="ac-3"==n.codecs.toLowerCase()&&nn()?"ec-3":n.codecs,a=Lt(n.mimeType,a,"audio"),i.audio={contentType:a,channels:n.channelsCount||2,bitrate:n.bandwidth||e.bandwidth||1,samplerate:n.audioSamplingRate||1,spatialRendering:n.spatialAudio});var s=(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]);if(!s.length)return[i];a=[],o=new Map;for(var u=(s=l(s)).next();!u.done;u=s.next()){var c=u.value;o.get(c.keySystem)||o.set(c.keySystem,[]),o.get(c.keySystem).push(c)}s=t?"required":"optional",c=t?["persistent-license"]:["temporary"];for(var d=l(o.keys()),f=d.next();!f.done;f=d.next()){var h=f.value;f=Object.assign({},i);var p=o.get(h);for(h={keySystem:h,initDataType:"cenc",persistentState:s,distinctiveIdentifier:"optional",sessionTypes:c},u=(p=l(p)).next();!u.done;u=p.next()){if((u=u.value).initData&&u.initData.length){for(var g=new Set,m=l(u.initData),v=m.next();!v.done;v=m.next())g.add(v.value.initDataType);h.initDataType=u.initData[0].initDataType}u.distinctiveIdentifierRequired&&(h.distinctiveIdentifier="required"),u.persistentStateRequired&&(h.persistentState="required"),u.sessionType&&(h.sessionTypes=[u.sessionType]),n&&(h.audio?h.audio.robustness=h.audio.robustness||u.audioRobustness:h.audio={robustness:u.audioRobustness}),r&&(h.video?h.video.robustness=h.video.robustness||u.videoRobustness:h.video={robustness:u.videoRobustness})}f.keySystemConfiguration=h,a.push(f)}return a}function bn(e,t){t.variants=t.variants.filter((function(t){var n=t.audio;return t=t.video,!(n&&e&&e.audio&&!Tn(n,e.audio)||t&&e&&e.video&&!Tn(t,e.video))}))}function Tn(e,t){return e.mimeType==t.mimeType&&e.codecs.split(".")[0]==t.codecs.split(".")[0]}function wn(e){var t=e.audio,n=e.video,r=t?t.codecs:null,i=n?n.codecs:null,a=[];i&&a.push(i),r&&a.push(r);var o=[];n&&o.push(n.mimeType),t&&o.push(t.mimeType),o=o[0]||null;var s=[];t&&s.push(t.kind),n&&s.push(n.kind),s=s[0]||null;var u=new Set;if(t)for(var c=l(t.roles),d=c.next();!d.done;d=c.next())u.add(d.value);if(n)for(d=(c=l(n.roles)).next();!d.done;d=c.next())u.add(d.value);return e={id:e.id,active:!1,type:"variant",bandwidth:e.bandwidth,language:e.language,label:null,kind:s,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:o,codecs:a.join(", "),audioCodec:r,videoCodec:i,primary:e.primary,roles:Array.from(u),audioR
35oles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null},n&&(e.videoId=n.id,e.originalVideoId=n.originalId,e.width=n.width||null,e.height=n.height||null,e.frameRate=n.frameRate||null,e.pixelAspectRatio=n.pixelAspectRatio||null,e.videoBandwidth=n.bandwidth||null),t&&(e.audioId=t.id,e.originalAudioId=t.originalId,e.channelsCount=t.channelsCount,e.audioSamplingRate=t.audioSamplingRate,e.audioBandwidth=t.bandwidth||null,e.label=t.label,e.audioRoles=t.roles),e}function xn(e){return{id:e.id,active:!1,type:ct,bandwidth:0,language:e.language,label:e.label,kind:e.kind||null,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,codecs:e.codecs||null,audioCodec:null,videoCodec:null,primary:e.primary,roles:e.roles,audioRoles:null,forced:e.forced,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:e.originalId,originalImageId:null}}function En(e){return{id:e.id,active:!1,type:"image",bandwidth:e.bandwidth||0,language:"",label:null,kind:null,width:e.width||null,height:e.height||null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:e.mimeType,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],audioRoles:null,forced:!1,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:e.tilesLayout||null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:e.originalId}}function Sn(e){return e.__shaka_id||(e.__shaka_id=Ln++),e.__shaka_id}function kn(e){var t=In(e);return t.active="disabled"!=e.mode,t.type="text",t.originalTextId=e.id,"captions"==e.kind&&(t.mimeType="application/cea-608"),e.kind&&(t.roles=[e.kind]),"forced"==e.kind&&(t.forced=!0),t}function An(e){var t=In(e);return t.active=e.enabled,t.type="variant",t.originalAudioId=e.id,"main"==e.kind&&(t.primary=!0),e.kind&&(t.roles=[e.kind],t.audioRoles=[e.kind],t.label=e.label),t}function In(e){return{id:Sn(e),active:!1,type:"",bandwidth:0,language:qt(e.language),label:e.label,kind:e.kind,width:null,height:null,frameRate:null,pixelAspectRatio:null,hdr:null,mimeType:null,codecs:null,audioCodec:null,videoCodec:null,primary:!1,roles:[],forced:!1,audioR
35oles:null,videoId:null,audioId:null,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,tilesLayout:null,audioBandwidth:null,videoBandwidth:null,originalVideoId:null,originalAudioId:null,originalTextId:null,originalImageId:null}}function Cn(e){return e.allowedByApplication&&e.allowedByKeySystem}function Mn(e,t){for(var n=e.filter((function(e){return e.audio&&e.audio.channelsCount})),r=new Map,i=(n=l(n)).next();!i.done;i=n.next()){var a=(i=i.value).audio.channelsCount;r.has(a)||r.set(a,[]),r.get(a).push(i)}return 0==(n=Array.from(r.keys())).length?e:(i=n.filter((function(e){return e<=t}))).length?r.get(Math.max.apply(Math,c(i))):r.get(Math.min.apply(Math,c(n)))}function Rn(e,t,n,r){var i=e,a=e.filter((function(e){return e.primary}));a.length&&(i=a);var o=i.length?i[0].language:"";if(i=i.filter((function(e){return e.language==o})),t){var s=Wt(qt(t),e.map((function(e){return e.language})));s&&(i=e.filter((function(e){return qt(e.language)==s})))}if(i=i.filter((function(e){return e.forced==r})),n){if((e=Dn(i,n)).length)return e}else if(e=i.filter((function(e){return 0==e.roles.length})),e.length)return e;return e=i.map((function(e){return e.roles})).reduce(Ue,[]),e.length?Dn(i,e[0]):i}function Dn(e,t){return e.filter((function(e){return e.roles.includes(t)}))}function _n(e){var t=[];return e.audio&&t.push(Nn(e.audio)),e.video&&t.push(Nn(e.video)),t.join(", ")}function Nn(e){return"audio"==e.type?"type=audio codecs="+e.codecs+" bandwidth="+e.bandwidth+" channelsCount="+e.channelsCount+" audioSamplingRate="+e.audioSamplingRate:"video"==e.type?"type=video codecs="+e.codecs+" bandwidth="+e.bandwidth+" frameRate="+e.frameRate+" width="+e.width+" height="+e.height:"unexpected stream type"}var Ln=0,Pn="smooth",jn="powerEfficient",On="bandwidth";function Un(){var e=this;this.j=null,this.i=!1,this.g=new G,navigator.connection&&navigator.connection.addEventListener("change",(function(){if(e.o.useNetworkInformation&&e.i){e.g=new G;var t=e.chooseVariant();t&&e.j(t)}})),this.h=[],this.m=1,this.s=!1,this.o=this.l=null}function Bn(e){var t=e.o.defaultBandwidthEstimate;return navigator.connection&&navigator.connection.downlink&&e.o.useNetworkInformation&&(t=1e6*navigator.connection.downlink),t}function Fn(e,t){return e&&(t=t.filter((function(t){return pn(t,e,{width:1/0,height:1/0})}))),t.sort((function(e,t){return e.bandwidth-t.bandwidth}))}function Vn(e,t){this.h=e,this.g=new Set([e]);for(var n=l(t=t||[]),r=n.next();!r.done;r=n.next())this.add(r.value)}function Hn(e,t){var n;if(!(n=!!e.audio!=!!t.audio||!!e.video!=!!t.video||e.language!=t.language)&&(n=e.audio&&t.audio)){n=e.audio;var r=t.audio;n=!((!(!n.channelsCount||!r.channelsCount||2<n.channelsCount||2<r.channelsCount)||n.channelsCount==r.channelsCount)&&Kn(n,r)&&Gn(n.roles,r.roles))}return!n&&(n=e.video&&t.video)&&(n=!(Kn(n=e.video,r=t.video)&&Gn(n.roles,r.roles))),!n}function Kn(e,t){if(e.mimeType!=t.mimeType)return!1;var n=e.codecs.split(",").map((function(e){return Pt(e)})),r=t.codecs.split(",").map((function(e){return Pt(e)}));if(n.length!=r.length)return!1;n.sort(),r.sort();for(var i=l(ee(n.length)),a=i.next();!a.done;a=i.next())if(n[a=a.value]!=r[a])return!1;return!0}function Gn(e,t){var n=new Set(e),r=new Set(t);if(n.delete("main"),r.delete("main"),n.size!=r.size)return!1;for(var i=(n=l(n)).next();!i.done;i=n.next())if(!r.has(i.value))return!1;return!0}function qn(e){this.g=e,this.h=new zn(e.language,"",e.audio&&e.audio.channelsCount?e.audio.channelsCount:0,"")}function zn(e,t,n,r){this.i=e,this.j=t,this.g=n,this.h=void 0===r?"":r}function Xn(){this.g=$n,this.h=(new Map).set($n,2).set(Yn,1)}function Wn(e,t,n){e.h.set($n,n).set(Yn,t)}(r=Un.prototype).stop=function(){this.j=null,this.i=!1,this.h=[],this.m=1,this.l=null},r.init=function(e){this.j=e},r.chooseVariant=function(){var e=Fn(this.o.restrictions,this.h),t=this.g.getBandwidthEstimate(Bn(this));this.h.length&&!e.length&&(e=[(e=Fn(null,this.h))[0]]);for(var n=e[0]||null,r=(e=l(te(e))).next();!r.done;r=e.next()){var i=r.value;r=i.item;var a=isNaN(this.m)?1:Math.abs(this.m);i=a*(i.next||{bandwidth:1/0}).bandwidth/this.o.bandwidthUpgradeTarget,t>=a*r.bandwidth/this.o.bandwidthDowngradeTarget&&t<=i&&(n=r)}return this.l=Date.now(),n},r.enable=function(){this.i=!0},r.disable=function(){this.i=!1},r.segmentDownloaded=function(e,t){var n=this.g;if(!(16e3>t)){var r=8e3*t/e,i=e/1e3;n.g+=t,H(n.h,i,r),H(n.i,i,r)}
35if(null!=this.l&&this.i)e:{if(this.s){if(Date.now()-this.l<1e3*this.o.switchInterval)break e}else{if(!(128e3<=this.g.g))break e;this.s=!0}n=this.chooseVariant(),this.g.getBandwidthEstimate(Bn(this)),n&&this.j(n)}},r.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.o.defaultBandwidthEstimate)},r.setVariants=function(e){this.h=e},r.playbackRateChanged=function(e){this.m=e},r.configure=function(e){this.o=e},F("shaka.abr.SimpleAbrManager",Un),Un.prototype.configure=Un.prototype.configure,Un.prototype.playbackRateChanged=Un.prototype.playbackRateChanged,Un.prototype.setVariants=Un.prototype.setVariants,Un.prototype.getBandwidthEstimate=Un.prototype.getBandwidthEstimate,Un.prototype.segmentDownloaded=Un.prototype.segmentDownloaded,Un.prototype.disable=Un.prototype.disable,Un.prototype.enable=Un.prototype.enable,Un.prototype.chooseVariant=Un.prototype.chooseVariant,Un.prototype.init=Un.prototype.init,Un.prototype.stop=Un.prototype.stop,Vn.prototype.add=function(e){return!!Hn(this.h,e)&&(this.g.add(e),!0)},Vn.prototype.values=function(){return this.g.values()},qn.prototype.create=function(e){var t=this,n=e.filter((function(e){return Hn(t.g,e)}));return n.length?new Vn(n[0],n):this.h.create(e)},zn.prototype.create=function(e){var t=[];t=function(e,t){var n=Wt(qt(t),e.map((function(e){return Xt(e)})));return n?e.filter((function(e){return n==Xt(e)})):[]}(e,this.i);var n=e.filter((function(e){return e.primary}));for(e=function(e,t){return e.filter((function(e){return!!e.audio&&(t?e.audio.roles.includes(t):0==e.audio.roles.length)}))}(t=t.length?t:n.length?n:e,this.j),e.length&&(t=e),this.g&&((e=Mn(t,this.g)).length&&(t=e)),this.h&&(e=function(e,t){return e.filter((function(e){return!!e.audio&&e.audio.label.toLowerCase()==t.toLowerCase()}))}(t,this.h),e.length&&(t=e)),e=new Vn(t[0]),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,Hn(e.h,n)&&e.add(n);return e};var Yn=0,$n=1;function Jn(e,t){var n={maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4};this.l=null==e.maxAttempts?n.maxAttempts:e.maxAttempts,this.j=null==e.baseDelay?n.baseDelay:e.baseDelay,this.s=null==e.fuzzFactor?n.fuzzFactor:e.fuzzFactor,this.m=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function Zn(e){var t,n;return N((function(r){if(1==r.g){if(e.g>=e.l){if(!e.i)throw new qe(2,7,1010);e.g=1,e.h=e.j}return t=e.g,e.g++,0==t?r.return():(n=e.h*(1+(2*Math.random()-1)*e.s),T(r,new Promise((function(e){new Qt(e).S(n/1e3)})),2))}e.h*=e.m,w(r)}))}function Qn(e,t){this.promise=e,this.i=t,this.g=!1}function er(e){return new Qn(Promise.reject(e),(function(){return Promise.resolve()}))}function tr(){var e=Promise.reject(new qe(2,7,7001));return e.catch((function(){})),new Qn(e,(function(){return Promise.resolve()}))}function nr(e){return new Qn(Promise.resolve(e),(function(){return Promise.resolve()}))}function rr(e){return new Qn(e,(function(){return e.catch((function(){}))}))}function ir(e){return new Qn(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function ar(t,n){for(var r in n=void 0===n?{}:n)Object.defineProperty(this,r,{value:n[r],writable:!0,enumerable:!0});this.defaultPrevented=this.cancelable=this.bubbles=!1,this.timeStamp=e.performance&&e.performance.now?e.performance.now():Date.now(),this.type=t,this.isTrusted=!1,this.target=this.currentTarget=null,this.g=!1}function or(){this.qc=new $t,this.pc=this}function sr(e){var t=new Set;return function e(n){switch(typeof n){case"undefined":case"boolean":case"number":case"string":case"symbol":case"function":return n;default:if(!n||n.buffer&&n.buffer.constructor==ArrayBuffer)return n;if(t.has(n))return null;var r=n.constructor==Array;if(n.constructor!=Object&&!r)return null;t.add(n);var i,a=r?[]:{};for(i in n)a[i]=e(n[i]);return r&&(a.length=n.length),a}}(e)}function ur(e){var t,n={};for(t in e)n[t]=e[t];return n}function lr(){this.g=[]}function cr(e,t){e.g.push(t.finally((function(){re(e.g,t)})))}function dr(e){or.call(this),this.i=!1,this.l=new lr,this.g=new Set,this.h=new Set,this.j=e||null,this.m=!1}function fr(e,t,n,r){n=n||yr;var i=br[e];(!i||n>=i.priority)&&(br[e]={priority:n,Cf:t,Ef:void 0!==r&&r})}function hr(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,
35streamDataCallback:void 0===n?null:n}}function pr(e,t,n,r,i,a,o){e.m&&(n.uris[i]=n.uris[i].replace("http://","https://"));var s=new Xe(n.uris[i]),u=s.Da,l=!1;u||(We(s,u=(u=location.protocol).slice(0,-1)),n.uris[i]=s.toString()),u=u.toLowerCase();var c=(u=br[u])?u.Cf:null;if(!c)return er(new qe(2,1,1e3,s));var d,f=u.Ef,h=null,p=null,g=!1;return rr(Zn(r)).ba((function(){if(e.i)return tr();d=Date.now();var r=c(n.uris[i],n,t,(function(n,r,i){h&&h.stop(),p&&p.S(s/1e3),e.j&&t==vr&&(e.j(n,r),l=!0,o.g=i)}));if(!f)return r;var a=n.retryParameters.connectionTimeout;a&&(h=new Qt((function(){g=!0,r.abort()}))).S(a/1e3);var s=n.retryParameters.stallTimeout;return s&&(p=new Qt((function(){g=!0,r.abort()}))),r})).ba((function(e){return h&&h.stop(),p&&p.stop(),null==e.timeMs&&(e.timeMs=Date.now()-d),{response:e,rf:l}}),(function(s){if(h&&h.stop(),p&&p.stop(),e.i)return tr();if(g&&(s=new qe(1,1,1003,n.uris[i],t)),s instanceof qe){if(7001==s.code)throw s;if(1010==s.code)throw a;if(1==s.severity){var u=new ar("retry",{error:s});return e.dispatchEvent(u),i=(i+1)%n.uris.length,pr(e,t,n,r,i,s,o)}}throw s}))}function gr(){this.g=0}function mr(e,t,n){Qn.call(this,e,t),this.h=n}Qn.prototype.abort=function(){return this.g=!0,this.i()},Qn.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},Qn.prototype.ba=function(e,t){function n(n){return function(s){if(i.g&&n)a.reject(o);else{var u=n?e:t;u?r=function(e,t,n){try{var r=e(t);return r&&r.promise&&r.abort?(n.resolve(r.promise),function(){return r.abort()}):(n.resolve(r),function(){return Promise.resolve(r).then((function(){}),(function(){}))})}catch(e){return n.reject(e),function(){return Promise.resolve()}}}(u,s,a):(n?a.resolve:a.reject)(s)}}}function r(){return a.reject(o),i.abort()}var i=this,a=new ht,o=new qe(2,7,7001);return this.promise.then(n(!0),n(!1)),new Qn(a,(function(){return r()}))},F("shaka.util.AbortableOperation",Qn),Qn.prototype.chain=Qn.prototype.ba,Qn.prototype.finally=Qn.prototype.finally,Qn.all=ir,Qn.prototype.abort=Qn.prototype.abort,Qn.notAbortable=rr,Qn.completed=nr,Qn.aborted=tr,Qn.failed=er,ar.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},ar.prototype.stopImmediatePropagation=function(){this.g=!0},ar.prototype.stopPropagation=function(){},F("shaka.util.FakeEvent",ar),or.prototype.addEventListener=function(e,t){this.qc.push(e,t)},or.prototype.removeEventListener=function(e,t){this.qc.remove(e,t)},or.prototype.dispatchEvent=function(e){var t=this.qc.get(e.type)||[],n=this.qc.get("All");for(n&&(t=t.concat(n)),n=(t=l(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.pc,e.currentTarget=this.pc;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},lr.prototype.destroy=function(){for(var e=[],t=l(this.g),n=t.next();!n.done;n=t.next())(n=n.value).promise.catch((function(){})),e.push(n.abort());return this.g=[],Promise.all(e)},m(dr,or),(r=dr.prototype).Nd=function(e){this.m=e},r.Ff=function(e){this.g.add(e)},r.Wf=function(e){this.g.delete(e)},r.Ke=function(){this.g.clear()},r.Gf=function(e){this.h.add(e)},r.Xf=function(e){this.h.delete(e)},r.Le=function(){this.h.clear()},r.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),this.l.destroy()},r.request=function(e,t){var n=this,r=new gr;if(this.i){var i=Promise.reject(new qe(2,7,7001));return i.catch((function(){})),new mr(i,(function(){return Promise.resolve()}),r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?sr(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=sr(t.uris),i=function(e,t,n){for(var r=nr(void 0),i={},a=(e=l(e.g)).next();!a.done;i={Zc:i.Zc},a=e.next())i.Zc=a.value,r=r.ba(function(e){return function(){return n.body&&(n.body=Me(n.body)),e.Zc(t,n)}}(i));return r.ba(void 0,(function(e){if(e instanceof qe&&7001==e.code)throw e;throw new qe(2,1,1006,e)}))}(this,e,t);var a=i.ba((function(){return pr(n,e,t,new Jn(t.retryParameters,!1),0,null,r)})),o=a.ba((function(t){return function(e,t,n){for(var r=nr(void 0),i={},a=(e=l(e.h)).next();!a.done;i={$c:i.$c},a=e.next())i.$c=a.value,r=r.ba(function(e){return function(){var r=n.response;return r.data&&(r.data=Me(r.data)),e.$c(t,r)}}(i));return r.ba((function(){return n}),(function(e){var t=2;if(e instanceof qe){if(7001==e.code)throw e;t=e.severity}throw new qe(t,1,1007,e)}))}(n,e,t)})),s=Date.now(),u=0;i.promise.then((function(){u=Date.now()-s}),(function(){}));var c=0;a.promise.then((function(){c=Date.now()}),(function(){}));var d=o.ba((function(t){var r=Date.now()-c,i=t.response;return i.timeMs+=u,i.timeMs+=r,t.rf||!n.j||i.fromCache||e!=vr||n.j(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}));return i=new mr(d.promise,(function(){return d.abort()}),r),cr(this.l,i),i},F("shaka.net.NetworkingEngine",dr),dr.prototype.request=dr.prototype.request,dr.prototype.destroy=dr.prototype.destroy,dr.makeRequest=hr,dr.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},dr.prototype.clearAllResponseFilters=dr.prototype.Le,dr.prototype.unregisterResponseFilter=dr.prototype.Xf,dr.prototype.registerResponseFilter=dr.prototype.Gf,dr.prototype.clearAllRequestFilters=dr.prototype.Ke,dr.prototype.unregisterRequestFilter=dr.prototype.Wf,dr.prototype.registerRequestFilter=dr.prototype.Ff,dr.unregisterScheme=function(e){delete br[e]},dr.registerScheme=fr,dr.prototype.setForceHTTPS=dr.prototype.Nd,dr.NumBytesRemainingClass=gr,m(mr,Qn),dr.PendingRequest=mr;var vr=1;dr.RequestType={MANIFEST:0,SEGMENT:vr,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var yr=3;dr.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:yr};var br={};function Tr(e){this.g=!1,this.h=new ht,this.i=e}function wr(e,t){if(e.g){if(t instanceof qe&&7003==t.code)throw t;throw new qe(2,7,7003,t)}}function xr(){this.g=new $t}function Er(e,t,n,r){this.target=e,this.type=t,this.listener=n,this.g=function(e,t){if(null==t)return!1;if("boolean"==typeof t)return t;var n=new Set(["passive","capture"]);return Object.keys(t).filter((function(e){return!n.has(e)})),function(e){var t=Sr;if(null==t){t=!1;try{var n={},r={get:function(){return t=!0,!1}};Object.defineProperty(n,"passive",r),Object.defineProperty(n,"capture",r),r=function(){},e.addEventListener("test",r,n),e.removeEventListener("test",r,n)}catch(e){t=!1}Sr=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.g)}Tr.prototype.destroy=function(){var e=this;return this.g?this.h:(this.g=!0,this.i().then((function(){e.h.resolve()}),(function(){e.h.resolve()})))},(r=xr.prototype).release=function(){this.ob(),this.g=null},r.A=function(e,t,n,r){this.g&&(e=new Er(e,t,n,r),this.g.push(t,e))},r.va=function(e,t,n,r){var i=this;this.A(e,t,(function r(a){i.Ca(e,t,r),n(a)}),r)},r.Ca=function(e,t,n){if(this.g)for(var r=this.g.get(t)||[],i=(r=l(r)).next();!i.done;i=r.next())(i=i.value).target!=e||n!=i.listener&&n||(i.Ca(),this.g.remove(t,i))},r.ob=function(){if(this.g){var e,t=this.g,n=[];for(e in t.g)n.push.apply(n,c(t.g[e]));for(n=(t=l(n)).next();!n.done;n=t.next())n.value.Ca();this.g.g={}}},F("shaka.util.EventManager",xr),xr.prototype.removeAll=xr.prototype.ob,xr.prototype.unlisten=xr.prototype.Ca,xr.prototype.listenOnce=xr.prototype.va,xr.prototype.listen=xr.prototype.A,xr.prototype.release=xr.prototype.release,Er.prototype.Ca=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Sr=void 0;function kr(){}function Ar(e){return new Xe(e=yt(e)).Ga}function Ir(e,t,n){function r(e){De(a).setUint32(o,e.byteLength,!0),o+=4,a.set(Re(e),o),o+=e.byteLength}if(!n||!n.byteLength)throw new qe(2,6,6015);var i;i="string"==typeof t?Tt(t,!0):t,e=Tt(e=yt(e),!0);var a=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),o=0;return r(e),r(i),r(n),a}function Cr(e){for(var t=new Map,n=l(Object.keys(e)),r=n.next();!r.done;r=n.next())r=r.value,t.set(r,e[r]);return t}function Mr(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function Rr(e,t){if(!e&&!t)return!0;
35if(e&&!t||t&&!e)return!1;if(e.size!=t.size)return!1;for(var n=l(e),r=n.next();!r.done;r=n.next()){var i=l(r.value);if(r=i.next().value,i=i.next().value,!t.has(r))return!1;if((r=t.get(r))!=i||null==r)return!1}return!0}function Dr(e,t){var n=this;t=void 0===t?1:t,this.C=e,this.D=new Set,this.g=this.m=null,this.pa=this.T=!1,this.F=0,this.i=null,this.h=new xr,this.j=new Map,this.u=[],this.s=new ht,this.o=null,this.l=function(t){n.s.reject(t),e.onError(t)},this.qa=new Map,this.Y=new Map,this.N=new Qt((function(){return function(e){var t=e.qa,n=e.Y;n.clear(),t.forEach((function(e,t){return n.set(t,e)})),(t=Array.from(n.values())).length&&t.every((function(e){return"expired"==e}))&&e.l(new qe(2,6,6014)),e.C.Gc(Mr(n))}(n)})),this.J=!1,this.H=[],this.L=!1,this.da=new Qt((function(){!function(e){e.j.forEach((function(t,n){var r=t.Dd,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.C.onExpirationUpdated(n.sessionId,i),t.Dd=i)}))}(n)})).Ba(t),this.s.catch((function(){})),this.I=new Tr((function(){return function(e){return N((function(t){switch(t.g){case 1:return e.h.release(),e.h=null,e.s.reject(),e.da.stop(),e.da=null,e.N.stop(),e.N=null,T(t,Gr(e),2);case 2:if(!e.g){t.v(3);break}return x(t,4),T(t,e.g.setMediaKeys(null),6);case 6:S(t,5);break;case 4:k(t);case 5:e.g=null;case 3:e.i=null,e.D.clear(),e.m=null,e.u=[],e.o=null,e.l=function(){},e.C=null,w(t)}}))}(n)}))}function _r(e,t,n){return e.u=n,e.J=0<n.length,Nr(e,t)}function Nr(t,n){var r,i,a,o,s,u,c,d,f,h,p,g;return N((function(m){if(1==m.g){if(r=function(t){if(0==(t=Cr(t.o.clearKeys)).size)return null;var n=[],r=[];t.forEach((function(e,t){var i=At(t),a=At(e);i={kty:"oct",kid:St(i,!1),k:St(a,!1)},n.push(i),r.push(i.kid)})),t=JSON.stringify({keys:n});var i=JSON.stringify({kids:r});return i=[{initData:Re(bt(i)),initDataType:"keyids"}],{keySystem:"org.w3.clearkey",licenseServerUri:"data:application/json;base64,"+e.btoa(t),distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",sessionType:"",initData:i,keyIds:new Set(r)}}(t))for(i=l(n),a=i.next();!a.done;a=i.next())(o=a.value).video&&(o.video.drmInfos=[r]),o.audio&&(o.audio.drmInfos=[r]);for((s=n.some((function(e){return!!(e.video&&e.video.drmInfos.length||e.audio&&e.audio.drmInfos.length)})))||(u=Cr(t.o.servers),function(e,t){var n=[];t.forEach((function(e,t){n.push({keySystem:t,licenseServerUri:e,distinctiveIdentifierRequired:!1,persistentStateRequired:!1,audioRobustness:"",videoRobustness:"",serverCertificate:null,serverCertificateUri:"",initData:[],keyIds:new Set})}));for(var r=l(e),i=r.next();!i.done;i=r.next())(i=i.value).video&&(i.video.drmInfos=n),i.audio&&(i.audio.drmInfos=n)}(n,u)),c=l(n),a=c.next();!a.done;a=c.next())for(d=a.value,f=zr(d),h=l(f),p=h.next();!p.done;p=h.next())Yr(p.value,Cr(t.o.servers),Cr(t.o.advanced||{}));return T(m,vn(n,t.J),2)}return s||Object.keys(t.o.servers).length?(g=Br(t,void 0,n),m.return(s?g:g.catch((function(){})))):(t.T=!0,m.return(Promise.resolve()))}))}function Lr(e){var t,n;return N((function(r){switch(r.g){case 1:if(!e.m||!e.i)return r.return();if(!e.i.serverCertificateUri||e.i.serverCertificate&&e.i.serverCertificate.length){r.v(2);break}return t=hr([e.i.serverCertificateUri],e.o.retryParameters),x(r,3),T(r,e.C.lb.request(5,t).promise,5);case 5:n=r.h,e.i.serverCertificate=Re(n.data),S(r,4);break;case 3:throw new qe(2,6,6017,k(r));case 4:if(e.I.g)return r.return();case 2:return e.i.serverCertificate&&e.i.serverCertificate.length?(x(r,6),T(r,e.m.setServerCertificate(e.i.serverCertificate),8)):r.return();case 8:S(r,0);break;case 6:throw new qe(2,6,6004,k(r).message)}}))}function Pr(e){for(var t=(e.i?e.i.initData:[])||[],n=l(t),r=n.next();!r.done;r=n.next())jr(e,(r=r.value).initDataType,r.initData);for(r=(n=l(e.u)).next();!r.done;r=n.next())Fr(e,r.value);return t.length||e.u.length||e.s.resolve(),e.s}function jr(e,t,n){for(var r=e.j.values(),i=(r=l(r)).next();!i.done;i=r.next())if(Ie(n,i.value.initData)&&!sn("Tizen 2"))return;!function(e,t,n,r){try{var i=e.m.createSession(r)}catch(t){return void e.l(new qe(2,6,6005,t.message))}e.h.A(i,"message",(function(t){e.g&&e.o.delayLicenseRequestUntilPlayed&&e.g.paused&&!e.L?e.H.push(t):Hr(e,t)})),e.h.A(i,"keystatuseschange",(function(t){return Kr(e,t)})),e.j.set(i,{initData:n,loaded:!1,Dd:1/0,Ka:null,type:r});try{n=e.o.initDataTransform(n,t,e.i)}catch(n){return t=n,n instanceof qe||(t=new qe(2,6,6016,n)),void e.l
35(t)}e.o.logLicenseExchange&&St(n),i.generateRequest(t,n).catch((function(t){if(!e.I.g){e.j.delete(i);var n=t.errorCode;if(n&&n.systemCode){var r=n.systemCode;0>r&&(r+=Math.pow(2,32)),r="0x"+r.toString(16)}e.l(new qe(2,6,6006,t.message,t,r))}}))}(e,t,n,e.i.sessionType)}function Or(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function Ur(e){return e=Q(e=e.j.keys(),(function(e){return e.sessionId})),Array.from(e)}function Br(e,t,n){var r,i,a,o,s,u,c,d,f,h,p,g,m;return N((function(v){switch(v.g){case 1:if(r=new Map,n.length){i=function(e,t,n){for(var r=l(t),i=r.next();!i.done;i=r.next()){var a=l(zr(i.value));for(i=a.next();!i.done;i=a.next())i=i.value,n.has(i.keySystem)||n.set(i.keySystem,[]),n.get(i.keySystem).push(i)}if(1==n.size&&n.has(""))throw new qe(2,6,6e3);for(r={},e=l(e.o.preferredKeySystems),i=e.next();!i.done;r={Xc:r.Xc},i=e.next())for(r.Xc=i.value,a=l(t),i=a.next();!i.done;i=a.next())if(i=i.value.decodingInfos.find(function(e){return function(t){return t.supported&&null!=t.keySystemAccess&&t.keySystemAccess.keySystem==e.Xc}}(r)))return i.keySystemAccess;for(e=l([!0,!1]),i=e.next();!i.done;i=e.next())for(r=i.value,a=l(t),i=a.next();!i.done;i=a.next()){var o=l(i.value.decodingInfos);for(i=o.next();!i.done;i=o.next()){var s=i.value;if(s.supported&&s.keySystemAccess){var u=l(i=n.get(s.keySystemAccess.keySystem));for(i=u.next();!i.done;i=u.next())if(!!i.value.licenseServerUri==r)return s.keySystemAccess}}}return null}(e,n,r),v.v(2);break}return T(v,function(e,t){var n,r,i,a,o,s,u,c,d,f,h,p,g,m,v;return N((function(y){switch(y.g){case 1:if(1==t.size&&t.has(""))throw new qe(2,6,6e3);for(r=l(t.values()),i=r.next();!i.done;i=r.next())0==(a=i.value).audioCapabilities.length&&delete a.audioCapabilities,0==a.videoCapabilities.length&&delete a.videoCapabilities;o=l(e.o.preferredKeySystems),s=o.next();case 2:if(s.done){y.v(4);break}if(u=s.value,!t.has(u)){y.v(3);break}return c=t.get(u),x(y,6),T(y,navigator.requestMediaKeySystemAccess(u,[c]),8);case 8:return n=y.h,y.return(n);case 6:k(y);case 7:wr(e.I);case 3:s=o.next(),y.v(2);break;case 4:d=l([!0,!1]),f=d.next();case 9:if(f.done){y.v(11);break}h=f.value,p=l(t.keys()),s=p.next();case 12:if(s.done){f=d.next(),y.v(9);break}if(g=s.value,m=t.get(g),v=m.drmInfos.some((function(e){return!!e.licenseServerUri})),v!=h){y.v(13);break}return x(y,15),T(y,navigator.requestMediaKeySystemAccess(g,[m]),17);case 17:return n=y.h,y.return(n);case 15:k(y);case 16:wr(e.I);case 13:s=p.next(),y.v(12);break;case 11:return y.return(n)}}))}(e,t),3);case 3:i=v.h;case 2:if(!(a=i))throw new qe(2,6,6001);for(wr(e.I),x(v,4),e.D.clear(),o=a.getConfiguration(),s=o.audioCapabilities||[],u=o.videoCapabilities||[],c=l(s),d=c.next();!d.done;d=c.next())f=d.value,e.D.add(f.contentType.toLowerCase());for(h=l(u),d=h.next();!d.done;d=h.next())p=d.value,e.D.add(p.contentType.toLowerCase());if(n.length){var y=a.keySystem,b=r.get(a.keySystem),w=[],E=[],A=[],I=[],C=new Set;Wr(b,w,A,E,I,C);var M=e.J?"persistent-license":"temporary";for(y={keySystem:y,licenseServerUri:w[0],distinctiveIdentifierRequired:b[0].distinctiveIdentifierRequired,persistentStateRequired:b[0].persistentStateRequired,sessionType:b[0].sessionType||M,audioRobustness:b[0].audioRobustness||"",videoRobustness:b[0].videoRobustness||"",serverCertificate:A[0],serverCertificateUri:E[0],initData:I,keyIds:C},w=(b=l(b)).next();!w.done;w=b.next())(w=w.value).distinctiveIdentifierRequired&&(y.distinctiveIdentifierRequired=w.distinctiveIdentifierRequired),w.persistentStateRequired&&(y.persistentStateRequired=w.persistentStateRequired);b=y}else b=a.keySystem,y=t.get(a.keySystem),w=[],E=[],A=[],I=[],C=new Set,Wr(y.drmInfos,w,A,E,I,C),b={keySystem:b,licenseServerUri:w[0],distinctiveIdentifierRequired:"required"==y.distinctiveIdentifier,persistentStateRequired:"required"==y.persistentState,sessionType:y.sessionTypes[0]||"temporary",audioRobustness:(y.audioCapabilities?y.audioCapabilities[0].robustness:"")||"",videoRobustness:(y.videoCapabilities?y.videoCapabilities[0].robustness:"")||"",serverCertificate:A[0],serverCertificateUri:E[0],initData:I,keyIds:C};if(e.i=b,!e.i.licenseServerUri)throw new qe(2,6,6012,e.i.keySystem);return T(v,a.createMediaKeys(),6);case 6:return g=v.h,wr(e.I),e.m=g,e.T=!0,T(v,Lr(e),7);case 7:wr(e.I),S(v,0);break;case 4:if(m=k(v),wr(e.I,m),e.i=null,e.D.clear(),m instanceof qe)throw m;throw new qe(2,6,6002,m.message)}}))}function Fr(e,t){var n,r,i,a,o;return N((function(s){switch(s.g){case 1:try{n=e.m.createSession("persistent-license")}catch(t){return r=new qe(2,6,6005,t.message),e.l(r),s.return(Promise.reject(r))}return e.h.A(n,"message",(function(t){e.g&&e.o.delayLicenseRequestUntilPlayed&&e.g.paused&&!e.L?e.H.push(t):Hr(e,t)})),e.h.A(n,"keystatuseschange",(function(t){return Kr(e,t)})),i={initData:null,loaded:!1,Dd:1/0,Ka:null,type:"persistent-license"},e.j.set(n,i),x(s,2),T(s,n.load(t),4);case 4:return a=s.h,wr(e.I),a?(i.loaded=!0,Xr(e)&&e.s.resolve(),s.return(n)):(e.j.delete(n),e.l(new qe(2,6,6013)),s.return(Promise.resolve()));case 2:o=k(s),wr(e.I,o),e.j.delete(n),e.l(new qe(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}}))}function Vr(e,t,n){return"skd"==t&&(t=n.serverCertificate,e=Ir(e,n=Ar(e),t)),e}function Hr(e,t){var n,r,i,a,o,s,u,c,d,f,h,p;N((function(g){switch(g.g){case 1:return n=t.target,e.o.logLicenseExchange&&St(t.message),r=e.j.get(n),i=e.i.licenseServerUri,a=e.o.advanced[e.i.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(o=hr([i],e.o.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,Or(e.i.keySystem)&&function(e){var t=vt(e.body,!0,!0);if(t.includes("PlayReadyKeyMessage")){for(var n=l((t=(new DOMParser).parseFromString(t,"application/xml")).getElementsByTagName("HttpHeader")),r=n.next();!r.done;r=n.next())r=r.value,e.headers[r.getElementsByTagName("name")[0].textContent]=r.getElementsByTagName("value")[0].textContent;e.body=kt(t.getElementsByTagName("Challenge")[0].textContent)}else e.headers["Content-Type"]="text/xml; charset=utf-8"}(o),s=Date.now(),x(g,2),T(g,e.C.lb.request(2,o).promise,4);case 4:u=g.h,S(g,3);break;case 2:return c=k(g),d=new qe(2,6,6007,c),e.l(d),r&&r.Ka&&r.Ka.reject(d),g.return();case 3:return e.I.g?g.return():(e.F+=(Date.now()-s)/1e3,e.o.logLicenseExchange&&St(u.data),x(g,5),T(g,n.update(u.data),7));case 7:S(g,6);break;case 5:return f=k(g),h=new qe(2,6,6008,f.message),e.l(h),r&&r.Ka&&r.Ka.reject(h),g.return();case 6:p=new ar("drmsessionupdate"),e.C.onEvent(p),r&&(r.Ka&&r.Ka.resolve(),new Qt((function(){r.loaded=!0,Xr(e)&&e.s.resolve()})).S(Jr)),w(g)}}))}function Kr(e,t){var n=t.target,r=e.j.get(n),i=!1;
35n.keyStatuses.forEach((function(t,n){if("string"==typeof n){var a=n;n=t,t=a}if(Or(e.i.keySystem)&&16==n.byteLength&&navigator.userAgent.match(/Edge?\//)){var o=(a=De(n)).getUint32(0,!0),s=a.getUint16(4,!0),u=a.getUint16(6,!0);a.setUint32(0,o,!1),a.setUint16(4,s,!1),a.setUint16(6,u,!1)}"status-pending"!=t&&(r.loaded=!0),"expired"==t&&(i=!0),a=It(n),e.qa.set(a,t)}));var a=n.expiration-Date.now();(0>a||i&&1e3>a)&&r&&!r.Ka&&(e.j.delete(n),n.close().catch((function(){}))),Xr(e)&&(e.s.resolve(),e.N.S(Zr))}function Gr(e){var t;return N((function(n){return t=Array.from(e.j.entries()),e.j.clear(),T(n,Promise.all(t.map((function(t){var n=(t=l(t)).next().value,r=t.next().value;return N((function(t){return 1==t.g?(x(t,2),e.pa||e.u.includes(n.sessionId)||"persistent-license"!==r.type?T(t,function(e){var t;return N((function(n){return 1==n.g?(t=new Promise((function(e,t){new Qt(t).S($r)})),x(n,2),T(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?S(n,0):(k(n),void w(n))}))}(n),5):T(t,n.remove(),5)):2!=t.g?S(t,0):(k(t),void w(t))}))}))),0)}))}function qr(e,t){if(!e.length)return t;if(!t.length)return e;for(var n=[],r=l(e),i=r.next();!i.done;i=r.next()){i=i.value;for(var a=l(t),o=a.next();!o.done;o=a.next())if(o=o.value,i.keySystem==o.keySystem){a=(a=(a=[]).concat(i.initData||[])).concat(o.initData||[]);var s=i.keyIds&&o.keyIds?new Set([].concat(c(i.keyIds),c(o.keyIds))):i.keyIds||o.keyIds;n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||o.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||o.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||o.persistentStateRequired,videoRobustness:i.videoRobustness||o.videoRobustness,audioRobustness:i.audioRobustness||o.audioRobustness,serverCertificate:i.serverCertificate||o.serverCertificate,serverCertificateUri:i.serverCertificateUri||o.serverCertificateUri,initData:a,keyIds:s});break}}return n}function zr(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function Xr(e){return function(e,t){for(var n=l(e),r=n.next();!r.done;r=n.next())if(!t(r.value))return!1;return!0}(e=e.j.values(),(function(e){return e.loaded}))}function Wr(e,t,n,r,i,a){for(var o={},s=(e=l(e)).next();!s.done;o={oa:o.oa},s=e.next()){if(o.oa=s.value,t.includes(o.oa.licenseServerUri)||t.push(o.oa.licenseServerUri),r.includes(o.oa.serverCertificateUri)||r.push(o.oa.serverCertificateUri),o.oa.serverCertificate&&(n.some(function(e){return function(t){return Ie(t,e.oa.serverCertificate)}}(o))||n.push(o.oa.serverCertificate)),o.oa.initData){s={};for(var u=l(o.oa.initData),c=u.next();!c.done;s={jc:s.jc},c=u.next())s.jc=c.value,i.some(function(e){return function(t){var n=e.jc;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&Ie(t.initData,n.initData)}}(s))||i.push(s.jc)}if(o.oa.keyIds)for(u=(s=l(o.oa.keyIds)).next();!u.done;u=s.next())a.add(u.value)}}function Yr(t,n,r){!t.keySystem||"org.w3.clearkey"==t.keySystem&&t.licenseServerUri||(n.size&&(n=n.get(t.keySystem)||"",t.licenseServerUri=n),t.keyIds||(t.keyIds=new Set),(r=r.get(t.keySystem))&&(t.distinctiveIdentifierRequired||(t.distinctiveIdentifierRequired=r.distinctiveIdentifierRequired),t.persistentStateRequired||(t.persistentStateRequired=r.persistentStateRequired),t.videoRobustness||(t.videoRobustness=r.videoRobustness),t.audioRobustness||(t.audioRobustness=r.audioRobustness),t.serverCertificate||(t.serverCertificate=r.serverCertificate),r.sessionType&&(t.sessionType=r.sessionType),t.serverCertificateUri||(t.serverCertificateUri=r.serverCertificateUri)),e.cast&&e.cast.__platform__&&"com.microsoft.playready"==t.keySystem&&(t.keySystem="com.chromecast.playready"))}F("shaka.util.FairPlayUtils",kr),kr.initDataTransform=Ir,kr.defaultGetContentId=Ar,(r=Dr.prototype).destroy=function(){return this.I.destroy()},r.configure=function(e){this.o=e}
35,r.Pb=function(e){var t,n=this;return N((function(r){if(1==r.g)return n.m?(n.g=e,n.h.va(n.g,"play",(function(){for(var e=l(n.H),t=e.next();!t.done;t=e.next())Hr(n,t.value);n.L=!0,n.H=[]})),"webkitCurrentPlaybackTargetIsWireless"in n.g&&n.h.A(n.g,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Gr(n)})),T(r,n.g.setMediaKeys(n.m).catch((function(e){return Promise.reject(new qe(2,6,6003,e.message))})),2)):(n.h.va(e,"encrypted",(function(){n.l(new qe(2,6,6010))})),r.return());wr(n.I),Pr(n),n.i.initData.length||n.u.length||(t=function(e){return jr(n,e.initDataType,Re(e.initData))},n.h.A(n.g,"encrypted",t)),w(r)}))},r.Tb=function(){for(var e=1/0,t=this.j.keys(),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,isNaN(n.expiration)||(e=Math.min(e,n.expiration));return e},r.zc=function(){return Mr(this.Y)};var $r=1,Jr=5,Zr=.5,Qr=new pt((function(){return Me(new Uint8Array([0]))}));function ei(){}function ti(e,t,n,r){var i,a,o,s;return N((function(u){if(1==u.g)return r&&(i=ii[r.toLowerCase()])?u.return(i):(a=ri(e))&&(o=ai[a])?u.return(o):r?u.v(2):T(u,ni(e,t,n),3);if(2!=u.g&&(r=u.h)&&(s=ii[r]))return u.return(s);throw new qe(2,4,4e3,e)}))}function ni(e,t,n){var r,i,a;return N((function(o){return 1==o.g?((r=hr([e],n)).method="HEAD",T(o,t.request(0,r).promise,2)):(i=o.h,a=i.headers["content-type"],o.return(a?a.toLowerCase().split(";").shift():""))}))}function ri(e){return 1==(e=new Xe(e).xa.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}F("shaka.media.ManifestParser",ei),ei.unregisterParserByMime=function(e){delete ii[e]},ei.registerParserByMime=function(e,t){ii[e]=t},ei.registerParserByExtension=function(e,t){ai[e]=t};var ii={},ai={};function oi(e,t){this.R=De(e),this.h=t==ui,this.g=0}function si(){return new qe(2,3,3e3)}(r=oi.prototype).na=function(){return this.g<this.R.byteLength},r.Z=function(){return this.g},r.Xe=function(){return this.R.byteLength},r.$=function(){try{var e=this.R.getUint8(this.g);return this.g+=1,e}catch(e){throw si()}},r.Fb=function(){try{var e=this.R.getUint16(this.g,this.h);return this.g+=2,e}catch(e){throw si()}},r.M=function(){try{var e=this.R.getUint32(this.g,this.h);return this.g+=4,e}catch(e){throw si()}},r.me=function(){try{var e=this.R.getInt32(this.g,this.h);return this.g+=4,e}catch(e){throw si()}},r.nb=function(){try{if(this.h)var e=this.R.getUint32(this.g,!0),t=this.R.getUint32(this.g+4,!0);else t=this.R.getUint32(this.g,!1),e=this.R.getUint32(this.g+4,!1)}catch(e){throw si()}if(2097151<t)throw new qe(2,3,3001);return this.g+=8,t*Math.pow(2,32)+e},r.$a=function(e){if(this.g+e>this.R.byteLength)throw si();var t=Re(this.R,this.g,e);return this.g+=e,t},r.skip=function(e){if(this.g+e>this.R.byteLength)throw si();this.g+=e},r.oe=function(e){if(this.g<e)throw si();this.g-=e},r.seek=function(e){if(0>e||e>this.R.byteLength)throw si();this.g=e},r.ac=function(){for(var e=this.g;this.na()&&0!=this.R.getUint8(this.g);)this.g+=1;return e=Re(this.R,e,this.g-e),this.g+=1,mt(e)},F("shaka.util.DataViewReader",oi),oi.prototype.readTerminatedString=oi.prototype.ac,oi.prototype.seek=oi.prototype.seek,oi.prototype.rewind=oi.prototype.oe,oi.prototype.skip=oi.prototype.skip,oi.prototype.readBytes=oi.prototype.$a,oi.prototype.readUint64=oi.prototype.nb,oi.prototype.readInt32=oi.prototype.me,oi.prototype.readUint32=oi.prototype.M,oi.prototype.readUint16=oi.prototype.Fb,oi.prototype.readUint8=oi.prototype.$,oi.prototype.getLength=oi.prototype.Xe,oi.prototype.getPosition=oi.prototype.Z,oi.prototype.hasMoreData=oi.prototype.na;var ui=1;function li(){this.i=[],this.h=[],this.g=!1}function ci(e){for(var t=gi(e);e.reader.na()&&!e.parser.g;)e.parser.Ic(e.start+t,e.reader,e.partialOkay)}function di(e){for(var t=gi(e),n=e.reader.M(),r=(n=l(ee(n))).next();!r.done&&(e.parser.Ic(e.start+t,e.reader,e.partialOkay),!e.parser.g);r=n.next());}function fi(e){return function(t){e(t.reader.$a(t.reader.R.byteLength-t.reader.Z()))}}function hi(e){for(var t=0,n=(e=l(e)).next();!n.done;n=e.next())t=t<<8|n.value.charCodeAt(0);return t}function pi(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function gi(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}oi.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:ui},(r=li.prototype).box=function(e,t){var n=hi(e);return this.i[n]=mi,this.h[n]=t,this},r.V=function(e,t){var n=hi(e);return this.i[n]=vi,this.h[n]=t,this},r.stop=function(){this.g=!0},r.parse=function(e,t,n){for(e=new oi(e,0),this.g=!1;e.na()&&!this.g;)this.Ic(0,e,t,n)},r.Ic=function(e,t,n,r){var i=t.Z();if(r&&i+8>t.R.byteLength)this.g=!0;else{var a=t.M(),o=t.M(),s=!1;switch(a){case 0:a=t.R.byteLength-i;break;case 1:if(r&&t.Z()+8>t.R.byteLength)return void(this.g=!0);a=t.nb(),s=!0}var u=this.h[o];if(u){var l=null,c=null;if(this.i[o]==vi){if(r&&t.Z()+4>t.R.byteLength)return void(this.g=!0);l=(c=t.M())>>>24,c&=16777215}o=i+a,n&&o>t.R.byteLength&&(o=t.R.byteLength),r&&o>t.R.byteLength?this.g=!0:(r=o-t.Z(),u({parser:this,partialOkay:n||!1,version:l,flags:c,reader:t=new oi(t=0<r?t.$a(r):new Uint8Array(0),0),size:a,start:i+e,has64BitSize:s}))}else t.skip(Math.min(i+a-t.Z(),t.R.byteLength-t.Z()))}},F("shaka.util.Mp4Parser",li),li.headerSize=gi,li.typeToString=pi,li.allData=fi,li.sampleDescription=di,li.children=ci,li.prototype.parseNext=li.prototype.Ic,li.prototype.parse=li.prototype.parse,li.prototype.stop=li.prototype.stop,li.prototype.fullBox=li.prototype.V,li.prototype.box=li.prototype.box;var mi=0,vi=1;
35function yi(e,t,n,r,i){var a=Ti.value(),o=e.subarray(n.start,n.start+n.size),s=De(o),u=new Uint8Array(n.size+a.byteLength);for(u.set(o,0),(o=De(u)).setUint32(4,i),u.set(a,n.size),i=s.getUint32(4),o.setUint32(n.size+16,i),bi(u,0,u.byteLength),i=new Uint8Array(e.byteLength+u.byteLength),n=sn("Xbox One")?n.start:n.start+n.size,a=e.subarray(n),i.set(e.subarray(0,n)),i.set(u,n),i.set(a,n+u.byteLength),r=(e=l(r)).next();!r.done;r=e.next())bi(i,(r=r.value).start,r.size+u.byteLength);return u=De(i,t.start),t=gi(t),e=u.getUint32(t),u.setUint32(t,e+1),i}function bi(e,t,n){0!=(t=(e=De(e,t)).getUint32(0))&&(1==t?(e.setUint32(8,n>>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var Ti=new pt((function(){return new Uint8Array([0,0,0,80,115,105,110,102,0,0,0,12,102,114,109,97,0,0,0,0,0,0,0,20,115,99,104,109,0,0,0,0,99,101,110,99,0,1,0,0,0,0,0,40,115,99,104,105,0,0,0,32,116,101,110,99,0,0,0,0,0,0,1,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}));function wi(e,t,n,r,i){if(r>=i)return null;for(var a=-1,o=-1,s=0;s<n.length;s++)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){a=s;break}for(s=n.length-1;0<=s;s--)if(n[s].some((function(e){return null!=e&&""!=e.g.trim()}))){o=s;break}if(-1===a||-1===o)return null;for(var u=s=!1,l="white",c="black",d=xi(r,i,s,u,l,c);a<=o;a++){for(var f=n[a],h=-1,p=-1,g=0;g<f.length;g++)if(null!=f[g]&&""!==f[g].g.trim()){h=g;break}for(g=f.length-1;0<=g;g--)if(null!=f[g]&&""!==f[g].g.trim()){p=g;break}if(-1===h||-1===p)f=Ei(r,i),e.nestedCues.push(f);else{for(;h<=p;h++)if(g=f[h]){var m=g.l,v=g.i,y=g.j,b=g.h;m==s&&v==u&&y==l&&b==c||(d.payload&&e.nestedCues.push(d),d=xi(r,i,m,v,y,b),s=m,u=v,l=y,c=b),d.payload+=g.g}else d.payload+=" ";d.payload&&e.nestedCues.push(d),a!==o&&(d=Ei(r,i),e.nestedCues.push(d)),d=xi(r,i,s,u,l,c)}}return e.nestedCues.length?{cue:e,stream:t}:null}function xi(e,t,n,r,i,a){return e=new oe(e,t,""),n&&e.textDecoration.push("underline"),r&&(e.fontStyle="italic"),e.color=i,e.backgroundColor=a,e}function Ei(e,t){var n=new oe(e,t,"");return n.lineBreak=!0,n}function Si(e,t,n,r,i){this.g=e,this.l=t,this.i=n,this.h=r,this.j=i}function ki(e,t){this.i=[],this.g=1,this.h=0,this.D=e,this.u=t,this.j=this.m=!1,this.l="white",this.s="black",Ii(this)}function Ai(e,t,n){return wi(new oe(t,n,""),"CC"+(e.D<<1|e.u+1),e.i,t,n)}function Ii(e){Ri(e,0,15),e.g=1}function Ci(e,t,n){if(!(32>n||127<n)){var r="";switch(t){case Di:r=Pi.has(n)?Pi.get(n):String.fromCharCode(n);break;case _i:r=ji.get(n);break;case Ni:e.i[e.g].pop(),r=Oi.get(n);break;case Li:e.i[e.g].pop(),r=Ui.get(n)}r&&e.i[e.g].push(new Si(r,e.m,e.j,e.s,e.l))}}function Mi(e,t,n,r){if(t>=n)for(--r;0<=r;r--)e.i[t+r]=e.i[n+r].map((function(e){return e}));else for(var i=0;i<r;i++)e.i[t+i]=e.i[n+i].map((function(e){return e}))}function Ri(e,t,n){for(var r=0;r<=n;r++)e.i[t+r]=[]}var Di=0,_i=1,Ni=2,Li=3,Pi=new Map([[39,"â"],[42,"á"],[92,"é"],[92,"é"],[94,"Ã"],[95,"ó"],[96,"ú"],[123,"ç"],[124,"÷"],[125,"Ã"],[126,"ñ"],[127,"â"]]),ji=new Map([[48,"®"],[49,"°"],[50,"½"],[51,"¿"],[52,"â¢"],[53,"¢"],[54,"£"],[55,"âª"],[56,"à "],[57,"â "],[58,"è"],[59,"â"],[60,"ê"],[61,"î"],[62,"ô"],[63,"û"]]),Oi=new Map([[32,"Ã"],[33,"Ã"],[34,"Ã"],[35,"Ã"],[36,"Ã"],[37,"ü"],[38,"â"],[39,"¡"],[40,"*"],[41,"'"],[42,"â"],[43,"©"],[44,"â "],[45,"·"],[46,"â"],[47,"â"],[48,"Ã"],[49,"Ã"],[50,"Ã"],[51,"Ã"],[52,"Ã"],[53,"Ã"],[54,"ë"],[55,"Ã"],[56,"Ã"],[57,"ï"],[58,"Ã"],[59,"Ã"],[60,"ù"],[61,"Ã"],[62,"«"],[63,"»"]]),Ui=new Map([[32,"Ã"],[33,"ã"],[34,"Ã"],[35,"Ã"],[36,"ì"],[37,"Ã"],[38,"ò"],[39,"Ã"],[40,"õ"],[41,"{"],[42,"}"],[43,"\\"],[44,"^"],[45,"_"],[46,"|"],[47,"~"],[48,"Ã"],[49,"ä"],[50,"Ã"],[51,"ö"],[52,"Ã"],[53,"Â¥"],[54,"¤"],[55,"â"],[56,"Ã
"],[57,"Ã¥"],[58,"Ã"],[59,"ø"],[60,"â"],[61,"â"],[62,"â"],[63,"â"]]);function Bi(e,t){this.h=Ki,this.s=new ki(e,t),this.i=new ki(e,t),this.l=new ki(e,t),this.g=this.i,this.j=0,this.m=null}function Fi(e,t,n){e.g=e.i;var r=e.g,i=null;return e.h!==qi&&e.h!==zi&&(i=Ai(r,e.j,n),(n=e.i).g=0<n.h?n.h:0,Ri(n,0,15),(n=e.l).g=0<n.h?n.h:0,Ri(n,0,15),r.g=15),e.h=qi,r.h=t,i}function Vi(e){e.h=Gi,e.g=e.l,e.g.h=0}function Hi(e){W("Cea608DataChannel","CEA-608 text mode entered, but is unsupported"),e.g=e.s,e.h=zi}var Ki=0,Gi=1,qi=3,zi=4,Xi="black green blue cyan red yellow magenta black".split(" "),Wi="white green blue cyan red yellow magenta white_italics".split(" ");function Yi(){this.l=!1,this.F=this.J=0,this.H=ra,this.i=[],this.g=this.h=this.j=0,this.D=this.s=!1,this.u="white",this.m="black",$i(this)}function $i(e){e.i=[];for(var t=0;15>t;t++)e.i.push(Ji())}function Ji(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function Zi(e,t){Qi(e)&&(e.i[e.h][e.g]=new Si(t,e.D,e.s,e.m,e.u),e.g++)}function Qi(e){var t=e.g<e.F&&0<=e.g;return e.h<e.J&&0<=e.h&&t}function ea(e,t,n){var r=new oe(e.j,t,"");return r.textAlign=e.H===ta?"left":e.H===na?"right":le,(n=wi(r,"svc"+n,e.i,e.j,t))&&(e.j=t),n}Yi.prototype.isVisible=function(){return this.l};var ta=0,na=1,ra=2;function ia(){this.i=[],this.h=null,this.g=0}function aa(e,t){3===t.type?(e.g=2*(63&t.value)-1,e.h=[]):e.h&&(0<e.g&&(e.h.push(t),e.g--),0===e.g&&(e.i.push(new oa(e.h)),e.h=null,e.g=0))}function oa(e){this.g=0,this.h=e}function sa(e){if(!e.na())throw new qe(2,2,3e3);return e.h[e.g++]}function ua(e){this.i=e,this.h=[null,null,null,null,null,null,null,null],this.g=null}function la(e,t,n,r){if(128<=n&&135>=n)r=7&n,e.h[r]&&(e.g=e.h[r]);else{if(136===n){n=sa(t).value,t=null;for(var i=(n=l(ca(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=ea(i,r,e.i)),$i(i);return t}
35if(137===n)for(t=sa(t).value,n=(t=l(ca(e,t))).next();!n.done;n=t.next())(n=e.h[n.value]).isVisible()||(n.j=r),n.l=!0;else{if(138===n){for(n=sa(t).value,t=null,i=(n=l(ca(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=ea(i,r,e.i)),i.l=!1;return t}if(139===n){for(n=sa(t).value,t=null,i=(n=l(ca(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()?t=ea(i,r,e.i):i.j=r,i.l=!i.l;return t}if(140===n)return da(e,t=sa(t).value,r);if(143===n)return r=da(e,255,r),fa(e),r;if(144===n)t.skip(1),r=sa(t).value,e.g&&(e.g.s=0<(128&r),e.g.D=0<(64&r));else if(145===n)r=sa(t).value,n=sa(t).value,t.skip(1),e.g&&(t=ha((48&n)>>4,(12&n)>>2,3&n),e.g.u=ha((48&r)>>4,(12&r)>>2,3&r),e.g.m=t);else if(146===n)r=sa(t).value,t=sa(t).value,e.g&&((e=e.g).h=15&r,e.g=63&t);else if(151===n)t.skip(1),t.skip(1),r=sa(t).value,t.skip(1),e.g&&(e.g.H=3&r);else if(152<=n&&159>=n){if(n=(15&n)-8,!(i=null!==e.h[n])){var a=new Yi;a.j=r,e.h[n]=a}r=sa(t).value,sa(t),sa(t),a=sa(t).value;var o=sa(t).value;t=sa(t).value,i&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.D=!1,t.s=!1,t.u="white",t.m="black"),(t=e.h[n]).l=0<(32&r),t.J=1+(15&a),t.F=1+(63&o),e.g=e.h[n]}}}return null}oa.prototype.na=function(){return this.g<this.h.length},oa.prototype.Z=function(){return this.g},oa.prototype.skip=function(e){if(this.g+e>this.h.length)throw new qe(2,2,3e3);this.g+=e};var ca=function e(t,n){var r;return _(e,(function(e){return 1==e.g&&(r=0),5!=e.g?8>r?1==(1&n)&&t.h[r]?T(e,r,5):e.v(5):e.v(0):(n>>=1,r++,e.v(2))}))};function da(e,t,n){for(var r=null,i=(t=l(ca(e,t))).next();!i.done;i=t.next()){i=i.value;var a=e.h[i];a.isVisible()&&(r=ea(a,n,e.i)),e.h[i]=null}return r}function fa(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function ha(e,t,n){var r={0:0,1:0,2:1,3:1};return ga[(e=r[e])<<2|(t=r[t])<<1|(n=r[n])]}var pa=new Map([[32," "],[33," "],[37,"â¦"],[42,"Å "],[44,"Å"],[48,"â"],[49,"â"],[50,"â"],[51,"â"],[52,"â"],[53,"â¢"],[57,"â¢"],[58,"Å¡"],[60,"Å"],[61,"â "],[63,"Ÿ"],[118,"â
"],[119,"â
"],[120,"â
"],[121,"â
"],[122,"â"],[123,"â"],[124,"â"],[125,"â"],[126,"â"],[127,"â"]]),ga="black blue green cyan red magenta yellow white".split(" ");function ma(){this.h=[],this.g=[],this.i=new ia,this.l=0,this.u=new Map([["CC1",new Bi(0,0)],["CC2",new Bi(0,1)],["CC3",new Bi(1,0)],["CC4",new Bi(1,1)]]),this.s=this.m=0,this.j=new Map,va(this)}function va(e){e.m=0,e.s=0;for(var t=(e=l(e.u.values())).next();!t.done;t=e.next())(t=t.value).h=2,t.g=t.i,t.m=null,Ii(t.i),Ii(t.l),Ii(t.s)}function ya(e,t){var n=t.type;if(16==(112&t.za)){var r=t.za>>3&1;0===n?e.m=r:e.s=r}if(n=e.u.get("CC"+(n<<1|(n?e.s:e.m)+1)),255===t.za&&255===t.Pa||!t.za&&!t.Pa||!Ta(t.za)||!Ta(t.Pa))return 45<=++e.l&&va(e),null;if(e.l=0,t.za&=127,t.Pa&=127,!t.za&&!t.Pa)return null;if(r=null,16==(112&t.za))e:{var i=t.za;if(r=t.Pa,n.m===(i<<8|r))n.m=null;else if(n.m=i<<8|r,16==(240&i)&&64==(192&r)){i=[11,11,1,2,3,4,12,13,14,15,5,6,7,8,9,10][(7&i)<<1|r>>5&1];var a=(30&r)>>1,o="white",s=!1;if(7>a?o=Wi[a]:7===a&&(s=!0),r=1==(1&r),n.h!==zi){if(a=n.g,n.h===qi&&i!==a.g){var u=1+i-a.h;Mi(a,u,1+a.g-a.h,a.h),Ri(a,0,u-1),Ri(a,i+1,15-i)}a.g=i,n.g.m=r,n.g.j=s,n.g.l=o,n.g.s="black"}}else if(17==(247&i)&&32==(240&r))n.g.m=!1,n.g.j=!1,n.g.l="white",Ci(n.g,Di,32),o=!1,"white_italics"===(i=Wi[(14&r)>>1])&&(i="white",o=!0),n.g.m=1==(1&r),n.g.j=o,n.g.l=i;else if(16==(247&i)&&32==(240&r)||23==(247&i)&&45==(255&r))o="black",0==(7&i)&&(o=Xi[(14&r)>>1]),n.g.s=o;else if(17==(247&i)&&48==(240&r))Ci(n.g,_i,r);else if(18==(246&i)&&32==(224&r))Ci(n.g,1&i?Li:Ni,r);else if(20==(246&i)&&32==(240&r)){switch(r=t.pts,i=null,t.Pa){case 32:Vi(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=Fi(n,2,r);break;case 38:i=Fi(n,3,r);break;case 39:i=Fi(n,4,r);break;case 40:Ci(n.g,Di,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.j=r;break;case 42:Ii(n.s),Hi(n);break;case 43:Hi(n);break;case 44:i=n.i,o=null,n.h!==zi&&(o=Ai(i,n.j,r)),Ri(i,0,15),i=o;break;case 45:i=n.g,n.h!==qi?i=null:(o=Ai(i,n.j,r),Mi(i,(s=i.g-i.h+1)-1,s,i.h),Ri(i,0,s-1),Ri(i,i.g,15-i.g),n.j=r,i=o);break;case 46:Ri(n.l,0,15);break;case 47:i=null,n.h!==zi&&(i=Ai(n.i,n.j,r)),o=n.l,n.l=n.i,n.i=o,Vi(n),n.j=r}r=i;break e}r=null}else i=t.Pa,Ci(n.g,Di,t.za),Ci(n.g,Di,i);return r}function ba(e,t){var n=[];try{for(;t.na();){var r=sa(t).value,i=(224&r)>>5,a=31&r;if(7===i&&0!=a&&(i=63&sa(t).value),0!=i){e.j.has(i)||e.j.set(i,new ua(i));for(var o=e.j.get(i),s=t.Z();t.Z()-s<a;){var u=sa(i=t),l=u.value,c=u.pts;if(16===l)l=l<<16|sa(i).value;if(0<=l&&31>=l){var d=c;if(o.g){var f=o.g;switch(i=null,l){case 8:!Qi(f)||0>=f.g&&0>=f.h||(0>=f.g?(f.g=f.F-1,f.h--):f.g--,f.i[f.h][f.g]=null);break;case 13:if(f.isVisible()&&(i=ea(f,d,o.i)),f.h+1>=f.J){d=f;for(var h=0,p=1;15>p;p++,h++)d.i[h]=d.i[p];for(p=0;1>p;p++,h++)d.i[h]=Ji()}else f.h++;f.g=0;break;case 14:f.isVisible()&&(i=ea(f,d,o.i)),f.i[f.h]=Ji(),f.g=0;break;case 12:f.isVisible()&&(i=ea(f,d,o.i)),$i(f),(d=f).h=0,d.g=0}var g=i}else g=null}else if(128<=l&&159>=l)g=la(o,i,l,c);else{if(4096<=l&&4127>=l)8<=(d=255&l)&&15>=d?i.skip(1):16<=d&&23>=d?i.skip(2):24<=d&&31>=d&&i.skip(3);else if(4224<=l&&4255>=l)128<=(d=255&l)&&135>=d?i.skip(4):136<=d&&143>=d&&i.skip(5);else if(32<=l&&127>=l)i=l,o.g&&Zi(o.g,127===i?"âª":String.fromCharCode(i));else if(160<=l&&255>=l)o.g&&Zi(o.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(i=255&l,o.g)if(pa.has(i)){var m=pa.get(i);Zi(o.g,m)}else Zi(o.g,"_")}else 4256<=l&&4351>=l&&o.g&&Zi(o.g,160!=(255&l)?"_":"[CC]");g=null}(i=g)&&n.push(i)}}}}catch(e){if(!(e instanceof qe&&3e3===e.code))throw e;
35W("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Ta(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function wa(){}var xa=function e(t,n){var r,i,a,o;return _(e,(function(e){if(1==e.g){for(var t=0,s=0,u=0;s<n.length;)2==t&&3==n[s]?t=0:(0==n[s]?t++:t=0,n[u]=n[s],u++),s++;r=s-u,i=0}if(4!=e.g){if(!(i+r<n.length))return e.v(0);for(a=0;255==n[i];)a+=255,i++;for(a+=n[i++],o=0;255==n[i];)o+=255,i++;return o+=n[i++],4!=a?e.v(4):T(e,n.subarray(i,i+o),4)}return i+=o,e.v(2)}))};function Ea(e,t){var n=null,r=null,i=e.M();return 1&t&&e.skip(8),2&t&&e.skip(4),8&t&&(n=e.M()),16&t&&(r=e.M()),{trackId:i,Yd:n,Ne:r}}function Sa(e,t){return{hd:1==t?e.nb():e.M()}}function ka(e,t){return 1==t?(e.skip(8),e.skip(8)):(e.skip(4),e.skip(4)),{timescale:e.M()}}function Aa(e,t,n){var r=e.M(),i=[];1&n&&e.skip(4),4&n&&e.skip(4);for(var a=l(ee(r)),o=a.next();!o.done;o=a.next())o={Jd:null,sampleSize:null,Kc:null},256&n&&(o.Jd=e.M()),512&n&&(o.sampleSize=e.M()),1024&n&&e.skip(4),2048&n&&(o.Kc=0==t?e.M():e.me()),i.push(o);return{Dg:r,pe:i}}function Ia(){this.j=new wa,this.i=new Map,this.h=this.g=0}function Ca(){this.h=new Ia,this.g=new ma}function Ma(e,t){for(var n=e.h.parse(t),r=(n=l(n)).next();!r.done;r=n.next()){var i=r.value,a=Re(i.Bf);if(r=e.g,i=i.pts,181===(a=new oi(a,0)).$()&&49===a.Fb()&&1195456820===a.M()&&3===a.$()){var o=a.$();if(0!=(64&o)){o&=31,a.skip(1);for(var s=0;s<o;s++){var u=a.$(),d=(4&u)>>2,f=a.$(),h=a.$();d&&(0===(u&=3)||1===u?r.h.push({pts:i,type:u,za:f,Pa:h,order:r.h.length}):(r.g.push({pts:i,type:u,value:f,order:r.g.length}),r.g.push({pts:i,type:2,value:h,order:r.g.length})))}}}}return function(e){function t(e,t){return e.pts-t.pts||e.order-t.order}var n=[];e.h.sort(t),e.g.sort(t);for(var r=l(e.h),i=r.next();!i.done;i=r.next())(i=ya(e,i.value))&&n.push(i);for(i=(r=l(e.g)).next();!i.done;i=r.next())aa(e.i,i.value);for(i=(r=l(e.i.i)).next();!i.done;i=r.next())i=ba(e,i.value),n.push.apply(n,c(i));return e.i.i=[],e.h=[],e.g=[],n}(e.g)}function Ra(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Da(e,t,n){return n=void 0===n?0:n,!(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)||t>e.end(e.length-1))&&t+n>=e.start(0)}function _a(e,t){if(!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0))return 0;for(var n=0,r=l(Na(e)),i=r.next();!i.done;i=r.next()){var a=i.value;i=a.start,(a=a.end)>t&&(n+=a-Math.max(i,t))}return n}function Na(e){if(!e)return[];for(var t=[],n=l(ee(e.length)),r=n.next();!r.done;r=n.next())r=r.value,t.push({start:e.start(r),end:e.end(r)});return t}function La(e,t,n,r){var i=this;this.g=e,this.m=n,this.j={},this.J={},this.i=null,this.L=r||function(){},this.l={},this.h=new xr,this.u={},this.D=t,this.F=new ht,this.s=function(e,t){var n=new MediaSource;return e.h.va(n,"sourceopen",(function(){URL.revokeObjectURL(e.H),t.resolve()})),e.H=Wa(n),e.g.src=e.H,n}(this,this.F),this.I=new Tr((function(){return function(e){var t,n,r,i,a,o,s;return N((function(u){if(1==u.g){for(n in t=[],e.l)for(r=e.l[n],i=r[0],e.l[n]=r.slice(0,1),i&&t.push(i.p.catch(Be)),a=l(r.slice(1)),o=a.next();!o.done;o=a.next())o.value.p.reject(new qe(2,7,7003,void 0));for(s in e.i&&t.push(e.i.destroy()),e.m&&t.push(e.m.destroy()),e.u)t.push(e.u[s].destroy());return T(u,Promise.all(t),2)}e.h&&(e.h.release(),e.h=null),e.g&&(e.g.removeAttribute("src"),e.g.load(),e.g=null),e.s=null,e.i=null,e.m=null,e.j={},e.u={},e.D=null,e.l={},w(u)}))}(i)})),this.H=""}function Pa(e,t){e.i||(e.i=new Ot(e.m)),"application/cea-608"!=t&&"application/cea-708"!=t&&(e.i.s=Ve(Vt[t]))}function ja(e){return!e.s||"ended"==e.s.readyState}function Oa(e,t){if(t==ct)var n=e.i.g;else n=!(n=Ba(e,t))||1==n.length&&1e-6>n.end(0)-n.start(0)?null:1==n.length&&0>n.start(0)?0:n.length?n.start(0):null;return n}function Ua(e,t){return t==ct?e.i.h:Ra(Ba(e,t))}function Ba(e,t){try{return e.j[t].buffered}catch(e){return null}}function Fa(e,t,n,r,i,a){var o,s,u,c,d,f,h,p;return N((function(g){return 1==g.g?t==(o=dt).aa?T(g,function(e,t,n,r){var i,a,o;return N((function(s){return 1==s.g?T(s,Promise.resolve(),2):e.s&&e.i?null==n||null==r?(e.s.parseInit(Re(t)),s.return()):(i={periodStart:e.D,segmentStart:n,segmentEnd:r},a=e.s.parseMedia(Re(t),i),o=a.filter((function(t){return t.startTime>=e.j&&t.startTime<e.l})),e.i.append(o),null==e.g&&(e.g=Math.max(n,e.j)),e.h=Math.min(r,e.l),void w(s)):s.return()}))}(e.i,n,r,i),0):e.u[t]?T(g,function(e,t){e.l=!0,e.h=new ht,e.m=[],e.j=[],e.i=[];var n=Re(t);return e.g.push(n),e.g.flush(),e.l&&e.h.reject(new qe(2,3,3018)),e.h}(e.u[t],n),10):a?(e.i||Pa(e,"text/vtt"),null==r&&null==i?e.D.init(n):(s=Ma(e.D,n)).length&&(u=e.j[o.Na].timestampOffset,Ft(e.i,s,r,i,u)),n=Xa(e,n,r,t),T(g,Ka(e,t,(function(){e.j[t].appendBuffer(n)})),0)):(n=Xa(e,n,r,t),T(g,Ka(e,t,(function(){e.j[t].appendBuffer(n)})),0)):(c=g.h,e.i||Pa(e,"text/vtt"),c.metadata&&(d=e.j[t].timestampOffset,e.L(c.metadata,d,i)),c.captions&&c.captions.length&&(f=e.j[o.Na].timestampOffset,h=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())n=n.value,t.push({stream:n.stream,cue:new oe(n.startTime,n.endTime,n.text)});return t}(c.captions),Ft(e.i,h,r,i,f)),p=c.data,p=Xa(e,p,r,t),T(g,Ka(e,t,(function(){e.j[t].appendBuffer(p)})),0))}))}function Va(e,t){return N((function(n){return t==dt.aa?e.i?T(n,e.i.remove(0,1/0),0):n.return():T(n,Ka(e,t,(function(){var n=e.s.duration;0>=n?Ha(e,t):e.j[t].remove(0,n)})),0)}))}function Ha(e,t){var n=e.l[t][0];n&&(n.p.resolve(),qa(e,t))}function Ka(e,t,n){return wr(e.I),n={start:n,p:new ht},e.l[t].push(n),1==e.l[t].length&&za(e,t),n.p}function Ga(e,t){var n,r,i,a,o;return N((function(s){switch(s.g){case 1:for(i in wr(e.I),n=[],r={}
35,e.j)r.Kb=new ht,a={start:function(e){return function(){return e.Kb.resolve()}}(r),p:r.Kb},e.l[i].push(a),n.push(r.Kb),1==e.l[i].length&&a.start(),r={Kb:r.Kb};return x(s,2),T(s,Promise.all(n),4);case 4:S(s,3);break;case 2:throw k(s);case 3:try{t()}catch(e){throw new qe(2,3,3015,e)}finally{for(o in e.j)qa(e,o)}w(s)}}))}function qa(e,t){e.l[t].shift(),za(e,t)}function za(e,t){var n=e.l[t][0];if(n)try{n.start()}catch(r){"QuotaExceededError"==r.name?n.p.reject(new qe(2,3,3017,t)):n.p.reject(new qe(2,3,3015,r)),qa(e,t)}}function Xa(e,t,n,r){var i=e.g.mediaKeys;return null==n&&i&&(nn()||sn("Xbox One"))&&"mp4"==e.J[r].split(";")[0].split("/")[1]&&(t=function(e){function t(){i=!0}function n(e){a.push(e),ci(e)}e=Re(e);var r,i=!1,a=[],o=[];if((new li).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).V("stsd",(function(e){r=e,a.push(e),di(e)})).V("encv",t).V("enca",t).V("avc1",(function(e){o.push({box:e,yd:1701733238})})).V("ec-3",(function(e){o.push({box:e,yd:1701733217})})).V("mp4a",(function(e){o.push({box:e,yd:1701733217})})).parse(e),i)return e;if(0==o.length||!r)throw It(e),new qe(2,3,3019);o.reverse();for(var s=l(o),u=s.next();!u.done;u=s.next())u=u.value,e=yi(e,r,u.box,a,u.yd);return e}(t)),t}Ia.prototype.init=function(e){var t=this,n=[],r=[];if((new li).box("moov",ci).box("mvex",ci).V("trex",(function(e){var n=e.reader;n.skip(4),n.skip(4),e=n.M(),n=n.M(),t.g=e,t.h=n})).box("trak",ci).V("tkhd",(function(e){var t=e.reader;1==e.version?(t.skip(8),t.skip(8),e=t.nb()):(t.skip(4),t.skip(4),e=t.M()),n.push(e)})).box("mdia",ci).V("mdhd",(function(e){e=ka(e.reader,e.version),r.push(e.timescale)})).parse(e,!0),!n.length||!r.length||n.length!=r.length)throw new qe(2,2,2010);n.forEach((function(e,n){t.i.set(e,r[n])}))},Ia.prototype.parse=function(e){var t=this,n=[],r=this.g,i=this.h,a=[],o=null,s=9e4;return(new li).box("moof",ci).box("traf",ci).V("trun",(function(e){a=Aa(e.reader,e.version,e.flags).pe})).V("tfhd",(function(e){e=Ea(e.reader,e.flags),r=e.Yd||t.g,i=e.Ne||t.h,e=e.trackId,t.i.has(e)&&(s=t.i.get(e))})).V("tfdt",(function(e){o=Sa(e.reader,e.version).hd})).box("mdat",(function(e){if(null===o)throw new qe(2,2,2010);e=e.reader;var u=o,c=s,d=r,f=i,h=a,p=0,g=f;for(h.length&&(g=h[0].sampleSize||f);e.na();){var m=e.M();if(6==(31&e.$())){var v=0;h.length>p&&(v=h[p].Kc||0),v=(u+v)/c;for(var y=l(xa(t.j,e.$a(m-1))),b=y.next();!b.done;b=y.next())n.push({Bf:b.value,pts:v})}else e.skip(m-1);0==(g-=m+4)&&(u=h.length>p?u+(h[p].Jd||d):u+d,p++,g=h.length>p&&h[p].sampleSize||f)}})).parse(e,!1),n},Ca.prototype.init=function(e){this.h.init(e)},(r=La.prototype).destroy=function(){return this.I.destroy()},r.init=function(e,t){var n,r,i,a,o,s,u,c=this;return N((function(d){if(1==d.g)return n=dt,T(d,c.F,2);for(r={},i=l(e.keys()),a=i.next();!a.done;r={ra:r.ra},a=i.next())r.ra=a.value,o=e.get(r.ra),s=Nt(o.mimeType,o.codecs),r.ra==n.aa?Pa(c,s):(!t&&MediaSource.isTypeSupported(s)||!Rt(s,r.ra)||(c.u[r.ra]=new Mt,s=_t(r.ra,s)),u=c.s.addSourceBuffer(s),c.h.A(u,"error",function(e){return function(){c.l[e.ra][0].p.reject(new qe(2,3,3014,c.g.error?c.g.error.code:0))}}(r)),c.h.A(u,"updateend",function(e){return function(){return Ha(c,e.ra)}}(r)),c.j[r.ra]=u,c.J[r.ra]=s,c.l[r.ra]=[]);w(d)}))},r.xc=function(){var e={total:Na(this.g.buffered),audio:Na(Ba(this,"audio")),video:Na(Ba(this,"video")),text:[]};if(this.i){var t=this.i.g,n=this.i.h;null!=t&&null!=n&&e.text.push({start:t,end:n})}return e},r.remove=function(e,t,n){var r=this;return N((function(i){return T(i,e==dt.aa?r.i.remove(t,n):Ka(r,e,(function(){n<=t?Ha(r,e):r.j[e].remove(t,n)})),0)}))},r.flush=function(e){var t=this;return N((function(n){return e==dt.aa?n.return():T(n,Ka(t,e,(function(){t.g.currentTime-=.001,Ha(t,e)})),0)}))},r.endOfStream=function(e){var t=this;return N((function(n){return T(n,Ga(t,(function(){ja(t)||(e?t.s.endOfStream(e):t.s.endOfStream())})),0)}))},r.Ja=function(e){var t=this;return N((function(n){return T(n,Ga(t,(function(){t.s.duration=e})),0)}))},r.getDuration=function(){return this.s.duration};var Wa=e.URL.createObjectURL;function Ya(e,t,n){this.ma=e,this.ja=t,this.ea=n}function $a(e,t,n,r,i,a,o,s,u,l,c){l=void 0===l?[]:l,this.startTime=e,this.j=this.endTime=t,this.i=n,this.ja=r,this.ea=i,this.h=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.g=l,this.tilesLayout=void 0===c?"":c}function Ja(e,t,n){this.j=e,this.Jc=t,this.m=this.l=1/0,this.g=1,this.h=this.i=null,this.s=0,this.u=!0,this.D=0,this.F=void 0===n||n,this.H=0}function Za(e,t){this.j=e,this.m=eo(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.s=t,this.i=function(){}}function Qa(e){this.g=e}function eo(e){if(e.g.paused||0==e.g.playbackRate||0==e.g.buffered.length)var t=!1;else e:{t=e.g.currentTime;for(var n=(e=l(Na(e.g.buffered))).next();!n.done;n=e.next())if(!(t<(n=n.value).start-.1||t>n.end-.5)){t=!0;break e}t=!1}return t}function to(e,t,n,r,i){var a=this;this.g=e,this.D=t,this.o=n,this.u=i,this.h=new xr,this.s=!1,this.F=e.readyState,this.j=!1,this.i=r,this.m=!1,this.h.A(e,"waiting",(function(){return no(a)})),this.l=new Qt((function(){no(a)})).Ba(.25)}function no(e){if(0!=e.g.readyState){if(e.g.seeking){if(!e.s)return}else e.s=!1;if(!e.g.paused||0==e.g.currentTime){var t;if(e.g.readyState!=e.F&&(e.j=!1,e.F=e.g.readyState),!(t=!e.i)){var n=(t=e.i).j,r=eo(n),i=n.g.currentTime,a=Date.now()/1e3;t.g==i&&t.m==r||(t.l=a,t.g=i,t.m=r,t.h=!1),(r=(i=a-t.l)>=t.s&&r&&!t.h)&&(t.i(t.g,i),t.h=!0,t.g=n.g.currentTime),t=!r}if(t){var o=e.o.smallGapLimit;if(i=e.g.currentTime,n=function(e,t,n){return!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)?null:0<=(e=Na(e).findIndex((function(e,r,i){return e.start>t&&(0==r||i[r-1].end-t<=n)})))?e:null}(t=e.g.buffered,i,e.o.gapDetectionThreshold),!(null==n||0==n&&!e.m||(r=t.start(n),r>=e.D.Qa()))){o=(a=r-i)<=o;var s=!1;.001>a||(o||e.j||(e.j=!0,(i=new ar("largegap",{currentTime:i,gapSize:a})).cancelable=!0,e.u(i),e.o.jumpLargeGaps&&!i.defaultPrevented&&(s=!0)),!o&&!s)||(0!=n&&t.end(n-1),e.g.currentTime=r)}}}}}function ro(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>
35=t?r():(t=io.value().get(t),n.va(e,t,r))}Ya.prototype.Wb=function(){return this.ja},Ya.prototype.Sb=function(){return this.ea},F("shaka.media.InitSegmentReference",Ya),Ya.prototype.getEndByte=Ya.prototype.Sb,Ya.prototype.getStartByte=Ya.prototype.Wb,(r=$a.prototype).ma=function(){return this.i()},r.hf=function(){return this.startTime},r.Ve=function(){return this.endTime},r.Wb=function(){return this.ja},r.Sb=function(){return this.ea},r.nf=function(){return this.tilesLayout},F("shaka.media.SegmentReference",$a),$a.prototype.getTilesLayout=$a.prototype.nf,$a.prototype.getEndByte=$a.prototype.Sb,$a.prototype.getStartByte=$a.prototype.Wb,$a.prototype.getEndTime=$a.prototype.Ve,$a.prototype.getStartTime=$a.prototype.hf,$a.prototype.getUris=$a.prototype.ma,(r=Ja.prototype).getDuration=function(){return this.l},r.af=function(){return this.g},r.Ja=function(e){this.l=e},r.gf=function(){return this.j},r.ue=function(e){this.s=e},r.ec=function(e){this.u=e},r.Qd=function(e){this.m=e},r.Rf=function(e){this.Jc=e},r.Ue=function(){return this.Jc},r.Cb=function(e){if(0!=e.length){var t=e[e.length-1].endTime;this.Bd(e[0].startTime),this.g=e.reduce((function(e,t){return Math.max(e,t.endTime-t.startTime)}),this.g),this.h=Math.max(this.h,t),null!=this.j&&this.F&&(this.j=(Date.now()+this.s)/1e3-this.h-this.g)}},r.Bd=function(e){this.i=null==this.i?e:Math.min(this.i,e)},r.zd=function(e){this.g=Math.max(this.g,e)},r.offset=function(e){null!=this.i&&(this.i+=e),null!=this.h&&(this.h+=e)},r.X=function(){return 1/0==this.l&&!this.u},r.kb=function(){return 1/0!=this.l&&!this.u},r.Za=function(){return Math.max(this.D,this.gb()-this.m)},r.ve=function(e){this.D=e},r.gb=function(){return this.X()||this.kb()?Math.min(Math.max(0,(Date.now()+this.s)/1e3-this.g-this.j)+this.H,this.l):this.h||this.l},r.Vb=function(e){var t=Math.max(this.i,this.D);return 1/0==this.m?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.gb()-this.m+e,this.Qa()))},r.zb=function(){return this.Vb(0)},r.Qa=function(){return Math.max(0,this.gb()-(this.X()||this.kb()?this.Jc:0))}
35,r.ye=function(){return!(null==this.j||null!=this.h&&this.F)},r.te=function(e){this.H=e},F("shaka.media.PresentationTimeline",Ja),Ja.prototype.setAvailabilityTimeOffset=Ja.prototype.te,Ja.prototype.usingPresentationStartTime=Ja.prototype.ye,Ja.prototype.getSeekRangeEnd=Ja.prototype.Qa,Ja.prototype.getSeekRangeStart=Ja.prototype.zb,Ja.prototype.getSafeSeekRangeStart=Ja.prototype.Vb,Ja.prototype.getSegmentAvailabilityEnd=Ja.prototype.gb,Ja.prototype.setUserSeekStart=Ja.prototype.ve,Ja.prototype.getSegmentAvailabilityStart=Ja.prototype.Za,Ja.prototype.isInProgress=Ja.prototype.kb,Ja.prototype.isLive=Ja.prototype.X,Ja.prototype.offset=Ja.prototype.offset,Ja.prototype.notifyMaxSegmentDuration=Ja.prototype.zd,Ja.prototype.notifyMinSegmentStartTime=Ja.prototype.Bd,Ja.prototype.notifySegments=Ja.prototype.Cb,Ja.prototype.getDelay=Ja.prototype.Ue,Ja.prototype.setDelay=Ja.prototype.Rf,Ja.prototype.setSegmentAvailabilityDuration=Ja.prototype.Qd,Ja.prototype.setStatic=Ja.prototype.ec,Ja.prototype.setClockOffset=Ja.prototype.ue,Ja.prototype.getPresentationStartTime=Ja.prototype.gf,Ja.prototype.setDuration=Ja.prototype.Ja,Ja.prototype.getMaxSegmentDuration=Ja.prototype.af,Ja.prototype.getDuration=Ja.prototype.getDuration,Za.prototype.release=function(){this.j=null,this.i=function(){}},to.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.l&&(this.l.stop(),this.l=null),this.i&&(this.i.release(),this.i=null),this.g=this.D=this.u=null},to.prototype.Ed=function(){this.m=!0,no(this)};var io=new pt((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function ao(e,t,n){var r=this;this.g=e,this.l=t,this.j=n,this.m=!1,this.h=new xr,this.i=new co(e),ro(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){uo(r,r.j)}))}function oo(e){return e.m?e.g.currentTime:e.j}function so(e,t){0<e.g.readyState?fo(e.i,t):ro(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){uo(e,e.j)}))}function uo(e,t){.001>Math.abs(e.g.currentTime-t)?lo(e):(e.h.va(e.g,"seeking",(function(){lo(e)})),fo(e.i,0==e.g.currentTime?t:e.g.currentTime))}function lo(e){e.m=!0,e.h.A(e.g,"seeking",(function(){return e.l()}))}function co(e){var t=this;this.h=e,this.m=10,this.l=this.j=this.i=0,this.g=new Qt((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function fo(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.m,e.h.currentTime=t,e.g.Ba(.1)}function ho(e){var t=this;this.g=e,this.j=!1,this.i=null,this.h=new xr,ro(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,(function(){null==t.i?t.j=!0:(t.h.va(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.i))}))}function po(e,t,n,r,i,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.H=t.minBufferTime||0,this.o=n,this.D=i,this.u=null,this.j=new to(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,r=new Za(new Qa(e),t.stallThreshold);return function(e,t){e.i=t}(r,(function(){n?e.currentTime+=n:(e.pause(),e.play())})),r}(e,n),a),this.h=new ao(e,(function(){var e=o.j;e.s=!0,e.m=!1,e.j=!1;var t=oo(o.h);return e=mo(o,t),.001<Math.abs(e-t)&&(t=Date.now()/1e3,!o.u||o.u<t-1)?(o.u=t,so(o.h,e),e=void 0):(o.D(),e=void 0),e}),function(e,t){return null==t?t=1/0>e.g.getDuration()?e.g.zb():e.g.Qa():0>t&&(t=e.g.Qa()+t),go(e,vo(e,t))}(this,r)),this.s=new Qt((function(){if(0!=o.i.readyState&&!o.i.paused){var e=oo(o.h),t=o.g.zb(),n=o.g.Qa();3>n-t&&(t=n-3),e<t&&(e=mo(o,e),o.i.currentTime=e)}})).Ba(.25)}function go(e,t){var n=e.g.getDuration();return t>=n?n-e.o.durationBackoff:t}function mo(e,t){var n=Math.max(e.H,e.o.rebufferingGoal),r=e.o.safeSeekOffset,i=e.g.zb(),a=e.g.Qa(),o=e.g.getDuration();3>a-i&&(i=a-3);var s=e.g.Vb(n),u=e.g.Vb(r);return n=e.g.Vb(n+r),t>=o?go(e,t):t>a?a:t<i?Da(e.i.buffered,u)?u:n:t>=s||Da(e.i.buffered,t)?t:n}function vo(e,t){var n=e.g.zb();return t<n||t>(n=e.g.Qa())?n:t}function yo(e){this.g=e,this.h=null,this.i=0,this.j=!1}function bo(e,t,n){return new yo([new $a(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function To(e,t,n){this.i=e,this.h=t,this.g=n}function wo(){yo.call(this,[]),this.l=[]}function xo(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Bc(),this.h=new Qt((function(){t.g.ke(.25*t.i)}))}function Eo(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.Bc()!=t&&e.g.Pd(t))}catch(e){}e.h.Ba(.25),0!=e.g.Bc()&&e.g.Pd(0)}function So(e){var t=this;this.h=e,this.g=new Set,this.i=new Qt((function(){ko(t,!1)})).Ba(.25)}function ko(e,t){for(var n=l(e.g),r=n.next();!r.done;r=n.next()){r=r.value;for(var i=e.h.currentTime,a=t,o=l(r.l.g),s=o.next();!s.done;s=o.next()){s=s.value;var u=r.j.get(s),c=i<s.startTime?Co:i>s.endTime?Ro:Mo;r.j.set(s,c);for(var d=l(r.m),f=d.next();!f.done;f=d.next())(f=f.value).tb==u&&f.sb==c&&f.jb(s,a)}}}function Ao(e){var t=this;this.h=function(){},this.g=new Set,this.j=e,this.i=new Qt((function(){for(var e=t.j(),n=l(t.g),r=n.next();!r.done;r=n.next())(r=r.value).endTime<e.start&&t.g.delete(r)})).Ba(2)}function Io(e){var t=this;this.l=e,this.j=new Map,this.g=function(){},this.h=function(){},this.i=function(){},this.m=[{tb:null,sb:Mo,jb:function(e,n){return t.g(e,n)}},{tb:Co,sb:Mo,jb:function(e,n){return t.g(e,n)}},{tb:Ro,sb:Mo,jb:function(e,n){return t.g(e,n)}},{tb:Mo,sb:Co,jb:function(e,n){return t.h(e,n)}},{tb:Mo,sb:Ro,jb:function(e,n){return t.h(e,n)}},{tb:Co,sb:Ro,jb:function(e,n){return t.i(e,n)}},{tb:Ro,sb:Co,jb:function(e,n){return t.i(e,n)}}]}ao.prototype.release=function(){this.h&&(this.h.release(),this.h=null),null!=this.i&&(this.i.release(),this.i=null),this.l=function(){},this.g=null},co.prototype.release=function(){this.g&&(this.g.stop(),this.g=null),this.h=null},ho.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.g=null},ho.prototype.m=function(e){this.i=this.j?this.i:e},ho.prototype.l=function(){return(this.j?this.g.currentTime:this.i)||0},ho.prototype.F=function(){},po.prototype.release=function(){this.h&&(this.h.release(),this.h=null),this.j&&(this.j.release(),this.j=null),this.s&&(this.s.stop(),this.s=null),this.i=this.h=this.g=this.o=null,this.D=function(){}},po.prototype.m=function(e){so(this.h,e)},po.prototype.l=function(){var e=oo(this.h);return 0<this.i.readyState&&!this.i.paused?vo(this,e):e},po.prototype.F=function(){this.j.Ed()},(r=yo.prototype).destroy=function(){return Le("shaka.media.SegmentIndex","Please use release() instead of destroy()."),this.release(),Promise.resolve()},r.release=function(){this.j||(this.g=[],this.h&&this.h.stop(),this.h=null)},r.uf=function(){this.j=!0},r.find=function(e){for(var t=this.g.length-1,n=t;0<=n;--n){var r=this.g[n],i=n<t?this.g[n+1].startTime:r.endTime;if(e>=r.startTime&&e<i)return n+this.i}return this.g.length&&e<this.g[0].startTime?this.i:null},r.get=function(e){return 0==this.g.length||0>(e-=this.i)||e>=this.g.length?null:this.g[e]},r.offset=function(e){if(!this.j)for(var t=l(this.g),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.timestampOffset+=e},r.Ec=function(e){!this.j&&e.length&&(this.g=this.g.filter((function(t){return t.startTime<e[0].startTime})),this.g.push.apply(this.g,c(e)))},r.Bb=function(e,t){var n=this;e=e.filter((function(e){return e.endTime>t&&(0==n.g.length||e.endTime>n.g[0].startTime)})),this.Ec(e),this.eb(t)},r.eb=function(e){if(!this.j){var t=this.g.length;this.g=this.g.filter((function(t){return t.endTime>e})),this.i+=t-this.g.length}},r.Ya=function(e,t,n){if(n=void 0!==n&&n,!this.j){for(;this.g.length&&this.g[this.g.length-1].startTime>=t;)this.g.pop();for(;this.g.length&&this.g[0].endTime<=e;)this.g.shift(),n||this.i++;0!=this.g.length&&(e=this.g[this.g.length-1],this.g[this.g.length-1]=new $a(e.startTime,t,e.i,e.ja,e.ea,e.h,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.g,e.tilesLayout))}},r.Mc=function(e,t){var n=this;this.j||(this.h&&this.h.stop(),this.h=new Qt((function(){var e=t();e?n.g.push.apply(n.g,c(e)):(n.h.stop(),n.h=null)})),this.h.Ba(e))},yo.prototype[Symbol.iterator]=function(){return this.yb(0)},yo.prototype.yb=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),r=-1;if(n&&0<n.g.length)for(var i=n.g.length-1;0<=i;--i){var a=n.g[i];if(e>=a.startTime&&e<a.endTime){t++,r=i-1;break}}return new To(this,t,r)},F("shaka.media.SegmentIndex",yo),yo.forSingleSegment=bo,yo.prototype.getIteratorForTime=yo.prototype.yb,yo.prototype.updateEvery=yo.prototype.Mc,yo.prototype.fit=yo.prototype.Ya,yo.prototype.evict=yo.prototype.eb,yo.prototype.mergeAndEvict=yo.prototype.Bb,yo.prototype.merge=yo.prototype.Ec,yo.prototype.offset=yo.prototype.offset,yo.prototype.get=yo.prototype.get,yo.prototype.find=yo.prototype.find,yo.prototype.markImmutable=yo.prototype.uf,yo.prototype.release=yo.prototype.release,yo.prototype.destroy=yo.prototype.destroy,To.prototype.seek=function(e){return Le("shaka.media.SegmentIterator","Please use SegmentIndex.getIteratorForTime instead of seek()."),(e=this.i.yb(e))?(this.h=e.h,this.g=e.g):(this.h=Number.MAX_VALUE,this.g=0),this.next().value},To.prototype.current=function(){var e=this.i.get(this.h);return e&&0<e.g.length&&e.ma().length&&this.g>=e.g.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0<e.g.length?e.g[this.g]:e},To.prototype.next=function(){var e=this.i.get(this.h);return e&&0<e.g.length?(this.g++,e.ma().length&&this.g==e.g.length&&(this.h++,this.g=0)):(this.h++,this.g=0),{value:e=this.current(),done:!e}},F("shaka.media.SegmentIterator",To),To.prototype.next=To.prototype.next,To.prototype.current=To.prototype.current,To.prototype.seek=To.prototype.seek,m(wo,yo),(r=wo.prototype).clone=function(){var e=new wo;return e.l=this.l.slice(),e},r.release=function(){for(var e=l(this.l),t=e.next();!t.done;t=e.next())t.value.release();this.l=[]},r.find=function(e){for(var t=0,n=l(this.l),r=n.next();!r.done;r=n.next()){var i=(r=r.value).find(e);if(null!=i)return i+t;t+=r.i+r.g.length}return null},r.get=function(e){for(var t=0,n=l(this.l),r=n.next();!r.done;r=n.next()){var i=(r=r.value).get(e-t);if(i)return i;t+=r.i+r.g.length}return null},r.offset=function(){},r.Ec=function(){},r.eb=function(){},r.Bb=function(){},r.Ya=function(){},r.Mc=function(){},F("shaka.media.MetaSegmentIndex",wo),wo.prototype.updateEvery=wo.prototype.Mc,wo.prototype.fit=wo.prototype.Ya,wo.prototype.mergeAndEvict=wo.prototype.Bb,wo.prototype.evict=wo.prototype.eb,wo.prototype.merge=wo.prototype.Ec,wo.prototype.offset=wo.prototype.offset,wo.prototype.get=wo.prototype.get,wo.prototype.find=wo.prototype.find,wo.prototype.release=wo.prototype.release,xo.prototype.release=function(){this.h&&(this.h.stop(),this.h=null),this.g=null}
35,xo.prototype.set=function(e){this.i=e,Eo(this)},xo.prototype.yc=function(){return this.g.yc()},So.prototype.release=function(){this.i.stop();for(var e=l(this.g),t=e.next();!t.done;t=e.next())t.value.release();this.g.clear()},Ao.prototype.release=function(){this.h=function(){},this.g.clear(),this.i.stop()},Io.prototype.release=function(){this.l=null,this.j.clear(),this.g=function(){},this.h=function(){},this.i=function(){}};var Co=1,Mo=2,Ro=3;function Do(e,t,n,r,i){return e=hr(e,r,i),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function _o(e,t){var n=this;this.C=t,this.B=e,this.o=null,this.l=1,this.i=this.h=null,this.g=new Map,this.m=!1,this.s=null,this.j=!1,this.I=new Tr((function(){return function(e){var t,n,r,i;return N((function(a){if(1==a.g){for(t=[],n=l(e.g.values()),r=n.next();!r.done;r=n.next())Go(i=r.value),t.push(qo(i));return T(a,Promise.all(t),2)}e.g.clear(),e.C=null,e.B=null,e.o=null,w(a)}))}(n)}))}function No(e,t){var n=e.g.get("video");if(n){var r=n.stream;if(r)if(t){var i=r.trickModeVideo;i&&!n.pb&&(jo(e,i,!1,0,!1),n.pb=r)}else(r=n.pb)&&(n.pb=null,jo(e,r,!0,0,!1))}}function Lo(e,t,n,r,i){n=void 0!==n&&n,r=void 0===r?0:r,i=void 0!==i&&i,e.h=t,e.m&&(t.video&&jo(e,t.video,n,r,i),t.audio&&jo(e,t.audio,n,r,i))}function Po(e,t){e.i=t,e.m&&jo(e,t,!0,0,!1)}function jo(e,t,n,r,i){var a=e.g.get(t.type);a||t.type!=ct?a&&(a.pb&&(t.trickModeVideo?(a.pb=t,t=t.trickModeVideo):a.pb=null),a.stream!=t||i)&&(t.type==ct&&Pa(e.C.P,Nt(t.mimeType,t.codecs)),a.stream=t,a.ca=null,n&&(a.Qb?a.Pc=!0:a.Ra?(a.rb=!0,a.uc=r,a.Pc=!0):(Go(a),Ho(e,a,!0,r).catch((function(t){e.C&&e.C.onError(t)})))),function(e,t){var n,r;return N((function(i){if(1==i.g)return t.wa?(n=t.stream,r=t.wa,n.segmentIndex?i.v(2):T(i,n.createSegmentIndex(),2)):i.return();if(t.wa!=r||t.stream!=n)return i.return();var a=e.C.Ac(),o=Ua(e.C.P,t.type),s=t.stream.segmentIndex.find(t.Aa?t.Aa.endTime:a),u=null==s?null:t.stream.segmentIndex.get(s);s=u&&u.ea?u.ea-u.ja:null,u&&!s&&(s=(u.endTime-u.startTime)*(t.stream.bandwidth||0)/8),s?((u=u.h)&&(s+=(u.ea?u.ea-u.ja:null)||0),a=8*s/(u=e.C.getBandwidthEstimate())<(o||0)-a-Math.max(e.B.minBufferTime||0,e.o.rebufferingGoal)||t.wa.h.g>s):a=!1,a&&t.wa.abort(),w(i)}))}(e,a).catch((function(t){e.C&&e.C.onError(t)}))):function(e,t){var n,r,i,a;N((function(o){switch(o.g){case 1:return n=dt,x(o,2),T(o,Va(e.C.P,n.aa),4);case 4:S(o,3);break;case 2:r=k(o),e.C&&e.C.onError(r);case 3:i=Nt(t.mimeType,t.codecs),Pa(e.C.P,i),(e.C.P.m.isTextVisible()||e.o.alwaysStreamText)&&(a=Uo(t),e.g.set(n.aa,a),Ko(e,a,0)),w(o)}}))}(e,t)}function Oo(e,t){t.Qb||t.rb||(t.Ra?(t.rb=!0,t.uc=0):null==Oa(e.C.P,t.type)?null==t.La&&Ko(e,t,0):(Go(t),Ho(e,t,!1,0).catch((function(t){e.C&&e.C.onError(t)}))))}function Uo(e){return{stream:e,type:e.type,ca:null,Aa:null,Dc:null,vd:null,ud:null,td:null,pb:null,endOfStream:!1,Ra:!1,La:null,rb:!1,uc:0,Pc:!1,Qb:!1,Hd:!1,Xb:!1,wa:null}}function Bo(e,t,n,r,i,a){var o;return N((function(s){return 1==s.g?(o=r.closedCaptions&&0<r.closedCaptions.size,null!=r.emsgSchemeIdUris&&0<r.emsgSchemeIdUris.length&&(new li).V("emsg",(function(t){var n=r.emsgSchemeIdUris;if(0===t.version)var a=t.reader.ac(),o=t.reader.ac(),s=t.reader.M(),u=t.reader.M(),l=t.reader.M(),c=t.reader.M(),d=i.startTime+u/s;else s=t.reader.M(),u=(d=t.reader.nb()/s+i.timestampOffset)-i.startTime,l=t.reader.M(),c=t.reader.M(),a=t.reader.ac(),o=t.reader.ac();t=t.reader.$a(t.reader.R.byteLength-t.reader.Z()),n.includes(a)&&("urn:mpeg:dash:event:2012"==a?e.C.Af():(n=new ar(cu,{detail:{startTime:d,endTime:d+l/s,schemeIdUri:a,value:o,timescale:s,presentationTimeDelta:u,eventDuration:l,id:c,messageData:t}}),e.C.onEvent(n)))})).parse(a),T(s,function(e,t,n){var r,i,a;return N((function(o){if(1==o.g)return r=Math.max(e.o.bufferBehind,e.B.presentationTimeline.g),null==(i=Oa(e.C.P,t.type))||.01>=(a=n-i-r)?o.return():T(o,e.C.P.remove(t.type,i,i+a),2);wr(e.I),w(o)}))}(e,t,n),2)):3!=s.g?(wr(e.I),T(s,Fa(e.C.P,t.type,a,i.startTime,i.endTime,o),3)):(wr(e.I),void w(s))}))}function Fo(e){return e&&e.type==ct&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function Vo(e,t,n,r){var i,a,o,s;return N((function(u){return 1==u.g?(i=vr,a=Do(n.ma(),n.ja,n.ea,e.o.retryParameters,r),o=e.C.lb.request(i,a),t.wa=o,T(u,o.promise,2)):(s=u.h,t.wa=null,u.return(s.data))}))}function Ho(e,t,n,r){var i,a;return N((function(o){return 1==o.g?(t.rb=!1,t.Pc=!1,t.uc=0,t.Qb=!0,t.Aa=null,t.Dc=null,t.ca=null,r?(i=e.C.Ac(),a=e.C.P.getDuration(),T(o,e.C.P.remove(t.type,i+r,a),3)):T(o,Va(e.C.P,t.type),4)):3!=o.g?(wr(e.I),n?T(o,e.C.P.flush(t.type),3):o.v(3)):(wr(e.I),t.Qb=!1,t.endOfStream=!1,Ko(e,t,0),void w(o))}))}function Ko(e,t,n){var r=t.type;(r!=ct||e.g.has(r))&&(t.La=new Zt((function(){var n;
35return N((function(r){return 1==r.g?(x(r,2),T(r,e.Zb(t),4)):2!=r.g?S(r,0):(n=k(r),e.C&&e.C.onError(n),void w(r))}))})).S(n))}function Go(e){null!=e.La&&(e.La.stop(),e.La=null)}function qo(e){return N((function(t){return e.wa?T(t,e.wa.abort(),0):t.v(0)}))}function zo(e,t){return N((function(n){if(1==n.g)return T(n,Zn(e.s),2);wr(e.I),e.C.onError(t),t.handled||e.o.failureCallback(t),w(n)}))}function Xo(e,t){var n=iu(),r=this;this.j=t,this.i=e,this.l=n,this.s=null,this.m=[],this.h=this.g=null,this.u=Promise.resolve().then((function(){return function(e){return N((function(t){if(e.I.g)t=t.v(0);else{if(0==e.m.length||e.g&&!e.g.ib)var n=!1;else{e.g&&(e.g.Ha.mb(),e.g=null);var r=(n=e.m.shift()).create(e.l);r?(n.Ha.Db(),e.g={node:r.node,payload:r.payload,ib:r.ib,Ha:n.Ha}):n.Ha.Hc(),n=!0}n?n=Promise.resolve():e.g?n=function(e){var t,n;return N((function(r){switch(r.g){case 1:return e.i=e.j.cf(e.i,e.l,e.g.node,e.g.payload),x(r,2),e.h=e.j.Pe(e.i,e.l,e.g.payload),T(r,e.h.promise,4);case 4:e.h=null,e.i==e.g.node&&(e.g.Ha.Fc(),e.g=null),S(r,0);break;case 2:return 7001==(t=k(r)).code?e.g.Ha.mb():e.g.Ha.onError(t),e.g=null,e.h=null,n=e,T(r,e.j.handleError(e.l,t),5);case 5:n.i=r.h,w(r)}}))}(e):(e.j.zf(e.i),e.s=new ht,n=e.s),t=T(t,n,1)}return t}))}(r)})),this.I=new Tr((function(){return function(e){var t,n;return N((function(r){if(1==r.g)return e.h&&e.h.abort(),Yo(e),T(r,e.u,2);for(e.g&&e.g.Ha.mb(),t=l(e.m),n=t.next();!n.done;n=t.next())n.value.Ha.mb();e.g=null,e.m=[],e.j=null,w(r)}))}(r)}))}function Wo(e,t){var n={Db:function(){},Fc:function(){},mb:function(){},onError:function(){},Hc:function(){},Cg:function(){}};return e.m.push({create:t,Ha:n}),e.h&&e.h.abort(),Yo(e),n}function Yo(e){e.s&&(e.s.resolve(),e.s=null)}function $o(e){this.g=null;for(var t=l(Array.from(e.textTracks)),n=t.next();!n.done;n=t.next())(n=n.value).mode="disabled","Shaka Player TextTrack"==n.label&&(this.g=n);this.g||(this.g=e.addTextTrack("subtitles","Shaka Player TextTrack")),this.g.mode="hidden"}function Jo(e){if(e.startTime>=e.endTime)return null;var t=new VTTCue(e.startTime,e.endTime,e.payload);t.lineAlign=e.lineAlign,t.positionAlign=e.positionAlign,e.size&&(t.size=e.size);try{t.align=e.textAlign}catch(e){}return"center"==e.textAlign&&"center"!=t.align&&(t.align="middle"),"vertical-lr"==e.writingMode?t.vertical="lr":"vertical-rl"==e.writingMode&&(t.vertical="rl"),1==e.lineInterpretation&&(t.snapToLines=!1),null!=e.line&&(t.line=e.line),null!=e.position&&(t.position=e.position),t}function Zo(e,t){var n=e.mode;e.mode="showing"==n?"showing":"hidden";for(var r=l(Array.from(e.cues)),i=r.next();!i.done;i=r.next())(i=i.value)&&t(i)&&e.removeCue(i);e.mode=n}function Qo(){}function es(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function ts(t,n){var r=this;this.u=!1,this.j=[],this.g=t,this.m=n,this.i=document.createElement("div"),this.i.classList.add("shaka-text-container"),this.i.style.textAlign="center",this.i.style.display="flex",this.i.style.flexDirection="column",this.i.style.alignItems="center",this.i.style.justifyContent="flex-end",this.m.appendChild(this.i),this.D=new Qt((function(){ns(r)})).Ba(.25),this.l=new Map,this.h=new xr,this.h.A(document,"fullscreenchange",(function(){ns(r,!0)})),this.s=null,"ResizeObserver"in e&&(this.s=new ResizeObserver((function(){ns(r,!0)})),this.s.observe(this.i))}function ns(e,t){function n(t){return e.j.includes(t)&&e.u&&t.startTime<=r&&t.endTime>r}t=void 0!==t&&t;for(var r=e.g.currentTime,i=l(e.l.keys()),a=i.next();!a.done;a=i.next())if(!n(a=a.value)||t){var o=e.l.get(a);e.i.removeChild(o),e.l.delete(a)}for(i=new Set(e.l.values()),o=(a=l(Array.from(e.i.childNodes))).next();!o.done;o=a.next())o=o.value,i.has(o)||e.i.removeChild(o);for(i=e.j.filter((function(t){return n(t)&&!e.l.has(t)})).sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime-t.endTime})),a=(i=l(i)).next();!a.done;a=i.next())a=a.value,o=rs(e,e.i,a,!1),e.l.set(a,o)}function rs(e,t,n,r){var i=r?"span":"div";(n.lineBreak||n.spacer)&&(n.spacer&&Le("shaka.extern.Cue","Please use lineBreak instead of spacer."),i="br");var a=document.createElement(i);for("br"!=i&&function(e,t,n,r){var i=t.style,a=0==n.nestedCues.length;i.whiteSpace="pre-wrap";var o=n.payload.replace(/\s+$/g,(function(e){return"Â ".repeat(e.length)}));r?t.textContent=o:o.length&&((i=document.createElement("span")).textContent=o,t.appendChild(i),i=i.style),i.backgroundColor=n.backgroundColor,i.border=n.border,i.color=n.color,i.direction=n.direction,i.opacity=n.opacity,i.paddingLeft=is(n.linePadding,n,e.m),i.paddingRight=is(n.linePadding,n,e.m),n.backgroundImage&&(i.backgroundImage="url('"+n.backgroundImage+"')",i.backgroundRepeat="no-repeat",i.backgroundSize="contain",i.backgroundPosition="center",""==n.backgroundColor&&(i.backgroundColor="transparent")),r?i.display="inline":(i.display="flex",i.flexDirection="column",i.alignItems="center",i.justifyContent="before"==n.displayAlign?"flex-start":"center"==n.displayAlign?"center":"flex-end"),a||(i.margin="0"),i.fontFamily=n.fontFamily,i.fontWeight=n.fontWeight.toString(),i.fontStyle=n.fontStyle,i.letterSpacing=n.letterSpacing,i.fontSize=is(n.fontSize,n,e.m),n.line?1==n.lineInterpretation&&(i.position="absolute",n.writingMode==pe?n.lineAlign==me?i.top=n.line+"%":"end"==n.lineAlign&&(i.bottom=n.line+"%"):"vertical-lr"==n.writingMode?n.lineAlign==me?i.left=n.line+"%":"end"==n.lineAlign&&(i.right=n.line+"%"):n.lineAlign==me?i.right=n.line+"%":"end"==n.lineAlign&&(i.left
35=n.line+"%")):n.region&&n.region.id&&(!r&&!a||n.backgroundImage)&&(e=n.region.widthUnits==Se?"%":"px",t=n.region.viewportAnchorUnits==Se?"%":"px",i.height=n.region.height+(n.region.heightUnits==Se?"%":"px"),i.width=n.region.width+e,i.position="absolute",i.top=n.region.viewportAnchorY+t,i.left=n.region.viewportAnchorX+t),i.lineHeight=n.lineHeight,n.position&&(n.writingMode==pe?i.paddingLeft=n.position:i.paddingTop=n.position),"line-left"==n.positionAlign?i.cssFloat="left":"line-right"==n.positionAlign&&(i.cssFloat="right"),i.textAlign=n.textAlign,i.textDecoration=n.textDecoration.join(" "),i.writingMode=n.writingMode,"writingMode"in document.documentElement.style&&i.writingMode==n.writingMode||(i.webkitWritingMode=n.writingMode),n.size&&(n.writingMode==pe?i.width=n.size+"%":i.height=n.size+"%")}(e,a,n,r),i=a,!r&&n.nestedCues.length&&((i=document.createElement("span")).classList.add("shaka-text-wrapper"),a.appendChild(i)),r=(n=l(n.nestedCues)).next();!r.done;r=n.next())rs(e,i,r.value,!0);return t.appendChild(a),a}function is(e,t,n){var r=(r=new RegExp(/(\d*\.?\d+)([a-z]+|%+)/).exec(e))?{value:Number(r[1]),Vf:r[2]}:null;if(!r)return e;var i=r.value;switch(r.Vf){case"%":return i/100*n.clientHeight/t.cellResolution.rows+"px";case"c":return n.clientHeight*i/t.cellResolution.rows+"px";default:return e}}function as(){}function os(e,t,n,r,i){var a,o=i in r,s=!0;for(a in t){var u=i+"."+a,l=o?r[i]:n[a];o||a in n?void 0===t[a]?void 0===l||o?delete e[a]:e[a]=sr(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=sr(l)),u=os(e[a],t[a],l,r,u),s=s&&u):typeof t[a]!=typeof l||null==t[a]||"function"!=typeof t[a]&&t[a].constructor!=l.constructor?(z("Invalid config, wrong type for "+u),s=!1):("function"==typeof n[a]&&n[a].length!=t[a].length&&X("Unexpected number of arguments for "+u),e[a]=t[a]):(z("Invalid config, unrecognized key "+u),s=!1)}return s}function ss(e,t){for(var n={},r=n,i=0,a=0;!(0>(i=e.indexOf(".",i)));)0!=i&&"\\"==e[i-1]||(r[a=e.substring(a,i).replace(/\\\./g,".")]={},r=r[a],a=i+1),i+=1;return r[e.substring(a).replace(/\\\./g,".")]=t,n}function us(){}function ls(){var e=1/0;navigator.connection&&navigator.connection.saveData&&(e=360);var t={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},servers:{},clearKeys:{},advanced:{},delayLicenseRequestUntilPlayed:!1,initDataTransform:Vr,logLicenseExchange:!1,updateExpirationTime:1,preferredKeySystems:[]},n={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},availabilityWindowOverride:NaN,disableAudio:!1,disableVideo:!1,disableText:!1,disableThumbnails:!1,defaultPresentationDelay:0,dash:{clockSyncUri:"",ignoreDrmInfo:!1,disableXlinkProcessing:!1,xlinkFailGracefully:!1,ignoreMinBufferTime:!1,autoCorrectDrift:!0,initialSegmentLimit:1e3,ignoreSuggestedPresentationDelay:!1,ignoreEmptyAdaptationSet:!1,ignoreMaxSegmentDuration:!1,keySystemsByURI:{"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:79f0049a-4098-8642-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},manifestPreprocessor:function(e){return e}},hls:{ignoreTextStreamFailures:!1,ignoreImageStreamFailures:!1,useFullSegmentsForStartTime:!1}},r={retryParameters:{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},failureCallback:function(e){return[e]},rebufferingGoal:2,bufferingGoal:10,bufferBehind:30,ignoreTextStreamFailures:!1,alwaysStreamText:!1,startAtSegmentBoundary:!1,gapDetectionThreshold:.1,smallGapLimit:.5,jumpLargeGaps:!1,durationBackoff:1,forceTransmuxTS:!1,safeSeekOffset:5,stallEnabled:!0,stallThreshold:1,stallSkip:.1,useNativeHlsOnSafari:!0,inaccurateManifestTolerance:2,lowLatencyMode:!1,autoLowLatencyMode:!1,forceHTTPS:!1,preferNativeHls:!1,updateIntervalSeconds:1};(navigator.userAgent.match(/Edge\//)||nn()||rn())&&(r.gapDetectionThreshold=.5),(sn("Web0S")||nn()||rn())&&(r.stallSkip=0);var i={trackSelectionCallback:function(e){return N((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return N((function(n){return 1==n.g?navigator.storage&&navigator.storage.estimate?T(n,navigator.storage.estimate(),3):n.return(!0):(t=n.h,n.return(t.usage+e<.95*t.quota))}))},progressCallback:function(e,t){return[e,t]},usePersistentLicense:!0},a={drm:t,manifest:n,streaming:r,offline:i,abrFactory:function(){return new Un},abr:{enabled:!0,useNetworkInformation:!0,defaultBandwidthEstimate:1e6,switchInterval:8,bandwidthUpgradeTarget:.85,bandwidthDowngradeTarget:.95,restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:e,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0}},preferredAudioLanguage:"",preferredTextLanguage:"",preferredVariantRole:"",preferredTextRole:"",preferredAudioChannelCount:2,preferredVideoCodecs:[],preferredAudioCodecs:[],preferForcedSubs:!1,preferredDecodingAttributes:[],restrictions:{minWidth:0,maxWidth:1/0,minHeight:0,maxHeight:1/0,minPixels:0,maxPixels:1/0,minFrameRate:0,maxFrameRate:1/0,minBandwidth:0,maxBandwidth:1/0},playRangeStart:0,playRangeEnd:1/0,textDisplayFactory:function(){return null}};return i.trackSelectionCallback=function(e){return N((function(t){return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type}
35)),r=[],i=Wt(t,n.map((function(e){return e.language})));i&&(r=n.filter((function(e){return qt(e.language)==i}))),0==r.length&&(r=n.filter((function(e){return e.primary}))),0==r.length&&(n.map((function(e){return e.language})),r=n);var a=r.filter((function(e){return e.height&&480>=e.height}));if(a.length&&(a.sort((function(e,t){return t.height-e.height})),r=a.filter((function(e){return e.height==a[0].height}))),n=[],r.length){var o=Math.floor(r.length/2);r.sort((function(e,t){return e.bandwidth-t.bandwidth})),n.push(r[o])}for(r=l(e),o=r.next();!o.done;o=r.next())(o=o.value).type!=ct&&"image"!=o.type||n.push(o);return n}(e,a.preferredAudioLanguage))}))},a}function cs(e,t,n){var r={".drm.servers":"",".drm.clearKeys":"",".drm.advanced":{distinctiveIdentifierRequired:!1,persistentStateRequired:!1,videoRobustness:"",audioRobustness:"",sessionType:"",serverCertificate:new Uint8Array(0),serverCertificateUri:"",individualizationServer:""}};return os(e,t,n||ls(),r,"")}function ds(){this.g=null,this.h=[]}function fs(e,t){if(null==e.g)e.g={timestamp:Date.now()/1e3,state:t,duration:0};else{var n=Date.now()/1e3;e.g.duration=n-e.g.timestamp,e.g.state!=t&&(e.h.push(e.g),e.g={timestamp:n,state:t,duration:0})}}function hs(e,t){var n=0;e.g&&e.g.state==t&&(n+=e.g.duration);for(var r=l(e.h),i=r.next();!i.done;i=r.next())n+=(i=i.value).state==t?i.duration:0;return n}function ps(){this.i=this.h=null,this.g=[]}function gs(e,t,n){e.i!=t&&(e.i=t,e.g.push({timestamp:Date.now()/1e3,id:t.id,type:"text",fromAdaptation:n,bandwidth:null}))}function ms(){this.s=this.u=this.J=this.F=this.m=this.j=this.H=this.l=this.i=this.L=this.N=this.T=this.D=this.Y=NaN,this.g=new ds,this.h=new ps}function vs(t,n){or.call(this);var r=this;this.l=Du,this.nc=this.g=null,this.Y=!1,this.h=new xr,this.fd=this.u=this.Wa=this.B=this.rc=this.s=this.i=this.fc=this.H=this.oc=this.F=this.Fa=this.D=this.J=this.m=this.O=null,this.nd=1e9,this.o=Rs(this),this.md={width:1/0,height:1/0},this.j=null,this.pa=new zn(this.o.preferredAudioLanguage,this.o.preferredVariantRole,this.o.preferredAudioChannelCount),this.qa=this.o.preferredTextLanguage,this.Nb=this.o.preferredTextRole,this.Xa=this.o.preferForcedSubs,this.gd=[],n&&n(this),this.O=function(e){return new dr((function(t,n){e.u&&e.u.segmentDownloaded(t,n)}))}(this),this.O.Nd(this.o.streaming.forceHTTPS),this.L=null,Ou&&(this.L=Ve(Ou)),this.h.A(e,"online",(function(){r.Id()})),this.sa={name:"detach"},this.Oa={name:"attach"},this.T={name:"unload"},this.pd={name:"manifest-parser"},this.ld={name:"manifest"},this.Ea={name:"media-source"},this.jd={name:"drm-engine"},this.N={name:"load"},this.qd={name:"src-equals-drm-engine"},this.Ma={name:"src-equals"};var i=new Map;i.set(this.Oa,(function(e,t){return rr(function(e,t,n){return null==t.G&&(t.G=n.G,e.h.A(t.G,"error",(function(){var t=Xs(e);t&&qs(e,t)}))),e.g=t.G,Promise.resolve()}(r,e,t))})),i.set(this.sa,(function(e){return e.G&&(r.h.Ca(e.G,"error"),e.G=null),r.g=null,rr(e=Promise.resolve())})),i.set(this.T,(function(e){return rr(bs(r,e))})),i.set(this.Ea,(function(e){return e=function(e,t){var n,r,i,a;return N((function(o){if(1==o.g)return n=new Ca,r=e.o.textDisplayFactory,i=Ve(r),e.kd=r,a=function(e,t,n,r){return new La(e,t,n,r)}(t.G,n,i,(function(t,n,r){for(var i=(t=l(t)).next();!i.done;i=t.next())if((i=i.value).data&&i.cueTime&&i.frames){for(var a=i.cueTime+n,o=r,s=l(i.frames),u=s.next();!u.done;u=s.next())Ts(e,a,o,"ID3",u.value);e.L&&e.L.onHlsTimedMetadata(i,a)}})),T(o,a.F,2);e.J=a,w(o)}))}(r,e),rr(e)})),i.set(this.pd,(function(e,t){var n=function(e,t,n){var r,i,a,o;return N((function(s){if(1==s.g)return t.mimeType=n.mimeType,t.uri=n.uri,r=t.uri,i=e.O,e.Wa=r,a=e,T(s,ti(r,i,e.o.manifest.retryParameters,t.mimeType),2);a.rc=s.h,e.s=Ve(e.rc),o=sr(e.o.manifest),n.G&&"AUDIO"===n.G.nodeName&&(o.disableVideo=!0),e.s.configure(o),w(s)}))}(r,e,t);return rr(n)})),i.set(this.ld,(function(e){return function(e,t){var n=t.uri,r=e.O;e.fc=new Ao((function(){return e.bc()})),function(e,t){e.h=t}(e.fc,(function(t){zs(e,Eu,t),e.L&&e.L.onDashTimedMetadata(t)}));var i={networkingEngine:r,filter:function(t){return N((function(n){return n.return(e.wc(t))}))},makeTextStreamsForClosedCaptions:function(t){return function(e,t){for(var n=new Set,r=l(t.textStreams),i=r.next();!i.done;i=r.next())"application/cea-608"!=(i=i.value).mimeType&&"application/cea-708"!=i.mimeType||n.add(i.originalId);for(r=l(t.variants),i=r.next();!i.done;i=r.next())if((i=i.value.video)&&i.closedCaptions)for(var a=l(i.closedCaptions.keys()),o=a.next();!o.done;
35o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new wo;s={id:e.nd++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:u,mimeType:s,codecs:"",kind:"caption",encrypted:!1,drmInfos:[],keyIds:new Set,language:i.closedCaptions.get(o),label:null,type:ct,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:i.roles,forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},t.textStreams.push(s),n.add(o)}}(e,t)},onTimelineRegionAdded:function(t){var n=e.fc;e:{for(var r=l(n.g),i=r.next();!i.done;i=r.next())if((i=i.value).schemeIdUri==t.schemeIdUri&&i.id==t.id&&i.startTime==t.startTime&&i.endTime==t.endTime){r=i;break e}r=null}null==r&&(n.g.add(t),n.h(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return qs(e,t)},isLowLatencyMode:function(){return e.o.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return e.o.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){e.configure("streaming.lowLatencyMode",!0)}},a=Date.now()/1e3;return new Qn(function(){var t,r,o,s;return N((function(u){if(1==u.g)return t=e,T(u,e.s.start(n,i),2);if(t.B=u.h,r=ys(gu),e.dispatchEvent(r),0==e.B.variants.length)throw new qe(2,4,4036);!function(e){function t(e){return e.video&&e.audio||e.video&&e.video.codecs.includes(",")}e.variants.some(t)&&(e.variants=e.variants.filter(t))}(e.B),o=Date.now()/1e3,s=o-a,e.j.H=s,w(u)}))}(),(function(){return e.s.stop()}))}(r,e)})),i.set(this.jd,(function(e){return e=function(e,t){var n,r;return N((function(i){return 1==i.g?(n=Date.now()/1e3,r=!0,e.m=xs(e,{lb:e.O,onError:function(t){qs(e,t)},Gc:function(t){Ws(e,t)},onExpirationUpdated:function(t,n){Ys(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==lu&&r&&(r=!1,e.j.j=Date.now()/1e3-n)}}),e.m.configure(e.o.drm),T(i,_r(e.m,e.B.variants,e.B.offlineSessionIds),2)):3!=i.g?T(i,e.m.Pb(t.G),3):T(i,e.wc(e.B),0)}))}(r,e),rr(e)})),i.set(this.N,(function(e,t){return rr(function(e,t,n){var r,i,a,o,s,u,c,d,f,h;return N((function(p){switch(p.g){case 1:if(t.startTime=n.startTime,r=t.G,i=t.uri,e.Wa=i,e.F=new xo({Bc:function(){return t.G.playbackRate},yc:function(){return t.G.defaultPlaybackRate},Pd:function(e){t.G.playbackRate=e},ke:function(e){t.G.currentTime+=e}}),a=function(){return Ls(e)},o=function(){return Ns(e)},e.h.A(r,"playing",a),e.h.A(r,"pause",a),e.h.A(r,"ended",a),e.h.A(r,"ratechange",o),s=e.o.abrFactory,e.u&&e.fd==s||(e.fd=s,e.u=Ve(s),"function"!=typeof e.u.playbackRateChanged&&(Le("AbrManager","Please use an AbrManager with playbackRateChanged function."),e.u.playbackRateChanged=function(){}),e.u.configure(e.o.abr)),e.pa=new zn(e.o.preferredAudioLanguage,e.o.preferredVariantRole,e.o.preferredAudioChannelCount),e.qa=e.o.preferredTextLanguage,e.Nb=e.o.preferredTextRole,e.Xa=e.o.preferForcedSubs,$s(e.B.presentationTimeline,e.o.playRangeStart,e.o.playRangeEnd),e.u.init((function(t,n,r){e.i&&t!=e.i.h&&Os(e,t,!0,void 0!==n&&n,void 0===r?0:r)})),e.D=function(e,t){return new po(e.g,e.B,e.o.streaming,t,(function(){if(e.Fa&&ko(e.Fa,!0),e.i)for(var t=e.i,n=t.C.Ac(),r=t.o.smallGapLimit,i=l(t.g.keys()),a=i.next();!a.done;a=i.next()){a=a.value;var o=t.g.get(a);o.ca=null;var s=t.C.P;if(a==ct?s=null!=(s=s.i).g&&null!=s.h&&(n>=s.g&&n<s.h):s=Da(s=Ba(s,a),n,r),!s&&(null!=Ua(t.C.P,a)&&Oo(t,o),o.wa&&(o.wa.abort(),o.wa=null),a===ct))for((a=t.C.P.D.g).l=0,a.h=[],a.g=[],(o=a.i).i=[],o.h=[],o.g=0,va(a),o=(a=l(a.j.values())).next();!o.done;o=a.next())fa(o.value)}e.H&&Ss(e)}),(function(t){return e.dispatchEvent(t)}))}(e,t.startTime),e.Fa=function(e){var t=new Io(e.fc);!function(e,t,n,r){e.g=t,e.h=n,e.i=r}(t,(function(t){zs(e,Su,t)}),(function(t){zs(e,ku,t)}),(function(t,n){n||(zs(e,Su,t),zs(e,ku,t))}));var n=new So(e.g);return n.g.add(t),n}(e),u=Math.max(e.B.minBufferTime,e.o.streaming.rebufferingGoal),Es(e,u),dn(e.B,e.o.preferredVideoCodecs,e.o.preferredAudioCodecs,e.o.preferredAudioChannelCount,e.o.preferredDecodingAttributes),e.i=function(e){return new _o(e.B,{Ac:function(){return e.D.l()},getBandwidthEstimate:function(){return e.u.getBandwidthEstimate()},P:e.J,lb:e.O,onError:function(t){return qs(e,t)},onEvent:function(t){return e.dispatchEvent(t)},Af:function(){e.s&&e.s.update&&e.s.update()},Ed:function(){e.D&&e.D.F(),Ss(e)}})}(e),e.i.configure(e.o.streaming),e.l=_u,e.dispatchEvent(ys(Tu)),c=null,e.Cc().find((function(e){return e.active}))){p.v(2);break}if(c=Ps(e)?e.u.chooseVariant():null,Os(e,c,!0,!1,0),!e.o.streaming.startAtSegmentBoundary){p.v(3);break}return d=e.D.l(),T(p,function(e,t){var n,r,i,a,o;return N((function(s){return 1==s.g?(n=e.audio,r=e.video,i=function(e,t){var n,r;return N((function(i){return 1==i.g?e?T(i,e.createSegmentIndex(),2):i.return(null):(n=e.segmentIndex[Symbol.iterator]().seek(t))?(r=n.startTime,i.return(r)):i.return(null)}))},T(s,i(n,t),2)):3!=s.g?(a=s.h,T(s,i(r,t),3)):null!=(o=s.h)&&null!=a?s.return(Math.max(o,a)):null!=o?s.return(o):null!=a?s.return(a):s.return(t)}))}(c,d),4);case 4:f=p.h,e.D.m(f);case 3:Bs(e,null,wn(c));case 2:return e.hb().find((function(e){return e.active}))||((h=Rn(e.B.textStreams,e.qa,e.Nb,e.Xa)[0]||null)&&gs(e.j.h,h,!0),c&&(h?(c.audio&&function(e,t,n){return e=qt(e.o.preferredTextLanguage),t=qt(t.language),Ht(n=qt(n.language),e)&&!Ht(t,n)}(e,c.audio,h)&&(e.Y=!0),e.Y&&e.J.m.setTextVisibility(!0),Ks(e)):e.Y=!1),h&&(e.o.streaming.alwaysStreamText||e.sd())&&Po(e.i,h)),T(p,e.i.start(),5);case 5:e.o.abr.enabled&&(e.u.enable(),Gs(e)),bn(e.i?e.i.h:null,e.B),Zs(e.B),Fs(e),Ps(e),e.B.variants.some((function(e){return e.primary})),e.h.va(r,"loadedmetadata",(function(){e.j.l=Date.now()/1e3-n.Rd})),w(p)}}))}(r,e,t))})),i.set(this.qd,(function(e,t){var n=function(e,t,n){var r,i,a,o,s,u,l;return N((function(c){return 1==c.g?(r=dt,i=Date.now()/1e3,a=!0,e.m=xs(e,{lb:e.O,onError:function(t){qs(e,t)},Gc:function(t){Ws(e,t)}
35,onExpirationUpdated:function(t,n){Ys(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==lu&&a&&(a=!1,e.j.j=Date.now()/1e3-i)}}),e.m.configure(e.o.drm),o=t.uri||"",s=ri(o),"application/x-mpegurl"==(u=Uu[s])&&an()&&(u="application/vnd.apple.mpegurl"),u||(u="video/mp4"),l={id:0,language:"und",primary:!1,audio:null,video:{id:0,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:null,mimeType:n.mimeType?n.mimeType.split(";")[0]:u,codecs:n.mimeType?jt(n.mimeType):"",encrypted:!0,drmInfos:[],keyIds:new Set,language:"und",label:null,type:r.Na,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},T(c,_r(e.m,[l],[]),2)):T(c,e.m.Pb(t.G),0)}))}(r,e,t);return rr(n)})),i.set(this.Ma,(function(e,t){return function(e,t,n){function r(){return Ls(e)}t.uri=n.uri,t.startTime=n.startTime,e.Wa=t.uri,e.D=new ho(t.G),null!=t.startTime&&e.D.m(t.startTime),e.F=new xo({Bc:function(){return t.G.playbackRate},yc:function(){return t.G.defaultPlaybackRate},Pd:function(e){t.G.playbackRate=e},ke:function(e){t.G.currentTime+=e}}),Es(e,e.o.streaming.rebufferingGoal),e.h.A(t.G,"playing",r),e.h.A(t.G,"pause",r),e.h.A(t.G,"ended",r),e.h.A(t.G,"ratechange",(function(){return Ns(e)})),"none"!=e.g.preload&&e.h.va(e.g,"loadedmetadata",(function(){e.j.l=Date.now()/1e3-n.Rd})),e.g.audioTracks&&(e.h.A(e.g.audioTracks,"addtrack",(function(){return Fs(e)})),e.h.A(e.g.audioTracks,"removetrack",(function(){return Fs(e)})),e.h.A(e.g.audioTracks,"change",(function(){return Fs(e)}))),e.g.textTracks&&(e.h.A(e.g.textTracks,"addtrack",(function(t){if(t.track)switch(t=t.track,t.kind){case"metadata":!function(e,t){"metadata"==t.kind&&(t.mode="hidden",e.h.A(t,"cuechange",(function(){if(t.activeCues)for(var n=l(t.activeCues),r=n.next();!r.done;r=n.next())r=r.value,Ts(e,r.startTime,r.endTime,r.type,r.value),e.L&&e.L.onCueMetadataChange(r.value)})),new Qt((function(){for(var t=function(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"==e.kind}))}(e),n=(t=l(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).Hb().S(.5))}(e,t);break;case"chapters":ws(e,t);break;default:Fs(e)}})),e.h.A(e.g.textTracks,"removetrack",(function(){return Fs(e)})),e.h.A(e.g.textTracks,"change",(function(){return Fs(e)}))),t.G.src=t.uri,(nn()||sn("Web0S"))&&t.G.load(),e.l=Nu,e.dispatchEvent(ys(Tu));var i=new ht;ro(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){i.resolve()}));var a=!1;return e.gd.push((function(){a=!0})),ro(e.g,HTMLMediaElement.HAVE_CURRENT_DATA,e.h,(function(){return N((function(t){return 1==t.g?a?t.return():(function(e){var t=e.o.preferredAudioLanguage;if(""!=t){e.Kd(t);var n=e.o.preferredVariantRole;""!=n&&e.Kd(t,n)}}(e),As(e).find((function(e){return"disabled"!=e.mode}))?t.v(2):T(t,new Promise((function(t){e.h.va(e.g.textTracks,"change",t),new Qt(t).S(1)})),2)):a?t.return():(function(e){var t=e.o.preferredTextLanguage,n=e.o.preferForcedSubs;if(""!=t){e.Ld(t,"",n);var r=e.o.preferredTextRole;""!=r&&e.Ld(t,r,n)}}(e),void w(t))}))})),e.g.error?i.reject(Xs(e)):"none"==e.g.preload&&(X('With <video preload="none">, the browser will not load anything until play() is called. We are unable to measure load latency in a meaningful way, and we cannot provide track info yet. Please do not use preload="none" with Shaka Player.'),i.resolve()),e.h.va(e.g,"error",(function(){i.reject(Xs(e))})),new Qn(i,(function(){return i.reject(new qe(2,7,7001)),Promise.resolve()}))}(r,e,t)})),this.da=new Xo(this.sa,{cf:function(e,t,n,i){var a=null;return e==r.sa&&(a=n==r.sa?r.sa:r.Oa),e==r.Oa&&(a=n==r.sa||t.G!=i.G?r.sa:n==r.Oa?r.Oa:n==r.Ea||n==r.N?r.Ea:n==r.Ma?r.qd:null),e==r.Ea&&(a=n==r.N&&t.G==i.G?r.pd:r.T),e==r.pd&&(a=ru(r.N,r.ld,r.T,n,t,i)),e==r.ld&&(a=ru(r.N,r.jd,r.T,n,t,i)),e==r.jd&&(a=ru(r.N,r.N,r.T,n,t,i)),e==r.qd&&(a=n==r.Ma&&t.G==i.G?r.Ma:r.T),e!=r.N&&e!=r.Ma||(a=r.T),e==r.T&&(a=i.G&&t.G==i.G?r.Oa:r.sa),a},Pe:function(e,t,n){return r.dispatchEvent(ys(vu,{state:e.name})),i.get(e)(t,n)},handleError:function(e){return N((function(t){return 1==t.g?T(t,bs(r,e),2):t.return(e.G?r.Oa:r.sa)}
35))},zf:function(e){r.dispatchEvent(ys(yu,{state:e.name}))}}),t&&this.Pb(t,!0)}function ys(e,t){return new ar(e,t)}function bs(e,t){var n,r,i,a,o,s,u,c,d;return N((function(f){switch(f.g){case 1:return e.l!=Ru&&(e.l=Du),n=e.gd.map((function(e){return e()})),e.gd=[],T(f,Promise.all(n),2);case 2:if(e.dispatchEvent(ys(Iu)),t.mimeType=null,t.startTime=null,t.uri=null,t.G&&(e.h.Ca(t.G,"loadedmetadata"),e.h.Ca(t.G,"playing"),e.h.Ca(t.G,"pause"),e.h.Ca(t.G,"ended"),e.h.Ca(t.G,"ratechange")),e.Fa&&(e.Fa.release(),e.Fa=null),e.oc&&(e.oc.stop(),e.oc=null),!e.s){f.v(3);break}return T(f,e.s.stop(),4);case 4:e.s=null,e.rc=null;case 3:if(!e.u){f.v(5);break}return T(f,e.u.stop(),5);case 5:if(!e.i){f.v(7);break}return T(f,e.i.destroy(),8);case 8:e.i=null;case 7:if(e.F&&(e.F.release(),e.F=null),e.D&&(e.D.release(),e.D=null),!e.J){f.v(9);break}return T(f,e.J.destroy(),10);case 10:e.J=null;case 9:if(e.L&&e.L.onAssetUnload(),!t.G||!t.G.src){f.v(11);break}return T(f,new Promise((function(e){return new Qt(e).S(.1)})),12);case 12:for(t.G.removeAttribute("src"),t.G.load();t.G.lastChild;)t.G.removeChild(t.G.firstChild);case 11:if(!e.m){f.v(13);break}
35return T(f,e.m.destroy(),14);case 14:e.m=null;case 13:if(e.Wa=null,e.H=null,e.B){for(r=l(e.B.variants),i=r.next();!i.done;i=r.next())for(a=i.value,o=l([a.audio,a.video]),s=o.next();!s.done;s=o.next())(u=s.value)&&u.segmentIndex&&u.segmentIndex.release();for(c=l(e.B.textStreams),s=c.next();!s.done;s=c.next())(d=s.value).segmentIndex&&d.segmentIndex.release()}e.B=null,e.j=new ms,e.kd=null,_s(e),w(f)}}))}function Ts(e,t,n,r,i){e.dispatchEvent(ys(mu,{startTime:t,endTime:n,Ag:r,payload:i}))}function ws(e,t){t&&"chapters"==t.kind&&(t.mode="hidden",new Qt((function(){for(var t=Is(e),n=(t=l(t)).next();!n.done;n=t.next())n.value.mode="hidden"})).Hb().S(.5))}function xs(e,t){return new Dr(t,e.o.drm.updateExpirationTime)}function Es(e,t){e.H=new Xn,e.H.g=Yn,Wn(e.H,t,Math.min(.5,t/2)),_s(e),e.oc=new Qt((function(){Ss(e)})).Ba(.25)}function Ss(e){switch(e.l){case Nu:if(e.g.ended)var t=!0;else{var n=Ra(e.g.buffered);t=null!=n&&n>=e.g.duration-1}break;case _u:e:if(e.g.ended||ja(e.J))t=!0;else{if(e.B.presentationTimeline.X()){n=e.B.presentationTimeline.gb();var r=Ra(e.g.buffered);if(null!=r&&r>=n){t=!0;break e}}t=!1}break;default:t=!1}r=_a(e.g.buffered,e.g.currentTime);var i=t,a=(n=e.H).h.get(n.g);t=n.g,r=i||r>=a?$n:Yn,n.g=r,t!=r&&_s(e)}function ks(e){if(e.s){var t=sr(e.o.manifest);e.g&&"AUDIO"===e.g.nodeName&&(t.disableVideo=!0),e.s.configure(t)}if(e.m&&e.m.configure(e.o.drm),e.i){e.i.configure(e.o.streaming);try{Ds(e,e.B)}catch(t){qs(e,t)}e.u&&Ps(e),!(t=e.i.h)||t.allowedByApplication&&t.allowedByKeySystem||js(e)}if(e.O&&e.O.Nd(e.o.streaming.forceHTTPS),e.J&&(t=e.o.textDisplayFactory,e.kd!=t)){var n=Ve(t),r=e.J,i=r.m;r.m=n,i&&(n.setTextVisibility(i.isTextVisible()),i.destroy()),r.i&&(r.i.i=n),e.kd=t,e.i&&((n=(t=e.i).g.get(ct))&&jo(t,n.stream,!0,0,!0))}e.u&&(e.u.configure(e.o.abr),e.o.abr.enabled?e.u.enable():e.u.disable(),Gs(e)),e.H&&(t=e.o.streaming.rebufferingGoal,e.B&&(t=Math.max(t,e.B.minBufferTime)),Wn(e.H,t,Math.min(.5,t/2))),e.B&&$s(e.B.presentationTimeline,e.o.playRangeStart,e.o.playRangeEnd)}function As(e){return Array.from(e.g.textTracks).filter((function(e){return"metadata"!=e.kind&&"chapters"!=e.kind&&"Shaka Player TextTrack"!=e.label}))}function Is(e){return Array.from(e.g.textTracks).filter((function(e){return"chapters"==e.kind}))}function Cs(e,t){var n,r;return N((function(i){switch(i.g){case 1:return n=ri(t),(r=Bu[n])?i.return(r):(x(i,2),T(i,ni(t,e.O,e.o.streaming.retryParameters),4));case 4:r=i.h,S(i,3);break;case 2:k(i);case 3:if(r)return i.return(r);throw new qe(1,2,2011,n)}}))}function Ms(e,t,n,r,i,a){var o,s,u;return N((function(c){if(1==c.g)return"text/vtt"==i?c.v(2):T(c,function(e,t,n){var r,i,a;return N((function(o){return 1==o.g?(r=vr,(i=hr([e],n)).method="GET",T(o,t.request(r,i).promise,2)):(a=o.h,o.return(a.data))}))}(t,e.O,e.o.streaming.retryParameters),3);if(2!=c.g){o=c.h;var d=i,f=Vt[d];if(!f)throw new qe(2,2,2014,d);d=f(),f={periodStart:0,segmentStart:0,segmentEnd:e.g.duration};var h=Re(o);d=function(e){function t(e){var n=[],r=700<=e.fontWeight,i="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return r&&n.push("b"),i&&n.push("i"),a&&n.push("u"),r=n.reduce((function(e,t){return e+"<"+t+">"}),""),n=n.reduceRight((function(e,t){return e+"</"+t+">"}),""),e.lineBreak||e.spacer?(e.spacer&&Le("shaka.text.Cue","Please use lineBreak instead of spacer."),"\n"):e.nestedCues.length?e.nestedCues.map(t).join(""):r+e.payload+n}var n=e.map((function(e){if(e.nestedCues.length){var n=e.clone();return n.nestedCues=[],n.payload=t(e),n}return e}));e="WEBVTT\n\n";for(var r=(n=l(n)).next();!r.done;r=n.next()){var i=function(e){var t=Math.floor(e/3600),n=Math.floor(e/60%60),r=Math.floor(e%60);return(10>t?"0":"")+t+":"+(10>n?"0":"")+n+":"+(10>r?"0":"")+r+"."+(100>(e=Math.floor(1e3*e%1e3))?10>e?"00":"0":"")+e};e+=i((r=r.value).startTime)+" --\x3e "+i(r.endTime)+function(e){var t=[];switch(e.textAlign){case"left":t.push("align:left");break;case"right":t.push("align:right");break;case le:t.push("align:middle");break;case"start":t.push("align:start");break;case"end":t.push("align:end")}switch(e.writingMode){case"vertical-lr":t.push("vertical:lr");break;case"vertical-rl":t.push("vertical:rl")}return t.length?" "+t.join(" "):""}(r)+"\n",e+=r.payload+"\n\n"}return e}(d=d.parseMedia(h,f)),s=new Blob([d],{type:"text/vtt"}),t=Wa(s),i="text/vtt"}(u=document.createElement("track")).src=t,u.label=a||"",u.kind=r,u.srclang=n,e.g.getAttribute("crossorigin")||e.g.setAttribute("crossorigin","anonymous"),e.g.appendChild(u),w(c)}))}function Rs(e){var t=ls();return t.streaming.failureCallback=function(t){e.X()&&[1001,1002,1003].includes(t.code)&&(t.severity=1,e.Id())},t.textDisplayFactory=function(){return e.nc?new ts(e.g,e.nc):new $o(e.g)},t}function Ds(e,t){if(e.l!=Ru){for(var n=e.o.restrictions,r=e.md,i=!1,a=l(t.variants),o=a.next();!o.done;o=a.next()){var s=(o=o.value).allowedByApplication;o.allowedByApplication=pn(o,n,r),s!=o.allowedByApplication&&(i=!0)}if(i&&e.i&&Fs(e),(n=e.m?e.m.i:null)&&e.m.m)for(i=(r=l(t.variants)
35).next();!i.done;i=r.next())for(a=(i=l(((i=i.value).video?i.video.drmInfos:[]).concat(i.audio?i.audio.drmInfos:[]))).next();!a.done;a=i.next())if((a=a.value).keySystem==n.keySystem)for(o=(a=l(a.initData||[])).next();!o.done;o=a.next())o=o.value,jr(e.m,o.initDataType,o.initData);Js(e,t)}}function _s(e){var t=e.rd();if(e.j&&e.H&&e.D){var n=e.F;n.j=t,Eo(n),Ls(e)}e.dispatchEvent(ys(uu,{buffering:t}))}function Ns(e){var t=e.g.playbackRate;0!=t&&(e.F&&e.F.set(t),t=ys(bu),e.dispatchEvent(t))}function Ls(e){if(e.j&&e.H){var t=e.j.g;e.H.g==Yn?fs(t,"buffering"):e.g.paused?fs(t,"paused"):e.g.ended?fs(t,"ended"):fs(t,"playing")}}function Ps(e){try{Js(e,e.B)}catch(t){return qs(e,t),!1}var t=e.B.variants.filter((function(e){return Cn(e)}));return t=e.pa.create(t),e.u.setVariants(Array.from(t.values())),!0}function js(e){var t;(t=Ps(e)?e.u.chooseVariant():null)&&Os(e,t,!0,!0,0)}function Os(e,t,n,r,i){var a=e.i.h;if(t==a)r&&Lo(e.i,t,r,i,!0);else{var o=e.j.h;o.h!=t&&(o.h=t,o.g.push({timestamp:Date.now()/1e3,id:t.id,type:"variant",fromAdaptation:n,bandwidth:t.bandwidth})),Lo(e.i,t,r,i),r=null,a&&(r=wn(a)),t=wn(t),n?Bs(e,r,t):Vs(e,r,t)}}function Us(e,t){var n=Array.from(e.g.audioTracks).find((function(e){return e.enabled}));t.enabled=!0,t.id!==n.id&&(n.enabled=!1),Vs(e,n=An(n),An(t))}function Bs(e,t,n){Qs(e,t=ys(su,{yf:t,xf:n}))}function Fs(e){Qs(e,ys(Au))}function Vs(e,t,n){Qs(e,t=ys(Cu,{yf:t,xf:n}))}function Hs(e){Qs(e,ys(wu))}function Ks(e){Qs(e,ys(xu))}function Gs(e){Qs(e,ys(ou,{Bg:e.o.abr.enabled}))}function qs(e,t){if(e.l!=Ru){var n=ys(du,{detail:t});e.dispatchEvent(n),n.defaultPrevented&&(t.handled=!0)}}function zs(e,t,n){e.dispatchEvent(ys(t,{detail:{schemeIdUri:n.schemeIdUri,value:n.value,startTime:n.startTime,endTime:n.endTime,id:n.id,eventElement:n.eventElement}}))}function Xs(e){if(!e.g.error)return null;var t=e.g.error.code;if(1==t)return null;var n=e.g.error.msExtendedCode;return n&&(0>n&&(n+=Math.pow(2,32)),n=n.toString(16)),new qe(2,3,3016,t,n,e.g.error.message)}function Ws(e,t){if(e.i){var n=Object.keys(t),r=1==n.length&&"00"==n[0],i=!1;if(n.length)for(var a=(n=l(e.B.variants)).next();!a.done;a=n.next()){var o=[];(a=a.value).audio&&o.push(a.audio),a.video&&o.push(a.video);for(var s=(o=l(o)).next();!s.done;s=o.next()){var u=s.value;if(s=a.allowedByKeySystem,u.keyIds.size){a.allowedByKeySystem=!0;for(var c=(u=l(u.keyIds)).next();!c.done;c=u.next())c=c.value,c=t[r?"00":c],a.allowedByKeySystem=a.allowedByKeySystem&&!!c&&!Pu.includes(c)}s!=a.allowedByKeySystem&&(i=!0)}}i&&Ps(e),(r=e.i.h)&&!r.allowedByKeySystem&&js(e),i&&Fs(e)}}function Ys(e,t,n){e.s&&e.s.onExpirationUpdated&&e.s.onExpirationUpdated(t,n),t=ys(fu),e.dispatchEvent(t)}function $s(e,t,n){0<t&&(e.X()||e.ve(t)),n<(t=e.getDuration())&&(e.X()||e.Ja(n))}function Js(e,t){var n=e.m?e.m.zc():{},r=Object.keys(n);r=r.length&&"00"==r[0];for(var i=!1,a=!1,o=new Set,s=new Set,u=l(t.variants),c=u.next();!c.done;c=u.next()){var d=[];(c=c.value).audio&&d.push(c.audio),c.video&&d.push(c.video);for(var f=(d=l(d)).next();!f.done;f=d.next())if((f=f.value).keyIds.size)for(var h=(f=l(f.keyIds)).next();!h.done;h=f.next()){h=h.value;var p=n[r?"00":h];p?Pu.includes(p)&&s.add(p):o.add(h)}c.allowedByApplication?c.allowedByKeySystem&&(i=!0):a=!0}if(!i)throw new qe(2,4,4012,n={hasAppRestrictions:a,missingKeys:Array.from(o),restrictedKeyStatuses:Array.from(s)})}function Zs(e){if(!e.variants.some(Cn))throw new qe(2,4,4032)}function Qs(e,t){N((function(n){if(1==n.g)return T(n,Promise.resolve(),2);e.l!=Ru&&e.dispatchEvent(t),w(n)}))}function eu(e){for(var t=new Set,n=(e=l(e)).next();!n.done;n=e.next())(n=n.value).language?t.add(qt(n.language)):t.add("und");return t}function tu(e){for(var t=new Map,n=new Map,r=(e=l(e)).next();!r.done;r=e.next()){var i="und",a=[];(r=r.value).language&&(i=qt(r.language)),(a="variant"==r.type?r.audioRoles:r.roles)&&a.length||(a=[""]),t.has(i)||t.set(i,new Set);for(var o=(a=l(a)).next();!o.done;o=a.next())o=o.value,t.get(i).add(o),r.label&&(n.has(i)||n.set(i,new Map),n.get(i).set(o,r.label))}var s=[];return t.forEach((function(e,t){for(var r=l(e),i=r.next();!i.done;i=r.next()){i=i.value;var a=null;n.has(t)&&n.get(t).has(i)&&(a=n.get(t).get(i)),s.push({language:t,role:i,label:a})}})),s}function nu(){return new qe(2,7,7e3)}function ru(e,t,n,r,i,a){return r==e&&i.G==a.G&&i.uri==a.uri&&i.mimeType==a.mimeType?t:n}function iu(){return{G:null,mimeType:null,startTime:null,Rd:NaN,uri:null}}function au(e){return new Promise((function(t,n){e.mb=function(){return n(nu())},e.Fc=function(){return t()},e.onError=function(e){return n(e)},e.Hc=function(){return n(nu())}}))}_o.prototype.destroy=function(){return this.I.destroy()},_o.prototype.configure=function(e){this.o=e,this.s=new Jn({maxAttempts:Math.max(e.retryParameters.maxAttempts,2),baseDelay:e.retryParameters.baseDelay,backoffFactor:e.retryParameters.backoffFactor,fuzzFactor:e.retryParameters.fuzzFactor,timeout:0,stallTimeout:0,connectionTimeout:0},!0)},_o.prototype.start=function(){var e=this;return N((function(t){if(1==t.g)return T(t,function(e){var t,n,r,i,a,o,s,u,c,d;return N((function(f){if(1==f.g){if(t=dt,!e.h)throw new qe(2,5,5006);return n=new Map,r=new Set,e.h.audio&&(n.set(t.bb,e.h.audio),r.add(e.h.audio)),e.h.video&&(n.set(t.Na,e.h.video),r.add(e.h.video)),e.
35i&&(n.set(t.aa,e.i),r.add(e.i)),i=e.C.P,a=e.o.forceTransmuxTS,T(f,i.init(n,a),2)}wr(e.I);var h=e.B.presentationTimeline.getDuration();for(1/0>h?e.C.P.Ja(h):e.C.P.Ja(Math.pow(2,32)),o=l(n.keys()),s=o.next();!s.done;s=o.next())u=s.value,c=n.get(u),e.g.has(u)||(d=Uo(c),e.g.set(u,d),Ko(e,d,0));w(f)}))}(e),2);wr(e.I),e.m=!0,w(t)}))},_o.prototype.Zb=function(t){var n,r,i,a,o,s=this;return N((function(u){switch(u.g){case 1:if(wr(s.I),t.Ra||null==t.La||t.Qb)return u.return();if(t.La=null,!t.rb){u.v(2);break}return T(u,Ho(s,t,t.Pc,t.uc),3);case 3:return u.return();case 2:if(t.stream.segmentIndex){u.v(4);break}return n=t.stream,T(u,t.stream.createSegmentIndex(),5);case 5:if(n!=t.stream)return null==t.La&&Ko(s,t,0),u.return();case 4:x(u,6),r=function(t,n){if(Fo(n))return function(e,t){var n=Ua(e,"video")||0;Bt(e.i,t,n)}(t.C.P,n.stream.originalId||""),null;n.type==ct&&function(e){e.i&&Bt(e.i,"",0)}(t.C.P);var r=t.C.Ac(),i=n.Aa?n.Aa.endTime:r,a=function(e,t,n){return t==ct?null==(e=e.i).h||e.h<n?0:e.h-Math.max(n,e.g):_a(e=Ba(e,t),n)}(t.C.P,n.type,r),o=Math.max(t.B.minBufferTime||0,t.o.rebufferingGoal,t.o.bufferingGoal)*t.l;if(i>=t.B.presentationTimeline.getDuration())return n.endOfStream=!0,"video"==n.type&&(r=t.g.get(ct))&&Fo(r)&&(r.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return t.o.updateIntervalSeconds/2;if(a=Ua(t.C.P,n.type),a=function(e,t,n,r){if(t.ca)return t.ca.current();if(t.Aa||r)return t.ca=t.stream.segmentIndex.yb(t.Aa?t.Aa.endTime:r),t.ca&&t.ca.next().value;e=e.o.inaccurateManifestTolerance,r=Math.max(n-e,0);var i=null;return e&&(t.ca=t.stream.segmentIndex.yb(r),i=t.ca&&t.ca.next().value),i||(t.ca=t.stream.segmentIndex.yb(n),i=t.ca&&t.ca.next().value),i}(t,n,r,a),!a)return t.o.updateIntervalSeconds;o=1/0;for(var s=Array.from(t.g.values()),u=(s=l(s)).next();!u.done;u=s.next())Fo(u=u.value)||u.ca&&!u.ca.current()||(o=Math.min(o,u.Aa?u.Aa.endTime:r));return i>=o+t.B.presentationTimeline.g?t.o.updateIntervalSeconds:(function(t,n,r,i){var a,o,s,u,l,c,d,f,h,p,g;return N((function(m){switch(m.g){case 1:return a=dt,o=n.stream,s=n.ca,n.Ra=!0,x(m,2),T(m,function(e,t,n){var r,i,a,o,s,u,l;return N((function(c){return r=[],i=Math.max(0,n.appendWindowStart-.1),a=n.appendWindowEnd+.01,(o=n.timestampOffset)==t.vd&&i==t.ud&&a==t.td||(s=function(){var n;return N((function(r){if(1==r.g)return x(r,2),t.ud=i,t.td=a,t.vd=o,T(r,function(e,t,n,r,i){return N((function(a){return t==dt.aa?(e.i.D=n,function(e,t,n){e.j=t,e.l=n}(e.i,r,i),a.return()):T(a,Promise.all([Ka(e,t,(function(){var n=e.j[t].appendWindowStart,r=e.j[t].appendWindowEnd;e.j[t].abort(),e.j[t].appendWindowStart=n,e.j[t].appendWindowEnd=r,Ha(e,t)})),Ka(e,t,(function(){var r=n;0>r&&(r+=.001),e.j[t].timestampOffset=r,Ha(e,t)})),Ka(e,t,(function(){e.j[t].appendWindowStart=0,e.j[t].appendWindowEnd=i,e.j[t].appendWindowStart=r,Ha(e,t)}))]),0)}))}(e.C.P,t.type,o,i,a),4);if(2!=r.g)return S(r,0);throw n=k(r),t.ud=null,t.td=null,t.vd=null,n}))},r.push(s())),!function(e,t){return e&&t?e.Wb()==t.Wb()&&e.Sb()==t.Sb()&&ae(e.ma(),t.ma()):e==t}(n.h,t.Dc)&&(t.Dc=n.h)&&(u=Vo(e,t,n.h),l=function(){var n,r,i;return N((function(a){switch(a.g){case 1:return x(a,2),T(a,u,4);case 4:return n=a.h,wr(e.I),r=t.stream.closedCaptions&&0<t.stream.closedCaptions.size,T(a,Fa(e.C.P,t.type,n,null,null,r),5);case 5:S(a,0);break;case 2:throw i=k(a),t.Dc=null,i}}))},r.push(l())),T(c,Promise.all(r),0)}))}(t,n,i),4);case 4:return wr(t.I),t.j?m.return():(u="video/mp4"==o.mimeType||"audio/mp4"==o.mimeType,l=e.ReadableStream,t.o.lowLatencyMode&&l&&u?(d=new Uint8Array(0),f=function(e){var a,s,u;return N((function(l){return wr(t.I),t.j?l.return():(d=function(e,t){var n=new Uint8Array(e.length+t.length);return n.set(e),n.set(t,e.length),n}(d,e),a=!1,s=0,(new li).box("mdat",(function(e){s=e.size+e.start,a=!0})).parse(d,!1,!0),a?(u=d.subarray(0,s),d=d.subarray(s),T(l,Bo(t,n,r,o,i,u),0)):l.v(0))}))},T(m,Vo(t,n,i,f),6)):T(m,Vo(t,n,i),7));case 7:return c=m.h,wr(t.I),t.j?m.return():n.rb?(n.Ra=!1,Ko(t,n,0),m.return()):T(m,Bo(t,n,r,o,i,c),6);case 6:if(wr(t.I),t.j)return m.return();n.Aa=i,s.next(),n.Ra=!1,n.Hd=!1,h=t.C.P.xc(),p=h[n.type],JSON.stringify(p),n.rb||t.C.Ed(),Ko(t,n,0),S(m,0);break;case 2:if(g=k(m),wr(t.I,g),t.j)return m.return();if(n.Ra=!1,7001==g.code)n.Ra=!1,n.La=null,Ko(t,n,0),m.v(0);else if(n.type==a.aa&&t.o.ignoreTextStreamFailures)t.g.delete(a.aa),m.v(0);else if(3017==g.code)(function(e,t,n){if(!Array.from(e.g.values()).some((function(e){return e!=t&&e.Hd}))){var r=Math.round(100*e.l);if(20<r)e.l-=.2;else{if(!(4<r))return t.Xb=!0,e.j=!0,void e.C.onError(n);e.l-=.04}t.Hd=!0}Ko(e,t,4)})(t,n,g),m.v(0);else{if(1001!=g.code||!g.data||404!=g.data[1])return n.Xb=!0,g.severity=2,T(m,zo(t,g),0);n.Ra=!1,n.La=null,Ko(t,n,1),m.v(0)}}}))}(t,n,r,a).catch((function(){})),null)}(s,t),null!=r&&(Ko(s,t,r),t.Xb=!1),S(u,7);break;case 6:return i=k(u),T(u,zo(s,i),8);case 8:return u.return();case 7:if(a=Array.from(s.g.values()),!s.m||!a.every((function(e){return e.endOfStream}))){u.v(0);break}return T(u,s.C.P.endOfStream(),10);case 10:wr(s.I),0!=(o=s.C.P.getDuration())&&o<s.B.presentationTimeline.getDuration()&&s.B.presentationTimeline.Ja(o),w(u)}}))},Xo.prototype.destroy=function(){return this.I.destroy()},(r=$o.prototype).remove=function(e,t){return!!this.g&&(Zo(this.g,(function(n){return n.startTime<t&&n.endTime>e})),!0)},r.append=function(e){function t(e){var n=[],r=700<=e.fontWeight,i="italic"==e.fontStyle,a=e.textDecoration.includes("underline");return r&&n.push("b"),i&&n.push("i"),a&&n.push("u"),r=n.reduce((function(e,t){return e+"<"+t+">"}),""),n=n.reduceRight((function(e,t){return e+"</"+t+">"}),""),e.lineBreak||e.spacer?(e.spacer&&Le("shaka.extern.Cue","Please use lineBreak instead of spacer."),"\n"):e.nestedCues.length?e.nestedCues.map(t).join(""):r+e.payload+n}var n=e.map((function(e){if(e.nestedCues.length){var n=e.clone();return n.nestedCues=[],n.payload=t(e),n}return e})),r=[];e=this.g.cues?Array.from(this.g.cues):[];for(var i={},a=(n=l(n)).next();!a.done;i={ub:i.ub},a=n.next())i.ub=a.value,e.some(function(e){return function(t){return t.startTime==e.ub.startTime&&t.endTime==e.ub.endTime&&t.text==e.ub.payload}}(i))||(a=Jo(i.ub))&&r.push(a);for(i=(e=l(e=r.slice().sort((function(e,t){return e.startTime!=t.startTime?e.startTime-t.startTime:e.endTime!=t.endTime?e.endTime-t.startTime:"line"in VTTCue.prototype?r.indexOf(t)-r.indexOf(e):r.indexOf(e)-r.indexOf(t)})))).next();!i.done;i=e.next())this.g.addCue(i.value)},r.destroy=function(){return this.g&&(Zo(this.g,(function(){return!0})),this.g.mode="disabled"),this.g=null,Promise.resolve()},r.isTextVisible=function(){return"showing"==this.g.mode},r.setTextVisibility=function(e){this.g.mode=e?"showing":"hidden"},F("shaka.text.SimpleTextDisplayer",$o),$o.prototype.setTextVisibility=$o.prototype.setTextVisibility,$o.prototype.isTextVisible=$o.prototype.isTextVisible,$o.prototype.destroy=$o.prototype.destroy,$o.prototype.append=$o.prototype.append,$o.prototype.remove=$o.prototype.remove,F("shaka.util.Dom",Qo),Qo.removeAllChildren=es,(r=ts.prototype).append=function(e){for(var t=[].concat(c(this.j)),n={},r=(e=l(e)).next();!r.done;n={hc:n.hc},r=e.next())n.hc=r.value,t.some(function(e){return function(t){return se(t,e.hc)}}(n))||this.j.push(n.hc);ns(this)},r.destroy=function(){this.m.removeChild(this.i),this.i=null,this.u=!1,this.j=[],this.D&&this.D.stop(),this.l.clear(),this.h&&(this.h.release(),this.h=null),this.s&&(this.s.disconnect(),this.s=null)},r.remove=function(e,t){return!!this.i&&(this.j=this.j.filter((function(n){return n.startTime<e||n.endTime>=t})),ns(this),!0)},r.isTextVisible=function(){return this.u},r.setTextVisibility=function(e){this.u=e},F("shaka.text.UITextDisplayer",ts),ts.prototype.setTextVisibility=ts.prototype.setTextVisibility,ts.prototype.isTextVisible=ts.prototype.isTextVisible,ts.prototype.remove=ts.prototype.remove,ts.prototype.destroy=ts.prototype.destroy,ts.prototype.append=ts.prototype.append,F("shaka.text.WebVttGenerator",(function(){})),F("shaka.util.ConfigUtils",as),as.convertToConfigObject=ss,as.mergeConfigObjects=os,F("shaka.util.PlayerConfiguration",us),us.mergeConfigObjects=cs,m(vs,or),(r=vs.prototype).destroy=function(){var e,t=this;return N((function(n){switch(n.g){case 1:return t.l==Ru?n.return():(t.l=Ru,e=Wo(t.da,(function(){return{node:t.sa,payload:iu(),ib:!1}})),T(n,new Promise((function(t){e.Db=function(){},e.Fc=function(){t()},e.mb=function(){t()},e.onError=function(){t()},e.Hc=function(){t()}})),2));case 2:return T(n,t.da.destroy(),3);case 3:if(t.h&&(t.h.release(),t.h=null),t.fd=null,t.u=null,t.o=null,t.j=null,t.nc=null,!t.O){n.v(0);break}return T(n,t.O.destroy(),5);case 5:t.O=null,w(n)}}))},r.Pb=function(e,t){if(t=void 0===t||t,this.l==Ru)return Promise.reject(nu()
35);var n=iu();n.G=e,en()||(t=!1);var r=t?this.Ea:this.Oa,i=Wo(this.da,(function(){return{node:r,payload:n,ib:!1}}));return i.Db=function(){},au(i)},r.detach=function(){var e=this;if(this.l==Ru)return Promise.reject(nu());var t=Wo(this.da,(function(){return{node:e.sa,payload:iu(),ib:!1}}));return t.Db=function(){},au(t)},r.Td=function(e){var t=this;if(e=void 0===e||e,this.l==Ru)return Promise.reject(nu());en()||(e=!1);var n=iu(),r=Wo(this.da,(function(r){var i=r.G&&e?t.Ea:r.G?t.Oa:t.sa;return n.G=r.G,{node:i,payload:n,ib:!1}}));return r.Db=function(){},au(r)},r.load=function(e,t,n){var r=this;if(this.l==Ru)return Promise.reject(nu());this.dispatchEvent(ys(pu));var i=iu();i.uri=e,i.Rd=Date.now()/1e3,n&&(i.mimeType=n),void 0!==t&&(i.startTime=t);var a=function(e,t){if(!en())return!0;var n=t.mimeType,r=t.uri||"";if(n||(n=ri(r),n=Uu[n]),n){if(""==(t.G||un()).canPlayType(n))return!1;if(!en()||!(n in ii)&&!(ri(r)in ai)||e.o.streaming.preferNativeHls)return!0;if(an())return e.o.streaming.useNativeHlsOnSafari}return!1}(this,i)?this.Ma:this.N,o=Wo(this.da,(function(e){return null==e.G?null:(i.G=e.G,{node:a,payload:i,ib:!0})}));return this.j=new ms,o.Db=function(){},new Promise((function(e,t){o.Hc=function(){return t(new qe(2,7,7002))},o.Fc=function(){e(),r.dispatchEvent(ys(hu))},o.mb=function(){return t(nu())},o.onError=function(e){return t(e)}}))},r.configure=function(e,t){2==arguments.length&&"string"==typeof e&&(e=ss(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(Le("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),e.streaming&&e.streaming.lowLatencyMode&&(null==e.streaming.inaccurateManifestTolerance&&(e.streaming.inaccurateManifestTolerance=0),null==e.streaming.rebufferingGoal&&(e.streaming.rebufferingGoal=.01));var n=cs(this.o,e,Rs(this));return ks(this),n},r.getConfiguration=function(){var e=Rs(this);return cs(e,this.o,Rs(this)),e},r.Se=function(){if(this.g){var e=this.g.buffered.length;e=e?this.g.buffered.end(e-1):0;var t=this.getConfiguration().streaming.bufferingGoal;if(e>=(t=Math.min(this.g.currentTime+t,this.bc().end)))return 1;if(!(e<=this.g.currentTime)&&e<t)return(e-this.g.currentTime)/(t-this.g.currentTime)}return 0},r.Lf=function(){for(var e in this.o)delete this.o[e];cs(this.o,Rs(this),Rs(this)),ks(this)},r.Ye=function(){return this.l},r.bf=function(){return this.g},r.Ub=function(){return this.O},r.od=function(){return this.Wa},r.be=function(){return this.L?this.L:null},r.X=function(){return this.B?this.B.presentationTimeline.X():!(!this.g||!this.g.src)&&1/0==this.g.duration},r.kb=function(){return!!this.B&&this.B.presentationTimeline.kb()},r.sf=function(){if(this.B){var e=this.B.variants;return!!e.length&&!e[0].video}return!(!this.g||!this.g.src)&&(this.g.videoTracks?0==this.g.videoTracks.length:0==this.g.videoHeight)},r.bc=function(){if(this.B){var e=this.B.presentationTimeline;return{start:e.zb(),end:e.Qa()}}return this.g&&this.g.src&&(e=this.g.seekable).length?{start:e.start(0),end:e.end(e.length-1)}:{start:0,end:0}},r.qf=function(){this.X()&&(this.g.currentTime=this.bc().end)},r.keySystem=function(){var e=this.drmInfo();return e?e.keySystem:""},r.drmInfo=function(){return this.m?this.m.i:null},r.Tb=function(){return this.m?this.m.Tb():1/0},r.zc=function(){return this.m?this.m.zc():{}},r.rd=function(){return!!this.H&&this.H.g==Yn},r.df=function(){return this.g?this.F?this.F.i:1:0},r.Uf=function(e){0==e?X("A trick play rate of 0 is unsupported!"):(this.g.paused&&this.g.play(),this.F.set(e),this.l==_u&&(this.u.playbackRateChanged(e),No(this.i,1<Math.abs(e))))},r.Ie=function(){var e=this.F.yc();this.l==Nu&&this.F.set(e),this.l==_u&&(this.F.set(e),this.u.playbackRateChanged(e),No(this.i,!1))},r.Cc=function(){if(this.B){for(var e=this.i?this.i.h:null,t=[],n=l(this.B.variants),r=n.next();!r.done;r=n.next())if(Cn(r=r.value)){var i=wn(r);i.active=r==e,t.push(i)}return t}return this.g&&this.g.audioTracks?Array.from(this.g.audioTracks).map((function(e){return An(e)})):[]},r.hb=function(){if(this.B){for(var e=this.i?this.i.i:null,t=[],n=l(this.B.textStreams),r=n.next();!r.done;r=n.next()){var i=xn(r=r.value);i.active=r==e,t.push(i)}return t}return this.g&&this.g.src&&this.g.textTracks?As(this).map((function(e){return kn(e)})):[]},r.We=function(){return this.B?this.B.imageStreams.map((function(e){return En(e)})):[]},r.mf=function(e,t){var n,r,i,a,o,s,u,l,c,d,f,h,p,g,m,v,y,b,w=this;return N((function(x){return 1==x.g?w.B?(n=w.B.imageStreams.find((function(t){return t.id==e})))?n.segmentIndex?x.v(3):T(x,n.createSegmentIndex(),3):x.return(null):x.v(2):2!=x.g?null==(r=n.segmentIndex.find(t))?x.return(null):(i=n.segmentIndex.get(r),a=i.tilesLayout||n.tilesLayout,(o=/(\d+)x(\d+)/.exec(a))?(s=n.width||0,u=n.height||0,l=parseInt(o[1],10),c=parseInt(o[2],10),d=s/l,f=u/c,h=l*c,p=i.j-i.startTime,g=p/h,m=i.startTime,y=v=0,1<h&&(b=Math.floor((t-i.startTime)/g),m=i.startTime+b*g,v=b%l*d,y=Math.floor(b/l)*f),x.return({height:f,positionX:v,positionY:y,startTime:m,duration:g,uris:i.ma(),width:d})):x.return(null)):x.return(null)}))},r.re=function(e){if(this.B&&this.i){var t=this.B.textStreams.find((function(t){return t.id==e.id}));t&&t!=this.i.i&&(gs(this.j.h,t,!1),Po(this.i,t),Hs(this),this.qa=t.language)}else if(this.g&&this.g.src&&this.g.textTracks){for(var n=(t=l(t=As(this))).next();!n.done;n=t.next())Sn(n=n.value)==e.id?n.mode=this.Y?"showing":"hidden":n.mode="disabled";Hs(this)}},r.se=function(e,t,n){if(t=void 0!==t&&t,n=void 0===n?0:n,this.B&&this.i){this.o.abr.enabled&&X("Changing tracks while abr manager is enabled will likely result in the selected track being overriden. Consider disabling abr before calling selectVariantTrack().");var r=this.B.variants.find((function(t){return t.id==e.id}));r&&Cn(r)&&(Os(this,r,!1,t,n),this.pa=new qn(r),Ps(this))}else if(this.g&&this.g.audioTracks)for(n=(t=l(t=Array.from(this.g.audioTracks))).next();!n.done;n=t.next())if(Sn(n=n.value)==e.id){Us(this,n);break}},r.Re=function(){return tu(this.Cc())},r.lf=function(){return tu(this.hb())},r.Qe=function(){return Array.from(eu(this.Cc()))},r.kf=function(){return Array.from(eu(this.hb()))},r.Kd=function(e,t){if(this.B&&this.D){this.pa=new zn(e,t||"",0,"");for(var n=function(e,t){return e.video||t.video?e.video&&t.video?Math.abs((e.video.height||0)-(t.video.height||0))+Math.abs((e.video.width||0)-(t.video.width||0)):1/0:0},r=this.i.h,i=this.pa.create(this.B.variants),a=null,o=(i=l(i.values())
35).next();!o.done;o=i.next())o=o.value,(!a||n(a,r)>n(o,r))&&(a=o);a?(n=wn(a),this.se(n,!0)):js(this)}else if(this.g&&this.g.audioTracks){for(i=Array.from(this.g.audioTracks),n=qt(e),a=r=null,o=(i=l(i)).next();!o.done;o=i.next()){var s=An(o=o.value);qt(s.language)==n&&(r=o,t?s.roles.includes(t)&&(a=o):0==s.roles.length&&(a=o))}a?Us(this,a):r&&Us(this,r)}},r.Ld=function(e,t,n){if(n=void 0!==n&&n,this.B&&this.D)this.qa=e,this.Nb=t||"",this.Xa=n,(e=Rn(this.B.textStreams,this.qa,this.Nb,this.Xa)[0]||null)&&e!=this.i.i&&(gs(this.j.h,e,!1),this.o.streaming.alwaysStreamText||this.sd())&&(Po(this.i,e),Hs(this));else{var r=qt(e);(e=this.hb().find((function(e){return qt(e.language)==r&&(!t||e.roles.includes(t))&&e.forced==n})))&&this.re(e)}},r.Mf=function(e){if(this.B&&this.D){for(var t=null,n=l(this.B.variants),r=n.next();!r.done;r=n.next())if((r=r.value).audio.label==e){t=r;break}null!=t&&(this.pa=new zn(t.language,"",0,e),js(this))}},r.sd=function(){var e=this.Y;return this.J?this.J.m.isTextVisible():this.g&&this.g.src&&this.g.textTracks?As(this).some((function(e){return"showing"==e.mode})):e},r.ce=function(){return this.g&&this.g.src&&this.g.textTracks?Is(this).map((function(e){return kn(e)})):[]},r.Te=function(e){var t=qt(e),n=Is(this).find((function(e){return qt(e.language)==t}));if(!n||!n.cues)return[];e=[];for(var r=(n=l(n.cues)).next();!r.done;r=n.next())r=r.value,e.push({title:r.text,startTime:r.startTime,endTime:r.endTime});return e},r.Sf=function(e){if(e=!!e,this.Y!=e){if(this.Y=e,this.l==_u)this.J.m.setTextVisibility(e),this.o.streaming.alwaysStreamText||(e?this.i.i||0<(e=Rn(this.B.textStreams,this.qa,this.Nb,this.Xa)).length&&(Po(this.i,e[0]),Hs(this)):function(e){var t=e.g.get(ct);t&&(Go(t),qo(t).catch((function(){})),e.g.delete(ct)),e.i=null}(this.i));else if(this.g&&this.g.src&&this.g.textTracks)for(var t=As(this),n=(t=l(t)).next();!n.done;n=t.next())"disabled"!=(n=n.value).mode&&(n.mode=e?"showing":"hidden");Ks(this)}},r.ff=function(){if(!this.X())return null;var e=this.da.l,t=0;if(this.D)t=this.D.l();else if(e){if(null==e.startTime)return new Date;t=e.startTime}return this.B?new Date(1e3*(this.B.presentationTimeline.j+t)):this.g&&this.g.getStartDate?(e=this.g.getStartDate(),isNaN(e.getTime())?null:new Date(e.getTime()+1e3*t)):null},r.de=function(){if(!this.X())return null;if(this.B)return new Date(1e3*this.B.presentationTimeline.j);if(this.g&&this.g.getStartDate){var e=this.g.getStartDate();return isNaN(e.getTime())?null:e}return null},r.xc=function(){if(this.l==_u)return this.J.xc();var e={total:[],audio:[],video:[],text:[]};return this.l==Nu&&(e.total=Na(this.g.buffered)),e},r.getStats=function(){if(this.l!=_u&&this.l!=Nu)return{width:NaN,height:NaN,streamBandwidth:NaN,decodedFrames:NaN,droppedFrames:NaN,corruptedFrames:NaN,estimatedBandwidth:NaN,completionPercent:NaN,loadLatency:NaN,manifestTimeSeconds:NaN,drmTimeSeconds:NaN,playTime:NaN,pauseTime:NaN,bufferingTime:NaN,licenseTime:NaN,liveLatency:NaN,maxSegmentDuration:NaN,switchHistory:[],stateHistory:[]};Ls(this);var e=this.g,t=e.currentTime/e.duration;if(!isNaN(t)){var n=this.j;t=Math.round(100*t),n.i=isNaN(n.i)?t:Math.max(n.i,t)}e.getVideoPlaybackQuality&&(e=e.getVideoPlaybackQuality(),n=this.j,t=Number(e.totalVideoFrames),n.T=Number(e.droppedVideoFrames),n.N=t,this.j.L=Number(e.corruptedVideoFrames)),this.m?e=(e=this.m).F?e.F:NaN:e=NaN,this.j.m=e,this.l==_u&&((e=this.i.h)&&(this.j.u=(this.F?this.F.i:1)*e.bandwidth),e&&e.video&&(n=this.j,t=e.video.height||NaN,n.Y=e.video.width||NaN,n.D=t),this.X()&&(e=this.de().valueOf()+1e3*this.bc().end,this.j.F=(Date.now()-e)/1e3),this.B&&this.B.presentationTimeline&&(this.j.J=this.B.presentationTimeline.g),e=this.u.getBandwidthEstimate(),this.j.s=e);var r=this.j;e=r.Y,n=r.D,t=r.u;for(var i=r.N,a=r.T,o=r.L,s=r.s,u=r.i,c=r.l,d=r.H,f=r.j,h=hs(r.g,"playing"),p=hs(r.g,"paused"),g=hs(r.g,"buffering"),m=r.m,v=r.F,y=r.J,b=function(e){function t(e){return{timestamp:e.timestamp,state:e.state,duration:e.duration}}for(var n=[],r=l(e.h),i=r.next();!i.done;i=r.next())n.push(t(i.value));return e.g&&n.push(t(e.g)),n}(r.g),T=[],w=(r=l(r.h.g)).next();!w.done;w=r.next())w=w.value,T.push({timestamp:w.timestamp,id:w.id,type:w.type,fromAdaptation:w.fromAdaptation,bandwidth:w.bandwidth});return{width:e,height:n,streamBandwidth:t,decodedFrames:i,droppedFrames:a,corruptedFrames:o,estimatedBandwidth:s,completionPercent:u,loadLatency:c,manifestTimeSeconds:d,drmTimeSeconds:f,playTime:h,pauseTime:p,bufferingTime:g,licenseTime:m,liveLatency:v,maxSegmentDuration:y,stateHistory:b,switchHistory:T}},r.addTextTrack=function(e,t,n,r,i,a,o){if(o=void 0!==o&&o,Le("addTextTrack","Please use an addTextTrackAsync."),this.l!=_u&&this.l!=Nu)throw new qe(1,7,7004);if(!r){var s=ri(e);if(!(r=Bu[s]))throw new qe(1,2,2011,s)}if(this.l==Nu){if("text/vtt"!=r)throw new qe(1,2,2013,r);if(o&&(n="forced"),(r=document.createElement("track")).src=e,r.label=a||"",r.kind=n,r.srclang=t,this.g.getAttribute("crossorigin")||this.g.setAttribute("crossorigin","anonymous"),this.g.appendChild(r),e=this.hb().find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return Fs(this),e;throw new qe(1,2,2012)}if(1/0==(s=this.B.presentationTimeline.getDuration()))throw new qe(1,4,4033);if(!Ut(Nt((e={id:this.nd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:bo(0,s,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:ct,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}).mimeType,e.codecs)))throw new qe(2,2,2014,r);return this.B.textStreams.push(e),Fs(this),xn(e)},r.Ee=function(e,t,n,r,i,a,o){o=void 0!==o&&o;var s,u,l,c,d,f,h=this;return N((function(p){switch(p.g){case 1:if(h.l!=_u&&h.l!=Nu)throw new qe(1,7,7004);if(r){p.v(2);break}return T(p,Cs(h,e),3);case 3:r=p.h;case 2:if(h.l!=Nu){p.v(4);break}return o&&(n="forced"),T(p,Ms(h,e,t,n,r,a),5);case 5:if(s=h.hb(),u=s.find((function(e){return e.language==t&&e.label==(a||"")&&e.kind==n})))return Fs(h),p.return(u);throw new qe(1,2,2012);case 4:if(l=dt,1/0==(c=h.B.presentationTimeline.getDuration()))throw new qe(1,4,4033);if(d={id:h.nd++,originalId:null,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:bo(0,c,[e]),mimeType:r||"",codecs:i||"",kind:n,encrypted:!1,drmInfos:[],keyIds:new Set,language:t,label:a||null,type:l.aa,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!o,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},f=Nt(d.mimeType,d.codecs),!Ut(f))throw new qe(2,2,2014,r);return h.B.textStreams.push(d),Fs(h),p.return(xn(d))}}))},r.De=function(e,t,n){var r,i,a,o,s,u,c=this;return N((function(d){switch(d.g){case 1:if(c.l!=_u&&c.l!=Nu)throw new qe(1,7,7004);if(n){d.v(2);break}return T(d,Cs(c,e),3);case 3:n=d.h;case 2:return T(d,Ms(c,e,t,"chapters",n),4);case 4:if(r=c.ce(),i=r.find((function(e){return e.language==t}
35))){for(a=Is(c),o=l(a),s=o.next();!s.done;s=o.next())u=s.value,ws(c,u);return d.return(i)}throw new qe(1,2,2012)}}))},r.Od=function(e,t){this.md.width=e,this.md.height=t},r.Id=function(){if(this.l==_u){var e=this.i;if(e.I.g)e=!1;else if(e.j)e=!1;else{for(var t=l(e.g.values()),n=t.next();!n.done;n=t.next())(n=n.value).Xb&&(n.Xb=!1,Ko(e,n,.1));e=!0}}else e=!1;return e},r.Ze=function(){return X("Shaka Player's internal Manifest structure is NOT covered by semantic versioning compatibility guarantees. It may change at any time! Please consider filing a feature request for whatever you use getManifest() for."),this.B},r.$e=function(){return this.rc},r.we=function(e){this.nc=e},r.wc=function(e){var t=this;return N((function(n){if(1==n.g)return T(n,function(e,t){return N((function(n){if(1==n.g)return T(n,gn(e.i?e.i.h:null,t),2);Zs(t),w(n)}))}(t,e),2);Ds(t,e),w(n)}))},F("shaka.Player",vs),vs.prototype.setVideoContainer=vs.prototype.we,vs.prototype.getManifestParserFactory=vs.prototype.$e,vs.prototype.getManifest=vs.prototype.Ze,vs.prototype.retryStreaming=vs.prototype.Id,vs.prototype.setMaxHardwareResolution=vs.prototype.Od,vs.prototype.addChaptersTrack=vs.prototype.De,vs.prototype.addTextTrackAsync=vs.prototype.Ee,vs.prototype.addTextTrack=vs.prototype.addTextTrack,vs.prototype.getStats=vs.prototype.getStats,vs.prototype.getBufferedInfo=vs.prototype.xc,vs.prototype.getPresentationStartTimeAsDate=vs.prototype.de,vs.prototype.getPlayheadTimeAsDate=vs.prototype.ff,vs.prototype.setTextTrackVisibility=vs.prototype.Sf,vs.prototype.getChapters=vs.prototype.Te,vs.prototype.getChaptersTracks=vs.prototype.ce,vs.prototype.isTextTrackVisible=vs.prototype.sd,vs.prototype.selectVariantsByLabel=vs.prototype.Mf,vs.prototype.selectTextLanguage=vs.prototype.Ld,vs.prototype.selectAudioLanguage=vs.prototype.Kd,vs.prototype.getTextLanguages=vs.prototype.kf,vs.prototype.getAudioLanguages=vs.prototype.Qe,vs.prototype.getTextLanguagesAndRoles=vs.prototype.lf,vs.prototype.getAudioLanguagesAndRoles=vs.prototype.Re,vs.prototype.selectVariantTrack=vs.prototype.se,vs.prototype.selectTextTrack=vs.prototype.re,vs.prototype.getThumbnails=vs.prototype.mf,vs.prototype.getImageTracks=vs.prototype.We,vs.prototype.getTextTracks=vs.prototype.hb,vs.prototype.getVariantTracks=vs.prototype.Cc,vs.prototype.cancelTrickPlay=vs.prototype.Ie,vs.prototype.trickPlay=vs.prototype.Uf,vs.prototype.getPlaybackRate=vs.prototype.df,vs.prototype.isBuffering=vs.prototype.rd,vs.prototype.getKeyStatuses=vs.prototype.zc,vs.prototype.getExpiration=vs.prototype.Tb,vs.prototype.drmInfo=vs.prototype.drmInfo,vs.prototype.keySystem=vs.prototype.keySystem,vs.prototype.goToLive=vs.prototype.qf,vs.prototype.seekRange=vs.prototype.bc,vs.prototype.isAudioOnly=vs.prototype.sf,vs.prototype.isInProgress=vs.prototype.kb,vs.prototype.isLive=vs.prototype.X,vs.prototype.getAdManager=vs.prototype.be,vs.prototype.getAssetUri=vs.prototype.od,vs.prototype.getNetworkingEngine=vs.prototype.Ub,vs.prototype.getMediaElement=vs.prototype.bf,vs.prototype.getLoadMode=vs.prototype.Ye,vs.prototype.resetConfiguration=vs.prototype.Lf,vs.prototype.getBufferFullness=vs.prototype.Se,vs.prototype.getConfiguration=vs.prototype.getConfiguration,vs.prototype.configure=vs.prototype.configure,vs.prototype.load=vs.prototype.load,vs.prototype.unload=vs.prototype.Td,vs.prototype.detach=vs.prototype.detach,vs.prototype.attach=vs.prototype.Pb,vs.probeSupport=function(e){var t,n,r,i,a;return e=void 0===e||e,N((function(o){if(1==o.g)return t={},e?T(o,function(){var e,t,n,r,i,a;return N((function(o){return 1==o.g?(e="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.apple.fps.3_0 com.apple.fps.2_0 com.apple.fps.1_0 com.apple.fps com.adobe.primetime".split(" "),n=[{videoCapabilities:t=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}],persistentState:"required",sessionTypes:["persistent-license"]},{initDataTypes:["cenc"],videoCapabilities:t}],r=new Map,i=function(e){var t,i,a;return N((function(o){switch(o.g){case 1:return x(o,2),T(o,navigator.requestMediaKeySystemAccess(e,n),4);case 4:return t=o.h,a=!!(i=t.getConfiguration().sessionTypes)&&i.includes("persistent-license"),sn("Tizen 3")&&(a=!1),r.set(e,{persistentState:a}),T(o,t.createMediaKeys(),5);case 5:S(o,0);break;case 2:k(o),r.set(e,null),w(o)}}))},a=e.map((function(e){return i(e)})),T(o,Promise.all(a),2)):o.return(Mr(r))}))}(),3):o.v(2);2!=o.g&&(t=o.h);var s={};if(en()){for(var u in ii)s[u]=!0;for(var c in ai)s[c]=!0}
35u={mpd:"application/dash+xml",m3u8:"application/x-mpegurl",ism:"application/vnd.ms-sstr+xml"};for(var d=(c=l(["application/dash+xml","application/x-mpegurl","application/vnd.apple.mpegurl","application/vnd.ms-sstr+xml"])).next();!d.done;d=c.next())s[d=d.value]=en()?!!ii[d]:tn(d);for(var f in u)s[f]=en()?!!ai[f]:tn(u[f]);for(n=s,s={},u=(f=l('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",video/mp4; codecs="av01.0.01M.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(","))).next();!u.done;u=f.next())s[u=u.value]=en()?!!Ut(u)||(MediaSource.isTypeSupported(u)||Rt(u)):tn(u),s[c=u.split(";")[0]]=s[c]||s[u];for(a in r={manifest:n,media:s,drm:t},i=ju)r[a]=i[a]();return o.return(r)}))},vs.isBrowserSupported=function(){if(e.Promise||X("A Promise implementation or polyfill is required"),e.TextDecoder&&e.TextEncoder||X("A TextDecoder/TextEncoder implementation or polyfill is required"),!(e.Promise&&e.Uint8Array&&e.TextDecoder&&e.TextEncoder&&Array.prototype.forEach)||sn("Trident/"))return!1;var t=on();return!(t&&12>t||!(e.MediaKeys&&e.navigator&&e.navigator.requestMediaKeySystemAccess&&e.MediaKeySystemAccess&&e.MediaKeySystemAccess.prototype.getConfiguration))&&(!!en()||tn("application/x-mpegurl"))},vs.setAdManagerFactory=function(e){Ou=e},vs.registerSupportPlugin=function(e,t){ju[e]=t},vs.prototype.destroy=vs.prototype.destroy;var ou="abrstatuschanged",su="adaptation",uu="buffering",lu="drmsessionupdate",cu="emsg",du="error",fu="expirationupdated",hu="loaded",pu="loading",gu="manifestparsed",mu="metadata",vu="onstatechange",yu="onstateidle",bu="ratechange",Tu="streaming",wu="textchanged",xu="texttrackvisibility",Eu="timelineregionadded",Su="timelineregionenter",ku="timelineregionexit",Au="trackschanged",Iu="unloading",Cu="variantchanged",Mu={ag:ou,bg:su,cg:uu,dg:lu,fg:cu,Error:du,gg:fu,hg:"largegap",ig:hu,jg:pu,kg:gu,Metadata:mu,lg:vu,mg:yu,ng:bu,og:"sessiondata",pg:Tu,qg:wu,rg:xu,sg:Eu,tg:Su,ug:ku,vg:Au,wg:Iu,xg:Cu},Ru=0,Du=1,_u=2,Nu=3;vs.LoadMode={DESTROYED:Ru,NOT_LOADED:Du,MEDIA_SOURCE:_u,SRC_EQUALS:Nu},vs.version="v3.2.0";var Lu=["3","2"];Oe=new function(e){this.g=e,this.i=Pe,this.h=je}(new Ne(Number(Lu[0]),Number(Lu[1])));var Pu=["output-restricted","internal-error"],ju={},Ou=null,Uu={mp4:"video/mp4",m4v:"video/mp4",m4a:"audio/mp4",webm:"video/webm",weba:"audio/webm",mkv:"video/webm",ts:"video/mp2t",ogv:"video/ogg",ogg:"audio/ogg",mpg:"video/mpeg",mpeg:"video/mpeg",m3u8:"application/x-mpegurl",mp3:"audio/mpeg",aac:"audio/aac",flac:"audio/flac",wav:"audio/wav"},Bu={sbv:"text/x-subviewer",srt:"text/srt",vtt:"text/vtt",webvtt:"text/vtt",ttml:"application/ttml+xml",lrc:"application/x-subtitle-lrc",ssa:"text/x-ssa",ass:"text/x-ssa"};function Fu(){this.h=[],this.j=this.i=this.g=0}function Vu(e,t){var n=this;this.i=e,this.g=t,this.j=!1,this.l=this.g.getVolume(),this.h=new xr,this.h.A(this.g,google.ima.AdEvent.Type.PAUSED,(function(){n.j=!0})),this.h.A(this.g,google.ima.AdEvent.Type.RESUMED,(function(){n.j=!1}))}function Hu(e,t,n,r){var i=this;this.m=e,this.g=t,this.u=NaN,this.j=r,this.s=null,this.h=new xr,google.ima.settings.setLocale(n),(e=new google.ima.AdDisplayContainer(this.m,this.g)).initialize(),this.l=new google.ima.AdsLoader(e),this.l.getSettings().setPlayerType("shaka-player"),this.l.getSettings().setPlayerVersion("v3.2.0"),this.i=null,this.h.va(this.l,google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,(function(e){!function(e,t){e.j(new ar("ads-loaded",{loadTime:Date.now()/1e3-e.u})),e.i=t.getAdsManager(e.g),e.j(new ar("ima-ad-manager-loaded",{imaAdManager:e.i}));var n=e.i.getCuePoints();if(n.length){for(var r=[],i=(n=l(n)).next();!i.done;i=n.next())r.push(new Yu(i.value));e.j(new ar("ad-cue-points-changed",{cuepoints:r}))}!function(e){e.h.A(e.i,google.ima.AdErrorEvent.Type.AD_ERROR,(function(t){Ku(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED,(function(t){Gu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.STARTED,(function(t){Gu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.FIRST_QUARTILE,(function(t){e.j(new ar("ad-first-quartile",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.MIDPOINT,(function(t){e.j(new ar("ad-midpoint",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.THIRD_QUARTILE,(function(t){e.j(new ar("ad-third-quartile",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.COMPLETE,(function(t){e.j(new ar("ad-complete",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED,(function(t){qu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){qu(e,t)})),e.h.A(e.i,google.ima.AdEvent.Type.SKIPPED,(function(t){e.j(new ar("ad-skipped",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.VOLUME_CHANGED,(function(t){e.j(new ar("ad-volume-changed",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.VOLUME_MUTED,(function(t){e.j(new ar("ad-muted",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.PAUSED,(function(t){e.s.j=!0,e.j(new ar("ad-paused",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.RESUMED,(function(t){e.s.j=!1,e.j(new ar("ad-resumed",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.SKIPPABLE_STATE_CHANGED,(function(t){e.j(new ar("ad-skip-state-changed",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.CLICK,(function(t){e.j(new ar("ad-clicked",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.AD_PROGRESS,(function(t){e.j(new ar("ad-progress",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.AD_BUFFERING,(function(t){e.j(new ar("ad-buffering",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.IMPRESSION,(function(t){e.j(new ar("ad-impression",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.DURATION_CHANGE,(function(t){e.j(new ar("ad-duration-changed",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.USER_CLOSE,(function(t){e.j(new ar("ad-closed",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.LOADED,(function(t){e.j(new ar("ad-loaded",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.ALL_ADS_COMPLETED,(function(t){e.j(new ar("all-ads-completed",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.LINEAR_CHANGED,(function(t){e.j(new ar("ad-linear-changed",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.AD_METADATA,(function(t){e.j(new ar("ad-metadata",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.LOG,(function(t){e.j(new ar("ad-recoverable-error",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.AD_BREAK_READY,(function(t){e.j(new ar("ad-break-ready",{originalEvent:t}))})),e.h.A(e.i,google.ima.AdEvent.Type.INTERACTION,(function(t){e.j(new ar("ad-interaction",{originalEvent:t}))}))}(e);try{e.i.init(e.g.offsetWidth,e.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL),e.h.A(e.g,"loadeddata",(function(){e.i.resize(e.g.offsetWidth,e.g.offsetHeight,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)})),e.i.start()}catch(t){qu(e,null)}}(i,e)})),this.h.A(this.l,google.ima.AdErrorEvent.Type.AD_ERROR,(function(e){Ku(i,e)}
35)),this.g.onended=function(){i.l.contentComplete()}}function Ku(e,t){t.getError(),qu(e,null),e.j(new ar("ad-cue-points-changed",{cuepoints:[]}))}function Gu(e,t){var n=t.getAd();e.s=new Vu(n,e.i),e.j(new ar("ad-started",{ad:e.s,sdkAdObject:n,originalEvent:t})),e.m.setAttribute("ad-active","true"),e.g.pause()}function qu(e,t){e.j(new ar("ad-stopped",{originalEvent:t})),e.m.removeAttribute("ad-active"),e.g.play()}function zu(e,t){this.i=e,this.h=null,this.g=t}function Xu(e,t,n,r){var i=this;this.u=e,this.g=t,this.l=null,this.J=NaN,this.j=r,this.H=!1,this.D=this.m=this.s=null,this.F="",this.h=new xr,(e=new google.ima.dai.api.UiSettings).setLocale(n),this.i=new google.ima.dai.api.StreamManager(this.g,this.u,e),this.j(new ar("ima-stream-manager-loaded",{imaStreamManager:this.i})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.LOADED,(function(e){!function(e,t){e.j(new ar("ads-loaded",{loadTime:Date.now()/1e3-e.J}));var n=t.getStreamData().url;e.l.resolve(n),e.l=null,e.H||e.h.A(e.g,"seeked",(function(){var t=e.g.currentTime;if(0!=t){e.i.streamTimeForContentTime(t);var n=e.i.previousCuePointForStreamTime(t);n&&!n.played&&(e.s=t,e.g.currentTime=n.start)}}))}(i,e)})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.ERROR,(function(){i.F.length?i.l.resolve(i.F):i.l.reject("IMA Stream request returned an error and there was no backup asset uri provided."),i.l=null})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_STARTED,(function(){})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.STARTED,(function(e){e=e.getAd(),i.m=new zu(e,i.g),i.D&&(i.m.h=i.D),i.j(new ar("ad-started",{ad:i.m})),i.u.setAttribute("ad-active","true")})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_BREAK_ENDED,(function(){i.u.removeAttribute("ad-active");var e=i.g.currentTime;i.s&&i.s>e&&(i.g.currentTime=i.s,i.s=null)})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.AD_PROGRESS,(function(e){i.D=e.getStreamData().adProgressData,i.m&&(i.m.h=i.D)})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.FIRST_QUARTILE,(function(){i.j(new ar("ad-first-quartile"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.MIDPOINT,(function(){i.j(new ar("ad-midpoint"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.THIRD_QUARTILE,(function(){i.j(new ar("ad-third-quartile"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.COMPLETE,(function(){i.j(new ar("ad-complete")),i.j(new ar("ad-stopped")),i.u.removeAttribute("ad-active"),i.m=null})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.SKIPPED,(function(){i.j(new ar("ad-skipped")),i.j(new ar("ad-stopped"))})),this.h.A(this.i,google.ima.dai.api.StreamEvent.Type.CUEPOINTS_CHANGED,(function(e){var t=e.getStreamData();e=[];for(var n=(t=l(t.cuepoints)).next();!n.done;n=t.next())n=n.value,e.push(new Yu(n.start,n.end));i.j(new ar("ad-cue-points-changed",{cuepoints:e}))}))}function Wu(){or.call(this),this.g=this.h=null,this.j=new Fu,this.i=navigator.language}function Yu(e,t){this.start=e,this.end=void 0===t?null:t}function $u(e){return JSON.stringify(e,(function(e,t){if("function"!=typeof t){if(t instanceof Event||t instanceof ar){var n={};for(i in t){var r=t[i];r&&"object"==typeof r?"detail"==i&&(n[i]=r):i in Event||(n[i]=r)}return n}if(t instanceof Error){var i=new Set(["name","message","stack"]);for(n in t)i.add(n);for(n=(r=l(Object.getOwnPropertyNames(t))).next();!n.done;n=r.next())i.add(n.value);for(r={},n=(i=l(i)).next();!n.done;n=i.next())r[n=n.value]=t[n];i={__type__:"Error",contents:r}}else if(t instanceof TimeRanges)for(i={__type__:"TimeRanges",length:t.length,start:[],end:[]},r=(n=l(Na(t))).next();!r.done;r=n.next()){var a=(r=r.value).end;i.start.push(r.start),i.end.push(a)}else i=t instanceof Uint8Array?{__type__:"Uint8Array",entries:Array.from(t)}:"number"==typeof t?isNaN(t)?"NaN":isFinite(t)?t:0>t?"-Infinity":"Infinity":t;return i}}))}function Ju(e){return JSON.parse(e,(function(e,t){if("NaN"==t)var n=NaN;else if("-Infinity"==t)n=-1/0;else if("Infinity"==t)n=1/0;else if(t&&"object"==typeof t&&"TimeRanges"==t.__type__)n=function(e){return{length:e.length,start:function(t){return e.start[t]},end:function(t){return e.end[t]}}}(t);else if(t&&"object"==typeof t&&"Uint8Array"==t.__type__)n=new Uint8Array(t.entries);else if(t&&"object"==typeof t&&"Error"==t.__type__){n=t.contents;var r,i=Error(n.message);for(r in n)i[r]=n[r];n=i}else n=t;return n}))}(r=Vu.prototype).getDuration=function(){return this.i.getDuration()},r.getMinSuggestedDuration=function(){return this.i.getMinSuggestedDuration()},r.getRemainingTime=function(){return this.g.getRemainingTime()},r.isPaused=function(){return this.j},r.isSkippable=function(){return 0<=this.i.getSkipTimeOffset()},r.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},r.canSkipNow=function(){return this.g.getAdSkippableState()},r.skip=function(){return this.g.skip()},r.pause=function(){return this.g.pause()},r.play=function(){return this.g.resume()},r.getVolume=function(){return this.g.getVolume()},r.setVolume=function(e){return this.g.setVolume(e)},r.isMuted=function(){return 0==this.g.getVolume()},r.resize=function(e,t){this.g.resize(e,t,document.fullscreenElement?google.ima.ViewMode.FULLSCREEN:google.ima.ViewMode.NORMAL)},r.setMuted=function(e){e?(this.l=this.getVolume(),this.setVolume(0)):this.setVolume(this.l)},r.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},r.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},r.release=function(){this.g=this.i=null},F("shaka.ads.ClientSideAd",Vu),Vu.prototype.release=Vu.prototype.release,Vu.prototype.getPositionInSequence=Vu.prototype.getPositionInSequence,Vu.prototype.getSequenceLength=Vu.prototype.getSequenceLength,Vu.prototype.setMuted=Vu.prototype.setMuted,Vu.prototype.resize=Vu.prototype.resize,Vu.prototype.isMuted=Vu.prototype.isMuted,Vu.prototype.setVolume=Vu.prototype.setVolume,Vu.prototype.getVolume=Vu.prototype.getVolume,Vu.prototype.play=Vu.prototype.play,Vu.prototype.pause=Vu.prototype.pause,Vu.prototype.skip=Vu.prototype.skip,Vu.prototype.canSkipNow=Vu.prototype.canSkipNow,Vu.prototype.getTimeUntilSkippable=Vu.prototype.getTimeUntilSkippable,Vu.prototype.isSkippable=Vu.prototype.isSkippable,Vu.prototype.isPaused=Vu.prototype.isPaused,Vu.prototype.getRemainingTime=Vu.prototype.getRemainingTime,Vu.prototype.getMinSuggestedDuration=Vu.prototype.getMinSuggestedDuration,Vu.prototype.getDuration=Vu.prototype.getDuration,Hu.prototype.stop=function(){this.i&&this.i.stop(),this.m&&es(this.m)},(r=zu.prototype).getDuration=function(){return this.h?this.h.duration:-1},r.getMinSuggestedDuration=function(){return this.getDuration()},r.getRemainingTime=function(){return this.h?this.h.duration-this.h.currentTime:-1},r.isPaused=function(){return this.g.paused},r.isSkippable=function(){return this.i.isSkippable()},r.getTimeUntilSkippable=function(){var e=this.i.getSkipTimeOffset();return e=this.getRemainingTime()-e,Math.max(e,0)},r.canSkipNow=function(){return 0==this.getTimeUntilSkippable()},r.skip=function(){this.g.currentTime+=this.getRemainingTime()},r.pause=function(){return this.g.pause()},r.play=function(){return this.g.play()},r.getVolume=function(){return this.g.volume},r.setVolume=function(e){this.g.volume=e},r.isMuted=function(){return this.g.muted},r.resize=function(){},r.setMuted=function(e){this.g.muted=e},r.getSequenceLength=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getTotalAds()},r.getPositionInSequence=function(){var e=this.i.getAdPodInfo();return null==e?1:e.getAdPosition()},r.release=function(){this.g=this.h=this.i=null},F("shaka.ads.ServerSideAd",zu),zu.prototype.release=zu.prototype.release,zu.prototype.getPositionInSequence=zu.prototype.getPositionInSequence,zu.prototype.getSequenceLength=zu.prototype.getSequenceLength,zu.prototype.setMuted=zu.prototype.setMuted,zu.prototype.resize=zu.prototype.resize,zu.prototype.isMuted=zu.prototype.isMuted,zu.prototype.setVolume=zu.prototype.setVolume,zu.prototype.getVolume=zu.prototype.getVolume,zu.prototype.play=zu.prototype.play,zu.prototype.pause=zu.prototype.pause,zu.prototype.skip=zu.prototype.skip,zu.prototype.canSkipNow=zu.prototype.canSkipNow,zu.prototype.getTimeUntilSkippable=zu.prototype.getTimeUntilSkippable,zu.prototype.isSkippable=zu.prototype.isSkippable,zu.prototype.isPaused=zu.prototype.isPaused,zu.prototype.getRemainingTime=zu.prototype.getRemainingTime,zu.prototype.getMinSuggestedDuration=zu.prototype.getMinSuggestedDuration,zu.prototype.getDuration=zu.prototype.getDuration,
35Xu.prototype.stop=function(){this.i.reset(),this.F="",this.s=null},Xu.prototype.onCueMetadataChange=function(e){if(e.key&&e.data){var t={};t[e.key]=e.data,this.i.onTimedMetadata(t)}},m(Wu,or),(r=Wu.prototype).setLocale=function(e){this.i=e},r.initClientSide=function(t,n){var r=this;if(!e.google||!google.ima||!google.ima.AdsLoader)throw new qe(2,10,1e4);this.h=new Hu(t,n,this.i,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":r.j.h.push(e.loadTime);break;case"ad-started":r.j.g++;break;case"ad-complete":r.j.i++;break;case"ad-skipped":r.j.j++}r.dispatchEvent(e)}))},r.onAssetUnload=function(){this.h&&this.h.stop(),this.dispatchEvent(new ar("ad-stopped")),this.j=new Fu},r.requestClientSideAds=function(e){if(!this.h)throw new qe(1,10,10001);var t=this.h;t.u=Date.now()/1e3,t.l.requestAds(e)},r.initServerSide=function(t,n){var r=this;if(!e.google||!google.ima||!google.ima.dai)throw new qe(2,10,10002);this.g=new Xu(t,n,this.i,(function(e){if(e&&e.type)switch(e.type){case"ads-loaded":r.j.h.push(e.loadTime);break;case"ad-started":r.j.g++;break;case"ad-complete":r.j.i++;break;case"ad-skipped":r.j.j++}r.dispatchEvent(e)}))},r.requestServerSideStream=function(e,t){if(t=void 0===t?"":t,!this.g)throw new qe(1,10,10003);e.adTagParameters||(e.adTagParameters={});var n=e.adTagParameters;(n.mpt||n.mpv)&&X('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.adTagParameters.mpt="shaka-player",e.adTagParameters.mpv="v3.2.0";var r=t;return(n=this.g).l?n=Promise.reject(new qe(1,10,10004)):(e instanceof google.ima.dai.api.LiveStreamRequest&&(n.H=!0),n.l=new ht,n.i.requestStream(e),n.F=r||"",n.J=Date.now()/1e3,n=n.l),n},r.replaceServerSideAdTagParameters=function(e){if(!this.g)throw new qe(1,10,10003);(e.mpt||e.mpv)&&X('You have attempted to set "mpt" and/or "mpv" parameters of the ad tag. Please note that those parameters are used for Shaka adoption tracking and will be overriden.'),e.mpt="Shaka Player",e.mpv="v3.2.0",this.g.i.replaceAdTagParameters(e)},r.getStats=function(){var e=this.j;return{loadTimes:e.h,started:e.g,playedCompletely:e.i,skipped:e.j}},r.onDashTimedMetadata=function(e){if(this.g&&"urn:google:dai:2018"==e.schemeIdUri){var t=e.schemeIdUri,n=e.eventElement?e.eventElement.getAttribute("messageData"):null;this.g.i.processMetadata(t,n,e.startTime)}},r.onHlsTimedMetadata=function(e,t){this.g&&this.g.i.processMetadata("ID3",e.data,t)},r.onCueMetadataChange=function(e){this.g&&this.g.onCueMetadataChange(e)},F("shaka.ads.AdManager",Wu),Wu.prototype.onCueMetadataChange=Wu.prototype.onCueMetadataChange,Wu.prototype.onHlsTimedMetadata=Wu.prototype.onHlsTimedMetadata,Wu.prototype.onDashTimedMetadata=Wu.prototype.onDashTimedMetadata,Wu.prototype.getStats=Wu.prototype.getStats,Wu.prototype.replaceServerSideAdTagParameters=Wu.prototype.replaceServerSideAdTagParameters,Wu.prototype.requestServerSideStream=Wu.prototype.requestServerSideStream,Wu.prototype.initServerSide=Wu.prototype.initServerSide,Wu.prototype.requestClientSideAds=Wu.prototype.requestClientSideAds,Wu.prototype.onAssetUnload=Wu.prototype.onAssetUnload,Wu.prototype.initClientSide=Wu.prototype.initClientSide,Wu.prototype.setLocale=Wu.prototype.setLocale,Wu.ADS_LOADED="ads-loaded",Wu.AD_STARTED="ad-started",Wu.AD_FIRST_QUARTILE="ad-first-quartile",Wu.AD_MIDPOINT="ad-midpoint",Wu.AD_THIRD_QUARTILE="ad-third-quartile",Wu.AD_COMPLETE="ad-complete",Wu.AD_STOPPED="ad-stopped",Wu.AD_SKIPPED="ad-skipped",Wu.AD_VOLUME_CHANGED="ad-volume-changed",Wu.AD_MUTED="ad-muted",Wu.AD_PAUSED="ad-paused",Wu.AD_RESUMED="ad-resumed",Wu.AD_SKIP_STATE_CHANGED="ad-skip-state-changed",Wu.CUEPOINTS_CHANGED="ad-cue-points-changed",Wu.IMA_AD_MANAGER_LOADED="ima-ad-manager-loaded",Wu.IMA_STREAM_MANAGER_LOADED="ima-stream-manager-loaded",Wu.AD_CLICKED="ad-clicked",Wu.AD_PROGRESS="ad-progress",Wu.AD_BUFFERING="ad-buffering",Wu.AD_IMPRESSION="ad-impression",Wu.AD_DURATION_CHANGED="ad-duration-changed",Wu.AD_CLOSED="ad-closed",Wu.AD_LOADED="ad-loaded",Wu.ALL_ADS_COMPLETED="all-ads-completed",Wu.AD_LINEAR_CHANGED="ad-linear-changed",Wu.AD_METADATA="ad-metadata",Wu.AD_RECOVERABLE_ERROR="ad-recoverable-error",Wu.AD_BREAK_READY="ad-break-ready",Wu.AD_INTERACTION="ad-interaction",Ou=function(){return new Wu};var Zu="ended play playing pause pausing ratechange seeked seeking timeupdate volumechange".split(" "),Qu="buffered currentTime duration ended loop muted paused playbackRate seeking videoHeight videoWidth volume".split(" "),el=["loop","playbackRate"],tl=["pause","play"],nl={getAssetUri:2,getAudioLanguages:4,getAudioLanguagesAndRoles:4,getBufferFullness:1,getBufferedInfo:2,getConfiguration:4,getExpiration:2,getKeyStatuses:2,getPlaybackRate:2,getTextLanguages:4,getTextLanguagesAndRoles:4,getTextTracks:2,getStats:5,getVariantTracks:2,getImageTracks:2,getThumbnails:2,isAudioOnly:10,isBuffering:1,isInProgress:1,isLive:10,isTextTrackVisible:1,keySystem:10,seekRange:1,getL
35oadMode:10},rl={getPlayheadTimeAsDate:1,getPresentationStartTimeAsDate:20},il=[["getConfiguration","configure"]],al=[["isTextTrackVisible","setTextTrackVisibility"]],ol="addChaptersTrack addTextTrack addTextTrackAsync cancelTrickPlay configure getChapters getChaptersTracks resetConfiguration retryStreaming selectAudioLanguage selectTextLanguage selectTextTrack selectVariantTrack selectVariantsByLabel setTextTrackVisibility trickPlay goToLive".split(" "),sl=["attach","detach","load","unload"];function ul(e,t,n,r,i,a){var o=this;this.L=e,this.j=new Qt(t),this.da=n,this.D=!1,this.u=r,this.J=i,this.T=a,this.h=this.m=!1,this.Y="",this.s=null,this.F=function(){return hl(o)},this.H=function(e,t){var n=Ju(t);switch(n.type){case"event":var r=n.targetName;n=new ar((n=n.event).type,n),o.u(r,n);break;case"update":for(var i in r=n.update)for(var a in n=o.g[i]||{},r[i])n[a]=r[i][a];o.D&&(o.da(),o.D=!1);break;case"asyncComplete":if(i=n.id,n=n.error,a=o.i[i],delete o.i[i],a)if(n){for(r in i=new qe(n.severity,n.category,n.code),n)i[r]=n[r];a.reject(i)}else a.resolve()}},this.g={video:{},player:{}},this.N=0,this.i={},this.l=null,bl.add(this)}function ll(e,t,n){yl=n,n.addUpdateListener(e.F),n.addMessageListener("urn:x-cast:com.google.shaka.v2",e.H),hl(e),gl(e,{type:"init",initState:t,appData:e.s}),e.l.resolve()}function cl(e,t){var n=8003;switch(t.code){case"cancel":n=8004;break;case"timeout":n=8005;break;case"receiver_unavailable":n=8006}e.l.reject(new qe(2,8,n,t))}function dl(e,t){var n=e.T();e.l=new ht,e.D=!0,ll(e,n,t)}function fl(e){var t=yl;t.removeUpdateListener(e.F),t.removeMessageListener("urn:x-cast:com.google.shaka.v2",e.H)}function hl(e){var t=!!yl&&"connected"==yl.status;if(e.h&&!t){for(var n in e.J(),e.g)e.g[n]={};pl(e)}e.h=t,e.Y=t?yl.receiver.friendlyName:"",e.j.Hb()}function pl(e){for(var t in e.i){var n=e.i[t];delete e.i[t],n.reject(new qe(1,7,7e3))}}function gl(e,t){var n=$u(t),r=yl;try{r.sendMessage("urn:x-cast:com.google.shaka.v2",n,(function(){}),Y)}catch(t){throw r=new ar("error",{detail:n=new qe(2,8,8005,t)}),e.u("player",r),e.wb(),n}}(r=ul.prototype).destroy=function(){return bl.delete(this),pl(this),yl&&fl(this),this.j&&(this.j.stop(),this.j=null),this.J=this.u=null,this.h=this.m=!1,this.H=this.F=this.l=this.i=this.g=this.s=null,Promise.resolve()},r.ta=function(){return this.h},r.Gd=function(){return this.Y},r.init=function(){if(this.L.length)if(e.chrome&&chrome.cast&&chrome.cast.isAvailable){this.m=!0,this.j.Hb();var t=new chrome.cast.SessionRequest(this.L);t=new chrome.cast.ApiConfig(t,(function(e){for(var t=l(bl),n=t.next();!n.done;n=t.next())dl(n.value,e)}),(function(e){for(var t=l(bl),n=t.next();!n.done;n=t.next())n=n.value,vl="available"==e,n.j.Hb()}),"origin_scoped"),chrome.cast.initialize(t,(function(){}),(function(){})),vl&&this.j.S(ml),(t=yl)&&t.status!=chrome.cast.SessionStatus.STOPPED?dl(this,t):yl=null}else e.__onGCastApiAvailable||(e.__onGCastApiAvailable=Tl),e.__onGCastApiAvailable!=Tl&&X("A global Cast SDK hook is already installed! Shaka Player will be unable to receive a notification when the Cast SDK is ready.")},r.Md=function(e){this.s=e,this.h&&gl(this,{type:"appData",appData:this.s})},r.cast=function(e){var t=this;return N((function(n){if(!t.m)throw new qe(1,8,8e3);if(!vl)throw new qe(1,8,8001);if(t.h)throw new qe(1,8,8002);return t.l=new ht,chrome.cast.requestSession((function(n){return ll(t,e,n)}),(function(e){return cl(t,e)})),T(n,t.l,0)}))},r.wb=function(){if(this.h){if(pl(this),yl){fl(this);try{yl.stop((function(){}),(function(){}))}catch(e){}yl=null}hl(this)}},r.get=function(e,t){var n=this;if("video"==e){if(tl.includes(t))return function(r){for(var i=[],a=0;a<arguments.length;++a)i[a]=arguments[a];return n.ne.apply(n,[e,t].concat(c(i)))}}else if("player"==e){if(rl[t]&&!this.get("player","isLive")())return function(){};if(ol.includes(t))return function(r){for(var i=[],a=0;a<arguments.length;++a)i[a]=arguments[a];return n.ne.apply(n,[e,t].concat(c(i)))};if(sl.includes(t))return function(r){for(var i=[],a=0;a<arguments.length;++a)i[a]=arguments[a];return n.If.apply(n,[e,t].concat(c(i)))};if(nl[t])return function(){return n.g[e][t]}}return this.g[e][t]},r.set=function(e,t,n){this.g[e][t]=n,gl(this,{type:"set",targetName:e,property:t,value:n})},r.ne=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];gl(this,{type:"call",targetName:e,methodName:t,args:r})},r.If=function(e,t,n){for(var r=[],i=2;i<arguments.length;++i)r[i-2]=arguments[i];i=new ht;var a=this.N.toString();this.N++,this.i[a]=i;try{gl(this,{type:"asyncCall",targetName:e,methodName:t,args:r,id:a})}catch(e){i.reject(e)}return i};var ml=.02,vl=!1,yl=null,bl=new Set;function Tl(e){if(e)for(var t=(e=l(bl)).next();!t.done;
35t=e.next())t.value.init()}function wl(e,t,n){or.call(this);var r=this;this.j=e,this.i=t,this.h=this.s=this.l=this.u=this.m=null,this.F=n,this.D=new Map,this.g=new ul(n,(function(){return Sl(r)}),(function(){return kl(r)}),(function(e,t){return Cl(r,e,t)}),(function(){return Al(r)}),(function(){return El(r)})),function(e){e.g.init(),e.h=new xr;for(var t=l(Zu),n=t.next();!n.done;n=t.next())e.h.A(e.j,n.value,(function(t){e.g.ta()||(t=new ar(t.type,t),e.l.dispatchEvent(t))}));for(var r in Mu)e.h.A(e.i,Mu[r],(function(t){e.g.ta()||e.s.dispatchEvent(t)}));for(var i in e.m={},t={},e.j)t.Ib=i,Object.defineProperty(e.m,t.Ib,{configurable:!1,enumerable:!0,get:function(t){return function(){return Il(e,t.Ib)}}(t),set:function(t){return function(n){var r=t.Ib;e.g.ta()?e.g.set("video",r,n):e.j[r]=n}}(t)}),t={Ib:t.Ib};e.u={},xl(e,(function(t){Object.defineProperty(e.u,t,{configurable:!1,enumerable:!0,get:function(){return function(e,t){if(e.D.has(t)&&(t=e.D.get(t)),"addEventListener"==t)return function(t,n,r){return e.s.addEventListener(t,n,r)};if("removeEventListener"==t)return function(t,n,r){return e.s.removeEventListener(t,n,r)};if("getMediaElement"==t)return function(){return e.m};if("getSharedConfiguration"==t)return e.g.get("player","getConfiguration");if("getNetworkingEngine"==t)return function(){return e.i.Ub()};if("getDrmEngine"==t)return function(){return e.i.m};if("getAdManager"==t)return function(){return e.i.be()};if("setVideoContainer"==t)return function(t){return e.i.we(t)};if(e.g.ta()){if("getManifest"==t||"drmInfo"==t)return function(){return X(t+"() does not work while casting!"),null};if("attach"==t||"detach"==t)return function(){return X(t+"() does not work while casting!"),Promise.resolve()}}return e.g.ta()&&0==Object.keys(e.g.g.video).length&&nl[t]||!e.g.ta()?e.i[t].bind(e.i):e.g.get("player",t)}(e,t)}})})),function(e){var t=new Map;xl(e,(function(n,r){if(t.has(r)){var i=t.get(r);n.length<i.length?e.D.set(n,i):e.D.set(i,n)}else t.set(r,n)}))}(e),e.l=new or,e.l.pc=e.m,e.s=new or,e.s.pc=e.u}(this)}function xl(e,t){function n(e){return"constructor"!=e&&"function"==typeof r[e]&&!i.has(e)}var r=e.i,i=new Set;for(a in r)n(a)&&(i.add(a),t(a,r[a]));for(var a=Object.getPrototypeOf(r),o=Object.getPrototypeOf({});a&&a!=o;){for(var s=l(Object.getOwnPropertyNames(a)),u=s.next();!u.done;u=s.next())n(u=u.value)&&(i.add(u),t(u,r[u]));a=Object.getPrototypeOf(a)}}function El(e){var t={video:{},player:{},playerAfterLoad:{},manifest:e.i.od(),startTime:null};e.j.pause();for(var n=l(el),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.j[r];for(e.j.ended||(t.startTime=e.j.currentTime),r=(n=l(il)).next();!r.done;r=n.next()){var i=r.value;r=i[1],i=e.i[i[0]](),t.player[r]=i}for(r=(n=l(al)).next();!r.done;r=n.next())r=(i=r.value)[1],i=e.i[i[0]](),t.playerAfterLoad[r]=i;return t}function Sl(e){var t=new ar("caststatuschanged");e.dispatchEvent(t)}function kl(e){var t=new ar(e.m.paused?"pause":"play");e.l.dispatchEvent(t)}function Al(e){for(var t=l(il),n=t.next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.i[n](r)}var i=e.g.get("player","getAssetUri")();n=e.g.get("video","ended"),t=Promise.resolve();var a=e.j.autoplay;r=null,n||(r=e.g.get("video","currentTime")),i&&(e.j.autoplay=!1,t=e.i.load(i,r));var o={};for(r=(n=l(el)).next();!r.done;r=n.next())r=r.value,o[r]=e.g.get("video",r);t.then((function(){if(e.j){for(var t=l(el),n=t.next();!n.done;n=t.next())n=n.value,e.j[n]=o[n];for(n=(t=l(al)).next();!n.done;n=t.next()){var r=n.value;n=r[1],r=e.g.get("player",r[0])(),e.i[n](r)}e.j.autoplay=a,i&&e.j.play()}}),(function(t){t=new ar(du,{detail:t}),e.i.dispatchEvent(t)}))}function Il(e,t){if("addEventListener"==t)return function(t,n,r){return e.l.addEventListener(t,n,r)};if("removeEventListener"==t)return function(t,n,r){return e.l.removeEventListener(t,n,r)};if(e.g.ta()&&0==Object.keys(e.g.g.video).length){var n=e.j[t];if("function"!=typeof n)return n}return e.g.ta()?e.g.get("video",t):("function"==typeof(n=e.j[t])&&(n=n.bind(e.j)),n)}function Cl(e,t,n){e.g.ta()&&("video"==t?e.l.dispatchEvent(n):"player"==t&&e.s.dispatchEvent(n))}function Ml(e,t,n,r){or.call(this);var i=this;this.g=e,this.i=t,this.h=new xr,this.N={video:e,player:t},this.H=n||function(){},this.T=r||function(e){return e},this.j=null,this.J=!1,this.s=!0,this.m=0,this.F=!1,this.D=!0,this.u=this.l=null,this.L=new Qt((function(){Nl(i)})),function(e){var t=cast.receiver.CastReceiverManager.getInstance();t.onSenderConnected=function(){return Rl(e)},t.onSenderDisconnected=function(){return Rl(e)},t.onSystemVolumeChanged=function(){var t=cast.receiver.CastReceiverManager.getInstance().getSystemVolume();t&&Ol(e,{type:"update",update:{video:{volume:t.level,muted:t.muted}}},e.l),Ol(e,{type:"event",targetName:"video",event:{type:"volumechange"}},e.l)},e.u=t.getCastMessageBus("urn:x-cast:com.google.cast.media"),e.u.onMessage=function(t){return function(e,t){var n=Ju(t.data);switch(n.type){case"PLAY":e.g.play(),Ul(e);break;case"PAUSE":e.g.pause(),Ul(e);break;case"SEEK":var r=n.currentTime,i=n.resumeState;null!=r&&(e.g.currentTime=Number(r)),i&&"PLAYBACK_START"==i?(e.g.play(),Ul(e)):i&&"P
35LAYBACK_PAUSE"==i&&(e.g.pause(),Ul(e));break;case"STOP":e.i.Td().then((function(){e.i&&Ul(e)}));break;case"GET_STATUS":Pl(e,Number(n.requestId));break;case"VOLUME":r=(i=n.volume).level,i=i.muted;var a=e.g.volume,o=e.g.muted;null!=r&&(e.g.volume=Number(r)),null!=i&&(e.g.muted=i),a==e.g.volume&&o==e.g.muted||Ul(e);break;case"LOAD":e.m=0,e.F=!1,e.D=!1,r=n.media,i=n.currentTime,a=e.T(r.contentId),o=n.autoplay||!0,e.H(r.customData),o&&(e.g.autoplay=!0),e.i.load(a,i).then((function(){e.i&&Pl(e)})).catch((function(t){var r="LOAD_FAILED";7==t.category&&7e3==t.code&&(r="LOAD_CANCELLED"),Ol(e,{requestId:Number(n.requestId),type:r},e.u)}));break;default:Ol(e,{requestId:Number(n.requestId),type:"INVALID_REQUEST",reason:"INVALID_COMMAND"},e.u)}}(e,t)},e.l=t.getCastMessageBus("urn:x-cast:com.google.shaka.v2"),e.l.onMessage=function(t){return function(e,t){var n=Ju(t.data);switch(n.type){case"init":e.m=0,e.F=!1,e.D=!0,function(e,t,n){var r,i,a,o,s,u,l,c,d;N((function(f){switch(f.g){case 1:for(r in t.player)i=t.player[r],e.i[r](i);return e.H(n),a=e.g.autoplay,t.manifest?(e.g.autoplay=!1,x(f,5),T(f,e.i.load(t.manifest,t.startTime),7)):T(f,Promise.resolve(),3);case 7:S(f,3);break;case 5:return o=k(f),s=new ar(du,{detail:o}),e.i&&e.i.dispatchEvent(s),f.return();case 3:if(!e.i)return f.return();for(u in t.video)l=t.video[u],e.g[u]=l;for(c in t.playerAfterLoad)d=t.playerAfterLoad[c],e.i[c](d);e.g.autoplay=a,t.manifest&&(e.g.play(),Ul(e)),w(f)}}))}(e,n.initState,n.appData),Nl(e);break;case"appData":e.H(n.appData);break;case"set":var r=n.targetName,i=n.property;if(n=n.value,"video"==r){var a=cast.receiver.CastReceiverManager.getInstance();if("volume"==i){a.setSystemVolumeLevel(n);break}if("muted"==i){a.setSystemVolumeMuted(n);break}}e.N[r][i]=n;break;case"call":(r=e.N[n.targetName])[n.methodName].apply(r,n.args);break;case"asyncCall":r=n.targetName,i=n.methodName,"player"==r&&"load"==i&&(e.m=0,e.F=!1);var o=n.id,s=t.senderId;n=(a=e.N[r])[i].apply(a,n.args),"player"==r&&"load"==i&&(n=n.then((function(){e.D=!0}))),n.then((function(){return jl(e,s,o,null)}),(function(t){return jl(e,s,o,t)}))}}(e,t)},t.start();for(var n=(t=l(Zu)).next();!n.done;n=t.next())e.h.A(e.g,n.value,(function(t){return _l(e,"video",t)}));for(var r in Mu)e.h.A(e.i,Mu[r],(function(t){return _l(e,"player",t)}));cast.__platform__&&cast.__platform__.canDisplayType('video/mp4; codecs="avc1.640028"; width=3840; height=2160')?e.i.Od(3840,2160):e.i.Od(1920,1080),e.h.A(e.g,"loadeddata",(function(){e.F=!0})),e.h.A(e.i,"loading",(function(){e.s=!1,Dl(e)})),e.h.A(e.g,"playing",(function(){e.s=!1,Dl(e)})),e.h.A(e.g,"pause",(function(){Dl(e)})),e.h.A(e.i,"unloading",(function(){e.s=!0,Dl(e)})),e.h.A(e.g,"ended",(function(){new Qt((function(){e.g&&e.g.ended&&(e.s=!0,Dl(e))})).S(Fl)}))}(this)}function Rl(e){e.m=0,e.D=!0,e.J=0!=cast.receiver.CastReceiverManager.getInstance().getSenders().length,Dl(e)}function Dl(e){var t;N((function(n){return 1==n.g?T(n,Promise.resolve(),2):e.i?(t=new ar("caststatuschanged"),e.dispatchEvent(t),Ll(e)||Ul(e),void w(n)):n.return()}))}function _l(e,t,n){e.i&&(Nl(e),Ol(e,{type:"event",targetName:t,event:n},e.l))}function Nl(e){e.L.S(Bl);for(var t={video:{},player:{}},n=l(Qu),r=n.next();!r.done;r=n.next())r=r.value,t.video[r]=e.g[r];if(e.i.X())for(var i in rl)0==e.m%rl[i]&&(t.player[i]=e.i[i]());for(var a in nl)0==e.m%nl[a]&&(t.player[a]=e.i[a]());(n=cast.receiver.CastReceiverManager.getInstance().getSystemVolume())&&(t.video.volume=n.level,t.video.muted=n.muted),e.F&&(e.m+=1),Ol(e,{type:"update",update:t},e.l),Ll(e)}function Ll(e){return!(!e.D||!e.g.duration&&!e.i.X())&&(Pl(e),e.D=!1,!0)}function Pl(e,t){var n={contentId:e.i.od(),streamType:e.i.X()?"LIVE":"BUFFERED",contentType:""};e.i.X()||(n.duration=e.g.duration),e.j&&(n.metadata=e.j),Ul(e,void 0===t?0:t,n)}function jl(e,t,n,r){e.i&&Ol(e,{type:"asyncComplete",id:n,error:r},e.l,t)}function Ol(e,t,n,r){e.J&&(e=$u(t),r?n.getCastChannel(r).send(e):n.broadcast(e))}function Ul(e,t,n){n=void 0===n?null:n;var r={mediaSessionId:0,playbackRate:e.g.playbackRate,playerState:e.s?Vl:e.i.rd()?Kl:e.g.paused?Gl:Hl,currentTime:e.g.currentTime,supportedMediaCommands:63,volume:{level:e.g.volume,muted:e.g.muted}};n&&(r.media=n),Ol(e,{requestId:void 0===t?0:t,type:"MEDIA_STATUS",status:[r]},e.u)}m(wl,or),(r=wl.prototype).destroy=function(e){return e&&this.g.wb(),this.h&&(this.h.release(),this.h=null),e=[],this.i&&(e.push(this.i.destroy()),this.i=null),this.g&&(e.push(this.g.destroy()),this.g=null),this.u=this.m=this.j=null,Promise.all(e)},r.pf=function(){return this.m},r.ef=function(){return this.u},r.Ge=function(){return this.g.m&&vl},r.ta=function(){return this.g.ta()},r.Gd=function(){return this.g.Gd()},r.cast=function(){var e,t=this;return N((function(n){return 1==n.g?(e=El(t),T(n,t.g.cast(e),2)):t.i?T(n,t.i.Td(),0):n.return()}))},r.Md=function(e){this.g.Md(e)},r.Tf=function(){!function(e){if(e.h){var t=e.T();chrome.cast.requestSession((function(n){return ll(e,t,n)}),(function(t){return cl(e,t)}))}}(this.g)},r.wb=function(){this.g.wb()},r.Je=function(e){var t=this;return N((function(n){if(1==n.g)return e==t.F?n.return():(t.F=e,t.g.wb(),T(n,t.g.destroy(),2));t.g=null,t.g=new ul(e,(function(){return Sl(t)}),(function(){return kl(t)}),(function(e,n){return Cl(t,e,n)}),(function(){return Al(t)}),(function(){return El(t)})),t.g.init(),w(n)}))},F("shaka.cast.CastProxy",wl),wl.prototype.changeReceiverId=wl.prototype.Je,wl.prototype.forceDisconnect=wl.prototype.wb,wl.prototype.suggestDisconnect=wl.prototype.Tf,wl.prototype.setAppData=wl.prototype.Md,wl.prototype.cast=wl.prototype.cast,wl.prototype.receiverName=wl.prototype.Gd,wl.prototype.isCasting=wl.prototype.ta,wl.prototype.canCast=wl.prototype.Ge,wl.prototype.getPlayer=wl.prototype.ef,wl.prototype.getVideo=wl.prototype.pf,wl.prototype.destroy=wl.prototype.destroy,m(Ml,or),(r=Ml.prototype).isConnected=function(){return this.J},r.tf=function(){return this.s},r.Pf=function(e){this.j=e},r.Me=function(){this.j=null},r.Qf=function(e){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.j.title=e},r.Of=function(e){this.j||(this.j={metadataType:cast.receiver.media.MetadataType.GENERIC}),this.j.images=[{url:e}]},r.Nf=function(e){this.j||(this.j={}),this.j.artist=e,this.j.metadataType=cast.receiver.media.MetadataType.MUSIC_TRACK},r.destroy=function(){var e,t=this;return N((function(n){if(1==n.g)return t.h&&(t.h.release(),t.h=null),e=[],t.i&&(e.push(t.i.destroy()),t.i=null),t.L&&(t.L.stop(),t.L=null),t.g=null,t.N=null,t.H=null,t.J=!1,t.s=!0,t.l=null,t.u=null,T(n,Promise.all(e),2);cast.receiver.CastReceiverManager.getInstance().stop(),w(n)}))},F("shaka.cast.CastReceiver",Ml),Ml.prototype.destroy=Ml.prototype.destroy,Ml.prototype.setContentArtist=Ml.prototype.Nf,Ml.prototype.setContentImage=Ml.prototype.Of,Ml.prototype.setContentTitle=Ml.prototype.Qf,Ml.prototype.clearContentMetadata=Ml.prototype.Me,Ml.prototype.setContentMetadata=Ml.prototype.Pf,Ml.prototype.isIdle=Ml.prototype.tf,Ml.prototype.isConnected=Ml.prototype.isConnected;var Bl=.5,Fl=5,Vl="IDLE",Hl="PLAYING",Kl="BUFFERING",Gl="PAUSED";function ql(e){var t=this;this.g=[],this.h=[],this.data=[],(new li).box("moov",ci).V("pssh",(function(e){if(!(1<e.version)){var n=Re(e.reader.R,-12,e.size);if(t.data.push(n),t.g.push(It(e.reader.$a(16))),0<e.version){n=e.reader.M();for(var r=(n=l(ee(n))).next();!r.done;r=n.next())r=It(e.reader.$a(16)),t.h.push(r)}}})).parse(e)}function zl(e,t){var n=e.length,r=t.length+16+n,i=new Uint8Array(r),a=De(i),o=0;return a.setUint32(o,r),o+=4,a.setUint32(o,1886614376),o+=4,a.setUint32(o,0),o+=4,i.set(t,o),o+=t.length,a.setUint32(o,n),i.set(e,o+4),i}function Xl(e,t){var n=Yl(e,t);return 1!=n.length?null:n[0]}function Wl(e,t,n){return 1!=(e=$l(e,t,n)).length?null:e[0]}function Yl(e,t){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.tagName==t}))}function $l(e,t,n){return Array.from(e.childNodes).filter((function(e){return e instanceof Element&&e.localName==n&&e.namespaceURI==t}))}function Jl(e,t,n){return e.hasAttributeNS(t,n)?e.getAttributeNS(t,n):null}function Zl(e){return Array.from(e.childNodes).every(Ql)?e.textContent.trim():null}
35function Ql(e){return e.nodeType==Node.TEXT_NODE||e.nodeType==Node.CDATA_SECTION_NODE}function ec(e,t,n,r){r=void 0===r?null:r;var i=null;return null!=(e=e.getAttribute(t))&&(i=n(e)),null==i?r:i}function tc(e){return e?(/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),e=Date.parse(e),isNaN(e)?null:Math.floor(e/1e3)):null}function nc(e){return e&&(e=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e))?(e=31536e3*Number(e[1]||null)+2592e3*Number(e[2]||null)+86400*Number(e[3]||null)+3600*Number(e[4]||null)+60*Number(e[5]||null)+Number(e[6]||null),isFinite(e)?e:null):null}function rc(e){var t=/([0-9]+)-([0-9]+)/.exec(e);return t?(e=Number(t[1]),isFinite(e)?(t=Number(t[2]),isFinite(t)?{start:e,end:t}:null):null):null}function ic(e){return 0==(e=Number(e))%1?e:null}function ac(e){return 0==(e=Number(e))%1&&0<e?e:null}function oc(e){return 0==(e=Number(e))%1&&0<=e?e:null}function sc(e){return e=Number(e),isNaN(e)?null:e}function uc(e){var t;return e=(t=e.match(/^(\d+)\/(\d+)$/))?Number(t[1])/Number(t[2]):Number(e),isNaN(e)?null:e}function lc(e,t){var n=new DOMParser,r=null,i=null;try{i=n.parseFromString(e,"text/xml")}catch(e){}return i&&i.documentElement.tagName==t&&(r=i.documentElement),r&&0<r.getElementsByTagName("parsererror").length?null:r}function cc(e,t){try{return lc(mt(e),t)}catch(e){return null}}function dc(e,t,n){var r=function(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())(n=hc(n.value))&&t.push(n);return t}(e),i=null;e=[];var a=[],o=new Set(r.map((function(e){return e.keyId})));if(o.delete(null),1<o.size)throw new qe(2,4,4010);if(t||(a=r.filter((function(e){return"urn:mpeg:dash:mp4protection:2011"!=e.qe||(i=e.init||i,!1)}))).length&&(e=function(e,t,n){for(var r=[],i=(t=l(t)).next();!i.done;i=t.next()){var a=n[(i=i.value).qe];if(a){var o;if(o=Wl(i.node,"urn:microsoft:playready","pro"))o=[{initData:zl(o=kt(o.textContent),new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149])),initDataType:"cenc",keyId:i.keyId}];else o=null;o=st(a,i.init||e||o),(a=gc.get(a))&&(o.licenseServerUri=a(i)),r.push(o)}}return r}(i,a,n),0==e.length&&(e=[st("",i)])),r.length&&(t||!a.length))for(e=[],n=(t=l(Object.values(n))).next();!n.done;n=t.next())"org.w3.clearkey"!=(n=n.value)&&e.push(st(n,i));if(o=Array.from(o)[0]||null)for(n=(t=l(e)).next();!n.done;n=t.next())for(r=(n=l(n.value.initData)).next();!r.done;r=n.next())r.value.keyId=o;return{Xd:o,yg:i,drmInfos:e,ae:!0}}function fc(e){return(e=Wl(e.node,"urn:microsoft:playready","pro"))&&(e=function(e){var t=0,n=De(e),r=n.getUint32(t,!0);if(r!=e.byteLength)return[];e:{for(e=t+6,t=[];e<n.byteLength-1;){r=n.getUint16(e,!0),e+=2;var i=n.getUint16(e,!0);if(e+=2,0!=(1&i)||i+e>n.byteLength){n=[];break e}var a=Re(n,e,i);t.push({type:r,value:a}),e+=i}n=t}return n}(e=kt(e.textContent)).filter((function(e){return e.type===pc}))[0])&&(e=lc(e=vt(e.value,!0),"WRMHEADER"))?function(e){for(var t=(e=l(e.getElementsByTagName("DATA"))).next();!t.done;t=e.next())for(var n=(t=l(t.value.childNodes)).next();!n.done;n=t.next())if((n=n.value)instanceof Element&&"LA_URL"==n.tagName)return n.textContent;return""}(e):""}function hc(e){var t=e.getAttribute("schemeIdUri"),n=Jl(e,"urn:mpeg:cenc:2013","default_KID"),r=$l(e,"urn:mpeg:cenc:2013","pssh").map(Zl);if(!t)return null;if(t=t.toLowerCase(),n&&(n=n.replace(/-/g,"").toLowerCase()).includes(" "))throw new qe(2,4,4009);var i=[];try{i=r.map((function(e){return{initDataType:"cenc",initData:kt(e),keyId:null}}))}catch(e){throw new qe(2,4,4007)}return{node:e,qe:t,keyId:n,init:0<i.length?i:null}}var pc=1,gc=(new Map).set("com.widevine.alpha",(function(e){return(e=Wl(e.node,"urn:microsoft","laurl"))&&e.getAttribute("licenseUrl")||""})).set("com.microsoft.playready",fc).set("com.microsoft.playready.recommendation",fc).set("com.microsoft.playready.software",fc).set("com.microsoft.playready.hardware",fc);function mc(t,n,r,i,a){var o={RepresentationID:n,Number:r,Bandwidth:i,Time:a};return t.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)([diouxX]))?\$/g,(function(t,n,r,i){if("$$"==t)return"$";var a=o[n];if(null==a)return t;switch("RepresentationID"==n&&r&&(r=void 0),"Time"==n&&(a=Math.round(a)),i){case void 0:case"d":case"i":case"u":t=a.toString();break;case"o":t=a.toString(8);break;case"x":t=a.toString(16);break;case"X":t=a.toString(16).toUpperCase();break;default:t=a.toString()}return r=e.parseInt(r,10)||1,Array(Math.max(0,r-t.length)+1).join("0")+t}))}function vc(e,t){var n=yc(e,t,"timescale"),r=1;n&&(r=ac(n)||1);var i=yc(e,t,"duration");n=ac(i||""),"image"==e.K.contentType&&(n=sc(i||"")),n&&(n/=r);var a=yc(e,t,"startNumber");i=Number(yc(e,t,"presentationTimeOffset"))||0;var o=oc(a||"");null!=a&&null!=o||(o=1);var s=bc(e,t,"SegmentTimeline");
35if(a=null,s){a=r;var u=e.W.duration||1/0,c=Yl(s,"S");s=[];for(var d=-i,f=(c=l(te(c))).next();!f.done;f=c.next()){var h=(f=f.value).item,p=f.next,g=ec(h,"t",oc);f=ec(h,"d",oc);var m=ec(h,"r",ic);if(null!=g&&(g-=i),!f)break;if(h=null!=g?g:d,0>(g=m||0))if(p){if(null==(p=ec(p,"t",oc)))break;if(h>=p)break;g=Math.ceil((p-h)/f)-1}else{if(1/0==u)break;if(h/a>=u)break;g=Math.ceil((u*a-h)/f)-1}for(0<s.length&&h!=d&&(s[s.length-1].end=h/a),g=(p=l(ee(g+1))).next();!g.done;g=p.next())d=h+f,s.push({start:h/a,end:d/a,Yf:h}),h=d}a=s}return{timescale:r,ia:n,Gb:o,Ta:i/r||0,Ud:i,timeline:a}}function yc(e,t,n){return[t(e.K),t(e.ka),t(e.fa)].filter(Fe).map((function(e){return e.getAttribute(n)})).reduce((function(e,t){return e||t}))}function bc(e,t,n){return[t(e.K),t(e.ka),t(e.fa)].filter(Fe).map((function(e){return Xl(e,n)})).reduce((function(e,t){return e||t}))}function Tc(e,t,n,r,i,a){if(a=void 0===a?0:a,Jl(e,"http://www.w3.org/1999/xlink","href")){var o=function(e,t,n,r,i,a){for(var o=Jl(e,"http://www.w3.org/1999/xlink","href"),s=Jl(e,"http://www.w3.org/1999/xlink","actuate")||"onRequest",u=l(Array.from(e.attributes)),c=u.next();!c.done;c=u.next())"http://www.w3.org/1999/xlink"==(c=c.value).namespaceURI&&e.removeAttributeNS(c.namespaceURI,c.localName);if(5<=a)return er(new qe(2,4,4028));if("onLoad"!=s)return er(new qe(2,4,4027));var d=ot([r],[o]);return i.request(0,hr(d,t)).ba((function(r){if(!(r=cc(r.data,e.tagName)))return er(new qe(2,4,4001,o));for(;e.childNodes.length;)e.removeChild(e.childNodes[0]);for(;r.childNodes.length;){var s=r.childNodes[0];r.removeChild(s),e.appendChild(s)}for(s=(r=l(Array.from(r.attributes))).next();!s.done;s=r.next())e.setAttributeNode(s.value.cloneNode(!1));return Tc(e,t,n,d[0],i,a+1)}))}(e,t,n,r,i,a);return n&&(o=o.ba(void 0,(function(){return Tc(e,t,n,r,i,a)}))),o}o=[];for(var s=l(Array.from(e.childNodes)),u=s.next();!u.done;u=s.next())(u=u.value)instanceof Element&&("urn:mpeg:dash:resolve-to-zero:2013"==Jl(u,"http://www.w3.org/1999/xlink","href")?e.removeChild(u):"SegmentTimeline"!=u.tagName&&o.push(Tc(u,t,n,r,i,a)));return ir(o).ba((function(){return e}))}function wc(e,t,n,r,i,a,o){var s,u=(new li).V("sidx",(function(e){s=function(e,t,n,r,i,a,o){var s=[];o.reader.skip(4);var u=o.reader.M();if(0==u)throw new qe(2,3,3005);if(0==o.version)var c=o.reader.M(),d=o.reader.M();else c=o.reader.nb(),d=o.reader.nb();o.reader.skip(2);var f=o.reader.Fb();for(e=e+o.size+d,f=l(ee(f)),d=f.next();!d.done;d=f.next()){var h=o.reader.M();d=(2147483648&h)>>>31,h&=2147483647;var p=o.reader.M();if(o.reader.skip(4),1==d)throw new qe(2,3,3006);s.push(new $a(c/u+n,(c+p)/u+n,(function(){return a}),e,e+h-1,t,n,r,i)),c+=p,e+=h}return o.parser.stop(),s}(t,r,i,a,o,n,e)}));if(e&&u.parse(e),s)return s;throw new qe(2,3,3004)}function xc(e){this.h=De(e),this.g=new oi(this.h,0)}function Ec(e){var t=Sc(e);if(7<t.length)throw new qe(2,3,3002);for(var n=0,r=(t=l(t)).next();!r.done;r=t.next())n=256*n+r.value;t=Sc(e);e:{for(var i=(r=l(kc)).next();!i.done;i=r.next())if(Ie(t,new Uint8Array(i.value))){r=!0;break e}r=!1}if(r)t=e.h.byteLength-e.g.Z();else{if(8==t.length&&224&t[1])throw new qe(2,3,3001);r=0;for(var a=(i=l(te(t))).next();!a.done;a=i.next()){var o=(a=a.value).item;r=0==a.ha?o&(1<<8-t.length)-1:256*r+o}t=r}return t=e.g.Z()+t<=e.h.byteLength?t:e.h.byteLength-e.g.Z(),r=De(e.h,e.g.Z(),t),e.g.skip(t),new Ac(n,r)}function Sc(e){var t=e.g.Z(),n=e.g.$();if(0==n)throw new qe(2,3,3002);return n=8-Math.floor(Math.log2(n)),e.g.skip(n-1),Re(e.h,t,n)}xc.prototype.na=function(){return this.g.na()};var kc=[[255],[127,255],[63,255,255],[31,255,255,255],[15,255,255,255,255],[7,255,255,255,255,255],[3,255,255,255,255,255,255],[1,255,255,255,255,255,255,255]];function Ac(e,t){this.id=e,this.g=t}function Ic(e){if(8<e.g.byteLength)throw new qe(2,3,3002);if(8==e.g.byteLength&&224&e.g.getUint8(0))throw new qe(2,3,3001);for(var t=0,n=l(ee(e.g.byteLength)),r=n.next();!r.done;r=n.next())t=256*t+(r=e.g.getUint8(r.value));return t}function Cc(e){var t=new xc(e.g);if(179!=(e=Ec(t)).id)throw new qe(2,3,3013);if(e=Ic(e),183!=(t=Ec(t)).id)throw new qe(2,3,3012);t=new xc(t.g);for(var n=0;t.na();){var r=Ec(t);
35if(241==r.id){n=Ic(r);break}}return{Zf:e,Hf:n}}function Mc(e,t){var n=bc(e,t,"Initialization");if(!n)return null;var r=e.K.ya,i=n.getAttribute("sourceURL");i&&(r=ot(e.K.ya,[i])),i=0;var a=null;return(n=ec(n,"range",rc))&&(i=n.start,a=n.end),new Ya((function(){return r}),i,a)}function Rc(e,t){var n=Number(yc(e,_c,"presentationTimeOffset"))||0,r=yc(e,_c,"timescale"),i=1;r&&(i=ac(r)||1);var a=n/i||0,o=Mc(e,_c);!function(e,t){if(Lc(e,t),!Nc(e))throw new qe(2,4,4002)}(e,o);var s=ur(e);return{xb:function(){var e=bc(s,_c,"RepresentationIndex"),n=s.K.ya;return e&&(e=e.getAttribute("sourceURL"))&&(n=ot(s.K.ya,[e])),e=Nc(s),Dc(s,t,o,n,e.start,e.end,a)}}}function Dc(e,t,n,r,i,a,o){var s,u,l,c,d,f,h,p,g,m,v,y,b,w,x;return N((function(E){if(1==E.g)return s=e.presentationTimeline,u=!e.cb||!e.W.ge,l=e.W.start,c=e.W.duration,d=e.K.mimeType.split("/")[1],h=null,p=[(f=t)(r,i,a),"webm"==d?f(n.ma(),n.ja,n.ea):null],f=null,T(E,Promise.all(p),2);if(g=E.h,m=g[0],v=g[1]||null,null,b=l-o,w=l,x=c?l+c:1/0,"mp4"==d)var S=wc(m,i,r,n,b,w,x);else{if(440786851!=Ec(S=new xc(v)).id)throw new qe(2,3,3008);var k=Ec(S);if(408125543!=k.id)throw new qe(2,3,3009);S=k.g.byteOffset,k=new xc(k.g);for(var A=null;k.na();){var I=Ec(k);if(357149030==I.id){A=I;break}}if(!A)throw new qe(2,3,3010);for(A=new xc(A.g),I=1e6,k=null;A.na();){var C=Ec(A);if(2807729==C.id)I=Ic(C);else if(17545==C.id)if(4==C.g.byteLength)k=C.g.getFloat32(0);else{if(8!=C.g.byteLength)throw new qe(2,3,3003);k=C.g.getFloat64(0)}}if(null==k)throw new qe(2,3,3011);if(k*=A=I/1e9,475249515!=(I=Ec(new xc(m))).id)throw new qe(2,3,3007);S=function(e,t,n,r,i,a,o,s,u){function l(){return i}var c=[];e=new xc(e.g);for(var d=null,f=null;e.na();){var h=Ec(e);if(187==h.id){var p=Cc(h);p&&(h=n*p.Zf,p=t+p.Hf,null!=d&&c.push(new $a(d+o,h+o,l,f,p-1,a,o,s,u)),d=h,f=p)}}return null!=d&&c.push(new $a(d+o,r+o,l,f,null,a,o,s,u)),c}(I,S,A,k,r,n,b,w,x)}return y=S,s.Cb(y),h=new yo(y),u&&h.Ya(w,x,!0),E.return(h)}))}function _c(e){return e.cc}function Nc(e){var t=bc(e,_c,"RepresentationIndex");return e=rc((e=yc(e,_c,"indexRange"))||""),t&&(e=ec(t,"range",rc,e)),e}function Lc(e,t){var n=e.K.mimeType.split("/")[1];if(e.K.contentType!=ct&&"mp4"!=n&&"webm"!=n)throw new qe(2,4,4006);if("webm"==n&&!t)throw new qe(2,4,4005)}function Pc(e,t){var n=Mc(e,jc),r=function(e){var t=function(e){return[e.K.ab,e.ka.ab,e.fa.ab].filter(Fe).map((function(e){return Yl(e,"SegmentURL")})).reduce((function(e,t){return 0<e.length?e:t})).map((function(t){return t.getAttribute("indexRange")&&!e.ee&&(e.ee=!0),{wf:t.getAttribute("media"),start:(t=ec(t,"mediaRange",rc,{start:0,end:null})).start,end:t.end}}))}(e),n=(e=vc(e,jc)).Gb;0==n&&(n=1);var r=0;return e.ia?r=e.ia*(n-1):e.timeline&&0<e.timeline.length&&(r=e.timeline[0].start),{ia:e.ia,startTime:r,Gb:n,Ta:e.Ta,timeline:e.timeline,Ab:t}}(e);if(!r.ia&&!r.timeline&&1<r.Ab.length)throw new qe(2,4,4002);if(!r.ia&&!e.W.duration&&!r.timeline&&1==r.Ab.length)throw new qe(2,4,4002);if(r.timeline&&0==r.timeline.length)throw new qe(2,4,4002);var i=null,a=null;return e.fa.id&&e.K.id&&(a=e.fa.id+","+e.K.id,i=t[a]),n=function(e,t,n,r,i){var a=r.Ab.length;r.timeline&&r.timeline.length!=r.Ab.length&&(a=Math.min(r.timeline.length,r.Ab.length));for(var o=e-r.Ta,s=t?e+t:1/0,u=[],c=r.startTime,d={},f=(a=l(ee(a))).next();!f.done;d={Vc:d.Vc},f=a.next()){f=f.value;var h=r.Ab[f];d.Vc=ot(n,[h.wf]);var p=void 0;p=null!=r.ia?c+r.ia:r.timeline?r.timeline[f].end:c+t,u.push(new $a(e+c,e+p,function(e){return function(){return e.Vc}}(d),h.start,h.end,i,o,e,s)),c=p}return u}(e.W.start,e.W.duration,e.K.ya,r,n),r=!i,i?i.Bb(n,e.presentationTimeline.Za()):(e.presentationTimeline.Cb(n),i=new yo(n),a&&e.cb&&(t[a]=i)),e.cb&&e.W.ge||i.Ya(e.W.start,e.W.duration?e.W.start+e.W.duration:1/0,r),{xb:function(){return Promise.resolve(i)}}}function jc(e){return e.ab}function Oc(e,t,n,r,i,a){var o=function(e){var t=yc(e,Uc,"initialization");if(!t)return null;var n=e.K.id,r=e.bandwidth||null,i=e.K.ya;return new Ya((function(){var e=mc(t,n,null,r,null);return ot(i,[e])}),0,null)}(e),s=function(e){var t=vc(e,Uc),n=yc(e,Uc,"media");return e=yc(e,Uc,"index"),{ia:t.ia,timescale:t.timescale,Gb:t.Gb,Ta:t.Ta,Ud:t.Ud,timeline:t.timeline,xd:n,Yb:e}}(e);!function(e){var t=e.Yb?1:0;if(t+=e.timeline?1:0,0==(t+=e.ia?1:0))throw new qe(2,4,4002);if(1!=t&&(e.Yb&&(e.timeline=null),e.ia=null),!e.Yb&&!e.xd)throw new qe(2,4,4002)}(s);var u=ur(e);if(s.Yb)return Lc(e,o),{xb:function(){var e=mc(s.Yb,u.K.id,null,u.bandwidth||null,
35null);return e=ot(u.K.ya,[e]),Dc(u,t,o,e,0,null,s.Ta)}};if(s.ia)return r||(e.presentationTimeline.zd(s.ia),e.presentationTimeline.Bd(e.W.start)),{xb:function(){return function(e,t,n,r,i){function a(e){var n=(e-p)*h,i=n+t.Ta,a=n+c;return n=a+h,(a=new $a(a,Math.min(n,s()),(function(){var t=mc(m,y,e,v,i*g);return ot(b,[t])}),0,null,r,T,c,s())).j=n,a}function o(){var e=[Math.max(u.Za(),c),Math.min(u.gb(),s())].map((function(e){return e-c}));return[Math.ceil(e[0]/h),Math.ceil(e[1]/h)-1].map((function(e){return e+p}))}function s(){var e=null!=d&&i[d]||f;return e?c+e:1/0}var u=e.presentationTimeline,c=e.W.start,d=e.fa.id,f=e.W.duration,h=t.ia,p=t.Gb,g=t.timescale,m=t.xd,v=e.bandwidth||null,y=e.K.id,b=e.K.ya,T=c-t.Ta,w=o();e=e.cb?Math.max(w[0],w[1]-n+1):w[0],w=w[1],n=[];for(var x=e;x<=w;++x){var E=a(x);n.push(E)}var S=new yo(n);if(n=u.gb()<s(),x=u.X(),n||x){var k=Math.max(e,w+1);S.Mc(h,(function(){var e=u.Za();S.eb(e);var t=l(o());t.next(),t=t.next().value;for(var n=[];k<=t;){var r=a(k);n.push(r),k++}return e>s()&&!n.length?null:n}))}return Promise.resolve(S)}(u,s,i,o,a)}};var c=null;r=null,e.fa.id&&e.K.id&&(r=e.fa.id+","+e.K.id,c=n[r]);var d=function(e,t,n){var r=e.W.start,i=e.W.duration,a=r-t.Ta;i=i?r+i:1/0;for(var o=[],s={},u=l(te(t.timeline)),c=u.next();!c.done;s={Uc:s.Uc,Yc:s.Yc,bd:s.bd,Rc:s.Rc,dd:s.dd,Sc:s.Sc},c=u.next()){var d=(c=c.value).item,f=d.start,h=d.Yf;d=d.end,s.bd=c.ha+t.Gb,s.dd=h+t.Ud,s.Yc=e.K.id,s.Rc=e.bandwidth||null,s.Uc=t.xd,s.Sc=e.K.ya,o.push(new $a(r+f,r+d,function(e){return function(){var t=mc(e.Uc,e.Yc,e.bd,e.Rc||null,e.dd);return ot(e.Sc,[t]).map((function(e){return e.toString()}))}}(s),0,null,n,a,r,i))}return o}(u,s,o),f=e.W.start,h=e.W.duration?e.W.start+e.W.duration:1/0,p=1/0!=h;return c?(p&&new yo(d).Ya(f,h,!0),c.Bb(d,e.presentationTimeline.Za())):(e.presentationTimeline.Cb(d),c=new yo(d),r&&e.cb&&(n[r]=c)),p&&c.Ya(f,h),{xb:function(){return Promise.resolve(c)}}}function Uc(e){return e.dc}function Bc(){this.l=[],this.g=[],this.h=[],this.j=[],this.i=[],this.m=new Set}function Fc(e,t,n){var r,i,a,o,s,u,c,d,f,h,p,g,m,v,y,b,x,E,S,k,A,I,C,M,R,D,_,L,P,j,O;return N((function(N){switch(N.g){case 1:if(r=dt,function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],r=l((t=t.value).sc),i=r.next();!i.done;i=r.next()){i=i.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,i.id!=s.id&&i.channelsCount==s.channelsCount&&i.language==s.language&&i.bandwidth==s.bandwidth&&i.label==s.label&&i.codecs==s.codecs&&i.mimeType==s.mimeType&&ie(i.roles,s.roles)&&i.audioSamplingRate==s.audioSamplingRate&&i.primary==s.primary&&(a=!0);a||n.push(i)}t.sc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],r=l((t=t.value).Oc),i=r.next();!i.done;i=r.next()){i=i.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,i.id!=s.id&&i.width==s.width&&i.frameRate==s.frameRate&&i.codecs==s.codecs&&i.mimeType==s.mimeType&&i.label==s.label&&ie(i.roles,s.roles)&&Rr(i.closedCaptions,s.closedCaptions)&&i.bandwidth==s.bandwidth&&(a=!0);a||n.push(i)}t.Oc=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],r=l((t=t.value).textStreams),i=r.next();!i.done;i=r.next()){i=i.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,i.id!=s.id&&i.language==s.language&&i.label==s.label&&i.codecs==s.codecs&&i.mimeType==s.mimeType&&ie(i.roles,s.roles)&&(a=!0);a||n.push(i)}t.textStreams=n}}(t),function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){for(var n=[],r=l((t=t.value).imageStreams),i=r.next();!i.done;i=r.next()){i=i.value;for(var a=!1,o=l(n),s=o.next();!s.done;s=o.next())s=s.value,i.id!=s.id&&i.width==s.width&&i.codecs==s.codecs&&i.mimeType==s.mimeType&&(a=!0);a||n.push(i)}t.imageStreams=n}}(t),!n&&1==t.length){i=t[0],e.g=i.sc,e.h=i.Oc,e.j=i.textStreams,e.i=i.imageStreams,N.v(2);break}for(a=-1,o=l(te(t)),s=o.next();!s.done;s=o.next())u=s.value,c=u.ha,d=u.item,e.m.has(d.id)||(e.m.add(d.id),-1==a&&(a=c));if(-1==a)return N.return();for(f=t.map((function(e){return e.sc})),h=t.map((function(e){return e.Oc})),p=t.map((function(e){return e.textStreams})),g=t.map((function(e){return e.imageStreams})),m=l(p),v=m.next();!v.done;v=m.next())v.value.push(id(r.aa));for(y=l(g),b=y.next();!b.done;b=y.next())b.value.push(id(r.Mb));return T(N,Hc(e.g,f,a,qc,Xc),3);case 3:return T(N,Hc(e.h,h,a,qc,Xc),4);case 4:return T(N,Hc(e.j,p,a,qc,Xc),5);case 5:return T(N,Hc(e.i,g,a,qc,Xc),2);case 2:if(x=0,E=[],e.h.length&&e.g.length)for(M=l(e.g),R=M.next();!R.done;R=M.next())for(D=R.value,_=l(e.h),L=_.next();!L.done;
35L=_.next())P=L.value,j=qr(D.drmInfos,P.drmInfos),D.drmInfos.length&&P.drmInfos.length&&!j.length||(O=x++,E.push({id:O,language:D.language,primary:D.primary,audio:D,video:P,bandwidth:(D.bandwidth||0)+(P.bandwidth||0),drmInfos:j,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]}));else for(S=e.h.concat(e.g),k=l(S),A=k.next();!A.done;A=k.next())I=A.value,C=x++,E.push({id:C,language:I.language,primary:I.primary,audio:I.type==r.bb?I:null,video:I.type==r.Na?I:null,bandwidth:I.bandwidth||0,drmInfos:I.drmInfos,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});e.l=E,w(N)}}))}function Vc(e){var t,n,r,i,a,o,s,u,c,d,f,h,p,g,m,v,y,b,w,x,E,S,k,A;return N((function(I){switch(I.g){case 1:if(t=dt,1==e.length)return I.return(e[0]);for(n=e.map((function(e){return e.filter((function(e){return e.type==t.bb}))})),r=e.map((function(e){return e.filter((function(e){return e.type==t.Na}))})),i=e.map((function(e){return e.filter((function(e){return e.type==t.aa}))})),a=e.map((function(e){return e.filter((function(e){return e.type==t.Mb}))})),o=l(i),s=o.next();!s.done;s=o.next())s.value.push(rd(t.aa));for(u=l(a),c=u.next();!c.done;c=u.next())c.value.push(rd(t.Mb));return T(I,Hc([],n,0,zc,Wc),2);case 2:return d=I.h,T(I,Hc([],r,0,zc,Wc),3);case 3:return f=I.h,T(I,Hc([],i,0,zc,Wc),4);case 4:return h=I.h,T(I,Hc([],a,0,zc,Wc),5);case 5:if(p=I.h,g=0,f.length&&d.length)for(b=l(d),w=b.next();!w.done;w=b.next())for(x=w.value,E=l(f),S=E.next();!S.done;S=E.next())k=S.value,A=g++,k.variantIds.push(A),x.variantIds.push(A);else for(m=f.concat(d),v=l(m),y=v.next();!y.done;y=v.next())y.value.variantIds=[g++];return I.return(f.concat(d).concat(h).concat(p))}}))}function Hc(e,t,n,r,i){var a,o,s,u,c,d,f,h,p,g,m,v,y,b,w,x,E,S,k,A,I;return N((function(C){switch(C.g){case 1:for(a=dt,o=[],s=l(te(t)),u=s.next();!u.done;u=s.next())c=u.value,d=c.ha,f=c.item,d>=n?o.push(new Set(f)):o.push(new Set);h=l(e),p=h.next();case 2:if(p.done){C.v(4);break}return T(C,function(e,t,n,r,i){var a;return N((function(o){return 1==o.g?(a=Yc(t,e))?T(o,Kc(a),2):o.return(!1):(Gc(e,a,n,r,i),o.return(!0))}))}(p.value,t,n,i,o),5);case 5:if(!C.h)throw new qe(2,4,4037);p=h.next(),C.v(2);break;case 4:g=l(o),m=g.next();case 6:if(m.done){C.v(8);break}v=m.value,y=l(v),b=y.next();case 9:if(b.done){m=g.next(),C.v(6);break}return T(C,function(e,t,n,r,i){var a,o;return N((function(s){return 1==s.g?(a=n(e),(o=Yc(t,a))?a.createSegmentIndex?T(s,Kc(o),2):s.v(2):s.return(null)):(Gc(a,o,0,r,i),s.return(a))}))}(b.value,t,r,i,o),12);case 12:(w=C.h)&&e.push(w),b=y.next(),C.v(9);break;case 8:for(x=l(o),m=x.next();!m.done;m=x.next())for(E=m.value,S={},k=l(E),b=k.next();!b.done;S={Va:S.Va},b=k.next())if(S.Va=b.value,A=S.Va.type==a.aa&&!S.Va.language,I=S.Va.type==a.Mb&&!S.Va.tilesLayout,!A&&!I&&e.some(function(e){return function(t){return t.mimeType==e.Va.mimeType&&Pt(t.codecs)==Pt(e.Va.codecs)}}(S)))throw new qe(2,4,4037);return C.return(e)}}))}function Kc(e){for(var t=[],n=(e=l(e)).next();!n.done;n=e.next())n=n.value,t.push(n.createSegmentIndex()),n.trickModeVideo&&!n.trickModeVideo.segmentIndex&&t.push(n.trickModeVideo.createSegmentIndex());return Promise.all(t)}function Gc(e,t,n,r,i){for(var a=(t=l(te(t))).next();!a.done;a=t.next()){var o=a.value;if(a=o.ha,o=o.item,a>=n){r(e,o);var s=!0;"audio"==e.type&&0==zt(e.language,o.language)&&(s=!1),s&&i[a].delete(o)}}}function qc(e){return(e=Object.assign({},e)).originalId=null,e.createSegmentIndex=function(){return Promise.resolve()},e.segmentIndex=new wo,e.emsgSchemeIdUris=[],e.keyIds=new Set,e.closedCaptions=null,e.trickModeVideo=null,e}function zc(e){return(e=Object.assign({},e)).keyIds=new Set,e.segments=[],e.variantIds=[],e.closedCaptions=null,e}function Xc(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles))),t.emsgSchemeIdUris&&(e.emsgSchemeIdUris=Array.from(new Set(e.emsgSchemeIdUris.concat(t.emsgSchemeIdUris))));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,null==e.originalId?e.originalId=t.originalId:e.originalId+=","+(t.originalId||""),n=qr(e.drmInfos,t.drmInfos),t.drmInfos.length&&e.drmInfos.length&&!n.length)throw new qe(2,4,4038);if(e.drmInfos=n,e.encrypted=e.encrypted||t.encrypted,t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var r=(n=l(t.closedCaptions)).next();!r.done;r=n.next()){var i=l(r.value);r=i.next().value,i=i.next().value,e.closedCaptions.set(r,i)}}e.segmentIndex.l.push(t.segmentIndex),t.trickModeVideo?(e.trickModeVideo||(e.trickModeVideo=qc(t.trickModeVideo),e.trickModeVideo.segmentIndex=e.segmentIndex.clone()),Xc(e.trickModeVideo,t.trickModeVideo)):e.trickModeVideo&&
35Xc(e.trickModeVideo,t)}function Wc(e,t){e.roles=Array.from(new Set(e.roles.concat(t.roles)));var n=t.keyIds;if(n=new Set([].concat(c(e.keyIds),c(n))),e.keyIds=n,e.encrypted=e.encrypted&&t.encrypted,e.segments.push.apply(e.segments,c(t.segments)),t.closedCaptions){e.closedCaptions||(e.closedCaptions=new Map);for(var r=(n=l(t.closedCaptions)).next();!r.done;r=n.next()){var i=l(r.value);r=i.next().value,i=i.next().value,e.closedCaptions.set(r,i)}}}function Yc(e,t){for(var n=[],r=l(e),i=r.next();!i.done;i=r.next()){for(var a=t,o={audio:$c,video:$c,text:Jc,image:Zc}[a.type],s={audio:Qc,video:ed,text:td,image:nd}[a.type],u=null,c=(i=l(i.value)).next();!c.done;c=i.next())!o(a,c=c.value)||u&&!s(a,u,c)||(u=c);if(!(a=u))return null;n.push(a)}return n}function $c(e,t){var n;if(!(n=t.mimeType!=e.mimeType||Pt(t.codecs)!=Pt(e.codecs))&&(n=e.drmInfos)){n=e.drmInfos;var r=t.drmInfos;n=!(!n.length||!r.length||0<qr(n,r).length)}return!n}function Jc(e,t){return!!e.language&&(!t.language||0!=zt(e.language,t.language)&&t.kind==e.kind)}function Zc(e){return!!e.tilesLayout}function Qc(e,t,n){if(e.id==n.id)return!0;var r=zt(e.language,t.language),i=zt(e.language,n.language);return i>r||!(i<r)&&(!(t.primary||!n.primary)||!(t.primary&&!n.primary)&&(e.roles.length?(r=t.roles.filter((function(t){return e.roles.includes(t)})),(i=n.roles.filter((function(t){return e.roles.includes(t)}))).length>r.length||!(i.length<r.length)&&n.roles.length<t.roles.length):!(n.roles.length||!t.roles.length)||!(n.roles.length&&!t.roles.length)&&((r=ad(e.channelsCount,t.channelsCount,n.channelsCount))==sd||r!=ld&&((r=ad(e.audioSamplingRate,t.audioSamplingRate,n.audioSamplingRate))==sd||r!=ld&&!(!e.bandwidth||od(e.bandwidth,t.bandwidth,n.bandwidth)!=sd)))))}function ed(e,t,n){if(e.id==n.id)return!0;var r=ad(e.width*e.height,t.width*t.height,n.width*n.height);if(r==sd)return!0;if(r==ld)return!1;if(e.frameRate){if((r=ad(e.frameRate,t.frameRate,n.frameRate))==sd)return!0;if(r==ld)return!1}return!(!e.bandwidth||od(e.bandwidth,t.bandwidth,n.bandwidth)!=sd)}function td(e,t,n){if(e.id==n.id)return!0;var r=zt(e.language,t.language),i=zt(e.language,n.language);if(i>r)return!0;if(i<r)return!1;if(!t.primary&&n.primary)return!0;if(t.primary&&!n.primary)return!1;if(e.roles.length){if(r=t.roles.filter((function(t){return e.roles.includes(t)})),(i=n.roles.filter((function(t){return e.roles.includes(t)}))).length>r.length)return!0;if(i.length<r.length)return!1}else{if(!n.roles.length&&t.roles.length)return!0;if(n.roles.length&&!t.roles.length)return!1}return n.mimeType==e.mimeType&&n.codecs==e.codecs&&(t.mimeType!=e.mimeType||t.codecs!=e.codecs)}function nd(e,t,n){return e.id==n.id||ad(e.width*e.height,t.width*t.height,n.width*n.height)==sd}function rd(e){return{id:0,originalId:"",primary:!1,type:e,mimeType:"",codecs:"",language:"",label:null,width:null,height:null,encrypted:!1,keyIds:new Set,segments:[],variantIds:[],roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}function id(e){return{id:0,originalId:"",createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new yo([]),mimeType:"",codecs:"",encrypted:!1,drmInfos:[],keyIds:new Set,language:"",label:null,type:e,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null}}function ad(e,t,n){if(t==e&&e!=n)return ld;if(n==e&&e!=t)return sd;if(t>e){if(n<=e||n-e<t-e)return sd;if(n-e>t-e)return ld}else{if(n>e)return ld;if(e-n<e-t)return sd;if(e-n>e-t)return ld}return ud}function od(e,t,n){return t=Math.abs(e-t),(e=Math.abs(e-n))<t?sd:t<e?ld:ud}Bc.prototype.release=function(){for(var e=l(this.g.concat(this.h,this.j,this.i)),t=e.next();!t.done;t=e.next())(t=t.value).segmentIndex&&t.segmentIndex.release();this.g=[],this.h=[],this.j=[],this.i=[],this.l=[]};var sd=1,ud=0,ld=-1;function cd(){var e=this;this.C=this.o=null,this.h=[],this.B=null,this.D=1,this.l={},this.H={},this.g=new Bc,this.u=0,this.F=new V(5),this.s=new Qt((function(){e.Zb()})),this.i=new lr,this.j=1/0,this.m=!1}function dd(e){var t,n,r,i,a,o,s;return N((function(u){return 1==u.g?(t=hr(e.h,e.o.retryParameters),n=e.C.networkingEngine,r=Date.now(),i=n.request(0,t),cr(e.i,i),T(u,i.promise,2)):3!=u.g?(a=u.h,e.C?(a.uri&&!e.h.includes(a.uri)&&e.h.unshift(a.uri),T(u,function(e,t,n){var r,i,a,o;return N((function(s){if(1==s.g){if(!(r=cc(t,"MPD")))throw new qe(2,4,4001,n);return e.o.dash.disableXlinkProcessing?s.return(fd(e,r,n)):(i=e.o.dash.xlinkFailGracefully,a=Tc(r,e.o.retryParameters,i,n,e.C.networkingEngine),cr(e.i,a),T(s,a.promise,2))}return o=s.h,s.return(fd(e,o,n))}))}(e,a.data,a.uri),3)):u.return(0)):(o=Date.now(),s=(o-r)/1e3,H(e.F,1,s),u.return(s))}))}function fd(e,t,n){var r,i,a,o,s,u,c,d,f,h,p,g,m,v,y,b,E,A,I,C,M,R,D,_,L,P,j,O;return N((function(U){switch(U.g){case 1:if((r=e.o.dash.manifestPreprocessor)&&r(t),i=[n],0<(a=Yl(t,"Location").map(Zl).filter(Fe)).length&&(o=ot(i,a),i=e.h=o),s=Yl(t,"BaseURL"),u=s.map(Zl),c=ot(i,u),d=0,s&&s.length&&(d=ec(s[0],"availabilityTimeOffset",sc)||0),f=e.o.dash.ignoreMinBufferTime,h=0,f||(h=ec(t,"minBufferTime",nc)||0),e.u=ec(t,"minimumUpdatePeriod",nc,-1),p=ec(t,"availabilityStartTime",tc),g=ec(t,"timeShiftBufferDepth",nc),m=e.o.dash.ignoreSuggestedPresentationDelay,v=null,m||(v=ec(t,"suggestedPresentationDelay",nc)),y=e.o.dash.ignoreMaxSegmentDuration,b=null,y||(b=ec(t,"maxSegmentDuration",nc)),E=t.getAttribute("type")||"static",e.B)for(A=e.B.presentationTimeline,I=l(Object.values(e.l)),C=I.next();!C.done;C=I.next())C.value.eb(A.Za());else M=e.o.defaultPresentationDelay||1.5*h,A=new Ja(p,null!=v?v:M,e.o.dash.autoCorrectDrift);R=t.getAttribute("profiles")||"",D={cb:"static"!=E,presentationTimeline:A,fa:null,W:null,ka:null,K:null,bandwidth:0,ee:!1,vb:d,profiles:R.split(",")};for(var B=ec(t,"mediaPresentationDuration",nc),F=[],V=0,H=Yl(t,"Period"),K=(H=l(te(H))).next();!K.done;K=H.next()){var G=K.value;K=G.item,G=G.next,V=ec(K,"start",nc,V);var q=ec(K,"duration",nc),z=null;if(G){var W=ec(G,"start",nc);null!=W&&(z=W-V)}else null!=B&&(z=B-V);if(null==z&&(z=q),K=hd(e,D,c,{start:V,duration:z,node:K,ge:null==z||!G}),F.push(K),D.fa.id&&z&&(e.H[D.fa.id]=z),null==z){V=null;break}V+=z}return L=(_=null!=B?{periods:F,duration:B,Zd:!1}:{periods:F,duration:V,Zd:!0}).duration,P=_.periods,A.ec("static"==E),"static"!=E&&_.Zd||A.Ja(L||1/0),e.j&&!e.m&&e.C.isAutoLowLatencyMode()&&(e.C.enableLowLatencyMode(),e.m=e.C.isLowLatencyMode()),e.m?A.te(e.j):e.j&&X("Low-latency DASH live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),A.X()&&!isNaN(e.o.availabilityWindowOverride)&&(g=e.o.availabilityWindowOverride),null==g&&(g=1/0),A.Qd(g),A.zd(b||1),T(U,Fc(e.g,P,D.cb),2);case 2:if(e.B){e.B.variants=e.g.l,e.B.textStreams=e.g.j,e.B.imageStreams=e.g.i,e.C.filter(e.B),U.v(3);break}if(e.B={presentationTimeline:A,variants:e.g.l,textStreams:e.g.j,imageStreams:e.g.i,offlineSessionIds:[],minBufferTime:h||0},!A.ye()){U.v(3);break}return j=Yl(t,"UTCTiming"),T(U,function(e,t,n){var r,i,a,o,s,u,c,d;return N((function(f){switch(f.g){case 1:r=n.map((function(e){return{scheme:e.getAttribute("schemeIdUri"),value:e.getAttribute("value")}})),i=e.o.dash.clockSyncUri,!r.length&&i&&r.push({scheme:"urn:mpeg:dash:utc:http-head:2014",value:i}),a=l(r),o=a.next();case 2:if(o.done){f.v(4);break}switch(s=o.value,x(f,5),u=s.scheme,c=s.value,u){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":return f.v(7);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 f.v(8);case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":return d=Date.parse(c),f.return(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":X("NTP UTCTiming scheme is not supported");break;default:X("Unrecognized scheme in UTCTiming element",u)}f.v(9);break;case 7:return T(f,vd(e,t,c,"HEAD"),10);case 10:return f.return(f.h);case 8:return T(f,vd(e,t,c,"GET"),11);case 11:return f.return(f.h);case 9:S(f,3);break;case 5:k(f);case 3:o=a.next(),f.v(2);break;case 4:return X("A UTCTiming element should always be given in live manifests! This content may not play on clients with bad clocks!"),f.return(0)}}))}(e,c,j),5);case 5:if(O=U.h,!e.C)return U.return();A.ue(O);case 3:e.C.makeTextStreamsForClosedCaptions(e.B),w(U)}}))}function hd(e,t,n,r){t.fa=md(r.node,null,n),t.W=r,t.fa.vb=t.vb,t.fa.id||(t.fa.id="__shaka_period_"+r.start);for(var i=(n=l(n=Yl(r.node,"EventStream"))).next();!i.done;i=n.next())yd(e,r.start,r.duration,i.value);if(n=Yl(r.node,"AdaptationSet").map((function(n){return function(e,t,n){t.ka=md(n,t.fa,null);var r=!1,i=Yl(n,"Role"),a=i.map((function(e){return e.getAttribute("value")})).filter(Fe),o=void 0,s=t.ka.contentType==ct;s&&(o="subtitle");for(var u=(i=l(i)).next();!u.done;u=i.next()){var d=(u=u.value).getAttribute("schemeIdUri");if(null==d||"urn:mpeg:dash:role:2011"==d)switch(u=u.getAttribute("value"),u){case"main":r=!0;break;
35case"caption":case"subtitle":o=u}}d=Yl(n,"EssentialProperty"),i=null,u=!1;for(var f=(d=l(d)).next();!f.done;f=d.next())"http://dashif.org/guidelines/trickmode"==(f=f.value).getAttribute("schemeIdUri")?i=f.getAttribute("value"):u=!0;d=Yl(n,"Accessibility");var h=new Map;for(d=l(d),f=d.next();!f.done;f=d.next()){var p=f.value;if(f=p.getAttribute("schemeIdUri"),p=p.getAttribute("value"),"urn:scte:dash:cc:cea-608:2015"==f)if(f=1,null!=p)for(var g=l(p=p.split(";")),m=g.next();!m.done;m=g.next()){var v=m.value,y=m=void 0;v.includes("=")?(m=(v=v.split("="))[0].startsWith("CC")?v[0]:"CC"+v[0],y=v[1]):(m="CC"+f,2==p.length?f+=2:f++,y=v),h.set(m,qt(y))}else h.set("CC1","und");else if("urn:scte:dash:cc:cea-708:2015"==f)if(f=1,null!=p)for(m=(p=l(p.split(";"))).next();!m.done;m=p.next())v=g=void 0,(m=m.value).includes("=")?(g="svc"+(m=m.split("="))[0],v=m[1].split(",")[0].split(":").pop()):(g="svc"+f,f++,v=m),h.set(g,qt(v));else h.set("svc1","und");else"urn:mpeg:dash:role:2011"==f&&null!=p&&(a.push(p),"captions"==p&&(o="caption"))}if(u)return null;var b=dc(u=Yl(n,"ContentProtection"),e.o.dash.ignoreDrmInfo,e.o.dash.keySystemsByURI),x=qt(n.getAttribute("lang")||"und"),E=n.getAttribute("label");if((u=Yl(n,"Label"))&&u.length&&((u=u[0]).textContent&&(E=u.textContent)),u=Yl(n,"Representation"),n=u.map((function(n){return function(e,t,n,r,i,a,o,s,u,l){if(t.K=md(l,t.ka,null),e.j=Math.min(e.j,t.K.vb),!function(e){var t=e.cc?1:0;return t+=e.ab?1:0,0==(t+=e.dc?1:0)?e.contentType==ct||"application"==e.contentType:(1!=t&&(e.cc&&(e.ab=null),e.dc=null),!0)}(t.K))return null;var c=t.W.start;t.bandwidth=ec(l,"bandwidth",ac)||0;var d=t.K.contentType,f=d==ct||"application"==d;d="image"==d;try{var h=function(t,n,r){return function(e,t,n,r){var i,a,o,s,u;return N((function(l){return 1==l.g?(i=vr,a=Do(t,n,r,e.o.retryParameters),o=e.C.networkingEngine,s=o.request(i,a),cr(e.i,s),T(l,s.promise,2)):(u=l.h,l.return(u.data))}))}(e,t,n,r)};if(t.K.cc)var p=Rc(t,h);else if(t.K.ab)p=Pc(t,e.l);else if(t.K.dc)p=Oc(t,h,e.l,!!e.B,e.o.dash.initialSegmentLimit,e.H);else{var g=t.K.ya,m=t.W.duration||0;p={xb:function(){return Promise.resolve(bo(c,m,g))}}}}catch(e){if((f||d)&&4002==e.code)return null;throw e}h=function(e,t,n,r){var i=dc(e,n,r);
35if(t.ae)e=1==t.drmInfos.length&&!t.drmInfos[0].keySystem,n=0==i.drmInfos.length,(0==t.drmInfos.length||e&&!n)&&(t.drmInfos=i.drmInfos),t.ae=!1;else if(0<i.drmInfos.length&&(t.drmInfos=t.drmInfos.filter((function(e){return i.drmInfos.some((function(t){return t.keySystem==e.keySystem}))})),0==t.drmInfos.length))throw new qe(2,4,4008);return i.Xd||t.Xd}(h=Yl(l,"ContentProtection"),n,e.o.dash.ignoreDrmInfo,e.o.dash.keySystemsByURI),h=new Set(h?[h]:[]);var v=!1;Yl(l,"SupplementalProperty").some((function(e){return"tag:dolby.com,2018:dash:EC3_ExtensionType:2018"==e.getAttribute("schemeIdUri")&&"JOC"==e.getAttribute("value")}))&&(t.K.mimeType="audio/eac3-joc",v=!0);var y,b,x=!1;if(f&&(x=s.includes("forced_subtitle")),d&&((l=Yl(l,"EssentialProperty").find((function(e){return["http://dashif.org/thumbnail_tile","http://dashif.org/guidelines/thumbnail_tile"].includes(e.getAttribute("schemeIdUri"))})))&&(y=l.getAttribute("value")),!y))return null;l=t.K.codecs,t.profiles.includes("http://dashif.org/guidelines/dash-if-uhd#hevc-hdr-pq10")&&(l.includes("hvc1.2.4.L153.B0")||l.includes("hev1.2.4.L153.B0"))&&(b="PQ");var E={id:e.D++,originalId:t.K.id,createSegmentIndex:function(){var e;return N((function(t){if(1==t.g)return E.segmentIndex?t.v(0):(e=E,T(t,p.xb(),3));e.segmentIndex=t.h,w(t)}))},segmentIndex:null,mimeType:t.K.mimeType,codecs:t.K.codecs,frameRate:t.K.frameRate,pixelAspectRatio:t.K.pixelAspectRatio,bandwidth:t.bandwidth,width:t.K.width,height:t.K.height,kind:r,encrypted:0<n.drmInfos.length,drmInfos:n.drmInfos,keyIds:h,language:i,label:a,type:t.ka.contentType,primary:o,trickModeVideo:null,emsgSchemeIdUris:t.K.emsgSchemeIdUris,roles:s,forced:x,channelsCount:t.K.Cd,audioSamplingRate:t.K.audioSamplingRate,spatialAudio:v,closedCaptions:u,hdr:b,tilesLayout:y};return E}(e,t,b,o,x,E,r,a,h,n)})).filter((function(e){return!!e})),0==n.length){if(i="image"==t.ka.contentType,e.o.dash.ignoreEmptyAdaptationSet||s||i)return null;throw new qe(2,4,4003)}if(!t.ka.contentType||"application"==t.ka.contentType)for(t.ka.contentType=bd(n[0].mimeType,n[0].codecs),s=l(n),d=s.next();!d.done;d=s.next())d.value.type=t.ka.contentType;for(s=l(n),d=s.next();!d.done;d=s.next())for(d=d.value,f=l(b.drmInfos),p=f.next();!p.done;p=f.next())(p=p.value).keyIds=p.keyIds&&d.keyIds?new Set([].concat(c(p.keyIds),c(d.keyIds))):p.keyIds||d.keyIds;return s=u.map((function(e){return e.getAttribute("id")})).filter(Fe),{id:t.ka.id||"__fake__"+e.D++,contentType:t.ka.contentType,language:x,zg:r,streams:n,drmInfos:b.drmInfos,Sd:i,Kf:s}}(e,t,n)})).filter(Fe),t.cb){r=[];for(var a=(i=l(n)).next();!a.done;a=i.next())for(var o=(a=l(a.value.Kf)).next();!o.done;o=a.next())r.push(o.value);if(r.length!=new Set(r).size)throw new qe(2,4,4018)}for(r=n.filter((function(e){return!e.Sd})),i=(n=l(n=n.filter((function(e){return e.Sd})))).next();!i.done;i=n.next()){a=(i=i.value).Sd.split(" ");for(var s=(o=l(r)).next();!s.done;s=o.next()){var u=s.value;if(a.includes(u.id)){s={};for(var d=(u=l(u.streams)).next();!d.done;s={mc:s.mc},d=u.next())s.mc=d.value,s.mc.trickModeVideo=i.streams.find(function(e){return function(t){return Pt(e.mc.codecs)==Pt(t.codecs)}}(s))}}}if(i=e.o.disableAudio?[]:pd(r,"audio"),o=e.o.disableVideo?[]:pd(r,"video"),a=e.o.disableText?[]:pd(r,ct),n=e.o.disableThumbnails?[]:pd(r,"image"),!o.length&&!i.length)throw new qe(2,4,4004);for(r=[],s=(i=l(i)).next();!s.done;s=i.next())r.push.apply(r,c(s.value.streams));for(i=[],s=(o=l(o)).next();!s.done;s=o.next())i.push.apply(i,c(s.value.streams));for(o=[],s=(a=l(a)).next();!s.done;s=a.next())o.push.apply(o,c(s.value.streams));for(a=[],s=(n=l(n)).next();!s.done;s=n.next())a.push.apply(a,c(s.value.streams));return{id:t.fa.id,sc:r,Oc:i,textStreams:o,imageStreams:a}}function pd(e,t){return e.filter((function(e){return e.contentType==t}))}function gd(e,t){0>e.u||e.s.S(Math.max(3,e.u-t,K(e.F)))}function md(e,t,n){t=t||{contentType:"",mimeType:"",codecs:"",emsgSchemeIdUris:[],frameRate:void 0,pixelAspectRatio:void 0,Cd:null,audioSamplingRate:null,vb:0},n=n||t.ya;for(var r=Yl(e,"BaseURL"),i=r.map(Zl),a=e.getAttribute("contentType")||t.contentType,o=e.getAttribute("mimeType")||t.mimeType,s=e.getAttribute("codecs")||t.codecs,u=ec(e,"frameRate",uc)||t.frameRate,c=e.getAttribute("sar")||t.pixelAspectRatio,d=Yl(e,"InbandEventStream"),f=t.emsgSchemeIdUris.slice(),h=(d=l(d)).next();!h.done;h=d.next())h=h.value.getAttribute("schemeIdUri"),f.includes(h)||f.push(h);d=function(e){for(var t=(e=l(e)).next();!t.done;t=e.next()){var n=t.value;if((t=n.getAttribute("schemeIdUri"))&&(n=n.getAttribute("value")))switch(t){case"urn:mpeg:dash:outputChannelPositionList:2012":return n.trim().split(/ +/).length;
35case"urn:mpeg:dash:23003:3:audio_channel_configuration:2011":case"urn:dts:dash:audio_channel_configuration:2012":if(!(t=parseInt(n,10)))continue;return t;case"tag:dolby.com,2014:dash:audio_channel_configuration:2011":case"urn:dolby:dash:audio_channel_configuration:2011":if(!(t=parseInt(n,16)))continue;for(e=0;t;)1&t&&++e,t>>=1;return e;case"urn:mpeg:mpegB:cicp:ChannelConfiguration":if(t=[0,1,2,3,4,5,6,8,2,3,4,7,8,24,8,12,10,12,14,12,14],(n=parseInt(n,10))&&0<n&&n<t.length)return t[n]}}return null}(d=Yl(e,"AudioChannelConfiguration"))||t.Cd,h=ec(e,"audioSamplingRate",oc)||t.audioSamplingRate,a||(a=bd(o,s));var p=Xl(e,"SegmentBase"),g=Xl(e,"SegmentTemplate"),m=p&&ec(p,"availabilityTimeOffset",sc)||0,v=g&&ec(g,"availabilityTimeOffset",sc)||0;return r=r&&r.length&&ec(r[0],"availabilityTimeOffset",sc)||0,r=t.vb+r+m+v,{ya:ot(n,i),cc:p||t.cc,ab:Xl(e,"SegmentList")||t.ab,dc:g||t.dc,width:ec(e,"width",oc)||t.width,height:ec(e,"height",oc)||t.height,contentType:a,mimeType:o,codecs:s,frameRate:u,pixelAspectRatio:c,emsgSchemeIdUris:f,id:e.getAttribute("id"),Cd:d,audioSamplingRate:h,vb:r}}function vd(e,t,n,r){var i,a,o,s,u,l;return N((function(c){if(1==c.g)return i=ot(t,[n]),(a=hr(i,e.o.retryParameters)).method=r,o=e.C.networkingEngine.request(4,a),cr(e.i,o),T(c,o.promise,2);if(s=c.h,"HEAD"==r){if(!s.headers||!s.headers.date)return c.return(0);u=s.headers.date}else u=mt(s.data);return l=Date.parse(u),isNaN(l)?c.return(0):c.return(l-Date.now())}))}function yd(e,t,n,r){for(var i=r.getAttribute("schemeIdUri")||"",a=r.getAttribute("value")||"",o=ec(r,"timescale",oc)||1,s=(r=l(Yl(r,"Event"))).next();!s.done;s=r.next()){var u=ec(s=s.value,"presentationTime",oc)||0,c=ec(s,"duration",oc)||0;c=(u=u/o+t)+c/o,null!=n&&(u=Math.min(u,t+n),c=Math.min(c,t+n)),s={schemeIdUri:i,value:a,startTime:u,endTime:c,id:s.getAttribute("id")||"",eventElement:s},e.C.onTimelineRegionAdded(s)}}function bd(e,t){return Ut(Nt(e,t))?ct:e.split("/")[0]}function Td(e,t,n,r){this.g=e,this.type=t,this.U=n,this.segments=r||null}function wd(e,t,n,r){this.id=e,this.name=t,this.g=n,this.value=void 0===r?null:r}function xd(e,t,n){return(e=e.getAttribute(t))?e.value:n||null}function Ed(e,t){var n=e.getAttribute(t);if(!n)throw new qe(2,4,4023,t);return n.value}function Sd(e,t,n){n=void 0===n?[]:n,this.U=t,this.g=e,this.h=n}function kd(e,t){this.name=e,this.value=t}function Ad(e,t){return e.filter((function(e){return e.name==t}))}function Id(e,t){return e.filter((function(e){return Ed(e,"TYPE")==t}))}function Cd(e,t){var n=Ad(e,t);return n.length?n[0]:null}function Md(e,t,n){return n=void 0===n?0:n,(e=Cd(e,t))?Number(e.value):n}function Rd(e){this.h=e,this.g=0}function Dd(e){_d(e,/[ \t]+/gm)}function _d(e,t){t.lastIndex=e.g;var n=t.exec(e.h);return n=null==n?null:{position:n.index,length:n[0].length,results:n},e.g==e.h.length||null==n||n.position!=e.g?null:(e.g+=n.length,n.results)}function Nd(e){return e.g==e.h.length?null:(e=_d(e,/[^ \t\n]*/gm))?e[0]:null}function Ld(){this.g=0}function Pd(e,t,n){var r=(t=(t=mt(t)).replace(/\r\n|\r(?=[^\n]|$)/gm,"\n").trim()).split(/\n+/m);if(!/^#EXTM3U($|[ \t\n])/m.test(r[0]))throw new qe(2,4,4015);t=0;for(var i=!0,a=l(r),o=a.next();!o.done;o=a.next())if(o=o.value,/^#(?!EXT)/m.test(o)||i)i=!1;else{if(o=jd(e.g++,o),--e.g,Od.includes(o.name)){t=1;break}"EXT-X-STREAM-INF"==o.name&&(i=!0)}a=[],i=!0;for(var s=(o=l(te(r))).next();!s.done;s=o.next()){var u=s.value;s=u.ha;var c=u.item;if(u=u.next,/^#(?!EXT)/m.test(c)||i)i=!1;else{if(c=jd(e.g++,c),Ud.includes(c.name)){if(1!=t)throw new qe(2,4,4017);u=r.splice(s,r.length-s),r=n,i=[],o=[],s=[],c=null;for(var d=(u=l(u)).next();!d.done;d=u.next())d=d.value,/^(#EXT)/.test(d)?(d=jd(e.g++,d),Od.includes(d.name)?a.push(d):"EXT-X-MAP"==d.name?c=d:"EXT-X-PART"==d.name?s.push(d):"EXT-X-PRELOAD-HINT"==d.name?"PART"==xd(d,"TYPE")?s.push(d):"MAP"==xd(d,"TYPE")&&(d.name="EXT-X-MAP",c=d):o.push(d)):/^#(?!EXT)/m.test(d)||(d=ot([r],[d.trim()])[0],c&&o.push(c),i.push(new Sd(d,o,s)),o=[],s=[]);return s.length&&(c&&o.push(c),i.push(new Sd("",o,s))),new Td(n,t,a,i)}a.push(c),"EXT-X-STREAM-INF"==c.name&&(c.g.push(new kd("URI",u)),i=!0)}}return new Td(n,t,a)}
35function jd(e,t){var n=t.match(/^#(EXT[^:]*)(?::(.*))?$/);if(!n)throw new qe(2,4,4016,t);var r,i=n[1],a=n[2];if(n=[],a){var o;(o=_d(a=new Rd(a),/^([^,=]+)(?:,|$)/g))&&(r=o[1]);for(var s=/([^=]+)=(?:"([^"]*)"|([^",]*))(?:,|$)/g;o=_d(a,s);)n.push(new kd(o[1],o[2]||o[3]))}return new wd(e,i,n,r)}(r=cd.prototype).configure=function(e){this.o=e},r.start=function(e,t){var n,r=this;return N((function(i){if(1==i.g)return r.m=t.isLowLatencyMode(),r.h=[e],r.C=t,T(i,dd(r),2);if(n=i.h,r.C&&gd(r,n),!r.C)throw new qe(2,7,7001);return i.return(r.B)}))},r.stop=function(){for(var e=l(Object.values(this.l)),t=e.next();!t.done;t=e.next())t.value.release();return this.g&&this.g.release(),this.o=this.C=null,this.h=[],this.B=null,this.l={},this.g=null,null!=this.s&&(this.s.stop(),this.s=null),this.i.destroy()},r.update=function(){var e,t=this;return N((function(n){return 1==n.g?(x(n,2),T(n,dd(t),4)):2!=n.g?S(n,0):(e=k(n),t.C&&e?(t.C.onError(e),void w(n)):n.return())}))},r.onExpirationUpdated=function(){},r.Zb=function(){var e,t,n=this;return N((function(r){switch(r.g){case 1:return e=0,x(r,2),T(r,dd(n),4);case 4:e=r.h,S(r,3);break;case 2:t=k(r),n.C&&(t.severity=1,n.C.onError(t));case 3:if(!n.C)return r.return();gd(n,e),w(r)}}))},F("shaka.dash.DashParser",cd),ai.mpd=function(){return new cd},ii["application/dash+xml"]=function(){return new cd},ii["video/vnd.mpeg.dash.mpd"]=function(){return new cd},wd.prototype.toString=function(){var e="#"+this.name,t=this.g?this.g.map((function(e){return e.name+"="+(isNaN(Number(e.value))?'"'+e.value+'"':e.value)})):[];return this.value&&t.unshift(this.value),0<t.length&&(e+=":"+t.join(",")),e},wd.prototype.getAttribute=function(e){var t=this.g.filter((function(t){return t.name==e}));return t.length?t[0]:null};var Od="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP".split(" "),Ud="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP".split(" ");function Bd(){}function Fd(e){try{var t=Vd(e);return nr({uri:e,le:e,data:t.data,headers:{"content-type":t.contentType}})}catch(e){return er(e)}}function Vd(t){var n=t.split(":");if(2>n.length||"data"!=n[0])throw new qe(2,1,1004,t);if(2>(n=n.slice(1).join(":").split(",")).length)throw new qe(2,1,1004,t);var r=n[0];t=e.decodeURIComponent(n.slice(1).join(",")),n=r.split(";"),r=n[0];var i=!1;return 1<n.length&&"base64"==n[n.length-1]&&(i=!0,n.pop()),{data:i?kt(t):bt(t),contentType:r}}function Hd(){var e=this;this.o=this.C=null,this.Ma=1,this.l=new Map,this.s=new Map,this.Fa=new Set,this.g=new Map,this.h=null,this.L="",this.Y=new Ld,this.Ea=0,this.u=new Qt((function(){e.Zb()})),this.j=lf,this.B=null,this.pa=0,this.F=1/0,this.T=this.Xa=0,this.D=new lr,this.qa=[],this.J=new Map,this.Wa=!1,this.m=new Map,this.N=null,this.da=new Map,this.H=new Map,this.i=!1}function Kd(e,t){var n,r,i,a,o,s,u,l,c,d,f,h;return N((function(p){if(1==p.g)return n=ff,r=t.Ce,i=new Xe(r),e.i&&t.He&&$e(i,new at("_HLS_skip=YES")),T(p,af(e,hr([i.toString()],e.o.retryParameters),0),2);
35if(3!=p.g){if(a=p.h,1!=(o=Pd(e.Y,a.data,a.uri)).type)throw new qe(2,4,4017);return s=Ad(o.U,"EXT-X-DEFINE"),u=Gd(e,s),l=t.stream,T(p,Qd(e,t.Nc,o,l.type,l.mimeType,t.wd,u,t.Oe),3)}c=p.h,l.segmentIndex.Bb(c,e.h.Za()),c.length&&(d=Md(o.U,"EXT-X-MEDIA-SEQUENCE",0),f=t.wd.get(d),l.segmentIndex.eb(f)),h=c[c.length-1],Cd(o.U,"EXT-X-ENDLIST")&&(rf(e,n.Be),e.h.Ja(h.endTime)),w(p)}))}function Gd(e,t){for(var n=new Map,r=l(t),i=r.next();!i.done;i=r.next()){var a=i.value;i=xd(a,"NAME");var o=xd(a,"VALUE");a=xd(a,"IMPORT"),i&&o&&n.set(i,o),a&&(i=e.l.get(a))&&n.set(a,i)}return n}function qd(e,t){var n=[];e.o.disableVideo||n.push("avc1.42E01E"),e.o.disableAudio||n.push("mp4a.40.2");var r=xd(t,"CODECS",n.join(",")).split(/\s*,\s*/);n=new Set;for(var i=[],a=(r=l(r)).next();!a.done;a=r.next()){var o=Pt(a=a.value);n.has(o)||(i.push(a),n.add(o))}return i}function zd(e){return qt(e=xd(e,"LANGUAGE")||"und")}function Xd(e,t){var n,r,i,a,o,s,u,l,c,d,f,h,p;return N((function(g){if(1==g.g){n=Ed(t,"GROUP-ID"),r="";var m=Ed(t,"TYPE").toLowerCase();return"subtitles"==m&&(m=ct),(i=m)!=ct&&n&&e.m.has(n)&&(r=e.m.get(n)),a=nf(Ed(t,"URI"),e.l),e.g.has(a)?g.return(e.g.get(a)):(o=zd(t),s=xd(t,"NAME"),u=t.getAttribute("DEFAULT"),l="YES"==u,m="audio"==i&&(m=xd(t,"CHANNELS"))?parseInt(m.split("/")[0],10):null,c=m,m="audio"==i&&(!!(m=xd(t,"CHANNELS"))&&m.includes("/JOC")),d=m,f=xd(t,"CHARACTERISTICS"),h=xd(t,"FORCED"),T(g,Wd(e,a,r,i,o,l,s,c,null,f,"YES"==h,d),2))}return p=g.h,e.s.has(n)?e.s.get(n).push(p):e.s.set(n,[p]),null==p?g.return(null):e.g.has(a)?g.return(e.g.get(a)):(e.g.set(a,p),g.return(p))}))}function Wd(e,t,n,r,i,a,o,s,u,d,f,h){var p,g,m,v,y,b,w,E,A,I,C,M,R,D,_,L,P,j,O,U,B,F,V,H,K,G,q,z,W,Y,$,J,Z,Q,ee,te,ne,re,ie;return N((function(ae){switch(ae.g){case 1:return p=ot([e.L],[t])[0],T(ae,af(e,hr([p],e.o.retryParameters),0),2);case 2:if(g=ae.h,p=g.uri,1!=(m=Pd(e.Y,g.data,p)).type)throw new qe(2,4,4017);if(v=[],m.segments)for(y=l(m.segments),b=y.next();!b.done;b=y.next())w=b.value,E=Ad(w.U,"EXT-X-KEY"),v.push.apply(v,c(E));for(A=!1,I=[],C=new Set,M=l(v),R=M.next();!R.done;R=M.next())if(D=R.value,"NONE"!=(_=Ed(D,"METHOD"))){if(A=!0,"AES-128"==_)return e.Wa=!0,ae.return(null);if(L=Ed(D,"KEYFORMAT"),j=(P=uf[L])?P(D):null){if(j.keyIds)for(O=l(j.keyIds),U=O.next();!U.done;U=O.next())B=U.value,C.add(B);I.push(j)}}if(A&&!I.length)throw new qe(2,4,4026);return F=Ad(m.U,"EXT-X-DEFINE"),V=Gd(e,F),function(e,t){var n=Cd(t.U,"EXT-X-PLAYLIST-TYPE"),r=Cd(t.U,"EXT-X-ENDLIST");if(r=n&&"VOD"==n.value||r,n=n&&"EVENT"==n.value&&!r,n=!r&&!n,r)rf(e,lf);else{if(rf(e,n?df:cf),!(r=Cd(t.U,"EXT-X-TARGETDURATION")))throw new qe(2,4,4024,"EXT-X-TARGETDURATION");r=Number(r.value),n=Cd(t.U,"EXT-X-PART-INF"),e.i&&n?(e.Xa=Number(Ed(n,"PART-TARGET")),e.F=Math.min(e.Xa,e.F),n=Cd(t.U,"EXT-X-SERVER-CONTROL"),e.T=n?Number(Ed(n,"PART-HOLD-BACK")):0):e.F=Math.min(r,e.F),e.pa=Math.max(r,e.pa)}}(e,m),T(ae,function(e,t,n,r,i){var a,o,s,u,l,c,d,f,h,p,g;return N((function(m){return 1==m.g?(a=dt,o=vr,s=nf(r.segments[0].g,i),u=new Xe(s),l=u.xa.split(".").pop(),c=sf[t],(d=c[l])?m.return(d):t==a.aa?n&&"vtt"!=n&&"wvtt"!=n?m.return("application/mp4"):m.return("text/vtt"):t!=a.Mb||n&&"jpeg"!=n?((f=hr([s],e.o.retryParameters)).method="HEAD",T(m,af(e,f,o),2)):m.return("image/jpeg")):(h=m.h,(p=h.headers["content-type"])?m.return(p.split(";")[0]):(g=c.mp4,m.return(g)))}))}(e,r,n,m,V),3);case 3:return H=ae.h,of.includes(H)&&(n=""),K=new Map,G=new Map,x(ae,4),T(ae,Qd(e,t,m,r,H,K,V,G),6);case 6:q=ae.h,S(ae,5);break;case 4:if(4035==(z=k(ae)).code)return X("Skipping unsupported HLS stream",H,t),ae.return(null);throw z;case 5:if(W=q[0].startTime,Y=q[q.length-1].endTime,$=new yo(q),J=r==ct?"subtitle":void 0,Z=[],d)for(Q=l(d.split(",")),ee=Q.next();!ee.done;ee=Q.next())te=ee.value,Z.push(te);return re=!!(ne=Cd(m.U,"EXT-X-SERVER-CONTROL"))&&null!=ne.getAttribute("CAN-SKIP-UNTIL"),ie={id:e.Ma++,originalId:o,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:$,mimeType:H,codecs:n,kind:J,encrypted:A,drmInfos:I,keyIds:C,language:i,label:o,type:r,primary:a,trickModeVideo:null,emsgSchemeIdUris:null,frameRate:void 0,pixelAspectRatio:void 0,width:void 0,height:void 0,bandwidth:void 0,roles:Z,forced:f,channelsCount:s,audioSamplingRate:null,spatialAudio:h,closedCaptions:u,hdr:void 0,tilesLayout:void 0},ae.return({stream:ie,Nc:t,Ce:p,je:W,vf:Y,wd:K,Oe:G,He:re})}}))}function Yd(e,t,n,r){return(n=Cd(n,"EXT-X-MAP"))?(t=[r=nf(ot([t],[Ed(n,"URI")])[0],r),xd(n,"BYTERANGE","")].join("-"),e.da.has(t)||(n=function(e,t){var n=0,r=null,i=xd(t,"BYTERANGE");return i&&(n=i.split("@"),r=Number(n[0]),n=Number(n[1]),r=n+r-1),new Ya((function(){return[e]}),n,r)}(r,n),e.da.set(t,n)),e.da.get(t)):null}function $d(e,t,n,r,i,a,o,s,u){var c=r.U,d=nf(r.g,o),f=Cd(c,"EXTINF"),h=o=0,p=null,g=[];if(e.i&&r.h.length){e={};for(var m=(r=l(te(r.h))).next();!m.done;e={Wc:e.Wc},m=r.next()){var v=(m=m.value).ha;m=m.item;var y=0==v?n:g[g.length-1];v=0==v?i:y.endTime;var b=Number(xd(m,"DURATION"));b=v+b;var T=0,w=null;
35"EXT-X-PRELOAD-HINT"==m.name?T=(y=xd(m,"BYTERANGE-START"))?Number(y):0:(T=(y=l(Jd(y,T=xd(m,"BYTERANGE")))).next().value,w=y.next().value),m=xd(m,"URI"),e.Wc=ot([s],[m])[0],g.push(new $a(v,b,function(e){return function(){return[e.Wc]}}(e),T,w,t,a,0,1/0))}}else if(!f)throw new qe(2,4,4024,"EXTINF");return o=f?i+Number(f.value.split(",")[0]):g[g.length-1].endTime,(s=Cd(c,"EXT-X-BYTERANGE"))?(h=(p=l(Jd(n,s.value))).next().value,p=p.next().value):g.length&&(h=g[0].ja,p=g[g.length-1].ea),n="","image"==u&&(n="1x1",(u=Cd(c,"EXT-X-TILES"))&&(n=Ed(u,"LAYOUT"))),new $a(i,o,(function(){return d.length?[d]:[]}),h,p,t,a,0,1/0,g,n)}function Jd(e,t){var n=0,r=null;return t&&(n=t.split("@"),r=Number(n[0]),r=(n=n[1]?Number(n[1]):e.ea+1)+r-1),[n,r]}function Zd(e){if(e.h){for(var t=l(e.qa),n=t.next();!n.done;n=t.next())e.h.Cb(n.value);e.qa=[]}}function Qd(e,t,n,r,i,a,o,s){var u,c,d,f,h,p,g,m,v,y,b,w,x,E,S,k,A,I,C,M;return N((function(R){switch(R.g){case 1:if(u=n.segments,d=Md(n.U,"EXT-X-MEDIA-SEQUENCE",0),h=(f=Cd(n.U,"EXT-X-SKIP"))?Number(xd(f,"SKIPPED-SEGMENTS")):0,p=d+h,e.j!=lf&&a.has(p)){g=a.get(p),R.v(2);break}if(null!=e.N){R.v(3);break}return c=Yd(e,n.g,u[0].U,o),m=e,T(R,tf(e,t,c,i,p,!1,u[0],o,r),4);case 4:m.N=R.h;case 3:g=e.N;case 2:if(u[0].g.split("/").pop(),v=Md(n.U,"EXT-X-DISCONTINUITY-SEQUENCE"),e.i&&(s.has(v)||s.set(v,p),h))for(;s.has(v+1)&&s.get(v+1)<p;)v++;y=e.H.get(v)||0,b=[],w=l(function(e){return te(e)}(u)),x=w.next();case 5:if(x.done){R.v(7);break}if(E=x.value,S=E.ha,k=E.item,A=b[b.length-1],I=0==S?g:A.endTime,p=d+h+S,a.set(p,I),c=Yd(e,n.g,k.U,o),!Cd(k.U,"EXT-X-DISCONTINUITY")){R.v(8);break}return v++,s.set(v,p),T(R,function(e,t,n,r,i,a,o,s,u,l){var c,d;return N((function(f){return 1==f.g?(c=0,e.H.has(t)?(c=e.H.get(t),f.v(2)):T(f,tf(e,n,r,i,a,!0,o,s,l),3)):(2!=f.g&&(d=f.h,c=u-d,e.H.set(t,c)),f.return(c))}))}(e,v,t,c,i,p,k,o,I,r),9);case 9:y=R.h;case 8:!e.i&&e.C.isAutoLowLatencyMode()&&(e.C.enableLowLatencyMode(),e.i=e.C.isLowLatencyMode()),C=Cd(k.U,"EXTINF"),e.i||C?(M=$d(e,c,A,k,I,y,o,n.g,r),b.push(M)):e.i||X("Low-latency HLS live stream detected, but low-latency streaming mode is not enabled in Shaka Player. Set streaming.lowLatencyMode configuration to true, and see https://bit.ly/3clctcj for details."),x=w.next(),R.v(5);break;case 7:return e.qa.push(b),Zd(e),R.return(b)}}))}function ef(e,t){var n,r,i,a,o,s;return N((function(u){switch(u.g){case 1:return n=vr,r=Do(t.ma(),t.ja,t.ea,e.o.retryParameters),e.o.hls.useFullSegmentsForStartTime?u.return(af(e,r,n)):(i=Do(t.ma(),t.ja,t.ja+2048-1,e.o.retryParameters),x(u,2),T(u,af(e,i,n),4));case 4:return a=u.h,u.return(a);case 2:if(7001==(o=k(u)).code)throw o;return X("Unable to fetch the starting part of HLS segment! Falling back to a full segment request, which is expensive! Your server should support Range requests and CORS preflights.",i.uris[0]),T(u,af(e,r,n),5);case 5:return s=u.h,u.return(s)}}))}function tf(e,t,n,r,i,a,o,s,u){var l,c,d,f,h,p,g,m;return N((function(v){switch(v.g){case 1:if(l=$d(e,n,null,o,0,0,s,"",u),e.B&&!a&&(c=e.g.get(t),null!=(d=c.wd.get(i))))return v.return(d);if(r=r.toLowerCase(),of.includes(r))throw X("Raw formats are not yet supported. Skipping "+r),new qe(1,4,4035);if("video/webm"==r)throw X("WebM in HLS is not yet supported. Skipping."),new qe(1,4,4035);if("video/mp4"!=r&&"audio/mp4"!=r){v.v(2);break}return f=[ef(e,l)],n&&f.push(ef(e,n)),T(v,Promise.all(f),3);case 3:return h=v.h,p=h[0],g=h[1]||h[0],v.return(function(e,t,n,r){var i=0;if((new li).box("moov",ci).box("trak",ci).box("mdia",ci).V("mdhd",(function(e){i=ka(e.reader,e.version).timescale,e.parser.stop()})).parse(r,!0),!i)throw new qe(2,4,4030,e,t);var a=0,o=!1;if((new li).box("moof",ci).box("traf",ci).V("tfdt",(function(e){a=Sa(e.reader,e.version).hd/i,o=!0,e.parser.stop()})).parse(n,!0),!o)throw new qe(2,4,4030,e,t);return a}(t,p.uri,p.data,g.data));case 2:if("video/mp2t"!=r){v.v(4);break}return T(v,ef(e,l),5);case 5:return m=v.h,v.return(function(e,t,n){function r(){a.seek(o+188),71!=(s=a.$())&&(a.seek(o+192),s=a.$()),71!=s&&(a.seek(o+204),s=a.$()),71!=s&&i(),a.oe(1)}function i(){throw new qe(2,4,4030,e,t)}for(var a=new oi(n,0),o=0,s=0;;)if(o=a.Z(),71!=(s=a.$())&&i(),8191==(8191&(n=a.Fb())))r();
35else if(16384&n){if(0!=(n=(48&a.$())>>4)&&2!=n||i(),3==n&&(n=a.$(),a.skip(n)),1==a.M()>>8)return a.skip(3),0!=(n=a.$()>>6)&&1!=n||i(),0==a.$()&&i(),(1073741824*((14&(n=a.$()))>>1)+((65534&a.Fb())<<14|(65534&a.Fb())>>1))/9e4;r()}else r()}(t,m.uri,m.data));case 4:throw new qe(2,4,4030,t)}}))}function nf(e,t){var n=String(e).replace(/%7B/g,"{").replace(/%7D/g,"}"),r=n.match(/{\$\w*}/g);if(r)for(var i=(r=l(r)).next();!i.done;i=r.next()){var a=(i=i.value).slice(2,i.length-1),o=t.get(a);if(!o)throw new qe(2,4,4039,a);n=n.replace(i,o)}return n}function rf(e,t){e.j=t,e.h&&e.h.ec(e.j==lf),e.j!=lf||e.u.stop()}function af(e,t,n){if(!e.D)throw new qe(2,7,7001);return t=e.C.networkingEngine.request(n,t),cr(e.D,t),t.promise}F("shaka.net.DataUriPlugin",Bd),Bd.parse=Fd,fr("data",Fd),(r=Hd.prototype).configure=function(e){this.o=e},r.start=function(e,t){var n,r,i=this;return N((function(a){return 1==a.g?(i.C=t,i.i=t.isLowLatencyMode(),T(a,af(i,hr([e],i.o.retryParameters),0),2)):3!=a.g?(n=a.h,i.L=n.uri,T(a,function(e,t){var n,r,i,a,o,s,u,c,d,f,h,p,g,m,v,y,b,E,S,A,I,C,M,R,D,_;return N((function(L){switch(L.g){case 1:if(0!=(n=Pd(e.Y,t,e.L)).type)throw new qe(2,4,4022);for(var P=l(Ad(n.U,"EXT-X-DEFINE")),j=P.next();!j.done;j=P.next()){var O=j.value;j=xd(O,"NAME"),O=xd(O,"VALUE"),j&&O&&(e.l.has(j)||e.l.set(j,O))}for(r=Ad(n.U,"EXT-X-MEDIA"),i=Ad(n.U,"EXT-X-STREAM-INF"),a=Ad(n.U,"EXT-X-IMAGE-STREAM-INF"),j=(P=l(i)).next();!j.done;j=P.next()){var U=j.value;O=xd(U,"AUDIO"),j=xd(U,"VIDEO");var B=xd(U,"SUBTITLES");if(U=qd(e,U),B){var F=lt(ct,U);e.m.set(B,F),re(U,F)}O&&(B=ut("audio",U),e.m.set(O,B)),j&&(O=ut("video",U),e.m.set(j,O))}for(o=Ad(n.U,"EXT-X-SESSION-DATA"),s=l(o),u=s.next();!u.done;u=s.next())c=u.value,d=xd(c,"DATA-ID"),f=xd(c,"URI"),h=xd(c,"LANGUAGE"),p=xd(c,"VALUE"),g={id:d},f&&(g.uri=ot([e.L],[f])[0]),h&&(g.language=h),p&&(g.value=p),m=new ar("sessiondata",g),e.C&&e.C.onEvent(m);return T(L,function(e,t){var n;return N((function(r){return 1==r.g?(t=t.filter((function(e){var t=xd(e,"URI")||"";return"SUBTITLES"!=xd(e,"TYPE")&&""!=t})),t.length?T(r,Xd(e,t[0]),2):r.v(2)):(n=t.slice(1).map((function(t){return Xd(e,t)})),T(r,Promise.all(n),0))}))}(e,r),2);case 2:for(j=(P=l(P=Id(r,"CLOSED-CAPTIONS"))).next();!j.done;j=P.next())j=zd(B=j.value),O=Ed(B,"GROUP-ID"),B=Ed(B,"INSTREAM-ID"),e.J.get(O)||e.J.set(O,new Map),e.J.get(O).set(B,j);return T(L,function(e,t){var n,r,i;return N((function(a){return 1==a.g?(n=t.map((function(t){var n,r,i,a,o,s,u,c;return N((function(d){if(1==d.g)return n=xd(t,"FRAME-RATE"),r=Number(xd(t,"AVERAGE-BANDWIDTH"))||Number(Ed(t,"BANDWIDTH")),i=xd(t,"RESOLUTION"),a=l(i?i.split("x"):[null,null]),o=a.next().value,s=a.next().value,u=xd(t,"VIDEO-RANGE"),T(d,function(e,t){var n,r,i,a,o,s,u,c,d,f,h,p,g,m;return N((function(v){if(1==v.g)return n=dt,r=qd(e,t),i=xd(t,"AUDIO"),a=xd(t,"VIDEO"),s=(o=i||a)&&e.s.has(o)?e.s.get(o):[],u={audio:i?s:[],video:a?s:[]},d=!1,f=Ed(t,"URI"),h=u.audio.find((function(e){return e&&e.Nc==f})),p=lt(n.Na,r),(g=lt(n.bb,r))&&!p?c=n.bb:!s.length&&g&&p?(c=n.Na,r=[[p,g].join()]):u.audio.length&&h?(c=n.bb,d=!0):c=u.video.length?n.bb:n.Na,d?v.v(2):T(v,function(e,t,n,r){var i,a,o,s;return N((function(u){if(1==u.g){if(i=nf(Ed(t,"URI"),e.l),e.g.has(i))return u.return(e.g.get(i));var l=xd(t,"CLOSED-CAPTIONS");return a="video"==r&&l&&"NONE"!=l?e.J.get(l):null,o=ut(r,n),T(u,Wd(e,i,o,r,"und",!1,null,null,a,null,!1,!1),2)}return null==(s=u.h)?u.return(null):e.g.has(i)?u.return(e.g.get(i)):(e.g.set(i,s),u.return(s))}))}(e,t,r,c),3);if(2!=v.g&&(m=v.h),m)u[m.stream.type]=[m];else if(null===m)return v.return(null);return function(e){for(var t=(e=l(e.audio.concat(e.video))).next();!t.done;t=e.next())if(t=t.value){var n=t.stream.codecs.split(",");n=n.filter((function(e){return"mp4a.40.34"!=e})),t.stream.codecs=n.join(",")}}(u),v.return(u)}))}(e,t),2);if(c=d.h){for(var f=d.return,h=c.audio,p=c.video,g=l(p),m=g.next();!m.done;m=g.next())(m=m.value.stream)&&(m.width=Number(o)||void 0,m.height=Number(s)||void 0,m.frameRate=Number(n)||void 0,m.hdr=u||void 0);for(g=e.o.disableAudio,h.length&&!g||(h=[null]),g=e.o.disableVideo,p.length&&!g||(p=[null]),g=[],m=(h=l(h)
35).next();!m.done;m=h.next()){m=m.value;for(var v=l(p),y=v.next();!y.done;y=v.next()){var b=y.value;y=m?m.stream:null;var w=b?b.stream:null,x=m?m.stream.drmInfos:null,E=b?b.stream.drmInfos:null;b=(b?b.Nc:"")+" - "+(m?m.Nc:""),y&&w&&x.length&&E.length&&!(0<qr(x,E).length)||e.Fa.has(b)||(y={id:e.Ma++,language:y?y.language:"und",primary:!!y&&y.primary||!!w&&w.primary,audio:y,video:w,bandwidth:r,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},g.push(y),e.Fa.add(b))}}d=f.call(d,g)}else d=d.return([]);return d}))})),T(a,Promise.all(n),2)):(r=a.h,i=(i=r.reduce(Ue,[])).filter((function(e){return null!=e})),a.return(i))}))}(e,i),3);case 3:return v=L.h,T(L,function(e,t){var n,r,i,a,o,s,u,c,d,f,h;return N((function(p){if(1==p.g)return n=Id(t,"SUBTITLES"),r=n.map((function(t){var n,r;return N((function(i){if(1==i.g)return e.o.disableText?i.return(null):(x(i,2),T(i,Xd(e,t),4));if(2!=i.g)return n=i.h,i.return(n.stream);if(r=k(i),e.o.hls.ignoreTextStreamFailures)return i.return(null);throw r}))})),T(p,Promise.all(r),2);for(i=p.h,a=l(n),o=a.next();!o.done;o=a.next())if(s=o.value,u=Ed(s,"GROUP-ID"),(c=e.m.get(u))&&(d=e.s.get(u)))for(f=l(d),h=f.next();!h.done;h=f.next())h.value.stream.codecs=c;return p.return(i.filter((function(e){return e})))}))}(e,r),4);case 4:return y=L.h,T(L,function(e,t){var n,r;return N((function(i){return 1==i.g?(n=t.map((function(t){var n,r;return N((function(i){if(1==i.g)return e.o.disableThumbnails?i.return(null):(x(i,2),T(i,function(e,t){var n,r,i,a,o,s;return N((function(u){return 1==u.g?(n=nf(Ed(t,"URI"),e.l),r=xd(t,"CODECS","jpeg")||"",e.g.has(n)?u.return(e.g.get(n)):(i=zd(t),a=xd(t,"NAME"),o=xd(t,"CHARACTERISTICS"),T(u,Wd(e,n,r,"image",i,!1,a,null,null,o,!1,!1),2))):null==(s=u.h)?u.return(null):e.g.has(n)?u.return(e.g.get(n)):(e.g.set(n,s),u.return(s))}))}(e,t),4));if(2!=i.g)return n=i.h,i.return(n.stream);if(r=k(i),e.o.hls.ignoreImageStreamFailures)return i.return(null);throw r}))})),T(i,Promise.all(n),2)):(r=i.h,i.return(r.filter((function(e){return e}))))}))}(e,a),5);case 5:if(b=L.h,!e.C)throw new qe(2,7,7001);if(e.Wa&&0==v.length)throw new qe(2,4,4034);for(S=E=1/0,A=l(e.g.values()),I=A.next();!I.done;I=A.next())C=I.value,E=Math.min(E,C.je),"text"!=C.stream.type&&(S=Math.min(S,C.vf-C.je));if(e.j!=lf?(e.h=new Ja(0,e.o.defaultPresentationDelay?e.o.defaultPresentationDelay:e.T?e.T:3*e.pa),e.h.ec(!1)):(e.h=new Ja(null,0),e.h.ec(!0)),Zd(e),e.j!=lf)e.Ea=e.F,M=ff,e.j==M.Ae&&(R=e.h.Jc,isNaN(e.o.availabilityWindowOverride)||(R=e.o.availabilityWindowOverride),e.h.Qd(R));else for(e.h.Ja(S),e.h.offset(-E),D=l(e.g.values()),I=D.next();!I.done;I=D.next())(_=I.value).stream.segmentIndex.offset(-E),_.stream.segmentIndex.Ya(0,S);e.B={presentationTimeline:e.h,variants:v,textStreams:y,imageStreams:b,offlineSessionIds:[],minBufferTime:0},e.C.makeTextStreamsForClosedCaptions(e.B),w(L)}}))}(i,n.data),3)):(0<(r=i.Ea)&&i.u.S(r),a.return(i.B))}))},r.stop=function(){this.u&&(this.u.stop(),this.u=null);var e=[];return this.D&&(e.push(this.D.destroy()),this.D=null),this.o=this.C=null,this.Fa.clear(),this.B=null,this.g.clear(),this.s.clear(),this.m.clear(),this.l.clear(),Promise.all(e)},r.update=function(){var e,t,n,r=this;return N((function(i){if(1==i.g)return r.j==lf?i.return():(e=[],r.N=null,(t=Array.from(r.g.values())).length?T(i,Kd(r,t[0]),2):i.v(2));for(n=1;n<t.length;n++)e.push(Kd(r,t[n]));return T(i,Promise.all(e),0)}))},r.onExpirationUpdated=function(){},r.Zb=function(){var e,t,n=this;return N((function(r){return 1==r.g?n.C?(x(r,2),T(r,n.update(),4)):r.return():2!=r.g?(e=n.Ea,n.u.S(e),S(r,0)):(t=k(r),n.C?(t.severity=1,n.C.onError(t),n.u.S(.1),void w(r)):r.return())}))},F("shaka.hls.HlsParser",Hd);var of=["audio/aac","audio/ac3","audio/ec3","audio/mpeg"],sf={audio:{mp4:"audio/mp4",mp4a:"audio/mp4",m4s:"audio/mp4",m4i:"audio/mp4",m4a:"audio/mp4",m4f:"audio/mp4",cmfa:"audio/mp4",ts:"video/mp2t",aac:"audio/aac",ac3:"audio/ac3",ec3:"audio/ec3",mp3:"audio/mpeg"},video:{mp4:"video/mp4",mp4v:"video/mp4",m4s:"video/mp4",m4i:"video/mp4",m4v:"video/mp4",m4f:"video/mp4",cmfv:"video/mp4",ts:"video/mp2t"},text:{mp4:"application/mp4",m4s:"application/mp4",m4i:"application/mp4",m4f:"application/mp4",cmft:"application/mp4",vtt:"text/vtt",ttml:"application/ttml+xml"},image:{jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml",webp:"image/webp",avif:"image/avif"}},uf={"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":function(e){var t=Ed(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?(t=st("com.widevine.alpha",[{initDataType:"cenc",initData:t=Re((t=Vd(t=Ed(e,"URI"))).data)}]),(e=xd(e,"KEYID"))&&(t.keyIds=new Set([e.toLowerCase().substr(2)])),t):null},"com.microsoft.playready":function(e){var t=Ed(e,"METHOD");return["SAMPLE-AES","SAMPLE-AES-CTR"].includes(t)?st("com.microsoft.playready",[{initDataType:"cenc",initData:e=zl(e=Re((e=Vd(e=Ed(e,"URI"))).data),t=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]))}]):null}},lf="VOD",cf="EVENT",df="LIVE",ff={Be:lf,eg:cf,Ae:df};function hf(e,t,n,r,i,a){if(200<=n&&299>=n&&202!=n)return{uri:i||r,le:r,data:t,headers:e,fromCache:!!e["x-shaka-from-cache"]};i=null;try{i=yt(t)}catch(e){}throw new qe(401==n||403==n?2:1,1,1001,r,n,i,e,a)}function pf(){}function gf(e,t,n,r){var i=new Tf;
35Cr(t.headers).forEach((function(e,t){i.append(t,e)}));var a=new yf,o={Vd:!1,xe:!1};if(e=function(e,t,n,r,i,a){var o,s,u,l,c,d,f,h,p,g,m,v;return N((function(y){switch(y.g){case 1:return o=vf,s=bf,d=c=0,f=Date.now(),x(y,2),T(y,o(e,n),4);case 4:return u=y.h,h=u.clone().body.getReader(),g=(p=u.headers.get("Content-Length"))?parseInt(p,10):0,new s({start:function(e){function t(){var n,r;return N((function(o){switch(o.g){case 1:return x(o,2),T(o,h.read(),4);case 4:n=o.h,S(o,3);break;case 2:return k(o),o.return();case 3:if(n.done){o.v(5);break}if(c+=n.value.byteLength,!a){o.v(5);break}return T(o,a(n.value),5);case 5:(100<(r=Date.now())-f||n.done)&&(i(r-f,c-d,g-c),d=c,f=r),n.done?e.close():(e.enqueue(n.value),t()),w(o)}}))}t()}}),T(y,u.arrayBuffer(),5);case 5:l=y.h,S(y,3);break;case 2:if(m=k(y),r.Vd)throw new qe(1,1,7001,e,t);if(r.xe)throw new qe(1,1,1003,e,t);throw new qe(1,1,1002,e,m,t);case 3:return v={},u.headers.forEach((function(e,t){v[t.trim()]=e})),y.return(hf(v,l,u.status,e,u.url,t))}}))}(e,n,{body:t.body||void 0,headers:i,method:t.method,signal:a.signal,credentials:t.allowCrossSiteCredentials?"include":void 0},o,r,t.streamDataCallback),e=new Qn(e,(function(){return o.Vd=!0,a.abort(),Promise.resolve()})),t=t.retryParameters.timeout){var s=new Qt((function(){o.xe=!0,a.abort()}));s.S(t/1e3),e.finally((function(){s.stop()}))}return e}function mf(){if(!e.ReadableStream)return!1;try{new ReadableStream({})}catch(e){return!1}return!(!e.fetch||!e.AbortController)}ai.m3u8=function(){return new Hd},ii["application/x-mpegurl"]=function(){return new Hd},ii["application/vnd.apple.mpegurl"]=function(){return new Hd},F("shaka.net.HttpFetchPlugin",pf),pf.isSupported=mf,pf.parse=gf;var vf=e.fetch,yf=e.AbortController,bf=e.ReadableStream,Tf=e.Headers;function wf(){}function xf(e,t,n,r){var i=new Ef,a=Date.now(),o=0,s=new Promise((function(s,u){for(var c in i.open(t.method,e,!0),i.responseType="arraybuffer",i.timeout=t.retryParameters.timeout,i.withCredentials=t.allowCrossSiteCredentials,i.onabort=function(){u(new qe(1,1,7001,e,n))},i.onload=function(t){for(var r=(t=t.target).getAllResponseHeaders().trim().split("\r\n"),i={},a=(r=l(r)).next();!a.done;a=r.next())i[(a=a.value.split(": "))[0].toLowerCase()]=a.slice(1).join(": ");try{var o=hf(i,t.response,t.status,e,t.responseURL,n);s(o)}catch(e){u(e)}},i.onerror=function(t){u(new qe(1,1,1002,e,t,n))},i.ontimeout=function(){u(new qe(1,1,1003,e,n))},i.onprogress=function(e){var t=Date.now();(100<t-a||e.lengthComputable&&e.loaded==e.total)&&(r(t-a,e.loaded-o,e.total-e.loaded),o=e.loaded,a=t)},t.headers)i.setRequestHeader(c.toLowerCase(),t.headers[c]);i.send(t.body)}));return new Qn(s,(function(){return i.abort(),Promise.resolve()}))}mf()&&(fr("http",gf,2,!0),fr("https",gf,2,!0)),F("shaka.net.HttpXHRPlugin",wf),wf.parse=xf;var Ef=e.XMLHttpRequest;function Sf(){this.h=this.j=this.i=0,this.g=new Map,this.l=0}function kf(e){var t=this;this.O=e,this.g=new Map,this.I=new Tr((function(){var e=Array.from(t.g.values());return Promise.all(e.map((function(e){return e.catch((function(){}))})))})),this.h=[],this.ie=function(){},this.he=function(){},this.Ob=new Sf}function Af(e){var t=e.h.map((function(e){return e()}));return e.h=[],Promise.all(t)}function If(e,t,n,r,i,a){wr(e.I);var o=function(e,t){e.i+=t;var n=e.l;return e.l++,e.g.set(n,t),n}(e.Ob,r);return r=(e.g.get(t)||Promise.resolve()).then((function(){var t,r,s,u,l,c,d;return N((function(f){if(1==f.g)return T(f,function(e,t){var n,r,i,a;return N((function(o){return 1==o.g?(n=vr,r=e.O.request(n,t),i=function(){return r.abort()},e.h.push(i),T(o,r.promise,2)):(a=o.h,re(e.h,i),o.return(a.data))}))}(e,n),2);if(t=f.h,e.I.g)throw new qe(2,9,7001);if(i)for(u in r=Re(t),(s=new ql(r)).data)l=Number(u),c=s.data[l],d=s.g[l],e.he(c,d);e.Ob.close(o,t.byteLength);var h=e.Ob;return e.ie(0==h.i?0:h.j/h.i,e.Ob.h),f.return(a(t))}))})),e.g.set(t,r),r}function Cf(e,t){var n=this;this.i=e,this.h=e.objectStore(t),this.g=new ht,e.onabort=function(e){e.preventDefault(),n.g.reject()},e.onerror=function(e){e.preventDefault(),n.g.reject()},e.oncomplete=function(){n.g.resolve()}}function Mf(e,t){return new Promise((function(n,r){var i=e.h.openCursor();i.onerror=r,i.onsuccess=function(){var e;return N((function(r){if(1==r.g)return null==i.result?(n(),r.return()):(e=i.result,T(r,t(e.key,e.value,e),2));e.continue(),w(r)}))}}))}function Rf(e){this.h=e,this.g=[]}function Df(e,t){return _f(e,t,"readwrite")}function _f(e,t,n){var r=new Cf(n=e.h.transaction([t],n),t);return e.g.push(r),r.promise().then((function(){re(e.g,r)}),(function(){re(e.g,r)})),r}function Nf(e,t,n){this.g=new Rf(e),this.i=t,this.h=n}function Lf(e){return Promise.reject(new qe(2,9,9011,"Cannot add new value to "+e))}
35function Pf(e,t,n,r){t=(e=Df(e.g,t)).store();for(var i={},a=(n=l(n)).next();!a.done;i={kc:i.kc},a=n.next())i.kc=a.value,t.delete(i.kc).onsuccess=function(e){return function(){return r(e.kc)}}(i);return e.promise()}function jf(e,t,n){var r,i,a,o,s,u,c;return N((function(d){if(1==d.g){for(r=_f(e.g,t,"readonly"),i=r.store(),a={},o=[],s={},u=l(n),c=u.next();!c.done;s={Lb:s.Lb,Jb:s.Jb},c=u.next())s.Jb=c.value,s.Lb=i.get(s.Jb),s.Lb.onsuccess=function(e){return function(){null==e.Lb.result&&o.push(e.Jb),a[e.Jb]=e.Lb.result}}(s);return T(d,r.promise(),2)}if(o.length)throw new qe(2,9,9012,"Could not find values for "+o);return d.return(n.map((function(e){return a[e]})))}))}function Of(e){this.g=new Rf(e)}function Uf(){this.g=new Map}function Bf(e,t,n){if(!(e=e.g.get(t)))throw new qe(2,9,9013,"Could not find mechanism with name "+t);if(!(t=e.getCells().get(n)))throw new qe(2,9,9013,"Could not find cell with name "+n);return t}function Ff(e,t){Vf.set(e,t)}fr("http",xf,1,!0),fr("https",xf,1,!0),Sf.prototype.close=function(e,t){if(this.g.has(e)){var n=this.g.get(e);this.g.delete(e),this.j+=n,this.h+=t}},kf.prototype.destroy=function(){return this.I.destroy()},Cf.prototype.abort=function(){var e=this;return N((function(t){if(1==t.g){try{e.i.abort()}catch(e){}return x(t,2),T(t,e.g,4)}if(2!=t.g)return S(t,0);k(t),w(t)}))},Cf.prototype.store=function(){return this.h},Cf.prototype.promise=function(){return this.g},Rf.prototype.destroy=function(){return Promise.all(this.g.map((function(e){return e.abort()})))},(r=Nf.prototype).destroy=function(){return this.g.destroy()},r.hasFixedKeySpace=function(){return!0},r.addSegments=function(){return Lf(this.i)},r.removeSegments=function(e,t){return Pf(this,this.i,e,t)},r.getSegments=function(e){var t,n=this;return N((function(r){return 1==r.g?T(r,jf(n,n.i,e),2):(t=r.h,r.return(t.map((function(e){return n.Wd(e)}))))}))},r.addManifests=function(){return Lf(this.h)},r.updateManifestExpiration=function(e,t){var n=Df(this.g,this.h),r=n.store();return r.get(e).onsuccess=function(n){(n=n.target.result)&&(n.expiration=t,r.put(n,e))},n.promise()},r.removeManifests=function(e,t){return Pf(this,this.h,e,t)},r.getManifests=function(e){var t,n=this;return N((function(r){return 1==r.g?T(r,jf(n,n.h,e),2):(t=r.h,r.return(Promise.all(t.map((function(e){return n.Rb(e)})))))}))},r.getAllManifests=function(){var e,t,n=this;return N((function(r){return 1==r.g?(e=_f(n.g,n.h,"readonly"),t=new Map,T(r,Mf(e,(function(e,r){var i;return N((function(a){if(1==a.g)return T(a,n.Rb(r),2);i=a.h,t.set(e,i),w(a)}))})),2)):3!=r.g?T(r,e.promise(),3):r.return(t)}))},r.Wd=function(e){return e},r.Rb=function(e){return Promise.resolve(e)},r.add=function(e,t){var n,r,i,a,o,s,u,c=this;return N((function(d){if(1==d.g){for(n=Df(c.g,e),r=n.store(),i=[],a={},o=l(t),s=o.next();!s.done;a={lc:a.lc},s=o.next())u=s.value,a.lc=r.add(u),a.lc.onsuccess=function(e){return function(){i.push(e.lc.result)}}(a);return T(d,n.promise(),2)}return d.return(i)}))},Of.prototype.destroy=function(){return this.g.destroy()},Of.prototype.getAll=function(){var e,t,n=this;return N((function(r){return 1==r.g?(e=_f(n.g,"session-ids","readonly"),t=[],T(r,Mf(e,(function(e,n){t.push(n)})),2)):3!=r.g?T(r,e.promise(),3):r.return(t)}))},Of.prototype.add=function(e){for(var t=Df(this.g,"session-ids"),n=t.store(),r=(e=l(e)).next();!r.done;r=e.next())n.add(r.value);return t.promise()},Of.prototype.remove=function(e){var t,n=this;return N((function(r){return 1==r.g?T(r,Mf(t=Df(n.g,"session-ids"),(function(t,n,r){e.includes(n.sessionId)&&r.delete()})),2):T(r,t.promise(),0)}))},Uf.prototype.destroy=function(){for(var e=[],t=l(this.g.values()),n=t.next();!n.done;n=t.next())e.push(n.value.destroy());return this.g.clear(),Promise.all(e)},Uf.prototype.init=function(){var e=this;Vf.forEach((function(t,n){var r=t();r&&e.g.set(n,r)}));for(var t=[],n=l(this.g.values()),r=n.next();!r.done;r=n.next())t.push(r.value.init());return Promise.all(t)},F("shaka.offline.StorageMuxer",Uf),Uf.unregister=function(e){Vf.delete(e)},Uf.register=Ff,Uf.prototype.destroy=Uf.prototype.destroy;var Vf=new Map;function Hf(){Nf.apply(this,arguments)}function Kf(e,t){!function(e){var t=e.streams.filter((function(e){return"audio"==e.contentType}));if(e=e.streams.filter((function(e){return"video"==e.contentType})),!t.every((function(e){return e.variantIds}))||!e.every((function(e){return e.variantIds}))){for(var n=l(t),r=n.next();!r.done;r=n.next())r.value.variantIds=[];for(r=(n=l(e)).next();!r.done;r=n.next())r.value.variantIds=[];if(n=0,e.length&&!t.length){var i=n++,a=l(e);for(r=a.next();!r.done;r=a.next())r.value.variantIds.push(i)}if(!e.length&&t.length)for(i=n++,r=(a=l(t)).next();!r.done;r=a.next())r.value.variantIds.push(i);if(e.length&&t.length)for(r=(t=l(t)).next();!r.done;r=t.next())for(r=r.value,a=(i=l(e)).next();!a.done;a=i.next()){a=a.value;var o=n++;r.variantIds.push(o),a.variantIds.push(o)}}}(e);for(var n=l(e.streams),r=n.next();!r.done;r=n.next());return e.streams.map((function(n){return function(e,t,n){var r=e.initSegmentUri?Gf(e.initSegmentUri):null,i=t+e.presentationTimeOffset,a=t+n;return{id:e.id,originalId:null,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:void 0,hdr:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,initSegmentKey:r,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map((function(e){var n=Gf(e.uri);return{startTime:t+e.startTime,endTime:t+e.endTime,dataKey:n,initSegmentKey:r,appendWindowStart:t,appendWindowEnd:a,timestampOffset:i,tilesLayout:""}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}(n,e.startTime,t)}))}function Gf(e){var t;if((t=/^offline:[0-9]+\/[0-9]+\/([0-9]+)$/.exec(e))||(t=/^offline:segment\/([0-9]+)$/.exec(e)))return Number(t[1]);throw new qe(2,9,9004,"Could not parse uri "+e)}function qf(){Nf.apply(this,arguments)}function zf(e,t,n){return{id:e.id,originalId:e.originalId,primary:e.primary,type:e.contentType,mimeType:e.mimeType,codecs:e.codecs,frameRate:e.frameRate,pixelAspectRatio:e.pixelAspectRatio,hdr:void 0,kind:e.kind,language:e.language,label:e.label,width:e.width,height:e.height,encrypted:e.encrypted,keyIds:new Set([e.keyId]),segments:e.segments.map((function(r){return{startTime:t+r.startTime,endTime:t+r.endTime,initSegmentKey:e.initSegmentKey,appendWindowStart:t,appendWindowEnd:n,timestampOffset:t-e.presentationTimeOffset,dataKey:r.dataKey,tilesLayout:""}})),variantIds:e.variantIds,roles:[],forced:!1,audioSamplingRate:null,channelsCount:null,spatialAudio:!1,closedCaptions:null,tilesLayout:void 0}}function Xf(){Nf.apply(this,arguments)}function Wf(){this.m=this.j=this.i=this.h=this.g=this.l=null}function Yf(e,t,n,r){this.g=e,this.i=t,this.h=n,this.l=r,this.j=["offline:",e,"/",t,"/",n,"/",r].join("")}function $f(e){if(null==(e=/^offline:([a-z]+)\/([^/]+)\/([^/]+)\/([0-9]+)$/.exec(e)))return null;var t=e[1];if("manifest"!=t&&"segment"!=t)return null;var n=e[2];if(!n)return null;var r=e[3];return r&&null!=t?new Yf(t,n,r,Number(e[4])):null}function Jf(e,t){this.h=e,this.g=t}function Zf(e,t){var n=new Ja(null,0);n.Ja(t.duration);var r=t.streams.filter((function(e){return"audio"==e.type})),i=t.streams.filter((function(e){return"video"==e.type}));r=function(e,t,n,r){for(var i=new Set,a=l(t),o=a.next();!o.done;o=a.next()){var s=l(o.value.variantIds);for(o=s.next();!o.done;o=s.next())i.add(o.value)}for(a=l(n),o=a.next();!o.done;o=a.next())for(s=l(o.value.variantIds),o=s.next();!o.done;o=s.next())i.add(o.value);for(a=new Map,i=l(i),o=i.next();!o.done;o=i.next())o=o.value,a.set(o,{id:o,language:"",primary:!1,audio:null,video:null,bandwidth:0,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]});for(t=l(t),i=t.next();!i.done;i=t.next())for(i=i.value,o=Qf(e,i,r),s=l(i.variantIds),i=s.next();!i.done;i=s.next())(i=a.get(i.value)).language=o.language,i.primary=i.primary||o.primary,i.audio=o;for(n=l(n),t=n.next();!t.done;t=n.next())for(i=t.value,t=Qf(e,i,r),o=l(i.variantIds),i=o.next();!i.done;i=o.next())(i=a.get(i.value)).primary=i.primary||t.primary,i.video=t;return a}(e,r,i,n),i=t.streams.filter((function(e){return e.type==ct})).map((function(t){return Qf(e,t,n)}));var a=t.streams.filter((function(e){return"image"==e.type})).map((function(t){return Qf(e,t,n)})),o=t.drmInfo?[t.drmInfo]:[];if(t.drmInfo)for(var s=l(r.values()),u=s.next();!u.done;u=s.next())(u=u.value).audio&&u.audio.encrypted&&(u.audio.drmInfos=o),u.video&&u.video.encrypted&&(u.video.drmInfos=o);return{presentationTimeline:n,minBufferTime:2,offlineSessionIds:t.sessionIds,variants:Array.from(r.values()),textStreams:i,imageStreams:a}}function Qf(e,t,n){var r=t.segments.map((function(t){return function(e,t){var n=new Yf("segment",e.h,e.g,t.dataKey);return new $a(t.startTime,t.endTime,(function(){return[n.toString()]}),0,null,null!=t.initSegmentKey?function(e,t){var n=new Yf("segment",e.h,e.g,t);return new Ya((function(){return[n.toString()]}),0,null)}(e,t.initSegmentKey):null,t.timestampOffset,t.appendWindowStart,t.appendWindowEnd,[],t.tilesLayout||"")}(e,t)}));return n.Cb(r),{id:t.id,originalId:t.originalId,createSegmentIndex:function(){return Promise.resolve()},segmentIndex:new yo(r),mimeType:t.mimeType,codecs:t.codecs,width:t.width||void 0,height:t.height||void 0,frameRate:t.frameRate,pixelAspectRatio:t.pixelAspectRatio,hdr:t.hdr,kind:t.kind,encrypted:t.encrypted,drmInfos:[],keyIds:t.keyIds,language:t.language,label:t.label,type:t.type,primary:t.primary,trickModeVideo:null,emsgSchemeIdUris:null,roles:t.roles,forced:t.forced,channelsCount:t.channelsCount,audioSamplingRate:t.audioSamplingRate,spatialAudio:t.spatialAudio,closedCaptions:t.closedCaptions,tilesLayout:t.tilesLayout}}function eh(){this.g=null}function th(){}function nh(e){var t=$f(e);return t&&"manifest"==t.g?e=nr(e={uri:e,le:e,data:new ArrayBuffer(0),headers:{"content-type":"application/x-offline-manifest"}}):e=t&&"segment"==t.g?function(e,t){var n=new Uf;return nr(void 0).ba((function(){return n.init()})).ba((function(){return Bf(n,t.Ia(),t.la())})).ba((function(e){return e.getSegments([t.key()])})).ba((function(e){return{uri:t,data:e[0].data,headers:{}}})).finally((function(){return n.destroy()}))}
35(t.key(),t):er(new qe(2,1,9004,e)),e}function rh(e,t,n){var r,i,a,o,s,u;return N((function(c){switch(c.g){case 1:r=[];for(var d=[],f=l(n),h=f.next();!h.done;h=f.next()){h=h.value;for(var p=!1,g=l(d),m=g.next();!m.done;m=g.next())if(ih((m=m.value).info,h)){m.sessionIds.push(h.sessionId),p=!0;break}p||d.push({info:h,sessionIds:[h.sessionId]})}i=l(d),a=i.next();case 2:if(a.done){c.v(4);break}return o=a.value,s=function(e,t,n){var r,i;return N((function(a){switch(a.g){case 1:return r=new Dr({lb:t,onError:function(){},Gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}}),x(a,2),r.configure(e),T(a,function(e,t,n,r,i,a){var o=new Map;return(i={audioCapabilities:i,videoCapabilities:a,distinctiveIdentifier:"optional",persistentState:"required",sessionTypes:["persistent-license"],label:t}).drmInfos=[{keySystem:t,licenseServerUri:n,distinctiveIdentifierRequired:!1,persistentStateRequired:!0,audioRobustness:"",videoRobustness:"",serverCertificate:r,serverCertificateUri:"",initData:null,keyIds:null}],o.set(t,i),Br(e,o,[])}(r,n.info.keySystem,n.info.licenseUri,n.info.serverCertificate,n.info.audioCapabilities,n.info.videoCapabilities),4);case 4:S(a,3);break;case 2:return k(a),T(a,r.destroy(),5);case 5:case 9:return a.return([]);case 3:return x(a,6),T(a,Lr(r),8);case 8:S(a,7);break;case 6:return k(a),T(a,r.destroy(),9);case 7:return i=[],T(a,Promise.all(n.sessionIds.map((function(e){return N((function(t){return 1==t.g?(x(t,2),T(t,function(e,t){var n,r,i;return N((function(a){return 1==a.g?T(a,Fr(e,t),2):(n=a.h)?(r=[],(i=e.j.get(n))&&(i.Ka=new ht,r.push(i.Ka)),r.push(n.remove()),T(a,Promise.all(r),0)):a.return()}))}(r,e),4)):2!=t.g?(i.push(e),S(t,0)):(k(t),void w(t))}))}))),10);case 10:return T(a,r.destroy(),11);case 11:return a.return(i)}}))}(e,t,o),T(c,s,5);case 5:u=c.h,r=r.concat(u),a=i.next(),c.v(2);break;case 4:return c.return(r)}}))}function ih(e,t){function n(e,t){return e.robustness==t.robustness&&e.contentType==t.contentType}return e.keySystem==t.keySystem&&e.licenseUri==t.licenseUri&&ie(e.audioCapabilities,t.audioCapabilities,n)&&ie(e.videoCapabilities,t.videoCapabilities,n)}function ah(e,t){var n=Zf(new Jf(e.Ia(),e.la()),t),r=t.appMetadata||{};return n=oh(n),{offlineUri:e.toString(),originalManifestUri:t.originalManifestUri,duration:t.duration,size:t.size,expiration:t.expiration,tracks:n,appMetadata:r}}function oh(e){for(var t=[],n=function(e){return e.filter((function(e){return Cn(e)}))}(e.variants),r=(n=l(n)).next();!r.done;r=n.next())t.push(wn(r.value));for(n=(e=l(e.textStreams)).next();!n.done;n=e.next())t.push(xn(n.value));return t}function sh(){this.g={}}function uh(e,t){var n=e.g[t];return null==n&&(n=0),n}function lh(e){var t=this;if(e&&e.constructor!=vs)throw new qe(2,9,9008);this.O=this.o=null,e?(this.o=e.o,this.O=e.Ub()):(this.o=ls(),this.O=new dr),this.Lc=[],this.$b=[],this.Fd=[];var n=!e;this.I=new Tr((function(){var e,r,i,a,o;return N((function(s){switch(s.g){case 1:return T(s,Promise.all(t.Fd.map((function(e){return Af(e)}))),2);case 2:for(e=function(){},r=[],i=l(t.$b),a=i.next();!a.done;a=i.next())o=a.value,r.push(o.then(e,e));return T(s,Promise.all(r),3);case 3:if(!n){s.v(4);break}return T(s,t.O.destroy(),4);case 4:t.o=null,t.O=null,w(s)}}))}))}function ch(){if(en())e:{for(var e=l(Vf.values()),t=e.next();!t.done;t=e.next())if(t=(t=t.value)()){t.destroy(),e=!0;break e}e=!1}else e=!1;return e}function dh(e,t){for(var n=[],r=l(e.streams),i=r.next();!i.done;i=r.next())i=i.value,t&&"video"==i.type?n.push({contentType:Nt(i.mimeType,i.codecs),robustness:e.drmInfo.videoRobustness}):t||"audio"!=i.type||n.push({contentType:Nt(i.mimeType,i.codecs),robustness:e.drmInfo.audioRobustness});return n}function fh(e,t,n){return N((function(r){return T(r,function(e,t,n,r){var i,a,o;return N((function(s){return 1==s.g?r.drmInfo?(i=function(e){var t=Array.from(e.g.keys());if(!t.length)throw new qe(2,9,9e3,"No supported storage mechanisms found");return e.g.get(t[0]).getEmeSessionCell()}(n),a=r.sessionIds.map((function(e){return{sessionId:e,keySystem:r.drmInfo.keySystem,licenseUri:r.drmInfo.licenseServerUri,serverCertificate:r.drmInfo.serverCertificate,audioCapabilities:dh(r,!1),videoCapabilities:dh(r,!0)}})),T(s,rh(t,e,a),2)):s.return():3!=s.g?(o=s.h,T(s,i.remove(o),3)):T(s,i.add(a.filter((function(e){return!o.includes(e.sessionId)}))),0)}))}(e.O,e.o.drm,n,t),0)}))}function hh(e,t,n){function r(){}var i=function(e){for(var t=[],n=(e=l(e.streams)).next();!n.done;n=e.next())for(var r=(n=l(n.value.segments)).next();!r.done;
35r=n.next())null!=(r=r.value).initSegmentKey&&t.push(r.initSegmentKey),t.push(r.dataKey);return t}(n);return ah(t,n),Promise.all([e.removeSegments(i,r),e.removeManifests([t.key()],r)])}function ph(e,t,n,r,i,a,o,s,u){var l={id:a.id,originalId:a.originalId,primary:a.primary,type:a.type,mimeType:a.mimeType,codecs:a.codecs,frameRate:a.frameRate,pixelAspectRatio:a.pixelAspectRatio,hdr:a.hdr,kind:a.kind,language:a.language,label:a.label,width:a.width||null,height:a.height||null,encrypted:a.encrypted,keyIds:a.keyIds,segments:[],variantIds:[],roles:a.roles,forced:a.forced,channelsCount:a.channelsCount,audioSamplingRate:a.audioSamplingRate,spatialAudio:a.spatialAudio,closedCaptions:a.closedCaptions,tilesLayout:a.tilesLayout},c=a.id;return function(e,t,n){if(null!=(t=e.segmentIndex.find(t)))for(var r=e.segmentIndex.get(t);r;)n(r),r=e.segmentIndex.get(++t)}(a,i.presentationTimeline.Za(),(function(i){var d=function(e,t,n,r,i,a,o,s,u){return u.has(o)?u.get(o):(s=Do(o.ma(),o.ja,o.ea,s.streaming.retryParameters),t=If(t,n,s,.5*uh(a,r),!0,(function(t){var n;return N((function(r){return 1==r.g?T(r,i.addSegments([{data:t}]),2):(n=r.h,e.Lc.push(n[0]),r.return(n[0]))}))})),u.set(o,t),t)}(e,t,c,a.id,n,r,i.h,o,s),f=function(e,t,n,r,i,a,o,s,u){var l=[o.ma()[0],o.ja,o.ea].join("-");return u.has(l)?u.get(l):(s=Do(o.ma(),o.ja,o.ea,s.streaming.retryParameters),t=If(t,n,s,function(e,t,n){return n=n.endTime-n.startTime,uh(e,t)*n}(a,r,o),!1,(function(t){var n;return N((function(r){return 1==r.g?T(r,i.addSegments([{data:t}]),2):(n=r.h,e.Lc.push(n[0]),r.return(n[0]))}))})),u.set(l,t),t)}(e,t,c,a.id,n,r,i,o,u);!function(e,t,n){wr(e.I);var r=(e.g.get(t)||Promise.resolve()).then((function(){return N((function(e){return T(e,n(),0)}))}));e.g.set(t,r)}(t,c,(function(){var e,t;return N((function(n){return 1==n.g?T(n,d,2):3!=n.g?(e=n.h,T(n,f,3)):(t=n.h,l.segments.push({initSegmentKey:e,startTime:i.startTime,endTime:i.endTime,appendWindowStart:i.appendWindowStart,appendWindowEnd:i.appendWindowEnd,timestampOffset:i.timestampOffset,tilesLayout:i.tilesLayout,dataKey:t}),void w(n))}))}))})),l}function gh(e){if(e.I.g)throw new qe(2,9,7001)}function mh(){if(!ch())throw new qe(2,9,9e3)}function vh(e,t){return N((function(n){return 1==n.g?(e.$b.push(t),E(n),T(n,t,4)):2!=n.g?n.return(n.h):(A(n),re(e.$b,t),I(n,0))}))}function yh(e){for(var t=new Set,n=l(e.textStreams),r=n.next();!r.done;r=n.next())t.add(r.value);for(r=(n=l(e.imageStreams)).next();!r.done;r=n.next())t.add(r.value);for(n=(e=l(e.variants)).next();!n.done;n=e.next())(n=n.value).audio&&t.add(n.audio),n.video&&t.add(n.video);return t}m(Hf,Nf),Hf.prototype.updateManifestExpiration=function(e,t){var n,r,i,a=this;return N((function(o){return n=Df(a.g,a.h),r=n.store(),i=new ht,r.get(e).onsuccess=function(n){(n=n.target.result)?(n.expiration=t,r.put(n),i.resolve()):i.reject(new qe(2,9,9012,"Could not find values for "+e))},T(o,Promise.all([n.promise(),i]),0)}))},Hf.prototype.Rb=function(e){var t,n,r,i,a,o;return N((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n)r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime,a=Kf(e.periods[n],i),t.push(a);return T(s,Vc(t),2)}return o=s.h,s.return({creationTime:0,originalManifestUri:e.originalManifestUri,duration:e.duration,size:e.size,expiration:null==e.expiration?1/0:e.expiration,streams:o,sessionIds:e.sessionIds,drmInfo:e.drmInfo,appMetadata:e.appMetadata})}))},Hf.prototype.Wd=function(e){return{data:e.data}},m(qf,Nf),qf.prototype.Rb=function(e){var t,n,r,i,a,o;return N((function(s){if(1==s.g){for(t=[],n=0;n<e.periods.length;++n){r=n==e.periods.length-1?e.duration:e.periods[n+1].startTime,i=r-e.periods[n].startTime;for(var u=e.periods[n],c=[],d=l(u.streams),f=d.next();!f.done;f=d.next())0!=(f=f.value).variantIds.length&&c.push(zf(f,u.startTime,u.startTime+i));a=c,t.push(a)}return T(s,Vc(t),2)}return o=s.h,s.return({appMetadata:e.appMetadata,creationTime:0,drmInfo:e.drmInfo,duration:e.duration,expiration:null==e.expiration?1/0:e.expiration,originalManifestUri:e.originalManifestUri,sessionIds:e.sessionIds,size:e.size,streams:o})}))},m(Xf,Nf),Xf.prototype.hasFixedKeySpace=function(){return!1},Xf.prototype.addSegments=function(e){return this.add(this.i,e)},Xf.prototype.addManifests=function(e){return this.add(this.h,e)},Xf.prototype.Rb=function(e){return null==e.expiration&&(e.expiration=1/0),Promise.resolve(e)},(r=Wf.prototype).init=function(){var t=this,n=new ht,r=e.indexedDB.open("shaka_offline_db",5);return r.onsuccess=function(){var e=r.result;t.l=e;var i=e.objectStoreNames;i=i.contains("manifest")&&i.contains("segment")?new Hf(e,"segment","manifest"):null,t.g=i,i=(i=e.objectStoreNames).contains("manifest-v2")&&i.contains("segment-v2")?new qf(e,"segment-v2","manifest-v2"):null,t.h=i,i=(i=e.objectStoreNames).contains("manifest-v3")&&i.contains("segment-v3")?new qf(e,"segment-v3","manifest-v3"):null,t.i=i,i=(i=e.objectStoreNames).contains("manifest-v5")&&i.contains("segment-v5")?new Xf(e,"segment-v5","manifest-v5"):null,t.j=i,e=e.objectStoreNames.contains("session-ids")?new Of(e):null,t.m=e,n.resolve()},r.onupgradeneeded=function(){for(var e=r.result,t=l(["segment-v5","manifest-v5","session-ids"]),n=t.next();!n.done;n=t.next())n=n.value,e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},r.onerror=function(e){n.reject(new qe(2,9,9001,r.error)),e.preventDefault()},n},r.destroy=function(){var e=this;return N((function(t){switch(t.g){case 1:if(!e.g){t.v(2);break}return T(t,e.g.destroy(),2);case 2:if(!e.h){t.v(4);break}return T(t,e.h.destroy(),4);case 4:if(!e.i){t.v(6);break}return T(t,e.i.destroy(),6);case 6:if(!e.j){t.v(8);break}return T(t,e.j.destroy(),8);case 8:if(!e.m){t.v(10);break}
35return T(t,e.m.destroy(),10);case 10:e.l&&e.l.close(),w(t)}}))},r.getCells=function(){var e=new Map;return this.g&&e.set("v1",this.g),this.h&&e.set("v2",this.h),this.i&&e.set("v3",this.i),this.j&&e.set("v5",this.j),e},r.getEmeSessionCell=function(){return this.m},r.erase=function(){var t=this;return N((function(n){switch(n.g){case 1:if(!t.g){n.v(2);break}return T(n,t.g.destroy(),2);case 2:if(!t.h){n.v(4);break}return T(n,t.h.destroy(),4);case 4:if(!t.i){n.v(6);break}return T(n,t.i.destroy(),6);case 6:if(!t.j){n.v(8);break}return T(n,t.j.destroy(),8);case 8:return t.l&&t.l.close(),T(n,function(){var t=new ht,n=e.indexedDB.deleteDatabase("shaka_offline_db");return n.onblocked=function(){},n.onsuccess=function(){t.resolve()},n.onerror=function(e){t.reject(new qe(2,9,9001,n.error)),e.preventDefault()},t}(),10);case 10:return t.l=null,t.g=null,t.h=null,t.i=null,t.j=null,T(n,t.init(),0)}}))},Ff("idb",(function(){return rn()||!e.indexedDB?null:new Wf})),Yf.prototype.Ia=function(){return this.i},Yf.prototype.la=function(){return this.h},Yf.prototype.key=function(){return this.l},Yf.prototype.toString=function(){return this.j},(r=eh.prototype).configure=function(){},r.start=function(e,t){var n,r,i,a,o,s,u=this;return N((function(l){switch(l.g){case 1:if(n=$f(e),u.g=n,null==n||"manifest"!=n.g)throw new qe(2,1,9004,e);return r=new Uf,E(l),T(l,r.init(),4);case 4:return T(l,Bf(r,n.Ia(),n.la()),5);case 5:return T(l,l.h.getManifests([n.key()]),6);case 6:return i=l.h,a=i[0],o=new Jf(n.Ia(),n.la()),s=Zf(o,a),t.makeTextStreamsForClosedCaptions(s),l.return(s);case 2:return A(l),T(l,r.destroy(),7);case 7:I(l,0)}}))},r.stop=function(){return Promise.resolve()},r.update=function(){},r.onExpirationUpdated=function(e,t){var n,r,i,a,o,s,u,l=this;return N((function(c){switch(c.g){case 1:return n=l.g,r=new Uf,x(c,2,3),T(c,r.init(),5);case 5:return T(c,Bf(r,n.Ia(),n.la()),6);case 6:return T(c,(i=c.h).getManifests([n.key()]),7);case 7:if(a=c.h,o=a[0],s=o.sessionIds.includes(e),u=null==o.expiration||o.expiration>t,!s||!u){c.v(3);break}return T(c,i.updateManifestExpiration(n.key(),t),3);case 3:return A(c),T(c,r.destroy(),10);case 10:I(c,0);break;case 2:k(c),c.v(3)}}))},ii["application/x-offline-manifest"]=function(){return new eh},F("shaka.offline.OfflineScheme",th),th.plugin=nh,fr("offline",nh),(r=lh.prototype).destroy=function(){return this.I.destroy()},r.configure=function(e,t){return 2==arguments.length&&"string"==typeof e&&(e=ss(e,t)),e.manifest&&e.manifest.dash&&"defaultPresentationDelay"in e.manifest.dash&&(Le("manifest.dash.defaultPresentationDelay configuration","Please Use manifest.defaultPresentationDelay instead."),e.manifest.defaultPresentationDelay=e.manifest.dash.defaultPresentationDelay,delete e.manifest.dash.defaultPresentationDelay),cs(this.o,e)},r.getConfiguration=function(){var e=ls();return cs(e,this.o,ls()),e},r.Ub=function(){return this.O},r.store=function(e,t,n){var r=this,i=this.getConfiguration(),a=new kf(this.O);this.Fd.push(a),t=function(e,t,n,r,i,a){var o,s,u,c,d,f,h,p,g,m;return N((function(v){switch(v.g){case 1:return mh(),s=o=null,u=new Uf,d=c=null,x(v,2,3),T(v,r(),5);case 5:return o=v.h,T(v,function(e,t,n,r){var i,a,o,s,u;return N((function(l){if(1==l.g)return i=null,a=e.O,o={networkingEngine:a,filter:function(){return Promise.resolve()},makeTextStreamsForClosedCaptions:function(){},onTimelineRegionAdded:function(){},onEvent:function(){},onError:function(e){i=e},isLowLatencyMode:function(){return!1},isAutoLowLatencyMode:function(){return!1},enableLowLatencyMode:function(){}},n.configure(r.manifest),gh(e),T(l,n.start(t,o),2);if(3!=l.g)return s=l.h,gh(e),u=yh(s),T(l,Promise.all(Q(u,(function(e){return e.createSegmentIndex()}))),3);if(gh(e),i)throw i;return l.return(s)}))}(e,t,o,i),6);case 6:if(f=v.h,gh(e),!(!f.presentationTimeline.X()&&!f.presentationTimeline.kb()))throw new qe(2,9,9005,t);return T(v,function(e,t,n,r){var i;return N((function(a){switch(a.g){case 1:return(i=new Dr({lb:e.O,onError:n,Gc:function(){},onExpirationUpdated:function(){},onEvent:function(){}})).configure(r.drm),T(a,function(e,t,n){return e.pa=!0,e.u=[],e.J=n,Nr(e,t)}(i,t.variants,r.offline.usePersistentLicense),2);case 2:return T(a,Lr(i),3);case 3:return T(a,Pr(i),4);case 4:return a.return(i)}}))}(e,f,(function(e){d=d||e}),i),7);case 7:if(s=v.h,gh(e),d)throw d;return T(v,e.wc(f,i),8);case 8:return T(v,u.init(),9);case 9:return gh(e),T(v,function(e){var t=null;
35if(e.g.forEach((function(e,n){e.getCells().forEach((function(e,r){e.hasFixedKeySpace()||t||(t={path:{Ia:n,la:r},la:e})}))})),t)return t;throw new qe(2,9,9013,"Could not find a cell that supports add-operations")}(u),10);case 10:return c=v.h,gh(e),T(v,function(e,t,n,r,i,a,o,s){var u,c,d,f,h,p,g,m,v,y;return N((function(b){switch(b.g){case 1:return u=function(e,t,n){return{offlineUri:null,originalManifestUri:e,duration:t.presentationTimeline.getDuration(),size:0,expiration:1/0,tracks:t=oh(t),appMetadata:n}}(i,r,a),c=o.offline.progressCallback,function(e,t,n){e.ie=t,e.he=n}(s,(function(e,t){u.size=t,c(u,e)}),(function(e,t){h&&o.offline.usePersistentLicense&&p==t&&jr(n,"cenc",e)})),d=r.variants.some((function(e){var t=e.audio&&e.audio.encrypted;return e.video&&e.video.encrypted||t})),f=r.variants.some((function(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[]).some((function(e){return e.initData&&e.initData.length}))})),p=null,(h=d&&!f)&&(g=n.i,p=bh.get(g.keySystem)),E(b),v=m=function(e,t,n,r,i,a,o,s){for(var u=new sh,c=l(i.variants),d=c.next();!d.done;d=c.next()){var f=u,h=(d=d.value).audio,p=d.video;if(h&&!p&&(f.g[h.id]=h.bandwidth||d.bandwidth),!h&&p&&(f.g[p.id]=p.bandwidth||d.bandwidth),h&&p){var g=h.bandwidth||393216,m=p.bandwidth||d.bandwidth-g;0>=m&&(m=d.bandwidth),f.g[h.id]=g,f.g[p.id]=m}}for(c=l(i.textStreams),f=c.next();!f.done;f=c.next())u.g[f.value.id]=52;for(c=l(i.imageStreams),f=c.next();!f.done;f=c.next())f=f.value,u.g[f.id]=f.bandwidth||2048;for((f=new Map).set(null,Promise.resolve(null)),d=new Map,h=yh(i),c=new Map,h=l(h),p=h.next();!p.done;p=h.next())p=p.value,g=ph(e,t,n,u,i,p,s,f,d),c.set(p.id,g);for(e=l(i.variants),d=e.next();!d.done;d=e.next())(t=d.value).audio&&c.get(t.audio.id).variantIds.push(t.id),t.video&&c.get(t.video.id).variantIds.push(t.id);return e=Array.from(c.values()),s=s.offline.usePersistentLicense,(t=r.i)&&s&&(t.initData=[]),{creationTime:Date.now(),originalManifestUri:a,duration:i.presentationTimeline.getDuration(),size:0,expiration:r.Tb(),streams:e,sessionIds:s?Ur(r):[],drmInfo:t,appMetadata:o}}(e,s,t,n,r,i,a,o),T(b,function(e){return N((function(t){return 1==t.g?T(t,Promise.all(e.g.values()),2):t.return(e.Ob.h)}))}(s),4);case 4:if(v.size=b.h,m.expiration=n.Tb(),y=Ur(n),m.sessionIds=o.offline.usePersistentLicense?y:[],d&&o.offline.usePersistentLicense&&!y.length)throw new qe(2,9,9007);return b.return(m);case 2:return A(b),T(b,s.destroy(),5);case 5:I(b,0)}}))}(e,c.la,s,f,t,n,i,a),11);case 11:if(h=v.h,gh(e),d)throw d;return T(v,c.la.addManifests([h]),12);case 12:return p=v.h,gh(e),g=new Yf("manifest",c.path.Ia,c.path.la,p[0]),v.return(ah(g,h));case 3:return A(v),e.Lc=[],T(v,u.destroy(),13);case 13:if(!o){v.v(14);break}return T(v,o.stop(),14);case 14:if(!s){v.v(16);break}return T(v,s.destroy(),16);case 16:I(v,0);break;case 2:if(m=k(v),!c){v.v(18);break}return T(v,c.la.removeSegments(e.Lc,(function(){})),18);case 18:throw d||m}}))}(this,e,t||{},(function(){var t;return N((function(a){return 1==a.g?T(a,ti(e,r.O,i.manifest.retryParameters,n||null),2):(t=a.h,a.return(Ve(t)))}))}),i,a);var o=new Qn(t,(function(){return Af(a)}));return o.finally((function(){re(r.Fd,a)})),o.then=function(e){return Le("shaka.offline.Storage.store.then","Storage operations now return a shaka.util.AbortableOperation, rather than a promise. Please update to conform to this new API; you can use the |chain| method instead."),o.promise.then(e)},function(e,t){var n=t.promise;return e.$b.push(n),t.finally((function(){re(e.$b,n)}))}(this,o)},r.jf=function(){return Le("shaka.offline.Storage.getStoreInProgress","Multiple concurrent downloads are now supported."),!1},r.wc=function(e,t){var n,r,i,a,o,s,u,c,d,f,h,p,g,m,v,y,b,E,A,I,C,M,R,D,_,L,P,j;return N((function(N){switch(N.g){case 1:for(n={width:1/0,height:1/0},function(e,t,n){e.variants=e.variants.filter((function(e){return pn(e,t,n)}))}(e,t.restrictions,n),mn(e,t.offline.usePersistentLicense),r=[],i=t.preferredAudioChannelCount,a=t.preferredDecodingAttributes,o=t.preferredVideoCodecs,s=t.preferredAudioCodecs,dn(e,o,s,i,a),u=l(e.variants),c=u.next();!c.done;c=u.next())d=c.value,r.push(wn(d));for(f=l(e.textStreams),h=f.next();!h.done;h=f.next())p=h.value,r.push(xn(p));for(g=l(e.imageStreams),m=g.next();!m.done;m=g.next())v=m.value,r.push(En(v));return T(N,t.offline.trackSelectionCallback(r),2);case 2:for(y=N.h,b=e.presentationTimeline.getDuration(),E=0,A=l(y),I=A.next();!I.done;I=A.next())C=I.value,M=C.bandwidth*b/8,E+=M;return x(N,3),T(N,t.offline.downloadSizeCallback(E),5);case 5:if(!N.h)throw new qe(2,9,9014);S(N,4);break;case 3:if((R=k(N))instanceof qe)throw R;throw new qe(2,9,9015);case 4:for(D=new Set,_=new Set,L=new Set,P=l(y),I=P.next();!I.done;I=P.next())"variant"==(j=I.value).type&&D.add(j.id),"text"==j.type&&_.add(j.id),"image"==j.type&&L.add(j.id);e.variants=e.variants.filter((function(e){return D.has(e.id)}
35)),e.textStreams=e.textStreams.filter((function(e){return _.has(e.id)})),e.imageStreams=e.imageStreams.filter((function(e){return L.has(e.id)})),function(e){e.variants.map((function(e){return e.video}));var t=new Set(e.variants.map((function(e){return e.audio})));e=e.textStreams;for(var n=l(t),r=n.next();!r.done;r=n.next())for(var i=(r=l(t)).next();!i.done;i=r.next());for(t=l(e),n=t.next();!n.done;n=t.next())for(n=l(e),r=n.next();!r.done;r=n.next());}(e),w(N)}}))},r.remove=function(e){return vh(this,function(e,t){var n,r,i,a,o,s;return N((function(u){switch(u.g){case 1:if(mh(),null==(n=$f(t))||"manifest"!=n.g)throw new qe(2,9,9004,t);return r=n,i=new Uf,E(u),T(u,i.init(),4);case 4:return T(u,Bf(i,r.Ia(),r.la()),5);case 5:return T(u,(a=u.h).getManifests([r.key()]),6);case 6:return o=u.h,s=o[0],T(u,Promise.all([fh(e,s,i),hh(a,r,s)]),2);case 2:return A(u),T(u,i.destroy(),8);case 8:I(u,0)}}))}(this,e))},r.Jf=function(){return vh(this,function(e){var t,n,r,i,a,o,s,u,c,d;return N((function(f){switch(f.g){case 1:return mh(),t=e.O,n=e.o.drm,r=new Uf,i=!1,E(f),T(f,r.init(),4);case 4:a=[],function(e,t){e.g.forEach((function(e){t(e.getEmeSessionCell())}))}(r,(function(e){return a.push(e)})),o=l(a),s=o.next();case 5:if(s.done){f.v(2);break}return T(f,(u=s.value).getAll(),8);case 8:return c=f.h,T(f,rh(n,t,c),9);case 9:return d=f.h,T(f,u.remove(d),10);case 10:d.length!=c.length&&(i=!0),s=o.next(),f.v(5);break;case 2:return A(f),T(f,r.destroy(),11);case 11:I(f,3);break;case 3:return f.return(!i)}}))}(this))},r.list=function(){return vh(this,N((function(r){switch(r.g){case 1:return mh(),e=[],t=new Uf,E(r),T(r,t.init(),4);case 4:return n=Promise.resolve(),function(e,t){e.g.forEach((function(e,n){e.getCells().forEac
35h((function(e,r){t({Ia:n,la:r},e)}))}))}(t,(function(t,r){n=n.then((function(){return N((function(n){if(1==n.g)return T(n,r.getAllManifests(),2);n.h.forEach((function(n,r){var i=ah(new Yf("manifest",t.Ia,t.la,r),n);e.push(i)})),w(n)}))}))})),T(r,n,2);case 2:return A(r),T(r,t.destroy(),6);case 6:I(r,3);break;case 3:return r.return(e)}})));var e,t,n},F("shaka.offline.Storage",lh),lh.deleteAll=function(){var e;return N((function(t){return 1==t.g?(e=new Uf,E(t),T(t,function(e){var t,n;return N((function(r){return 1==r.g?(t=Array.from(e.g.values()),(n=0<t.length)||Vf.forEach((function(e){(e=e())&&t.push(e)})),T(r,Promise.all(t.map((function(e){return e.erase()}))),2)):n?r.v(0):T(r,Promise.all(t.map((function(e){return e.destroy()}))),0)}))}(e),2)):5!=t.g?(A(t),T(t,e.destroy(),5)):I(t,0)}))},lh.prototype.list=lh.prototype.list,lh.prototype.removeEmeSessions=lh.prototype.Jf,lh.prototype.remove=lh.prototype.remove,lh.prototype.getStoreInProgress=lh.prototype.jf,lh.prototype.store=lh.prototype.store,lh.prototype.getNetworkingEngine=lh.prototype.Ub,lh.prototype.getConfiguration=lh.prototype.getConfiguration,lh.prototype.configure=lh.prototype.configure,lh.prototype.destroy=lh.prototype.destroy,lh.support=ch;var bh=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95").set("com.adobe.primetime","f239e769efa348509c16a903c6932efb");function Th(){}function wh(e,t){for(var n={priority:t||0,Fe:e},r=l(te(xh)),i=r.next();!i.done;i=r.next()){var a=(i=i.value).ha;if(i.item.priority<n.priority)return void xh.splice(a,0,n)}xh.push(n)}ju.offline=ch,F("shaka.polyfill",Th),Th.register=wh,Th.installAll=function(){for(var e=l(xh),t=e.next();!t.done;t=e.next()){t=t.value;try{t.Fe()}catch(e){X("Error installing polyfill!",e)}}};var xh=[];function Eh(e){var t=e.toLowerCase().replace("aria","aria-");Object.defineProperty(Element.prototype,e,{get:function(){return this.getAttribute(t)},set:function(e){null==e||null==e?this.removeAttribute(t):this.setAttribute(t,e)}})}function Sh(e){var t=e.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),n=document.createEvent("Event");n.initEvent(t,e.bubbles,e.cancelable),e.target.dispatchEvent(n)}function kh(e){var t,n,r,i,a,o,s,u,l,c;return N((function(d){switch(d.g){case 1:return t={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:e},e&&(!e.video||(n=e.video.contentType,MediaSource.isTypeSupported(n)))&&(!e.audio||(r=e.audio.contentType,MediaSource.isTypeSupported(r)))?e.keySystemConfiguration?(i=e.keySystemConfiguration,a=[],o=[],i.audio&&(s={robustness:i.audio.robustness||"",contentType:e.audio.contentType},a.push(s)),i.video&&(u={robustness:i.video.robustness||"",contentType:e.video.contentType},o.push(u)),l={initDataTypes:[i.initDataType],distinctiveIdentifier:i.distinctiveIdentifier,persistentState:i.persistentState,sessionTypes:i.sessionTypes},a.length&&(l.audioCapabilities=a),o.length&&(l.videoCapabilities=o),x(d,3),T(d,navigator.requestMediaKeySystemAccess(i.keySystem,[l]),5)):(t.supported=!0,d.return(Promise.resolve(t))):d.return(t);case 5:c=d.h,S(d,4);break;case 3:k(d);case 4:c&&(t.supported=!0,t.keySystemAccess=c);case 2:return d.return(t)}}))}function Ah(){var e=MediaSource.prototype.addSourceBuffer;MediaSource.prototype.addSourceBuffer=function(t){for(var n=[],r=0;r<arguments.length;++r)n[r]=arguments[r];return(n=e.apply(this,n)).abort=function(){},n}}function Ih(){or.call(this),this.type="",this.angle=0}function Ch(e,t){try{var n=new Dh(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Mh(e){var t=this.mediaKeys;return t&&t!=e&&Nh(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Nh(e,this):Promise.resolve()}function Rh(e){if(De(e=Re(e.initData)).getUint32(0,!0)+4!=e.byteLength)throw new RangeError("Malformed FairPlay init data");e=bt(e=vt(e.subarray(4),!0));var t=new Event("encrypted");t.initDataType="skd",t.initData=Me(e),this.dispatchEvent(t)}function Dh(e,t){if(this.keySystem=e,e.startsWith("com.apple.fps"))for(var n=l(t),r=n.next();!r.done;r=n.next()){var i=r.value;if("required"==i.persistentState)r=null;else{r={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:i.initDataTypes,sessionTypes:["temporary"],label:i.label};var a=!1,o=!1;if(i.audioCapabilities)for(var s=l(i.audioCapabilities),u=s.next();!u.done;u=s.next())(u=u.value).contentType&&(a=!0,WebKitMediaKeys.isTypeSupp
35orted(this.keySystem,u.contentType.split(";")[0])&&(r.audioCapabilities.push(u),o=!0));if(i.videoCapabilities)for(u=(i=l(i.videoCapabilities)).next();!u.done;u=i.next())(s=u.value).contentType&&(a=!0,WebKitMediaKeys.isTypeSupported(this.keySystem,s.contentType.split(";")[0])&&(r.videoCapabilities.push(s),o=!0));a||(o=WebKitMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),r=o?r:null}if(r)return void(this.g=r)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function _h(e){this.g=new WebKitMediaKeys(e),this.h=new xr}function Nh(e,t){if(e.h.ob(),!t)return Promise.resolve();e.h.A(t,"webkitneedkey",Rh);try{return ro(t,HTMLMediaElement.HAVE_METADATA,e.h,(function(){t.webkitSetMediaKeys(e.g)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function Lh(e){or.call(this),this.j=null,this.l=e,this.i=this.g=null,this.h=new xr,this.sessionId="",this.expiration=NaN,this.closed=new ht,this.keyStatuses=new jh}function Ph(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new ar("keystatuseschange"),e.dispatchEvent(n)}function jh(){this.size=0,this.g=void 0}function Oh(e,t){try{var n=new Bh(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Uh(e){if(e.initData){var t=new CustomEvent("encrypted");t.initDataType="cenc",t.initData=Me(function(e){if(!e)return e;var t=new ql(e);if(1>=t.data.length)return e;e=[];for(var n={},r=(t=l(t.data)).next();!r.done;n={ic:n.ic},r=t.next())n.ic=r.value,e.some(function(e){return function(t){return Ie(t,e.ic)}}(n))||e.push(n.ic);return Ct.apply(xt,c(e))}(e.initData)),this.dispatchEvent(t)}}function Bh(e,t){this.keySystem=e;for(var n=!1,r=l(t),i=r.next();!i.done;i=r.next()){var a={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(i=i.value).initDataTypes,sessionTypes:["temporary"],label:i.label},o=!1;if(i.audioCapabilities)for(var s=l(i.audioCapabilities),u=s.next();!u.done;u=s.next())(u=u.value).contentType&&(o=!0,MSMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(a.audioCapabilities.push(u),n=!0));if(i.videoCapabilities)for(u=(s=l(i.videoCapabilities)).next();!u.done;u=s.next())(u=u.value).contentType&&(o=!0,MSMediaKeys.isTypeSupported(this.keySystem,u.contentType.split(";")[0])&&(a.videoCapabilities.push(u),n=!0));if(o||(n=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==i.persistentState&&(n=!1),n)return void(this.g=a)}throw(n=Error("Unsupported keySystem")).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function Fh(e){var t=this.mediaKeys;return t&&t!=e&&Hh(t,null),delete this.mediaKeys,(this.mediaKeys=e)?Hh(e,this):Promise.resolve()}function Vh(e){this.g=new MSMediaKeys(e),this.h=new xr}function Hh(e,t){if(e.h.ob(),!t)return Promise.resolve();e.h.A(t,"msneedkey",Uh);try{return ro(t,HTMLMediaElement.HAVE_METADATA,e.h,(function(){t.msSetMediaKeys(e.g)})),Promise.resolve()}catch(e){return Promise.reject(e)}}function Kh(e){or.call(this),this.j=null,this.l=e,this.i=this.g=null,this.h=new xr,this.sessionId="",this.expiration=NaN,this.closed=new ht,this.keyStatuses=new qh}function Gh(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new ar("keystatuseschange"),e.dispatchEvent(n)}function qh(){this.size=0,this.g=void 0}function zh(){return Promise.reject(Error("The key system specified is not supported."))}function Xh(e){return null==e?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function Wh(){throw new TypeError("Illegal constructor.")}function Yh(){throw this.keySystem="",new TypeError("Illegal constructor.")}function $h(e){return up?up+e.charAt(0).toUpperCase()+e.slice(1):e}function Jh(e,t){try{var n=new Qh(e,t);return Promise.resolve(n)}catch(e){return Promise.reject(e)}}function Zh(e){var t=this.mediaKeys;return t&&t!=e&&tp(t,null),delete this.mediaKeys,(this.mediaKeys=e)&&tp(e,this),Promise.resolve()}function Qh(e,t){this.g=this.keySystem=e;var n=!1;"org.w3.clearkey"==e&&(this.g="webkit-org.w3.clearkey",n=!1);var r=!1,i=document.getElementsByTagName("video");i=i.length?i[0]:document.createElement("video");for(var a=l(t),o=a.next();!o.done;o=a.next()){var s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:(o=o.value).initDataTypes,sessionTypes:["temporary"],label:o.label},u=!1;if(o.audioCapabilities)for(var c=l(o.audioCapabilities),d=c.next();!d.done;d=c.next())(d=d.value).contentType&&(u=!0,i.canPlayType(d.contentType.split(";")[0],this.g)&&(s.audioCapabilities.push(d),r=!0));if(o.videoCapabilities)for(d=(c=l(o.videoCapabilities)).next();!d.done;d=c.next())(d=d.value).contentType&&(u=!0,i.canPlayType(d.contentType,this.g)&&(s.videoCapabilities.push(d),r=!0));if(u||(r=i.canPlayType("video/mp4",this.g)||i.canPlayType("video/webm",this.g)),"required"==o.persistentState&&(n?(s.persistentState="required",s.sessionTypes=["persistent-license"]):r=!1),r)return void(this.h=s)}throw n="Unsupported keySystem","org.w3.clearkey"!=e&&"com.widevine.alpha"!=e||(n="None of the requested configurations were supported."),(n=Error(n)).name="NotSupportedError",n.code=DOMException.NOT_SUPPORTED_ERR,n}function ep(e){this.l=e,this.g=null,this.h=new xr,this.i=[],this.j=new Map}function tp(e,t){e.g=t,e.h.ob();var n=up;t&&(e.h.A(t,n+"needkey",(function(t){var n=new CustomEvent("encrypted");n.initDataType="cenc",n.initData=Me(t.initData),e.g.dispatchEvent(n)}
35)),e.h.A(t,n+"keymessage",(function(t){var n=np(e,t.sessionId);n&&(t=new ar("message",{messageType:null==n.keyStatuses.g?"licenserequest":"licenserenewal",message:t.message}),n.h&&(n.h.resolve(),n.h=null),n.dispatchEvent(t))})),e.h.A(t,n+"keyadded",(function(t){(t=np(e,t.sessionId))&&(op(t,"usable"),t.g&&t.g.resolve(),t.g=null)})),e.h.A(t,n+"keyerror",(function(t){var n=np(e,t.sessionId);n&&n.handleError(t)})))}function np(e,t){var n=e.j.get(t);return n||((n=e.i.shift())?(n.sessionId=t,e.j.set(t,n),n):null)}function rp(e,t,n){or.call(this),this.j=e,this.m=!1,this.g=this.h=null,this.i=t,this.l=n,this.sessionId="",this.expiration=NaN,this.closed=new ht,this.keyStatuses=new sp}function ip(e,t,n){if(e.m)return Promise.reject(Error("The session is already initialized."));e.m=!0;try{if("persistent-license"==e.l)if(n)var r=Re(bt("LOAD_SESSION|"+n));else{var i=bt("PERSISTENT|");r=Ct(i,t)}else r=Re(t)}catch(e){return Promise.reject(e)}e.h=new ht;var a=$h("generateKeyRequest");try{e.j[a](e.i,r)}catch(t){if("InvalidStateError"!=t.name)return e.h=null,Promise.reject(t);new Qt((function(){try{e.j[a](e.i,r)}catch(t){e.h.reject(t),e.h=null}})).S(.01)}return e.h}function ap(e,t,n){if(e.g)e.g.then((function(){return ap(e,t,n)})).catch((function(){return ap(e,t,n)}));else{if(e.g=t,"webkit-org.w3.clearkey"==e.i){var r=mt(n),i=JSON.parse(r);"oct"!=i.keys[0].kty&&(e.g.reject(Error("Response is not a valid JSON Web Key Set.")),e.g=null),r=kt(i.keys[0].k),i=kt(i.keys[0].kid)}else r=Re(n),i=null;var a=$h("addKey");try{e.j[a](e.i,r,i,e.sessionId)}catch(t){e.g.reject(t),e.g=null}}}function op(e,t){var n=e.keyStatuses;n.size=null==t?0:1,n.g=t,n=new ar("keystatuseschange"),e.dispatchEvent(n)}function sp(){this.size=0,this.g=void 0}wh((function(){if(!Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))for(var e=l(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),t=e.next();!t.done;t=e.next())Eh(t.value)})),wh((function(){Rg()}),-2),wh((function(){if(e.Document){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,(t=Document.prototype).exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitCancelFullScreen,"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}})),document.addEventListener("webkitfullscreenchange",Sh),document.addEventListener("webkitfullscreenerror",Sh),document.addEventListener("mozfullscreenchange",Sh),document.addEventListener("mozfullscreenerror",Sh),document.addEventListener("MSFullscreenChange",Sh),document.addEventListener("MSFullscreenError",Sh)}})),wh((function(){})),wh((function(){!rn()&&navigator.mediaCapabilities||!e.MediaSource||(navigator.mediaCapabilities||(navigator.mediaCapabilities={}),navigator.mediaCapabilities.decodingInfo=kh)}),-1),wh((function(){var t=on();e.MediaSource&&(e.cast&&cast.__platform__&&cast.__platform__.canDisplayType?function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */);return n.shift(),n.some((function(e){return e.startsWith("codecs=")}))?cast.__platform__.canDisplayType(t):e(t)}}():t?(function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"mp2t"!=t.split(/ *; */)[0].split("/")[1].toLowerCase()&&e(t)}}(),12>=t?(Ah(),function(){var e=SourceBuffer.prototype.remove;SourceBuffer.prototype.remove=function(t,n){return e.call(this,t,n-.001)}}()):Ah()):(sn("Tizen 2")||sn("Tizen 3")||sn("Tizen 4"))&&function(){var e=MediaSource.isTypeSupported;MediaSource.isTypeSupported=function(t){return"opus"!=Pt(t)&&e(t)}}()),e.MediaSource&&MediaSource.isTypeSupported('video/webm; codecs="vp9"')&&!MediaSource.isTypeSupported('video/webm; codecs="vp09.00.10.08"')&&function(){var e=MediaSource.isTypeSupp
35orted;MediaSource.isTypeSupported=function(t){var n=t.split(/ *; */),r=n.findIndex((function(e){return e.startsWith("codecs=")}));if(0>r)return e(t);var i=n[r].replace("codecs=","").replace(/"/g,"").split(/\s*,\s*/),a=i.findIndex((function(e){return e.startsWith("vp09")}));return 0<=a&&(i[a]="vp9",n[r]='codecs="'+i.join(",")+'"',t=n.join("; ")),e(t)}}()})),m(Ih,or),Ih.prototype.lock=function(e){function t(e){return screen.lockOrientation?screen.lockOrientation(e):screen.mozLockOrientation?screen.mozLockOrientation(e):!!screen.msLockOrientation&&screen.msLockOrientation(e)}var n=!1;switch(e){case"natural":n=t("default");break;case"any":n=!0,this.unlock();break;default:n=t(e)}return n?Promise.resolve():((e=Error("screen.orientation.lock() is not available on this device")).name="NotSupportedError",e.code=DOMException.NOT_SUPPORTED_ERR,Promise.reject(e))},Ih.prototype.unlock=function(){screen.unlockOrientation?screen.unlockOrientation():screen.mozUnlockOrientation?screen.mozUnlockOrientation():screen.msUnlockOrientation&&screen.msUnlockOrientation()},wh((function(){screen.orientation||null!=e.orientation&&function(){function t(){switch(e.orientation){case-90:n.type="landscape-secondary",n.angle=270;break;case 0:n.type="portrait-primary",n.angle=0;break;case 90:n.type="landscape-primary",n.angle=90;break;case 180:n.type="portrait-secondary",n.angle=180}}var n=new Ih;screen.orientation=n,t(),e.addEventListener("orientationchange",(function(){t();var e=new ar("change",{});n.dispatchEvent(e)}))}()})),Dh.prototype.createMediaKeys=function(){var e=new _h(this.keySystem);return Promise.resolve(e)},Dh.prototype.getConfiguration=function(){return this.g},_h.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Lh(this.g,e)},_h.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Lh,or),(r=Lh.prototype).generateRequest=function(e,t){var n=this;this.g=new ht;try{var r=this.l.createSession("video/mp4",Re(t));this.j=r,this.sessionId=r.sessionId||"",this.h.A(this.j,"webkitkeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new ar("message",{messageType:null==n.keyStatuses.g?"license-request":"license-renewal",message:Me(e.message)}),n.dispatchEvent(e)})),this.h.A(r,"webkitkeyadded",(function(){n.i&&(Ph(n,"usable"),n.i.resolve(),n.i=null)})),this.h.A(r,"webkitkeyerror",(function(){var e=Error("EME PatchedMediaKeysApple key error");if(e.errorCode=n.j.error,null!=n.g)n.g.reject(e),n.g=null;else if(null!=n.i)n.i.reject(e),n.i=null;else switch(n.j.error.code){case WebKitMediaKeyError.MEDIA_KEYERR_OUTPUT:case WebKitMediaKeyError.MEDIA_KEYERR_HARDWARECHANGE:Ph(n,"output-not-allowed");break;default:Ph(n,"internal-error")}})),Ph(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(e){this.i=new ht;try{this.j.update(Re(e))}catch(e){this.i.reject(e)}return this.i},r.close=function(){try{this.j.close(),this.closed.resolve(),this.h.ob()}catch(e){this.closed.reject(e)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(r=jh.prototype).forEach=function(e){this.g&&e(this.g,Qr.value())},r.get=function(e){if(this.has(e))return this.g},r.has=function(e){var t=Qr.value();return!(!this.g||!Ie(e,t))},r.entries=function(){},r.keys=function(){},r.values=function(){},wh((function(){e.HTMLVideoElement&&e.WebKitMediaKeys&&(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Mh,e.MediaKeys=_h,e.MediaKeySystemAccess=Dh,navigator.requestMediaKeySystemAccess=Ch)})),Bh.prototype.createMediaKeys=function(){var e=new Vh(this.keySystem);return Promise.resolve(e)},Bh.prototype.getConfiguration=function(){return this.g},Vh.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary"))throw new TypeError("Session type "+e+" is unsupported on this platform.");return new Kh(this.g,e)},Vh.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(Kh,or),(r=Kh.prototype).generateRequest=function(e,t){var n=this;this.g=new ht;try{this.j=this.l.createSession("video/mp4",Re(t),null),this.h.A(this.j,"mskeymessage",(function(e){n.g&&(n.g.resolve(),n.g=null),e=new ar("message",{messageType:null==n.keyStatuses.g?"license-request":"license-renewal",message:Me(e.message)}),n.dispatchEvent(e)})),this.h.A(this.j,"mskeyadded",(function(){n.g?(Gh(n,"usable"),n.g.resolve(),n.g=null):n.i&&(Gh(n,"usable"),n.i.resolve(),n.i=null)})),this.h.A(this.j,"mskeyerror",(function(){var e=Error("EME PatchedMediaKeysMs key error");
35if(e.errorCode=n.j.error,null!=n.g)n.g.reject(e),n.g=null;else if(null!=n.i)n.i.reject(e),n.i=null;else switch(n.j.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Gh(n,"output-not-allowed");break;default:Gh(n,"internal-error")}})),Gh(this,"status-pending")}catch(e){this.g.reject(e)}return this.g},r.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},r.update=function(e){this.i=new ht;try{this.j.update(Re(e))}catch(e){this.i.reject(e)}return this.i},r.close=function(){try{this.j.close(),this.closed.resolve(),this.h.ob()}catch(e){this.closed.reject(e)}return this.closed},r.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},(r=qh.prototype).forEach=function(e){this.g&&e(this.g,Qr.value())},r.get=function(e){if(this.has(e))return this.g},r.has=function(e){var t=Qr.value();return!(!this.g||!Ie(e,t))},r.entries=function(){},r.keys=function(){},r.values=function(){},wh((function(){!e.HTMLVideoElement||!e.MSMediaKeys||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,e.MediaKeys=Vh,e.MediaKeySystemAccess=Bh,navigator.requestMediaKeySystemAccess=Oh,HTMLMediaElement.prototype.setMediaKeys=Fh)})),Wh.prototype.createSession=function(){},Wh.prototype.setServerCertificate=function(){},Yh.prototype.getConfiguration=function(){},Yh.prototype.createMediaKeys=function(){},wh((function(){!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(navigator.requestMediaKeySystemAccess=zh,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Xh,e.MediaKeys=Wh,e.MediaKeySystemAccess=Yh)}),-10),Qh.prototype.createMediaKeys=function(){var e=new ep(this.g);return Promise.resolve(e)},Qh.prototype.getConfiguration=function(){return this.h},ep.prototype.createSession=function(e){if("temporary"!=(e=e||"temporary")&&"persistent-license"!=e)throw new TypeError("Session type "+e+" is unsupported on this platform.");var t=this.g||document.createElement("video");return t.src||(t.src="https://gbcode.rthk.hk/about:blank"),e=new rp(t,this.l,e),this.i.push(e),e},ep.prototype.setServerCertificate=function(){return Promise.resolve(!1)},m(rp,or),(r=rp.prototype).handleError=function(e){var t=Error("EME v0.1b key error"),n=e.errorCode;n.systemCode=e.systemCode,t.errorCode=n,!e.sessionId&&this.h?(45==e.systemCode&&(t.message="Unsupported session type."),this.h.reject(t),this.h=null):e.sessionId&&this.g?(this.g.reject(t),this.g=null):(t=e.systemCode,e.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?op(this,"output-restricted"):op(this,1==t?"expired":"internal-error"))},r.generateRequest=function(e,t){return ip(this,t,null)},r.load=function(e){return"persistent-license"==this.l?ip(this,null,e):Promise.reject(Error("Not a persistent session."))},r.update=function(e){var t=new ht;return ap(this,t,e),t},r.close=function(){if("persistent-license"!=this.l){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;var e=$h("cancelKeyRequest");try{this.j[e](this.i,this.sessionId)}catch(e){}}return this.closed.resolve(),this.closed},r.remove=function(){return"persistent-license"!=this.l?Promise.reject(Error("Not a persistent session.")):this.close()},(r=sp.prototype).forEach=function(e){this.g&&e(this.g,Qr.value())},r.get=function(e){if(this.has(e))return this.g},r.has=function(e){var t=Qr.value();return!(!this.g||!Ie(e,t))},r.entries=function(){},r.keys=function(){},r.values=function(){};var up="";function lp(e){if("picture-in-picture"==(e=e.target).webkitPresentationMode){document.pictureInPictureElement=e;var t=new Event("enterpictureinpicture");e.dispatchEvent(t)}else document.pictureInPictureElement==e&&(document.pictureInPictureElement=null),t=new Event("leavepictureinpicture"),e.dispatchEvent(t)}function cp(){return this.webkitSupportsPresentationMode("picture-in-picture")?(this.webkitSetPresentationMode("picture-in-picture"),document.pictureInPictureElement=this,Promise.resolve()):Promise.reject(Error("PiP not allowed by video element"))}function dp(){var e=document.pictureInPictureElement;return e?(e.webkitSetPresentationMode("inline"),document.pictureInPictureElement=null,Promise.resolve()):Promise.reject(Error("No picture in picture element found"))}function fp(){return!!this.hasAttribute("disablePictureInPicture")||!this.webkitSupportsPresentationMode("picture-in-picture")}function hp(e){e?this.setAttribute("disablePictureInPicture",""):this.removeAttribute("disablePictureInPicture")}function pp(){return new Promise((function(e,t){navigator.webkitTemporaryStorage.queryUsageAndQuota((function(t,n){e({usage:t,quota:n})}),t)}))}function gp(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function mp(t,n,r){return new e.TextTrackCue(t,n,r)}function vp(t,n,r){return new e.TextTrackCue(t+"-"+n+"-"+r,t,n,r)}function yp(){}wh((function(){if(!(!e.HTMLVideoElement||navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration)){if
35(HTMLMediaElement.prototype.webkitGenerateKeyRequest)up="webkit";else if(!HTMLMediaElement.prototype.generateKeyRequest)return;navigator.requestMediaKeySystemAccess=Jh,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=Zh,e.MediaKeys=ep,e.MediaKeySystemAccess=Qh}})),wh((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;t.requestPictureInPicture&&document.exitPictureInPicture||!t.webkitSupportsPresentationMode||(document.pictureInPictureEnabled=!0,document.pictureInPictureElement=null,t.requestPictureInPicture=cp,Object.defineProperty(t,"disablePictureInPicture",{get:fp,set:hp,enumerable:!0,configurable:!0}),document.exitPictureInPicture=dp,document.addEventListener("webkitpresentationmodechanged",lp,!0))}})),wh((function(){navigator.storage&&navigator.storage.estimate||!navigator.webkitTemporaryStorage||!navigator.webkitTemporaryStorage.queryUsageAndQuota||("storage"in navigator||(navigator.storage={}),navigator.storage.estimate=pp)})),wh((function(){if(e.HTMLMediaElement){var t=HTMLMediaElement.prototype.play;HTMLMediaElement.prototype.play=function(){var e=t.apply(this);return e&&e.catch((function(){})),e}}})),wh((function(){if(e.HTMLVideoElement){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=gp)}})),wh((function(){if(!e.VTTCue&&e.TextTrackCue){var t=null,n=TextTrackCue.length;if(3==n)t=mp;else if(6==n)t=vp;else{try{var r=!!mp(1,2,"")}catch(e){r=!1}r&&(t=mp)}t&&(e.VTTCue=function(e,n,r){return t(e,n,r)})}})),yp.prototype.parseInit=function(){},yp.prototype.parseMedia=function(e,t){for(var n=null,r=[],i=mt(e).split(/\r?\n/),a=(i=l(i)).next();!a.done;a=i.next())if((a=a.value)&&!/^\s+$/.test(a)&&(a=bp.exec(a))){var o=Tp.exec(a[1]);a=new oe(o=60*parseInt(o[1],10)+parseFloat(o[2].replace(",",".")),t.segmentEnd?t.segmentEnd:o+2,a[2]),n&&(n.endTime=o,r.push(n)),n=a}return n&&r.push(n),r}
35,F("shaka.text.LrcTextParser",yp),yp.prototype.parseMedia=yp.prototype.parseMedia,yp.prototype.parseInit=yp.prototype.parseInit;var bp=/^\[(\d{1,2}:\d{1,2}(?:[.,]\d{1,3})?)\](.*)/,Tp=/^(\d+):(\d{1,2}(?:[.,]\d{1,3})?)$/;function wp(){}function xp(e,t,n,r,i,a,o,s,u,c){var d=e.parentNode;if(e.nodeType==Node.TEXT_NODE){var f=document.createElement("span");f.textContent=e.textContent,e=f}if(s="default"==(e.getAttribute("xml:space")||(s?"default":"preserve")),f=/\S/.test(e.textContent),!(e.hasAttribute("begin")||e.hasAttribute("end")||e.hasAttribute("dur")||f||"br"==e.tagName||u&&!s))return null;var h=Rp(e,n);for(f=h.start,h=h.end;d&&d.nodeType==Node.ELEMENT_NODE&&"tt"!=d.tagName;)f=(h=Mp(d,n,f,h)).start,h=h.end,d=d.parentNode;if(null==f&&(f=0),f+=t,h=null==h?1/0:h+t,"br"==e.tagName)return(r=new oe(f,h,"")).lineBreak=!0,r;var p="";if(d=[],Array.from(e.childNodes).every((function(e){return e.nodeType==Node.TEXT_NODE})))p=e.textContent,s&&(p=(p=p.trim()).replace(/\s+/g," "));else for(var g=l(e.childNodes),m=g.next();!m.done;m=g.next())(m=xp(m.value,t,n,r,i,a,o,s,!0,c))&&d.push(m);if((t=new oe(f,h,p)).nestedCues=d,c&&(t.cellResolution=c),(a=Cp(e,"region",a,"")[0])&&a.getAttribute("xml:id")){var v=a.getAttribute("xml:id");t.region=o.filter((function(e){return e.id==v}))[0]}for(o=null,n=(c=l(zp)).next();!n.done&&!(o=Cp(e,"backgroundImage",r,"#",n.value)[0]);n=c.next());return function(e,t,n,r,i,a,o){"rtl"==Sp(t,n,i,"direction",a=a||o)&&(e.direction="rtl"),"tb"==(o=Sp(t,n,i,"writingMode",a))||"tblr"==o?e.writingMode="vertical-lr":"tbrl"==o?e.writingMode="vertical-rl":"rltb"==o||"rl"==o?e.direction="rtl":o&&(e.direction=he),(o=Sp(t,n,i,"textAlign",a))?(e.positionAlign=qp[o],e.lineAlign=Gp[o],e.textAlign=ce[o.toUpperCase()]):e.textAlign="start",(o=Sp(t,n,i,"displayAlign",a))&&(e.displayAlign=fe[o.toUpperCase()]);(o=Sp(t,n,i,"color",a))&&(e.color=o);(o=Sp(t,n,i,"backgroundColor",a))&&(e.backgroundColor=o);(o=Sp(t,n,i,"border",a))&&(e.border=o);(o=Sp(t,n,i,"fontFamily",a))&&(e.fontFamily=o);(o=Sp(t,n,i,"fontWeight",a))&&"bold"==o&&(e.fontWeight=700),o=Sp(t,n,i,"wrapOption",a),e.wrapLine=!o||"noWrap"!=o,(o=Sp(t,n,i,"lineHeight",a))&&o.match(jp)&&(e.lineHeight=o),(o=Sp(t,n,i,"fontSize",a))&&(o.match(jp)||o.match(Pp))&&(e.fontSize=o),(o=Sp(t,n,i,"fontStyle",a))&&(e.fontStyle=xe[o.toUpperCase()]);if(r){o=r.getAttribute("imageType")||r.getAttribute("imagetype");var s=r.getAttribute("encoding");r=r.textContent.trim(),"PNG"==o&&"Base64"==s&&r&&(e.backgroundImage="data:image/png;base64,"+r)}(r=Sp(t,n,i,"letterSpacing",a))&&r.match(jp)&&(e.letterSpacing=r),(r=Sp(t,n,i,"linePadding",a))&&r.match(jp)&&(e.linePadding=r),(a=Sp(t,n,i,"opacity",a))&&(e.opacity=parseFloat(a));(n=kp(n,i,"textDecoration"))&&Ep(e,n),(t=Ap(t,i,"textDecoration"))&&Ep(e,t)}(t,e,a,o,i,u,0==d.length),t}function Ep(e,t){for(var n=l(t.split(" ")),r=n.next();!r.done;r=n.next())switch(r.value){case"underline":e.textDecoration.includes("underline")||e.textDecoration.push("underline");break;case"noUnderline":e.textDecoration.includes("underline")&&re(e.textDecoration,"underline");break;case"lineThrough":e.textDecoration.includes("lineThrough")||e.textDecoration.push("lineThrough");break;case"noLineThrough":e.textDecoration.includes("lineThrough")&&re(e.textDecoration,"lineThrough");break;case"overline":e.textDecoration.includes("overline")||e.textDecoration.push("overline");break;case"noOverline":e.textDecoration.includes("overline")&&re(e.textDecoration,"overline")}}function Sp(e,t,n,r,i){return i=void 0===i||i,(e=Ap(e,n,r))?e:i?kp(t,n,r):null}function kp(e,t,n){if(!e)return null;var r=Jl(e,"http://www.w3.org/ns/ttml#styling",n);return r||Ip(e,t,n)}function Ap(e,t,n){var r=Jl(e,"http://www.w3.org/ns/ttml#styling",n);return r||Ip(e,t,n)}function Ip(e,t,n){e=Cp(e,"style",t,"");for(var r=null,i=0;i<e.length;i++){var a=Jl(e[i],"urn:ebu:tt:style",n);a||(a=Jl(e[i],"http://www.w3.org/ns/ttml#styling",n)),a||(a=Ap(e[i],t,n)),a&&(r=a)}return r}function Cp(e,t,n,r,i){var a=[];if(!e||1>n.length)return a;var o=e;for(e=null;o&&!(e=i?Jl(o,i,t):o.getAttribute(t))&&(o=o.parentNode)instanceof Element;);if(t=e)for(i=(t=l(t.split(" "))).next();!i.done;i=t.next())for(i=i.value,o=(e=l(n)).next();!o.done;o=e.next())if(r+(o=o.value).getAttribute("xml:id")==i){a.push(o);break}return a}function Mp(e,t,n,r){return e=Rp(e,t),null==n?n=e.start:null!=e.start&&(n+=e.start),null==r?r=e.end:null!=e.start&&(r+=e.start),{start:n,end:r}}function Rp(e,t){var n=Dp(e.getAttribute("begin"),t),r=Dp(e.getAttribute("end"),t),i=Dp(e.getAttribute("dur"),t);return null==r&&null!=i&&(r=n+i),{start:n,end:r}}function Dp(e,t){var n=null;if(Up.test(e)){n=Up.exec(e);var r=Number(n[1]),i=Number(n[2]),a=Number(n[3]),o=Number(n[4]);n=(a+=(o+=(Number(n[5])||0)/t.h)/t.frameRate)+60*i+3600*r}else if(Bp.test(e))n=_p(Bp,e);else if(Fp.test(e))n=_p(Fp,e);else if(Vp.test(e))n=Vp.exec(e),n=Number(n[1])/t.frameRate;else if(Hp.test(e))n=Hp.exec(e),n=Number(n[1])/t.g;else if(Kp.test(e))n=_p(Kp,e);else if(e)throw new qe(2,2,2001,"Could not parse cue time range in TTML");return n}function _p(e,t){var n=e.exec(t);return null==n||""==n[0]?null:(Number(n[4])||0)/1e3+(Number(n[3])||0)+60*(Number(n[2])||0)+3600*(Number(n[1])||0)}function Np(e,t,n,r){this.frameRate=Number(e)||30,this.h=Number(t)||1,this.g=Number(r),0==this.g&&(this.g=e?this.frameRate*this.h:1),n&&(e=/^(\d+) (\d+)$/g.exec(n))&&(this.frameRate*=Number(e[1])/Number(e[2]))}Vt["application/x-subtitle-lrc"]=function(){return new yp},wp.prototype.parseInit=function(){},wp.prototype.parseMedia=function(e,t){var n=mt(e),r=[],i=new DOMParser,a=null;if(""==n)return r;try{a=i.parseFromString(n,"text/xml")}catch(e){throw new qe(2,2,2005,"Failed to parse TTML.")}if(a){if(n=a.getElementsByTagName("parsererror")[0])throw new qe(2,2,2005,n.textContent);var o=a.getElementsByTagName("tt")[0];if(!o)throw new qe(2,2,2005,"TTML does not contain <tt> tag.");if(!(i=o.getElementsByTagName("body")[0]))return[];n=Jl(o,"http://www.w3.org/ns/ttml#parameter","frameRate");var s=Jl(o,"http://www.w3.org/ns/ttml#parameter","subFrameRate"),u=Jl(o,"http://www.w3.org/ns/ttml#parameter","frameRateMultiplier"),c=Jl(o,"http://www.w3.org/ns/ttml#parameter","tickRate"),d=Jl(o,"http://www.w3.org/ns/ttml#parameter","cellResolution");a=o.getAttribute("xml:space")||"default";var f=Jl(o,"http://www.w3.org/ns/ttml#styling","extent");
35if("default"!=a&&"preserve"!=a)throw new qe(2,2,2005,"Invalid xml:space value: "+a);a="default"==a,n=new Np(n,s,u,c),d=d&&(d=/^(\d+) (\d+)$/.exec(d))?{columns:parseInt(d[1],10),rows:parseInt(d[2],10)}:null,s=(s=o.getElementsByTagName("metadata")[0])?function(e){return Array.from(e.childNodes).filter((function(e){return e instanceof Element}))}(s):[],u=Array.from(o.getElementsByTagName("style")),c=[];for(var h=l(o=Array.from(o.getElementsByTagName("region"))),p=h.next();!p.done;p=h.next()){var g=p.value;p=new Ee;var m=g.getAttribute("xml:id");if(m){p.id=m;var v,y,b=null;f&&(b=Lp.exec(f)||Op.exec(f)),m=b?Number(b[1]):null,b=b?Number(b[2]):null,(v=kp(g,u,"extent"))&&(null!=(v=(y=Lp.exec(v))||Op.exec(v))&&(p.width=Number(v[1]),p.height=Number(v[2]),y||(null!=m&&(p.width=100*p.width/m),null!=b&&(p.height=100*p.height/b)),p.widthUnits=y||null!=m?Se:0,p.heightUnits=y||null!=b?Se:0)),(g=kp(g,u,"origin"))&&(null!=(v=(y=Lp.exec(g))||Op.exec(g))&&(p.viewportAnchorX=Number(v[1]),p.viewportAnchorY=Number(v[2]),y||(null!=b&&(p.viewportAnchorY=100*p.viewportAnchorY/b),null!=m&&(p.viewportAnchorX=100*p.viewportAnchorX/m)),p.viewportAnchorUnits=y||null!=m?Se:0))}else p=null;p&&c.push(p)}if(Yl(i,"p").length)throw new qe(2,2,2001,"<p> can only be inside <div> in TTML");for(f=(i=l(Yl(i,"div"))).next();!f.done;f=i.next()){if(Yl(f=f.value,"span").length)throw new qe(2,2,2001,"<span> can only be inside <p> in TTML");if((h=Yl(f,"p"))&&h.length)for(h=(f=l(h)).next();!h.done;h=f.next())(h=xp(h.value,t.periodStart,n,s,u,o,c,a,!1,d))&&r.push(h);else(f=xp(f,t.periodStart,n,s,u,o,c,a,!1,d))&&r.push(f)}}return r},F("shaka.text.TtmlTextParser",wp),wp.prototype.parseMedia=wp.prototype.parseMedia,wp.prototype.parseInit=wp.prototype.parseInit;var Lp=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/,Pp=/^(\d{1,2}(?:\.\d+)?|100)%$/,jp=/^(\d+px|\d+em|\d*\.?\d+c)$/,Op=/^(\d+)px (\d+)px$/,Up=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Bp=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/,Fp=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/,Vp=/^(\d*(?:\.\d*)?)f$/,Hp=/^(\d*(?:\.\d*)?)t$/,Kp=/^(?:(\d*(?:\.\d*)?)h)?(?:(\d*(?:\.\d*)?)m)?(?:(\d*(?:\.\d*)?)s)?(?:(\d*(?:\.\d*)?)ms)?$/,Gp={left:me,center:"center",right:"end",start:me,end:"end"},qp={left:"line-left",center:"center",right:"line-right"},zp=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];function Xp(){this.s=new wp}function Wp(){}function Yp(e){for(var t=l(Object.entries(ye)),n=t.next();!n.done;n=t.next()){var r=l(n.value);n=r.next().value,r=r.next().value;var i=new oe(0,0,"");i.color=r,e.set(n,i)}for(n=(t=l(Object.entries(be))).next();!n.done;n=t.next())n=(r=l(n.value)).next().value,r=r.next().value,(i=new oe(0,0,"")).backgroundColor=r,e.set(n,i)}function $p(e,t,n){0===n.size&&Yp(n);e:{var r=e;e=[];for(var i=-1,a="",o=0;o<r.length;o++)if("/"===r[o]){var s=r.indexOf(">",o);if(s<=o){e=r;break e}s=r.substring(o+1,s);var u=e.pop();if(u===s)a+="/"+s+">";else{if(!u.startsWith("c.")||"c"!==s){e=r;break e}a+="/"+u+">"}o+=s.length+1}else"<"===r[o]?i=o+1:">"===r[o]&&0<i&&(e.push(r.substr(i,o-i)),i=-1),a+=r[o];e=a}if(i=lc("<span>"+e+"</span>","span")){if(r=[],1==(i=i.childNodes).length&&((a=i[0]).nodeType==Node.TEXT_NODE||a.nodeType==Node.CDATA_SECTION_NODE))return void(t.payload=e);for(i=(e=l(i)).next();!i.done;i=e.next())Zp(i.value,t,r,n);t.nestedCues=r}else t.payload=e}function Jp(e,t){return e&&0<e.length?e:t}function Zp(e,t,n,r){var i=t.clone();if(e.nodeType===Node.ELEMENT_NODE&&e.nodeName)for(var a=l(e.nodeName.split(/[ .]+/)),o=a.next();!o.done;o=a.next()){if(o=o.value,r.has(o)){var s=r.get(o);s&&(i.backgroundColor=Jp(s.backgroundColor,i.backgroundColor),i.color=Jp(s.color,i.color),i.fontFamily=Jp(s.fontFamily,i.fontFamily),i.fontSize=Jp(s.fontSize,i.fontSize),i.fontWeight=s.fontWeight,i.fontStyle=s.fontStyle,i.opacity=s.opacity,i.wrapLine=s.wrapLine)}switch(o){case"b":i.fontWeight=700;break;case"i":i.fontStyle="italic";break;case"u":i.textDecoration.push("underline")}}if(Ql(e))for(a=!0,r=l(e.textContent.split("\n")),e=r.next();!e.done;e=r.next())e=e.value,a||((a=t.clone()).lineBreak=!0,n.push(a)),0<e.length&&((a=i.clone()).payload=e,n.push(a)),a=!1;else for(e=(t=l(e.childNodes)).next();!e.done;e=t.next())Zp(e.value,i,n,r)}function Qp(e,t,n){var r;(r=/^align:(start|middle|center|end|left|right)$/.exec(t))?(t=r[1],e.textAlign="middle"==t?le:ce[t.toUpperCase()]):(r=/^vertical:(lr|rl)$/.exec(t))?e.writingMode="lr"==r[1]?"vertical-lr":"vertical-rl":(r=/^size:([\d.]+)%$/.exec(t))?e.size=Number(r[1]):(r=/^position:([\d.]+)%(?:,(line-left|line-right|center|start|end))?$/.exec(t))?(e.position=Number(r[1]),r[2]&&(t=r[2],e.positionAlign="line-left"==t||"start"==t?"line-left":"line-right"==t||"end"==t?"line-right":"center")):(r=/^region:(.*)$/.exec(t))?(t=function(e,t){var n=e.filter((function(e){return e.id==t}));return n.length?n[0]:null}(n,r[1]))&&(e.region=t):(n=/^line:([\d.]+)%(?:,(start|end|center))?$/.exec(t))?(e.lineInterpretation=1,e.line=Number(n[1]),n[2]&&(e.lineAlign=ve[n[2].toUpperCase()])):(n=/^line:(-?\d+)(?:,(start|end|center))?$/.exec(t))&&(e.lineInterpretation=ge,e.line=Number(n[1]),n[2]&&(e.lineAlign=ve[n[2].toUpperCase()]))}function eg(e){if(null==(e=_d(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function tg(){this.g=null}function ng(e,t,n){var r,i,a;return(new li).box("payl",fi((function(e){r=mt(e)}))).box("iden",fi((function(e){i=mt(e)}))).box("sttg",fi((function(e){a=mt(e)}))).parse(e),r?function(e,t,n,r,i){if(r=new oe(r,i,""),$p(e,r,new Map),t&&(r.id=t),n)for(e=new Rd(n),t=Nd(e);t;)Qp(r,t,[]),Dd(e),t=Nd(e);return r}(r,i,a,t,n):null}function rg(){}function ig(e){if(null==(e=_d(e,/(?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{2,3})/g)))return null;var t=Number(e[2]),n=Number(e[3]);return 59<t||59<n?null:Number(e[4])/1e3+n+60*t+3600*(Number(e[1])||0)}function ag(){this.s=new Wp}function og(e){var t="WEBVTT\n\n";if(""==e)return t;for(var n=(e=l((e=(e=e.replace(/\r+/g,"")).trim()).split("\n\n"))).next();!n.done;n=e.next())(n=n.value.split(/\n/))[0].match(/\d+/)&&n.shift(),n[0]=n[0].replace(/,/g,"."),t+=n.join("\n")+"\n\n";return t}function sg(){}function ug(e,t){var n=t.Fontname;if(n&&(e.fontFamily=n),(n=t.Fontsize)&&(e.fontSize=n+"px"),(n=t.PrimaryColour)&&(n=lg(n))&&(e.color=n),(n=t.BackColour)&&(n=lg(n))&&(e.backgroundColor=n),t.Bold&&(e.fontWeight=700),t.Italic&&(e.fontStyle="italic"),t.Underline&&e.textDecoration.push("underline"),(n=t.Spacing)&&(e.letterSpacing=n+"px"),n=t.Alignment)switch(parseInt(n,10)){case 1:e.displayAlign=de,e.textAlign="start";break;
35case 2:e.displayAlign=de,e.textAlign=le;break;case 3:e.displayAlign=de,e.textAlign="end";break;case 5:e.displayAlign="before",e.textAlign="start";break;case 6:e.displayAlign="before",e.textAlign=le;break;case 7:e.displayAlign="before",e.textAlign="end";break;case 9:e.displayAlign="center",e.textAlign="start";break;case 10:e.displayAlign="center",e.textAlign=le;break;case 11:e.displayAlign="center",e.textAlign="end"}(n=t.AlphaLevel)&&(e.opacity=parseFloat(n))}function lg(e){return 0<=(e=parseInt(e.replace("&H",""),16))?"rgba("+(255&e)+","+(e>>8&255)+","+(e>>16&255)+","+(e>>24&255^255)/255+")":null}function cg(e){return 3600*((e=mg.exec(e))[1]?parseInt(e[1].replace(":",""),10):0)+60*parseInt(e[2],10)+parseFloat(e[3])}Vt["application/ttml+xml"]=function(){return new wp},Xp.prototype.parseInit=function(e){var t=!1;if((new li).box("moov",ci).box("trak",ci).box("mdia",ci).box("minf",ci).box("stbl",ci).V("stsd",di).box("stpp",(function(e){t=!0,e.parser.stop()})).parse(e),!t)throw new qe(2,2,2007)},Xp.prototype.parseMedia=function(e,t){var n=this,r=!1,i=[];if((new li).box("mdat",fi((function(e){r=!0,i=i.concat(n.s.parseMedia(e,t))}))).parse(e,!1),!r)throw new qe(2,2,2007);return i},F("shaka.text.Mp4TtmlParser",Xp),Xp.prototype.parseMedia=Xp.prototype.parseMedia,Xp.prototype.parseInit=Xp.prototype.parseInit,Vt['application/mp4; codecs="stpp"']=function(){return new Xp},Vt['application/mp4; codecs="stpp.ttml.im1t"']=function(){return new Xp},Vt['application/mp4; codecs="stpp.TTML.im1t"']=function(){return new Xp},Wp.prototype.parseInit=function(){},Wp.prototype.parseMedia=function(e,t){var n=mt(e),r=(n=n.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n")).split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(r[0]))throw new qe(2,2,2e3);if(n=t.periodStart,r[0].includes("X-TIMESTAMP-MAP")){var i=r[0].match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m),a=r[0].match(/MPEGTS:(\d+)/m);if(i&&a){if(null==(n=eg(new Rd(i[1]))))throw new qe(2,2,2e3);for(a=Number(a[1]),i=t.segmentStart;95443.7176888889<=i;)i-=95443.7176888889,a+=8589934592;n=t.periodStart+a/9e4-n}}a=[];for(var o=(i=l(r[0].split("\n"))).next();!o.done;o=i.next())if(o=o.value,/^Region:/.test(o)){o=new Rd(o);var s=new Ee;Nd(o),Dd(o);for(var u=Nd(o);u;){var c=s,d=u;(u=/^id=(.*)$/.exec(d))?c.id=u[1]:(u=/^width=(\d{1,2}|100)%$/.exec(d))?c.width=Number(u[1]):(u=/^lines=(\d+)$/.exec(d))?(c.height=Number(u[1]),c.heightUnits=2):(u=/^regionanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.regionAnchorX=Number(u[1]),c.regionAnchorY=Number(u[2])):(u=/^viewportanchor=(\d{1,2}|100)%,(\d{1,2}|100)%$/.exec(d))?(c.viewportAnchorX=Number(u[1]),c.viewportAnchorY=Number(u[2])):/^scroll=up$/.exec(d)&&(c.scroll="up"),Dd(o),u=Nd(o)}a.push(s)}for(Yp(i=new Map),o=[],s=(r=l(r.slice(1))).next();!s.done;s=r.next()){if((1!=(s=s.value.split("\n")).length||s[0])&&!/^NOTE($|[ \t])/.test(s[0])&&"STYLE"==s[0]&&s[1].includes("::cue")){c="global",(u=s[1].match(/\((.*)\)/))&&(c=u.pop()),u=s.slice(2,-1),s[1].includes("}")&&(d=/\{(.*?)\}/.exec(s[1]))&&(u=d[1].split(";")),d=new oe(0,0,"");for(var f=!1,h=0;h<u.length;h++){var p=/^\s*([^:]+):\s*(.*)/.exec(u[h]);if(p){var g=p[2].trim().replace(";","");switch(p[1].trim()){case"background-color":f=!0,d.backgroundColor=g;break;case"color":f=!0,d.color=g;break;case"font-family":f=!0,d.fontFamily=g;break;case"font-size":f=!0,d.fontSize=g;break;case"font-weight":700<=parseInt(g,10)&&(f=!0,d.fontWeight=700);break;case"font-style":switch(g){case"normal":f=!0,d.fontStyle=we;break;case"italic":f=!0,d.fontStyle="italic";break;case"oblique":f=!0,d.fontStyle="oblique"}break;case"opacity":f=!0,d.opacity=parseFloat(g);break;case"white-space":f=!0,d.wrapLine="noWrap"!=g}}}f&&i.set(c,d)}if(h=n,1==s.length&&!s[0]||/^NOTE($|[ \t])/.test(s[0])||"STYLE"==s[0])s=null;else{if(c=null,s[0].includes("--\x3e")||(c=s[0],s.splice(0,1)),d=eg(u=new Rd(s[0])),p=_d(u,/[ \t]+--\x3e[ \t]+/g),f=eg(u),null==d||null==p||null==f)throw new qe(2,2,2001,"Could not parse cue time range in WebVTT");for(d+=h,f+=h,h=s.slice(1).join("\n").trim(),i.has("global")?((s=i.get("global").clone()).startTime=d,s.endTime=f,s.payload=""):s=new oe(d,f,""),$p(h,s,i),Dd(u),d=Nd(u);d;)Qp(s,d,a),Dd(u),d=Nd(u);null!=c&&(s.id=c)}s&&o.push(s)}return o},F("shaka.text.VttTextParser",Wp),Wp.prototype.parseMedia=Wp.prototype.parseMedia,Wp.prototype.parseInit=Wp.prototype.parseInit,Vt["text/vtt"]=function(){return new Wp},Vt['text/vtt; codecs="vtt"']=function(){return new Wp},Vt['text/vtt; codecs="wvtt"']=function(){return new Wp},tg.prototype.parseInit=function(e){var t=this,n=!1;if((new li).box("moov",ci).box("trak",ci).box("mdia",ci).V("mdhd",(function(e){e=ka(e.reader,e.version),t.g=e.timescale})).box("minf",ci).box("stbl",ci).V("stsd",di).box("wvtt",(function(){n=!0})).parse(e),!this.g)throw new qe(2,2,2008);if(!n)throw new qe(2,2,2008)},tg.prototype.parseMedia=function(e,t){if(!this.g)throw new qe(2,2,2008);
35var n,r=0,i=[],a=[],o=!1,s=!1,u=!1,c=null;if((new li).box("moof",ci).box("traf",ci).V("tfdt",(function(e){o=!0,r=Sa(e.reader,e.version).hd})).V("tfhd",(function(e){c=Ea(e.reader,e.flags).Yd})).V("trun",(function(e){s=!0,i=Aa(e.reader,e.version,e.flags).pe})).box("mdat",fi((function(e){u=!0,n=e}))).parse(e,!1),!u&&!o&&!s)throw new qe(2,2,2008);for(var d=r,f=new oi(n,0),h=l(i),p=h.next();!p.done;p=h.next()){var g=(p=p.value).Jd||c,m=p.Kc?r+p.Kc:d;d=m+(g||0);var v=0;do{var y=f.M();v+=y;var b=null;"vttc"==pi(f.M())?8<y&&(b=f.$a(y-8)):f.skip(y-8),g&&b&&(y=ng(b,t.periodStart+m/this.g,t.periodStart+d/this.g),a.push(y))}while(p.sampleSize&&v<p.sampleSize)}return a.filter(Fe)},F("shaka.text.Mp4VttParser",tg),tg.prototype.parseMedia=tg.prototype.parseMedia,tg.prototype.parseInit=tg.prototype.parseInit,Vt['application/mp4; codecs="wvtt"']=function(){return new tg},rg.prototype.parseInit=function(){},rg.prototype.parseMedia=function(e){var t=mt(e).replace(/\r+/g,"");if(e=[],""==(t=t.trim()))return e;for(var n=(t=l(t.split("\n\n"))).next();!n.done;n=t.next()){var r=new Rd((n=n.value.split("\n"))[0]),i=ig(r),a=_d(r,/,/g);if(r=ig(r),null==i||null==a||null==r)throw new qe(2,2,2001,"Could not parse cue time range in SubViewer");e.push(new oe(i,r,n.slice(1).join("\n").trim()))}return e},F("shaka.text.SbvTextParser",rg),rg.prototype.parseMedia=rg.prototype.parseMedia,rg.prototype.parseInit=rg.prototype.parseInit,Vt["text/x-subviewer"]=function(){return new rg},ag.prototype.parseInit=function(){},ag.prototype.parseMedia=function(e,t){var n=mt(e);return n=Re(bt(n=og(n))),this.s.parseMedia(n,t)},F("shaka.text.SrtTextParser",ag),ag.srt2webvtt=og,ag.prototype.parseMedia=ag.prototype.parseMedia,ag.prototype.parseInit=ag.prototype.parseInit,Vt["text/srt"]=function(){return new ag},sg.prototype.parseInit=function(){},sg.prototype.parseMedia=function(e){for(var t="",n="",r=(e=l(e=mt(e).split(/\r?\n\s*\r?\n/))).next();!r.done;r=e.next()){var i=hg.exec(r.value);i&&(r=i[1],i=i[2],"V4 Styles"==r||"V4+ Styles"==r?t=i:"Events"==r&&(n=i))}e=[],r=null;for(var a=(t=l(t.split(/\r?\n/))).next();!a.done;a=t.next())if(i=a.value,!/^\s*;/.test(i)&&(a=pg.exec(i)))if(i=a[1].trim(),a=a[2].trim(),"Format"==i)r=a.split(gg);else if("Style"==i){i=a.split(gg),a={};for(var o=0;o<r.length&&o<i.length;o++)a[r[o]]=i[o];e.push(a)}for(r=[],t=null,i={},a=(n=l(n.split(/\r?\n/))).next();!a.done;i={cd:i.cd},a=n.next())if(a=a.value,!/^\s*;/.test(a)&&(o=pg.exec(a)))if(a=o[1].trim(),o=o[2].trim(),"Format"==a)t=o.split(gg);else if("Dialogue"==a){o=o.split(gg),a={};for(var s=0;s<t.length&&s<o.length;s++)a[t[s]]=o[s];o=new oe(s=cg(a.Start),cg(a.End),o.slice(t.length-1).join(",").replace(/\\N/g,"\n").replace(/\{[^}]+\}/g,"")),i.cd=a.Style,(a=e.find(function(e){return function(t){return t.Name==e.cd}}(i)))&&ug(o,a),r.push(o)}return r},F("shaka.text.SsaTextParser",sg),sg.prototype.parseMedia=sg.prototype.parseMedia,sg.prototype.parseInit=sg.prototype.parseInit;var dg,fg,hg=/^\s*\[([^\]]+)\]\r?\n([\s\S]*)/,pg=/^\s*([^:]+):\s*(.*)/,gg=/\s*,\s*/,mg=/^(\d+:)?(\d{1,2}):(\d{1,2}(?:[.]\d{1,3})?)?$/; 36/* 37 @license 38 EME Encryption Scheme Polyfill 39 Copyright 2019 Google LLC 40 SPDX-License-Identifier: Apache-2.0 41*/ 42function vg(){}function yg(){dg?console.debug("EmeEncryptionSchemePolyfill: Already installed."):navigator.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration?(dg=navigator.requestMediaKeySystemAccess,console.debug("EmeEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.requestMediaKeySystemAccess=bg):console.debug("EmeEncryptionSchemePolyfill: EME not found")}function bg(e,t){var n,r=this;return N((function(i){return 1==i.g?(console.assert(r==navigator,'bad "this" for requestMediaKeySystemAccess'),T(i,dg.call(r,e,t),2)):Cg(n=i.h)?(console.debug("EmeEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.requestMediaKeySystemAccess=dg,i.return(n)):(console.debug("EmeEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.requestMediaKeySystemAccess=Tg,i.return(Tg.call(r,e,t)))}))}function Tg(e,t){var n,r,i,a,o,s,u,c,d,f,h=this;return N((function(p){if(1==p.g){for(console.assert(h==navigator,'bad "this" for requestMediaKeySystemAccess'),n=Ig(e),r=[],i=l(t),a=i.next();!a.done;a=i.next())o=a.value,s=wg(o.videoCapabilities,n),u=wg(o.audioCapabilities,n),o.videoCapabilities&&o.videoCapabilities.length&&!s.length||o.audioCapabilities&&o.audioCapabilities.length&&!u.length||((c=Object.assign({},o)).videoCapabilities=s,c.audioCapabilities=u,r.push(c));if(!r.length)throw(d=Error("Unsupported keySystem or supportedConfigurations.")).name="NotSupportedError",d.code=DOMException.NOT_SUPPORTED_ERR,d;return T(p,dg.call(h,e,r),2)}return f=p.h,p.return(new Ag(f,n))}))}function wg(e,t){return e?e.filter((function(e){return!e.encryptionScheme||e.encryptionScheme==t})):e}function xg(){}function Eg(){fg?console.debug("McEncryptionSchemePolyfill: Already installed."):navigator.mediaCapabilities?(fg=navigator.mediaCapabilities.decodingInfo,console.debug("McEncryptionSchemePolyfill: Waiting to detect encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=Sg):console.debug("McEncryptionSchemePolyfill: MediaCapabilities not found")}function Sg(e){var t,n,r=this;return N((function(i){return 1==i.g?(console.assert(r==navigator.mediaCapabilities,'bad "this" for decodingInfo'),T(i,fg.call(r,e),2)):(t=i.h,e.keySystemConfiguration?(n=t.keySystemAccess)&&Cg(n)?(console.debug("McEncryptionSchemePolyfill: Native encryptionScheme support found."),navigator.mediaCapabilities.decodingInfo=fg,i.return(t)):(console.debug("McEncryptionSchemePolyfill: No native encryptionScheme support found. Patching encryptionScheme support."),navigator.mediaCapabilities.decodingInfo=kg,i.return(kg.call(r,e))):i.return(t))}))}function kg(e){var t,n,r,i,a,o,s,u,l,c=this;return N((function(d){switch(d.g){case 1:return console.assert(c==navigator.mediaCapabilities,'bad "this" for decodingInfo'),t=null,e.keySystemConfiguration&&(n=e.keySystemConfiguration,r=n.keySystem,i=n.audio&&n.audio.encryptionScheme,a=n.video&&n.video.encryptionScheme,t=Ig(r),o={powerEfficient:!1,smooth:!1,supported:!1,keySystemAccess:null,configuration:e},i&&i!=t||a&&a!=t)?d.return(o):T(d,fg.call(c,e),2);case 2:if((s=d.h).keySystemAccess){s.keySystemAccess=new Ag(s.keySystemAccess,t),d.v(3);break}if(!e.keySystemConfiguration){d.v(3);break}var f=e.keySystemConfiguration,h=[],p=[];return f.audio&&h.push({robustness:f.audio.robustness||"",contentType:e.audio.contentType}),f.video&&p.push({robustness:f.video.robustness||"",contentType:e.video.contentType}),f={initDataTypes:f.initDataType?[f.initDataType]:[],distinctiveIdentifier:f.distinctiveIdentifier,persistentState:f.persistentState,sessionTypes:f.sessionTypes},h.length&&(f.audioCapabilities=h),p.length&&(f.videoCapabilities=p),u=f,l=s,T(d,navigator.requestMediaKeySystemAccess(e.keySystemConfiguration.keySystem,[u]),5);case 5:l.keySystemAccess=d.h;case 3:return d.return(s)}}))}function Ag(e,t){this.h=e,this.g=t,this.keySystem=e.keySystem}function Ig(e){return e.startsWith("com.widevine")||e.startsWith("com.microsoft")||e.startsWith("com.adobe")||e.startsWith("org.w3")?"cenc":e.startsWith("com.apple")?"cbcs-1-9":(console.warn("EmeEncryptionSchemePolyfill: Unknown key system:",e,"Please contribute!"),null)}function Cg(e){var t=(e=e.getConfiguration()).audioCapabilities&&e.audioCapabilities[0];return!(!(e=e.videoCapabilities&&e.videoCapabilities[0]||t)||void 0===e.encryptionScheme)}function Mg(){}function Rg(){yg(),Eg()}Vt["text/x-ssa"]=function(){return new sg},F("EmeEncryptionSchemePolyfill",vg),vg.install=yg,F("McEncryptionSchemePolyfill",xg),xg.install=Eg,Ag.prototype.getConfiguration=function(){var e=this.h.getConfiguration();if(e.videoCapabilities)for(var t=l(e.videoCapabilities),n=t.next();!n.done;n=t.next())n.value.encryptionScheme=this.g;if(e.audioCapabilities)for(n=(t=l(e.audioCapabilities)).next();!n.done;n=t.next())n.value.encryptionScheme=this.g;return e},Ag.prototype.createMediaKeys=function(){return this.h.createMediaKeys()},F("EncryptionSchemePolyfills",Mg),Mg.install=Rg,void 0!==n&&n.exports&&(n.exports=Mg)}.call(n,e,e,void 0),n.shaka)t[r]=n.shaka[r]}()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.