/*! JW Player version 8.26.0 Copyright (c) 2022, JW Player, All Rights Reserved This source code and its use and distribution is subject to the terms and conditions of the applicable license agreement. https://www.jwplayer.com/tos/ This product includes portions of other software. For the full text of licenses, see https://ssl.p.jwpcdn.com/player/v/8.26.0/notice.txt */ (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\s+<").replace(/(<\/?)tts?:/g,"$1").replace(//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}.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;i0&&(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=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>4){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>1|(8323072&t)>>2|(2130706432&t)>>3}function u(e){var t={};if(!("value"in e)&&"data"in e&&e.data instanceof ArrayBuffer){var n=new Uint8Array(e.data),r=n.length;e={value:{key:"",data:""}};for(var i=10;i<14&&i0){var f=o(n.subarray(u,u+=c),0);if("PRIV"===e.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);e.value.data=p}else e.value.data=o(n,u+1);e.value.info=f}else e.value.info=f,e.value.data=o(n,u+1)}else{var g=n[u];e.value.data=1===g||2===g?function(e,t){for(var n=e.length-1,r="",i=t||0;it.length)return!0;for(var r=0;r=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.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;r0)for(var h=0;h0?(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))=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._5||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 De}});var r=n(7462),i=n(4506),a=n(548),o=n(4578),s=n(2776);function u(){}u.prototype.parseInit=function(){},u.prototype.parseMedia=function(e,t){var n=t.periodStart,r=t.segmentStart,i=function(e){var t,n="";if(!e)return"";239===(t=new Uint8Array(e))[0]&&187===t[1]&&191===t[2]&&(t=t.subarray(3));for(var r=0;r1&&this.shakaPlayer.trickPlay(e)},n.seek=function(e){if("LIVE"!==this.streamType){var t=this.shakaPlayer.seekRange().end;this.videoTag.currentTime=e<0?t+e:e}},n.getPlaybackRate=function(){return this.shakaPlayer?this.shakaPlayer.getPlaybackRate()||1:this.videoTag.playbackRate},n.isLive=function(){return this.shakaPlayer.isLive()},n.isDvr=function(){return"DVR"===this.streamType},n.getCurrentTime=function(){var e=this.videoTag.currentTime;return this.shakaPlayer.isLive()&&"DVR"===this.streamType&&(e-=this.shakaPlayer.seekRange().end),e},n.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,this.tweakedAvailabilityWindow||"hls"!==this.loadedItem.sources[0].type||(t.getManifest().presentationTimeline.setSegmentAvailabilityDuration(Math.abs(n)),this.tweakedAvailabilityWindow=!0),n=(0,m.s)(n,r)?n:1/0}return this.streamType=(0,m.v)(n,r),n},n.getLoadedItem=function(){return this.loadedItem},n.getSeekRange=function(){return this.shakaPlayer.seekRange()},n.getVariantHistory=function(e){return e=e||0,this.shakaPlayer.getStats().switchHistory.filter((function(t){return"variant"===t.type&&t.timestamp>e}))},n.setLoadedItem=function(e){this.loadedItem=e,this.streamType="VOD"},n.unload=function(){this.loadedItem=null,this.shakaPlayer.unload()},n.destroy=function(){return window.VTTCue=l.Z,this.loadedItem=null,this.shakaPlayer.destroy()},t}(h.ZP),b=n(1918),T=n(5256),w=n(1643),x=n(974),S=n(8518),E=n(6886),k=n(6528),A=n(8702),I=n(3949),C=n(186),M=n(3328),R=n(5099),D=n(2728),N=n(4446),_=n(9601),L=24e4,P=241e3,O=244e3,j=246e3,U=241005,B=g().util.Error,F=B.Severity.RECOVERABLE,V=B.Category,H=V.NETWORK,K=V.MEDIA,G=V.MANIFEST,q=V.PLAYER,z=V.DRM,X=B.Code,W=X.UNSUPPORTED_SCHEME,Y=X.BAD_HTTP_STATUS,$=X.HTTP_ERROR,Z=X.TIMEOUT,J=X.MP4_SIDX_WRONG_BOX_TYPE,Q=X.VIDEO_ERROR,ee=X.DASH_INVALID_XML,te=X.CONTENT_UNSUPPORTED_BY_BROWSER,ne=X.RESTRICTIONS_CANNOT_BE_MET,re=X.REQUEST_FILTER_ERROR,ie=X.RESPONSE_FILTER_ERROR,ae=X.NO_RECOGNIZED_KEY_SYSTEMS,oe=X.REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE,se=X.FAILED_TO_CREATE_CDM,ue=X.FAILED_TO_ATTACH_TO_VIDEO,le=X.INVALID_SERVER_CERTIFICATE,ce=X.FAILED_TO_CREATE_SESSION,de=X.FAILED_TO_GENERATE_LICENSE_REQUEST,fe=X.LICENSE_REQUEST_FAILED,he=X.LICENSE_RESPONSE_REJECTED,pe=X.ENCRYPTED_CONTENT_WITHOUT_DRM_INFO,ge=X.NO_LICENSE_SERVER_GIVEN,me=X.OFFLINE_SESSION_REMOVED,ve=X.EXPIRED,ye=X.SERVER_CERTIFICATE_REQUIRED,be=X.INIT_DATA_TRANSFORM_ERROR,Te=X.SERVER_CERTIFICATE_REQUEST_FAILED,we=new Map([[Z,241001],[J,244604],[ee,242601],[ne,242635],[re,U],[ie,U],[ae,j],[oe,246001],[se,246002],[ue,246003],[le,246004],[ce,246005],[de,246006],[fe,246007],[he,246008],[pe,246010],[ge,246012],[me,246013],[ve,246014],[ye,246015],[be,246016],[Te,246017]]);var xe,Se=n(4742),Ee=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)},ke=(xe="warn",Se.Z.debug?console[xe].bind(console):function(){}),Ae=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){ke(e)}o.responseType="arraybuffer",o.timeout=n.retryParameters.timeout,o.withCredentials=n.allowCrossSiteCredentials,o.onabort=function(){c(new(g().util.Error)(g().util.Error.Severity.RECOVERABLE,g().util.Error.Category.NETWORK,g().util.Error.Code.OPERATION_ABORTED,t,r))};var d=!1;for(var f in o.onreadystatechange=function(){if(2===o.readyState&&!d){var e=Ie(o);a(e),d=!0}},o.onload=function(){var e=Ie(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=g().util.StringUtils.fromBytesAutoDetect(t)}catch(e){ke(e)}ke("HTTP error text:",o);var s=401===n||403===n?g().util.Error.Severity.CRITICAL:g().util.Error.Severity.RECOVERABLE;throw new(g().util.Error)(s,g().util.Error.Category.NETWORK,g().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(g().util.Error)(g().util.Error.Severity.RECOVERABLE,g().util.Error.Category.NETWORK,g().util.Error.Code.HTTP_ERROR,t,e,r))},o.ontimeout=function(){c(new(g().util.Error)(g().util.Error.Severity.RECOVERABLE,g().util.Error.Category.NETWORK,g().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(n.headers,f)){var h=f.toLowerCase();o.setRequestHeader(h,n.headers[f])}o.send(n.body)}));return new(g().util.AbortableOperation)(l,(function(){return o.abort(),Promise.resolve()}))}};function Ie(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 Ce=function(e){void 0===e&&(e=null);var t=g().net.HttpXHRPlugin.parse;e&&"function"==typeof e&&(t=Ae(e)),g().net.NetworkingEngine.registerScheme("http",t,g().net.NetworkingEngine.PluginPriority.APPLICATION,!0),g().net.NetworkingEngine.registerScheme("https",t,g().net.NetworkingEngine.PluginPriority.APPLICATION,!0),g().net.NetworkingEngine.registerScheme("blob",t,g().net.NetworkingEngine.PluginPriority.APPLICATION,!0)},Me=n(1384);function Re(e,t,n){var o,s,u,l=this,d={},f=null,p=null,m=(0,D.Z)(this,t.bandwidthEstimate),k=t.bitrateSelection;function U(){p.addEventListener("error",ne),p.addEventListener("trackschanged",ce),p.addEventListener("adaptation",(function(){l.pollAdaptation=!0})),p.addEventListener("emsg",B),(0,v.S6)(d,(function(e,t){n.addEventListener(t,e)})),(0,Me.Nm)(l,n),l.service.on("cues",be),m.start()}function B(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,c=t.messageData,d={metadataType:"emsg",id:i,schemeIdUri:a,timescale:o,presentationTimeOffset:s,duration:u,start:n,end:r},f=l.createCue(n,r,JSON.stringify(d));f.value=c,f._parsed=!0,l.addVTTCue({type:"metadata",cue:f},i+"_"+s+"_"+n+"_"+r)&&(delete d.metadataType,d.messageData=c,l.trigger(w.O1,{metadataType:"emsg",metadata:d}))}function V(e,n){return(0,T.ji)(e,t.qualityLabels,n)}function X(){p&&(p.removeEventListener("error",ne),p.removeEventListener("trackschanged",ce),p.removeEventListener("emsg",B)),(0,v.S6)(d,(function(e,t){n.removeEventListener(t,e)})),(0,Me.IP)(n),l.service&&l.service.off("cues",be),m.stop()}function Z(){if(f=null,X(),p){var e=p.getNetworkingEngine();e.clearAllRequestFilters(),e.clearAllResponseFilters(),p=null}if(l.service){var t=l.service.destroy();return l.service=null,t}}function ee(){l.seeking?l.setState(w.ik):l.state!==w.r0&&l.state!==w.ik||(l.stallTime=n.currentTime,l.setState(w.nQ))}function ne(e){if(!(n.src||n.played&&n.played.length))return l.destroy(),void(p=re(n));var t=e.detail?e.detail:e,i=function(e){var t=e.category,n=e.code,i=e.data,a=e.severity!==F,o=n===J,s=a?L:34e4,u=a?N.ul:null,l={key:u,code:s,fatal:a,changeLevel:o};if(!a)return l;if(we.has(n))return(0,r.Z)(l,{code:we.get(n)});if(n===W)s=241004;else if(n===Y){var d=(0,_.Z)(L,i[1],i[0]);s=d.code,u=d.key}else if(n===$){var f=(0,_.Z)(L,0,i[0]);s=f.code,u=f.key}else n===Q?(s=O,i[0]>1&&i[0]<5&&(s+=i[0]-1)):n===te?(u=N.zO,s=242632):c.Browser.ie&&e.message&&0===e.message.indexOf("Access is denied.")?s=241012:t===G?s=242600:t===H?s=P:t===K?s=O:t===q?s=249e3:t===z&&(s=j);return(0,r.Z)(l,{code:s,key:u})}(t),a=i.key,o=i.code,s=i.fatal,u=i.changeLevel;if(s){if(u){var d=function(){var e=(0,v._e)(l.shakaLevels,{active:!0});if(e)for(var t=0;t0&&n.currentTimek,i=!s||n.audioId!==s.audioId;k=n.bandwidth,p.selectVariantTrack(n,r||i)}var a=0===e;l.service.enableAbr(a),a||(l.pollAdaptation=!0)}}function le(e,t){void 0===t&&(t=!1);var n=l.audioTracks[e||pe()];if(n){var r=l.shakaAudioTracks[n.shakaIndex];r&&(s&&s.audioId===r.audioId&&!t||(l.service.enableAbr(!1),s=r,p.selectVariantTrack(r,!0),l.service.enableAbr(!0),ye(l.currentQuality)))}}function ce(){var e=p.getTextTracks();l._tracksById&&e.length===Object.keys(l._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,S.id)(t.language),t.source="currentTime",t})),l.addTextTracks(e));var t=p.getVariantTracks();t=t.map((function(e){return e.label||(e.label=(0,S.id)(e.language)),e}));var n=(0,v._e)(t,{active:!0}),r=(0,v.vM)(t,"language"),i=(0,v.vM)(t,"label"),a="video";if(l.tracksByLang=r,l.tracksByLabel=i,(0,v.dp)(r)&&n){Object.keys(i).length!==Object.keys(r).length?de(i[n.label]):de(r[n.language]);var o=0;if(!l.service.abrEnabled()){var s=l.service.getVariantHistory();if(s.length){var u=s[0].id,c=(0,v._e)(l.jwLevels,{shakaId:u});o=l.jwLevels.indexOf(c)}}l.currentQuality=Math.max(0,o),ue(l.currentQuality),l.trigger(w.UZ,{levels:l.jwLevels,currentQuality:l.currentQuality}),function(e,t){var n=(0,v.sE)(e[t],(function(e){return e.active})),r=[];Object.keys(e).forEach((function(i){i===t?r.push(n):r.push(e[i][0])})),Array.isArray(r)&&ge(r);l.trigger(w.j0,{tracks:l.audioTracks,currentTrack:l.currentAudioIndex})}(i,(0,S.id)(n.language)),le(l.currentAudioIndex,l.replay),n.mimeType.indexOf("audio")>-1&&(a="audio"),l.trigger(w.oZ,{mediaType:a})}}function de(e){l.shakaLevels=e,l.shakaLevels.sort((function(e,t){return e.height1&&l.jwLevels.unshift({label:"Auto",shakaId:"auto"})}function fe(){var e;return he(l.currentAudioIndex,l.audioTracks)?l.currentAudioIndex:(!(e=(0,v.sE)(l.audioTracks,(function(e){return e.defaulttrack&&"dv"!==e.language&&"und"!==e.language})))&&l.audioTracks&&(e=l.audioTracks[0]),e?e.shakaIndex:0)}function he(e,t){return(0,v.hj)(e)&&!(0,v.i2)(e)&&e>=0&&e<(0,v.dp)(t)}function pe(){return he(l.currentAudioIndex,l.audioTracks)?l.currentAudioIndex:-1}function ge(e){var t;Array.isArray(e)&&(l.shakaAudioTracks=e,l.audioTracks=(t=e).map((function(e,n){var r=e.language,i=(0,v.ar)(t,{language:r}).length>1,a=!!e.label&&(0,v.ar)(t,{label:e.label}).length>1,o=(0,S.id)(r);return"und"===r?o="Unknown":"dv"===r&&(o="Audio Description"),i&&!a?o=e.label?e.label:(0,S.id)(r):i&&a&&(o+=" ("+(0,T._T)(e.bandwidth)+" kbps)"),{autoselect:!1,defaulttrack:!!e.active,groupid:e.primary?"default":"",language:e.language,name:o,shakaIndex:n,shakaId:e.id}})),l.currentAudioIndex=fe())}function me(){l.livePausedItem=l.service.loadedItem,l.service.unload()}function ve(){X(),l.service&&(l.service.setLoadedItem(null),l.service.unload()),f=null}function ye(e){l.tracksByLabel&&l.tracksByLang&&l.audioTracks&&Object.keys(l.tracksByLabel).length!==Object.keys(l.tracksByLang).length?de(l.tracksByLabel[l.audioTracks[l.currentAudioIndex].name]):l.tracksByLang&&l.audioTracks&&de(l.tracksByLang[l.audioTracks[l.currentAudioIndex].language]),ue(e),l.currentQuality=e}function be(e){var t=p.getTextTracks(),n=l.getSubtitlesTrack();if(n<0){var r=(0,v._e)(t,{active:!0});n=(0,v.cq)(t,r)}var i=t[n];if(i){var a,o=(0,v._e)(l._tracksById,{id:i.id});a=o?o._id:i.kind+"s"+n,e.forEach((function(e){c.Browser.ie?e.align="middle":e.align="center",l.addVTTCue({type:i.kind+"s",cue:e,track:a})}))}return[]}l.video=n,l.drmUsed=null,l.position=0,l.levels=[],l.currentQuality=-1,l.supportsPlaybackRate=!0,l.service=null,l.adaptationId=-1,l.adaptationTs=-1,l.pollAdaptation=!1,l.livePausedItem=null,l.jwLevels=[],l.state=w.bc,(0,v.S6)(A.Z,(function(e,t){d[t]=e.bind(l)})),l.checkAdaptation=function(){var e=n.videoWidth,t=n.videoHeight,r=p.getStats(),i=r.width,a=r.height;l.shakaLevels||ce();var o=l.service.getVariantHistory(l.adaptationTs);if(o.length){var s=-1===l.adaptationTs,u=(0,v.sE)(l.jwLevels,(function(n){return o.some((function(r){var i=r.id===n.shakaId&&(n.width===e&&n.height===t||null===n.width);return i&&(l.adaptationTs=r.timestamp),i}))}));if(u&&u.shakaId!==l.adaptationId){l.adaptationId=u.shakaId,l.pollAdaptation=!1;var c=l.jwLevels.indexOf(u),d=u.label,f=u.bitrate,h=l.service.abrEnabled(),g=h?"auto":"manual",m=h?"auto":"api";s&&(m="initial choice"),l.trigger(w.ug,{level:{index:c,label:d,bitrate:f,width:i,height:a},bandwidth:r.estimatedBandwidth,mode:g,reason:m})}}else l.pollAdaptation=!1},(0,r.Z)(l,h.ZP,I.Z,C.Z,M.Z,{seeking:!1,eventsOn_:function(){p||(p=re(n)),U()},eventsOff_:function(){if(!o||!c.Browser.firefox)return Z();l.remove(),l.setContainer(l.container)},init:function(e){Ce(e.sources[0].onXhrOpen),l.playlistItem_&&e===l.playlistItem_?l.replay=!0:(l.currentAudioIndex=-1,l.replay=!1);l.playlistItem_=e,l.currentAudioIndex=fe(),l.adaptationId=-1,l.adaptationTs=-1},preload:function(e){var t="auto"===e.preload?a.i0:a.pR;p||(p=re(n));l.service.setMaxBuffer(t),X(),U(),f=ae(e)},load:function(e){X(),p&&n.src||(l.destroy(),p=re(n),l.service.setLoadedItem(null));if(U(),l.service.setMaxBuffer(a.i0),l.setState(w.ik),l.service.getLoadedItem()!==e)return l.adaptationId=-1,l.adaptationTs=-1,l.drmUsed=null,f=ae(e),n.play(),f;return ie(e.tracks),f},pause:function(){p&&p.isLive()&&!l.service.isDvr()&&!l.livePausedItem&&(me(),l.setState(w._5));n.pause()},getQualityLevels:function(){return(0,v.UI)(l.jwLevels,(function(e){return(0,i.Z)(e)}))},getCurrentQuality:function(){return l.currentQuality},getAudioTracks:function(){if(!Array.isArray(l.audioTracks))return[];return l.audioTracks},getCurrentAudioTrack:pe,play:function(){var e=l.livePausedItem;e&&(l.livePausedItem=null,l.load(e));return n.play()||(0,R.Z)(n)},seek:function(e){if(!l.service)return;var t=l.getSeekRange(),n=t.end,r=t.start,i=e<0?n-r+e:e,a=l.getDuration(),o=this.video.currentTime;if(l.trigger(w.NZ,{position:l.getCurrentTime(),offset:i,duration:a,currentTime:o,seekRange:t,metadata:{currentTime:o}}),l.seeking=!0,l.service.seek(e),0!==a&&a!==1/0&&(0,v.qh)(a)){var s=this.video.currentTime;l.trigger(w.R2,{position:l.getCurrentTime(),duration:a,currentTime:s,seekRange:t,metadata:{currentTime:s}})}},setCurrentQuality:function(e){he(e,l.jwLevels)&&e!==l.currentQuality&&(ye(e),l.trigger(w.aM,{currentQuality:e,levels:l.jwLevels}))},setAudioTracks:function(e){Array.isArray(e)&&(ge(e),l.trigger(w.j0,{tracks:l.audioTracks,currentTrack:l.currentAudioIndex}))},setCurrentAudioTrack:function(e){var t;he(e,l.audioTracks)&&(t=e,l.currentAudioIndex=t,he(t,l.audioTracks)&&le(l.currentAudioIndex,l.replay),l.trigger(w.j0,{tracks:l.audioTracks,currentTrack:e}),l.trigger(w._B,{tracks:l.audioTracks,currentTrack:e}))},setPlaybackRate:function(e){l.service&&l.service.setPlaybackRate(e)},getPlaybackRate:function(){return l.service?l.service.getPlaybackRate():1},isLive:function(){return!!l.service&&l.service.isLive()},getCurrentTime:function(){return l.service?l.service.getCurrentTime():0},getDuration:function(){return l.service?l.service.getDuration():0},getSeekRange:function(){return l.service?l.service.getSeekRange():{start:0,end:0}},getLiveLatency:function(){var e=null,t=this.service.getSeekRange().end;return l.isLive()&&t&&(e=t-n.currentTime),e},setVisibility:function(e){(e=!!e)?(0,x.oB)(l.container,{visibility:"visible",opacity:1}):(0,x.oB)(l.container,{visibility:"",opacity:0})},stop:function(){ve(),n.pause(),l.setState(w.bc)},setShakaPlayer:function(e){p=e},destroy:Z,supportsFullscreen:(0,v.a9)(!0),getName:(0,v.a9)({name:"shaka"}),renderNatively:(u=t.renderCaptionsNatively,c.Browser.chrome&&u),setSubtitlesTrack:function(e){M.Z.setSubtitlesTrack.call(l,e);var n=p.getTextTracks()[e-1];l.renderNatively||(l._currentTextTrackIndex=e-1),n&&(p.selectTextTrack(n),t.selectedCaptionCode=n.language),ye(l.currentQuality)},getBandwidthEstimate:function(){return p?p.getStats().estimatedBandwidth:null}}),d.loadeddata=function(){l.checkAdaptation(),[].forEach.call(n.textTracks,(function(e){if("Shaka Player TextTrack"===e.label)return e.inuse=!1,e.mode="hidden",void(e.embedded=!0)}))},d.timeupdate=function(){l.pollAdaptation&&l.checkAdaptation(),A.Z.timeupdate.call(l)},d.waiting=ee,d.ratechange=function(){if(0===n.playbackRate&&0!==n.defaultPlaybackRate){if(n.duration-n.currentTime<.4)return void A.Z.ended.call(l);ee()}else A.Z.ratechange.call(l)}}(0,r.Z)(Re.prototype,k.Z),Re.getName=(0,v.a9)({name:"shaka"});var De=Re},1123:function(e,t){ /* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ !function(){var e="undefined"!=typeof window?window:global,n={};if(function(e,t,n){var r;function i(e){var t=0;return function(){return t>>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;ni&&(i=Math.max(i+r,0));i=i}})),s("Array.prototype.keys",(function(e){return e||function(){return j(this,(function(e){return e}))}}));var U="function"==typeof Object.assign?Object.assign:function(e,t){for(var n=1;ne||1342177279>>=1)&&(t+=t);return n}})),s("Number.isNaN",(function(e){return e||function(e){return"number"==typeof e&&isNaN(e)}})),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} /* @license Shaka Player Copyright 2016 Google LLC SPDX-License-Identifier: Apache-2.0 */ function V(e){this.g=Math.exp(Math.log(.5)/e),this.i=this.h=0}function H(e,t,n){var r=Math.pow(e.g,t);n=n*(1-r)+r*e.h,isNaN(n)||(e.h=n,e.i+=t)}function K(e){return e.h/(1-Math.pow(e.g,e.i))}function G(){this.h=new V(2),this.j=new V(5),this.g=0,this.i=128e3,this.l=16e3}function q(){}function z(){}function X(){}function W(e,t){for(var n=[],r=1;rt)throw Error("Bad port number "+t);e.Ob=t}else e.Ob=null}function $e(e,t,n){t instanceof at?e.g=t:(n||(t=Je(t,rt)),e.g=new at(t))}function Ze(e,t){return e?t?decodeURI(e):decodeURIComponent(e):""}function Je(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).Ia="",r.xb="",r.Ka="",r.Ob=null,r.Aa="",r.lb="",r.toString=function(){var e=[],t=this.Ia;if(t&&e.push(Je(t,et,!0),":"),t=this.Ka){e.push("//");var n=this.xb;n&&e.push(Je(n,et,!0),"@"),e.push(encodeURIComponent(t).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(t=this.Ob)&&e.push(":",String(t))}return(t=this.Aa)&&(this.Ka&&"/"!=t.charAt(0)&&e.push("/"),e.push(Je(t,"/"==t.charAt(0)?nt:tt,!0))),(t=this.g.toString())&&e.push("?",t),(t=this.lb)&&e.push("#",Je(t,it)),e.join("")},r.resolve=function(e){var t=this.clone();"data"===t.Ia&&(t=new Xe);var n=!!e.Ia;n?We(t,e.Ia):n=!!e.xb,n?t.xb=e.xb:n=!!e.Ka,n?t.Ka=e.Ka:n=null!=e.Ob;var r=e.Aa;if(n)Ye(t,e.Ob);else if(n=!!e.Aa){if("/"!=r.charAt(0))if(this.Ka&&!this.Aa)r="/"+r;else{var i=t.Aa.lastIndexOf("/");-1!=i&&(r=t.Aa.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=n[e]}if(!e)return"";var n=Re(e);if(239==n[0]&&187==n[1]&&191==n[2])return vt(n);if(254==n[0]&&255==n[1])return yt(n.subarray(2),!1);if(255==n[0]&&254==n[1])return yt(n.subarray(2),!0);if(0==n[0]&&0==n[2])return yt(e,!1);if(0==n[1]&&0==n[3])return yt(e,!0);if(t(0)&&t(1)&&t(2)&&t(3))return vt(e);throw new qe(2,2,2003)}function Tt(e){return Me((new TextEncoder).encode(e))}function wt(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.ga,a.item.charCodeAt(0),t);return n}pt.prototype.resolve=function(){},pt.prototype.reject=function(){},gt.prototype.value=function(){return null==this.g&&(this.g=this.h()),this.g},F("shaka.util.StringUtils",mt),mt.resetFromCharCode=function(){xt.g=void 0},mt.toUTF16=wt,mt.toUTF8=Tt,mt.fromBytesAutoDetect=bt,mt.fromUTF16=yt,mt.fromUTF8=vt;var xt=new gt((function(){function e(e){try{var t=new Uint8Array(e);return 0>4).toString(16),i+=(15&o).toString(16),n=n.replace(r[0],i)}return n}function Lt(e,t){var n=e;return t&&(n+='; codecs="'+t+'"'),n}function Pt(e,t,n){return e=Lt(e,t),Ge.get("muxjs")()&&Nt(e)?_t(n,e):e}function Ot(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 Ut(e){this.u=null,this.i=e,this.j=this.F=0,this.l=1/0,this.h=this.g=null,this.s="",this.o=new Map}function Bt(e){return!(!Kt[e]&&"application/cea-608"!=e&&"application/cea-708"!=e)}function Ft(e,t,n){if(e.s=t,t=e.o.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 Vt(e,t,n){t.startTime+=n,t.endTime+=n;for(var r=(t=l(t.nestedCues)).next();!r.done;r=t.next())Vt(e,r.value,n)}function Ht(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,[]),Vt(e,u,i),u.startTime>=e.j&&u.startTime=n.h||(e<=n.g&&t>=n.h?n.g=n.h=null:e<=n.g&&tn.g&&t>=n.h&&(n.h=e)),w(r)}))},F("shaka.text.TextEngine",Ut),Ut.prototype.destroy=Ut.prototype.destroy,Ut.findParser=function(e){return Kt[e]},Ut.unregisterParser=function(e){delete Kt[e]},Ut.registerParser=function(e,t){Kt[e]=t};var Kt={};function Gt(){}function qt(e,t){return e=Wt(e),t=Wt(t),e.split("-")[0]==t.split("-")[0]}function zt(e,t){e=Wt(e),t=Wt(t);var n=e.split("-"),r=t.split("-");return n[0]==r[0]&&1==n.length&&2==r.length}function Xt(e,t){e=Wt(e),t=Wt(t);var n=e.split("-"),r=t.split("-");return 2==n.length&&2==r.length&&n[0]==r[0]}function Wt(e){var t=e.split("-");return e=t[0]||"",t=t[1]||"",e=e.toLowerCase(),e=Qt.get(e)||e,(t=t.toUpperCase())?e+"-"+t:e}function Yt(e,t){return e=Wt(e),(t=Wt(t))==e?4:zt(t,e)?3:Xt(t,e)?2:zt(e,t)?1:0}function $t(e){var t=e.indexOf("-");return e=(e=0<=t?e.substring(0,t):e).toLowerCase(),Qt.get(e)||e}function Zt(e){return e.language?Wt(e.language):e.audio&&e.audio.language?Wt(e.audio.language):e.video&&e.video.language?Wt(e.video.language):"und"}function Jt(e,t){for(var n=Wt(e),r=new Set,i=l(t),a=i.next();!a.done;a=i.next())r.add(Wt(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(zt(a=a.value,n))return a;for(a=(i=l(r)).next();!a.done;a=i.next())if(Xt(a=a.value,n))return a;for(a=(r=l(r)).next();!a.done;a=r.next())if(zt(n,a=a.value))return a;return null}F("shaka.util.LanguageUtils",Gt),Gt.findClosestLocale=Jt,Gt.getLocaleForVariant=Zt,Gt.getLocaleForText=function(e){return Wt(e.language||"und")},Gt.getBase=$t,Gt.relatedness=Yt,Gt.areSiblings=function(e,t){var n=$t(e),r=$t(t);return e!=n&&t!=r&&n==r},Gt.normalize=Wt,Gt.isSiblingOf=Xt,Gt.isParentOf=zt,Gt.areLanguageCompatible=qt,Gt.areLocaleCompatible=function(e,t){return(e=Wt(e))==(t=Wt(t))};var Qt=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 en(){this.g={}}function tn(e,t){for(var n in e.g)t(n,e.g[n])}function nn(e){this.h=e,this.g=null}function rn(e){this.h=e,this.g=null}function an(){return!(!e.MediaSource||!MediaSource.isTypeSupported)}function on(e){return""!=fn().canPlayType(e)}function sn(){return dn("Tizen")}function un(){return dn("CrKey")}function ln(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!sn()}function cn(){if(!ln())return null;var e=navigator.userAgent.match(/Version\/(\d+)/);return e||(e=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(e[1],10):null}function dn(e){return(navigator.userAgent||"").includes(e)}function fn(){return pn||(hn||(hn=new rn((function(){pn=null}))),(pn=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0])||(pn=document.createElement("video")),hn.W(1),pn)}(r=en.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)},nn.prototype.W=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},nn.prototype.stop=function(){this.g&&(this.g(),this.g=null)},rn.prototype.Sb=function(){return this.stop(),this.h(),this},rn.prototype.W=function(e){var t=this;return this.stop(),this.g=new nn((function(){t.h()})).W(e),this},rn.prototype.Fa=function(e){var t=this;return this.stop(),this.g=new nn((function(){t.g.W(e),t.h()})).W(e),this},rn.prototype.stop=function(){this.g&&(this.g.stop(),this.g=null)},F("shaka.util.Timer",rn),rn.prototype.stop=rn.prototype.stop,rn.prototype.tickEvery=rn.prototype.Fa,rn.prototype.tickAfter=rn.prototype.W,rn.prototype.tickNow=rn.prototype.Sb;var hn=null,pn=null;function gn(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={qd:r.qd},i=t.next())if(r.qd=i.value,i=e.filter(function(e){return function(t){return t.video&&t.video.codecs.startsWith(e.qd)}}(r)),i.length){e=i;break}for(r={},n=l(n),t=n.next();!t.done;r={bd:r.bd},t=n.next())if(r.bd=t.value,t=e.filter(function(e){return function(t){return t.audio&&t.audio.codecs.startsWith(e.bd)}}(r)),t.length){e=t;break}return e}(a,t,n)),t=function(e){for(var t=new en,n=(e=l(e)).next();!n.done;n=e.next()){var r=vn(n=n.value);t.push(r,n)}return t}(a=Pn(a,r)),t=function(e){var t=0,n=new Map,r=e.size();return tn(e,(function(e,i){for(var a=l(i),o=a.next();!o.done;o=a.next()){var s=(o=o.value).video;if(s&&s.width&&s.height){s=s.width*s.height*(s.frameRate||1),n.has(s)||n.set(s,new en);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)==Vn||r==Hn){if(1==(e=mn(e,r)).size())return e.keys()[0]}else if(r==Kn)break;return function(e){var t="",n=1/0;return tn(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?(r.g={},r.push(e,i),n=a):a==n&&r.push(e,i)})),r}function vn(e){var t="";e.video&&(t=Ot(e.video.codecs));var n="";return e.audio&&(n=Ot(e.audio.codecs)),t+"-"+n}function yn(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 bn(e,t){return _((function(n){if(1==n.g)return T(n,Tn(t,0=a*r.bandwidth/this.m.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(!(t=n.i))break e;this.s=!0}n=this.chooseVariant(),this.g.getBandwidthEstimate(qn(this)),n&&this.j(n)}},r.getBandwidthEstimate=function(){return this.g.getBandwidthEstimate(this.m.defaultBandwidthEstimate)},r.setVariants=function(e){this.h=e},r.playbackRateChanged=function(e){this.o=e},r.configure=function(e){this.m=e,this.g&&this.m&&this.g.configure(this.m.advanced)},F("shaka.abr.SimpleAbrManager",Gn),Gn.prototype.configure=Gn.prototype.configure,Gn.prototype.playbackRateChanged=Gn.prototype.playbackRateChanged,Gn.prototype.setVariants=Gn.prototype.setVariants,Gn.prototype.getBandwidthEstimate=Gn.prototype.getBandwidthEstimate,Gn.prototype.segmentDownloaded=Gn.prototype.segmentDownloaded,Gn.prototype.disable=Gn.prototype.disable,Gn.prototype.enable=Gn.prototype.enable,Gn.prototype.chooseVariant=Gn.prototype.chooseVariant,Gn.prototype.init=Gn.prototype.init,Gn.prototype.stop=Gn.prototype.stop,Xn.prototype.add=function(e){return!!Wn(this.h,e)&&(this.g.add(e),!0)},Xn.prototype.values=function(){return this.g.values()},Zn.prototype.create=function(e){var t=this,n=e.filter((function(e){return Wn(t.g,e)}));return n.length?new Xn(n[0],n):this.h.create(e)},Jn.prototype.create=function(e){var t=[];t=function(e,t){var n=Jt(Wt(t),e.map((function(e){return Zt(e)})));return n?e.filter((function(e){return n==Zt(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=Pn(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 Xn(t[0]),n=(t=l(t)).next();!n.done;n=t.next())n=n.value,Wn(e.h,n)&&e.add(n);return e};var tr=0,nr=1;function rr(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.o=null==e.backoffFactor?n.backoffFactor:e.backoffFactor,this.g=0,this.h=this.j,(this.i=void 0!==t&&t)&&(this.g=1)}function ir(e){var t,n;return _((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 rn(e).W(n/1e3)})),2))}e.h*=e.o,w(r)}))}function ar(e,t){this.promise=e,this.i=t,this.g=!1}function or(e){return new ar(Promise.reject(e),(function(){return Promise.resolve()}))}function sr(){var e=Promise.reject(new qe(2,7,7001));return e.catch((function(){})),new ar(e,(function(){return Promise.resolve()}))}function ur(e){return new ar(Promise.resolve(e),(function(){return Promise.resolve()}))}function lr(e){return new ar(e,(function(){return e.catch((function(){}))}))}function cr(e){return new ar(Promise.all(e.map((function(e){return e.promise}))),(function(){return Promise.all(e.map((function(e){return e.abort()})))}))}function dr(t,n){if(n)if(n instanceof Map)for(var r=l(n.keys()),i=r.next();!i.done;i=r.next())i=i.value,Object.defineProperty(this,i,{value:n.get(i),writable:!0,enumerable:!0});else for(r in 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 fr(e){var t,n=new dr(e.type);for(t in e)Object.defineProperty(n,t,{value:e[t],writable:!0,enumerable:!0});return n}function hr(){this.$=new en,this.Ec=this}function pr(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 gr(e){var t,n={};for(t in e)n[t]=e[t];return n}function mr(){this.g=[]}function vr(e,t){e.g.push(t.finally((function(){re(e.g,t)})))}function yr(e,t,n){hr.call(this),this.i=!1,this.o=new mr,this.g=new Set,this.h=new Set,this.l=e||null,this.j=t||null,this.u=n||null,this.s=!1}function br(e,t,n,r){n=n||kr;var i=Ar[e];(!i||n>=i.priority)&&(Ar[e]={priority:n,Rf:t,Tf:void 0!==r&&r})}function Tr(e,t,n){return{uris:e,method:"GET",body:null,headers:{},allowCrossSiteCredentials:!1,retryParameters:t,licenseRequestType:null,sessionId:null,streamDataCallback:void 0===n?null:n}}function wr(e,t,n,r,i,a,o){e.s&&(n.uris[i]=n.uris[i].replace("http://","https://"));var s=new Xe(n.uris[i]),u=s.Ia,l=!1;u||(We(s,u=(u=location.protocol).slice(0,-1)),n.uris[i]=s.toString()),u=u.toLowerCase();var c=(u=Ar[u])?u.Rf:null;if(!c)return or(new qe(2,1,1e3,s));var d,f=u.Tf,h=null,p=null,g=!1,m=!1;return lr(ir(r)).fa((function(){if(e.i)return sr();d=Date.now();var r=c(n.uris[i],n,t,(function(n,r,i){h&&h.stop(),p&&p.W(s/1e3),e.l&&t==Er&&(e.l(n,r),l=!0,o.g=i)}),(function(r){e.j&&e.j(r,n,t),m=!0}));if(!f)return r;var a=n.retryParameters.connectionTimeout;a&&(h=new rn((function(){g=!0,r.abort()}))).W(a/1e3);var s=n.retryParameters.stallTimeout;return s&&(p=new rn((function(){g=!0,r.abort()}))),r})).fa((function(r){h&&h.stop(),p&&p.stop(),null==r.timeMs&&(r.timeMs=Date.now()-d);var i={response:r,Gf:l};return!m&&e.j&&e.j(r.headers,n,t),i}),(function(s){if(h&&h.stop(),p&&p.stop(),e.u){var u=null,l=0;s instanceof qe&&(u=s,1001==s.code&&(l=s.data[1])),e.u(n,u,l,g)}if(e.i)return sr();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)return u=new dr("retry",u=(new Map).set("error",s)),e.dispatchEvent(u),i=(i+1)%n.uris.length,wr(e,t,n,r,i,s,o)}throw s}))}function xr(){this.g=0}function Sr(e,t,n){ar.call(this,e,t),this.h=n}ar.prototype.abort=function(){return this.g=!0,this.i()},ar.prototype.finally=function(e){return this.promise.then((function(){return e(!0)}),(function(){return e(!1)})),this},ar.prototype.fa=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 pt,o=new qe(2,7,7001);return this.promise.then(n(!0),n(!1)),new ar(a,(function(){return r()}))},F("shaka.util.AbortableOperation",ar),ar.prototype.chain=ar.prototype.fa,ar.prototype.finally=ar.prototype.finally,ar.all=cr,ar.prototype.abort=ar.prototype.abort,ar.notAbortable=lr,ar.completed=ur,ar.aborted=sr,ar.failed=or,dr.prototype.preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)},dr.prototype.stopImmediatePropagation=function(){this.g=!0},dr.prototype.stopPropagation=function(){},F("shaka.util.FakeEvent",dr),hr.prototype.addEventListener=function(e,t){this.$&&this.$.push(e,t)},hr.prototype.removeEventListener=function(e,t){this.$&&this.$.remove(e,t)},hr.prototype.dispatchEvent=function(e){if(!this.$)return!0;var t=this.$.get(e.type)||[],n=this.$.get("All");for(n&&(t=t.concat(n)),n=(t=l(t)).next();!n.done;n=t.next()){n=n.value,e.target=this.Ec,e.currentTarget=this.Ec;try{n.handleEvent?n.handleEvent(e):n.call(this,e)}catch(e){}if(e.g)break}return e.defaultPrevented},hr.prototype.release=function(){this.$=null},mr.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(yr,hr),(r=yr.prototype).Xd=function(e){this.s=e},r.Uf=function(e){this.g.add(e)},r.kg=function(e){this.g.delete(e)},r.Xe=function(){this.g.clear()},r.Vf=function(e){this.h.add(e)},r.lg=function(e){this.h.delete(e)},r.Ye=function(){this.h.clear()},r.destroy=function(){return this.i=!0,this.g.clear(),this.h.clear(),hr.prototype.release.call(this),this.o.destroy()},r.request=function(e,t){var n=this,r=new xr;if(this.i){var i=Promise.reject(new qe(2,7,7001));return i.catch((function(){})),new Sr(i,(function(){return Promise.resolve()}),r)}t.method=t.method||"GET",t.headers=t.headers||{},t.retryParameters=t.retryParameters?pr(t.retryParameters):{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4},t.uris=pr(t.uris),i=function(e,t,n){for(var r=ur(void 0),i={},a=(e=l(e.g)).next();!a.done;i={ld:i.ld},a=e.next())i.ld=a.value,r=r.fa(function(e){return function(){return n.body&&(n.body=Me(n.body)),e.ld(t,n)}}(i));return r.fa(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.fa((function(){return wr(n,e,t,new rr(t.retryParameters,!1),0,null,r)})),o=a.fa((function(t){return function(e,t,n){for(var r=ur(void 0),i={},a=(e=l(e.h)).next();!a.done;i={md:i.md},a=e.next())i.md=a.value,r=r.fa(function(e){return function(){var r=n.response;return r.data&&(r.data=Me(r.data)),e.md(t,r)}}(i));return r.fa((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.fa((function(t){var r=Date.now()-c,i=t.response;return i.timeMs+=u,i.timeMs+=r,t.Gf||!n.l||i.fromCache||e!=Er||n.l(i.timeMs,i.data.byteLength),i}),(function(e){throw e&&(e.severity=2),e}));return i=new Sr(d.promise,(function(){return d.abort()}),r),vr(this.o,i),i},F("shaka.net.NetworkingEngine",yr),yr.prototype.request=yr.prototype.request,yr.prototype.destroy=yr.prototype.destroy,yr.makeRequest=Tr,yr.defaultRetryParameters=function(){return{maxAttempts:2,baseDelay:1e3,backoffFactor:2,fuzzFactor:.5,timeout:3e4,stallTimeout:5e3,connectionTimeout:1e4}},yr.prototype.clearAllResponseFilters=yr.prototype.Ye,yr.prototype.unregisterResponseFilter=yr.prototype.lg,yr.prototype.registerResponseFilter=yr.prototype.Vf,yr.prototype.clearAllRequestFilters=yr.prototype.Xe,yr.prototype.unregisterRequestFilter=yr.prototype.kg,yr.prototype.registerRequestFilter=yr.prototype.Uf,yr.unregisterScheme=function(e){delete Ar[e]},yr.registerScheme=br,yr.prototype.setForceHTTPS=yr.prototype.Xd,yr.NumBytesRemainingClass=xr,m(Sr,ar),yr.PendingRequest=Sr;var Er=1;yr.RequestType={MANIFEST:0,SEGMENT:Er,LICENSE:2,APP:3,TIMING:4,SERVER_CERTIFICATE:5};var kr=3;yr.PluginPriority={FALLBACK:1,PREFERRED:2,APPLICATION:kr};var Ar={};function Ir(e){this.g=!1,this.h=new pt,this.i=e}function Cr(e,t){if(e.g){if(t instanceof qe&&7003==t.code)throw t;throw new qe(2,7,7003,t)}}function Mr(){this.g=new en}function Rr(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=Dr;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}Dr=t}return t||!1}(e)?t:t.capture||!1}(e,r),this.target.addEventListener(t,n,this.g)}Ir.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=Mr.prototype).release=function(){this.vb(),this.g=null},r.C=function(e,t,n,r){this.g&&(e=new Rr(e,t,n,r),this.g.push(t,e))},r.ya=function(e,t,n,r){var i=this;this.C(e,t,(function r(a){i.Ga(e,t,r),n(a)}),r)},r.Ga=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.Ga(),this.g.remove(t,i))},r.vb=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.Ga();this.g.g={}}},F("shaka.util.EventManager",Mr),Mr.prototype.removeAll=Mr.prototype.vb,Mr.prototype.unlisten=Mr.prototype.Ga,Mr.prototype.listenOnce=Mr.prototype.ya,Mr.prototype.listen=Mr.prototype.C,Mr.prototype.release=Mr.prototype.release,Rr.prototype.Ga=function(){this.target.removeEventListener(this.type,this.listener,this.g),this.listener=this.target=null,this.g=!1};var Dr=void 0;function Nr(){}function _r(e){return new Xe(e=bt(e)).Ka}function Lr(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?wt(t,!0):t,e=wt(e=bt(e),!0);var a=new Uint8Array(12+e.byteLength+i.byteLength+n.byteLength),o=0;return r(e),r(i),r(n),a}function Pr(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 Or(e){var t={};return e.forEach((function(e,n){t[n]=e})),t}function jr(e,t){if(!e&&!t)return!0;if(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 Ur(e,t){var n=this;t=void 0===t?1:t,this.B=e,this.F=new Set,this.g=this.o=null,this.na=this.$=!1,this.G=0,this.i=null,this.h=new Mr,this.j=new Map,this.u=[],this.s=new pt,this.m=null,this.l=function(t){n.s.reject(t),e.onError(t)},this.oa=new Map,this.da=new Map,this.P=new rn((function(){return function(e){var t=e.oa,n=e.da;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.B.Tc(Or(n))}(n)})),this.J=!1,this.I=[],this.M=!1,this.ma=new rn((function(){!function(e){e.j.forEach((function(t,n){var r=t.Nd,i=n.expiration;isNaN(i)&&(i=1/0),i!=r&&(e.B.onExpirationUpdated(n.sessionId,i),t.Nd=i)}))}(n)})).Fa(t),this.s.catch((function(){})),this.K=new Ir((function(){return function(e){return _((function(t){switch(t.g){case 1:return e.h.release(),e.h=null,e.s.reject(),e.ma.stop(),e.ma=null,e.P.stop(),e.P=null,T(t,Zr(e),2);case 2:if(!e.g){t.A(3);break}return x(t,4),T(t,e.g.setMediaKeys(null),6);case 6:E(t,5);break;case 4:k(t);case 5:e.g=null;case 3:e.i=null,e.F.clear(),e.o=null,e.u=[],e.m=null,e.l=function(){},e.B=null,e.S=!1,w(t)}}))}(n)})),this.S=!1}function Br(e,t,n){return e.u=n,e.J=0r&&(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 Gr(e){return!!e&&!!e.match(/^com\.(microsoft|chromecast)\.playready/)}function qr(e){return e=Q(e=e.j.keys(),(function(e){return e.sessionId})),Array.from(e)}function zr(e,t,n){var r,i,a,o,s,u,c,d,f,h,p,g,m;return _((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(Qr(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.m.preferredKeySystems),i=e.next();!i.done;r={jd:r.jd},i=e.next())for(r.jd=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.jd}}(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.A(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 _((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.m.preferredKeySystems),s=o.next();case 2:if(s.done){y.A(4);break}if(u=s.value,!t.has(u)){y.A(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:Cr(e.K);case 3:s=o.next(),y.A(2);break;case 4:d=l([!0,!1]),f=d.next();case 9:if(f.done){y.A(11);break}h=f.value,p=l(t.keys()),s=p.next();case 12:if(s.done){f=d.next(),y.A(9);break}if(g=s.value,m=t.get(g),v=m.drmInfos.some((function(e){return!!e.licenseServerUri})),v!=h){y.A(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:Cr(e.K);case 13:s=p.next(),y.A(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(Cr(e.K),x(v,4),e.F.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.F.add(f.contentType.toLowerCase());for(h=l(u),d=h.next();!d.done;d=h.next())p=d.value,e.F.add(p.contentType.toLowerCase());if(n.length){var y=a.keySystem,b=r.get(a.keySystem),w=[],S=[],A=[],I=[],C=new Set;ti(b,w,A,S,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:S[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=[],S=[],A=[],I=[],C=new Set,ti(y.drmInfos,w,A,S,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:S[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,Cr(e.K),e.o=g,e.$=!0,T(v,Vr(e),7);case 7:Cr(e.K),E(v,0);break;case 4:if(m=k(v),Cr(e.K,m),e.i=null,e.F.clear(),m instanceof qe)throw m;throw new qe(2,6,6002,m.message)}}))}function Xr(e,t){var n,r,i,a,o;return _((function(s){switch(s.g){case 1:try{n=e.o.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.C(n,"message",(function(t){e.g&&e.m.delayLicenseRequestUntilPlayed&&e.g.paused&&!e.M?e.I.push(t):Yr(e,t)})),e.h.C(n,"keystatuseschange",(function(t){return $r(e,t)})),i={initData:null,loaded:!1,Nd:1/0,Oa:null,type:"persistent-license"},e.j.set(n,i),x(s,2),T(s,n.load(t),4);case 4:return a=s.h,Cr(e.K),a?(i.loaded=!0,ei(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),Cr(e.K,o),e.j.delete(n),e.l(new qe(2,6,6005,o.message));case 3:return s.return(Promise.resolve())}}))}function Wr(e,t,n){return"skd"==t&&(t=n.serverCertificate,e=Lr(e,n=_r(e),t)),e}function Yr(e,t){var n,r,i,a,o,s,u,c,d,f,h,p;_((function(g){switch(g.g){case 1:return n=t.target,e.m.logLicenseExchange&&kt(t.message),r=e.j.get(n),i=e.i.licenseServerUri,a=e.m.advanced[e.i.keySystem],"individualization-request"==t.messageType&&a&&a.individualizationServer&&(i=a.individualizationServer),(o=Tr([i],e.m.retryParameters)).body=t.message,o.method="POST",o.licenseRequestType=t.messageType,o.sessionId=n.sessionId,Gr(e.i.keySystem)&&function(e){var t=yt(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=At(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.B.sb.request(2,o).promise,4);case 4:u=g.h,E(g,3);break;case 2:return c=k(g),d=new qe(2,6,6007,c),e.l(d),r&&r.Oa&&r.Oa.reject(d),g.return();case 3:return e.K.g?g.return():(e.G+=(Date.now()-s)/1e3,e.m.logLicenseExchange&&kt(u.data),x(g,5),T(g,n.update(u.data),7));case 7:E(g,6);break;case 5:return f=k(g),h=new qe(2,6,6008,f.message),e.l(h),r&&r.Oa&&r.Oa.reject(h),g.return();case 6:p=new dr("drmsessionupdate"),e.B.onEvent(p),r&&(r.Oa&&r.Oa.resolve(),new rn((function(){r.loaded=!0,ei(e)&&e.s.resolve()})).W(ii)),w(g)}}))}function $r(e,t){var n=t.target,r=e.j.get(n),i=!1;n.keyStatuses.forEach((function(t,n){if("string"==typeof n){var a=n;n=t,t=a}if(Gr(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=Ct(n),e.oa.set(a,t)}));var a=n.expiration-Date.now();(0>a||i&&1e3>a)&&r&&!r.Oa&&(e.j.delete(n),n.close().catch((function(){}))),ei(e)&&(e.s.resolve(),e.P.W(ai))}function Zr(e){var t;return _((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 _((function(t){return 1==t.g?(x(t,2),e.na||e.u.includes(n.sessionId)||"persistent-license"!==r.type?T(t,function(e){var t;return _((function(n){return 1==n.g?(t=new Promise((function(e,t){new rn(t).W(ri)})),x(n,2),T(n,Promise.race([Promise.all([e.close(),e.closed]),t]),4)):2!=n.g?E(n,0):(k(n),void w(n))}))}(n),5):T(t,n.remove(),5)):2!=t.g?E(t,0):(k(t),void w(t))}))}))),0)}))}function Jr(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={},o=l(t),s=o.next();!s.done;a={Ha:a.Ha},s=o.next())if(s=s.value,i.keySystem==s.keySystem){a.Ha=[],a.Ha=a.Ha.concat(i.initData||[]),a.Ha=a.Ha.concat(s.initData||[]),a.Ha=a.Ha.filter(function(e){return function(t,n){return void 0===t.keyId||n===e.Ha.findIndex((function(e){return e.keyId===t.keyId}))}}(a)),o=i.keyIds&&s.keyIds?new Set([].concat(c(i.keyIds),c(s.keyIds))):i.keyIds||s.keyIds,n.push({keySystem:i.keySystem,licenseServerUri:i.licenseServerUri||s.licenseServerUri,distinctiveIdentifierRequired:i.distinctiveIdentifierRequired||s.distinctiveIdentifierRequired,persistentStateRequired:i.persistentStateRequired||s.persistentStateRequired,videoRobustness:i.videoRobustness||s.videoRobustness,audioRobustness:i.audioRobustness||s.audioRobustness,serverCertificate:i.serverCertificate||s.serverCertificate,serverCertificateUri:i.serverCertificateUri||s.serverCertificateUri,initData:a.Ha,keyIds:o});break}}return n}function Qr(e){return(e.video?e.video.drmInfos:[]).concat(e.audio?e.audio.drmInfos:[])}function ei(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 ti(e,t,n,r,i,a){for(var o={},s=(e=l(e)).next();!s.done;o={ta:o.ta},s=e.next()){if(o.ta=s.value,t.includes(o.ta.licenseServerUri)||t.push(o.ta.licenseServerUri),r.includes(o.ta.serverCertificateUri)||r.push(o.ta.serverCertificateUri),o.ta.serverCertificate&&(n.some(function(e){return function(t){return Ie(t,e.ta.serverCertificate)}}(o))||n.push(o.ta.serverCertificate)),o.ta.initData){s={};for(var u=l(o.ta.initData),c=u.next();!c.done;s={zc:s.zc},c=u.next())s.zc=c.value,i.some(function(e){return function(t){var n=e.zc;return!(!t.keyId||t.keyId!=n.keyId)||t.initDataType==n.initDataType&&Ie(t.initData,n.initData)}}(s))||i.push(s.zc)}if(o.ta.keyIds)for(u=(s=l(o.ta.keyIds)).next();!u.done;u=s.next())a.add(u.value)}}function ni(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",Nr),Nr.initDataTransform=Lr,Nr.defaultGetContentId=_r,(r=Ur.prototype).destroy=function(){return this.K.destroy()},r.configure=function(e){this.m=e},r.bc=function(e){var t,n=this;return _((function(r){if(1==r.g)return n.o?(n.g=e,n.h.ya(n.g,"play",(function(){for(var e=l(n.I),t=e.next();!t.done;t=e.next())Yr(n,t.value);n.M=!0,n.I=[]})),"webkitCurrentPlaybackTargetIsWireless"in n.g&&n.h.C(n.g,"webkitcurrentplaybacktargetiswirelesschanged",(function(){return Zr(n)})),T(r,n.g.setMediaKeys(n.o).catch((function(e){return Promise.reject(new qe(2,6,6003,e.message))})),2)):(n.h.ya(e,"encrypted",(function(){n.l(new qe(2,6,6010))})),r.return());Cr(n.K),Hr(n),n.i.initData.length||n.u.length||(t=function(e){return Kr(n,e.initDataType,Re(e.initData))},n.h.C(n.g,"encrypted",t)),w(r)}))},r.fc=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.Mc=function(){return Or(this.da)};var ri=1,ii=5,ai=.5,oi=new gt((function(){return Me(new Uint8Array([0]))}));function si(){}function ui(e,t,n,r){var i,a,o,s;return _((function(u){if(1==u.g)return r&&(i=di[r.toLowerCase()])?u.return(i):(a=ci(e))&&(o=fi[a])?u.return(o):r?u.A(2):T(u,li(e,t,n),3);if(2!=u.g&&(r=u.h)&&(s=di[r]))return u.return(s);throw new qe(2,4,4e3,e)}))}function li(e,t,n){var r,i,a;return _((function(o){return 1==o.g?((r=Tr([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 ci(e){return 1==(e=new Xe(e).Aa.split("/").pop().split(".")).length?"":e.pop().toLowerCase()}F("shaka.media.ManifestParser",si),si.unregisterParserByMime=function(e){delete di[e]},si.registerParserByMime=function(e,t){di[e]=t},si.registerParserByExtension=function(e,t){fi[e]=t};var di={},fi={};function hi(e,t){this.T=De(e),this.h=t==gi,this.g=0}function pi(){return new qe(2,3,3e3)}(r=hi.prototype).qa=function(){return this.gthis.T.byteLength)throw pi();var t=Re(this.T,this.g,e);return this.g+=e,t},r.skip=function(e){if(this.g+e>this.T.byteLength)throw pi();this.g+=e},r.Be=function(e){if(this.ge||e>this.T.byteLength)throw pi();this.g=e},r.qc=function(){for(var e=this.g;this.qa()&&0!=this.T.getUint8(this.g);)this.g+=1;return e=Re(this.T,e,this.g-e),this.g+=1,vt(e)},F("shaka.util.DataViewReader",hi),hi.prototype.readTerminatedString=hi.prototype.qc,hi.prototype.seek=hi.prototype.seek,hi.prototype.rewind=hi.prototype.Be,hi.prototype.skip=hi.prototype.skip,hi.prototype.readBytes=hi.prototype.hb,hi.prototype.readUint64=hi.prototype.Qb,hi.prototype.readInt32=hi.prototype.ze,hi.prototype.readUint32=hi.prototype.O,hi.prototype.readUint16=hi.prototype.Pb,hi.prototype.readUint8=hi.prototype.ca,hi.prototype.getLength=hi.prototype.lf,hi.prototype.getPosition=hi.prototype.ba,hi.prototype.hasMoreData=hi.prototype.qa;var gi=1;function mi(){this.i=[],this.h=[],this.g=!1}function vi(e){for(var t=xi(e);e.reader.qa()&&!e.parser.g;)e.parser.Vc(e.start+t,e.reader,e.partialOkay)}function yi(e){for(var t=xi(e),n=e.reader.O(),r=(n=l(ee(n))).next();!r.done&&(e.parser.Vc(e.start+t,e.reader,e.partialOkay),!e.parser.g);r=n.next());}function bi(e){return function(t){e(t.reader.hb(t.reader.T.byteLength-t.reader.ba()))}}function Ti(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 wi(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function xi(e){return 8+(e.has64BitSize?8:0)+(null!=e.flags?4:0)}hi.Endianness={BIG_ENDIAN:0,LITTLE_ENDIAN:gi},(r=mi.prototype).box=function(e,t){var n=Ti(e);return this.i[n]=Si,this.h[n]=t,this},r.V=function(e,t){var n=Ti(e);return this.i[n]=Ei,this.h[n]=t,this},r.stop=function(){this.g=!0},r.parse=function(e,t,n){for(e=new hi(e,0),this.g=!1;e.qa()&&!this.g;)this.Vc(0,e,t,n)},r.Vc=function(e,t,n,r){var i=t.ba();if(r&&i+8>t.T.byteLength)this.g=!0;else{var a=t.O(),o=t.O(),s=!1;switch(a){case 0:a=t.T.byteLength-i;break;case 1:if(r&&t.ba()+8>t.T.byteLength)return void(this.g=!0);a=t.Qb(),s=!0}var u=this.h[o];if(u){var l=null,c=null;if(this.i[o]==Ei){if(r&&t.ba()+4>t.T.byteLength)return void(this.g=!0);l=(c=t.O())>>>24,c&=16777215}o=i+a,n&&o>t.T.byteLength&&(o=t.T.byteLength),r&&o>t.T.byteLength?this.g=!0:(r=o-t.ba(),u({parser:this,partialOkay:n||!1,version:l,flags:c,reader:t=new hi(t=0>32),e.setUint32(12,4294967295&n)):e.setUint32(0,n))}var Ii=new gt((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 Ci(e,t,n,r,i){if(r>=i)return null;for(var a=-1,o=-1,s=0;sn||127=n)for(--r;0<=r;r--)e.i[t+r]=e.i[n+r].map((function(e){return e}));else for(var i=0;it;t++)e.i.push(ia())}function ia(){for(var e=[],t=0;42>t;t++)e.push(null);return e}function aa(e,t){oa(e)&&(e.i[e.h][e.g]=new Di(t,e.F,e.s,e.o,e.u),e.g++)}function oa(e){var t=e.g=n)r=7&n,e.h[r]&&(e.g=e.h[r]);else{if(136===n){n=pa(t).value,t=null;for(var i=(n=l(va(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=sa(i,r,e.i)),ra(i);return t}if(137===n)for(t=pa(t).value,n=(t=l(va(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=pa(t).value,t=null,i=(n=l(va(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()&&(t=sa(i,r,e.i)),i.l=!1;return t}if(139===n){for(n=pa(t).value,t=null,i=(n=l(va(e,n))).next();!i.done;i=n.next())(i=e.h[i.value]).isVisible()?t=sa(i,r,e.i):i.j=r,i.l=!i.l;return t}if(140===n)return ya(e,t=pa(t).value,r);if(143===n)return r=ya(e,255,r),ba(e),r;if(144===n)t.skip(1),r=pa(t).value,e.g&&(e.g.s=0<(128&r),e.g.F=0<(64&r));else if(145===n)r=pa(t).value,n=pa(t).value,t.skip(1),e.g&&(t=Ta((48&n)>>4,(12&n)>>2,3&n),e.g.u=Ta((48&r)>>4,(12&r)>>2,3&r),e.g.o=t);else if(146===n)r=pa(t).value,t=pa(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=pa(t).value,t.skip(1),e.g&&(e.g.I=3&r);else if(152<=n&&159>=n){if(n=(15&n)-8,!(i=null!==e.h[n])){var a=new na;a.j=r,e.h[n]=a}r=pa(t).value,pa(t),pa(t),a=pa(t).value;var o=pa(t).value;t=pa(t).value,i&&0==(7&t)||((t=e.h[n]).h=0,t.g=0,t.F=!1,t.s=!1,t.u="white",t.o="black"),(t=e.h[n]).l=0<(32&r),t.J=1+(15&a),t.G=1+(63&o),e.g=e.h[n]}}}return null}ha.prototype.qa=function(){return this.gthis.h.length)throw new qe(2,2,3e3);this.g+=e};var va=function e(t,n){var r;return N(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.A(5):e.A(0):(n>>=1,r++,e.A(2))}))};function ya(e,t,n){for(var r=null,i=(t=l(va(e,t))).next();!i.done;i=t.next()){i=i.value;var a=e.h[i];a.isVisible()&&(r=sa(a,n,e.i)),e.h[i]=null}return r}function ba(e){e.g=null,e.h=[null,null,null,null,null,null,null,null]}function Ta(e,t,n){var r={0:0,1:0,2:1,3:1};return xa[(e=r[e])<<2|(t=r[t])<<1|(n=r[n])]}var wa=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,"┌"]]),xa="black blue green cyan red magenta yellow white".split(" ");function Sa(){this.h=[],this.g=[],this.i=new da,this.l=0,this.u=new Map([["CC1",new zi(0,0)],["CC2",new zi(0,1)],["CC3",new zi(1,0)],["CC4",new zi(1,1)]]),this.s=this.o=0,this.j=new Map,Ea(this)}function Ea(e){e.o=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.o=null,Li(t.i),Li(t.l),Li(t.s)}function ka(e,t){var n=t.type;if(16==(112&t.Ca)){var r=t.Ca>>3&1;0===n?e.o=r:e.s=r}if(n=e.u.get("CC"+(n<<1|(n?e.s:e.o)+1)),255===t.Ca&&255===t.Va||!t.Ca&&!t.Va||!Ia(t.Ca)||!Ia(t.Va))return 45<=++e.l&&Ea(e),null;if(e.l=0,t.Ca&=127,t.Va&=127,!t.Ca&&!t.Va)return null;if(r=null,16==(112&t.Ca))e:{var i=t.Ca;if(r=t.Va,n.o===(i<<8|r))n.o=null;else if(n.o=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=ta[a]:7===a&&(s=!0),r=1==(1&r),n.h!==Qi){if(a=n.g,n.h===Ji&&i!==a.g){var u=1+i-a.h;Oi(a,u,1+a.g-a.h,a.h),ji(a,0,u-1),ji(a,i+1,15-i)}a.g=i,n.g.o=r,n.g.j=s,n.g.l=o,n.g.s="black"}}else if(17==(247&i)&&32==(240&r))n.g.o=!1,n.g.j=!1,n.g.l="white",Pi(n.g,Ui,32),o=!1,"white_italics"===(i=ta[(14&r)>>1])&&(i="white",o=!0),n.g.o=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=ea[(14&r)>>1]),n.g.s=o;else if(17==(247&i)&&48==(240&r))Pi(n.g,Bi,r);else if(18==(246&i)&&32==(224&r))Pi(n.g,1&i?Vi:Fi,r);else if(20==(246&i)&&32==(240&r)){switch(r=t.pts,i=null,t.Va){case 32:Wi(n);break;case 33:(n=n.g).i[n.g].pop();break;case 37:i=Xi(n,2,r);break;case 38:i=Xi(n,3,r);break;case 39:i=Xi(n,4,r);break;case 40:Pi(n.g,Ui,32);break;case 41:n.h=2,n.g=n.i,n.g.h=0,n.j=r;break;case 42:Li(n.s),Yi(n);break;case 43:Yi(n);break;case 44:i=n.i,o=null,n.h!==Qi&&(o=_i(i,n.j,r)),ji(i,0,15),i=o;break;case 45:i=n.g,n.h!==Ji?i=null:(o=_i(i,n.j,r),Oi(i,(s=i.g-i.h+1)-1,s,i.h),ji(i,0,s-1),ji(i,i.g,15-i.g),n.j=r,i=o);break;case 46:ji(n.l,0,15);break;case 47:i=null,n.h!==Qi&&(i=_i(n.i,n.j,r)),o=n.l,n.l=n.i,n.i=o,Wi(n),n.j=r}r=i;break e}r=null}else i=t.Va,Pi(n.g,Ui,t.Ca),Pi(n.g,Ui,i);return r}function Aa(e,t){var n=[];try{for(;t.qa();){var r=pa(t).value,i=(224&r)>>5,a=31&r;if(7===i&&0!=a&&(i=63&pa(t).value),0!=i){e.j.has(i)||e.j.set(i,new ga(i));for(var o=e.j.get(i),s=t.ba();t.ba()-s=l){var d=c;if(o.g){var f=o.g;switch(i=null,l){case 8:!oa(f)||0>=f.g&&0>=f.h||(0>=f.g?(f.g=f.G-1,f.h--):f.g--,f.i[f.h][f.g]=null);break;case 13:if(f.isVisible()&&(i=sa(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]=ia()}else f.h++;f.g=0;break;case 14:f.isVisible()&&(i=sa(f,d,o.i)),f.i[f.h]=ia(),f.g=0;break;case 12:f.isVisible()&&(i=sa(f,d,o.i)),ra(f),(d=f).h=0,d.g=0}var g=i}else g=null}else if(128<=l&&159>=l)g=ma(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&&aa(o.g,127===i?"♪":String.fromCharCode(i));else if(160<=l&&255>=l)o.g&&aa(o.g,String.fromCharCode(l));else if(4128<=l&&4223>=l){if(i=255&l,o.g)if(wa.has(i)){var m=wa.get(i);aa(o.g,m)}else aa(o.g,"_")}else 4256<=l&&4351>=l&&o.g&&aa(o.g,160!=(255&l)?"_":"[CC]");g=null}(i=g)&&n.push(i)}}}}catch(e){if(!(e instanceof qe&&3e3===e.code))throw e;W("CEA708_INVALID_DATA","Buffer read out of bounds / invalid CEA-708 Data.")}return n}function Ia(e){for(var t=0;e;)t^=1&e,e>>=1;return 1===t}function Ca(){}var Ma=function e(t,n){var r,i,a,o;return N(e,(function(e){if(1==e.g){for(var t=n,s=0,u=0;u>2,f=a.ca(),h=a.ca();d&&(0===(u&=3)||1===u?r.h.push({pts:i,type:u,Ca:f,Va: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=ka(e,i.value))&&n.push(i);for(i=(r=l(e.g)).next();!i.done;i=r.next())fa(e.i,i.value);for(i=(r=l(e.i.i)).next();!i.done;i=r.next())i=Aa(e,i.value),n.push.apply(n,c(i));return e.i.i=[],e.h=[],e.g=[],n}(e.g)}function ja(e){return!e||1==e.length&&1e-6>e.end(0)-e.start(0)?null:e.length?e.end(e.length-1):null}function Ua(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 Ba(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(Fa(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 Fa(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 Va(e,t,n,r){var i=this;this.g=e,this.o=n,this.j={},this.J={},this.i=null,this.M=r||function(){},this.l={},this.h=new Mr,this.u={},this.F=t,this.G=new pt,this.s=function(e,t){var n=new MediaSource;return e.h.ya(n,"sourceopen",(function(){URL.revokeObjectURL(e.I),t.resolve()})),e.I=to(n),e.g.src=e.I,n}(this,this.G),this.K=new Ir((function(){return function(e){var t,n,r,i,a,o,s;return _((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.o&&t.push(e.o.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.o=null,e.j={},e.u={},e.F=null,e.l={},w(u)}))}(i)})),this.I=""}function Ha(e,t){e.i||(e.i=new Ut(e.o)),"application/cea-608"!=t&&"application/cea-708"!=t&&(e.i.u=Ve(Kt[t]))}function Ka(e){return!e.s||"ended"==e.s.readyState}function Ga(e,t){if(t==dt)var n=e.i.g;else n=!(n=za(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 qa(e,t){return t==dt?e.i.h:ja(za(e,t))}function za(e,t){try{return e.j[t].buffered}catch(e){return null}}function Xa(e,t,n,r,i,a){var o,s,u,c,d,f,h,p;return _((function(g){return 1==g.g?t==(o=ft).ea?T(g,function(e,t,n,r){var i,a,o;return _((function(s){return 1==s.g?T(s,Promise.resolve(),2):e.u&&e.i?null==n||null==r?(e.u.parseInit(Re(t)),s.return()):(i={periodStart:e.F,segmentStart:n,segmentEnd:r},a=e.u.parseMedia(Re(t),i),o=a.filter((function(t){return t.startTime>=e.j&&t.startTime=n?Ya(e,t):e.j[t].remove(0,n)})),0)}))}function Ya(e,t){var n=e.l[t][0];n&&(n.p.resolve(),Ja(e,t))}function $a(e,t,n){return Cr(e.K),n={start:n,p:new pt},e.l[t].push(n),1==e.l[t].length&&Qa(e,t),n.p}function Za(e,t){var n,r,i,a,o;return _((function(s){switch(s.g){case 1:for(i in Cr(e.K),n=[],r={},e.j)r.Vb=new pt,a={start:function(e){return function(){return e.Vb.resolve()}}(r),p:r.Vb},e.l[i].push(a),n.push(r.Vb),1==e.l[i].length&&a.start(),r={Vb:r.Vb};return x(s,2),T(s,Promise.all(n),4);case 4:E(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)Ja(e,o)}w(s)}}))}function Ja(e,t){e.l[t].shift(),Qa(e,t)}function Qa(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)),Ja(e,t)}}function eo(e,t,n,r){var i=e.g.mediaKeys;return null==n&&i&&(sn()||dn("Xbox One"))&&"mp4"==e.J[r].split(";")[0].split("/")[1]&&(t=function(e){function t(){i=!0}function n(e){a.push(e),vi(e)}e=Re(e);var r,i=!1,a=[],o=[];if((new mi).box("moov",n).box("trak",n).box("mdia",n).box("minf",n).box("stbl",n).V("stsd",(function(e){r=e,a.push(e),yi(e)})).V("encv",t).V("enca",t).V("avc1",(function(e){o.push({box:e,mc:1701733238})})).V("avc3",(function(e){o.push({box:e,mc:1701733238})})).V("ac-3",(function(e){o.push({box:e,mc:1701733217})})).V("ec-3",(function(e){o.push({box:e,mc:1701733217})})).V("mp4a",(function(e){o.push({box:e,mc:1701733217})})).parse(e),i)return e;if(0==o.length||!r)throw Ct(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=ki(e,r,u.box,a,u.mc);return e}(t)),t}La.prototype.init=function(e){var t=this,n=[],r=[];if((new mi).box("moov",vi).box("mvex",vi).V("trex",(function(e){var n=e.reader;n.skip(4),n.skip(4),e=n.O(),n=n.O(),t.g=e,t.h=n})).box("trak",vi).V("tkhd",(function(e){var t=e.reader;1==e.version?(t.skip(8),t.skip(8)):(t.skip(4),t.skip(4)),e=t.O(),n.push(e)})).box("mdia",vi).V("mdhd",(function(e){e=Na(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])}))},La.prototype.parse=function(e){var t=this,n=[],r=this.g,i=this.h,a=[],o=null,s=9e4;return(new mi).box("moof",vi).box("traf",vi).V("trun",(function(e){a=_a(e.reader,e.version,e.flags).Ce})).V("tfhd",(function(e){e=Ra(e.reader,e.flags),r=e.ke||t.g,i=e.$e||t.h,e=e.trackId,t.i.has(e)&&(s=t.i.get(e))})).V("tfdt",(function(e){o=Da(e.reader,e.version).rd})).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.qa();){var m=e.O();if(6==(31&e.ca())){var v=0;h.length>p&&(v=h[p].Xc||0),v=(u+v)/c;for(var y=l(Ma(t.j,e.hb(m-1))),b=y.next();!b.done;b=y.next())n.push({Qf:b.value,pts:v})}else e.skip(m-1);0==(g-=m+4)&&(u=h.length>p?u+(h[p].Td||d):u+d,p++,g=h.length>p&&h[p].sampleSize||f)}})).parse(e,!1),n},Pa.prototype.init=function(e){this.h.init(e)},(r=Va.prototype).destroy=function(){return this.K.destroy()},r.init=function(e,t){var n,r,i,a,o,s,u,c=this;return _((function(d){if(1==d.g)return n=ft,T(d,c.G,2);for(r={},i=l(e.keys()),a=i.next();!a.done;r={va:r.va},a=i.next())r.va=a.value,o=e.get(r.va),s=Lt(o.mimeType,o.codecs),r.va==n.ea?Ha(c,s):(!t&&MediaSource.isTypeSupported(s)||!Dt(s,r.va)||(c.u[r.va]=new Rt,s=_t(r.va,s)),u=c.s.addSourceBuffer(s),c.h.C(u,"error",function(e){return function(){c.l[e.va][0].p.reject(new qe(2,3,3014,c.g.error?c.g.error.code:0))}}(r)),c.h.C(u,"updateend",function(e){return function(){return Ya(c,e.va)}}(r)),c.j[r.va]=u,c.J[r.va]=s,c.l[r.va]=[]);w(d)}))},r.gb=function(){var e={total:Fa(this.g.buffered),audio:Fa(za(this,"audio")),video:Fa(za(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 _((function(i){return T(i,e==ft.ea?r.i.remove(t,n):$a(r,e,(function(){n<=t?Ya(r,e):r.j[e].remove(t,n)})),0)}))},r.flush=function(e){var t=this;return _((function(n){return e==ft.ea?n.return():T(n,$a(t,e,(function(){t.g.currentTime-=.001,Ya(t,e)})),0)}))},r.endOfStream=function(e){var t=this;return _((function(n){return T(n,Za(t,(function(){Ka(t)||(e?t.s.endOfStream(e):t.s.endOfStream())})),0)}))},r.Na=function(e){var t=this;return _((function(n){return T(n,Za(t,(function(){t.s.duration=e})),0)}))},r.getDuration=function(){return this.s.duration};var to=e.URL.createObjectURL;function no(e,t,n,r){this.ua=e,this.sa=t,this.ja=n,this.Id=void 0===r?null:r}function ro(e,t,n,r,i,a,o,s,u,l,c,d){l=void 0===l?[]:l,this.startTime=e,this.l=this.endTime=t,this.j=n,this.sa=r,this.ja=i,this.g=a,this.timestampOffset=o,this.appendWindowStart=s,this.appendWindowEnd=u,this.h=l,this.tilesLayout=void 0===c?"":c,this.i=void 0===d?null:d}function io(e,t,n){this.j=e,this.Wc=t,this.o=this.l=1/0,this.g=1,this.h=this.i=null,this.s=0,this.u=!0,this.F=0,this.G=void 0===n||n,this.I=0}function ao(e,t){this.j=e,this.o=so(e),this.g=e.g.currentTime,this.l=Date.now()/1e3,this.h=!1,this.s=t,this.i=function(){}}function oo(e){this.g=e}function so(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(Fa(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 uo(e,t,n,r,i){var a=this;this.g=e,this.F=t,this.m=n,this.u=i,this.h=new Mr,this.s=!1,this.G=e.readyState,this.j=!1,this.i=r,this.o=!1,this.h.C(e,"waiting",(function(){return lo(a)})),this.l=new rn((function(){lo(a)})).Fa(.25)}function lo(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&&(e.g.autoplay||0!=e.g.currentTime)){var t;if(e.g.readyState!=e.G&&(e.j=!1,e.G=e.g.readyState),!(t=!e.i)){var n=(t=e.i).j,r=so(n),i=n.g.currentTime,a=Date.now()/1e3;t.g==i&&t.o==r||(t.l=a,t.g=i,t.o=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){i=e.m.smallGapLimit;var o=e.g.currentTime;if(n=function(e,t,n){return!e||!e.length||1==e.length&&1e-6>e.end(0)-e.start(0)?null:0<=(e=Fa(e).findIndex((function(e,r,i){return e.start>t&&(0==r||i[r-1].end-t<=n)})))?e:null}(t=e.g.buffered,o,e.m.gapDetectionThreshold),!(null==n||0==n&&!e.o||(r=t.start(n),r>=e.F.Wa()))){var s=r-o;i=s<=i,a=!1,.001>s||(i||e.j||(e.j=!0,(o=new dr("largegap",o=(new Map).set("currentTime",o).set("gapSize",s))).cancelable=!0,e.u(o),e.m.jumpLargeGaps&&!o.defaultPrevented&&(a=!0)),!i&&!a)||(0!=n&&t.end(n-1),e.g.currentTime=r)}}}}}function co(e,t,n,r){t==HTMLMediaElement.HAVE_NOTHING||e.readyState>=t?r():(t=fo.value().get(t),n.ya(e,t,r))}no.prototype.jc=function(){return this.sa},no.prototype.ec=function(){return this.ja},F("shaka.media.InitSegmentReference",no),no.prototype.getEndByte=no.prototype.ec,no.prototype.getStartByte=no.prototype.jc,(r=ro.prototype).ua=function(){return this.j()},r.xf=function(){return this.startTime},r.jf=function(){return this.endTime},r.jc=function(){return this.sa},r.ec=function(){return this.ja},r.Df=function(){return this.tilesLayout},r.Cf=function(){return this.i},F("shaka.media.SegmentReference",ro),ro.prototype.getTileDuration=ro.prototype.Cf,ro.prototype.getTilesLayout=ro.prototype.Df,ro.prototype.getEndByte=ro.prototype.ec,ro.prototype.getStartByte=ro.prototype.jc,ro.prototype.getEndTime=ro.prototype.jf,ro.prototype.getStartTime=ro.prototype.xf,ro.prototype.getUris=ro.prototype.ua,(r=io.prototype).getDuration=function(){return this.l},r.qf=function(){return this.g},r.Na=function(e){this.l=e},r.wf=function(){return this.j},r.He=function(e){this.s=e},r.uc=function(e){this.u=e},r.$d=function(e){this.o=e},r.fg=function(e){this.Wc=e},r.hf=function(){return this.Wc},r.Mb=function(e){if(0!=e.length){var t=e[e.length-1].endTime;this.Md(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.G&&(this.j=(Date.now()+this.s)/1e3-this.h-this.g)}},r.Md=function(e){this.i=null==this.i?e:Math.min(this.i,e)},r.Ld=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.Y=function(){return 1/0==this.l&&!this.u},r.rb=function(){return 1/0!=this.l&&!this.u},r.Xa=function(){return Math.max(this.F,this.mb()-this.o)},r.Ie=function(e){this.F=e},r.mb=function(){return this.Y()||this.rb()?Math.min(Math.max(0,(Date.now()+this.s)/1e3-this.g-this.j)+this.I,this.l):this.h||this.l},r.ic=function(e){var t=Math.max(this.i,this.F);return 1/0==this.o?Math.ceil(1e3*t)/1e3:Math.max(t,Math.min(this.mb()-this.o+e,this.Wa()))},r.Ib=function(){return this.ic(0)},r.Wa=function(){return Math.max(0,this.mb()-(this.Y()||this.rb()?this.Wc:0))},r.Le=function(){return!(null==this.j||null!=this.h&&this.G)},r.Ge=function(e){this.I=e},F("shaka.media.PresentationTimeline",io),io.prototype.setAvailabilityTimeOffset=io.prototype.Ge,io.prototype.usingPresentationStartTime=io.prototype.Le,io.prototype.getSeekRangeEnd=io.prototype.Wa,io.prototype.getSeekRangeStart=io.prototype.Ib,io.prototype.getSafeSeekRangeStart=io.prototype.ic,io.prototype.getSegmentAvailabilityEnd=io.prototype.mb,io.prototype.setUserSeekStart=io.prototype.Ie,io.prototype.getSegmentAvailabilityStart=io.prototype.Xa,io.prototype.isInProgress=io.prototype.rb,io.prototype.isLive=io.prototype.Y,io.prototype.offset=io.prototype.offset,io.prototype.notifyMaxSegmentDuration=io.prototype.Ld,io.prototype.notifyMinSegmentStartTime=io.prototype.Md,io.prototype.notifySegments=io.prototype.Mb,io.prototype.getDelay=io.prototype.hf,io.prototype.setDelay=io.prototype.fg,io.prototype.setSegmentAvailabilityDuration=io.prototype.$d,io.prototype.setStatic=io.prototype.uc,io.prototype.setClockOffset=io.prototype.He,io.prototype.getPresentationStartTime=io.prototype.wf,io.prototype.setDuration=io.prototype.Na,io.prototype.getMaxSegmentDuration=io.prototype.qf,io.prototype.getDuration=io.prototype.getDuration,ao.prototype.release=function(){this.j=null,this.i=function(){}},uo.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.F=this.u=null},uo.prototype.Od=function(){this.o=!0,lo(this)};var fo=new gt((function(){return new Map([[HTMLMediaElement.HAVE_METADATA,"loadedmetadata"],[HTMLMediaElement.HAVE_CURRENT_DATA,"loadeddata"],[HTMLMediaElement.HAVE_FUTURE_DATA,"canplay"],[HTMLMediaElement.HAVE_ENOUGH_DATA,"canplaythrough"]])}));function ho(e,t,n){var r=this;this.g=e,this.l=t,this.j=n,this.o=!1,this.h=new Mr,this.i=new yo(e),co(this.g,HTMLMediaElement.HAVE_METADATA,this.h,(function(){mo(r,r.j)}))}function po(e){return e.o?e.g.currentTime:e.j}function go(e,t){0Math.abs(e.g.currentTime-t)?vo(e):(e.h.ya(e.g,"seeking",(function(){vo(e)})),bo(e.i,0==e.g.currentTime?t:e.g.currentTime))}function vo(e){e.o=!0,e.h.C(e.g,"seeking",(function(){return e.l()}))}function yo(e){var t=this;this.h=e,this.o=10,this.l=this.j=this.i=0,this.g=new rn((function(){0>=t.i||t.h.currentTime!=t.j?t.g.stop():(t.h.currentTime=t.l,t.i--)}))}function bo(e,t){e.j=e.h.currentTime,e.l=t,e.i=e.o,e.h.currentTime=t,e.g.Fa(.1)}function To(e){var t=this;this.g=e,this.j=!1,this.i=null,this.h=new Mr,co(this.g,HTMLMediaElement.HAVE_CURRENT_DATA,this.h,(function(){null==t.i||0==t.i?t.j=!0:(t.h.ya(t.g,"seeking",(function(){t.j=!0})),t.g.currentTime=Math.max(0,t.g.currentTime+t.i))}))}function wo(e,t,n,r,i,a){var o=this;this.i=e,this.g=t.presentationTimeline,this.I=t.minBufferTime||0,this.m=n,this.F=i,this.u=null,this.j=new uo(e,t.presentationTimeline,n,function(e,t){if(!t.stallEnabled)return null;var n=t.stallSkip,r=new ao(new oo(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 ho(e,(function(){var e=o.j;e.s=!0,e.o=!1,e.j=!1;var t=po(o.h);return e=So(o,t),.001e.g.getDuration()?e.g.Ib():e.g.Wa():0>t&&(t=e.g.Wa()+t),xo(e,Eo(e,t))}(this,r)),this.s=new rn((function(){if(0!=o.i.readyState&&!o.i.paused){var e=po(o.h),t=o.g.Ib(),n=o.g.Wa();3>n-t&&(t=n-3),e=n?n-e.m.durationBackoff:t}function So(e,t){var n=Math.max(e.I,e.m.rebufferingGoal),r=e.m.safeSeekOffset,i=e.g.Ib(),a=e.g.Wa(),o=e.g.getDuration();3>a-i&&(i=a-3);var s=e.g.ic(n),u=e.g.ic(r);return n=e.g.ic(n+r),t>=o?xo(e,t):t>a?a:t=s||Ua(e.i.buffered,t)?t:n}function Eo(e,t){var n=e.g.Ib();return t(n=e.g.Wa())?n:t}function ko(e){this.N=e,this.g=null,this.h=0,this.i=!1}function Ao(e,t,n){return new ko([new ro(e,e+t,(function(){return n}),0,null,null,e,e,e+t)])}function Io(e,t,n){this.i=e,this.h=t,this.g=n}function Co(){ko.call(this,[]),this.j=[]}function Mo(e){var t=this;this.g=e,this.j=!1,this.i=this.g.Pc(),this.h=new rn((function(){t.g.we(.25*t.i)}))}function Ro(e){e.h.stop();var t=e.j?0:e.i;if(0<=t)try{return void(e.g.Pc()!=t&&e.g.Zd(t))}catch(e){}e.h.Fa(.25),0!=e.g.Pc()&&e.g.Zd(0)}function Do(e){var t=this;this.h=e,this.g=new Set,this.i=new rn((function(){No(t,!1)})).Fa(.25)}function No(e,t){for(var n=l(e.g),r=n.next();!r.done;r=n.next())r.value.j(e.h.currentTime,t)}function _o(e){hr.call(this),this.g=new Map,this.h=e}function Lo(e){hr.call(this);var t=this;this.g=new Set,this.i=e,this.h=new rn((function(){for(var e=t.i(),n=l(t.g),r=n.next();!r.done;r=n.next())(r=r.value).endTime=r.startTime&&e(e-=this.h)||e>=this.N.length?null:this.N[e]},r.offset=function(e){if(!this.i)for(var t=l(this.N),n=t.next();!n.done;n=t.next())(n=n.value).startTime+=e,n.endTime+=e,n.timestampOffset+=e},r.Kb=function(e){!this.i&&e.length&&(this.N=this.N.filter((function(t){return t.startTimet&&(0==n.N.length||e.endTime>n.N[0].startTime)})),this.Kb(e),this.kb(t)},r.kb=function(e){if(!this.i){var t=this.N.length;this.N=this.N.filter((function(t){return t.endTime>e})),this.h+=t-this.N.length}},r.fb=function(e,t,n){if(n=void 0!==n&&n,!this.i){for(;this.N.length&&this.N[this.N.length-1].startTime>=t;)this.N.pop();for(;this.N.length&&this.N[0].endTime<=e;)this.N.shift(),n||this.h++;0!=this.N.length&&(e=this.N[this.N.length-1],this.N[this.N.length-1]=new ro(e.startTime,t,e.j,e.sa,e.ja,e.g,e.timestampOffset,e.appendWindowStart,e.appendWindowEnd,e.h,e.tilesLayout,e.i))}},r.Yc=function(e,t){var n=this;this.i||(this.g&&this.g.stop(),this.g=new rn((function(){var e=t();e?n.N.push.apply(n.N,c(e)):(n.g.stop(),n.g=null)})),this.g.Fa(e))},ko.prototype[Symbol.iterator]=function(){return this.Hb(0)},ko.prototype.Hb=function(e){var t=this.find(e);if(null==t)return null;t--;var n=this.get(t+1),r=-1;if(n&&0=a.startTime&&e=e.h.length&&(this.h++,this.g=0,e=this.i.get(this.h)),e&&0=a[0].start&&ir.endTime?Bo:Uo;this.g.set(r,a);for(var o=l(this.l),s=o.next();!s.done;s=o.next())(s=s.value).Ab==i&&s.zb==a&&s.qb(r,t)}};var jo=1,Uo=2,Bo=3;function Fo(e,t,n,r,i){return e=Tr(e,r,i),0==t&&null==n||(e.headers.Range=n?"bytes="+t+"-"+n:"bytes="+t+"-"),e}function Vo(e,t){var n=this;this.B=t,this.D=e,this.m=null,this.l=1,this.i=this.h=null,this.g=new Map,this.o=!1,this.s=null,this.j=!1,this.K=new Ir((function(){return function(e){var t,n,r,i;return _((function(a){if(1==a.g){for(t=[],n=l(e.g.values()),r=n.next();!r.done;r=n.next())Qo(i=r.value),t.push(es(i));return T(a,Promise.all(t),2)}e.g.clear(),e.B=null,e.D=null,e.m=null,w(a)}))}(n)}))}function Ho(e,t){var n=e.g.get("video");if(n){var r=n.stream;if(r)if(t){var i=r.trickModeVideo;i&&!n.wb&&(qo(e,i,!1,0,!1),n.wb=r)}else(r=n.wb)&&(n.wb=null,qo(e,r,!0,0,!1))}}function Ko(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.o&&(t.video&&qo(e,t.video,n,r,i),t.audio&&qo(e,t.audio,n,r,i))}function Go(e,t){e.i=t,e.o&&qo(e,t,!0,0,!1)}function qo(e,t,n,r,i){var a=e.g.get(t.type);a||t.type!=dt?a&&(a.wb&&(t.trickModeVideo?(a.wb=t,t=t.trickModeVideo):a.wb=null),a.stream!=t||i)&&(t.type==dt&&Ha(e.B.U,Lt(t.mimeType,t.codecs)),a.stream.closeSegmentIndex&&a.stream.closeSegmentIndex(),a.stream=t,a.ia=null,n&&(a.cc?a.ad=!0:a.Ma?(a.yb=!0,a.Jc=r,a.ad=!0):(Qo(a),Zo(e,a,!0,r).catch((function(t){e.B&&e.B.onError(t)})))),function(e,t){var n,r;return _((function(i){if(1==i.g)return t.za?(n=t.stream,r=t.za,n.segmentIndex?i.A(2):T(i,n.createSegmentIndex(),2)):i.return();if(t.za!=r||t.stream!=n)return i.return();var a=e.B.Oc(),o=qa(e.B.U,t.type),s=t.stream.segmentIndex.find(t.Da?t.Da.endTime:a),u=null==s?null:t.stream.segmentIndex.get(s);s=u&&u.ja?u.ja-u.sa:null,u&&!s&&(s=(u.endTime-u.startTime)*(t.stream.bandwidth||0)/8),s?((u=u.g)&&(s+=(u.ja?u.ja-u.sa:null)||0),a=8*s/(u=e.B.getBandwidthEstimate())<(o||0)-a-Math.max(e.D.minBufferTime||0,e.m.rebufferingGoal)||t.za.h.g>s):a=!1,a&&t.za.abort(),w(i)}))}(e,a).catch((function(t){e.B&&e.B.onError(t)}))):function(e,t){var n,r,i,a;_((function(o){switch(o.g){case 1:return n=ft,x(o,2),T(o,Wa(e.B.U,n.ea),4);case 4:E(o,3);break;case 2:r=k(o),e.B&&e.B.onError(r);case 3:i=Lt(t.mimeType,t.codecs),Ha(e.B.U,i),(e.B.U.o.isTextVisible()||e.m.alwaysStreamText)&&(a=Xo(t),e.g.set(n.ea,a),Jo(e,a,0)),w(o)}}))}(e,t)}function zo(e,t){t.cc||t.yb||(t.Ma?(t.yb=!0,t.Jc=0):null==Ga(e.B.U,t.type)?null==t.Pa&&Jo(e,t,0):(Qo(t),Zo(e,t,!1,0).catch((function(t){e.B&&e.B.onError(t)}))))}function Xo(e){return{stream:e,type:e.type,ia:null,Da:null,Qc:null,Hd:null,Gd:null,Fd:null,wb:null,endOfStream:!1,Ma:!1,Pa:null,yb:!1,Jc:0,ad:!1,cc:!1,Rd:!1,kc:!1,za:null}}function Wo(e,t,n,r,i,a){var o;return _((function(s){return 1==s.g?(o=r.closedCaptions&&0=(a=n-i-r)?o.return():T(o,e.B.U.remove(t.type,i,i+a),2);Cr(e.K),w(o)}))}(e,t,n),2)):3!=s.g?(Cr(e.K),T(s,Xa(e.B.U,t.type,a,i.startTime,i.endTime,o),3)):(Cr(e.K),void w(s))}))}function Yo(e){return e&&e.type==dt&&("application/cea-608"==e.stream.mimeType||"application/cea-708"==e.stream.mimeType)}function $o(e,t,n,r){var i,a,o,s,u;return _((function(l){return 1==l.g?(i=Er,a=Fo(n.ua(),n.sa,n.ja,e.m.retryParameters,r),o=t.stream,e.B.modifySegmentRequest(a,{type:o.type,init:n instanceof no,duration:n.endTime-n.startTime,mimeType:o.mimeType,codecs:o.codecs,bandwidth:o.bandwidth}),s=e.B.sb.request(i,a),t.za=s,T(l,s.promise,2)):(u=l.h,t.za=null,l.return(u.data))}))}function Zo(e,t,n,r){var i,a;return _((function(o){return 1==o.g?(t.yb=!1,t.ad=!1,t.Jc=0,t.cc=!0,t.Da=null,t.Qc=null,t.ia=null,r?(i=e.B.Oc(),a=e.B.U.getDuration(),T(o,e.B.U.remove(t.type,i+r,a),3)):T(o,Wa(e.B.U,t.type),4)):3!=o.g?(Cr(e.K),n?T(o,e.B.U.flush(t.type),3):o.A(3)):(Cr(e.K),t.cc=!1,t.endOfStream=!1,Jo(e,t,0),void w(o))}))}function Jo(e,t,n){var r=t.type;(r!=dt||e.g.has(r))&&(t.Pa=new nn((function(){var n;return _((function(r){return 1==r.g?(x(r,2),T(r,e.nc(t),4)):2!=r.g?E(r,0):(n=k(r),e.B&&e.B.onError(n),void w(r))}))})).W(n))}function Qo(e){null!=e.Pa&&(e.Pa.stop(),e.Pa=null)}function es(e){return _((function(t){return e.za?T(t,e.za.abort(),0):t.A(0)}))}function ts(e,t){return _((function(n){if(1==n.g)return T(n,ir(e.s),2);Cr(e.K),e.B.onError(t),t.handled||e.m.failureCallback(t),w(n)}))}function ns(e,t){var n=_u(),r=this;this.j=t,this.i=e,this.l=n,this.s=null,this.o=[],this.h=this.g=null,this.u=Promise.resolve().then((function(){return function(e){return _((function(t){if(e.K.g)t=t.A(0);else{if(0==e.o.length||e.g&&!e.g.pb)var n=!1;else{e.g&&(e.g.La.ub(),e.g=null);var r=(n=e.o.shift()).create(e.l);r?(n.La.Nb(),e.g={node:r.node,payload:r.payload,pb:r.pb,La:n.La}):n.La.Uc(),n=!0}n?n=Promise.resolve():e.g?n=function(e){var t,n;return _((function(r){switch(r.g){case 1:return e.i=e.j.tf(e.i,e.l,e.g.node,e.g.payload),x(r,2),e.h=e.j.bf(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.La.Sc(),e.g=null),E(r,0);break;case 2:return 7001==(t=k(r)).code?e.g.La.ub():e.g.La.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.Nf(e.i),e.s=new pt,n=e.s),t=T(t,n,1)}return t}))}(r)})),this.K=new Ir((function(){return function(e){var t,n;return _((function(r){if(1==r.g)return e.h&&e.h.abort(),is(e),T(r,e.u,2);for(e.g&&e.g.La.ub(),t=l(e.o),n=t.next();!n.done;n=t.next())n.value.La.ub();e.g=null,e.o=[],e.j=null,w(r)}))}(r)}))}function rs(e,t){var n={Nb:function(){},Sc:function(){},ub:function(){},onError:function(){},Uc:function(){},Xg:function(){}};return e.o.push({create:t,La:n}),e.h&&e.h.abort(),is(e),n}function is(e){e.s&&(e.s.resolve(),e.s=null)}function as(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 os(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 ss(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 us(){}function ls(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function cs(t,n){var r=this;this.o=!1,this.l=[],this.g=t,this.u=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.u.appendChild(this.i),this.F=new rn((function(){fs(r)})).Fa(.25),this.j=new Map,this.h=new Mr,this.h.C(document,"fullscreenchange",(function(){fs(r,!0)})),this.s=null,"ResizeObserver"in e&&(this.s=new ResizeObserver((function(){fs(r,!0)})),this.s.observe(this.i))}function ds(e,t,n,r,i){for(var a=!1,o=[],s=[],u=(t=l(t)).next();!u.done;u=t.next()){u=u.value,i.push(u);var c=e.j.get(u),d=u.startTime<=r&&u.endTime>r,f=c?c.Me:null;c&&(o.push(c.he),d||(a=!0,e.j.delete(u),c=null)),d&&(s.push(u),c||(hs(e,u,i),f=(c=e.j.get(u)).Me,a=!0)),0=r})))?1e3*(n.end-r):NaN}(e,n.type)),n.bandwidth&&(r.br=n.bandwidth/1e3),i&&r.ot!==Cs&&(r.tb=function(e,t){var n=e.B.ob();if(!n.length)return NaN;for(var r=n[0],i=(n=l(n)).next();!i.done;i=n.next())"variant"===(i=i.value).type&&i.bandwidth>r.bandwidth&&(r=i);switch(t){case Es:return r.videoBandwidth||NaN;case Ss:return r.audioBandwidth||NaN;default:return r.bandwidth}}(e,r.ot)/1e3),bs(e,t,r)}}catch(e){W("CMCD_SEGMENT_ERROR","Could not generate segment CMCD data.",e)}}function vs(e,t){try{if(!e.m.enabled)return t;var n=ys(e);return n.ot=Is,n.su=!0,ws(t,Ts(n))}catch(e){return W("CMCD_TEXT_TRACK_ERROR","Could not generate text track CMCD data.",e),t}}function ys(t){return t.h||(t.h=t.m.sessionId||e.crypto.randomUUID()),{v:1,sf:t.l,sid:t.h,cid:t.m.contentId,mtp:t.B.getBandwidthEstimate()/1e3}}function bs(e,t,n){n=void 0===n?{}:n;var r=void 0===r?e.m.useHeaders:r;if(e.m.enabled){Object.assign(n,ys(e)),n.pr=e.B.Nc();var i=n.ot===Es||n.ot===ks;if(e.i&&i&&(n.bs=!0,n.su=!0,e.i=!1),null==n.su&&(n.su=e.j),r)e=function(e){for(var t=Object.keys(e),n={},r=["Object","Request","Session","Status"],i=[{},{},{},{}],a={br:0,d:0,ot:0,tb:0,bl:1,dl:1,mtp:1,nor:1,nrr:1,su:1,cid:2,pr:2,sf:2,sid:2,st:2,v:2,bs:3,rtp:3},o=(t=l(t)).next();!o.done;o=t.next())o=o.value,i[null!=a[o]?a[o]:1][o]=e[o];for(e=0;eh?e.B.U.Na(h):e.B.U.Na(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=Xo(c),e.g.set(u,d),Jo(e,d,0));w(f)}))}(e),2);Cr(e.K),e.o=!0,w(t)}))},Vo.prototype.nc=function(t){var n,r,i,a,o,s=this;return _((function(u){switch(u.g){case 1:if(Cr(s.K),t.Ma||null==t.Pa||t.cc)return u.return();if(t.Pa=null,!t.yb){u.A(2);break}return T(u,Zo(s,t,t.ad,t.Jc),3);case 3:return u.return();case 2:if(t.stream.segmentIndex){u.A(4);break}return n=t.stream,T(u,t.stream.createSegmentIndex(),5);case 5:if(n!=t.stream)return n.closeSegmentIndex&&n.closeSegmentIndex(),null==t.Pa&&Jo(s,t,0),u.return();case 4:x(u,6),r=function(t,n){if(Yo(n))return function(e,t){var n=qa(e,"video")||0;Ft(e.i,t,n)}(t.B.U,n.stream.originalId||""),null;n.type==dt&&function(e){e.i&&Ft(e.i,"",0)}(t.B.U);var r=t.B.Oc(),i=n.Da?n.Da.endTime:r,a=function(e,t,n){return t==dt?null==(e=e.i).h||e.ht.D.presentationTimeline.getDuration()-i)return n.endOfStream=!0,"video"==n.type&&(r=t.g.get(dt))&&Yo(r)&&(r.endOfStream=!0),null;if(n.endOfStream=!1,a>=o)return t.m.updateIntervalSeconds/2;if(a=qa(t.B.U,n.type),a=function(e,t,n,r){if(t.ia)return t.ia.current();if(t.Da||r)return t.ia=t.stream.segmentIndex.Hb(t.Da?t.Da.endTime:r),t.ia&&t.ia.next().value;e=e.m.inaccurateManifestTolerance,r=Math.max(n-e,0);var i=null;return e&&(t.ia=t.stream.segmentIndex.Hb(r),i=t.ia&&t.ia.next().value),i||(t.ia=t.stream.segmentIndex.Hb(n),i=t.ia&&t.ia.next().value),i}(t,n,r,a),!a)return t.m.updateIntervalSeconds;o=1/0;for(var s=Array.from(t.g.values()),u=(s=l(s)).next();!u.done;u=s.next())Yo(u=u.value)||u.ia&&!u.ia.current()||(o=Math.min(o,u.Da?u.Da.endTime:r));return i>=o+t.D.presentationTimeline.g?t.m.updateIntervalSeconds:(function(t,n,r,i){var a,o,s,u,l,c,d,f,h,p,g;return _((function(m){switch(m.g){case 1:return a=ft,o=n.stream,s=n.ia,n.Ma=!0,x(m,2),T(m,function(e,t,n){var r,i,a,o,s,u,l;return _((function(c){return r=[],i=Math.max(0,n.appendWindowStart-.1),a=n.appendWindowEnd+.01,(o=n.timestampOffset)==t.Hd&&i==t.Gd&&a==t.Fd||(s=function(){var n;return _((function(r){if(1==r.g)return x(r,2),t.Gd=i,t.Fd=a,t.Hd=o,T(r,function(e,t,n,r,i){return _((function(a){return t==ft.ea?(e.i.F=n,function(e,t,n){e.j=t,e.l=n}(e.i,r,i),a.return()):T(a,Promise.all([$a(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,Ya(e,t)})),$a(e,t,(function(){var r=n;0>r&&(r+=.001),e.j[t].timestampOffset=r,Ya(e,t)})),$a(e,t,(function(){e.j[t].appendWindowStart=0,e.j[t].appendWindowEnd=i,e.j[t].appendWindowStart=r,Ya(e,t)}))]),0)}))}(e.B.U,t.type,o,i,a),4);if(2!=r.g)return E(r,0);throw n=k(r),t.Gd=null,t.Fd=null,t.Hd=null,n}))},r.push(s())),!function(e,t){return e&&t?e.jc()==t.jc()&&e.ec()==t.ec()&&ae(e.ua(),t.ua()):e==t}(n.g,t.Qc)&&(t.Qc=n.g)&&(u=$o(e,t,n.g),l=function(){var n,r,i;return _((function(a){switch(a.g){case 1:return x(a,2),T(a,u,4);case 4:return n=a.h,Cr(e.K),r=t.stream.closedCaptions&&0e})),!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+""}),""),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={Bb:i.Bb},a=n.next())i.Bb=a.value,e.some(function(e){return function(t){return t.startTime==e.Bb.startTime&&t.endTime==e.Bb.endTime&&t.text==e.Bb.payload}}(i))||(a=os(i.Bb))&&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&&(ss(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",as),as.prototype.setTextVisibility=as.prototype.setTextVisibility,as.prototype.isTextVisible=as.prototype.isTextVisible,as.prototype.destroy=as.prototype.destroy,as.prototype.append=as.prototype.append,as.prototype.remove=as.prototype.remove,F("shaka.util.Dom",us),us.removeAllChildren=ls,(r=cs.prototype).append=function(e){for(var t=[].concat(c(this.l)),n={},r=(e=l(e)).next();!r.done;n={wc:n.wc},r=e.next())n.wc=r.value,t.some(function(e){return function(t){return se(t,e.wc)}}(n))||this.l.push(n.wc);fs(this)},r.destroy=function(){this.u.removeChild(this.i),this.i=null,this.o=!1,this.l=[],this.F&&this.F.stop(),this.j.clear(),this.h&&(this.h.release(),this.h=null),this.s&&(this.s.disconnect(),this.s=null)},r.remove=function(e,t){if(!this.i)return!1;var n=this.l.length;return this.l=this.l.filter((function(n){return n.startTime=t})),fs(this,n>this.l.length),!0},r.isTextVisible=function(){return this.o},r.setTextVisibility=function(e){this.o=e},F("shaka.text.UITextDisplayer",cs),cs.prototype.setTextVisibility=cs.prototype.setTextVisibility,cs.prototype.isTextVisible=cs.prototype.isTextVisible,cs.prototype.remove=cs.prototype.remove,cs.prototype.destroy=cs.prototype.destroy,cs.prototype.append=cs.prototype.append,F("shaka.text.WebVttGenerator",(function(){}));var xs="m",Ss="a",Es="v",ks="av",As="i",Is="c",Cs="tt",Ms="v",Rs="l";function Ds(){}function Ns(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]=pr(l):l.constructor==Object&&t[a]&&t[a].constructor==Object?(e[a]||(e[a]=pr(l)),u=Ns(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 _s(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 Ls(){}function Ps(){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:Wr,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,defaultAudioCodec:"mp4a.40.2",defaultVideoCodec:"avc1.42E01E"}},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,dispatchAllEmsgBoxes:!1,observeQualityChanges:!1};(navigator.userAgent.match(/Edge\//)||sn()||un())&&(r.gapDetectionThreshold=.5),(dn("Web0S")||sn()||un())&&(r.stallSkip=0);var i={trackSelectionCallback:function(e){return _((function(t){return t.return(e)}))},downloadSizeCallback:function(e){var t;return _((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 Gn},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},advanced:{minTotalBytes:128e3,minBytes:16e3,fastHalfLife:2,slowHalfLife:5}},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},cmcd:{enabled:!1,sessionId:"",contentId:"",useHeaders:!1}};return i.trackSelectionCallback=function(e){return _((function(t){return t.return(function(e,t){var n=e.filter((function(e){return"variant"==e.type})),r=[],i=Jt(t,n.map((function(e){return e.language})));i&&(r=n.filter((function(e){return Wt(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!=dt&&"image"!=o.type||n.push(o);return n}(e,a.preferredAudioLanguage))}))},a}function Os(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 Ns(e,t,n||Ps(),r,"")}function js(){this.g=null,this.h=[]}function Us(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 Bs(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 Fs(){this.i=this.h=null,this.g=[]}function Vs(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 Hs(){this.s=this.u=this.J=this.G=this.o=this.j=this.I=this.l=this.i=this.M=this.P=this.S=this.F=this.$=NaN,this.g=new js,this.h=new Fs}function Ks(t,n){hr.call(this);var r=this;this.l=ll,this.Dc=this.g=null,this.ma=!1,this.h=new Mr,this.sd=this.s=this.Yb=this.D=this.Gc=this.u=this.i=this.na=this.P=this.Hc=this.J=this.vc=this.I=this.Sa=this.G=this.M=this.o=this.R=null,this.Cd=1e9,this.m=iu(this),this.yd={width:1/0,height:1/0},this.j=null,this.Ja=new Jn(this.m.preferredAudioLanguage,this.m.preferredVariantRole,this.m.preferredAudioChannelCount),this.Qa=this.m.preferredTextLanguage,this.$b=this.m.preferredTextRole,this.Zb=this.m.preferForcedSubs,this.td=[],this.ac=null,n&&n(this),this.R=function(e){return new yr((function(t,n){e.s&&e.s.segmentDownloaded(t,n)}),(function(t,n,r){t=(new Map).set("headers",t).set("request",n).set("requestType",r),e.dispatchEvent(Gs(Bu,t))}),(function(t,n,r,i){t=(new Map).set("request",t).set("error",n).set("httpResponseCode",r).set("aborted",i),e.dispatchEvent(Gs(Uu,t))}))}(this),this.R.Xd(this.m.streaming.forceHTTPS),this.F=null,gl&&(this.F=Ve(gl)),this.h.C(e,"online",(function(){r.Sd()})),this.wa={name:"detach"},this.Ua={name:"attach"},this.da={name:"unload"},this.Dd={name:"manifest-parser"},this.xd={name:"manifest"},this.Ra={name:"media-source"},this.ud={name:"drm-engine"},this.S={name:"load"},this.Ed={name:"src-equals-drm-engine"},this.Db={name:"src-equals"};var i=new Map;i.set(this.Ua,(function(e,t){return lr(function(e,t,n){return null==t.H&&(t.H=n.H,e.h.C(t.H,"error",(function(){var t=xu(e);t&&Tu(e,t)}))),e.g=t.H,Promise.resolve()}(r,e,t))})),i.set(this.wa,(function(e){return e.H&&(r.h.Ga(e.H,"error"),e.H=null),r.F&&r.F.release(),r.g=null,lr(e=Promise.resolve())})),i.set(this.da,(function(e){return lr(qs(r,e))})),i.set(this.Ra,(function(e){return e=function(e,t){var n,r,i,a;return _((function(o){if(1==o.g)return n=new Pa,r=e.m.textDisplayFactory,i=Ve(r),e.vd=r,a=function(e,t,n,r){return new Va(e,t,n,r)}(t.H,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())zs(e,a,o,"ID3",u.value);e.F&&e.F.onHlsTimedMetadata(i,a)}})),T(o,a.G,2);e.M=a,w(o)}))}(r,e),lr(e)})),i.set(this.Dd,(function(e,t){var n=function(e,t,n){var r,i,a,o;return _((function(s){if(1==s.g)return t.mimeType=n.mimeType,t.uri=n.uri,r=t.uri,i=e.R,e.Yb=r,a=e,T(s,ui(r,i,e.m.manifest.retryParameters,t.mimeType),2);a.Gc=s.h,e.u=Ve(e.Gc),o=pr(e.m.manifest),n.H&&"AUDIO"===n.H.nodeName&&(o.disableVideo=!0),e.u.configure(o),w(s)}))}(r,e,t);return lr(n)})),i.set(this.xd,(function(e){return function(e,t){var n=t.uri,r=e.R;e.Hc=new Lo((function(){return e.rc()})),e.Hc.addEventListener("regionadd",(function(t){t=t.region,wu(e,tl,t),e.F&&e.F.onDashTimedMetadata(t)})),e.na=null,e.m.streaming.observeQualityChanges&&(e.na=new _o((function(){return e.gb()})),e.na.addEventListener("qualitychange",(function(t){var n=t.quality;t=t.position,n=(new Map).set("mediaQuality",{bandwidth:n.bandwidth,audioSamplingRate:n.audioSamplingRate,codecs:n.codecs,contentType:n.contentType,frameRate:n.frameRate,height:n.height,mimeType:n.mimeType,channelsCount:n.channelsCount,pixelAspectRatio:n.pixelAspectRatio,width:n.width}).set("position",t),e.dispatchEvent(Gs(Xu,n))})));var i={networkingEngine:r,modifyManifestRequest:function(t,n){var r=e.P;try{r.m.enabled&&(r.l=n.format,bs(r,t,{ot:xs,su:!r.g}))}catch(e){W("CMCD_MANIFEST_ERROR","Could not generate manifest CMCD data.",e)}},modifySegmentRequest:function(t,n){ms(e.P,t,n)},filter:function(t){return au(e,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;o=a.next())if(o=o.value,!n.has(o)){var s=o.startsWith("CC")?"application/cea-608":"application/cea-708",u=new Co;s={id:e.Cd++,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:dt,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.Hc;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),t=new dr("regionadd",new Map([["region",t]])),n.dispatchEvent(t))},onEvent:function(t){return e.dispatchEvent(t)},onError:function(t){return Tu(e,t)},isLowLatencyMode:function(){return e.m.streaming.lowLatencyMode},isAutoLowLatencyMode:function(){return e.m.streaming.autoLowLatencyMode},enableLowLatencyMode:function(){e.configure("streaming.lowLatencyMode",!0)}},a=Date.now()/1e3;return new ar(function(){var t,r,o,s;return _((function(u){if(1==u.g)return t=e,T(u,e.u.start(n,i),2);if(t.D=u.h,r=Gs(zu),e.dispatchEvent(r),0==e.D.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.D),o=Date.now()/1e3,s=o-a,e.j.I=s,w(u)}))}(),(function(){return e.u.stop()}))}(r,e)})),i.set(this.ud,(function(e){return e=function(e,t){var n,r;return _((function(i){return 1==i.g?(n=Date.now()/1e3,r=!0,e.o=Ws(e,{sb:e.R,onError:function(t){Tu(e,t)},Tc:function(t){Su(e,t)},onExpirationUpdated:function(t,n){Eu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==Fu&&r&&(r=!1,e.j.j=Date.now()/1e3-n)}}),e.o.configure(e.m.drm),T(i,Br(e.o,e.D.variants,e.D.offlineSessionIds),2)):3!=i.g?T(i,e.o.bc(t.H),3):T(i,au(e,e.D),0)}))}(r,e),lr(e)})),i.set(this.S,(function(e,t){return lr(function(e,t,n){var r,i,a,o,s,u,c,d,f,h;return _((function(p){switch(p.g){case 1:if(t.startTime=n.startTime,null!=e.ac&&(t.startTime=e.ac,e.ac=null),r=t.H,i=t.uri,e.Yb=i,e.I=new Mo({Pc:function(){return t.H.playbackRate},Lc:function(){return t.H.defaultPlaybackRate},Zd:function(e){t.H.playbackRate=e},we:function(e){t.H.currentTime+=e}}),a=function(){return lu(e)},o=function(){return uu(e)},e.h.C(r,"playing",a),e.h.C(r,"pause",a),e.h.C(r,"ended",a),e.h.C(r,"ratechange",o),s=e.m.abrFactory,e.s&&e.sd==s||(e.sd=s,e.s=Ve(s),"function"!=typeof e.s.playbackRateChanged&&(Le("AbrManager","Please use an AbrManager with playbackRateChanged function."),e.s.playbackRateChanged=function(){}),e.s.configure(e.m.abr)),e.Ja=new Jn(e.m.preferredAudioLanguage,e.m.preferredVariantRole,e.m.preferredAudioChannelCount),e.Qa=e.m.preferredTextLanguage,e.$b=e.m.preferredTextRole,e.Zb=e.m.preferForcedSubs,ku(e.D.presentationTimeline,e.m.playRangeStart,e.m.playRangeEnd),e.s.init((function(t,n,r){e.i&&t!=e.i.h&&fu(e,t,!0,void 0!==n&&n,void 0===r?0:r)})),e.G=function(e,t){return new wo(e.g,e.D,e.m.streaming,t,(function(){if(e.Sa&&No(e.Sa,!0),e.i)for(var t=e.i,n=t.B.Oc(),r=t.m.smallGapLimit,i=l(t.g.keys()),a=i.next();!a.done;a=i.next()){a=a.value;var o=t.g.get(a);o.ia=null;var s=t.B.U;if(a==dt?s=null!=(s=s.i).g&&null!=s.h&&(n>=s.g&&n=i)}))}else t.pc=[]}(e,r),e={Id:t,position:n},0<=(t=(r=r.pc).findIndex((function(e){return e.position>=n})))?r.splice(t,r[t].position==n?1:0,e):r.push(e)}(e.na,r,t)}})}(e),e.i.configure(e.m.streaming),e.l=cl,e.dispatchEvent(Gs(Ju)),c=null,e.ob().find((function(e){return e.active}))){p.A(2);break}if(c=cu(e)?e.s.chooseVariant():null,fu(e,c,!0,!1,0),!e.m.streaming.startAtSegmentBoundary){p.A(3);break}return d=e.G.l(),T(p,function(e,t){var n,r,i,a,o;return _((function(s){return 1==s.g?(n=e.audio,r=e.video,i=function(e,t){var n,r;return _((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.G.o(f);case 3:pu(e,null,In(c));case 2:return e.nb().find((function(e){return e.active}))||((h=On(e.D.textStreams,e.Qa,e.$b,e.Zb)[0]||null)&&Vs(e.j.h,h,!0),c&&(h?(c.audio&&function(e,t,n){return e=Wt(e.m.preferredTextLanguage),t=Wt(t.language),qt(n=Wt(n.language),e)&&!qt(t,n)}(e,c.audio,h)&&(e.ma=!0),e.ma&&e.M.o.setTextVisibility(!0),yu(e)):e.ma=!1),h&&(e.m.streaming.alwaysStreamText||e.Bd())&&Go(e.i,h)),T(p,e.i.start(),5);case 5:e.m.abr.enabled&&(e.s.enable(),bu(e)),kn(e.i?e.i.h:null,e.D),Iu(e.D),gu(e),cu(e),e.D.variants.some((function(e){return e.primary})),e.h.ya(r,"loadedmetadata",(function(){e.j.l=Date.now()/1e3-n.ae})),w(p)}}))}(r,e,t))})),i.set(this.Ed,(function(e,t){var n=function(e,t,n){var r,i,a,o,s,u,l;return _((function(c){return 1==c.g?(r=ft,i=Date.now()/1e3,a=!0,e.o=Ws(e,{sb:e.R,onError:function(t){Tu(e,t)},Tc:function(t){Su(e,t)},onExpirationUpdated:function(t,n){Eu(e,t,n)},onEvent:function(t){e.dispatchEvent(t),t.type==Fu&&a&&(a=!1,e.j.j=Date.now()/1e3-i)}}),e.o.configure(e.m.drm),o=n.uri||"",s=ci(o),"application/x-mpegurl"==(u=ml[s])&&ln()&&(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.Ta,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!1,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null},bandwidth:100,allowedByApplication:!0,allowedByKeySystem:!0,decodingInfos:[]},e.o.S=!0,T(c,Br(e.o,[l],[]),2)):T(c,e.o.bc(t.H),0)}))}(r,e,t);return lr(n)})),i.set(this.Db,(function(e,t){return function(e,t,n){function r(){return lu(e)}t.uri=n.uri,t.startTime=n.startTime,e.Yb=t.uri,e.G=new To(t.H),null!=t.startTime&&e.G.o(t.startTime),e.I=new Mo({Pc:function(){return t.H.playbackRate},Lc:function(){return t.H.defaultPlaybackRate},Zd:function(e){t.H.playbackRate=e},we:function(e){t.H.currentTime+=e}}),Ys(e,e.m.streaming.rebufferingGoal),e.h.C(t.H,"playing",r),e.h.C(t.H,"pause",r),e.h.C(t.H,"ended",r),e.h.C(t.H,"ratechange",(function(){return uu(e)})),"none"!=e.g.preload&&e.h.ya(e.g,"loadedmetadata",(function(){e.j.l=Date.now()/1e3-n.ae})),e.g.audioTracks&&(e.h.C(e.g.audioTracks,"addtrack",(function(){return gu(e)})),e.h.C(e.g.audioTracks,"removetrack",(function(){return gu(e)})),e.h.C(e.g.audioTracks,"change",(function(){return gu(e)}))),e.g.textTracks&&(e.h.C(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.C(t,"cuechange",(function(){if(t.activeCues)for(var n=l(t.activeCues),r=n.next();!r.done;r=n.next())r=r.value,zs(e,r.startTime,r.endTime,r.type,r.value),e.F&&e.F.onCueMetadataChange(r.value)})),new rn((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"})).Sb().W(.5))}(e,t);break;case"chapters":Xs(e,t);break;default:gu(e)}})),e.h.C(e.g.textTracks,"removetrack",(function(){return gu(e)})),e.h.C(e.g.textTracks,"change",(function(){return gu(e)})));var i=ci(t.uri);t.H.src=function(e,t,n){try{if(!e.m.enabled)return t;var r=ys(e);e:{switch(n){case"video/webm":case"video/mp4":var i=ks;break e;case"application/x-mpegurl":i=xs;break e}i=void 0}return r.ot=i,r.su=!0,ws(t,Ts(r))}catch(e){return W("CMCD_SRC_ERROR","Could not generate src CMCD data.",e),t}}(e.P,t.uri,ml[i]),(sn()||dn("Web0S"))&&t.H.load(),e.l=dl,e.dispatchEvent(Gs(Ju));var a=new pt;co(e.g,HTMLMediaElement.HAVE_METADATA,e.h,(function(){a.resolve()}));var o=!1;return e.td.push((function(){o=!0})),co(e.g,HTMLMediaElement.HAVE_CURRENT_DATA,e.h,(function(){return _((function(t){return 1==t.g?o?t.return():(function(e){var t=e.m.preferredAudioLanguage;if(""!=t){e.Ud(t);var n=e.m.preferredVariantRole;""!=n&&e.Ud(t,n)}}(e),Js(e).find((function(e){return"disabled"!=e.mode}))?t.A(2):T(t,new Promise((function(t){e.h.ya(e.g.textTracks,"change",t),new rn(t).W(1)})),2)):o?t.return():(function(e){var t=e.m.preferredTextLanguage,n=e.m.preferForcedSubs;if(""!=t){e.Vd(t,"",n);var r=e.m.preferredTextRole;""!=r&&e.Vd(t,r,n)}}(e),void w(t))}))})),e.g.error?a.reject(xu(e)):"none"==e.g.preload&&(X('With