[#] hm X_Shell Backd00r [#]

Current Path : /var/www/clients/client35/web46/web/tv/jwplayer/
Upload File :
Current File : /var/www/clients/client35/web46/web/tv/jwplayer/provider.shaka.js

webpackJsonpjwplayer([3],{90:function(t,e,i){var n,r;n=[i(1),i(58)],r=function(t,e){function i(i){var n=i.currentTarget.activeCues;if(n&&n.length){var r=n[n.length-1].startTime,s=[];if(t.each(n,function(t){t.startTime<r||(t.data?s.push(t):t.text&&this.trigger("meta",{metadataTime:r,metadata:JSON.parse(t.text)}))},this),s.length){var a=e.parseID3(s);this.trigger("meta",{metadataTime:r,metadata:a})}}}function n(){var t=this.video.textTracks;if(t){if(t.length){var e=0,n=t.length;for(l||(l=[],c={}),e;n>e;e++){var r=t[e];if(!c[e+r.kind])if("metadata"===r.kind)r.oncuechange=i.bind(this),r.mode="showing",c[e+r.kind]=r;else if("subtitles"===r.kind||"captions"===r.kind){var s=r.mode;if(r.mode="hidden",!r.cues.length)continue;r.mode=s,l.push(r),c[e+r.kind]=r}}}this.addTracksListener("change"),l&&l.length&&this.trigger("subtitlesTracks",{tracks:l})}}function r(e){l&&(t.each(l,function(t){t.mode="disabled"}),f=e-1,l[f]&&(l[f].mode="showing"))}function s(t){var e=this.video.textTracks,i=this["tracks"+t+"Handler"].bind(this);"addEventListener"in e?e.addEventListener(t,i):e["on"+t]=i}function a(t){var e=this.video.textTracks,i=this["tracks"+t+"Handler"];e&&("removeEventListener"in e?e.removeEventListener(t,i):e["on"+t]=null)}function o(){l||this.setTextTracks()}function h(){l=null,c=null}var u={setTextTracks:n,setSubtitlesTrack:r,addTracksListener:s,removeTracksListener:a,trackschangeHandler:o,clearTracks:h},l=null,c=null,f=-1;return u}.apply(e,n),!(void 0!==r&&(t.exports=r))},91:function(t,e,i){var n,r;n=[i(2)],r=function(t){return{volume:function(e){e=t.between(e/100,0,1),this.video.volume=e},mute:function(t){this.video.muted=!!t},resize:function(e,i,n){if(!(e&&i&&this.video.videoWidth&&this.video.videoHeight))return!1;if("uniform"===n){var r=e/i,s=this.video.videoWidth/this.video.videoHeight,a=null;Math.abs(r-s)<.09&&(a="fill"),t.css.style(this.video,{objectFit:a})}return!1}}}.apply(e,n),!(void 0!==r&&(t.exports=r))},92:function(t,e,i){var n,r;n=[i(3),i(31),i(4),i(6)],r=function(t,e,i,n){var r=256;return{attached:!0,beforeComplete:!1,stallCheckTimeout_:-1,lastStalledTime_:NaN,trigger:function(e,i){return this.attached?t.trigger.call(this,e,i):void 0},setState:function(t){return this.attached?e.setState.call(this,t):void 0},checkComplete:function(){return this.beforeComplete},playbackComplete_:function(){this.stopStallCheck(),this.setState(n.COMPLETE),this.beforeComplete=!1,this.trigger(i.JWPLAYER_MEDIA_COMPLETE)},attachMedia:function(){this.attached=!0,this.eventsOn_(),this.beforeComplete&&this.playbackComplete_()},detachMedia:function(){return this.stopStallCheck(),this.attached=!1,this.eventsOff_(),this.video},stopStallCheck:function(){clearTimeout(this.stallCheckTimeout_)},startStallCheck:function(){this.stopStallCheck(),this.stallCheckTimeout_=setTimeout(this.stalledHandler.bind(this),r)},stalledHandler:function(){return this.lastStalledTime_!==this.video.currentTime?void(this.lastStalledTime_=this.video.currentTime):void(this.video.paused||this.video.ended||this.state!==n.LOADING&&this.state!==n.ERROR&&(this.seeking||this.setState(n.STALLED)))}}}.apply(e,n),!(void 0!==r&&(t.exports=r))},93:function(t,e,i){var n,r;n=[i(2),i(4),i(6)],r=function(t,e,i){return{seeking:!1,loadedmetadata:function(){var t={duration:this.getDuration(),height:this.video.videoHeight,width:this.video.videoWidth},i=this.drmUsed;i&&(t.drm=i),this.trigger(e.JWPLAYER_MEDIA_META,t)},timeupdate:function(){this.stopStallCheck();var t=this.video.videoHeight;t!==this._helperLastVideoHeight&&this.trigger("adaptation",{size:{width:this.video.videoWidth,height:this.video.videoHeight}}),this._helperLastVideoHeight=t,this.state===i.STALLED&&this.setState(i.PLAYING),this.startStallCheck();var n=this.getCurrentTime(),r={position:n,duration:this.getDuration()};if(this.getPtsOffset){var s=this.getPtsOffset();s>=0&&(r.metadata={mpegts:s+n})}this.trigger(e.JWPLAYER_MEDIA_TIME,r)},click:function(t){this.trigger("click",t)},volumechange:function(){var t=this.video;this.trigger("volume",{volume:Math.round(100*t.volume)}),this.trigger("mute",{mute:t.muted})},seeked:function(){this.seeking=!1,this.trigger(e.JWPLAYER_MEDIA_SEEKED)},playing:function(){this.setState(i.PLAYING)},pause:function(){this.state!==i.COMPLETE&&(this.video.ended||this.video.currentTime!==this.video.duration&&this.setState(i.PAUSED))},progress:function(){var i=this.getDuration();if(!(0>=i||i===1/0)){var n=this.video.buffered;if(n&&0!==n.length){var r=t.between(n.end(n.length-1)/i,0,1);this.trigger(e.JWPLAYER_MEDIA_BUFFER,{bufferPercent:100*r,position:this.getCurrentTime(),duration:i})}}},ended:function(){if(this.stopStallCheck(),this._helperLastVideoHeight=0,this.state!==i.IDLE&&this.state!==i.COMPLETE){if(this.beforeComplete=!0,this.attached=!0,this.trigger(e.JWPLAYER_MEDIA_BEFORECOMPLETE),!this.attached)return;this.playbackComplete_()}},loadeddata:function(){this.setTextTracks(),this.video.setAttribute("jw-loaded","data")},error:function(){var t=this.video.error&&this.video.error.code||-1,i={1:"Unknown operation aborted",2:"Unknown network error",3:"Unknown decode error",4:"Source not supported"}[t]||"Unknown";this.trigger(e.JWPLAYER_MEDIA_ERROR,{code:t,message:"Error playing file: "+i})}}}.apply(e,n),!(void 0!==r&&(t.exports=r))},140:function(t,e,i){var n,r;n=[i(1),i(45),i(2),i(6),i(4),i(3),i(93),i(91),i(92),i(90),i(307)],r=function(t,e,i,n,r,s,a,o,h,u,l){function c(c){function f(){B.addEventListener("error",b),B.addEventListener("adaptation",y),q.on("adaptation",function(t){var e=B.getConfiguration(),i=this.adaptation?this.adaptation.bandwidth:0,n={level:{index:q.currentQuality,label:q.currentQuality?t.size.height+"p":"Auto",bitrate:i,width:t.size.width,height:t.size.height},type:"visualQuality"};V?(n.reason="initial choice",n.mode="auto",V=!1):e.enableAdaptation?n.reason=n.mode="auto":(n.reason="api",n.mode="manual"),q.trigger("visualQuality",n)},q),t.each(L,function(t,e){O.addEventListener(e,t,!1)})}function p(){B.removeEventListener("error",b),B.removeEventListener("adaptation",y),q.off("adaptation"),t.each(L,function(t,e){O.removeEventListener(e,t)})}function d(t,e){var n,r,s;switch(t.toLowerCase()){case"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":case"edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":return i.isChrome()?(q.drmUsed="widevine",n="com.widevine.alpha",r=K.widevine,s=r?r.url:"",s||(console.log("No licensing server specified for widevine. Defaulting to proxy."),s="http://widevine-proxy.appspot.com/proxy"),[{keySystem:n,licenseServerUrl:s,licensePreProcessor:function(t){r&&r.customData&&(t.headers.customData=r.customData)}}]):null;case"urn:mpeg:dash:mp4protection:2011":n="org.w3.clearkey",r=K.clearkey;var a=l.util.Uint8ArrayUtils,o=r?r.key:null,h=e.getAttribute("cenc:default_KID");if(h=h?h.replace(/-/g,""):null,!o||!h)break;h=a.fromHex(h),o=a.fromHex(o);var u={kty:"oct",kid:a.toBase64(h,!1),k:a.toBase64(o,!1)},c={keys:[u]},f=JSON.stringify(c),p={initData:h,initDataType:"webm"};return s="data:application/json;base64,"+window.btoa(f),[{keySystem:n,licenseServerUrl:s,initData:p}];case"urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":case"9a04f079-9840-4286-ab92-e65be0885f95":return i.isIE()?(q.drmUsed="playready",n="com.microsoft.playready",r=K.playready,s=r?r.url:"",s||(console.log("No licensing server specified for microsoft. Defaulting to proxy."),s="http://microsoft-proxy.appspot.com/proxy"),[{keySystem:n,licenseServerUrl:s,licensePreProcessor:function(t){r&&r.customData&&(t.headers.customData=r.customData)}}]):null;default:return console.log("Unrecognized scheme: "+t,e),null}}function b(t){console.error(t);var e="Unknown playback error";q.trigger(r.JWPLAYER_MEDIA_ERROR,{message:"Error playing file:"+e})}function y(t){q.adaptation=t}function v(){return this.levels}function g(){return this.currentQuality}function m(t){return q._helperLastVideoHeight=0,new l.player.Player(t)}function w(t){q.attached&&(B=m(O),(i.isAndroid()||t.preload&&"none"!==t.preload)&&T(t))}function E(t){q.attached&&(p(),f(),this.setState(n.LOADING),this.loadedItem!==t?(this.drmUsed=null,V=!0,T(t)):(O.currentTime=0,O.play()))}function T(t){q.loadedItem=t;var e=t.sources[0].file,i=t.starttime;K=t.sources[0].drm||{};var n=new l.util.EWMABandwidthEstimator,r=new l.player.DashVideoSource(e,d,n),s=B.load(r);s.then(k.bind(q)),i&&s.then(function(){this.seek(i)}.bind(q))}function k(){if(q.attached){var t=B.getVideoTracks(),e=B.getAudioTracks();t.length>0?S(t,"video"):S(e,"audio"),q.trigger(r.JWPLAYER_MEDIA_BUFFER_FULL)}}function S(e,i){q.currentQuality=0,q.levels=t.map(e,function(t){var e={contentType:i,label:null,level_id:t.id};return t.height?e.label=t.height+"p":e.label=Math.round(t.bandwidth/1e3)+"kbps",e}),e.length>1&&q.levels.unshift({label:"Auto",level_id:"auto"}),q.trigger(r.JWPLAYER_MEDIA_LEVELS,{levels:q.levels,currentQuality:q.currentQuality})}function P(){this.video.pause(),this.setState(n.PAUSED)}function A(){return this.seeking?(this.setState(n.LOADING),void this.once(r.JWPLAYER_MEDIA_SEEKED,this.play)):(this.setState(n.LOADING),this.video.play(),void this.setVisibility(!0))}function j(t){this.attached&&(0>t&&(t+=this.video.duration),this.trigger(r.JWPLAYER_MEDIA_SEEK,{position:this.getCurrentTime(),offset:t}),this.seeking=!0,this.video.currentTime=t)}function M(t){t=!!t,t?e.style(x,{visibility:"visible",opacity:1}):e.style(x,{visibility:"",opacity:0})}function I(){B.unload(),x===O.parentNode&&x.removeChild(O)}function N(){this.attached&&(p(),this.loadedItem=null,B.destroy(),O.pause(),O.removeAttribute("src"),O.load(),this.setState(n.IDLE))}function R(t){x=t,x.appendChild(O)}function C(){return x}function D(t){if(t=parseInt(t,10),!(this.currentQuality===t||0>t||t>=this.levels.length)){if(this.currentQuality=t,this.trigger(r.JWPLAYER_MEDIA_LEVEL_CHANGED,{currentQuality:this.currentQuality,levels:this.levels}),0===t)B.configure({enableAdaptation:!0});else{var e=this.levels[t].level_id;B.configure({enableAdaptation:!1});var i;"audio"===this.levels[t].contentType?(i=_(B.getAudioTracks()),i&&i.id===e||(this.setState(n.LOADING),B.selectAudioTrack(e))):(i=_(B.getVideoTracks()),i&&i.id===e||(this.setState(n.LOADING),B.selectVideoTrack(e)))}O.play()}}function _(e){return t.find(e,function(t){return t.active})}var x,L={},U=document.getElementById(c),O=U?U.querySelector("video"):void 0;O=O||document.createElement("video"),this.video=O;var B,K,q=this,V=!0;this.adaptation=null,this.loadedItem=null,this.drmUsed=null,this.position=0,this.levels=[],this.currentQuality=-1,t.each(a,function(t,e){"function"==typeof t?L[e]=t.bind(q):q[e]=t}),t.extend(this,s,o,h,u,{eventsOn_:function(){B=m(O),f()},eventsOff_:function(){var t=O;B.destroy(),q.video=O=t,p()},init:w,load:E,pause:P,getQualityLevels:v.bind(this),getCurrentQuality:g.bind(this),play:A,seek:j,remove:I,setContainer:R,getContainer:C,setCurrentQuality:D.bind(this),setVisibility:M,stop:N,getCurrentTime:function(){return O.currentTime},getDuration:function(){return B.isLive()?1/0:O.duration},supportsFullscreen:t.constant(!0),getName:t.constant({name:"shaka"}),destroy:function(){p(),B.destroy()}})}return l.polyfill.installAll(),c.getName=t.constant({name:"shaka"}),c}.apply(e,n),!(void 0!==r&&(t.exports=r))},307:function(t,e,i){var n;!function(){var r={};(function(t){function e(t,e){var i=t.split("."),n=Yr;i[0]in n||!n.execScript||n.execScript("var "+i[0]);for(var r;i.length&&(r=i.shift());)i.length||void 0===e?n=n[r]?n[r]:n[r]={}:n[r]=e}function i(t,e){function i(){}i.prototype=e.prototype,t.Yb=e.prototype,t.prototype=new i,t.prototype.constructor=t,t.Xb=function(t,i,n){return e.prototype[i].apply(t,Array.prototype.slice.call(arguments,2))}}function n(){}function r(t){var e=console[t];e?e.bind||(console[t]=function(){e.apply(console,arguments)}):console[t]=function(){}}function s(t){Qr[t]={na:Jr(),end:NaN}}function a(t){(t=Qr[t])&&(t.end=Jr())}function o(t){return(t=Qr[t])&&t.end?t.end-t.na:NaN}function h(t,e,i){this.id=t,this.bandwidth=e||0,this.lang=i||"unknown",this.active=!1}function u(){this.minBandwidth=this.maxBandwidth=this.maxWidth=this.minHeight=this.maxHeight=null}function l(){this.fontSize="100%",this.fontColor=$r,this.fontOpacity=Zr,this.backgroundColor=Xr,this.backgroundOpacity=Zr,this.fontEdge=ts}function c(t){var e=[];e.push("font-size: "+t.fontSize),e.push("color: "+f(t.fontColor,t.fontOpacity)),e.push("background-color: "+f(t.backgroundColor,t.backgroundOpacity));for(var i=[],n=0;n<t.fontEdge.length;++n){var r=t.fontEdge[n].slice(3,6);i.push(f(t.fontEdge[n].slice(0,3),t.fontOpacity)+" "+r.join("px ")+"px")}return e.push("text-shadow: "+i.join(",")),e.join("; ")}function f(t,e){return"rgba("+t.concat(e).join(",")+")"}function p(t,e){this.id=t,this.lang=e||"unknown",this.enabled=this.active=!1}function d(t,e,i,n){this.id=t,this.bandwidth=e||0,this.width=i||0,this.height=n||0,this.active=!1}function b(t,e){var i=t.width*t.height,n=e.width*e.height;return n>i?-1:i>n?1:t.bandwidth<e.bandwidth?-1:t.bandwidth>e.bandwidth?1:0}function y(){var e="CustomEvent"in t;if(e)try{new CustomEvent("")}catch(i){e=!1}e||(t.CustomEvent=v)}function v(t,e){var i=document.createEvent("CustomEvent"),n=e||{bubbles:!1,cancelable:!1,detail:null};return i.initCustomEvent(t,!!n.bubbles,!!n.cancelable,n.detail),i}function g(){var t=Element.prototype;t.requestFullscreen=t.requestFullscreen||t.mozRequestFullScreen||t.msRequestFullscreen||t.webkitRequestFullscreen,t=Document.prototype,t.exitFullscreen=t.exitFullscreen||t.mozCancelFullScreen||t.msExitFullscreen||t.webkitExitFullscreen,"fullscreenElement"in document||Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement}}),document.addEventListener("webkitfullscreenchange",m),document.addEventListener("webkitfullscreenerror",m),document.addEventListener("mozfullscreenchange",m),document.addEventListener("mozfullscreenerror",m),document.addEventListener("MSFullscreenChange",m),document.addEventListener("MSFullscreenError",m)}function m(t){var e=t.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),e=new Event(e,t);t.target.dispatchEvent(e)}function w(){return Promise.reject(Error("The key system specified is not supported."))}function E(t){return null==t?Promise.resolve():Promise.reject(Error("MediaKeys not supported."))}function T(){throw new TypeError("Illegal constructor.")}function k(){throw new TypeError("Illegal constructor.")}function S(t){if(this.c=[],this.b=[],this.ba=es,t)try{t(this.W.bind(this),this.a.bind(this))}catch(e){this.a(e)}}function P(){t.Promise||(t.Promise=S,t.Promise.resolve=A,t.Promise.reject=j,t.Promise.all=M,t.Promise.race=I,t.setImmediate?(C=function(e){return t.setImmediate(e)},D=function(e){return t.clearImmediate(e)}):(C=function(e){return t.setTimeout(e,0)},D=function(e){return t.clearTimeout(e)}))}function A(t){var e=new S;return e.W(t),e}function j(t){var e=new S;return e.a(t),e}function M(t){function e(t,e,i){t.ba==es&&(r[e]=i,n++,n==r.length&&t.W(r))}var i=new S;if(!t.length)return i.W([]),i;for(var n=0,r=Array(t.length),s=i.a.bind(i),a=0;a<t.length;++a)t[a]&&t[a].then?t[a].then(e.bind(null,i,a),s):e(i,a,t[a]);return i}function I(t){for(var e=new S,i=e.W.bind(e),n=e.a.bind(e),r=0;r<t.length;++r)t[r]&&t[r].then?t[r].then(i,n):i(t[r]);return e}function N(t,e,i){ns.push(function(){if(i&&"function"==typeof i){try{var t=i(this.wa)}catch(n){return void e.a(n)}t instanceof S?t==e?e.a(new TypeError("Chaining cycle detected")):t.then(e.W.bind(e),e.a.bind(e)):e.W(t)}else 1==this.ba?e.W(this.wa):e.a(this.wa)}.bind(t)),null==is&&(is=C(R))}function R(){for(;ns.length;){null!=is&&(D(is),is=null);var t=ns;ns=[];for(var e=0;e<t.length;++e)t[e]()}}function C(){return 0}function D(){}function _(){var t=HTMLVideoElement.prototype;!t.getVideoPlaybackQuality&&"webkitDroppedFrameCount"in t&&(t.getVideoPlaybackQuality=x)}function x(){return{droppedVideoFrames:this.webkitDroppedFrameCount,totalVideoFrames:this.webkitDecodedFrameCount,corruptedVideoFrames:0,creationTime:NaN,totalFrameDelay:0}}function L(t,e){for(var i=[],n=0;n<t.length;++n){for(var r=!1,s=0;s<i.length&&!(r=e?e(t[n],i[s]):t[n]===i[s]);++s);r||i.push(t[n])}return i}function U(){return Date.now()+ss}function O(t){this.b=t,this.c=0==as,this.a=0}function B(t){return t.a<t.b.byteLength}function K(t){var e=t.b.getUint8(t.a);return t.a+=1,e}function q(t){var e=t.b.getUint32(t.a,t.c);return t.a+=4,e}function V(t){var e,i;if(t.c?(e=t.b.getUint32(t.a,!0),i=t.b.getUint32(t.a+4,!0)):(i=t.b.getUint32(t.a,!1),e=t.b.getUint32(t.a+4,!1)),i>2097151)throw new RangeError("DataViewReader: Overflow reading 64-bit value.");return t.a+=8,i*Math.pow(2,32)+e}function F(t){if(t.a+16>t.b.byteLength)throw new RangeError("DataViewReader: Read past end of DataView.");var e=new Uint8Array(t.b.buffer,t.a,16);return t.a+=16,e}function H(t,e){if(t.a+e>t.b.byteLength)throw new RangeError("DataViewReader: Skip past end of DataView.");t.a+=e}function z(t){this.b=t,this.a=new O(t),rs||(rs=[new Uint8Array([255]),new Uint8Array([127,255]),new Uint8Array([63,255,255]),new Uint8Array([31,255,255,255]),new Uint8Array([15,255,255,255,255]),new Uint8Array([7,255,255,255,255,255]),new Uint8Array([3,255,255,255,255,255,255]),new Uint8Array([1,255,255,255,255,255,255,255])])}function G(t){var e;if(e=W(t),7<e.length)throw new RangeError("EbmlParser: EBML ID must be at most 7 bytes.");for(var i=0,n=0;n<e.length;n++)i=256*i+e[n];e=i,i=W(t);t:{for(n=0;n<rs.length;n++)if(Zt(i,rs[n])){n=!0;break t}n=!1}if(n)i=t.b.byteLength-t.a.a;else{if(8==i.length&&224&i[1])throw new RangeError("EbmlParser: Variable sized integer value must be at most 53 bits.");for(var n=i[0]&(1<<8-i.length)-1,r=1;r<i.length;r++)n=256*n+i[r];i=n}return i=t.a.a+i<=t.b.byteLength?i:t.b.byteLength-t.a.a,n=new DataView(t.b.buffer,t.b.byteOffset+t.a.a,i),H(t.a,i),new Y(e,n)}function W(t){var e,i=K(t.a);for(e=1;8>=e&&!(i&1<<8-e);e++);if(e>8)throw new RangeError("EbmlParser: Variable sized integer must fit within 8 bytes.");var n=new Uint8Array(e);for(n[0]=i,i=1;e>i;i++)n[i]=K(t.a);return n}function Y(t,e){this.id=t,this.a=e}function J(t){if(8<t.a.byteLength)throw new RangeError("EbmlElement: Unsigned integer has too many bytes.");if(8==t.a.byteLength&&224&t.a.getUint8(0))throw new RangeError("EbmlParser: Unsigned integer must be at most 53 bits.");for(var e=0,i=0;i<t.a.byteLength;i++)var n=t.a.getUint8(i),e=256*e+n;return e}function Q(t){this.c=Math.exp(Math.log(.5)/t),this.a=this.b=0}function $(t){return t.b/(1-Math.pow(t.c,t.a))}function X(t){var e,i=new CustomEvent(t.type,{detail:t.detail,bubbles:!!t.bubbles});for(e in t)e in i||(i[e]=t[e]);return i}function Z(t){return new CustomEvent("error",{detail:t,bubbles:!0})}function tt(t,e,i){return et(e),et(i),i==e||t>=hs&&i==e.split("-")[0]||t>=us&&i.split("-")[0]==e.split("-")[0]}function et(t){t=t.toLowerCase().split("-");var e=ls[t[0]];return e&&(t[0]=e),t.join("-")}function it(t){return Object.keys(t).map(function(e){return t[e]})}function nt(t,e){return at(t,e,"boolean")}function rt(t,e){var i=at(t,e,"number");if(null==i)return null;if(isNaN(i)||i==Number.NEGATIVE_INFINITY||i==Number.POSITIVE_INFINITY)throw new RangeError("'"+e+"' must be finite.");if(0>i)throw new RangeError("'"+e+"' must be >= 0");return i}function st(t,e){return at(t,e,"string")}function at(t,e,i){if(t=t[e],null==t)return null;if(typeof t!=i)throw new TypeError("'"+e+"' must be a "+i+".");return t}function ot(t,e,i){if(t=t[e],null==t)return null;if(!(t instanceof i))throw new TypeError("'"+e+"' must be an instance of "+i.name+".");return t}function ht(){this.a={}}function ut(t){var e,i=[];for(e in t.a)i.push.apply(i,t.a[e]);return i}function lt(t,e,i){if(t=t.a[e])for(e=0;e<t.length;++e)t[e]==i&&(t.splice(e,1),--e)}function ct(t){var e,i=[];for(e in t.a)i.push(e);return i}function ft(){this.a=new ht}function pt(t,e,i,n){e=new bt(e,i,n),t.a.push(i,e)}function dt(t){for(var e=ut(t.a),i=0;i<e.length;++i)e[i].sa();t.a.a={}}function bt(t,e,i){this.target=t,this.type=e,this.a=i,this.target.addEventListener(e,i,!1)}function yt(t){this.ya=new ht,this.v=t}function vt(t,e){e.currentTarget=t;for(var i=t.ya.get(e.type)||[],n=0;n<i.length;++n){var r=i[n];try{r.handleEvent?r.handleEvent(e):r.call(t,e)}catch(s){}}return t.v&&e.bubbles&&vt(t.v,e),e.defaultPrevented}function gt(){yt.call(this,null),this.a=new Q(3),this.c=new Q(10),this.b=0}function mt(){var t,e,i=new Promise(function(i,n){t=i,e=n});return i.resolve=t,i.reject=e,i.destroy=mt.prototype.destroy,i}function wt(t){return t.split("").reduce(function(t,e,i){return t+(i&&0==i%4?" "+e:e)})}function Et(){this.g=new mt,this.f=!1,this.a=null,this.b=[],this.c=null}function Tt(t,e){if(t.f)throw Error("Cannot append to a running task!");t.b.push(e)}function kt(t,e){var i,n=t.b[0](e);n?(i=n[0],t.c=n[1]):(i=Promise.resolve(),t.c=null),i.then(Pt(t,function(t){this.a?(this.b=[],this.c=null,St(this)):(this.b.shift(),this.b.length?kt(this,t):(this.g.resolve(t),this.c=null))}))["catch"](Pt(t,function(t){this.b=[],this.c=null,this.a?St(this):this.g.reject(t)}))}function St(e){var i=Error("Task aborted.");i.type="aborted",e.g.reject(i),t.setTimeout(function(){this.a.resolve(),this.a=null}.bind(e),5)}function Pt(t,e){return e.bind(t)}function At(t,e){yt.call(this,e),this.a=null,this.h=t}function jt(e){if(!t.indexedDB)return e=Error("Persistant storage requires IndexedDB support."),e.type="storage",Promise.reject(e);if(e.a)return e=Error("A database connection is already open."),e.type="storage",Promise.reject(e);var i=new mt,n=t.indexedDB.open("content_database",1);return n.onupgradeneeded=Pt(e,function(t){this.a=t.target.result,It(this,"group_store",{keyPath:"group_id"}),It(this,"stream_index_store",{keyPath:"stream_id"}),t=It(this,"content_store",{autoIncrement:"true"}),t.createIndex("segment",["stream_id","segment_id"],{unique:!0}),t.createIndex("stream","stream_id",{unique:!1})}),n.onsuccess=Pt(e,function(t){this.a=t.target.result,i.resolve()}),n.onerror=function(){i.reject(n.error)},i}function Mt(t){t.a&&(t.a.close(),t.a=null)}function It(t,e,i){return t.a.objectStoreNames.contains(e)&&t.a.deleteObjectStore(e),t.a.createObjectStore(e,i)}function Nt(t){return Dt(t,"content_store")}function Rt(t){return Dt(t,"stream_index_store")}function Ct(t){return Dt(t,"group_store")}function Dt(t,e){return t.a.transaction([e],t.h).objectStore(e)}function _t(t,e){var i=new mt,n=t.get(e);return n.onerror=function(){i.reject(n.error)},n.onsuccess=function(){if(n.result)i.resolve(n.result);else{var t=Error("Item not found.");t.type="storage",i.reject(t)}},i}function xt(){At.call(this,"readonly",null)}function Lt(t){var e=new mt,i=[],n=Ct(t).openCursor();return n.onerror=function(){e.reject(n.error)},n.onsuccess=function(t){(t=t.target.result)?(i.push(t.key),t["continue"]()):e.resolve(i)},e}function Ut(t,e){return _t(Ct(t),e).then(Pt(t,function(t){return t.session_ids=L(t.session_ids),t.hasOwnProperty("duration")||t.hasOwnProperty("key_system")?Promise.resolve(t):Ot(this,t.stream_ids[0]).then(function(e){return t.duration=e.duration,t.key_system=e.key_system,t.license_server=e.license_server,t.with_credentials=e.with_credentials,t.distinctive_identifier=e.distinctive_identifier,t.audio_robustness=e.audio_robustness,t.video_robustness=e.video_robustness,Promise.resolve(t)})}))}function Ot(t,e){return _t(Rt(t),e)}function Bt(t,e,i){return _t(Nt(t).index("segment"),[e,i]).then(function(t){return Promise.resolve(t.content)})}function Kt(t,e,i){MediaSource.isTypeSupported(e),e=t.addSourceBuffer(e),this.i=t,this.c=e,this.l=i,this.j=new ft,this.g=null,this.b=[],this.w=0,this.f=this.a=null,this.s=0,pt(this.j,this.c,"updateend",this.B.bind(this))}function qt(t,e){for(var i=t.c.buffered,n=0;n<i.length;++n){var r=i.start(n)-cs,s=i.end(n)+cs;if(e>=r&&s>=e)return i.end(n)-e}return 0}function Vt(t,e,i,n){if(t.a)return t=Error("Cannot fetch ("+t.v+"): previous operation not complete."),t.type="stream",Promise.reject(t);t.a=new Et,i!=t.c.timestampOffset&&(t.c.timestampOffset=i),"idb"!=e.url.b[0].P||t.g||(t.g=new xt,Tt(t.a,function(){return[jt(this.g)]}.bind(t))),n&&Tt(t.a,function(){return[Wt(this,n),this.h.bind(this)]}.bind(t)),Tt(t.a,function(){var t=e.a?e.a-e.b:1,i=new wi;return i.a=3,i.h=1e3*t,i.c=1e3*this.s,i.i=this.g,[Mi(e.url,i,this.l),Ai.prototype.g.bind(e.url)]}.bind(t)),Tt(t.a,Pt(t,function(t){return this.l.getBandwidth(),[Wt(this,t),this.h.bind(this)]}));var r=0==t.c.buffered.length&&0==t.b.length,s=null;return Tt(t.a,function(){if(0==this.c.buffered.length){var t=Error("Failed to buffer segment ("+this.v+").");return t.type="stream",[Promise.reject(t)]}r&&(t=e.b,s=this.c.buffered.start(0)-t),t=Bi(this.b,e.b),t>=0?this.b.splice(t+1,0,e):this.b.push(e)}.bind(t)),Gt(t).then(function(){return Promise.resolve(s)}.bind(t))}function Ft(t){return t.a?(t=Error("Cannot clear ("+t.v+"): previous operation not complete."),t.type="stream",Promise.reject(t)):(t.a=new Et,Tt(t.a,function(){var t;t:if(0==this.c.buffered.length)t=Promise.resolve();else{try{this.c.remove(0,this.i.duration)}catch(e){t=Promise.reject(e);break t}this.b=[],t=this.f=new mt}return[t,this.h.bind(this)]}.bind(t)),Gt(t))}function Ht(t,e){if(t.a){var i=Error("Cannot clearAfter ("+t.v+"): previous operation not complete.");return i.type="stream",Promise.reject(i)}return t.a=new Et,Tt(t.a,function(){return[Yt(this,e),this.h.bind(this)]}.bind(t)),Gt(t)}function zt(t){return t.a?(t=t.a,t.a?t=t.a:t.f?(t.c&&t.c(),t.a=new mt,t=t.a):(t.f=!0,t=Promise.resolve())):t=Promise.resolve(),t}function Gt(t){return t.a.start(),t.a.g.then(Pt(t,function(){this.a=null}))["catch"](Pt(t,function(t){return this.a=null,Promise.reject(t)}))}function Wt(t,e){try{t.c.appendBuffer(e)}catch(i){return Promise.reject(i)}return t.f=new mt,t.f}function Yt(t,e){if(0==t.c.buffered.length)return Promise.resolve();var i=Bi(t.b,e);if(-1==i||i==t.b.length-1)return Promise.resolve();try{t.c.remove(t.b[i+1].b,t.i.duration)}catch(n){return Promise.reject(n)}return t.b=t.b.slice(0,i+1),t.f=new mt,t.f}function Jt(t){return String.fromCharCode.apply(null,t)}function Qt(t){for(var e=new Uint8Array(t.length),i=0;i<t.length;++i)e[i]=t.charCodeAt(i);return e}function $t(e){return Qt(t.atob(e.replace(/-/g,"+").replace(/_/g,"/")))}function Xt(t){for(var e="",i=0;i<t.length;++i){var n=t[i].toString(16);1==n.length&&(n="0"+n),e+=n}return e}function Zt(t,e){if(!t&&!e)return!0;if(!t||!e||t.length!=e.length)return!1;for(var i=0;i<t.length;++i)if(t[i]!=e[i])return!1;return!0}function te(){this.h=this.a="",this.i=!1,this.s=this.l=null,this.v=this.g=!1,this.j=this.f="",this.c=null,this.b=[]}function ee(t){var e=new te;if(!t)return e;var i=st(t,"keySystem");if(null==i)throw Error("'keySystem' cannot be null.");e.a=i;var n=st(t,"licenseServerUrl");if(null!=n)e.h=n;else if(i)throw Error("For encrypted streaming content, 'licenseServerUrl' cannot be null or empty.");if(i=nt(t,"withCredentials"),null!=i&&(e.i=i),i=ot(t,"licensePostProcessor",Function),null!=i&&(e.l=i),i=ot(t,"licensePreProcessor",Function),null!=i&&(e.s=i),i=nt(t,"distinctiveIdentifierRequired"),null!=i&&(e.g=i),i=nt(t,"persistentStateRequired"),null!=i&&(e.v=i),i=st(t,"audioRobustness"),null!=i&&(e.f=i),i=st(t,"videoRobustness"),null!=i&&(e.j=i),i=ot(t,"serverCertificate",Uint8Array),null!=i&&(e.c=i),i=ot(t,"initData",Object)){if(t=ot(i,"initData",Uint8Array),null==t)throw Error("'initData.initData' cannot be null.");if(i=st(i,"initDataType"),null==i)throw Error("'initData.initDataType' cannot be null.");e.b.push({initData:new Uint8Array(t.buffer),initDataType:i})}return e}function ie(t,e){var i=new te;return i.a=t.a,i.h=t.h,i.i=t.i,i.l=t.l,i.s=t.s,i.g=t.g,i.v=t.v,i.f=t.f,i.j=t.j,i.c=t.c?new Uint8Array(t.c.buffer):null,ne(i,t.b),ne(i,e.b),i}function ne(t,e){var i=t.b.concat(e.map(function(t){return{initData:new Uint8Array(t.initData.buffer),initDataType:t.initDataType}}));t.b=L(i,re)}function re(t,e){return t.initDataType==e.initDataType&&Zt(t.initData,e.initData)}function se(t,e){try{var i=new oe(t,e);return Promise.resolve(i)}catch(n){return Promise.reject(n)}}function ae(t){var e=this.mediaKeys;return e&&e!=t&&ue(e,null),delete this.mediaKeys,(this.mediaKeys=t)&&ue(t,this),Promise.resolve()}function oe(t,e){this.a=this.keySystem=t;var i=!0;"org.w3.clearkey"==t&&(this.a="webkit-org.w3.clearkey",i=!1);var n,r=!1;n=document.getElementsByTagName("video"),n=n.length?n[0]:document.createElement("video");for(var s=0;s<e.length;++s){var a=e[s],o={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:a.initDataTypes,sessionTypes:["temporary"]},h=!1;if(a.audioCapabilities)for(var u=0;u<a.audioCapabilities.length;++u){var l=a.audioCapabilities[u];l.contentType&&(h=!0,n.canPlayType(l.contentType.split(";")[0],this.a)&&(o.audioCapabilities.push(l),r=!0))}if(a.videoCapabilities)for(u=0;u<a.videoCapabilities.length;++u)l=a.videoCapabilities[u],l.contentType&&(h=!0,n.canPlayType(l.contentType,this.a)&&(o.videoCapabilities.push(l),r=!0));if(h||(r=n.canPlayType("video/mp4",this.a)||n.canPlayType("video/webm",this.a)),"required"==a.persistentState&&(i?(o.persistentState="required",o.sessionTypes=["persistent-license"]):r=!1),r)return void(this.b=o)}throw i="Unsupported keySystem","org.w3.clearkey"!=t&&"com.widevine.alpha"!=t||(i="None of the requested configurations were supported."),i=Error(i),i.name="NotSupportedError",i.code=DOMException.NOT_SUPPORTED_ERR,i}function he(t){this.g=t,this.b=null,this.a=new ft,this.c=[],this.f={}}function ue(t,e){t.b=e,dt(t.a),e&&(pt(t.a,e,"webkitneedkey",t.Ob.bind(t)),pt(t.a,e,"webkitkeymessage",t.Nb.bind(t)),pt(t.a,e,"webkitkeyadded",t.Lb.bind(t)),pt(t.a,e,"webkitkeyerror",t.Mb.bind(t)))}function le(t,e){var i=t.f[e];return i?i:(i=t.c.shift())?(i.sessionId=e,t.f[e]=i):null}function ce(t,e,i){yt.call(this,null),this.f=t,this.h=!1,this.a=this.b=null,this.c=e,this.g=i,this.sessionId="",this.expiration=NaN,this.closed=new mt,this.keyStatuses=new de}function fe(t,e,i){if(t.h)return Promise.reject(Error("The session is already initialized."));t.h=!0;var n;try{if("persistent-license"==t.g)if(i)n=Qt("LOAD_SESSION|"+i);else{var r=new Uint8Array(e);n=Qt("PERSISTENT|"+Jt(r))}else n=new Uint8Array(e)}catch(s){return Promise.reject(s)}t.b=new mt;try{t.f.webkitGenerateKeyRequest(t.c,n)}catch(a){if("InvalidStateError"!=a.name)return t.b=null,Promise.reject(a);setTimeout(function(){try{this.f.webkitGenerateKeyRequest(this.c,n)}catch(t){this.b.reject(t),this.b=null}}.bind(t),10)}return t.b}function pe(t,e){t.keyStatuses.Ma(e);var i=X({type:"keystatuseschange"});t.dispatchEvent(i)}function de(){this.size=0,this.a=void 0}function be(t){this.systemIds=[],this.cencKeyIds=[],this.a=[],t=new O(new DataView(t.buffer));try{for(;B(t);){var e=t.a,i=q(t),n=q(t);if(1==i?i=V(t):0==i&&(i=t.b.byteLength-e),1886614376!=n)H(t,i-(t.a-e));else{var r=K(t);if(r>1)H(t,i-(t.a-e));else{H(t,3);var s=Xt(F(t)),a=[];if(r>0)for(var o=q(t),h=0;o>h;++h){var u=Xt(F(t));a.push(u)}var l=q(t);H(t,l),this.cencKeyIds.push.apply(this.cencKeyIds,a),this.systemIds.push(s),this.a.push({start:e,end:t.a-1}),t.a!=e+i&&H(t,i-(t.a-e))}}}}catch(c){}}function ye(t,e){try{var i=new ve(t,e);return Promise.resolve(i)}catch(n){return Promise.reject(n)}}function ve(t,e){this.keySystem=t;for(var i=!1,n=0;n<e.length;++n){var r=e[n],s={audioCapabilities:[],videoCapabilities:[],persistentState:"optional",distinctiveIdentifier:"optional",initDataTypes:r.initDataTypes,sessionTypes:["temporary"]},a=!1;if(r.audioCapabilities)for(var o=0;o<r.audioCapabilities.length;++o){var h=r.audioCapabilities[o];if(h.contentType){var a=!0,u=h.contentType.split(";")[0];MSMediaKeys.isTypeSupported(this.keySystem,u)&&(s.audioCapabilities.push(h),i=!0)}}if(r.videoCapabilities)for(o=0;o<r.videoCapabilities.length;++o)h=r.videoCapabilities[o],h.contentType&&(a=!0,u=h.contentType.split(";")[0],MSMediaKeys.isTypeSupported(this.keySystem,u)&&(s.videoCapabilities.push(h),i=!0));if(a||(i=MSMediaKeys.isTypeSupported(this.keySystem,"video/mp4")),"required"==r.persistentState&&(s.persistentState="required",s.sessionTypes=["persistent-license"]),i)return void(this.a=s);
}throw i=Error("Unsupported keySystem"),i.name="NotSupportedError",i.code=DOMException.NOT_SUPPORTED_ERR,i}function ge(t){var e=this.mediaKeys;return e&&e!=t&&we(e,null),delete this.mediaKeys,(this.mediaKeys=t)?we(t,this):Promise.resolve()}function me(t){this.a=new MSMediaKeys(t),this.b=new ft}function we(t,e){function i(){e.msSetMediaKeys(n.a),e.removeEventListener("loadedmetadata",i)}if(dt(t.b),!e)return Promise.resolve();pt(t.b,e,"msneedkey",Te);var n=t;try{return 1<=e.readyState?e.msSetMediaKeys(t.a):e.addEventListener("loadedmetadata",i),Promise.resolve()}catch(r){return Promise.reject(r)}}function Ee(t){yt.call(this,null),this.c=null,this.g=t,this.b=this.a=null,this.f=new ft,this.sessionId="",this.expiration=NaN,this.closed=new mt,this.keyStatuses=new Pe}function Te(t){var e=t.initData;if(e){var i=new be(e);if(1>=i.a.length)t=e;else{var n=[];for(t=0;t<i.a.length;t++)n.push(e.subarray(i.a[t].start,i.a[t].end+1));for(e=L(n,ke),t=i=0;t<e.length;t++)i+=e[t].length;for(i=new Uint8Array(i),t=n=0;t<e.length;t++)i.set(e[t],n),n+=e[t].length;t=i}}else t=e;t=X({type:"encrypted",initDataType:"cenc",initData:t}),this.dispatchEvent(t)}function ke(t,e){return Zt(t,e)}function Se(t,e){t.keyStatuses.Ma(e);var i=X({type:"keystatuseschange"});t.dispatchEvent(i)}function Pe(){this.size=0,this.a=void 0}function Ae(){Navigator.prototype.requestMediaKeySystemAccess&&MediaKeySystemAccess.prototype.getConfiguration||(HTMLMediaElement.prototype.webkitGenerateKeyRequest?(fs=new Uint8Array([0]).buffer,Navigator.prototype.requestMediaKeySystemAccess=se,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ae,t.MediaKeys=he,t.MediaKeySystemAccess=oe):t.MSMediaKeys?(ps=new Uint8Array([0]).buffer,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=ge,t.MediaKeys=me,t.MediaKeySystemAccess=ve,Navigator.prototype.requestMediaKeySystemAccess=ye):(Navigator.prototype.requestMediaKeySystemAccess=w,delete HTMLMediaElement.prototype.mediaKeys,HTMLMediaElement.prototype.mediaKeys=null,HTMLMediaElement.prototype.setMediaKeys=E,t.MediaKeys=T,t.MediaKeySystemAccess=k))}function je(t){var e;t instanceof je?(Me(this,t.P),this.ca=t.ca,this.S=t.S,Ie(this,t.ia),this.O=t.O,Ne(this,t.a.clone()),this.aa=t.aa):t&&(e=String(t).match(ds))?(Me(this,e[1]||"",!0),this.ca=Re(e[2]||""),this.S=Re(e[3]||"",!0),Ie(this,e[4]),this.O=Re(e[5]||"",!0),Ne(this,e[6]||"",!0),this.aa=Re(e[7]||"")):this.a=new _e(null)}function Me(t,e,i){t.P=i?Re(e,!0):e,t.P&&(t.P=t.P.replace(/:$/,""))}function Ie(t,e){if(e){if(e=Number(e),isNaN(e)||0>e)throw Error("Bad port number "+e);t.ia=e}else t.ia=null}function Ne(t,e,i){e instanceof _e?t.a=e:(i||(e=Ce(e,gs)),t.a=new _e(e))}function Re(t,e){return t?e?decodeURI(t):decodeURIComponent(t):""}function Ce(t,e,i){return"string"==typeof t?(t=encodeURI(t).replace(e,De),i&&(t=t.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),t):null}function De(t){return t=t.charCodeAt(0),"%"+(t>>4&15).toString(16)+(15&t).toString(16)}function _e(t){this.b=t||null}function xe(t,e,i){if(!t.a&&(t.a={},t.c=0,t.b))for(var n=t.b.split("&"),r=0;r<n.length;r++){var s=n[r].indexOf("="),a=null,o=null;s>=0?(a=n[r].substring(0,s),o=n[r].substring(s+1)):a=n[r],a=decodeURIComponent(a.replace(/\+/g," ")),o=o||"",xe(t,a,decodeURIComponent(o.replace(/\+/g," ")))}t.b=null,(n=t.a.hasOwnProperty(e)&&t.a[e])||(t.a[e]=n=[]),n.push(i),t.c++}function Le(){this.id=this.url=null,this.type="static",this.b=this.j=this.u=this.hb=null,this.h=5,this.f=this.c=this.g=null,this.i=1,this.a=[]}function Ue(){this.g=this.f=this.c=this.u=this.a=this.start=this.id=null,this.b=[]}function Oe(){this.i=this.b=this.height=this.width=this.contentType=this.lang=this.group=this.id=null,this.c=!1,this.h=this.g=this.f=this.u=null,this.j=[],this.a=[]}function Be(){this.value=null}function Ke(){this.contentType=this.lang=this.id=null}function qe(){this.a=this.b=this.g=this.u=this.h=this.f=this.height=this.width=this.bandwidth=this.lang=this.id=null,this.c=[]}function Ve(){this.b=this.a=this.c=this.f=null}function Fe(){this.parsedPssh=this.psshBox=null}function He(){this.url=null}function ze(){this.url=null}function Ge(){this.u=null,this.g=1,this.c=this.b=this.a=this.f=null}function We(){this.a=this.url=null}function Ye(){this.a=this.url=null}function Je(){this.u=null,this.f=1,this.b=this.g=null,this.i=1,this.h=null,this.a=[],this.c=null}function Qe(){this.a=this.b=null}function $e(){this.a=1,this.b=this.i=null,this.j=1,this.c=this.g=this.f=this.h=null}function Xe(){this.a=[]}function Ze(){this.c=this.a=this.b=null}function ti(t,e){this.na=t,this.end=e}function ei(t){for(var e=[],i=0;i<t.b.length;++i){var n=t.b[i];null!=n.group&&(e[n.group]=!0)}for(i=0;i<t.b.length;++i)if(n=t.b[i],null==n.group){for(var r=1;1==e[r];)++r;e[r]=!0,n.group=r}}function ii(t,e){if(!e||0===e.length)return t;for(var i=[],n=0;n<e.length;n++){var r=e[n].url;null==t||0===t.length?i.push(new je(r)):(r=ni(t.slice(0,1),r),i.push(r[0]))}return i}function ni(t,e){if(!e)return t;var i=new je(e);return t?t.map(function(t){return t.resolve(i)}):[i]}function ri(t,e,i){var n=li(i);return(e=ai(e,i.constructor.TAG_NAME))&&n.parse(t,e),n}function si(t,e,i){var n=null;return(e=ai(e,i.TAG_NAME))&&(n=new i,n.parse(t,e)),n}function ai(t,e){for(var i=null,n=0;n<t.childNodes.length;n++)if(t.childNodes[n].tagName==e){if(i)return null;i=t.childNodes[n]}return i}function oi(t,e,i){for(var n=[],r=0;r<e.childNodes.length;r++)if(e.childNodes[r].tagName==i.TAG_NAME){var s=new i;s.parse.call(s,t,e.childNodes[r]),n.push(s)}return n}function hi(t){return t=t.firstChild,t.nodeType!=Node.TEXT_NODE?null:t.nodeValue}function ui(t){return t?t.map(function(t){return t.clone()}):null}function li(t){return t?t.clone():null}function ci(t,e,i,n){return t=i(t.getAttribute(e)),null!=t?t:void 0!==n?n:null}function fi(t){return t?(t=Date.parse(t),isNaN(t)?null:Math.floor(t/1e3)):null}function pi(e){if(!e)return null;var i=/^P(?:([0-9]*)Y)?(?:([0-9]*)M)?(?:([0-9]*)D)?(?:T(?:([0-9]*)H)?(?:([0-9]*)M)?(?:([0-9.]*)S)?)?$/.exec(e);if(!i)return null;e=0;var n=vi(i[1]);return n&&(e+=31536e3*n),(n=vi(i[2]))&&(e+=2592e3*n),(n=vi(i[3]))&&(e+=86400*n),(n=vi(i[4]))&&(e+=3600*n),(n=vi(i[5]))&&(e+=60*n),i=t.parseFloat(i[6]),(i=isNaN(i)?null:i)&&(e+=i),e}function di(t){var e=/([0-9]+)-([0-9]+)/.exec(t);return e?(t=vi(e[1]),null==t?null:(e=vi(e[2]),null==e?null:new ti(t,e))):null}function bi(e){return e=t.parseInt(e,10),isNaN(e)?null:e}function yi(e){return e=t.parseInt(e,10),e>0?e:null}function vi(e){return e=t.parseInt(e,10),e>=0?e:null}function gi(t){return t}function mi(t,e){this.url=t,this.b=e||new wi,this.g=this.i=this.h=0,this.a=null,this.c=new mt,this.f=null}function wi(){this.body=null,this.a=1,this.h=1e3,this.c=0,this.method="GET",this.f="arraybuffer",this.b={},this.g=this.j=!1,this.i=null}function Ei(t){Ti(t),t.b.body=null,t.c.destroy(),t.c=null,t.f=null}function Ti(t){t.a&&(t.a.onload=null,t.a.onreadystatechange=null,t.a.onerror=null,t.a.ontimeout=null),t.a=null}function ki(t){var e=t.url.split("/");return Bt(t.b.i,parseInt(e[2],10),parseInt(e[3],10)).then(Pt(t,function(t){var e=JSON.parse(JSON.stringify(new XMLHttpRequest));return e.response=t,t=this.c,t.resolve(e),Ei(this),t}))["catch"](Pt(t,function(t){return Ei(this),Promise.reject(t)}))}function Si(t,e,i){return e=Error(e),e.type=i,e.status=t.a.status,e.url=t.url,e.method=t.b.method,e.body=t.b.body,e.xhr=t.a,e}function Pi(e){Ti(e),t.setTimeout(e.rb.bind(e),e.g*(1+.5*(2*Math.random()-1))),e.g*=2}function Ai(t,e,i,n){this.b=e,this.f=i||0,this.i=null!=n?n:null,this.c=this.a=null,this.j=t,this.h=null}function ji(t,e){return t&&0!==t.length?t.map(function(t){return t.resolve(e)}):[e]}function Mi(t,e,i){return t.a?t.a:(e=e||new wi,(t.f||t.i)&&(e.b.Range="bytes="+(t.f+"-"+(null!=t.i?t.i:""))),t.a=Ii(t,0,e,i),t.a)}function Ii(t,e,i,n){var r=t.b[e].toString();return t.j&&(r=t.j(r,i.b)||r),t.c=new mi(r,i),n&&(t.c.f=n),r=t.c.rb().then(Pt(t,function(t){return this.h=this.c=this.a=null,this.h=t.a?new je(t.a):this.b[e],Promise.resolve(t.response)})),r=r["catch"](Pt(t,function(t){return this.a&&e+1<this.b.length?this.a=Ii(this,e+1,i,n):(this.a=this.c=null,Promise.reject(t))}))}function Ni(t,e){this.a=new wi,this.a.f="text",this.a.a=3,this.a.c=1e3*(null!=e?e:0),this.a.g=!0,this.b=t}function Ri(t){var e=t.b;return Mi(e,t.a).then(function(t){var i;i=e.b;var n=[e.h];return(i=(t=(new DOMParser).parseFromString(t,"text/xml"))?si({hb:i,u:n},t,Le):null)?Promise.resolve(i):(i=Error("MPD parse failure."),i.type="dash",Promise.reject(i))})}function Ci(t,e,i,n){for(var r=e.a,s=[],a=0;n>a;++a){var o=a+i,h=(o-1)*r.b,u=h/r.a,l=(h+r.b)/r.a,o=Di(t,e,r.j+o-1,h);if(!o)return null;s.push(new Ui(u,l,o))}return s}function Di(t,e,i,n){if(!e.a)return null;var r=e.a.h;return r?(i=_i(r,e.id,i,e.bandwidth,n))?(e=ji(e.u,i),new Ai(t,e,0,null)):null:e.u?new Ai(t,e.u,0,null):null}function _i(e,i,n,r,s){var a={RepresentationID:i,Number:n,Bandwidth:r,Time:s};e=e.replace(/\$(RepresentationID|Number|Bandwidth|Time)?(?:%0([0-9]+)d)?\$/g,function(e,i,n){if("$$"==e)return"$";var r=a[i];return null==r?e:("RepresentationID"==i&&n&&(n=void 0),e=r.toString(),n=t.parseInt(n,10)||1,n=Math.max(0,n-e.length),Array(n+1).join("0")+e)});try{return new je(e)}catch(o){if(o instanceof URIError)return null;throw o}}function xi(t,e,i){var n=0;e*=i,t=t.a,i=[];for(var r=0;r<t.length&&t[r].a;++r){var s=t[r].b,s=null!=s?s:n,a=t[r].c||0;0>a&&(a=t[r].a,a=r+1===t.length?Math.ceil((t[0].b+e-s)/a)-1:Math.ceil((t[r+1].b-s)/a)-1),0<i.length&&s!=n&&(i[i.length-1].end=s);for(var o=0;a>=o;++o)n=s+t[r].a,i.push({start:s,end:n}),s=n}return i}function Li(t,e){this.a=t,this.b=e||null}function Ui(t,e,i){this.b=t,this.a=e,this.url=i}function Oi(t,e,i){return new Ui(e,i,t.url)}function Bi(t,e){for(var i=t.length-1;i>=0;--i){var n=t[i];if(e>=n.b&&(null==n.a||e<n.a))return i}return-1}function Ki(t,e){return t.map(function(t){return Oi(t,t.b+e,null!=t.a?t.a+e:null)})}function qi(){}function Vi(t){this.o=t,this.i=0}function Fi(t){if(0==t.o.length)throw new RangeError("SegmentIndex: There is no first SegmentReference.");return t.o[0]}function Hi(t,e){if(t.i!=e.i&&(e=new Vi(Ki(e.o,t.i-e.i))),0==t.length())t.o=e.o.slice(0);else if(0!=e.length()&&null!=t.A().a&&!(null!=e.A().a&&e.A().a<t.A().a)){if(t.A().a<=Fi(e).b)var i=Oi(t.A(),t.A().b,Fi(e).b),i=t.o.slice(0,-1).concat([i]);else{var n;for(n=0;n<t.o.length&&!(t.o[n].a>=Fi(e).b);++n);t.o[n].b<Fi(e).b?(i=Oi(t.o[n],t.o[n].b,Fi(e).b),i=t.o.slice(0,n).concat([i])):(Fi(t).b>Fi(e).b||Fi(e),i=t.o.slice(0,n))}t.o=i.concat(e.o)}}function zi(t,e,i,n){Vi.call(this,t),this.g=e,this.w=i,this.f=n,this.h=this.g.b||this.g.a.reduce(function(t,e){return null==e.a?NaN:t+e.a},0)||0,this.a=this.l=this.c=null,Gi(this)}function Gi(t){if(Ji(t),0!=t.length()){t.length();var e=null!=t.A().a?t.A().a:t.A().b;if(t.g.c>t.f)t.c=e;else{var i=t.f-(t.g.c+t.w.start);0>i?t.c=e:i<Math.max(t.A().b,t.A().a||0)?(t.A(),t.c=e):t.c=i}t.l=t.A().b,t.a=Fi(t).b}}function Wi(t,e){if(Yi(t,e),null==t.c||null==t.l||null==t.a)return{start:0,end:0};var i=Number.POSITIVE_INFINITY;t.h&&(i=t.h);var n=e-t.f,r=t.c+n;return null!=t.g.f&&(r=r-t.a-t.g.f,r>0&&(t.a+=r)),t.a=Math.min(t.a,i),n=t.l+n,n<t.a?{start:t.a,end:t.a}:(n=0<t.length()?null!=t.A().a?Math.min(n,t.A().a):n:t.a,n=Math.max(n,t.a),n=Math.min(n,i),{start:t.a,end:n})}function Yi(t,e){if(Ji(t),null!=t.g.f)if(null==t.c)t.length();else{for(var i=t.c+(e-t.f),n=0,r=0;r<t.o.length;++r){var s=null;if(r<t.o.length-1?s=t.o[r+1].a:(s=t.o[r],s=null!=s.a?s.a+(s.a-s.b):null),!(null!=s&&s<i-t.g.f))break;++n}n>0&&t.o.splice(0,n)}}function Ji(t){if(t.h){for(var e=0,i=t.o.length-1;i>=0&&t.o[i].b>t.h;--i)++e;e>0&&t.o.splice(-e)}}function Qi(t,e,i,n,r){var s,a=1,o=0;if(t.c>n)s=null;else{var h=t.i||0,u=t.f||0;s=i.a,s=s.b/s.a;var l=n-(t.c+e.start);0>l?s=null:(u=l-2*s-u,0>u&&(u=0),u=Math.ceil(u/s)*s,l-=s,0>l?s=null:(h=Math.floor(l/s)*s-h,0>h&&(h=0),h=Math.floor(h/s)*s,s={Ya:u/s+1,current:(h>=u?h:u)/s+1}))}if(s&&(a=s.Ya,o=s.current-s.Ya+1),a=Ci(r,i,a,o),null==a)throw t=Error("Failed to generate SegmentReferences."),t.type="stream",t;zi.call(this,a,t,e,n),this.s=i,this.v=this.b=0<this.length()?t.c+e.start+this.A().a:null,this.j=s?s.current+1:null,this.B=r}function $i(t,e){if(null!=t.b&&null!=t.v&&null!=t.j){var i=t.s.a,i=i.b/i.a,n=Math.floor((t.v+(e-t.f)-t.b)/i);if(0!=n){var r=Ci(t.B,t.s,t.j,n);Array.prototype.push.apply(t.o,Ki(r,t.i)),t.b+=n*i,t.j+=n}}}function Xi(t,e,i,n,r){this.f=t,this.b=e,this.c=i,this.h=n,this.a=null,this.g=r}function Zi(t,e,i,n,r){this.c=t,this.b=e,this.g=i,this.a=null,this.h=n,this.f=r}function tn(t,e,i,n,r){this.b=t,this.c=e,this.f=i,this.h=n,this.a=null,this.g=r}function en(t){this.b=t,this.a=null}function nn(){this.C=Es++,this.id=this.H=this.I=null,this.c=0,this.height=this.width=this.bandwidth=null,this.b=this.a="",this.f=[],this.N=!1,this.J=!0}function rn(t){var e=t.a||"";return t.b&&(e+='; codecs="'+t.b+'"'),e}function sn(){this.C=Ts++,this.id=null,this.contentType=this.lang="",this.b=!1,this.m=[],this.a=[]}function an(t){for(var e=[],i=0;i<t.a.length;++i){var n=new un;n.id=t.C,n.a=t.a[i],n.contentType=t.contentType,n.b=t.m.length?rn(t.m[0]):"",e.push(n)}return e}function on(){this.id=null,this.start=0,this.b=null,this.a=[]}function hn(){this.b=!1,this.h=this.g=this.f=null,this.c=0,this.a=[]}function un(){this.id=0,this.a=null,this.b=this.contentType=""}function ln(t,e,i,n,r){yt.call(this,t),this.c=e,this.a=new Kt(i,n,r),this.w=this.G=this.b=null,this.K=!1,this.g=null,this.l=!1,this.i=null,this.s=!1,this.h=new mt,this.j=this.f=!1,this.B=0,this.L=15,this.D=!1}function cn(t,e,i){t.b&&!t.l&&(t.l=!0,vn(t),zt(t.a).then(Pt(t,function(){var t=this.c.currentTime;return!e&&0<qt(this.a,t)&&0<=Bi(this.a.b,t)?Promise.resolve():i?Ht(this.a,this.c.currentTime+i):(this.D=!0,Ft(this.a))})).then(Pt(t,function(){this.l=!1,yn(this,0)}))["catch"](Pt(t,function(t){this.l=!1,this.f?(t=Z(t),this.dispatchEvent(t)):this.h.reject(t)})))}function fn(t,e,i){t=t.a;var n=t.b.length;return t=n>0?t.b[n-1]:null,null!=t?null!=t.a?i.la(t.a):null:i.la(e)||(i.length()?i.A():null)}function pn(t){if(!t.s&&null!=t.i){t.s=!0;var e=t.a,i=t.i,n=i-e.w;0!=n&&(e.b=Ki(e.b,n),e.w=i),t.h.resolve(t.i)}}function dn(t,e){var i;i=e.a.split("/")[0],i=X({type:"adaptation",bubbles:!0,contentType:i,size:"video"!=i?null:{width:e.width,height:e.height},bandwidth:e.bandwidth}),t.dispatchEvent(i)}function bn(t){var e=X({type:"ended"});t.dispatchEvent(e)}function yn(e,i){e.g=t.setTimeout(e.Kb.bind(e),i)}function vn(e){null!=e.g&&(t.clearTimeout(e.g),e.g=null)}function gn(t){this.b=t,this.a=null}function mn(t,e){yt.call(this,t),this.b=e,this.g=!0,this.h=this.f=null,this.c=new mt,this.a=null}function wn(){}function En(t,e,i,n,r,s,a){this.g=t,this.i=e,this.f=i,this.a=n,this.c=r,this.j=s,this.b=null,this.h=a}function Tn(t){this.a=t}function kn(t,e,i){for(var n=U()/1e3,r=0;r<e.a.length;++r)for(var s=e.a[r],a=0;a<s.b.length;++a){var o=s.b[a];if("text"!=o.contentType)for(var h=0;h<o.a.length;++h){var u=o.a[h],l=0,l=l+(u.g?1:0),l=l+(u.b?1:0),l=l+(u.a?1:0);0==l?(o.a.splice(h,1),--h):1!=l&&(u.g?(u.b=null,u.a=null):u.b&&(u.a=null))}}for(Sn(e),r=0;r<e.a.length;++r)for(s=e.a[r],a=0;a<s.b.length;++a){for(h=o=s.b[a],u=null,l=0;l<h.a.length;++l){var c=h.a[l].f||"";u?c!=u&&(h.a.splice(l,1),--l):u=c}0==o.a.length&&(s.b.splice(a,1),--a)}for("dynamic"==e.type&&null==e.c&&(e.c=n),r=new hn,"dynamic"==e.type&&(r.b=!0,r.f=e.g,r.g=new Ai(i,e.j||e.url),r.h=e.c),r.c=e.h||5,s=0;s<e.a.length&&(a=e.a[s],null!=a.start);++s)a=Pn(t,e,a,n,i),r.a.push(a);return r}function Sn(t){if(t.a.length){null==t.a[0].start&&(t.a[0].start=0);var e=function(t){return 0==t||!!t};"dynamic"==t.type&&(t.b=null),e(t.b)&&1==t.a.length&&!e(t.a[0].a)&&(t.a[0].a=t.b);for(var i=0,n=!0,r=0;r<t.a.length;++r){var s=t.a[r-1],a=t.a[r],o=t.a[r+1]||{start:t.b};!e(a.start)&&s&&e(s.start)&&e(s.a)&&(a.start=s.start+s.a),!e(a.a)&&e(o.start)&&(a.a=o.start-a.start),null!=a.start&&null!=a.a?i+=a.a:n=!1}e(t.b)||(r=t.a[t.a.length-1],n?t.b=i:e(r.start)&&e(r.a)?t.b=r.start+r.a:"dynamic"!=t.type&&(t.b=i))}}function Pn(t,e,i,n,r){var s=new on;s.id=i.id,s.start=i.start,s.b=i.a;var a=new ht;i.b.forEach(function(t){a.push(t.contentType||"",t)});for(var o=ct(a),h=0;h<o.length;++h){var u=new ht;a.get(o[h]).forEach(function(t){u.push(t.group,t)});for(var l=ct(u),c=0;c<l.length;++c){var f=new ht;u.get(l[c]).forEach(function(t){f.push(t.lang,t)});for(var p=ct(f),d=0;d<p.length;++d){var b=f.get(p[d]),b=An(t,e,i,b,n,r);s.a.push(b)}}}return s}function An(t,e,i,r,s,a){n(r.every(function(t){return t.group==r[0].group&&(t.lang||"")==(r[0].lang||"")&&(t.contentType||"")==(r[0].contentType||"")}));var o=new sn,h=r.filter(function(t){return null!=t.id});h.length==r.length&&(o.id=h.map(function(t){return t.id}).sort().reduce(function(t,e){return t+","+e})),o.lang=r[0].lang||"",o.contentType=r[0].contentType||"",o.b=r.some(function(t){return t.c});for(var h={},u=0;u<r.length;++u)for(var l=r[u],c=0;c<l.a.length;++c){var f=l.a[c],p=In(t,f),d=o.a.slice(0);Mn(p,d),0==d.length&&0<o.a.length||!(f=Rn(e,i,f,s,a))||(o.m.push(f),o.a=d,h[f.C]=l)}if(o.a.some(function(t){return""==t.a}))return o.m.forEach(function(t){t.N=!0}),o;for(t=jn(r),u=0;u<o.m.length;++u)f=o.m[u],l=h[f.C],l==t&&(f.N=!0);return o}function jn(t){for(var e=null,i=null,n=0;n<t.length;++n)for(var r=t[n],s=0;s<r.a.length;++s){var a=r.a[s],a=(a.width||1)*(a.height||1)*(a.bandwidth||1);(null==e||e>a)&&(e=a,i=r)}return i}function Mn(t,e){if(0==e.length)Array.prototype.push.apply(e,t);else for(var i=0;i<e.length;++i){for(var n=!1,r=0;r<t.length;++r){var s=e[i],a=t[r];if(s.a==a.a&&s.h==a.h&&s.i==a.i&&s.g==a.g&&s.v==a.v&&s.f==a.f&&s.j==a.j&&Zt(s.c,a.c)){n=!0,ne(e[i],t[r].b);break}}n||(e.splice(i,1),--i)}}function In(t,e){var i=[];if(0==e.c.length)i.push(new te);else if(t.a)for(var n=0;n<e.c.length;++n)i.push.apply(i,Nn(t,e.c[n]));return i}function Nn(t,e){var i=[];if(2!=t.a.length)return[];var n=t.a(e.c||"",e.f);if(!(n&&n instanceof Array))return[];for(var r=0;r<n.length;++r){var s=ee(n[r]);0==s.b.length&&e.a&&e.a.psshBox&&ne(s,[{initData:e.a.psshBox,initDataType:"cenc"}]),i.push(s)}return i}function Rn(t,e,i,n,r){if(!i.u||0===i.u.length)return null;var s=null,a=1,o=0;if(i.g)s=i.f.split("/")[1],"mp4"!=s&&"webm"!=s?s=null:(a=i.g,("webm"!=s||a.c)&&(a.a||a.b&&a.b.a)?(o=a.b,o||(o=new We,o.url=i.u,o.a=a.a?a.a.clone():null),o=Dn(o,r),a=a.c?Dn(a.c,r):null,t=new En(t,e,s,o,a,n,r),e=new Li(a),n=new nn,n.I=t,n.H=e,s=n):s=null),a=i.g.g,o=i.g.f;else if(i.b)s=i.b,!s.b&&!s.c&&1<s.a.length?s=null:s.b||e.a||s.c||1!=s.a.length?s.c&&0===s.c.a.length?s=null:(s=s.h?Dn(s.h,r):null,t=new Zi(t,e,i,n,r),e=new Li(s),n=new nn,n.I=t,n.H=e,s=n):s=null,a=i.b.f,o=i.b.g;else if(i.a){t:if(s=i.a,a=0+(s.f?1:0),a+=s.c?1:0,a+=s.b?1:0,0==a?a=!1:(1!=a&&(s.f?(s.c=null,s.b=null):s.c&&(s.b=null)),a=!0),a){if(a=null,s.g&&(a=(s=i.a.g)?Cn(i,s,Ye):null,!a)){s=null;break t}s=a?Dn(a,r):null,a=i.a,a.f?(a=i.f.split("/")[1],"mp4"!=a&&"webm"!=a?t=null:("webm"!=a||s)&&Di(r,i,1,0)&&(o=(o=i.a.f)?Cn(i,o,We):null)?(o=Dn(o,r),t=new En(t,e,a,o,s,n,r)):t=null):t=a.h?a.c?new tn(t,e,i,n,r):a.b?"dynamic"!=t.type&&null==e.a?null:new Xi(t,e,i,n,r):null:null,t?(e=new Li(s),n=new nn,n.I=t,n.H=e,s=n):s=null}else s=null;a=i.a.a,o=i.a.i}else"text"==i.f.split("/")[0]&&(s=new nn,s.I=new gn(new Ai(r,i.u)));if(!s)return null;for(s.id=i.id,o&&(s.c=-1*o/a),s.bandwidth=i.bandwidth,s.width=i.width,s.height=i.height,s.a=i.f||"",s.b=i.h||"",t=0;t<i.c.length;++t)e=i.c[t],e.b&&s.f.push(e.b);return s}function Cn(t,e,i){return(e=_i(e,t.id,null,t.bandwidth,null))?(i=new i,i.url=ji(t.u,e),i):null}function Dn(t,e){var i=t.url,n=0,r=null;return t.a&&(n=t.a.na,r=t.a.end),new Ai(e,i,n,r)}function _n(){this.streamStats=null,this.droppedFrames=this.decodedFrames=NaN,this.bufferingTime=this.playTime=this.estimatedBandwidth=0,this.playbackLatency=NaN,this.bufferingHistory=[],this.bandwidthHistory=[],this.streamHistory=[]}function xn(t,e){var i=new Ln(e);t.streamHistory.push(new Un(i)),!i.videoHeight&&t.streamStats||(t.streamStats=i)}function Ln(t){this.videoWidth=t.width,this.videoHeight=t.height,this.videoMimeType=t.a,this.videoBandwidth=t.bandwidth}function Un(t){this.timestamp=U()/1e3,this.value=t}function On(t,e){At.call(this,"readwrite",e),this.j=t,this.b=0}function Bn(t,e,i,n,r){for(var s=[],a=[],o=0,h=0,u=[],l=e.map(function(t){return t.I.create()}),l=Promise.all(l),c=e.map(function(t){return t.H.create()}),c=Promise.all(c),l=Promise.all([l,c]).then(function(t){s=t[0],a=t[1],o=s.reduce(function(t,e){return t+e.length()},0)}),c=0;c<e.length;++c)l=l.then(function(t){return qn(this,e[t],s[t],a[t],o,h)}.bind(t,c)),l=l.then(function(t,e){h+=s[t].length(),u.push(e)}.bind(t,c));return l.then(Pt(t,function(){return Vn(Ct(this))})).then(Pt(t,function(t){var e=new mt;i=L(i);var s={group_id:t,stream_ids:u,session_ids:i,duration:n,key_system:r.a,license_server:r.h,with_credentials:r.i,distinctive_identifier:r.g,audio_robustness:r.f,video_robustness:r.j},a=Ct(this).put(s);return a.onsuccess=function(){e.resolve(t)},a.onerror=function(){e.reject(a.error)},e}))}function Kn(t,e){return _t(Ct(t),e).then(Pt(t,function(t){var i,n=[];for(i in t.stream_ids)n.push(Hn(this,t.stream_ids[i]));return t=Ct(this),n.push(t["delete"](e)),Promise.all(n)}))}function qn(t,e,i,n,r,s){var a=[Vn(Rt(t)),Vn(Nt(t).index("stream"))],a=Promise.all(a).then(Pt(t,function(t){return{qa:Math.max(t[0],t[1]),ja:new ArrayBuffer(0),Ja:0,o:[],Ca:null,Vb:r,ib:s}})),a=a.then(t.f.bind(t,i));return a=a.then(t.g.bind(t,e,n))}function Vn(t){var e=new mt,i=t.openCursor(null,"prev");return i.onsuccess=function(t){t.target.result?e.resolve(t.target.result.key+1):e.resolve(0)},i.onerror=function(){e.reject(i.error)},e}function Fn(t,e){var i=new Uint8Array(t.byteLength+e.byteLength);return i.set(new Uint8Array(t),0),i.set(new Uint8Array(e),t.byteLength),i.buffer}function Hn(t,e){var i=new mt,n=Rt(t)["delete"](e);n.onerror=function(){i.reject(n.error)};var r=Nt(t);return r.index("stream").openKeyCursor(IDBKeyRange.only(e)).onsuccess=function(t){(t=t.target.result)&&(r["delete"](t.primaryKey),t["continue"]())},r.transaction.oncomplete=function(){i.resolve()},i}function zn(t,e,i,n,r,s){this.b=new Ai(null,[new je(t)]),this.a=new wi,this.a.body=e,this.a.method=i,this.a.a=3,this.a.j=n,this.a.c=1e3*(null!=s?s:0),t=r||{};for(var a in t)this.a.b[a]=t[a]}function Gn(t){return Mi(t.b,t.a).then(function(t){return Promise.resolve(new Uint8Array(t))})}function Wn(t,e,i){yt.call(this,t),this.h=e,this.b=i,this.a=this.i=null,this.l=new ft,this.c=[],this.f=[],this.s=0,this.g=new mt,this.j=null,this.w=0}function Yn(e,i){return null==e.j&&(e.j=t.setTimeout(function(){var t=Error("Timeout waiting for sessions.");t.type="storage",this.g.reject(t)}.bind(e),i)),e.g}function Jn(t){return Promise.all(t.f.map(function(t){return t.remove()}))}function Qn(t,e,i){for(var n in e)i=i["catch"](function(t,e){return navigator.requestMediaKeySystemAccess(t,[e])}.bind(null,n,e[n]));return t.b.ha()&&(i=i["catch"](function(){throw Error("Either none of the requested key systems are supported or none of the requested key systems support persistent state.")})),i}function $n(t){return t.h?t.i?t.h.setMediaKeys(t.i).then(Pt(t,function(){return this.h?this.a.c?this.i.setServerCertificate(this.a.c):Promise.resolve():Xn()})).then(Pt(t,function(){if(!this.h)return Xn();if(0<this.b.ua().length)Zn(this);else{for(var t=0;t<this.a.b.length;++t){var e=this.a.b[t];this.B({type:"encrypted",initDataType:e.initDataType,initData:e.initData})}0==this.a.b.length&&pt(this.l,this.h,"encrypted",this.B.bind(this))}})):Promise.resolve():Xn()}function Xn(){var t=Error("EmeManager destroyed");return t.type="destroy",Promise.reject(t)}function Zn(t){for(var e=t.b.ua(),i=0;i<e.length;++i){var n=tr(t),r=n.load(e[i]);t.f.push(n),r.then(Pt(t,function(){this.s++,this.s>=this.f.length&&this.g.resolve()}))["catch"](Pt(t,function(t){t=Z(t),this.dispatchEvent(t)}))}}function tr(t){var e=null;if(t.b.ha())try{e=t.i.createSession("persistent-license")}catch(i){throw Error("Persistent licenses are not supported by this key system or platform.")}else e=t.i.createSession();return pt(t.l,e,"message",t.G.bind(t)),pt(t.l,e,"keystatuseschange",t.F.bind(t)),e}function er(t,e,i,n){n=ir(i,n),Gn(new zn(n.url,n.body,n.method,i.i,n.headers,t.w)).then(Pt(t,function(t){return i.l&&(t=i.l(t)),e.update(t)})).then(Pt(t,function(){var t=X({type:"sessionReady",detail:e});this.dispatchEvent(t),this.s++,this.s>=this.f.length&&this.g.resolve()}))["catch"](Pt(t,function(t){t.La=e,t=Z(t),this.dispatchEvent(t)}))}function ir(e,i){var n={url:e.h,body:i.slice(0),method:"POST",headers:{}};if("com.microsoft.playready"===e.a){for(var r=String.fromCharCode.apply(null,new Uint16Array(n.body)),r=(new DOMParser).parseFromString(r,"application/xml"),s=r.getElementsByTagName("name"),a=r.getElementsByTagName("value"),o=0;o<s.length;o++)n.headers[s[o].childNodes[0].nodeValue]=a[o].childNodes[0].nodeValue;n.body=t.atob(r.getElementsByTagName("Challenge")[0].childNodes[0].nodeValue)}if(!e.s)return n;if(e.s(n),n.url=st(n,"url"),null==n.url)throw Error("'url' cannot be null.");if(!(n.body instanceof ArrayBuffer||"string"==typeof n.body||null==n.body))throw new TypeError("'body' must be an ArrayBuffer, a string, or null.");if(n.method=st(n,"method"),"GET"!=n.method&&"POST"!=n.method)throw Error("'method' must be either 'GET' or 'POST'.");if(n.headers=ot(n,"headers",Object),null==n.headers)throw Error("'headers' cannot be null.");return n}function nr(t){yt.call(this,null),this.a=t,this.b=null,this.f=new ft,this.j=this.i=null,this.D=0,this.w=null,this.h=!1,this.g=new _n,this.c={enableAdaptation:!0,streamBufferSize:15,liveStreamEndTimeout:15,licenseRequestTimeout:0,mpdRequestTimeout:0,segmentRequestTimeout:0,preferredLanguage:"en",restrictions:new u},this.l=1,this.F=null}function rr(e){return"text/vtt"==e?!!t.VTTCue:MediaSource.isTypeSupported(e)}function sr(){var t=Error("Player destroyed");return t.type="destroy",Promise.reject(t)}function ar(e){e.j&&(t.clearTimeout(e.j),e.j=null)}function or(e){hr(e),e.w=t.setTimeout(e.L.bind(e),100)}function hr(e){e.w&&(t.clearTimeout(e.w),e.w=null)}function ur(t){a("buffering");var e=t.g;e.bufferingTime+=o("buffering")/1e3,t.h=!1,t.dispatchEvent(X({type:"bufferingEnd"}))}function lr(t){for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.a.length;++n){for(var r=i.a[n],s=r,a=0;a<s.m.length;++a)rr(rn(s.m[a]))||(s.m.splice(a,1),--a);0==r.m.length&&(i.a.splice(n,1),--n)}}function cr(t){for(var e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.a.length;++n)i.a[n].m.sort(fr)}function fr(t,e){var i=t.bandwidth||Number.MAX_VALUE,n=e.bandwidth||Number.MAX_VALUE;return n>i?-1:i>n?1:0}function pr(t){this.a=t}function dr(t){function e(t,e){return t.concat(e)}var i=t.a.map(function(t){return t.a}).reduce(e,[]).map(function(t){return t.m}).reduce(e,[]);return t=i.map(function(t){return t.I.create()}),Promise.all(t).then(function(t){for(var e={},n=0;n<i.length;++n)e[i[n].C]=t[n];return Promise.resolve(e)})}function br(t,e,i,n,r){var s=new ht;t.a.forEach(function(t,e){s.push(t.id||""+e,t)});var a=new ht;for(e.a.forEach(function(t,e){a.push(t.id||""+e,t)}),t=ct(s),e=0;e<t.length;++e){var o=t[e],h=s.get(o);1<h.length||(o=a.get(o))&&0!=o.length&&1==o.length&&(yr(h[0],o[0],i,n,r),h[0].b=o[0].b)}}function yr(t,e,i,n,r){var s=new ht;t.a.forEach(function(t,e){s.push(t.id||""+e,t)});var a=new ht;for(e.a.forEach(function(t,e){a.push(t.id||""+e,t)}),t=ct(s),e=0;e<t.length;++e){var o=t[e],h=s.get(o);1<h.length||(o=a.get(o))&&0!=o.length&&1==o.length&&vr(h[0],o[0],i,n,r)}}function vr(t,e,i,n,r){var s=new ht;t.m.forEach(function(t,e){s.push(t.id||""+e,t)});var a=new ht;e.m.forEach(function(t,e){a.push(t.id||""+e,t)}),e={};for(var o=ct(s),h=0;h<o.length;++h){var u=o[h];e[u]=u;var l=s.get(u);1<l.length||((u=a.get(u))&&0!=u.length?1==u.length&&(gr(l[0],u[0],i,n),l[0].H=u[0].H,u[0].H=null,l[0].c=u[0].c):(r.push(l[0]),t.m.splice(t.m.indexOf(l[0]),1)))}for(o=ct(a),h=0;h<o.length;++h)u=o[h],e[u]||(e[u]=u,u=a.get(u),t.m.push(u[0]))}function gr(t,e,i,n){t=i[t.C],e=n[e.C],t.length(),t.Ha(e)&&t.length()}function mr(){this.a=this.b=null,this.f=new ft,this.c=Number.POSITIVE_INFINITY,this.i=!0,this.g=!1}function wr(t){var e=t.a.ma();if(0==e.length)return null;e.sort(b);var i;t:{i=t.a.pa();for(var n=0;n<i.length;++n)if(i[n].active){i=i[n];break t}i=null}i=i?i.bandwidth:0,t=t.b.getBandwidth();for(var n=e[0],r=0;r<e.length;++r){var s=e[r],a=r+1<e.length?e[r+1]:{bandwidth:Number.POSITIVE_INFINITY};if(s.bandwidth&&(a=(a.bandwidth+i)/.85,t>=(s.bandwidth+i)/.95&&a>=t&&(n=s,n.active)))break}return n}function Er(t,e,i){yt.call(this,null),this.f=t,this.c=e,this.b=ee(i),this.a=null}function Tr(t,e,i){yt.call(this,null),this.a=t,this.Z=e,this.i=new ft,this.g=new MediaSource,this.f=null,this.da=0,this.b=new ht,this.G=i,this.G.initialize(e,this),this.L=!1,this.K="en",this.fa=!1,this.U=null,this.B=new mt,this.h=new u,this.D=null,this.Va=1,this.c={},this.ea=new mt,this.Ta=0,this.Ua=15,this.w=null,this.Ra=this.Sa=!1,this.s={},this.$=this.Y=this.V=null,this.F={}}function kr(e,i){if(null!=e.a.f){var n=Math.max(e.a.f,3),n=Math.max(n-i,0);e.V=t.setTimeout(e.gb.bind(e,!1),1e3*n)}}function Sr(t,e){var i=e.a.split("/")[0],n=t.c[i];if(n&&n.oa()==e){var r=t.b.get(e.a.split("/")[0]).map(function(t){return t.m}).reduce(function(t,e){return t.concat(e)},[]).filter(function(t){return t.N&&t.J});if(0==r.length)return i=Error("All usable streams have been removed from the manifest."),i.type="app",i=Z(i),void t.dispatchEvent(i);t.s[i].Pa==e&&delete t.s[i],n.ra(r[0],!0),e.destroy()}e.destroy()}function Pr(t){if(t.h){for(var e=!1,i=0;i<t.a.a.length;++i)for(var n=t.a.a[i],r=0;r<n.a.length;++r){var s=n.a[r];if("video"==s.contentType)for(var a=0;a<s.m.length;++a){var o=s.m[a],h=o.J;o.J=!0,t.h.maxWidth&&o.width>t.h.maxWidth&&(o.J=!1),t.h.maxHeight&&o.height>t.h.maxHeight&&(o.J=!1),t.h.minHeight&&o.height<t.h.minHeight&&(o.J=!1),t.h.maxBandwidth&&o.bandwidth>t.h.maxBandwidth&&(o.J=!1),t.h.minBandwidth&&o.bandwidth<t.h.minBandwidth&&(o.J=!1),h!=o.J&&(e=!0)}}0!=ut(t.b).length&&e&&(Ar(t),0<t.ma().length||(e=Error("The application has restricted all video tracks!"),e.type="app",e=Z(e),t.dispatchEvent(e)))}}function Ar(t){var e=X({type:"trackschanged",bubbles:!0});t.dispatchEvent(e)}function jr(t,e,i,n,r){if(!t.b.a.hasOwnProperty(e)||!t.c[e])return!1;for(var s=t.b.get(e),a=0;a<s.length;++a)for(var o=s[a],h=0;h<o.m.length;++h){var u=o.m[h];if(u.C==i)return u.N&&u.J?"text"==e||t.Ra?(xn(t.U,u),t.c[e].ra(u,n,r),!0):(i=t.s[e],t.s[e]={Pa:u,Wa:null!=i&&i.Wa||n,Xa:null!=i&&i.Xa||r},!0):!1}return!1}function Mr(t,e){for(var i=0;2>=i;++i)for(var n=0;n<e.length;++n){var r=e[n];if(tt(i,t.K,r.lang))return e.splice(n,1),void e.splice(0,0,r)}for(n=0;n<e.length;++n)if(r=e[n],r.b){e.splice(n,1),e.splice(0,0,r);break}}function Ir(e){for(var i=[],n=["audio","video","text"],r=0;r<n.length;++r){var s=n[r];e.b.a.hasOwnProperty(s)&&i.push(e.b.get(s)[0])}for(var a=Nr(e,i),r=0;r<n.length;++r)if(s=n[r],e.b.a.hasOwnProperty(s)&&!a[s])return e=Error("Unable to select an initial "+s+" stream: all "+s+" streams have been restricted (by the application or by the key system)."),e.type="stream",Promise.reject(e);return i=it(a).map(function(t){return t.I.create()}),Promise.all(i).then(Pt(e,function(t){return t.every(function(t){return t.length()})&&(t=Br(this,t))?Rr(this,a)?(this.G.start(),Dr(this,a,t),Promise.resolve()):(t=Error("Failed to create Stream objects."),t.type="stream",Promise.reject(t)):(t=Error("Some streams are not available."),t.type="stream",Promise.reject(t))}))["catch"](Pt(e,function(e){return"aborted"!=e.type?(Object.keys(this.c),this.a.b?(U()<this.a.h?(e=Math.max(this.a.h-Date.now()/1e3,3),this.V=t.setTimeout(this.gb.bind(this,!0),1e3*e)):kr(this,0),Promise.resolve()):Promise.reject(e)):void 0}))}function Nr(t,e){for(var i={},n=0;n<e.length;++n){var r=e[n],s=null;if("video"==r.contentType){var a=t.G.getInitialVideoTrackId();if(null==a)continue;if(s=r.m.filter(function(t){return t.C==a}),0==s.length)continue;s=s[0]}else if("audio"==r.contentType){if(s=r.m.filter(function(t){
return t.N&&t.J}),0==s.length)continue;s=r.m[Math.floor(s.length/2)]}else 0<r.m.length&&(s=r.m[0]);i[r.contentType]=s}return i}function Rr(t,e){var i,n={};for(i in e){var r=e[i],r="text"==i?new mn(t,t.f):Cr(t,r);if(!r)return it(n).forEach(function(t){t.destroy()}),!1;n[i]=r}return t.c=n,!0}function Cr(t,e){var i=new ln(t,t.f,t.g,rn(e),t.Z);return i.F(t.F),i}function Dr(t,e,i){t.Va=t.f.playbackRate,t.f.playbackRate=0,xr(t,i);var n;t.$&&t.$<=i.end&&t.$>=i.start?n=t.$:t.a.b?(n=i.end,t.Sa=!0):n=i.start,pt(t.i,t.f,"seeking",t.Gb.bind(t)),t.f.currentTime!=n&&(t.f.currentTime=n,t.D=n),Lr(t,i.start,i.end),i=[];for(var r in t.c){n=t.c[r],i.push(n.sb(t.ea)),pt(t.i,n,"ended",t.Hb.bind(t));var s=e[r];xn(t.U,s),n.ra(s,!1)}Promise.all(i).then(t.tb.bind(t))["catch"](Pt(t,function(t){"destroy"!=t.type&&(t=Z(t),this.dispatchEvent(t))})),t.Na(t.fa)}function _r(t,e,i){(e=Br(t,e))&&(xr(t,e),Lr(t,e.start,e.end)),0!=i&&(i=t.f.currentTime+i,t.f.currentTime=i,t.D=i),t.Sa&&e&&(t.f.currentTime=e.end),t.f.playbackRate=t.Va,t.a.b&&null!=t.a.f&&kr(t,0),Kr(t),t.ea.resolve()}function xr(t,e){if(t.a.b)isNaN(t.g.duration)&&(t.g.duration=e.end+2592e3);else if(isNaN(t.g.duration)||e.end>t.g.duration){t.g.duration=e.end;for(var i=0;i<t.g.sourceBuffers.length;++i)t.g.sourceBuffers[i].appendWindowEnd=e.end}}function Lr(t,e,i){e=X({type:"seekrangechanged",bubbles:!0,start:e,end:i}),t.dispatchEvent(e)}function Ur(t,e,i,n){if(e>=i-.01)return!1;if(e=0,t.a.b){e=.5;for(var r in t.c)if(!t.c[r].kb(i+e)){e=t.a.c;break}}return t.f.currentTime=Math.min(i+e,n),!0}function Or(t){return it(t.c).map(function(t){return t.bb()}).filter(function(t){return null!=t})}function Br(t,e){for(var i=0,n=Number.POSITIVE_INFINITY,r=Number.POSITIVE_INFINITY,s=0;s<e.length;++s){var a=e[s].Ea(),i=Math.max(i,a.start);null!=a.end&&(n=Math.min(n,a.end)),e[s].length()&&(r=Math.min(r,e[s].A().a))}if(n==Number.POSITIVE_INFINITY){if(n=t.a.a[0],!n.b)return null;n=(n.start||0)+n.b}return t.a.b&&(n=Math.max(n-t.a.c,i)),i>n?null:{start:i,end:n,A:r}}function Kr(e){e.a.b&&(e.Y=t.setTimeout(e.Jb.bind(e),1e3))}function qr(t){for(var e in t.c)t.c[e].F(t.F)}function Vr(t,e,i,n){i||(i=new gt),n||(n=new mr),Tr.call(this,null,i,n),this.za=t,this.l=null,this.M=e,this.R=[],this.ga=[],this.ta=[],this.j=null}function Fr(t,e,i){e||(e=new gt),i||(i=new mr),Tr.call(this,null,e,i),this.R=t,this.M=[],this.timeoutMs=3e4,this.l={},this.j=this.ga=null}function Hr(t,e,i,n){var r=new On(t.Z,t);return null!=t.l.segmentRequestTimeout&&(r.b=Number(t.l.segmentRequestTimeout)),jt(r).then(Pt(t,function(){return Bn(r,e,this.M,n,i)})).then(function(t){return Mt(r),Promise.resolve(t)})["catch"](function(t){return Mt(r),Promise.reject(t)})}function zr(t){var e=new On(null,null);return jt(e).then(Pt(t,function(){return Kn(e,this.R)})).then(function(){return Mt(e),Promise.resolve()})["catch"](function(t){return Mt(e),Promise.reject(t)})}function Gr(e){var i=document.createElement("video");i.src=t.URL.createObjectURL(e.g);var n=new Wn(null,i,e);return null!=e.l.licenseRequestTimeout&&(n.w=Number(e.l.licenseRequestTimeout)),e.X().then(function(){return n.initialize()}).then(Pt(e,function(){return Yn(n,this.timeoutMs)})).then(function(){return Jn(n)}).then(Pt(e,function(){return n.destroy(),this.destroy(),Promise.resolve()}))["catch"](Pt(e,function(t){return n.destroy(),this.destroy(),Promise.reject(t)}))}var Wr,Yr=this;r("error"),r("warn"),r("info"),r("log"),r("debug");var Jr=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,Qr={};e("shaka.player.AudioTrack.compare",function(t,e){return t.lang<e.lang?-1:t.lang>e.lang?1:t.bandwidth<e.bandwidth?-1:t.bandwidth>e.bandwidth?1:0}),u.prototype.clone=function(){var t=new u;return t.maxHeight=this.maxHeight,t.minHeight=this.minHeight,t.maxWidth=this.maxWidth,t.maxBandwidth=this.maxBandwidth,t.minBandwidth=this.minBandwidth,t},e("shaka.player.TextStyle",l),l.prototype.a=function(){var e=t.localStorage.getItem("ShakaPlayerTextStyle");if(e){var i;try{i=JSON.parse(e)}catch(n){return}if(i&&"object"==typeof i){var r,e=i;for(r in e)r in this&&(this[r]=e[r])}}},l.prototype.load=l.prototype.a,l.prototype.b=function(){t.localStorage.setItem("ShakaPlayerTextStyle",JSON.stringify(this))},l.prototype.store=l.prototype.b;var $r=[255,255,255],Xr=[0,0,0];l.StandardColors={WHITE:$r,BLACK:Xr,RED:[255,0,0],GREEN:[0,255,0],BLUE:[0,0,255],YELLOW:[255,255,0],MAGENTA:[255,0,255],CYAN:[0,255,255]};var Zr=1;l.StandardOpacities={OPAQUE:Zr,SEMI_HIGH:.75,SEMI_LOW:.25,TRANSPARENT:0};var ts=[];l.EdgeStyles={NONE:ts,RAISED:[[34,34,34,1,1,0],[34,34,34,2,2,0],[34,34,34,3,3,0]],DEPRESSED:[[204,204,204,1,1,0],[204,204,204,0,1,0],[34,34,34,-1,-1,0],[34,34,34,0,-1,0]],UNIFORM:[[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4],[34,34,34,0,0,4]],DROP:[[34,34,34,2,2,3],[34,34,34,2,2,4],[34,34,34,2,2,5]]},e("shaka.player.TextTrack.compare",function(t,e){return t.lang<e.lang?-1:t.lang>e.lang?1:0}),e("shaka.player.VideoTrack.compare",b),e("shaka.polyfill.CustomEvent.install",y),e("shaka.polyfill.Fullscreen.install",g),T.prototype.createSession=function(){},T.prototype.setServerCertificate=function(){},k.prototype.getConfiguration=function(){},k.prototype.createMediaKeys=function(){};var es=0;e("shaka.polyfill.Promise.install",P),S.prototype.then=function(t,e){var i=new S;switch(this.ba){case 1:N(this,i,t);break;case 2:N(this,i,e);break;case es:this.c.push({Ia:i,Ba:t}),this.b.push({Ia:i,Ba:e})}return i},S.prototype.then=S.prototype.then,S.prototype["catch"]=function(t){return this.then(void 0,t)},S.prototype["catch"]=S.prototype["catch"],S.prototype.W=function(t){if(this.ba==es){for(this.wa=t,this.ba=1,t=0;t<this.c.length;++t)N(this,this.c[t].Ia,this.c[t].Ba);this.c=[],this.b=[]}},S.prototype.a=function(t){if(this.ba==es){for(this.wa=t,this.ba=2,t=0;t<this.b.length;++t)N(this,this.b[t].Ia,this.b[t].Ba);this.c=[],this.b=[]}};var is=null,ns=[];e("shaka.polyfill.VideoPlaybackQuality.install",_);var rs,ss=0,as=1,os={"output-restricted":"The required output protection is not available.","output-not-allowed":"The required output protection is not available.",expired:"The decryption key has expired.","internal-error":"The key system has encountered an unspecified error."};Q.prototype.sample=function(t,e){var i=Math.pow(this.c,t);this.b=e*(1-i)+i*this.b,this.a+=t};var hs=1,us=2,ls={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"};ht.prototype.push=function(t,e){this.a.hasOwnProperty(t)?this.a[t].push(e):this.a[t]=[e]},ht.prototype.set=function(t,e){this.a[t]=e},ht.prototype.get=function(t){return(t=this.a[t])?t.slice():null},ft.prototype.destroy=function(){dt(this),this.a=null},ft.prototype.sa=function(t,e){for(var i=this.a.get(e)||[],n=0;n<i.length;++n){var r=i[n];r.target==t&&(r.sa(),lt(this.a,e,r))}},bt.prototype.sa=function(){this.target&&(this.target.removeEventListener(this.type,this.a,!1),this.a=this.target=null)},e("shaka.util.FakeEventTarget",yt),yt.prototype.addEventListener=function(t,e,i){i||this.ya.push(t,e)},yt.prototype.removeEventListener=function(t,e,i){i||lt(this.ya,t,e)},yt.prototype.dispatchEvent=function(t){if(t.hasOwnProperty("srcElement")||(delete t.srcElement,Object.defineProperty(t,"srcElement",{get:function(){return null}})),t.hasOwnProperty("target"))t.target=this;else{delete t.target;var e=this;Object.defineProperty(t,"target",{get:function(){return e},set:function(t){e=t}})}if(t.hasOwnProperty("currentTarget"))t.currentTarget=null;else{delete t.currentTarget;var i=null;Object.defineProperty(t,"currentTarget",{get:function(){return i},set:function(t){i=t}})}return vt(this,t)},i(gt,yt),e("shaka.util.EWMABandwidthEstimator",gt),gt.prototype.sample=function(t,e){if(!(65536>e)){t=Math.max(t,50);var i=8e3*e/t,n=t/1e3;this.a.sample(n,i),this.c.sample(n,i),this.dispatchEvent(X({type:"bandwidth"})),this.b=Date.now()}},gt.prototype.getBandwidth=function(){return.5>this.a.a?5e5:Math.min($(this.a),$(this.c))},gt.prototype.getDataAge=function(){return(Date.now()-this.b)/1e3},gt.prototype.supportsCaching=function(){return!1},mt.prototype.destroy=function(){this["catch"](function(){});var t=Error("Destroyed!");t.type="destroy",this.reject(t)},Et.prototype.start=function(){if(this.f)throw Error("Task already started!");this.f=!0,this.b.unshift(function(){}),kt(this,void 0)},Et.prototype.end=function(){this.b.splice(1)},i(At,yt),i(xt,At);var cs=1/60;Kt.prototype.destroy=function(){zt(this)["catch"](function(){}),this.f&&this.f.destroy(),this.a=this.f=null,this.g&&(Mt(this.g),this.g=null),this.b=null,this.j.destroy(),this.i=this.c=this.j=null},Kt.prototype.h=function(){this.f&&"open"==this.i.readyState&&this.c.abort()},Kt.prototype.B=function(){this.f&&(this.f.resolve(),this.f=null)},e("shaka.util.Uint8ArrayUtils.toString",Jt),e("shaka.util.Uint8ArrayUtils.fromString",Qt),e("shaka.util.Uint8ArrayUtils.toBase64",function(e,i){var n=void 0==i?!0:i,r=t.btoa(Jt(e)).replace(/\+/g,"-").replace(/\//g,"_");return n?r:r.replace(/=*$/,"")}),e("shaka.util.Uint8ArrayUtils.fromBase64",$t),e("shaka.util.Uint8ArrayUtils.fromHex",function(e){for(var i=new Uint8Array(e.length/2),n=0;n<e.length;n+=2)i[n/2]=t.parseInt(e.substr(n,2),16);return i}),e("shaka.util.Uint8ArrayUtils.toHex",Xt),oe.prototype.createMediaKeys=function(){var t=new he(this.a);return Promise.resolve(t)},oe.prototype.getConfiguration=function(){return this.b},Wr=he.prototype,Wr.createSession=function(t){var e=t||"temporary";if("temporary"!=e&&"persistent-license"!=e)throw new TypeError("Session type "+t+" is unsupported on this platform.");return t=this.b||document.createElement("video"),t.src||(t.src="about:blank"),e=new ce(t,this.g,e),this.c.push(e),e},Wr.setServerCertificate=function(){return Promise.reject(Error("setServerCertificate not supported on this platform."))},Wr.Ob=function(t){t=X({type:"encrypted",initDataType:"webm",initData:t.initData}),this.b.dispatchEvent(t)},Wr.Nb=function(t){var e=le(this,t.sessionId);e&&(t=X({type:"message",messageType:void 0==e.keyStatuses.Fa()?"licenserequest":"licenserenewal",message:t.message}),e.b&&(e.b.resolve(),e.b=null),e.dispatchEvent(t))},Wr.Lb=function(t){(t=le(this,t.sessionId))&&(pe(t,"usable"),t.a&&t.a.resolve(),t.a=null)},Wr.Mb=function(t){var e=le(this,t.sessionId);if(e){var i=Error("EME v0.1b key error");i.errorCode=t.errorCode,i.errorCode.systemCode=t.systemCode,!t.sessionId&&e.b?(i.method="generateRequest",45==t.systemCode&&(i.message="Unsupported session type."),e.b.reject(i),e.b=null):t.sessionId&&e.a?(i.method="update",e.a.reject(i),e.a=null):(i=t.systemCode,t.errorCode.code==MediaKeyError.MEDIA_KEYERR_OUTPUT?pe(e,"output-restricted"):1==i?pe(e,"expired"):pe(e,"internal-error"))}},i(ce,yt),Wr=ce.prototype,Wr.Qa=function(t,e){if(this.a)this.a.then(this.Qa.bind(this,t,e))["catch"](this.Qa.bind(this,t,e));else{this.a=t;var i,n;"webkit-org.w3.clearkey"==this.c?(i=Jt(new Uint8Array(e)),n=JSON.parse(i),"oct"!=n.keys[0].kty&&(this.a.reject(Error("Response is not a valid JSON Web Key Set.")),this.a=null),i=$t(n.keys[0].k),n=$t(n.keys[0].kid)):(i=new Uint8Array(e),n=null);try{this.f.webkitAddKey(this.c,i,n,this.sessionId)}catch(r){this.a.reject(r),this.a=null}}},Wr.generateRequest=function(t,e){return fe(this,e,null)},Wr.load=function(t){return"persistent-license"==this.g?fe(this,null,t):Promise.reject(Error("Not a persistent session."))},Wr.update=function(t){var e=new mt;return this.Qa(e,t),e},Wr.close=function(){if("persistent-license"!=this.g){if(!this.sessionId)return this.closed.reject(Error("The session is not callable.")),this.closed;this.f.webkitCancelKeyRequest(this.c,this.sessionId)}return this.closed.resolve(),this.closed},Wr.remove=function(){return"persistent-license"!=this.g?Promise.reject(Error("Not a persistent session.")):this.close()};var fs;Wr=de.prototype,Wr.Ma=function(t){this.size=void 0==t?0:1,this.a=t},Wr.Fa=function(){return this.a},Wr.forEach=function(t){this.a&&t(fs,this.a)},Wr.get=function(t){return this.has(t)?this.a:void 0},Wr.has=function(t){var e=fs;return!(!this.a||!Zt(new Uint8Array(t),new Uint8Array(e)))},ve.prototype.createMediaKeys=function(){var t=new me(this.keySystem);return Promise.resolve(t)},ve.prototype.getConfiguration=function(){return this.a},me.prototype.createSession=function(t){if("temporary"!=(t||"temporary"))throw new TypeError("Session type "+t+" is unsupported on this platform.");return new Ee(this.a)},me.prototype.setServerCertificate=function(){return Promise.reject(Error("setServerCertificate not supported on this platform."))},i(Ee,yt),Wr=Ee.prototype,Wr.generateRequest=function(t,e){this.a=new mt;try{this.c=this.g.createSession("video/mp4",new Uint8Array(e),null),pt(this.f,this.c,"mskeymessage",this.Bb.bind(this)),pt(this.f,this.c,"mskeyadded",this.zb.bind(this)),pt(this.f,this.c,"mskeyerror",this.Ab.bind(this)),Se(this,"status-pending")}catch(i){this.a.reject(i)}return this.a},Wr.load=function(){return Promise.reject(Error("MediaKeySession.load not yet supported"))},Wr.update=function(t){this.b=new mt;try{this.c.update(new Uint8Array(t))}catch(e){this.b.reject(e)}return this.b},Wr.close=function(){try{this.c.close(),this.closed.resolve(),dt(this.f)}catch(t){this.closed.reject(t)}return this.closed},Wr.remove=function(){return Promise.reject(Error("MediaKeySession.remove is only applicable for persistent licenses, which are not supported on this platform"))},Wr.Bb=function(t){this.a&&(this.a.resolve(),this.a=null),t=X({type:"message",messageType:void 0==this.keyStatuses.Fa()?"licenserequest":"licenserenewal",message:t.message.buffer}),this.dispatchEvent(t)},Wr.zb=function(){this.a?(this.a.resolve(),this.a=null):this.b&&(Se(this,"usable"),this.b.resolve(),this.b=null)},Wr.Ab=function(){var t=Error("EME v20140218 key error");if(t.errorCode=this.c.error,null!=this.a)this.a.reject(t),this.a=null;else if(null!=this.b)this.b.reject(t),this.b=null;else switch(this.c.error.code){case MSMediaKeyError.MS_MEDIA_KEYERR_OUTPUT:case MSMediaKeyError.MS_MEDIA_KEYERR_HARDWARECHANGE:Se(this,"output-not-allowed");default:Se(this,"internal-error")}};var ps;Wr=Pe.prototype,Wr.Ma=function(t){this.size=void 0==t?0:1,this.a=t},Wr.Fa=function(){return this.a},Wr.forEach=function(t){this.a&&t(ps,this.a)},Wr.get=function(t){return this.has(t)?this.a:void 0},Wr.has=function(t){var e=ps;return!(!this.a||!Zt(new Uint8Array(t),new Uint8Array(e)))},e("shaka.polyfill.MediaKeys.install",Ae),e("shaka.polyfill.installAll",function(){y(),g(),_(),P(),Ae()});var ds=/^(?:([^:\/?#.]+):)?(?:\/\/(?:([^\/?#]*)@)?([^\/#?]*?)(?::([0-9]+))?(?=[\/#?]|$))?([^?#]+)?(?:\?([^#]*))?(?:#(.*))?$/;Wr=je.prototype,Wr.P="",Wr.ca="",Wr.S="",Wr.ia=null,Wr.O="",Wr.aa="",Wr.toString=function(){var t=[],e=this.P;if(e&&t.push(Ce(e,bs,!0),":"),e=this.S){t.push("//");var i=this.ca;i&&t.push(Ce(i,bs,!0),"@"),t.push(encodeURIComponent(e).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),e=this.ia,null!=e&&t.push(":",String(e))}return(e=this.O)&&(this.S&&"/"!=e.charAt(0)&&t.push("/"),t.push(Ce(e,"/"==e.charAt(0)?vs:ys,!0))),(e=this.a.toString())&&t.push("?",e),(e=this.aa)&&t.push("#",Ce(e,ms)),t.join("")},Wr.resolve=function(t){var e=this.clone();"data"===e.P&&(e=new je);var i=!!t.P;i?Me(e,t.P):i=!!t.ca,i?e.ca=t.ca:i=!!t.S,i?e.S=t.S:i=null!=t.ia;var n=t.O;if(i)Ie(e,t.ia);else if(i=!!t.O){if("/"!=n.charAt(0))if(this.S&&!this.O)n="/"+n;else{var r=e.O.lastIndexOf("/");-1!=r&&(n=e.O.substr(0,r+1)+n)}if(".."==n||"."==n)n="";else if(-1!=n.indexOf("./")||-1!=n.indexOf("/.")){for(var r=0==n.lastIndexOf("/",0),n=n.split("/"),s=[],a=0;a<n.length;){var o=n[a++];"."==o?r&&a==n.length&&s.push(""):".."==o?((1<s.length||1==s.length&&""!=s[0])&&s.pop(),r&&a==n.length&&s.push("")):(s.push(o),r=!0)}n=s.join("/")}}return i?e.O=n:i=""!==t.a.toString(),i?Ne(e,t.a.clone()):i=!!t.aa,i&&(e.aa=t.aa),e},Wr.clone=function(){return new je(this)};var bs=/[#\/\?@]/g,ys=/[\#\?:]/g,vs=/[\#\?]/g,gs=/[\#\?@]/g,ms=/#/g;_e.prototype.a=null,_e.prototype.c=null,_e.prototype.toString=function(){if(this.b)return this.b;if(!this.a)return"";var t,e=[];for(t in this.a)for(var i=encodeURIComponent(t),n=this.a[t],r=0;r<n.length;r++){var s=i;""!==n[r]&&(s+="="+encodeURIComponent(n[r])),e.push(s)}return this.b=e.join("&")},_e.prototype.clone=function(){var t=new _e;if(t.b=this.b,this.a){var e,i={};for(e in this.a)i[e]=this.a[e].concat();t.a=i,t.c=this.c}return t},Ge.prototype.clone=function(){var t=new Ge;return t.u=ui(this.u),t.g=this.g,t.f=this.f,t.a=li(this.a),t.b=li(this.b),t.c=li(this.c),t},We.prototype.clone=function(){var t=new We;return t.url=ui(this.url),t.a=li(this.a),t},Ye.prototype.clone=function(){var t=new Ye;return t.url=ui(this.url),t.a=li(this.a),t},Je.prototype.clone=function(){var t=new Je;return t.u=ui(this.u),t.f=this.f,t.g=this.g,t.b=this.b,t.i=this.i,t.h=li(this.h),t.a=ui(this.a)||[],t.c=li(this.c),t},Qe.prototype.clone=function(){var t=new Qe;return t.b=ui(this.b),t.a=li(this.a),t},$e.prototype.clone=function(){var t=new $e;return t.a=this.a,t.i=this.i,t.b=this.b,t.j=this.j,t.h=this.h,t.f=this.f,t.g=this.g,t.c=li(this.c),t},Xe.prototype.clone=function(){var t=new Xe;return t.a=ui(this.a)||[],t},Ze.prototype.clone=function(){var t=new Ze;return t.b=this.b,t.a=this.a,t.c=this.c,t},ti.prototype.clone=function(){return new ti(this.na,this.end)},Le.TAG_NAME="MPD",Ue.TAG_NAME="Period",Oe.TAG_NAME="AdaptationSet",Be.TAG_NAME="Role",Ke.TAG_NAME="ContentComponent",qe.TAG_NAME="Representation",Ve.TAG_NAME="ContentProtection",Fe.TAG_NAME="cenc:pssh",He.TAG_NAME="BaseURL",ze.TAG_NAME="Location",Ge.TAG_NAME="SegmentBase",We.TAG_NAME="RepresentationIndex",Ye.TAG_NAME="Initialization",Je.TAG_NAME="SegmentList",Qe.TAG_NAME="SegmentURL",$e.TAG_NAME="SegmentTemplate",Xe.TAG_NAME="SegmentTimeline",Ze.TAG_NAME="S",Le.prototype.parse=function(t,e){this.url=t.hb,this.id=ci(e,"id",gi),this.type=ci(e,"type",gi)||"static",this.b=ci(e,"mediaPresentationDuration",pi),this.h=ci(e,"minBufferTime",pi,this.h),this.g=ci(e,"minimumUpdatePeriod",pi,this.g),this.c=ci(e,"availabilityStartTime",fi,this.c),this.f=ci(e,"timeShiftBufferDepth",pi,this.f),this.i=ci(e,"suggestedPresentationDelay",pi,this.i);var i=t.u,n=oi(this,e,He);this.u=ii(i,n),(n=si(this,e,ze))&&(this.j=ni(i,n.url)),this.a=oi(this,e,Ue)},Ue.prototype.parse=function(t,e){this.id=ci(e,"id",gi),this.start=ci(e,"start",pi),this.a=ci(e,"duration",pi);var i=oi(this,e,He);this.u=ii(t.u,i),this.c=si(this,e,Ge),this.f=si(this,e,Je),this.g=si(this,e,$e),this.b=oi(this,e,Oe),ei(this)},Oe.prototype.parse=function(t,e){var i=si(this,e,Ke)||{},n=si(this,e,Be);this.id=ci(e,"id",gi),this.group=ci(e,"group",vi),this.lang=ci(e,"lang",gi,i.lang),this.contentType=ci(e,"contentType",gi,i.contentType),this.width=ci(e,"width",yi),this.height=ci(e,"height",yi),this.b=ci(e,"mimeType",gi),this.i=ci(e,"codecs",gi),this.c=n&&"main"==n.value,this.lang&&(this.lang=et(this.lang)),i=oi(this,e,He),this.u=ii(t.u,i),this.j=oi(this,e,Ve),!this.contentType&&this.b&&(this.contentType=this.b.split("/")[0]),this.f=t.c?ri(this,e,t.c):si(this,e,Ge),this.g=t.f?ri(this,e,t.f):si(this,e,Je),this.h=t.g?ri(this,e,t.g):si(this,e,$e),this.a=oi(this,e,qe),!this.b&&this.a.length&&(this.b=this.a[0].f,!this.contentType&&this.b&&(this.contentType=this.b.split("/")[0]))},Be.prototype.parse=function(t,e){this.value=ci(e,"value",gi)},Ke.prototype.parse=function(t,e){this.id=ci(e,"id",gi),this.lang=ci(e,"lang",gi),this.contentType=ci(e,"contentType",gi),this.lang&&(this.lang=et(this.lang))},qe.prototype.parse=function(t,e){this.id=ci(e,"id",gi),this.bandwidth=ci(e,"bandwidth",yi),this.width=ci(e,"width",yi,t.width),this.height=ci(e,"height",yi,t.height),this.f=ci(e,"mimeType",gi,t.b),this.h=ci(e,"codecs",gi,t.i),this.lang=t.lang;var i=oi(this,e,He);this.u=ii(t.u,i),this.c=oi(this,e,Ve),this.g=t.f?ri(this,e,t.f):si(this,e,Ge),this.b=t.g?ri(this,e,t.g):si(this,e,Je),this.a=t.h?ri(this,e,t.h):si(this,e,$e),this.c=this.c.concat(t.j)},Ve.prototype.parse=function(t,e){this.f=e,this.c=ci(e,"schemeIdUri",gi);var i=ci(e,"cenc:default_KID",gi);i&&(this.b=i.replace(/[-]/g,"")),this.a=si(this,e,Fe)},Fe.prototype.parse=function(t,e){var i=hi(e);if(i){this.psshBox=$t(i);try{this.parsedPssh=new be(this.psshBox)}catch(n){if(!(n instanceof RangeError))throw n}}},He.prototype.parse=function(t,e){this.url=hi(e)},ze.prototype.parse=function(t,e){this.url=hi(e)},Ge.prototype.parse=function(t,e){this.u=t.u||this.u,this.g=ci(e,"timescale",yi,this.g),this.f=ci(e,"presentationTimeOffset",vi,this.f),this.a=ci(e,"indexRange",di,this.a),this.b=si(this,e,We)||this.b,this.c=si(this,e,Ye)||this.c},We.prototype.parse=function(t,e){var i=ci(e,"sourceURL",gi);this.url=ni(t.u,i),this.a=ci(e,"range",di,li(t.a))},Ye.prototype.parse=function(t,e){var i=ci(e,"sourceURL",gi);this.url=ni(t.u,i),this.a=ci(e,"range",di)},Je.prototype.parse=function(t,e){this.u=t.u||this.u,this.f=ci(e,"timescale",yi,this.f),this.g=ci(e,"presentationTimeOffset",vi,this.g),this.b=ci(e,"duration",yi,this.b);var i=ci(e,"startNumber",yi);null!=i&&(this.i=i),this.h=si(this,e,Ye)||this.h,this.a=(i=oi(this,e,Qe))&&0<i.length?i:this.a,this.c=si(this,e,Xe)||this.c},Qe.prototype.parse=function(t,e){var i=ci(e,"media",gi);this.b=ni(t.u,i),this.a=ci(e,"mediaRange",di)},$e.prototype.parse=function(t,e){this.a=ci(e,"timescale",yi,this.a),this.i=ci(e,"presentationTimeOffset",vi,this.i),this.b=ci(e,"duration",yi,this.b);var i=ci(e,"startNumber",vi);null!=i&&(this.j=i),this.h=ci(e,"media",gi,this.h),this.f=ci(e,"index",gi,this.f),this.g=ci(e,"initialization",gi,this.g),this.c=si(this,e,Xe)||this.c},Xe.prototype.parse=function(t,e){this.a=oi(this,e,Ze)},Ze.prototype.parse=function(t,e){this.b=ci(e,"t",vi),this.a=ci(e,"d",vi),this.c=ci(e,"r",bi)};var ws=!0;Wr=mi.prototype,Wr.rb=function(){if(this.a)return this.c;if(0==this.url.lastIndexOf("data:",0)){var e=this.url.split(":")[1].split(";").pop().split(","),i=e.pop(),i="base64"==e.pop()?t.atob(i.replace(/-/g,"+").replace(/_/g,"/")):t.decodeURIComponent(i);return"arraybuffer"==this.b.f&&(i=Qt(i).buffer),e=JSON.parse(JSON.stringify(new XMLHttpRequest)),e.response=i,e.responseText=i.toString(),i=this.c,i.resolve(e),Ei(this),i}if(0==this.url.lastIndexOf("idb:",0))return ki(this);this.h++,this.i=Date.now(),this.g||(this.g=this.b.h),this.a=new XMLHttpRequest,e=this.url,ws&&(this.f&&!this.f.supportsCaching()||this.b.g)&&(e=new je(e),xe(e.a,"_",Date.now()),e=e.toString()),this.a.open(this.b.method,e,!0),this.a.responseType=this.b.f,this.a.timeout=this.b.c,this.a.withCredentials=this.b.j,this.a.onload=this.xb.bind(this),this.b.g&&(this.a.onreadystatechange=this.Eb.bind(this)),this.a.onerror=this.Tb.bind(this),this.a.ontimeout=this.Ib.bind(this);for(i in this.b.b)this.a.setRequestHeader(i,this.b.b[i]);return this.a.send(this.b.body),this.c},Wr.xb=function(t){this.f&&this.f.sample(Date.now()-this.i,t.loaded),200<=this.a.status&&299>=this.a.status?(this.c.resolve(this.a),Ei(this)):this.h<this.b.a?Pi(this):(t=Si(this,"HTTP error.","net"),this.c.reject(t),Ei(this))},Wr.Eb=function(){if(this.a.readyState==XMLHttpRequest.HEADERS_RECEIVED){var t=Date.parse(this.a.getResponseHeader("Date"));t&&(ss=t-Date.now())}},Wr.Tb=function(){var t=Si(this,"Network failure.","net");this.c.reject(t),Ei(this)},Wr.Ib=function(){if(this.h<this.b.a)Pi(this);else{var t=Si(this,"Request timed out.","net");this.c.reject(t),Ei(this)}},Ai.prototype.g=function(){if(this.c){this.a=null;var t=this.c;if(t.a&&t.a.readyState!=XMLHttpRequest.DONE){t.a.abort();var e=Si(t,"Request aborted.","aborted");t.c.reject(e),Ei(t)}this.h=this.c=null}},Ai.prototype.clone=function(){return new Ai(this.j,this.b.map(function(t){return t.clone()}),this.f,this.i)},Ai.prototype.toString=function(){return this.b[0].toString()},Li.prototype.destroy=function(){this.a&&(this.a.g(),this.a=null),this.b=null},Li.prototype.create=function(){return this.a?Mi(this.a):Promise.resolve(this.b)},qi.prototype.parse=function(t,e,i,n){var r=null;try{t:{var s=[],a=new O(t),o=q(a);if(1936286840!=q(a))r=null;else{1==o&&(o=V(a));var h=K(a);H(a,3),H(a,4);var u=q(a);if(0==u)r=null;else{var l,c;0==h?(l=q(a),c=q(a)):(l=V(a),c=V(a)),H(a,2);var f=a.b.getUint16(a.a,a.c);for(a.a+=2,t=l,e=e+o+c,o=0;f>o;o++){var p=q(a);c=(2147483648&p)>>>31;var h=2147483647&p,d=q(a);if(q(a),1==c){r=null;break t}var b=new Ai(n,i,e,e+h-1);s.push(new Ui(t/u,(t+d)/u,b)),t+=d,e+=h}r=s}}}}catch(y){if(!(y instanceof RangeError))throw y}return r},Vi.prototype.destroy=function(){this.o=null},Wr=Vi.prototype,Wr.length=function(){return this.o.length},Wr.A=function(){if(0==this.o.length)throw new RangeError("SegmentIndex: There is no last SegmentReference.");return this.o[this.o.length-1]},Wr.get=function(t){if(0>t||t>=this.o.length)throw new RangeError("SegmentIndex: The specified index is out of range.");return this.o[t]},Wr.la=function(t){return t=Bi(this.o,t),t>=0?this.o[t]:null},Wr.Ha=function(t){return Hi(this,t),!0},Wr.ka=function(t){var e=t-this.i;return 0==e?0:(this.o=Ki(this.o,e),this.i=t,e)},Wr.Ea=function(){return 0<this.length()?{start:Fi(this).b,end:this.A().a}:{start:0,end:0}},i(zi,Vi),zi.prototype.destroy=function(){this.w=this.g=null,Vi.prototype.destroy.call(this)},zi.prototype.la=function(t){return Yi(this,U()/1e3),Vi.prototype.la.call(this,t)},zi.prototype.Ha=function(t){return t instanceof zi?(Hi(this,t),this.h=Math.max(this.h,t.h),null==this.c?(this.f=t.f,Gi(this)):Ji(this),!0):!1},zi.prototype.ka=function(t){return t=Vi.prototype.ka.call(this,t),Math.min.apply(null,this.o.filter(function(t){return null!=t.a}).map(function(t){return t.a-t.b})),null!=this.c&&(this.l+=t,this.a+=t,this.c+=t),t},zi.prototype.Ea=function(){return Wi(this,U()/1e3)},i(Qi,zi),Qi.prototype.destroy=function(){this.B=this.s=null,zi.prototype.destroy.call(this)},Qi.prototype.la=function(t){var e=U()/1e3;return $i(this,e),Yi(this,e),Vi.prototype.la.call(this,t)},Qi.prototype.Ha=function(t){return null==this.b&&t instanceof Qi&&null!=t.b?(this.b=t.b,this.v=t.v,this.j=t.j,this.f=t.f,this.h=t.h,Hi(this,t),$i(this,U()/1e3),Gi(this),!0):!1},Qi.prototype.ka=function(t){return t=zi.prototype.ka.call(this,t),null!=this.b&&(this.b+=t,this.v+=t),t},Qi.prototype.Ea=function(){var t=U()/1e3;return $i(this,t),Wi(this,t)},Xi.prototype.destroy=function(){this.g=this.c=this.b=this.f=null,this.a&&(this.a.destroy(),this.a=null)},Xi.prototype.create=function(){if(this.a)return Promise.resolve(this.a);if("dynamic"==this.f.type)try{this.a=new Qi(this.f,this.b,this.c,this.h,this.g)}catch(t){return Promise.reject(t)}else{var e;if(e=this.c.a,e=Ci(this.g,this.c,1,Math.ceil(this.b.a/(e.b/e.a)))){if(0<e.length){var i=e[e.length-1];e[e.length-1]=Oi(i,i.b,this.b.a)}e=new Vi(e)}else e=null;if(this.a=e,!this.a)return e=Error("Failed to generate SegmentReferences"),e.type="stream",Promise.reject(e)}return Promise.resolve(this.a)},Zi.prototype.destroy=function(){this.f=this.g=this.b=this.c=null,this.a&&(this.a.destroy(),this.a=null)},Zi.prototype.create=function(){if(this.a)return Promise.resolve(this.a);var t=this.g.b,e=[];t.c&&(e=xi(t.c,t.f||1,this.b.a||0));var i=0;t.b&&t.i?i=(t.i-1)*t.b:0<e.length&&(i=e[0].start-(t.g||0));var n=t.a.length;0<e.length&&e.length!=t.a.length&&(n=Math.min(e.length,t.a.length));for(var r=[],s=0;n>s;++s){var a=t.a[s],o=i/t.f,h=null,u=null;t.b?(h=i+t.b,u=h/t.f):0<e.length?(h=e[s].end-(t.g||0),u=h/t.f):(u=o+this.b.a,h=u*t.f);var i=h,h=0,l=null;a.a&&(h=a.a.na,l=a.a.end),r.push(new Ui(o,u,new Ai(this.f,a.b,h,l)))}return"dynamic"==this.c.type?this.a=new zi(r,this.c,this.b,this.h):this.a=new Vi(r),Promise.resolve(this.a)},tn.prototype.destroy=function(){this.g=this.f=this.c=this.b=null,this.a&&(this.a.destroy(),this.a=null)},tn.prototype.create=function(){if(this.a)return Promise.resolve(this.a);for(var t=this.f.a,e=xi(t.c,t.a||1,this.c.a||0),i=[],n=0;n<e.length;++n){var r=e[n].start,s=r/t.a,a=e[n].end/t.a,r=Di(this.g,this.f,n+t.j,r);if(!r)return t=Error("Failed to generate media URL."),t.type="dash",Promise.reject(t);var o=(t.i||0)/t.a;i.push(new Ui(s-o,a-o,r))}return"dynamic"==this.b.type?this.a=new zi(i,this.b,this.c,this.h):this.a=new Vi(i),Promise.resolve(this.a)},en.prototype.destroy=function(){this.b=null,this.a&&(this.a.destroy(),this.a=null)},en.prototype.create=function(){if(this.a)return Promise.resolve(this.a);for(var t=[],e=0;e<this.b.length;++e){var i=this.b[e];t.push(new Ui(i.start_time,i.end_time,new Ai(null,[new je(i.url)],i.start_byte,null)))}return this.b=null,this.a=new Vi(t),Promise.resolve(this.a)};var Es=0;nn.prototype.destroy=function(){this.I&&(this.I.destroy(),this.I=null),this.H&&(this.H.destroy(),this.H=null)};var Ts=0;sn.prototype.destroy=function(){for(var t=0;t<this.m.length;++t)this.m[t].destroy();this.a=this.m=null},on.prototype.destroy=function(){for(var t=0;t<this.a.length;++t)this.a[t].destroy();this.a=null},hn.prototype.destroy=function(){for(var t=0;t<this.a.length;++t)this.a[t].destroy();this.a=null},i(ln,yt),ln.prototype.F=function(t){null!=t.initialStreamBufferSize&&(this.B=Number(t.initialStreamBufferSize)),null!=t.streamBufferSize&&(this.L=Number(t.streamBufferSize)),null!=t.segmentRequestTimeout&&(this.a.s=Number(t.segmentRequestTimeout))},ln.prototype.destroy=function(){vn(this),this.h.destroy(),this.b=this.h=null,this.a.destroy(),this.v=this.c=this.a=null},Wr=ln.prototype,Wr.oa=function(){return this.b},Wr.bb=function(){return this.G},Wr.sb=function(t){return this.f||t.then(function(){this.f=!0,this.g||yn(this,0)}.bind(this))["catch"](function(){}),this.h},Wr.Ga=function(){return this.j},Wr.ra=function(t,e,i){if(t!=this.b){var n=[t.I.create(),t.H.create()];Promise.all(n).then(Pt(this,function(n){if(this.c){var r=this.b;this.b=t,this.G=n[0],this.w=n[1],this.K=!0,this.l||(r?e&&cn(this,!0,i):yn(this,0))}}))["catch"](Pt(this,function(t){"aborted"!=t.type&&(this.f?(t=Z(t),this.dispatchEvent(t)):this.h.reject(t))}))}},Wr.jb=function(){return cn(this,!1)},Wr.kb=function(t){return 0<qt(this.a,t)&&0<=Bi(this.a.b,t)},Wr.va=function(){},Wr.Da=function(){return!0},Wr.Kb=function(){if(this.s&&!this.f)this.g=null;else{var t;if((t=this.f&&!this.j)&&(t=1<this.a.c.buffered.length),t)cn(this,!0);else{this.g=null,t=this.b;var e=this.G,i=this.c.currentTime;qt(this.a,this.s?i:i+(this.i||0))>=(this.s?Math.max(this.B,this.L):this.B)?(pn(this),yn(this,1e3/(Math.abs(this.c.playbackRate)||1))):(e=fn(this,i,e))?(e=Vt(this.a,e,t.c,this.w),this.w=null,this.K&&(this.K=!1,dn(this,t)),this.j=!1,e.then(Pt(this,function(t){null==this.i&&(this.i=t),
this.D&&0<qt(this.a,i)&&(this.D=!1,this.c.currentTime+=.001),yn(this,0)}))["catch"](Pt(this,function(t){if("aborted"!=t.type){var e=[0,404,410];"net"==t.type&&-1!=e.indexOf(t.xhr.status)&&this.b&&yn(this,5e3),t=Z(t),this.dispatchEvent(t)}}))):(pn(this),this.f&&!this.j&&(this.j=!0,bn(this)),yn(this,1e3))}}},gn.prototype.destroy=function(){this.a&&(this.a.destroy(),this.a=null)},gn.prototype.create=function(){if(this.a)return Promise.resolve(this.a);var t=new Ui(0,null,this.b);return this.a=new Vi([t]),Promise.resolve(this.a)},i(mn,yt),mn.prototype.F=function(){},mn.prototype.destroy=function(){this.a&&this.b.removeChild(this.a),this.c.destroy(),this.v=this.b=this.f=this.h=this.a=this.c=null},Wr=mn.prototype,Wr.oa=function(){return this.f},Wr.bb=function(){return this.h},Wr.sb=function(){return this.c},Wr.Ga=function(){return!0},Wr.ra=function(t){t.I.create().then(Pt(this,function(e){if(this.b){if(0==e.length())return Promise.reject(Error("No subtitles URL available."));var i=this.f;this.f=t,this.h=e,e=Fi(e).url.b[0].toString();var n=this.Da();this.a&&(this.va(!1),this.b.removeChild(this.a)),this.a=document.createElement("track"),this.b.appendChild(this.a),this.a.src=e,this.va(n),e=X({type:"adaptation",bubbles:!0,contentType:"text",size:null,bandwidth:t.bandwidth}),this.dispatchEvent(e),i||this.c.resolve(0)}}))},Wr.jb=function(){},Wr.kb=function(){return!0},Wr.va=function(t){this.g=t,this.a&&(this.a.track.mode=t?"showing":"disabled")},Wr.Da=function(){return this.a&&(this.g="showing"==this.a.track.mode),this.g},wn.prototype.parse=function(t,e,i,n){var r=null;try{var s,a=new z(e);if(440786851!=G(a).id)s=null;else{var o=G(a);if(408125543!=o.id)s=null;else{var h,u=o.a.byteOffset,l=new z(o.a);for(e=null;B(l.a);){var c=G(l);if(357149030==c.id){e=c;break}}if(e){for(var f=new z(e.a),l=1e6;B(f.a);){var p=G(f);if(2807729==p.id){l=J(p);break}}h=l/1e9}else h=null;s=h?{Qb:u,Ub:h}:null}}if(s){var d=G(new z(t));if(475249515!=d.id)r=null;else{var b=s.Qb,y=s.Ub;t=[];var v=new z(d.a);for(s=d=-1;B(v.a);){var g=G(v);if(187==g.id){var m,w=new z(g.a),E=G(w);if(179!=E.id)m=null;else{var T=J(E),k=G(w);if(183!=k.id)m=null;else{for(var S=new z(k.a),u=0;B(S.a);){var P=G(S);if(241==P.id){u=J(P);break}}m={Wb:T,Pb:u}}}if(m){var A=y*m.Wb,j=b+m.Pb;if(d>=0){var M=new Ai(n,i,s,j-1);t.push(new Ui(d,A,M))}d=A,s=j}}}d>=0&&(M=new Ai(n,i,s,null),t.push(new Ui(d,null,M))),r=t}}else r=null}catch(I){if(!(I instanceof RangeError))throw I}return r},En.prototype.destroy=function(){this.h=this.i=this.g=null,this.a.g(),this.a=null,this.c&&(this.c.g(),this.c=null),this.b=null},En.prototype.create=function(){if(this.b)return this.b;var t=[Mi(this.a)];return"webm"==this.f&&t.push(Mi(this.c)),this.b=Promise.all(t).then(Pt(this,function(t){var e=t[0];t=t[1]||null;var i=null;if("mp4"==this.f?(i=new qi,i=i.parse(new DataView(e),this.a.f,this.a.b,this.h)):"webm"==this.f&&(i=new wn,i=i.parse(new DataView(e),new DataView(t),this.a.b,this.h)),!i)return e=Error("Failed to parse SegmentReferences from "+this.a.toString()+" (or one of its fallbacks)."),e.type="stream",Promise.reject(e);var n;return n="dynamic"==this.g.type?new zi(i,this.g,this.i,this.j):new Vi(i),Promise.resolve(n)}))},i(On,At),On.prototype.g=function(t,e,i){var n=new mt;t={stream_id:i.qa,mime_type:t.a,codecs:t.b,init_segment:e,references:i.o};var r=Rt(this).put(t);return r.onsuccess=function(){n.resolve(i.qa)},r.onerror=function(){n.reject(r.error)},n},On.prototype.f=function(t,e){for(var i=Promise.resolve(),n=0;n<t.length();++n)var r=t.get(n),s=n==t.length()-1,s=this.c.bind(this,r,e,s),i=i.then(this.i.bind(this,r)),i=i.then(s);return i.then(function(){return Promise.resolve(e)})["catch"](Pt(this,function(t){return Hn(this,e.qa),Promise.reject(t)}))},On.prototype.c=function(t,e,i,n){var r=new mt;0==e.ja.byteLength&&(e.Ca=t),e.ja=Fn(e.ja,n),e.ib++;var s=X({type:"progress",detail:e.ib/e.Vb*100,bubbles:!0});if(1048576<=e.ja.byteLength||i){i={stream_id:e.qa,segment_id:e.Ja,content:e.ja};var a=Nt(this).put(i);e.o.push({start_time:e.Ca.b,start_byte:e.Ca.url.f,end_time:t.a,url:"idb://"+e.qa+"/"+e.Ja}),e.Ja++,e.ja=new ArrayBuffer(0),a.onerror=function(){r.reject(a.error)},a.onsuccess=Pt(this,function(){this.dispatchEvent(s),r.resolve()})}else this.dispatchEvent(s),r.resolve();return r},On.prototype.i=function(t){var e=new wi;return e.c=1e3*this.b,Mi(t.url,e,this.j)},i(Wn,yt),Wn.prototype.destroy=function(){this.v=null;for(var e=0;e<this.f.length;++e)this.f[e].close()["catch"](function(){});this.f=[],this.c=this.a=this.i=null,this.g.destroy(),this.g=null,this.l.destroy(),this.l=null,this.j&&(t.clearTimeout(this.j),this.j=null),this.h=this.b=null},Wn.prototype.initialize=function(){for(var t=new ht,e=this.b.ab(),i=0;i<e.length;++i){var n=e[i];n.a.a||n.b&&!rr(n.b)||t.push(n.contentType,n)}for(var i={},n=!1,r=0;r<e.length;++r){var s=e[r];if(s.a.a&&!t.a.hasOwnProperty(s.contentType)){var a=s.a.a,o=i[a];if(o||(o=s.a,o={audioCapabilities:void 0,videoCapabilities:void 0,initDataTypes:void 0,distinctiveIdentifier:o.g?"required":"optional",persistentState:o.v||this.b.ha()?"required":"optional",sessionTypes:[this.b.ha()?"persistent-license":"temporary"]},i[a]=o),s.b&&(a=s.contentType+"Capabilities",a in o)){n=!0,o[a]||(o[a]=[]);var h;"audio"==s.contentType?h=s.a.f:"video"==s.contentType&&(h=s.a.j),o[a].push({contentType:s.b,robustness:h})}}}if(!n){if(!e.length)throw t=Error("No DrmInfo exists!"),t.type="drm",t;this.a=e[0].a}return 0==Object.keys(i).length?(this.b.Ka(t),this.g.resolve(),Promise.resolve()):(h=new mt,i=Qn(this,i,h),i=i.then(this.D.bind(this,e,t)),h.reject(null),i)},Wn.prototype.D=function(t,e,i){if(!this.h)return Xn();for(var n=i.keySystem,r=i.getConfiguration(),s=["audio","video"],a=0;a<s.length;++a){var o=s[a];if(!e.a.hasOwnProperty(o)){var h=r[o+"Capabilities"];if(h){for(var h=h[0],u=[],l={},c=0;c<t.length;++c){var f=t[c],p=h?f.b==h.contentType:f.contentType==o;f.a.a!=n||!p||f.id in l||(u.push(f),l[f.id]=!0,this.a=this.a?ie(this.a,f.a):f.a)}e.set(o,u)}}}return this.b.Ka(e),i.createMediaKeys().then(function(t){this.i=t}.bind(this))},Wn.prototype.B=function(t){for(var e=new Uint8Array(t.initData),i=0;i<this.c.length;++i)if(Zt(e,this.c[i].data))return;try{var n=tr(this)}catch(r){return e=Z(r),this.dispatchEvent(e),void this.g.reject(r)}t=n.generateRequest(t.initDataType,t.initData),this.c.push({data:e,La:n}),t["catch"](Pt(this,function(t){if(this.h){for(var e=0;e<this.c.length;++e)if(this.c[e].La==n){this.c.splice(e,1);break}e=Z(t),this.dispatchEvent(e),this.g.reject(t)}})),this.f.push(n)},Wn.prototype.G=function(t){er(this,t.target,this.a,t.message)},Wn.prototype.F=function(t){t=t.target;var e={};if(t.keyStatuses.forEach(function(t,i){if("string"==typeof t){var n=t;t=i,i=n}if("com.microsoft.playready"==this.a.a&&16==t.byteLength){var n=new DataView(t),r=n.getUint32(0,!0),s=n.getUint16(4,!0),a=n.getUint16(6,!0);n.setUint32(0,r,!1),n.setUint16(4,s,!1),n.setUint16(6,a,!1)}n=Xt(new Uint8Array(t)),e[n]=i}.bind(this)),t.expiration<Date.now()){for(var i=0;i<this.c.length;++i)if(this.c[i].La==t){this.c.splice(i,1);break}t.close(),this.f.splice(this.f.indexOf(t),1)}this.b.cb(e)},i(nr,yt),e("shaka.player.Player",nr),nr.version="v1.6.5",nr.isBrowserSupported=function(){return!!(t.MediaSource&&t.MediaKeys&&t.navigator&&t.navigator.requestMediaKeySystemAccess&&t.MediaKeySystemAccess&&t.MediaKeySystemAccess.prototype.getConfiguration&&t.Promise&&Element.prototype.requestFullscreen&&document.exitFullscreen&&"fullscreenElement"in document&&t.Uint8Array)},nr.isTypeSupported=rr,nr.setTextStyle=function(t){var e=document.getElementById("ShakaPlayerTextStyle");for(e||(e=document.createElement("style"),e.id="ShakaPlayerTextStyle",document.head.appendChild(e)),e=e.sheet;e.cssRules.length;)e.deleteRule(0);e.insertRule("::cue { "+c(t)+" }",0)},nr.prototype.destroy=function(){return this.s().then(Pt(this,function(){this.f.destroy(),this.a=this.f=null}))["catch"](function(){})},nr.prototype.destroy=nr.prototype.destroy,nr.prototype.s=function(){if(!this.b)return Promise.resolve();this.h&&ur(this),this.a.pause(),dt(this.f),hr(this),ar(this),this.i&&(this.i.destroy(),this.i=null),this.a.src="";var t=this.a.setMediaKeys(null);return this.b&&(this.b.destroy(),this.b=null),this.h=!1,this.g=new _n,t},nr.prototype.unload=nr.prototype.s,nr.prototype.ea=function(t){var e=this.s();return this.a.autoplay&&(s("load"),pt(this.f,this.a,"timeupdate",this.wb.bind(this))),t.T(this.c),t.pb(this.F),this.F=null,e=e.then(Pt(this,function(){return t.X()})),e["catch"](Pt(this,function(e){return t.destroy(),Promise.reject(e)})),e.then(Pt(this,function(){return this.a?(this.b=t,pt(this.f,this.b,"seekrangechanged",this.Fb.bind(this)),this.i=new Wn(this,this.a,this.b),this.i.initialize()):sr()})).then(Pt(this,function(){return this.a?(pt(this.f,this.a,"error",this.Rb.bind(this)),pt(this.f,this.a,"playing",this.Db.bind(this)),pt(this.f,this.a,"pause",this.Cb.bind(this)),this.b.lb(this,this.a)):sr()})).then(Pt(this,function(){return this.a?$n(this.i):sr()})).then(Pt(this,function(){return this.a?void or(this):sr()}))["catch"](Pt(this,function(t){if(!this.a)return sr();if("destroy"!=t.type){var e=Z(t);this.dispatchEvent(e)}return this.s().then(function(){return Promise.reject(t)})}))},nr.prototype.load=nr.prototype.ea,Wr=nr.prototype,Wr.wb=function(){a("load"),this.g.playbackLatency=o("load")/1e3,this.f.sa(this.a,"timeupdate")},Wr.Rb=function(){if(this.a.error){var t=this.a.error.code;t!=MediaError.MEDIA_ERR_ABORTED&&(t=Error(ks[t]||"Unknown playback error."),t.type="playback",t=Z(t),this.dispatchEvent(t))}},Wr.Db=function(){s("playing"),!this.j&&0>this.l&&(this.a.playbackRate=0,this.B(this.a.currentTime,Date.now(),this.l)),this.h&&ur(this)},Wr.Cb=function(){a("playing");var t=o("playing");if(!isNaN(t)){var e=this.g;e.playTime+=t/1e3}ar(this)},Wr.Fb=function(t){this.D=t.start},Wr.qb=function(){if(!this.a.paused){a("playing");var t=o("playing");if(!isNaN(t)){var e=this.g;e.playTime+=t/1e3,s("playing")}}return t=this.g,e=this.a,e.getVideoPlaybackQuality&&(e=e.getVideoPlaybackQuality(),t.decodedFrames=e.totalVideoFrames,t.droppedFrames=e.droppedVideoFrames),this.g},nr.prototype.getStats=nr.prototype.qb,nr.prototype.da=function(){return this.b?this.b.ma():[]},nr.prototype.getVideoTracks=nr.prototype.da,nr.prototype.Y=function(){return this.b?this.b.pa():[]},nr.prototype.getAudioTracks=nr.prototype.Y,nr.prototype.$=function(){return this.b?this.b.Oa():[]},nr.prototype.getTextTracks=nr.prototype.$,nr.prototype.selectVideoTrack=function(t,e){return this.b?this.b.selectVideoTrack(t,void 0==e?!0:e):!1},nr.prototype.selectVideoTrack=nr.prototype.selectVideoTrack,nr.prototype.M=function(t,e,i){return this.b?this.b.nb(t,void 0==e?!0:e,i):!1},nr.prototype.selectAudioTrack=nr.prototype.M,nr.prototype.fa=function(t){return this.b?this.b.ob(t,!1):!1},nr.prototype.selectTextTrack=nr.prototype.fa,nr.prototype.V=function(t){this.b&&this.b.Na(t)},nr.prototype.enableTextTrack=nr.prototype.V,nr.prototype.T=function(t){ar(this),t>=0?this.a.playbackRate=t:this.a.paused||(this.a.playbackRate=0,this.B(this.a.currentTime,Date.now(),t)),this.l=t},nr.prototype.setPlaybackRate=nr.prototype.T,nr.prototype.K=function(){return this.l},nr.prototype.getPlaybackRate=nr.prototype.K,nr.prototype.R=function(t){this.F=t},nr.prototype.setPlaybackStartTime=nr.prototype.R,nr.prototype.G=function(){return this.b?this.b.mb():!1},nr.prototype.isLive=nr.prototype.G,nr.prototype.U=function(t){if(t){var e=nt(t,"enableAdaptation");null!=e&&(this.c.enableAdaptation=e),e=rt(t,"streamBufferSize"),null!=e&&(this.c.streamBufferSize=e),e=rt(t,"liveStreamEndTimeout"),null!=e&&(this.c.liveStreamEndTimeout=e),e=rt(t,"licenseRequestTimeout"),null!=e&&(this.c.licenseRequestTimeout=e),e=rt(t,"mpdRequestTimeout"),null!=e&&(this.c.mpdRequestTimeout=e),e=rt(t,"segmentRequestTimeout"),null!=e&&(this.c.segmentRequestTimeout=e),e=st(t,"preferredLanguage"),null!=e&&(this.c.preferredLanguage=e),e=ot(t,"restrictions",u),null!=e&&(this.c.restrictions=e.clone()),t=nt(t,"disableCacheBustingEvenThoughItMayAffectBandwidthEstimation"),null!=t&&(ws=!t),this.b&&this.b.T(this.c)}},nr.prototype.configure=nr.prototype.U,nr.prototype.Z=function(){return this.c},nr.prototype.getConfiguration=nr.prototype.Z,nr.prototype.B=function(e,i,n){this.j=null;var r=(Date.now()-i)/1e3*n;this.a.currentTime<this.D+(this.G()?1:.05)?this.a.pause():(r=Math.max(this.D,e+r),this.a.currentTime=r,this.j=t.setTimeout(this.B.bind(this,e,i,n),250))},nr.prototype.L=function(){if(or(this),!this.a.ended&&!this.a.seeking){var t=this.a.buffered,e=t.length?t.end(t.length-1):0,t=Math.max(e-this.a.currentTime,0),i=this.a.duration,i=isNaN(i)?0:Math.max(i-.05,0),e=e>=i||this.a.currentTime>=i;this.h?(i=this.b.$a(),(e||t>i)&&(ur(this),this.a.play())):!this.a.paused&&!e&&.5>t&&(this.h=!0,this.a.pause(),this.g.bufferingHistory.push(U()/1e3),s("buffering"),this.dispatchEvent(X({type:"bufferingStart"})))}};var ks={2:"A network failure occured while loading media content.",3:"The browser failed to decode the media content.",4:"The browser does not support the media content."};pr.prototype.destroy=function(){this.a.destroy(),this.a=null},pr.prototype.update=function(t){var e=dr(t),i=dr(this.a);return Promise.all([e,i]).then(Pt(this,function(e){var i=e[0];e=e[1];var n=this.a.a;return lr(n),cr(n),t.f=this.a.f,t.g=this.a.g?this.a.g.clone():null,t.c=this.a.c,n=[],br(t,this.a,i,e,n),i=t.a,lr(i),cr(i),Promise.resolve(n)}))},e("shaka.media.SimpleAbrManager",mr),mr.prototype.destroy=function(){this.f.destroy(),this.a=this.b=this.f=null},mr.prototype.initialize=function(t,e){this.b||this.a||(this.b=t,this.a=e)},mr.prototype.start=function(){this.b&&this.a&&!this.g&&(this.c=Date.now()+4e3,pt(this.f,this.b,"bandwidth",this.v.bind(this)),pt(this.f,this.a,"adaptation",this.j.bind(this)),pt(this.f,this.a,"trackschanged",this.h.bind(this)),this.g=!0)},mr.prototype.enable=function(t){this.i=t},mr.prototype.getInitialVideoTrackId=function(){if(!this.b||!this.a)return null;var t=wr(this);return t?t.id:null},mr.prototype.selectVideoTrack=function(t,e,i){this.g&&this.a.selectVideoTrack(t.id,e,i)},mr.prototype.v=function(){Date.now()<this.c||this.h()},mr.prototype.h=function(){if(this.i){var t=wr(this);if(t){if(t.active)return void(this.c=Date.now()+3e3);this.selectVideoTrack(t,!1)}this.c=Number.POSITIVE_INFINITY}},mr.prototype.j=function(){this.c==Number.POSITIVE_INFINITY&&(this.c=Date.now()+3e4)},i(Er,yt),e("shaka.player.HttpVideoSource",Er),Er.prototype.T=function(){},Er.prototype.destroy=function(){this.a&&(this.a.parentElement.removeChild(this.a),this.a=null),this.v=this.b=null},Wr=Er.prototype,Wr.lb=function(t,e){this.v=t;var i=e.mediaKeys;return e.src=this.f,i=e.setMediaKeys(i),this.c&&(this.a=document.createElement("track"),this.a.src=this.c,e.appendChild(this.a),this.a.track.mode="showing"),i},Wr.X=function(){return Promise.resolve()},Wr.ma=function(){return[]},Wr.pa=function(){return[]},Wr.Oa=function(){return[]},Wr.$a=function(){return 5},Wr.ab=function(){var t=new un;return t.a=this.b,[t]},Wr.Ka=function(){},Er.prototype.selectVideoTrack=function(){return!1},Wr=Er.prototype,Wr.nb=function(){return!1},Wr.ob=function(){return!1},Wr.Na=function(t){this.a&&(this.a.track.mode=t?"showing":"disabled")},Wr.pb=function(){},Wr.ua=function(){return[]},Wr.ha=function(){return!1},Wr.mb=function(){return!1},Wr.cb=function(t){for(var e in t){var i=t[e],n=os[i]||null;if(n){var r=wt(e),n=Error("Key "+r+" is not usable. "+n);n.type="drm",n.code=i,i=Z(n),this.dispatchEvent(i)}}},i(Tr,yt),e("shaka.player.StreamVideoSource",Tr),Tr.prototype.T=function(t){null!=t.streamBufferSize&&(this.F.streamBufferSize=t.streamBufferSize),null!=t.segmentRequestTimeout&&(this.F.segmentRequestTimeout=t.segmentRequestTimeout),qr(this),null!=t.enableAdaptation&&this.G.enable(Boolean(t.enableAdaptation)),null!=t.mpdRequestTimeout&&(this.da=Number(t.mpdRequestTimeout)),null!=t.liveStreamEndTimeout&&(this.Ua=Number(t.liveStreamEndTimeout)),null!=t.preferredLanguage&&(this.K=et(String(t.preferredLanguage))),null!=t.restrictions&&(this.h=t.restrictions,this.L&&Pr(this))},Tr.prototype.destroy=function(){this.B.destroy(),this.ea.destroy(),this.ea=this.B=null,this.Y&&(t.clearTimeout(this.Y),this.Y=null),this.V&&(t.clearTimeout(this.V),this.V=null),this.s=null,this.i.destroy(),this.i=null,it(this.c).forEach(function(t){t.destroy()}),this.b=this.c=null,this.a&&(this.a.destroy(),this.a=null),this.G.destroy(),this.v=this.h=this.U=this.f=this.g=this.Z=this.G=null},Wr=Tr.prototype,Wr.lb=function(e,i){if(!this.L){var n=Error("Cannot call attach() right now.");return n.type="app",Promise.reject(n)}return this.v=e,this.f=i,this.U=e.qb(),pt(this.i,this.g,"sourceopen",this.yb.bind(this)),pt(this.i,this.Z,"bandwidth",this.Sb.bind(this)),this.a.b&&(pt(this.i,e,"bufferingStart",this.vb.bind(this)),pt(this.i,e,"bufferingEnd",this.ub.bind(this))),n=this.f.mediaKeys,this.f.src=t.URL.createObjectURL(this.g),n=this.f.setMediaKeys(n),Promise.all([this.B,n])},Wr.X=function(){if(this.L){var t=Error("Cannot call load() right now.");return t.type="app",Promise.reject(t)}return this.a&&0!=this.a.a.length?(t=this.a.a,lr(t),cr(t),0==this.a.a.length||0==this.a.a[0].a.length?(t=Error("The manifest specifies content that cannot be displayed on this browser/platform."),t.type="stream",Promise.reject(t)):(this.L=!0,this.F.initialStreamBufferSize=this.a.c,qr(this),Pr(this),Promise.resolve())):(t=Error("The manifest does not specify any content."),t.type="stream",Promise.reject(t))},Wr.gb=function(t){var e=Date.now(),i=this.V=null,n=this.a.g;(t?this.eb():this.fb(n)).then(Pt(this,function(t){return i=new pr(t),i.update(this.a)})).then(Pt(this,function(t){i.destroy(),i=null;for(var n=0;n<t.length;++n)Sr(this,t[n]);this.F.initialStreamBufferSize=this.a.c,qr(this),Pr(this),0==Object.keys(this.c).length?Ir(this):kr(this,(Date.now()-e)/1e3)}))["catch"](Pt(this,function(t){i&&(i.destroy(),i=null),"aborted"!=t.type&&(t=Z(t),this.dispatchEvent(t),this.a&&kr(this,0))}))},Wr.fb=function(){return Promise.reject("Cannot update manifest with this VideoSource implementation.")},Wr.eb=function(){return Promise.reject("Cannot update manifest with this VideoSource implementation.")},Wr.ma=function(){if(!this.b.a.hasOwnProperty("video"))return[];for(var t=this.c.video,t=(t=t?t.oa():null)?t.C:0,e=[],i=this.b.get("video"),n=0;n<i.length;++n)for(var r=i[n],s=0;s<r.m.length;++s){var a=r.m[s];if(a.N&&a.J){var o=a.C,a=new d(o,a.bandwidth,a.width,a.height);o==t&&(a.active=!0),e.push(a)}}return e},Tr.prototype.getVideoTracks=Tr.prototype.ma,Tr.prototype.pa=function(){if(!this.b.a.hasOwnProperty("audio"))return[];for(var t=this.c.audio,t=(t=t?t.oa():null)?t.C:0,e=[],i=this.b.get("audio"),n=0;n<i.length;++n)for(var r=i[n],s=r.lang,a=0;a<r.m.length;++a){var o=r.m[a];if(o.N&&o.J){var u=o.C,o=new h(u,o.bandwidth,s);u==t&&(o.active=!0),e.push(o)}}return e},Tr.prototype.getAudioTracks=Tr.prototype.pa,Tr.prototype.Oa=function(){if(!this.b.a.hasOwnProperty("text"))return[];for(var t=this.c.text,e=t?t.oa():null,e=e?e.C:0,i=[],n=this.b.get("text"),r=0;r<n.length;++r)for(var s=n[r],a=s.lang,o=0;o<s.m.length;++o){var h=s.m[o].C,u=new p(h,a);h==e&&(u.active=!0,u.enabled=t.Da()),i.push(u)}return i},Tr.prototype.getTextTracks=Tr.prototype.Oa,Tr.prototype.$a=function(){return Number(this.F.initialStreamBufferSize)},Tr.prototype.ab=function(){var t;if(this.L){t=this.a.a[0];for(var e=[],i=0;i<t.a.length;++i)e.push.apply(e,an(t.a[i]));t=e}else t=[];return t},Tr.prototype.Ka=function(t){if(this.L){for(var e={},i=this.a.a[0],n=0;n<i.a.length;++n){var r=i.a[n];e[r.C]=r}for(this.b.a={},i=ct(t),n=0;n<i.length;++n){var r=i[n],s=t.get(r);if("video"==r){var a=s[0].id;this.b.push(r,e[a])}else if("audio"==r)for(var a=s[0].b.split(";")[0],o=0;o<s.length;++o){var h=s[o];h.b.split(";")[0]==a&&this.b.push(r,e[h.id])}else for(o=0;o<s.length;++o)a=s[o].id,this.b.push(r,e[a])}this.fa=!0,(t=this.b.get("audio"))&&(Mr(this,t),this.b.set("audio",t),t=t[0].lang||this.K,tt(2,this.K,t)&&(this.fa=!1)),(t=this.b.get("text"))&&(Mr(this,t),this.b.set("text",t),t=t[0].lang||this.K,tt(2,this.K,t)||(this.fa=!1))}},Tr.prototype.selectVideoTrack=function(t,e,i){return jr(this,"video",t,e,i)},Wr=Tr.prototype,Wr.nb=function(t,e,i){return jr(this,"audio",t,e,i)},Wr.ob=function(t,e){return jr(this,"text",t,e)},Wr.Na=function(t){var e=this.c.text;e&&e.va(t)},Wr.pb=function(t){this.$=t},Wr.ua=function(){return[]},Wr.ha=function(){return!1},Wr.mb=function(){return this.a?this.a.b:!1},Wr.cb=function(t){for(var e,i=!1,n=new ht,r=ut(this.b),s=0;s<r.length;++s)for(var a=r[s],o=0;o<a.m.length;++o){var h=a.m[o];h.f.forEach(function(t){n.push(t,h)})}for(e in t)if(r=os[t[e]]||null,a=n.get(e))for(s=0;s<a.length;++s)h=a[s],o=h.N,h.N=!r,o!=h.N&&(i=!0);else wt(e);i&&(Ar(this),e=this.pa(),t=this.ma(),e=this.b.a.hasOwnProperty("audio")&&0==e.length,t=this.b.a.hasOwnProperty("video")&&0==t.length,e||t)&&(t=Error("The key system has restricted all "+(e&&t?"audio and video tracks.":e?"audio tracks.":"video tracks.")),t.type="drm",t=Z(t),this.dispatchEvent(t))},Wr.yb=function(){this.i.sa(this.g,"sourceopen"),Ir(this).then(Pt(this,function(){this.B&&this.B.resolve()}))["catch"](Pt(this,function(t){this.B&&this.B.reject(t)}))},Wr.tb=function(t){n(t&&t.length==Object.keys(this.c).length);for(var e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=0;r<t.length;++r)var s=t[r],e=Math.min(e,s),i=Math.max(i,s);for(t=Or(this),r=0;r<t.length;++r)t[r].ka(i);_r(this,t,i),r=ut(this.b).map(function(t){return t.m}).reduce(function(t,e){return t.concat(e)},[]).map(function(t){var e=[t.I.create()];return t.H&&e.push(t.H.create()),Promise.all(e)}),Promise.all(r).then(Pt(this,function(t){for(var e=0;e<t.length;++e)t[e][0].ka(i);this.Ra=!0;for(var n in this.s)t=this.s[n],e=this.c[n],xn(this.U,t.Pa),e.ra(t.Pa,t.Wa,t.Xa);this.s={}}))["catch"](Pt(this,function(t){"aborted"!=t.type&&(t=Z(t),this.dispatchEvent(t))}))},Wr.Jb=function(){this.Y=null,Kr(this);var e=Br(this,Or(this));e&&(this.a.b&&this.Ta!=e.A&&(this.Ta=e.A,null!=this.w&&(t.clearTimeout(this.w),this.w=null)),Lr(this,e.start,e.end),this.f.paused||Ur(this,this.f.currentTime,e.start,e.end))},Wr.Gb=function(){var t=this.f.currentTime;if(null!=this.D){if(t>=this.D-.01&&t<=this.D+.01)return void(this.D=null);this.D=null}var e=Br(this,Or(this));if(e){var i=e.end;if((e=Ur(this,t,e.start,i))||(i+.01>=t?e=!1:(this.f.currentTime=i,e=!0)),!e)for(var n in this.c)this.c[n].jb()}},Wr.Hb=function(){if(!this.a.b){for(var t in this.c)if(!this.c[t].Ga())return;this.Za()}},Wr.vb=function(){it(this.c).every(function(t){return t.Ga()})&&(this.w=t.setTimeout(this.Za.bind(this),1e3*this.Ua))},Wr.ub=function(){null!=this.w&&(t.clearTimeout(this.w),this.w=null)},Wr.Sb=function(){var t=this.U,e=this.Z.getBandwidth();t.estimatedBandwidth=e,t.bandwidthHistory.push(new Un(e))},Wr.Za=function(){this.w=null,this.g.endOfStream()},i(Vr,Tr),e("shaka.player.DashVideoSource",Vr),Vr.prototype.Aa=function(t,e,i){this.R.push(t),this.ga.push(e||""),this.ta.push(i||"")},Vr.prototype.addExternalCaptions=Vr.prototype.Aa,Vr.prototype.xa=function(t){this.j=t},Vr.prototype.setNetworkCallback=Vr.prototype.xa,Vr.prototype.destroy=function(){this.l=this.j=this.M=null,Tr.prototype.destroy.call(this)},Vr.prototype.X=function(){var t=new Ai(this.j,[new je(this.za)]);return Ri(new Ni(t,this.da)).then(Pt(this,function(t){this.l=t;for(var e=0;e<this.R.length;e++){var i=t,n=this.R[e],r=this.ga[e],s=this.ta[e];if(0!==i.a.length){var a=new Oe;a.contentType="text",a.lang=r||"en",a.c=!0,r=new qe,r.bandwidth=0,r.f=s||"text/vtt",r.u=[new je(n)],a.a.push(r),i.a[0].b.push(a),ei(i.a[0])}}return this.a=kn(new Tn(this.M),t,this.j),Tr.prototype.X.call(this)}))},Vr.prototype.fb=function(t){return Ri(new Ni(t,this.da)).then(Pt(this,function(t){return this.l=t,t=kn(new Tn(this.M),t,this.j),Promise.resolve(t)}))},Vr.prototype.eb=function(){var t=kn(new Tn(this.M),this.l,this.j);return Promise.resolve(t)},i(Fr,Tr),e("shaka.player.OfflineVideoSource",Fr),Fr.prototype.T=function(t){null!=t.licenseRequestTimeout&&(this.l.licenseRequestTimeout=t.licenseRequestTimeout),null!=t.segmentRequestTimeout&&(this.l.segmentRequestTimeout=t.segmentRequestTimeout),Tr.prototype.T.call(this,t)},e("shaka.player.OfflineVideoSource.retrieveGroupIds",function(){var t=new xt,e=jt(t).then(function(){return Lt(t)});return e.then(function(){Mt(t)})["catch"](function(){Mt(t)}),e}),Fr.prototype.xa=function(e,i,n,r){var s,a=null,o={},h=[];return e=new Ai(this.ga,[new je(e)]),Ri(new Ni(e,this.da)).then(Pt(this,function(t){return this.a=kn(new Tn(n),t,this.ga),this.a.b?(t=Error("Unable to store live streams offline."),t.type="app",Promise.reject(t)):(this.T({preferredLanguage:i}),Tr.prototype.X.call(this))})).then(Pt(this,function(){var e=document.createElement("video");return e.src=t.URL.createObjectURL(this.g),s=new Wn(null,e,this),null!=this.l.licenseRequestTimeout&&(s.w=Number(this.l.licenseRequestTimeout)),pt(this.i,s,"sessionReady",this.ta.bind(this)),pt(this.i,s,"error",function(t){a=t}),s.initialize()})).then(Pt(this,function(){for(var t=ut(this.b),e=0;e<t.length;++e)for(var i=t[e],n=0;n<i.m.length;++n){var s=i.m[n];o[s.C]=s}return r()})).then(Pt(this,function(t){for(var e=0;e<t.length;++e){var i=t[e],n=o[i];if(!n)return Promise.reject(Error("Invalid stream ID chosen: "+i));h.push(n)}var r=["audio","video"];return h=h.filter(function(t){return!(0>r.indexOf(t.a.split("/")[0]))}),t=h.map(function(t){return t.H.create()}),Promise.all(t)})).then(Pt(this,function(t){for(var e=h,i=[],n=0;n<e.length;++n)try{i[n]=this.g.addSourceBuffer(rn(e[n]))}catch(r){}if(e.length!=i.length)t=Error("Error initializing streams."),t.type="storage",t=Promise.reject(t);else{for(n=0;n<t.length;++n)(e=t[n])&&i[n].appendBuffer(e);t=Promise.resolve()}return t})).then(Pt(this,function(){return Yn(s,this.timeoutMs)})).then(Pt(this,function(){return a?Promise.reject(a):Hr(this,h,s.a,this.a.a[0].b)})).then(Pt(this,function(t){return this.R=t,a?(zr(this),Promise.reject(a)):Promise.resolve(t)}))},e("shaka.player.OfflineVideoSource.prototype.store",Fr.prototype.xa),Fr.prototype.Aa=function(t){this.ga=t},Fr.prototype.setNetworkCallback=Fr.prototype.Aa,Fr.prototype.ta=function(t){this.M.push(t.detail.sessionId)},Fr.prototype.X=function(){var t,e,i=new xt;return jt(i).then(Pt(this,function(){return Ut(i,this.R)})).then(Pt(this,function(n){var r=[];this.M=n.session_ids,t=n.duration,e={keySystem:n.key_system,distinctiveIdentifierRequired:n.distinctive_identifier,persistentStorageRequired:!0,audioRobustness:n.audio_robustness,videoRobustness:n.video_robustness,withCredentials:n.with_credentials,licenseServerUrl:n.license_server};for(var s=0;s<n.stream_ids.length;++s)r.push(Ot(i,n.stream_ids[s]));return Promise.all(r)})).then(Pt(this,function(i){var n=t,r=e,s=new hn;s.c=5;for(var a=new on,o=0;o<i.length;++o){var h=i[o],u=new nn,l=new en(h.references),c=new Li(null,h.init_segment);u.I=l,u.H=c,u.a=h.mime_type,u.b=h.codecs,u.N=!0,this.j&&(null!=this.j.licenseServerUrl&&(r.licenseServerUrl=this.j.licenseServerUrl),null!=this.j.withCredentials&&(r.withCredentials=this.j.withCredentials),r.licensePostProcessor=this.j.licensePostProcessor,r.licensePreProcessor=this.j.licensePreProcessor,r.serverCertificate=this.j.serverCertificate),h=ee(r),l=new sn,l.m.push(u),l.a.push(h),l.contentType=u.a.split("/")[0],a.a.push(l),a.b=n}return s.a.push(a),this.a=s,Tr.prototype.X.call(this)})).then(function(){return Mt(i),Promise.resolve()})["catch"](function(t){return Mt(i),Promise.reject(t)})},Fr.prototype.za=function(t,e){t&&(this.j={licenseServerUrl:t.licenseServerUrl,withCredentials:t.withCredentials,serverCertificate:t.serverCertificate,licensePreProcessor:t.licensePreProcessor,licensePostProcessor:t.licensePostProcessor});var i=null;return Gr(this)["catch"](function(t){return e?(i=t,Promise.resolve()):Promise.reject(t)}).then(Pt(this,function(){return zr(this)})).then(function(){return Promise.resolve(i)})},Fr.prototype.deleteGroup=Fr.prototype.za,Fr.prototype.ua=function(){return this.M},Fr.prototype.ha=function(){return!0}}).bind(r,this)(),"undefined"!=typeof t&&t.exports?t.exports=r.shaka:(n=function(){return r.shaka}.call(e,i,e,t),!(void 0!==n&&(t.exports=n)))}()}});

Mr.hm X_Shell Backd00r 1.0, Coded By Mr.hm X_Shell Backd00r